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

Use Q_EMIT/Q_SLOTS/Q_SIGNALS

parent 2e60dd3f
......@@ -67,12 +67,12 @@ QChar DlgSpecChar::chr()
void DlgSpecChar::slotDoubleClicked()
{
emit insertChar(chr());
Q_EMIT insertChar(chr());
closeDialog();
}
void DlgSpecChar::slotUser1( )
{
emit insertChar(chr());
Q_EMIT insertChar(chr());
closeDialog();
}
......@@ -32,10 +32,10 @@ public:
explicit DlgSpecChar(QWidget *parent, const QFont &font, const QChar &chr);
void closeDialog();
signals:
Q_SIGNALS:
void insertChar(QChar);
private slots:
private Q_SLOTS:
void slotUser1();
void slotDoubleClicked();
......
......@@ -38,10 +38,10 @@ public:
void init() override;
private slots:
private Q_SLOTS:
void slotTimer();
public slots:
public Q_SLOTS:
void slotCheck() override;
void slotKnow();
void slotDontKnow();
......
......@@ -1296,7 +1296,7 @@ void KWordQuizApp::slotApplyPreferences()
editUnmarkBlank->setEnabled(Prefs::enableBlanks());
m_tableView->reset();
updateSpecialCharIcons();
emit settingsChanged();
Q_EMIT settingsChanged();
}
void KWordQuizApp::updateSpecialCharIcons()
......
......@@ -130,10 +130,10 @@ class KWordQuizApp : public KXmlGuiWindow
*/
void readProperties(const KConfigGroup &_cfg) override;
signals:
Q_SIGNALS:
void settingsChanged();
public slots:
public Q_SLOTS:
/** open a new application window by creating a new instance of KWordQuizApp */
void slotFileNew();
/** open a file and load it into the document*/
......
......@@ -62,7 +62,7 @@ bool KWordQuizPrefs::isDefault()
void KWordQuizPrefs::updateSettings( )
{
m_prefCharacter->updateSettings();
emit settingsChanged(QLatin1String(""));
Q_EMIT settingsChanged(QLatin1String(""));
}
void KWordQuizPrefs::updateWidgetsDefault()
......
......@@ -38,7 +38,7 @@ class KWordQuizPrefs : public KConfigDialog
public:
KWordQuizPrefs(QWidget *parent, const QString & name, KConfigSkeleton *config, KActionCollection *actionCollection);
protected slots:
protected Q_SLOTS:
void updateSettings() override;
void updateWidgetsDefault() override;
......
......@@ -150,6 +150,6 @@ void KWQCardScene::mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent)
{
QGraphicsItem *item = itemAt(mouseEvent->scenePos(), QTransform());
if (item != 0)
emit cardClicked();
Q_EMIT cardClicked();
QGraphicsScene::mouseReleaseEvent(mouseEvent);
}
......@@ -47,7 +47,7 @@ public:
void setFrameColor(const QColor &);
void setImage(const QPixmap &);
signals:
Q_SIGNALS:
void cardClicked();
protected:
......
......@@ -40,7 +40,7 @@ public:
void setFrameColor(const QColor &);
void setImage(const QPixmap &);
signals:
Q_SIGNALS:
void cardClicked();
protected:
......
......@@ -30,10 +30,10 @@ class KWQClearDialog : public QDialog, private Ui::ClearDialogBase {
public:
explicit KWQClearDialog(QWidget *parent = nullptr);
public slots:
public Q_SLOTS:
void accept() override;
private slots:
private Q_SLOTS:
void buttonGroupChanged(int );
private:
......
......@@ -335,9 +335,9 @@ QString KWQQuizModel::question()
}
if (m_quizType != Prefs::EnumStartSession::Flashcard && m_currentQuestion > 0)
emit checkingAnswer(m_list.at(m_currentQuestion - 1));
Q_EMIT checkingAnswer(m_list.at(m_currentQuestion - 1));
else
emit checkingAnswer(row);
Q_EMIT checkingAnswer(row);
return s;
}
......@@ -487,7 +487,7 @@ int KWQQuizModel::questionCount()
void KWQQuizModel::finish()
{
emit checkingAnswer(-1);
Q_EMIT checkingAnswer(-1);
}
......
......@@ -79,7 +79,7 @@ public:
QList<int> errorList() const {return m_errorList;}
void removeLastError();
signals:
Q_SIGNALS:
void checkingAnswer(int );
protected:
......
......@@ -45,7 +45,7 @@ class KWQQuizView : public QWidget
void setQuiz(KWQQuizModel *quiz);
virtual void init() = 0;
public slots:
public Q_SLOTS:
virtual void slotCheck() = 0;
virtual void slotApplySettings() = 0;
void slotRepeat();
......
......@@ -36,7 +36,7 @@ class KWQSortFilterModel : public QSortFilterProxyModel
void setTableModel(KWQTableModel * sourceModel);
KWQTableModel * sourceModel() const;
public slots:
public Q_SLOTS:
void restoreNativeOrder();
void shuffle();
......
......@@ -62,8 +62,8 @@ void KWQTableDelegate::commitAndCloseEditor()
{
QWidget *editor = qobject_cast<QWidget *>(sender());
emit commitData(editor);
emit closeEditor(editor, QAbstractItemDelegate::NoHint);
Q_EMIT commitData(editor);
Q_EMIT closeEditor(editor, QAbstractItemDelegate::NoHint);
}
void KWQTableDelegate::drawDecoration(QPainter* painter, const QStyleOptionViewItem& option, const QRect& rect, const QPixmap& pixmap) const
......
......@@ -45,7 +45,7 @@ class KWQTableDelegate : public QItemDelegate
void drawFocus(QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect) const override;
void drawDecoration(QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect, const QPixmap &pixmap ) const override;
private slots:
private Q_SLOTS:
void commitAndCloseEditor();
};
......
......@@ -142,7 +142,7 @@ bool KWQTableModel::setData(const QModelIndex & index, const QVariant & value, i
break;
}
emit dataChanged(index, index);
Q_EMIT dataChanged(index, index);
return true;
}
......@@ -168,7 +168,7 @@ bool KWQTableModel::setHeaderData(int section, Qt::Orientation orientation, cons
documentSettings.save();
}
emit headerDataChanged(orientation, section, section);
Q_EMIT headerDataChanged(orientation, section, section);
return true;
}
return false;
......
......@@ -65,7 +65,7 @@ protected:
void keyPressEvent(QKeyEvent*) override;
void updateKeyboardLayout();
public slots:
public Q_SLOTS:
void adjustRow(int );
void slotSpecChar(const QChar &);
void slotCheckedAnswer(int );
......@@ -74,7 +74,7 @@ public slots:
void slotHeaderClicked(int);
void slotSortByColumn(int);
protected slots:
protected Q_SLOTS:
void closeEditor(QWidget * editor, QAbstractItemDelegate::EndEditHint hint) override;
void commitData (QWidget * editor) override;
void verticalHeaderResized(int, int, int);
......
......@@ -34,7 +34,7 @@ class KWQTutor : public KStatusNotifierItem
/* init systray icon, meny, actions */
explicit KWQTutor (const QUrl &fileToOpen, QWidget *parent = nullptr);
public slots:
public Q_SLOTS:
/* self-calling function: it sets the time interval,calls itself and call func to display flashcard*/
void updateTimer();
/*open keduvocdocument from the menu */
......
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