Port away from signal/slot keyword

When building okular without kdelibs4support it apparently builds with
-DQT_NO_SIGNALS_SLOTS_KEYWORDS.
parent 6fd75097
......@@ -16,7 +16,7 @@ namespace Okular
class UrlDetectTest : public QObject
{
Q_OBJECT
private slots:
private Q_SLOTS:
void testURL();
void testURL_data();
};
......
......@@ -23,7 +23,7 @@ class DlgAccessibility : public QWidget
explicit DlgAccessibility( QWidget * parent = Q_NULLPTR );
~DlgAccessibility();
private slots:
private Q_SLOTS:
void slotColorMode( int mode );
private:
......
......@@ -23,7 +23,7 @@ class DlgEditor : public QWidget
explicit DlgEditor( QWidget * parent = Q_NULLPTR );
virtual ~DlgEditor();
private slots:
private Q_SLOTS:
void editorChanged( int which );
private:
......
......@@ -22,7 +22,7 @@ class DlgPerformance : public QWidget
explicit DlgPerformance( QWidget * parent = Q_NULLPTR );
virtual ~DlgPerformance();
protected slots:
protected Q_SLOTS:
void radioGroup_changed( int which );
protected:
......
......@@ -22,7 +22,7 @@ class DlgPresentation : public QWidget
explicit DlgPresentation( QWidget * parent = Q_NULLPTR );
virtual ~DlgPresentation();
protected slots:
protected Q_SLOTS:
void screenComboChanged( int which );
protected:
......
......@@ -63,7 +63,7 @@ class EditAnnotToolDialog : public QDialog
Okular::Annotation *m_stubann;
AnnotationWidget *m_annotationWidget;
private slots:
private Q_SLOTS:
void slotTypeChanged();
void slotDataChanged();
};
......
......@@ -30,7 +30,7 @@ class WidgetAnnotTools : public WidgetConfigurationToolsBase
QStringList tools() const Q_DECL_OVERRIDE;
void setTools(const QStringList& items) Q_DECL_OVERRIDE;
protected slots:
protected Q_SLOTS:
void slotAdd() Q_DECL_OVERRIDE;
void slotEdit() Q_DECL_OVERRIDE;
};
......
......@@ -39,7 +39,7 @@ class WidgetConfigurationToolsBase : public QWidget
QPushButton *m_btnMoveUp;
QPushButton *m_btnMoveDown;
protected slots:
protected Q_SLOTS:
virtual void slotAdd() = 0;
virtual void slotEdit() = 0;
void updateButtons();
......
......@@ -25,7 +25,7 @@ public:
QString defaultName() const;
protected slots:
protected Q_SLOTS:
void slotAdd() Q_DECL_OVERRIDE;
void slotEdit() Q_DECL_OVERRIDE;
};
......
......@@ -31,10 +31,10 @@ class PageController : public QObject
void addRotationJob( RotationJob *job );
signals:
Q_SIGNALS:
void rotationFinished( int page, Okular::Page *okularPage );
private slots:
private Q_SLOTS:
void imageRotationDone(const ThreadWeaver::JobPointer &job);
private:
......
......@@ -26,7 +26,7 @@ class BrowserExtension : public KParts::BrowserExtension
public:
BrowserExtension(Part*);
public slots:
public Q_SLOTS:
// Automatically detected by the host.
void print();
......
......@@ -45,7 +45,7 @@ class CHMGenerator : public Okular::Generator
QVariant metaData( const QString & key, const QVariant & option ) const Q_DECL_OVERRIDE;
public slots:
public Q_SLOTS:
void slotCompleted();
protected:
......
......@@ -154,7 +154,7 @@ Q_SIGNALS:
void notice( const QString &message, int duration );
public slots:
public Q_SLOTS:
void exportPS(const QString& fname = QString(), const QStringList& options = QStringList(), QPrinter* printer = 0, QPrinter::Orientation orientation = QPrinter::Portrait);
void exportPDF();
......@@ -171,7 +171,7 @@ public slots:
const QVector<DVI_SourceFileAnchor>& sourceAnchors() { return sourceHyperLinkAnchors; }
private slots:
private Q_SLOTS:
/** This method shows a dialog that tells the user that source
information is present, and gives the opportunity to open the
manual and learn more about forward and inverse search */
......
......@@ -74,7 +74,7 @@ protected:
*/
virtual void finished_impl(int exit_code);
private slots:
private Q_SLOTS:
/// Calls an impl() inline so that derived classes don't need slots.
void abort_process() { abort_process_impl(); }
void finished(int exit_code) { finished_impl(exit_code); }
......
......@@ -122,13 +122,13 @@ public:
drawing routines for the different setups. */
bool QPixmapSupportsAlpha;
signals:
Q_SIGNALS:
/** Passed through to the top-level kpart. */
void error( const QString &message, int duration );
void warning( const QString &message, int duration );
void notice( const QString &message, int duration );
public slots:
public Q_SLOTS:
// Locates font files on the disk using the kpsewhich program. If
// 'locateTFMonly' is true, the method does not look for PFB- or
// PK-fonts. Instead, only TFM-files are searched. This option can be
......@@ -196,7 +196,7 @@ private:
// The handle on the external process.
QProcess *kpsewhich_;
private slots:
private Q_SLOTS:
// This slot is called when MetaFont is run via the kpsewhich program.
// The MetaFont output is transmitted to the fontpool via the @c kpsewhich_
// member variable. This method passes on progress information to the
......
......@@ -230,7 +230,7 @@ public:
/** \brief Returns a textual description of the page size. */
QString description() const;
public slots:
public Q_SLOTS:
/** \brief Sets orientation
If the pageSize is one of the standard sizes, i.e. formatNumber() !=
......@@ -242,7 +242,7 @@ public slots:
*/
void setOrientation(int orient);
signals:
Q_SIGNALS:
/** \brief Signal emitted when the page sizes changes
emitted to indicate that the size changed. Not emitted immediately
......
......@@ -101,7 +101,7 @@ private:
// removed from the list, and another device name is tried.
QStringList knownDevices;
signals:
Q_SIGNALS:
/** Passed through to the top-level kpart. */
void error( const QString &message, int duration );
};
......
......@@ -101,7 +101,7 @@ class PDFGenerator : public Okular::Generator, public Okular::ConfigInterface, p
bool doCloseDocument() Q_DECL_OVERRIDE;
Okular::TextPage* textPage( Okular::Page *page ) Q_DECL_OVERRIDE;
protected slots:
protected Q_SLOTS:
void requestFontData(const Okular::FontInfo &font, QByteArray *data);
Okular::Generator::PrintError printError() const;
......
......@@ -48,7 +48,7 @@ class GSGenerator : public Okular::Generator, public Okular::ConfigInterface
GSGenerator( QObject *parent, const QVariantList &args );
~GSGenerator();
public slots:
public Q_SLOTS:
void slotImageGenerated(QImage *img, Okular::PixmapRequest *request);
protected:
......
......@@ -60,7 +60,7 @@ Q_OBJECT
void addRequest(const GSRendererThreadRequest &req);
signals:
Q_SIGNALS:
void imageDone(QImage *image, Okular::PixmapRequest *request);
private:
......
......@@ -136,7 +136,7 @@ class OKULARPART_EXPORT Part : public KParts::ReadWritePart, public Okular::Docu
void setShowSourceLocationsGraphically(bool show) Q_DECL_OVERRIDE;
bool openNewFilesInTabs() const Q_DECL_OVERRIDE;
public slots: // dbus
public Q_SLOTS: // dbus
Q_SCRIPTABLE Q_NOREPLY void goToPage(uint page);
Q_SCRIPTABLE Q_NOREPLY void openDocument( const QString &doc );
Q_SCRIPTABLE uint pages();
......@@ -154,7 +154,7 @@ class OKULARPART_EXPORT Part : public KParts::ReadWritePart, public Okular::Docu
Q_SCRIPTABLE Q_NOREPLY void reload();
Q_SCRIPTABLE Q_NOREPLY void enableStartWithPrint();
signals:
Q_SIGNALS:
void enablePrintAction(bool enable);
void openSourceReference(const QString& absFileName, int line, int column);
void viewerMenuStateChange(bool enabled);
......@@ -177,7 +177,7 @@ class OKULARPART_EXPORT Part : public KParts::ReadWritePart, public Okular::Docu
void setReadWrite(bool readwrite) Q_DECL_OVERRIDE;
bool saveAs(const QUrl & saveUrl) Q_DECL_OVERRIDE;
protected slots:
protected Q_SLOTS:
// connected to actions
void openUrlFromDocument(const QUrl &url);
void openUrlFromBookmarks(const QUrl &url);
......@@ -223,7 +223,7 @@ class OKULARPART_EXPORT Part : public KParts::ReadWritePart, public Okular::Docu
void slotRebuildBookmarkMenu();
void enableLayers( bool enable );
public slots:
public Q_SLOTS:
// connected to Shell action (and browserExtension), not local one
void slotPrint();
void slotFileDirty( const QString& );
......@@ -354,7 +354,7 @@ class OKULARPART_EXPORT Part : public KParts::ReadWritePart, public Okular::Docu
// Timer for m_infoMessage
QTimer *m_infoTimer;
private slots:
private Q_SLOTS:
void slotAnnotationPreferences();
void slotHandleActivatedSourceReference(const QString& absFileName, int line, int col, bool *handled);
};
......
......@@ -69,7 +69,7 @@ public:
bool openDocument(const QUrl &url, const QString &serializedOptions);
public slots:
public Q_SLOTS:
Q_SCRIPTABLE Q_NOREPLY void tryRaise();
Q_SCRIPTABLE bool openDocument(const QString &urlString, const QString &serializedOptions = QString() );
Q_SCRIPTABLE bool canOpenDocs( int numDocs, int desktop );
......@@ -101,7 +101,7 @@ protected:
void showEvent(QShowEvent *event) Q_DECL_OVERRIDE;
private slots:
private Q_SLOTS:
void fileOpen();
void slotUpdateFullScreen();
......@@ -125,7 +125,7 @@ private slots:
void slotFitWindowToPage( const QSize& pageViewSize, const QSize& pageSize );
signals:
Q_SIGNALS:
void moveSplitter(int sideWidgetSize);
private:
......
......@@ -40,7 +40,7 @@ private:
void setCaptionTextbyAnnotType();
private slots:
private Q_SLOTS:
void setModified();
void slotapply();
};
......
......@@ -43,10 +43,10 @@ public:
void setEditable( bool editable );
signals:
Q_SIGNALS:
void iconChanged( const QString& );
private slots:
private Q_SLOTS:
void iconComboChanged( const QString& icon );
private:
......@@ -82,7 +82,7 @@ public:
virtual void applyChanges();
signals:
Q_SIGNALS:
void dataChanged();
protected:
......
......@@ -51,14 +51,14 @@ class AnnotWindow : public QFrame
void showEvent( QShowEvent * event ) Q_DECL_OVERRIDE;
bool eventFilter( QObject * obj, QEvent * event ) Q_DECL_OVERRIDE;
private slots:
private Q_SLOTS:
void slotUpdateUndoAndRedoInContextMenu(QMenu *menu);
void slotOptionBtn();
void slotsaveWindowText();
void renderLatex( bool render );
void slotHandleContentsChangedByUndoRedo( Okular::Annotation* annot, QString contents, int cursorPos, int anchorPos);
signals:
Q_SIGNALS:
void containsLatex( bool );
};
......
......@@ -37,7 +37,7 @@ class BookmarkList : public QWidget, public Okular::DocumentObserver
// inherited from DocumentObserver
void notifySetup( const QVector< Okular::Page * > & pages, int setupFlags ) Q_DECL_OVERRIDE;
private slots:
private Q_SLOTS:
void slotFilterBookmarks( bool );
void slotExecuted( QTreeWidgetItem * item );
void slotChanged( QTreeWidgetItem * item );
......
......@@ -28,11 +28,11 @@ public:
void reparseConfig();
signals:
Q_SIGNALS:
void changeEngine( const QDomElement &doc );
void actionsRecreated();
private slots:
private Q_SLOTS:
void actionTriggered();
private:
......
......@@ -25,7 +25,7 @@ Q_OBJECT
public:
EmbeddedFilesDialog(QWidget *parent, const Okular::Document *document);
private slots:
private Q_SLOTS:
void saveFile();
void attachViewContextMenu( const QPoint& pos );
void updateSaveButton();
......
......@@ -34,16 +34,16 @@ class FindBar
void focusAndSetCursor();
bool maybeHide();
signals:
Q_SIGNALS:
void forwardKeyPressEvent( QKeyEvent* );
void onCloseButtonPressed();
public slots:
public Q_SLOTS:
void findNext();
void findPrev();
void resetSearch();
private slots:
private Q_SLOTS:
void caseSensitivityChanged();
void fromCurrentPageChanged();
void closeAndStopSearch();
......
......@@ -61,7 +61,7 @@ class FormWidgetsController : public QObject
bool canUndo();
bool canRedo();
signals:
Q_SIGNALS:
void changed( int pageNumber );
void requestUndo();
void requestRedo();
......@@ -110,7 +110,7 @@ class FormWidgetsController : public QObject
void action( Okular::Action *action );
private slots:
private Q_SLOTS:
void slotButtonClicked( QAbstractButton *button );
void slotFormButtonsChangedByUndoRedo( int pageNumber,
const QList< Okular::FormFieldButton* > & formButtons );
......@@ -172,7 +172,7 @@ class PushButtonEdit : public QPushButton, public FormWidgetIface
public:
explicit PushButtonEdit( Okular::FormFieldButton * button, QWidget * parent = Q_NULLPTR );
private slots:
private Q_SLOTS:
void slotClicked();
private:
......@@ -190,7 +190,7 @@ class CheckBoxEdit : public QCheckBox, public FormWidgetIface
void setFormWidgetsController( FormWidgetsController *controller );
QAbstractButton* button();
private slots:
private Q_SLOTS:
void slotStateChanged( int state );
private:
......@@ -223,13 +223,13 @@ class FormLineEdit : public QLineEdit, public FormWidgetIface
virtual void contextMenuEvent( QContextMenuEvent* event );
public slots:
public Q_SLOTS:
void slotHandleTextChangedByUndoRedo( int pageNumber,
Okular::FormFieldText* textForm,
const QString & contents,
int cursorPos,
int anchorPos );
private slots:
private Q_SLOTS:
void slotChanged();
private:
......@@ -248,7 +248,7 @@ class TextAreaEdit : public KTextEdit, public FormWidgetIface
virtual bool event ( QEvent * e );
public slots:
public Q_SLOTS:
void slotHandleTextChangedByUndoRedo( int pageNumber,
Okular::FormFieldText * textForm,
const QString & contents,
......@@ -256,7 +256,7 @@ class TextAreaEdit : public KTextEdit, public FormWidgetIface
int anchorPos );
void slotUpdateUndoAndRedoInContextMenu( QMenu* menu );
private slots:
private Q_SLOTS:
void slotChanged();
private:
......@@ -278,7 +278,7 @@ class FileEdit : public KUrlRequester, public FormWidgetIface
bool eventFilter( QObject *obj, QEvent *event );
private slots:
private Q_SLOTS:
void slotChanged();
void slotHandleFileChangedByUndoRedo( int pageNumber,
Okular::FormFieldText * form,
......@@ -300,7 +300,7 @@ class ListEdit : public QListWidget, public FormWidgetIface
explicit ListEdit( Okular::FormFieldChoice * choice, QWidget * parent = Q_NULLPTR );
void setFormWidgetsController( FormWidgetsController *controller );
private slots:
private Q_SLOTS:
void slotSelectionChanged();
void slotHandleFormListChangedByUndoRedo( int pageNumber,
Okular::FormFieldChoice * listForm,
......@@ -321,7 +321,7 @@ class ComboEdit : public QComboBox, public FormWidgetIface
virtual bool event ( QEvent * e );
virtual void contextMenuEvent( QContextMenuEvent* event );
private slots:
private Q_SLOTS:
void slotValueChanged();
void slotHandleFormComboChangedByUndoRedo( int pageNumber,
Okular::FormFieldChoice * comboForm,
......
......@@ -39,10 +39,10 @@ Q_OBJECT
void setPageView( PageView *pageView );
signals:
Q_SIGNALS:
void hasLayers(bool has);
private slots:
private Q_SLOTS:
void saveSearchOptions();
private:
......
......@@ -41,7 +41,7 @@ class PagesEdit : public KLineEdit
void mousePressEvent( QMouseEvent * e ) Q_DECL_OVERRIDE;
void wheelEvent( QWheelEvent * e ) Q_DECL_OVERRIDE;
private slots:
private Q_SLOTS:
void updatePalette();
private:
......@@ -67,10 +67,10 @@ class PageLabelEdit : public PagesEdit
void setText( const QString & newText ) Q_DECL_OVERRIDE;
void setPageLabels( const QVector< Okular::Page * > & pageVector );
signals:
Q_SIGNALS:
void pageNumberChosen( int page );
private slots:
private Q_SLOTS:
void pageChosen();
private:
......@@ -116,13 +116,13 @@ class MiniBar : public QWidget
void changeEvent( QEvent * event ) Q_DECL_OVERRIDE;
signals:
Q_SIGNALS:
void gotoPage();
void prevPage();
void nextPage();
void forwardKeyPressEvent( QKeyEvent *e );
public slots:
public Q_SLOTS:
void slotChangePage();
void slotChangePage(int page);
void slotEmitNextPage();
......@@ -158,7 +158,7 @@ class ProgressWidget : public QWidget, public Okular::DocumentObserver
void slotGotoNormalizedPage( float index );
signals:
Q_SIGNALS:
void prevPage();
void nextPage();
......
......@@ -111,14 +111,14 @@ Q_OBJECT
void updateCursor();
public slots:
public Q_SLOTS:
void copyTextSelection() const;
void selectAll();
void openAnnotationWindow( Okular::Annotation *annotation, int pageNumber );
void reloadForms();
signals:
Q_SIGNALS:
void rightClick( const Okular::Page *, const QPoint & );
void mouseBackButtonClick();
void mouseForwardButtonClick();
......@@ -192,7 +192,7 @@ Q_OBJECT
// don't want to expose classes in here
class PageViewPrivate * d;
private slots:
private Q_SLOTS:
// used to decouple the notifyViewportChanged calle
void slotRealNotifyViewportChanged(bool smoothMove);
// activated either directly or via queued connection on notifySetup
......
......@@ -88,7 +88,7 @@ class PageViewAnnotator : public QObject
static QString defaultToolName( const QDomElement &toolElement );
static QPixmap makeToolPixmap( const QDomElement &toolElement );
private slots:
private Q_SLOTS:
void slotToolSelected( int toolID );
void slotSaveToolbarOrientation( int side );
void slotToolDoubleClicked( int toolID );
......
......@@ -147,7 +147,7 @@ class ToolBarButton : public QToolButton
int buttonID() const { return m_id; }
bool isText() const { return m_isText; }
signals:
Q_SIGNALS:
void buttonDoubleClicked( int buttonID );
protected:
......@@ -189,7 +189,7 @@ class PageViewToolBar : public QWidget
// query properties
signals:
Q_SIGNALS:
// the tool 'toolID' has been selected
void toolSelected( int toolID );
// orientation has been changed
......@@ -210,7 +210,7 @@ class PageViewToolBar : public QWidget
friend class ToolBarPrivate;
class ToolBarPrivate * d;
private slots:
private Q_SLOTS:
void slotAnimate();
void slotButtonClicked();
};
......
......@@ -57,7 +57,7 @@ class PresentationWidget : public QWidget, public Okular::DocumentObserver
bool canUnloadPixmap( int pageNumber ) const Q_DECL_OVERRIDE;
void notifyCurrentPageChanged( int previous, int current ) Q_DECL_OVERRIDE;
public slots:
public Q_SLOTS:
void slotFind();
protected:
......@@ -145,7 +145,7 @@ class PresentationWidget : public QWidget, public Okular::DocumentObserver
bool m_showSummaryView;
bool m_advanceSlides;
private slots:
private Q_SLOTS:
void slotNextPage();
void slotPrevPage();
void slotFirstPage();
......
......@@ -34,7 +34,7 @@ class PropertiesDialog : public KPageDialog
PropertiesDialog( QWidget *parent, Okular::Document *doc );
virtual ~PropertiesDialog();
private slots:
private Q_SLOTS:
void pageChanged( KPageWidgetItem *, KPageWidgetItem * );
void slotFontReadingProgress( int page );
void slotFontReadingEnded();
......@@ -65,7 +65,7 @@ class FontsListModel
QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const Q_DECL_OVERRIDE;
int rowCount( const QModelIndex &parent = QModelIndex() ) const Q_DECL_OVERRIDE;
public slots:
public Q_SLOTS:
void addFont( const Okular::FontInfo &fi );
private:
......
......@@ -40,11 +40,11 @@ class SearchLineEdit : public KLineEdit
bool isSearchRunning() const;
signals:
Q_SIGNALS:
void searchStarted();
void searchStopped();
public slots:
public Q_SLOTS:
void restartSearch();
void stopSearch();
void findNext();
......@@ -65,7 +65,7 @@ class SearchLineEdit : public KLineEdit
bool m_fromStart;
bool m_searchRunning;
private slots:
private Q_SLOTS:
void slotTextChanged( const QString & text );
void slotReturnPressed( const QString &text );
void startSearch();
......@@ -80,7 +80,7 @@ class SearchLineWidget : public QWidget
SearchLineEdit* lineEdit() const;
private slots:
private Q_SLOTS:
void slotSearchStarted();
void slotSearchStopped();
void slotTimedout();
......
......@@ -41,7 +41,7 @@ class SearchWidget : public QWidget
QAction *m_matchPhraseAction, *m_caseSensitiveAction, * m_marchAllWordsAction, *m_marchAnyWordsAction;
SearchLineEdit *m_lineEdit;
private slots:
private Q_SLOTS:
void slotMenuChaged( QAction * );
};
......
......@@ -45,14 +45,14 @@ class Sidebar : public QWidget
void moveSplitter( int sideWidgetSize );
signals:
Q_SIGNALS:
void urlsDropped( const QList<QUrl>& urls );
protected:
void dragEnterEvent( QDragEnterEvent* event ) Q_DECL_OVERRIDE;
void dropEvent( QDropEvent* event ) Q_DECL_OVERRIDE;
private slots:
private Q_SLOTS:
void itemClicked( QListWidgetItem *item );
void splitterMoved( int pos, int index );
void listContextMenu( const QPoint & );
......
......@@ -50,7 +50,7 @@ Q_OBJECT
// redraw visible widgets (useful for refreshing contents...)
void updateWidgets();
public slots:
public Q_SLOTS:
// these are connected to ThumbnailController buttons
void slotFilterBookmarks( bool filterOn );
......@@ -61,7 +61,7 @@ Q_OBJECT
// catch the viewport event and filter them if necessary
bool viewportEvent( QEvent * ) Q_DECL_OVERRIDE;
signals:
Q_SIGNALS:
void rightClick( const Okular::Page *, const QPoint & );
private:
......
......@@ -46,10 +46,10 @@ Q_OBJECT
void rollbackReload();
void finishReload();
signals:
Q_SIGNALS:
void hasTOC(bool has);
private slots:
private Q_SLOTS:
void slotExecuted( const QModelIndex & );
void saveSearchOptions