diff options
author | Kai Koehne <kai.koehne@theqtcompany.com> | 2015-06-10 15:35:33 +0200 |
---|---|---|
committer | Kai Koehne <kai.koehne@theqtcompany.com> | 2015-06-15 13:48:13 +0000 |
commit | 90135a5b7a31c30322f19e403d697780b552bf19 (patch) | |
tree | d64bef2da4d0143c38167eca2ae32d47b7226ced /tools | |
parent | 80b2694aede1ed736c619f76cb7b6250a913635b (diff) |
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 <karsten.heimrich@theqtcompany.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/repocompare/main.cpp | 2 | ||||
-rw-r--r-- | tools/repocompare/mainwindow.cpp | 10 | ||||
-rw-r--r-- | tools/repocompare/repositorymanager.cpp | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/tools/repocompare/main.cpp b/tools/repocompare/main.cpp index 8ebb49146..514557bcb 100644 --- a/tools/repocompare/main.cpp +++ b/tools/repocompare/main.cpp @@ -52,7 +52,7 @@ int main(int argc, char *argv[]) RepositoryManager manager; manager.setProductionRepository(productionRepo); manager.setUpdateRepository(updateRepo); - a.connect(&manager, SIGNAL(repositoriesCompared()), &a, SLOT(quit())); + a.connect(&manager, &RepositoryManager::repositoriesCompared, &a, &QApplication::quit); qDebug() << "Waiting for server reply..."; a.exec(); qDebug() << "Writing into " << outputFile; diff --git a/tools/repocompare/mainwindow.cpp b/tools/repocompare/mainwindow.cpp index 0c9a2ccb1..64da74f0c 100644 --- a/tools/repocompare/mainwindow.cpp +++ b/tools/repocompare/mainwindow.cpp @@ -78,11 +78,11 @@ MainWindow::MainWindow(QWidget *parent) : ui->productionRepo->insertItems(0, settings.value(productionIdentifier).toStringList()); ui->updateRepo->insertItems(0, settings.value(updateIdentifier).toStringList()); - connect(ui->actionExit, SIGNAL(triggered()), this, SLOT(close())); - connect(ui->productionButton, SIGNAL(clicked()), this, SLOT(getProductionRepository())); - connect(ui->updateButton, SIGNAL(clicked()), this, SLOT(getUpdateRepository())); - connect(ui->exportButton, SIGNAL(clicked()), this, SLOT(createExportFile())); - connect(&manager, SIGNAL(repositoriesCompared()), this, SLOT(displayRepositories())); + connect(ui->actionExit, &QAction::triggered, this, &QWidget::close); + connect(ui->productionButton, &QAbstractButton::clicked, this, &MainWindow::getProductionRepository); + connect(ui->updateButton, &QAbstractButton::clicked, this, &MainWindow::getUpdateRepository); + connect(ui->exportButton, &QAbstractButton::clicked, this, &MainWindow::createExportFile); + connect(&manager, &RepositoryManager::repositoriesCompared, this, &MainWindow::displayRepositories); } MainWindow::~MainWindow() diff --git a/tools/repocompare/repositorymanager.cpp b/tools/repocompare/repositorymanager.cpp index 12df728f4..8f69432dc 100644 --- a/tools/repocompare/repositorymanager.cpp +++ b/tools/repocompare/repositorymanager.cpp @@ -67,7 +67,7 @@ RepositoryManager::RepositoryManager(QObject *parent) : QObject(parent) { manager = new QNetworkAccessManager(this); - connect(manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(receiveRepository(QNetworkReply*))); + connect(manager, &QNetworkAccessManager::finished, this, &RepositoryManager::receiveRepository); productionMap.clear(); updateMap.clear(); } |