From 4016b2500dcc0394da462390a94a88e2466e154c Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 17 Dec 2014 12:07:23 +0100 Subject: Use Qt 5 signals & slot syntax in the Windows QPA plugin. Change-Id: Ide8f79e82c9d22e40577e6fb0116ebaa2a6d90d9 Reviewed-by: Joerg Bornemann --- .../platforms/windows/qwindowsdialoghelpers.cpp | 24 +++++++++++----------- .../platforms/windows/qwindowsinputcontext.cpp | 4 ++-- 2 files changed, 14 insertions(+), 14 deletions(-) (limited to 'src/plugins/platforms/windows') diff --git a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp index f1f472b3e2..3a0c3b9fe9 100644 --- a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp +++ b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp @@ -1580,14 +1580,14 @@ QWindowsNativeDialogBase *QWindowsFileDialogHelper::createNativeDialog() QWindowsNativeFileDialogBase *result = QWindowsNativeFileDialogBase::create(options()->acceptMode(), m_data); if (!result) return 0; - QObject::connect(result, SIGNAL(accepted()), this, SIGNAL(accept())); - QObject::connect(result, SIGNAL(rejected()), this, SIGNAL(reject())); - QObject::connect(result, SIGNAL(directoryEntered(QUrl)), - this, SIGNAL(directoryEntered(QUrl))); - QObject::connect(result, SIGNAL(currentChanged(QUrl)), - this, SIGNAL(currentChanged(QUrl))); - QObject::connect(result, SIGNAL(filterSelected(QString)), - this, SIGNAL(filterSelected(QString))); + QObject::connect(result, &QWindowsNativeDialogBase::accepted, this, &QPlatformDialogHelper::accept); + QObject::connect(result, &QWindowsNativeDialogBase::rejected, this, &QPlatformDialogHelper::reject); + QObject::connect(result, &QWindowsNativeFileDialogBase::directoryEntered, + this, &QPlatformFileDialogHelper::directoryEntered); + QObject::connect(result, &QWindowsNativeFileDialogBase::currentChanged, + this, &QPlatformFileDialogHelper::currentChanged); + QObject::connect(result, &QWindowsNativeFileDialogBase::filterSelected, + this, &QPlatformFileDialogHelper::filterSelected); // Apply settings. const QSharedPointer &opts = options(); @@ -1961,8 +1961,8 @@ QWindowsNativeDialogBase *QWindowsXpFileDialogHelper::createNativeDialog() { m_data.fromOptions(options()); if (QWindowsXpNativeFileDialog *result = QWindowsXpNativeFileDialog::create(options(), m_data)) { - QObject::connect(result, SIGNAL(accepted()), this, SIGNAL(accept())); - QObject::connect(result, SIGNAL(rejected()), this, SIGNAL(reject())); + QObject::connect(result, &QWindowsNativeDialogBase::accepted, this, &QPlatformDialogHelper::accept); + QObject::connect(result, &QWindowsNativeDialogBase::rejected, this, &QPlatformDialogHelper::reject); return result; } return 0; @@ -2117,8 +2117,8 @@ QWindowsNativeDialogBase *QWindowsColorDialogHelper::createNativeDialog() { QWindowsNativeColorDialog *nativeDialog = new QWindowsNativeColorDialog(m_currentColor); nativeDialog->setWindowTitle(options()->windowTitle()); - connect(nativeDialog, SIGNAL(accepted()), this, SIGNAL(accept())); - connect(nativeDialog, SIGNAL(rejected()), this, SIGNAL(reject())); + connect(nativeDialog, &QWindowsNativeDialogBase::accepted, this, &QPlatformDialogHelper::accept); + connect(nativeDialog, &QWindowsNativeDialogBase::rejected, this, &QPlatformDialogHelper::reject); return nativeDialog; } #endif // USE_NATIVE_COLOR_DIALOG diff --git a/src/plugins/platforms/windows/qwindowsinputcontext.cpp b/src/plugins/platforms/windows/qwindowsinputcontext.cpp index 94a27d146f..d8e4900780 100644 --- a/src/plugins/platforms/windows/qwindowsinputcontext.cpp +++ b/src/plugins/platforms/windows/qwindowsinputcontext.cpp @@ -156,8 +156,8 @@ QWindowsInputContext::QWindowsInputContext() : m_WM_MSIME_MOUSE(RegisterWindowMessage(L"MSIMEMouseOperation")), m_endCompositionRecursionGuard(false) { - connect(QGuiApplication::inputMethod(), SIGNAL(cursorRectangleChanged()), - this, SLOT(cursorRectChanged())); + connect(QGuiApplication::inputMethod(), &QInputMethod::cursorRectangleChanged, + this, &QWindowsInputContext::cursorRectChanged); } QWindowsInputContext::~QWindowsInputContext() -- cgit v1.2.3