From 90135a5b7a31c30322f19e403d697780b552bf19 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 10 Jun 2015 15:35:33 +0200 Subject: Convert to Qt 5 connect syntax Convert to new signal/slot syntax where it does not make things more complicated: connections where the signal or slot is an overloaded method, or where the receiver method is not in a QObject, are left alone. The new syntax allows compile-time checking of the connection. Change-Id: I2cc3c93b9812797bd67f64a8728569491eeec668 Reviewed-by: Karsten Heimrich Reviewed-by: Jarek Kobus --- src/sdk/tabcontroller.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/sdk/tabcontroller.cpp') diff --git a/src/sdk/tabcontroller.cpp b/src/sdk/tabcontroller.cpp index 80eb29ed5..394f953fa 100644 --- a/src/sdk/tabcontroller.cpp +++ b/src/sdk/tabcontroller.cpp @@ -95,7 +95,7 @@ TabController::~TabController() void TabController::setGui(QInstaller::PackageManagerGui *gui) { d->m_gui = gui; - connect(d->m_gui, SIGNAL(gotRestarted()), this, SLOT(restartWizard())); + connect(d->m_gui, &PackageManagerGui::gotRestarted, this, &TabController::restartWizard); } void TabController::setControlScript(const QString &script) @@ -125,8 +125,9 @@ int TabController::init() qDebug() << "Using control script:" << d->m_controlScript; } - connect(d->m_gui, SIGNAL(currentIdChanged(int)), this, SLOT(onCurrentIdChanged(int))); - connect(d->m_gui, SIGNAL(settingsButtonClicked()), this, SLOT(onSettingsButtonClicked())); + connect(d->m_gui, &QWizard::currentIdChanged, this, &TabController::onCurrentIdChanged); + connect(d->m_gui, &PackageManagerGui::settingsButtonClicked, + this, &TabController::onSettingsButtonClicked); } IntroductionPage *page = @@ -169,14 +170,14 @@ void TabController::restartWizard() d->m_core->writeMaintenanceTool(); // restart and switch back to intro page - QTimer::singleShot(0, this, SLOT(init())); + QTimer::singleShot(0, this, &TabController::init); } void TabController::onSettingsButtonClicked() { SettingsDialog dialog(d->m_core); - connect (&dialog, SIGNAL(networkSettingsChanged(QInstaller::Settings)), this, - SLOT(onNetworkSettingsChanged(QInstaller::Settings))); + connect(&dialog, &SettingsDialog::networkSettingsChanged, + this, &TabController::onNetworkSettingsChanged); dialog.exec(); if (d->m_networkSettingsChanged) { -- cgit v1.2.3