Commit eb2915c1 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use Q_SIGNALS/Q_SLOTS + add explicit

parent d31fd65f
......@@ -87,7 +87,7 @@ class AutoPasteModel : public QAbstractTableModel
*/
bool moveItem(int sourceRow, int destinationRow);
public slots:
public Q_SLOTS:
/**
* Loads the stored data
* @see save()
......
......@@ -27,7 +27,7 @@ public:
DlgWebinterface(QDialog *parent = nullptr);
~DlgWebinterface() override;
signals:
Q_SIGNALS:
void changed();
void saved();
......
......@@ -35,14 +35,14 @@ class IntegrationPreferences : public QWidget
explicit IntegrationPreferences(KConfigDialog *parent, Qt::WindowFlags f = Qt::Widget);
~IntegrationPreferences() override;
private slots:
private Q_SLOTS:
void slotUpdateButtons();
void slotAddItem();
void slotRemoveItem();
void slotIncreasePriority();
void slotDecreasePriority();
signals:
Q_SIGNALS:
/**
* Emitted whenever something changes
*/
......
......@@ -21,7 +21,7 @@ class PluginSelector : public KPluginSelector
PluginSelector(QDialog * parent);
~PluginSelector() override;
private slots:
private Q_SLOTS:
void saveState();
void loadDefaults();
};
......
......@@ -23,10 +23,10 @@ class PreferencesDialog : public KConfigDialog
public:
PreferencesDialog( QWidget * parent, KConfigSkeleton * config );
signals:
Q_SIGNALS:
void resetDefaults();
private slots:
private Q_SLOTS:
void slotToggleAfterFinishAction(int state);
void disableApplyButton();
void enableApplyButton();
......
......@@ -39,7 +39,7 @@ class TransfersGroupTree : public QTreeView
TransfersGroupTree(QWidget *parent = nullptr);
void setModel(QAbstractItemModel *model) override;
public slots:
public Q_SLOTS:
void editCurrent();
void addGroup();
void deleteSelectedGroup();
......
......@@ -22,7 +22,7 @@ class TransfersGroupWidget : public QWidget
public:
TransfersGroupWidget(QWidget *parent = nullptr);
private slots:
private Q_SLOTS:
void slotSelectionChanged();
private:
......
......@@ -33,13 +33,13 @@ class VerificationPreferences : public QWidget
public:
explicit VerificationPreferences(KConfigDialog *parent, Qt::WindowFlags f = Qt::Widget);
signals:
Q_SIGNALS:
/**
* Emitted when the mirrors change
*/
void changed();
private slots:
private Q_SLOTS:
void slotDefaultClicked();
void slotAccpeted();
void slotRejected();
......
......@@ -172,11 +172,11 @@ class KGET_EXPORT DataSourceFactory : public QObject
void dataSourceFactoryChange(Transfer::ChangesFlags change);
void log(const QString &message, Transfer::LogLevel logLevel);
public slots:
public Q_SLOTS:
void save(const QDomElement &element);
void load(const QDomElement *e);
private slots:
private Q_SLOTS:
void slotUpdateCapabilities();
void slotRemovedFile();
......
......@@ -31,7 +31,7 @@ class KGET_EXPORT Download : public QObject
void finishedSuccessfully(QUrl dest, QByteArray data);
void finishedWithError();
private slots:
private Q_SLOTS:
void slotResult(KJob * job);
void slotData(KIO::Job *job, const QByteArray& data);
......
......@@ -162,7 +162,7 @@ class KGET_EXPORT FileModel : public QAbstractItemModel
*/
bool isFile(const QModelIndex &index) const;
public slots:
public Q_SLOTS:
/**
* Watches if the check state changes, the result of that will be emitted
* when stopWatchCheckState() is being called()
......@@ -203,7 +203,7 @@ class KGET_EXPORT FileModel : public QAbstractItemModel
void changeData(int row, int column, FileItem *item, bool fileFinished = false);
private slots:
private Q_SLOTS:
void renameFailed(const QUrl &beforeRename, const QUrl &afterRename);
private:
......
......@@ -50,7 +50,7 @@ class KeyDownloader : public QObject
*/
void downloadKey(QString fingerprint, Signature *sig);
private slots:
private Q_SLOTS:
/**
* Parses the downloaded data and if it is a key tries to add it to GnuPG,
* if it is not a key try a different server.
......
......@@ -470,7 +470,7 @@ class GenericObserver : public QObject
GenericObserver(QObject *parent = nullptr);
~GenericObserver () override;
public slots:
public Q_SLOTS:
void groupAddedEvent(TransferGroupHandler *handler);
void groupRemovedEvent(TransferGroupHandler *handler);
void transfersAddedEvent(const QList<TransferHandler*> &handlers);
......@@ -479,7 +479,7 @@ class GenericObserver : public QObject
void groupsChangedEvent(QMap<TransferGroupHandler*, TransferGroup::ChangesFlags> groups);
void transferMovedEvent(TransferHandler *, TransferGroupHandler *);
private slots:
private Q_SLOTS:
void slotSave();
void slotAfterFinishAction();
void slotAbortAfterFinishAction();
......
......@@ -26,7 +26,7 @@ public:
void start() override {};
signals:
Q_SIGNALS:
/**
* Emitted when doKill is called, e.g. when the gui is closed.
* Not handling this signal might lead to a crash if something tries to
......
......@@ -33,10 +33,10 @@ public:
qulonglong totalAmount(Unit unit) const;
unsigned long percent() const;
public slots:
public Q_SLOTS:
void slotUpdateDescription();
signals:
Q_SIGNALS:
/**
* Emitted when doKill is called, e.g. when the gui is closed.
* Not handling this signal might lead to a crash if something tries to
......
......@@ -34,12 +34,12 @@ public:
void settingsChanged();
public slots:
public Q_SLOTS:
void slotTransfersAdded(QList<TransferHandler*> transfers);
void slotTransfersAboutToBeRemoved(const QList<TransferHandler*> &transfer);
void slotTransfersChanged(QMap<TransferHandler *, Transfer::ChangesFlags> transfers);
private slots:
private Q_SLOTS:
void slotRequestStop(KJob *job, TransferHandler *transfer);
void slotRequestSuspend(KJob *job, TransferHandler *transfer);
void slotRequestResume(KJob *job, TransferHandler *transfer);
......
......@@ -53,11 +53,11 @@ public:
return m_transfers;
};
signals:
Q_SIGNALS:
void error(const KLocalizedString &);
void progress(int progress);
private slots:
private Q_SLOTS:
void slotReadFile(const QUrl &url);
private:
......
......@@ -90,10 +90,10 @@ class KGET_EXPORT Signature : public QObject
void save(const QDomElement &element);
void load(const QDomElement &e);
signals:
Q_SIGNALS:
void verified(int verificationStatus);
private slots:
private Q_SLOTS:
#ifdef HAVE_QGPGME
void slotVerified(const GpgME::VerificationResult &result);
#endif //HAVE_QGPGME
......
......@@ -44,7 +44,7 @@ class SignatureThread : public QThread
void verify(const QUrl &dest, const QByteArray &sig);
#ifdef HAVE_QGPGME
signals:
Q_SIGNALS:
/**
* Emitted when the verification of a file finishes, connect to this signal
* if you do the verification for one file only and do not want to bother with
......
......@@ -304,13 +304,13 @@ class KGET_EXPORT Transfer : public Job
*/
virtual void load(const QDomElement *element);
signals:
Q_SIGNALS:
/**
* Emitted when the capabilities of the Transfer change
*/
void capabilitiesChanged();
public slots:
public Q_SLOTS:
/**
* Set Transfer history
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment