diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-04-10 01:00:25 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-04-10 01:00:26 +0200 |
commit | e027c7241f073f5fc8c1db88700cc83635b6454f (patch) | |
tree | 69920e408b5eeb1547c0241696cfa845af85e4be /examples/widgets/tools | |
parent | b2035d38e8dfdfe2ba8da96df5c1174f01dfbb5b (diff) | |
parent | 3b85d53913741660473dbc242a48c2ee65d51421 (diff) |
Merge remote-tracking branch 'origin/5.11' into dev
Change-Id: I0120f804522c0c652e9537b6e9fe08189f071ed2
Diffstat (limited to 'examples/widgets/tools')
-rw-r--r-- | examples/widgets/tools/i18n/languagechooser.cpp | 9 | ||||
-rw-r--r-- | examples/widgets/tools/i18n/mainwindow.cpp | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/examples/widgets/tools/i18n/languagechooser.cpp b/examples/widgets/tools/i18n/languagechooser.cpp index 83aafe6b8a..58cf9d4047 100644 --- a/examples/widgets/tools/i18n/languagechooser.cpp +++ b/examples/widgets/tools/i18n/languagechooser.cpp @@ -70,7 +70,10 @@ LanguageChooser::LanguageChooser(const QString& defaultLang, QWidget *parent) for (int i = 0; i < qmFiles.size(); ++i) { QCheckBox *checkBox = new QCheckBox(languageName(qmFiles[i])); qmFileForCheckBoxMap.insert(checkBox, qmFiles[i]); - connect(checkBox, SIGNAL(toggled(bool)), this, SLOT(checkBoxToggled())); + connect(checkBox, + QOverload<bool>::of(&QCheckBox::toggled), + this, + &LanguageChooser::checkBoxToggled); if (languageMatch(defaultLang, qmFiles[i])) checkBox->setCheckState(Qt::Checked); groupBoxLayout->addWidget(checkBox, i / 2, i % 2); @@ -84,8 +87,8 @@ LanguageChooser::LanguageChooser(const QString& defaultLang, QWidget *parent) hideAllButton = buttonBox->addButton("Hide All", QDialogButtonBox::ActionRole); - connect(showAllButton, SIGNAL(clicked()), this, SLOT(showAll())); - connect(hideAllButton, SIGNAL(clicked()), this, SLOT(hideAll())); + connect(showAllButton, &QAbstractButton::clicked, this, &LanguageChooser::showAll); + connect(hideAllButton, &QAbstractButton::clicked, this, &LanguageChooser::hideAll); QVBoxLayout *mainLayout = new QVBoxLayout; mainLayout->addWidget(groupBox); diff --git a/examples/widgets/tools/i18n/mainwindow.cpp b/examples/widgets/tools/i18n/mainwindow.cpp index d5de81cab7..6ebfddfa98 100644 --- a/examples/widgets/tools/i18n/mainwindow.cpp +++ b/examples/widgets/tools/i18n/mainwindow.cpp @@ -76,7 +76,7 @@ MainWindow::MainWindow() centralWidget->setLayout(mainLayout); exitAction = new QAction(tr("E&xit"), this); - connect(exitAction, SIGNAL(triggered()), qApp, SLOT(quit())); + connect(exitAction, &QAction::triggered, qApp, QApplication::quit); fileMenu = menuBar()->addMenu(tr("&File")); fileMenu->setPalette(QPalette(Qt::red)); |