Commit dcf6c7be authored by Andrius Štikonas's avatar Andrius Štikonas

Use new signal/slot syntax.

parent 091efb55
......@@ -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
......
......@@ -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:
......@@ -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;
......
......@@ -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" ));
......
......@@ -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;
......
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