summaryrefslogtreecommitdiff
path: root/src/libs
diff options
context:
space:
mode:
authorAlessandro Portale <alessandro.portale@qt.io>2019-05-27 23:28:48 +0200
committerAlessandro Portale <alessandro.portale@qt.io>2019-05-28 14:07:03 +0000
commit0933c20de8547139a7da6c965f23633a30fbbe75 (patch)
treee47da78d29ff3715d4111fb46f321c4d7b3d5b14 /src/libs
parent1b11c4d4b634ac954f99f9c3109a40b919528ee7 (diff)
downloadqt-creator-0933c20de8547139a7da6c965f23633a30fbbe75.tar.gz
connect() to ambiguous signals/slots: Replace static_cast with QOverload
Change-Id: I473d7a2a16509cee944a2a21b022a3f6f02cfd8d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/libs')
-rw-r--r--src/libs/aggregation/examples/text/main.cpp2
-rw-r--r--src/libs/qt-breakpad/qtcrashhandler/dumpsender.cpp3
-rw-r--r--src/libs/utils/savedaction.cpp2
3 files changed, 3 insertions, 4 deletions
diff --git a/src/libs/aggregation/examples/text/main.cpp b/src/libs/aggregation/examples/text/main.cpp
index c205ccb838..043196ab78 100644
--- a/src/libs/aggregation/examples/text/main.cpp
+++ b/src/libs/aggregation/examples/text/main.cpp
@@ -31,7 +31,7 @@ MyMain::MyMain(QWidget *parent, Qt::WFlags flags)
: QWidget(parent, flags)
{
ui.setupUi(this);
- connect(ui.comboBox, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
+ connect(ui.comboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
this, &MyMain::select);
}
diff --git a/src/libs/qt-breakpad/qtcrashhandler/dumpsender.cpp b/src/libs/qt-breakpad/qtcrashhandler/dumpsender.cpp
index c8f03ea8d9..8e1deea715 100644
--- a/src/libs/qt-breakpad/qtcrashhandler/dumpsender.cpp
+++ b/src/libs/qt-breakpad/qtcrashhandler/dumpsender.cpp
@@ -145,8 +145,7 @@ void DumpSender::sendDumpAndQuit()
connect(reply, &QNetworkReply::uploadProgress, this, &DumpSender::uploadProgress);
connect(reply, &QNetworkReply::finished, QCoreApplication::instance(), &QCoreApplication::quit);
- connect(reply,
- static_cast<void (QNetworkReply::*)(QNetworkReply::NetworkError)>(&QNetworkReply::error),
+ connect(reply, QOverload<QNetworkReply::NetworkError>::of(&QNetworkReply::error),
QCoreApplication::instance(), &QCoreApplication::quit);
}
diff --git a/src/libs/utils/savedaction.cpp b/src/libs/utils/savedaction.cpp
index 0000e54d31..87a785f6db 100644
--- a/src/libs/utils/savedaction.cpp
+++ b/src/libs/utils/savedaction.cpp
@@ -235,7 +235,7 @@ void SavedAction::connectWidget(QWidget *widget, ApplyMode applyMode)
} else if (auto spinBox = qobject_cast<QSpinBox *>(widget)) {
spinBox->setValue(m_value.toInt());
if (applyMode == ImmediateApply) {
- connect(spinBox, static_cast<void(QSpinBox::*)(int)>(&QSpinBox::valueChanged),
+ connect(spinBox, QOverload<int>::of(&QSpinBox::valueChanged),
this, [this, spinBox]() { setValue(spinBox->value()); });
}
} else if (auto lineEdit = qobject_cast<QLineEdit *>(widget)) {