Use Qt 5 signals & slot syntax in the Windows QPA plugin.

Change-Id: Ide8f79e82c9d22e40577e6fb0116ebaa2a6d90d9
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
bb10
Friedemann Kleint 2014-12-17 12:07:23 +01:00
parent 3c9847a068
commit 4016b2500d
2 changed files with 14 additions and 14 deletions

View File

@ -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<QFileDialogOptions> &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

View File

@ -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()