summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrius Štikonas <andrius@stikonas.eu>2016-07-05 18:09:10 (GMT)
committerAndrius Štikonas <andrius@stikonas.eu>2016-08-04 17:30:56 (GMT)
commitdcf6c7bed1d7d2e9de9aa1dcda1fc2d01a0a7bb3 (patch)
tree32c27b41bc2e6261b4fa0980a37103592d8b9b07
parent091efb5541da9feeb7d4c30b94df12c634ee3c19 (diff)
Use new signal/slot syntax.
-rw-r--r--CMakeLists.txt2
-rw-r--r--src/settings.cpp7
-rw-r--r--src/settings.h5
-rw-r--r--src/toplevel.cpp4
-rw-r--r--src/toplevel.h3
5 files changed, 5 insertions, 16 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3d1aa75..972354c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,7 +11,7 @@ find_package(Qt5 5.2.0 CONFIG REQUIRED
Widgets
)
-find_package(KF5 5.15.0 REQUIRED
+find_package(KF5 5.23.0 REQUIRED
Config
Crash
DocTools
diff --git a/src/settings.cpp b/src/settings.cpp
index e800b65..e1eb25d 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -34,7 +34,6 @@
class SettingsUI : public QWidget, public Ui::SettingsWidget
{
- Q_OBJECT
public:
SettingsUI(QWidget *parent = 0)
@@ -104,7 +103,7 @@ SettingsDialog::SettingsDialog(TopLevel *toplevel, const QList<Tea> &teas)
m_model=new TeaListModel( teas, this );
ui->tealistTreeView->setModel( m_model );
- connect(ui->tealistTreeView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this,SLOT(updateSelection(QItemSelection,QItemSelection)) );
+ connect(ui->tealistTreeView->selectionModel(), &QItemSelectionModel::selectionChanged, this, &SettingsDialog::updateSelection);
ui->removeButton->setEnabled( false );
ui->upButton->setEnabled( false );
@@ -292,9 +291,5 @@ void SettingsDialog::nameValueChanged(const QString &text)
}
}
-
-#include "settings.moc"
-#include "moc_settings.cpp"
-
// kate: word-wrap off; encoding utf-8; indent-width 4; tab-width 4; line-numbers on; mixed-indent off; remove-trailing-space-save on; replace-tabs-save on; replace-tabs on; space-indent on;
// vim:set spell et sw=4 ts=4 nowrap cino=l1,cs,U1:
diff --git a/src/settings.h b/src/settings.h
index 40d07d3..24d8c0d 100644
--- a/src/settings.h
+++ b/src/settings.h
@@ -34,15 +34,13 @@ class SettingsUI;
*/
class SettingsDialog : public QDialog
{
- Q_OBJECT
public:
SettingsDialog(TopLevel *toplevel, const QList<Tea> &teas);
~SettingsDialog();
- private slots:
+ private:
void updateSelection(const QItemSelection &selected, const QItemSelection &deselected);
- private:
void accept();
void checkPopupButtonState(bool b);
void showHelp();
@@ -57,7 +55,6 @@ class SettingsDialog : public QDialog
void moveSelectedItem(bool moveup);
- private:
SettingsUI *ui;
TopLevel *m_toplevel;
TeaListModel *m_model;
diff --git a/src/toplevel.cpp b/src/toplevel.cpp
index c0d5b72..2fda37f 100644
--- a/src/toplevel.cpp
+++ b/src/toplevel.cpp
@@ -87,8 +87,8 @@ TopLevel::TopLevel(const KAboutData *aboutData, const QString &icon, QWidget *pa
action->setText(i18n( "&Configure..." ) );
connect(action, &QAction::triggered, this, &TopLevel::showSettingsDialog);
- action = KStandardAction::configureNotifications(this, SLOT(configureNotifications()), m_actionCollection);
- action = KStandardAction::quit(qApp, SLOT(quit()), m_actionCollection);
+ action = KStandardAction::configureNotifications(this, &TopLevel::configureNotifications, m_actionCollection);
+ action = KStandardAction::quit(qApp, &QCoreApplication::quit, m_actionCollection);
action->setShortcut(0);
action = m_actionCollection->addAction( QStringLiteral( "anonymous" ));
diff --git a/src/toplevel.h b/src/toplevel.h
index e3a4f6d..7386bb1 100644
--- a/src/toplevel.h
+++ b/src/toplevel.h
@@ -39,7 +39,6 @@ class KPassivePopup;
*/
class TopLevel : public KStatusNotifierItem
{
- Q_OBJECT
public:
explicit TopLevel(const KAboutData *aboutData, const QString &icon = QLatin1String("kteatime"), QWidget *parent = 0);
~TopLevel();
@@ -58,10 +57,8 @@ class TopLevel : public KStatusNotifierItem
void loadTeaMenuItems();
void repaintTrayIcon();
void setTooltipText(const QString& content);
- private Q_SLOTS:
void configureNotifications();
- private:
QList<Tea> m_tealist;
QAction *action;
QActionGroup *m_teaActionGroup;