forked from qt-creator/qt-creator
Android: Use Qt5-style connects
The heavy lifting was done by clazy. Change-Id: Id09b62b7b9812d9c0981202c257d18387a8b09d9 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
c3acbc46ed
commit
88dfa84fc6
@@ -122,9 +122,11 @@ AndroidGdbServerKitInformationWidget::AndroidGdbServerKitInformationWidget(Kit *
|
||||
// ToolButton with Menu, defaulting to 'Autodetect'.
|
||||
auto buttonMenu = new QMenu(m_button);
|
||||
QAction *autoDetectAction = buttonMenu->addAction(tr("Auto-detect"));
|
||||
connect(autoDetectAction, SIGNAL(triggered()), this, SLOT(autoDetectDebugger()));
|
||||
connect(autoDetectAction, &QAction::triggered,
|
||||
this, &AndroidGdbServerKitInformationWidget::autoDetectDebugger);
|
||||
QAction *changeAction = buttonMenu->addAction(tr("Edit..."));
|
||||
connect(changeAction, SIGNAL(triggered()), this, SLOT(showDialog()));
|
||||
connect(changeAction, &QAction::triggered,
|
||||
this, &AndroidGdbServerKitInformationWidget::showDialog);
|
||||
m_button->setMenu(buttonMenu);
|
||||
|
||||
refresh();
|
||||
@@ -192,8 +194,8 @@ void AndroidGdbServerKitInformationWidget::showDialog()
|
||||
layout->addLayout(formLayout);
|
||||
|
||||
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, &dialog);
|
||||
connect(buttonBox, SIGNAL(accepted()), &dialog, SLOT(accept()));
|
||||
connect(buttonBox, SIGNAL(rejected()), &dialog, SLOT(reject()));
|
||||
connect(buttonBox, &QDialogButtonBox::accepted, &dialog, &QDialog::accept);
|
||||
connect(buttonBox, &QDialogButtonBox::rejected, &dialog, &QDialog::reject);
|
||||
layout->addWidget(buttonBox);
|
||||
|
||||
dialog.setWindowTitle(tr("GDB Server for \"%1\"").arg(m_kit->displayName()));
|
||||
|
||||
Reference in New Issue
Block a user