summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Vaca <albertvaka@gmail.com>2016-10-29 14:32:24 (GMT)
committerAlbert Vaca <albertvaka@gmail.com>2016-10-29 14:33:05 (GMT)
commitc71f3082521d17275e562ad296457681640bcf26 (patch)
tree0971b3eb50b8bcb490baf69f8fa7d8a2627a3b3a
parentdd126149d67a3a28c7040752e3bc65bfdc6c68fa (diff)
Fixes suggested by Clazy
-rw-r--r--conf/dlgannotations.h2
-rw-r--r--conf/dlgdebug.h2
-rw-r--r--conf/dlggeneral.h2
-rw-r--r--conf/preferencesdialog.h1
-rw-r--r--core/chooseenginedialog_p.h2
-rw-r--r--core/document.cpp3
-rw-r--r--core/fileprinter.cpp3
-rw-r--r--core/textdocumentsettings.h4
-rw-r--r--generators/chm/lib/libchmfile_search.cpp2
-rw-r--r--generators/chm/lib/libchmurlfactory.h1
-rw-r--r--generators/dvi/dviRenderer_prescan.cpp1
-rw-r--r--generators/dvi/dviexport.cpp4
-rw-r--r--generators/dvi/dviexport.h4
-rw-r--r--generators/dvi/dvisourcesplitter.cpp2
-rw-r--r--generators/dvi/generator_dvi.cpp4
-rw-r--r--generators/epub/converter.cpp2
-rw-r--r--generators/epub/converter.h4
-rw-r--r--generators/epub/epubdocument.h4
-rw-r--r--generators/fictionbook/converter.cpp3
-rw-r--r--generators/fictionbook/converter.h2
-rw-r--r--generators/ooo/converter.h2
-rw-r--r--generators/poppler/generator_pdf.cpp2
-rw-r--r--generators/txt/converter.h2
-rw-r--r--generators/txt/document.h2
-rw-r--r--generators/xps/generator_xps.cpp1
-rw-r--r--part.cpp2
-rw-r--r--shell/shell.cpp2
-rw-r--r--ui/annotwindow.cpp6
-rw-r--r--ui/drawingtoolactions.cpp4
-rw-r--r--ui/embeddedfilesdialog.cpp2
-rw-r--r--ui/minibar.cpp3
-rw-r--r--ui/minibar.h4
-rw-r--r--ui/pageviewutils.cpp2
-rw-r--r--ui/pageviewutils.h2
-rw-r--r--ui/presentationsearchbar.cpp4
-rw-r--r--ui/presentationwidget.cpp2
-rw-r--r--ui/propertiesdialog.cpp2
-rw-r--r--ui/side_reviews.cpp2
-rw-r--r--ui/sidebar.cpp4
-rw-r--r--ui/thumbnaillist.h4
40 files changed, 78 insertions, 28 deletions
diff --git a/conf/dlgannotations.h b/conf/dlgannotations.h
index d0f691f..8579ff9 100644
--- a/conf/dlgannotations.h
+++ b/conf/dlgannotations.h
@@ -15,6 +15,8 @@
class DlgAnnotations : public QWidget
{
+ Q_OBJECT
+
public:
explicit DlgAnnotations( QWidget * parent = Q_NULLPTR );
};
diff --git a/conf/dlgdebug.h b/conf/dlgdebug.h
index edc433d..33a2bf0 100644
--- a/conf/dlgdebug.h
+++ b/conf/dlgdebug.h
@@ -14,6 +14,8 @@
class DlgDebug : public QWidget
{
+ Q_OBJECT
+
public:
explicit DlgDebug( QWidget * parent = Q_NULLPTR );
};
diff --git a/conf/dlggeneral.h b/conf/dlggeneral.h
index 4145d92..8412914 100644
--- a/conf/dlggeneral.h
+++ b/conf/dlggeneral.h
@@ -18,6 +18,8 @@ class Ui_DlgGeneralBase;
class DlgGeneral : public QWidget
{
+ Q_OBJECT
+
public:
explicit DlgGeneral( QWidget * parent, Okular::EmbedMode embedMode );
virtual ~DlgGeneral();
diff --git a/conf/preferencesdialog.h b/conf/preferencesdialog.h
index 0558718..d70fa1b 100644
--- a/conf/preferencesdialog.h
+++ b/conf/preferencesdialog.h
@@ -27,6 +27,7 @@ class DlgDebug;
class PreferencesDialog : public KConfigDialog
{
+ Q_OBJECT
public:
PreferencesDialog( QWidget * parent, KConfigSkeleton * config, Okular::EmbedMode embedMode );
diff --git a/core/chooseenginedialog_p.h b/core/chooseenginedialog_p.h
index 8e7f15a..8847df3 100644
--- a/core/chooseenginedialog_p.h
+++ b/core/chooseenginedialog_p.h
@@ -19,6 +19,8 @@ class Ui_ChooseEngineWidget;
class ChooseEngineDialog : public QDialog
{
+ Q_OBJECT
+
public:
ChooseEngineDialog( const QStringList &generators, const QMimeType &mime, QWidget * parent = 0 );
~ChooseEngineDialog();
diff --git a/core/document.cpp b/core/document.cpp
index f610cc7..ff9253a 100644
--- a/core/document.cpp
+++ b/core/document.cpp
@@ -822,7 +822,6 @@ Document::OpenResult DocumentPrivate::openDocumentInternal( const KPluginMetaDat
{
QString propName = offer.pluginId();
QHash< QString, GeneratorInfo >::const_iterator genIt = m_loadedGenerators.constFind( propName );
- QString catalogName;
m_walletGenerator = 0;
if ( genIt != m_loadedGenerators.constEnd() )
{
@@ -3685,7 +3684,7 @@ void Document::editFormCombo( int pageNumber,
}
else
{
- prevText = form->choices()[form->currentChoices()[0]];
+ prevText = form->choices()[form->currentChoices().constFirst()];
}
QUndoCommand *uc = new EditFormComboCommand( this->d, form, pageNumber, newText, newCursorPos, prevText, prevCursorPos, prevAnchorPos );
diff --git a/core/fileprinter.cpp b/core/fileprinter.cpp
index 157c427..a27529e 100644
--- a/core/fileprinter.cpp
+++ b/core/fileprinter.cpp
@@ -517,8 +517,7 @@ QStringList FilePrinter::optionMedia( QPrinter &printer )
if ( ! mediaPageSize( printer ).isEmpty() &&
! mediaPaperSource( printer ).isEmpty() ) {
return QStringList(QStringLiteral("-o")) <<
- QStringLiteral("media=%1,%2").arg( mediaPageSize( printer ) )
- .arg( mediaPaperSource( printer ) );
+ QStringLiteral("media=%1,%2").arg( mediaPageSize( printer ), mediaPaperSource( printer ) );
}
if ( ! mediaPageSize( printer ).isEmpty() ) {
diff --git a/core/textdocumentsettings.h b/core/textdocumentsettings.h
index f5a5879..1bd5f64 100644
--- a/core/textdocumentsettings.h
+++ b/core/textdocumentsettings.h
@@ -81,6 +81,8 @@ class TextDocumentSettingsPrivate;
*/
class OKULARCORE_EXPORT TextDocumentSettingsWidget : public QWidget
{
+ Q_OBJECT
+
public:
TextDocumentSettingsWidget( QWidget *parent = Q_NULLPTR );
virtual ~TextDocumentSettingsWidget();
@@ -105,6 +107,8 @@ class OKULARCORE_EXPORT TextDocumentSettingsWidget : public QWidget
*/
class OKULARCORE_EXPORT TextDocumentSettings : public KConfigSkeleton
{
+ Q_OBJECT
+
public:
QFont font() const;
diff --git a/generators/chm/lib/libchmfile_search.cpp b/generators/chm/lib/libchmfile_search.cpp
index 02c6a7c..76532b1 100644
--- a/generators/chm/lib/libchmfile_search.cpp
+++ b/generators/chm/lib/libchmfile_search.cpp
@@ -41,8 +41,6 @@ static inline void validateWord ( QString & word, bool & query_valid )
static inline void validateWords ( QStringList & wordlist, bool & query_valid )
{
- QRegExp rxvalid (QStringLiteral("[^\\d\\w_\\.]+"));
-
for ( int i = 0; i < wordlist.size(); i++ )
validateWord ( wordlist[i], query_valid );
}
diff --git a/generators/chm/lib/libchmurlfactory.h b/generators/chm/lib/libchmurlfactory.h
index ddd4805..c61c433 100644
--- a/generators/chm/lib/libchmurlfactory.h
+++ b/generators/chm/lib/libchmurlfactory.h
@@ -30,7 +30,6 @@ static inline bool isRemoteURL( const QString & url, QString & protocol )
{
// Check whether the URL is external
QRegExp uriregex ( QStringLiteral("^(\\w+):\\/\\/") );
- QRegExp mailtoregex ( QStringLiteral("^(mailto):") );
// mailto: can also have different format, so handle it
if ( url.startsWith( QLatin1String("mailto:") ) )
diff --git a/generators/dvi/dviRenderer_prescan.cpp b/generators/dvi/dviRenderer_prescan.cpp
index 7c68597..688f317 100644
--- a/generators/dvi/dviRenderer_prescan.cpp
+++ b/generators/dvi/dviRenderer_prescan.cpp
@@ -441,7 +441,6 @@ void dviRenderer::prescan_ParsePSFileSpecial(const QString& cp)
// If the EPSfilename really points to a PDF file, convert that file now.
if (ending == QLatin1String("pdf")) {
QString convErrorMsg;
- QString oEPSfilename = EPSfilename;
EPSfilename = dviFile->convertPDFtoPS(EPSfilename, &convErrorMsg);
if (convErrorMsg.isEmpty() != true) {
emit error(convErrorMsg, -1);
diff --git a/generators/dvi/dviexport.cpp b/generators/dvi/dviexport.cpp
index ad74b5f..8d462da 100644
--- a/generators/dvi/dviexport.cpp
+++ b/generators/dvi/dviexport.cpp
@@ -108,7 +108,7 @@ void DVIExport::finished_impl(int exit_code)
void DVIExport::output_receiver()
{
if (process_) {
- QString out = QString::fromLocal8Bit(process_->readAllStandardOutput());
+ process_->readAllStandardOutput();
}
}
@@ -137,8 +137,6 @@ DVIExportToPDF::DVIExportToPDF(dviRenderer& parent, const QString& output_name)
return;
}
- // Generate a suggestion for a reasonable file name
- const QString suggested_name = dvi.filename.left(dvi.filename.indexOf(QStringLiteral("."))) + QStringLiteral(".pdf");
if (output_name.isEmpty())
return;
diff --git a/generators/dvi/dviexport.h b/generators/dvi/dviexport.h
index 307cfa2..1de1ebc 100644
--- a/generators/dvi/dviexport.h
+++ b/generators/dvi/dviexport.h
@@ -94,6 +94,8 @@ private:
class DVIExportToPDF : public DVIExport
{
+ Q_OBJECT
+
public:
/** @param parent is stored internally in order to inform the parent
* that the external process has finished.
@@ -105,6 +107,8 @@ public:
class DVIExportToPS : public DVIExport
{
+ Q_OBJECT
+
public:
/** @param parent is stored internally in order to inform the parent
* that the external process has finished.
diff --git a/generators/dvi/dvisourcesplitter.cpp b/generators/dvi/dvisourcesplitter.cpp
index f9b82db..26da798 100644
--- a/generators/dvi/dvisourcesplitter.cpp
+++ b/generators/dvi/dvisourcesplitter.cpp
@@ -54,7 +54,7 @@ DVI_SourceFileSplitter::DVI_SourceFileSplitter(const QString &srclink, const QSt
bool fiExists = m_fileInfo.exists();
//if it doesn't exist, but adding ".tex"
- if ( !fiExists && QFileInfo(m_fileInfo.absoluteFilePath() + QStringLiteral(".tex")).exists() )
+ if ( !fiExists && QFileInfo::exists(m_fileInfo.absoluteFilePath() + QStringLiteral(".tex")) )
m_fileInfo.setFile(m_fileInfo.absoluteFilePath() + QStringLiteral(".tex"));
//if that doesn't help either, perhaps the file started with a
diff --git a/generators/dvi/generator_dvi.cpp b/generators/dvi/generator_dvi.cpp
index 7a63fc0..d98d1e8 100644
--- a/generators/dvi/generator_dvi.cpp
+++ b/generators/dvi/generator_dvi.cpp
@@ -408,9 +408,7 @@ Okular::FontInfo::List DviGenerator::fontsForPage( int page )
else
{
name = QStringLiteral( "%1 (%2), %3%" )
- .arg( font->fontname )
- .arg( font->getFullFontName() )
- .arg( zoom );
+ .arg( font->fontname, font->getFullFontName(), QString::number(zoom) );
}
#else
name = QString( "%1, %2%" )
diff --git a/generators/epub/converter.cpp b/generators/epub/converter.cpp
index 9b28323..bc47e3c 100644
--- a/generators/epub/converter.cpp
+++ b/generators/epub/converter.cpp
@@ -239,7 +239,7 @@ QTextDocument* Converter::convert( const QString &fileName )
newDoc.setContent(QStringLiteral("<img src=\"%1\" height=\"%2\" width=\"%3\" />").arg(lnk).arg(ht).arg(wd));
imgNodes.append(newDoc.documentElement());
}
- foreach (QDomNode nd, imgNodes) {
+ foreach (const QDomNode& nd, imgNodes) {
svgs.at(i).parentNode().replaceChild(nd,svgs.at(i));
}
}
diff --git a/generators/epub/converter.h b/generators/epub/converter.h
index 43613a2..71cecf8 100644
--- a/generators/epub/converter.h
+++ b/generators/epub/converter.h
@@ -19,7 +19,9 @@ class QTextCursor;
namespace Epub {
class Converter : public Okular::TextDocumentConverter
- {
+ {
+ Q_OBJECT
+
public:
Converter();
~Converter();
diff --git a/generators/epub/epubdocument.h b/generators/epub/epubdocument.h
index 132f067..eada779 100644
--- a/generators/epub/epubdocument.h
+++ b/generators/epub/epubdocument.h
@@ -20,7 +20,9 @@
namespace Epub {
- class EpubDocument : public QTextDocument {
+ class EpubDocument : public QTextDocument
+ {
+ Q_OBJECT
public:
EpubDocument(const QString &fileName);
diff --git a/generators/fictionbook/converter.cpp b/generators/fictionbook/converter.cpp
index ce6d494..cbb856f 100644
--- a/generators/fictionbook/converter.cpp
+++ b/generators/fictionbook/converter.cpp
@@ -313,8 +313,7 @@ bool Converter::convertDocumentInfo( const QDomElement &element )
return false;
mDocumentInfo->mAuthor = QStringLiteral( "%1 %2 %3 <%4> (%5)" )
- .arg( firstName ).arg( middleName ).arg( lastName )
- .arg( email ).arg( nickname );
+ .arg( firstName, middleName, lastName, email, nickname );
} else if ( child.tagName() == QLatin1String( "program-used" ) ) {
if ( !convertTextNode( child, mDocumentInfo->mProducer ) )
return false;
diff --git a/generators/fictionbook/converter.h b/generators/fictionbook/converter.h
index 7de5dc4..7ae85b0 100644
--- a/generators/fictionbook/converter.h
+++ b/generators/fictionbook/converter.h
@@ -19,6 +19,8 @@ namespace FictionBook {
class Converter : public Okular::TextDocumentConverter
{
+ Q_OBJECT
+
public:
Converter();
~Converter();
diff --git a/generators/ooo/converter.h b/generators/ooo/converter.h
index e293ee2..73879cd 100644
--- a/generators/ooo/converter.h
+++ b/generators/ooo/converter.h
@@ -26,6 +26,8 @@ class Document;
class Converter : public Okular::TextDocumentConverter
{
+ Q_OBJECT
+
public:
Converter();
~Converter();
diff --git a/generators/poppler/generator_pdf.cpp b/generators/poppler/generator_pdf.cpp
index c233f48..8d3fce2 100644
--- a/generators/poppler/generator_pdf.cpp
+++ b/generators/poppler/generator_pdf.cpp
@@ -65,6 +65,8 @@ static const int defaultPageHeight = 842;
class PDFOptionsPage : public QWidget
{
+ Q_OBJECT
+
public:
PDFOptionsPage()
{
diff --git a/generators/txt/converter.h b/generators/txt/converter.h
index 1848c04..379de44 100644
--- a/generators/txt/converter.h
+++ b/generators/txt/converter.h
@@ -17,6 +17,8 @@ namespace Txt
{
class Converter : public Okular::TextDocumentConverter
{
+ Q_OBJECT
+
public:
Converter();
~Converter();
diff --git a/generators/txt/document.h b/generators/txt/document.h
index bbf2923..1c3d7a8 100644
--- a/generators/txt/document.h
+++ b/generators/txt/document.h
@@ -14,6 +14,8 @@ namespace Txt
{
class Document : public QTextDocument
{
+ Q_OBJECT
+
public:
Document( const QString &fileName );
~Document();
diff --git a/generators/xps/generator_xps.cpp b/generators/xps/generator_xps.cpp
index 8b2be65..7bafbc3 100644
--- a/generators/xps/generator_xps.cpp
+++ b/generators/xps/generator_xps.cpp
@@ -536,7 +536,6 @@ static const KArchiveEntry* loadEntry( KZip *archive, const QString &fileName, Q
QString path;
QString entryName;
const int index = fileName.lastIndexOf( QChar::fromLatin1( '/' ) );
- QString ret;
if ( index > 0 ) {
path = fileName.left( index );
entryName = fileName.mid( index + 1 );
diff --git a/part.cpp b/part.cpp
index 324ad4c..27c2ca8 100644
--- a/part.cpp
+++ b/part.cpp
@@ -2005,6 +2005,8 @@ void Part::slotHideFindBar()
//BEGIN go to page dialog
class GotoPageDialog : public QDialog
{
+ Q_OBJECT
+
public:
GotoPageDialog(QWidget *p, int current, int max) : QDialog(p)
{
diff --git a/shell/shell.cpp b/shell/shell.cpp
index dfce154..448b9ff 100644
--- a/shell/shell.cpp
+++ b/shell/shell.cpp
@@ -328,7 +328,7 @@ void Shell::setupActions()
KStandardAction::open(this, SLOT(fileOpen()), actionCollection());
m_recent = KStandardAction::openRecent( this, SLOT(openUrl(QUrl)), actionCollection() );
m_recent->setToolBarMode( KRecentFilesAction::MenuMode );
- connect( m_recent, SIGNAL(triggered()), this, SLOT(showOpenRecentMenu()) );
+ connect( m_recent, &QAction::triggered, this, &Shell::showOpenRecentMenu );
m_recent->setToolTip( i18n("Click to open a file\nClick and hold to open a recent file") );
m_recent->setWhatsThis( i18n( "<b>Click</b> to open a file or <b>Click and hold</b> to select a recent file" ) );
m_printAction = KStandardAction::print( this, SLOT(print()), actionCollection() );
diff --git a/ui/annotwindow.cpp b/ui/annotwindow.cpp
index a034f98..0056e5a 100644
--- a/ui/annotwindow.cpp
+++ b/ui/annotwindow.cpp
@@ -40,6 +40,8 @@
class CloseButton
: public QPushButton
{
+ Q_OBJECT
+
public:
CloseButton( QWidget * parent = Q_NULLPTR )
: QPushButton( parent )
@@ -57,6 +59,8 @@ public:
class MovableTitle
: public QWidget
{
+ Q_OBJECT
+
public:
MovableTitle( QWidget * parent )
: QWidget( parent )
@@ -402,4 +406,4 @@ void AnnotWindow::slotHandleContentsChangedByUndoRedo(Okular::Annotation* annot,
emit containsLatex( GuiUtils::LatexRenderer::mightContainLatex( m_annot->contents() ) );
}
-#include "moc_annotwindow.cpp"
+#include "annotwindow.moc"
diff --git a/ui/drawingtoolactions.cpp b/ui/drawingtoolactions.cpp
index 58945bd..0cc8763 100644
--- a/ui/drawingtoolactions.cpp
+++ b/ui/drawingtoolactions.cpp
@@ -21,6 +21,8 @@
class ColorAction : public QAction
{
+ Q_OBJECT
+
public:
explicit ColorAction( KActionCollection *parent )
: QAction( parent )
@@ -219,3 +221,5 @@ void DrawingToolActions::createToolAction( const QString &text, const QString &t
connect( action, &QAction::triggered, this, &DrawingToolActions::actionTriggered );
}
+
+#include "drawingtoolactions.moc"
diff --git a/ui/embeddedfilesdialog.cpp b/ui/embeddedfilesdialog.cpp
index 1c475b7..e290192 100644
--- a/ui/embeddedfilesdialog.cpp
+++ b/ui/embeddedfilesdialog.cpp
@@ -107,7 +107,7 @@ EmbeddedFilesDialog::EmbeddedFilesDialog(QWidget *parent, const Okular::Document
connect(mUser2Button, SIGNAL(clicked()), this, SLOT(viewFile()));
connect(m_tw, &QWidget::customContextMenuRequested, this, &EmbeddedFilesDialog::attachViewContextMenu);
connect(m_tw, &QTreeWidget::itemSelectionChanged, this, &EmbeddedFilesDialog::updateSaveButton);
- connect(m_tw, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)), this, SLOT(viewFileItem(QTreeWidgetItem*,int)));
+ connect(m_tw, &QTreeWidget::itemDoubleClicked, this, &EmbeddedFilesDialog::viewFileItem);
}
void EmbeddedFilesDialog::updateSaveButton()
diff --git a/ui/minibar.cpp b/ui/minibar.cpp
index 8dcc6f2..5ba5c30 100644
--- a/ui/minibar.cpp
+++ b/ui/minibar.cpp
@@ -34,6 +34,7 @@
// [private widget] a flat qpushbutton that enlights on hover
class HoverButton : public QToolButton
{
+ Q_OBJECT
public:
HoverButton( QWidget * parent );
};
@@ -592,6 +593,6 @@ HoverButton::HoverButton( QWidget * parent )
KAcceleratorManager::setNoAccel( this );
}
-#include "moc_minibar.cpp"
+#include "minibar.moc"
/* kate: replace-tabs on; indent-width 4; */
diff --git a/ui/minibar.h b/ui/minibar.h
index 7cab309..6cdd738 100644
--- a/ui/minibar.h
+++ b/ui/minibar.h
@@ -51,6 +51,8 @@ class PagesEdit : public KLineEdit
class PageNumberEdit : public PagesEdit
{
+ Q_OBJECT
+
public:
PageNumberEdit( MiniBar * parent );
void setPagesNumber( int pages );
@@ -83,6 +85,8 @@ class PageLabelEdit : public PagesEdit
*/
class MiniBarLogic : public QObject, public Okular::DocumentObserver
{
+ Q_OBJECT
+
public:
MiniBarLogic( QObject * parent, Okular::Document * m_document );
~MiniBarLogic();
diff --git a/ui/pageviewutils.cpp b/ui/pageviewutils.cpp
index 19ff941..a57712c 100644
--- a/ui/pageviewutils.cpp
+++ b/ui/pageviewutils.cpp
@@ -449,7 +449,7 @@ ToolBarButton::ToolBarButton( QWidget * parent, const AnnotationToolItem &item )
// if accel is set display it along name
QString accelString = shortcut().toString( QKeySequence::NativeText );
if ( !accelString.isEmpty() )
- setToolTip( QStringLiteral("%1 [%2]").arg( item.text ).arg( accelString ) );
+ setToolTip( QStringLiteral("%1 [%2]").arg( item.text, accelString ) );
else
setToolTip( item.text );
}
diff --git a/ui/pageviewutils.h b/ui/pageviewutils.h
index 65c4a00..702532b 100644
--- a/ui/pageviewutils.h
+++ b/ui/pageviewutils.h
@@ -101,6 +101,8 @@ class PageViewItem
*/
class PageViewMessage : public QWidget
{
+ Q_OBJECT
+
public:
PageViewMessage( QWidget * parent );
diff --git a/ui/presentationsearchbar.cpp b/ui/presentationsearchbar.cpp
index 6c0c2dd..f99a697 100644
--- a/ui/presentationsearchbar.cpp
+++ b/ui/presentationsearchbar.cpp
@@ -27,6 +27,8 @@
class HandleDrag
: public QWidget
{
+ Q_OBJECT
+
public:
HandleDrag( QWidget *parent = Q_NULLPTR )
: QWidget( parent )
@@ -144,4 +146,4 @@ bool PresentationSearchBar::eventFilter( QObject *obj, QEvent *e )
return false;
}
-#include "moc_presentationsearchbar.cpp"
+#include "presentationsearchbar.moc"
diff --git a/ui/presentationwidget.cpp b/ui/presentationwidget.cpp
index c16d616..dea64fe 100644
--- a/ui/presentationwidget.cpp
+++ b/ui/presentationwidget.cpp
@@ -115,6 +115,8 @@ struct PresentationFrame
// background is not automatically filled
class PresentationToolBar : public QToolBar
{
+ Q_OBJECT
+
public:
PresentationToolBar( QWidget * parent = Q_NULLPTR )
: QToolBar( parent )
diff --git a/ui/propertiesdialog.cpp b/ui/propertiesdialog.cpp
index c140744..72dc3b8 100644
--- a/ui/propertiesdialog.cpp
+++ b/ui/propertiesdialog.cpp
@@ -374,7 +374,7 @@ QVariant FontsListModel::data( const QModelIndex &index, int role ) const
fontname = i18n( "Unknown font" );
QString tooltip = QLatin1String( "<html><b>" ) + fontname + QLatin1String( "</b>" );
if ( m_fonts.at( index.row() ).embedType() == Okular::FontInfo::NotEmbedded )
- tooltip += QStringLiteral( " (<span style=\"font-family: '%1'\">%2</span>)" ).arg( fontname ).arg( fontname );
+ tooltip += QStringLiteral( " (<span style=\"font-family: '%1'\">%2</span>)" ).arg( fontname, fontname );
tooltip += QLatin1String( "<br />" ) + i18n( "Embedded: %1", descriptionForEmbedType( m_fonts.at( index.row() ).embedType() ) );
tooltip += QLatin1String( "</html>" );
return tooltip;
diff --git a/ui/side_reviews.cpp b/ui/side_reviews.cpp
index 3e9513c..02569c4 100644
--- a/ui/side_reviews.cpp
+++ b/ui/side_reviews.cpp
@@ -37,6 +37,8 @@
class TreeView : public QTreeView
{
+ Q_OBJECT
+
public:
TreeView( Okular::Document *document, QWidget *parent = Q_NULLPTR )
: QTreeView( parent ), m_document( document )
diff --git a/ui/sidebar.cpp b/ui/sidebar.cpp
index 7de0815..0bbadf0 100644
--- a/ui/sidebar.cpp
+++ b/ui/sidebar.cpp
@@ -39,6 +39,8 @@ static const int SidebarItemType = QListWidgetItem::UserType + 1;
/* List item representing a sidebar entry. */
class SidebarItem : public QListWidgetItem
{
+ Q_OBJECT
+
public:
SidebarItem( QWidget* w, const QIcon &icon, const QString &text )
: QListWidgetItem( 0, SidebarItemType ),
@@ -69,6 +71,8 @@ class SidebarItem : public QListWidgetItem
class SidebarDelegate : public QAbstractItemDelegate
{
+ Q_OBJECT
+
public:
SidebarDelegate( QObject *parent = Q_NULLPTR );
~SidebarDelegate();
diff --git a/ui/thumbnaillist.h b/ui/thumbnaillist.h
index 52460ba..b4915f6 100644
--- a/ui/thumbnaillist.h
+++ b/ui/thumbnaillist.h
@@ -77,6 +77,8 @@ Q_OBJECT
*/
class ThumbnailsBox : public QWidget
{
+ Q_OBJECT
+
public:
ThumbnailsBox( QWidget * parent ) : QWidget( parent ) { QVBoxLayout *vbox = new QVBoxLayout(this); vbox->setMargin(0); vbox->setSpacing(0);}
QSize sizeHint() const Q_DECL_OVERRIDE { return QSize(); }
@@ -92,6 +94,8 @@ class ThumbnailsBox : public QWidget
*/
class ThumbnailController : public QToolBar
{
+ Q_OBJECT
+
public:
ThumbnailController( QWidget * parent, ThumbnailList * thumbnailList );
};