Commit da7797f0 authored by Laurent Montel's avatar Laurent Montel 😁

Use windowId directly

parent cc6c4fc1
......@@ -60,11 +60,7 @@ void MigrationAgent::configure(WId windowId)
dlg->resize(600, 300);
if (windowId) {
#ifndef Q_OS_WIN
KWindowSystem::setMainWindow(dlg, windowId);
#else
KWindowSystem::setMainWindow(dlg, (HWND)windowId);
#endif
}
dlg->show();
}
......
......@@ -239,22 +239,14 @@ void NewMailNotifierAgent::setShowButtonToDisplayMail(bool b)
void NewMailNotifierAgent::showConfigureDialog(qlonglong windowId)
{
#ifndef Q_OS_WIN
configure(static_cast<WId>(windowId));
#else
configure(reinterpret_cast<WId>(windowId));
#endif
configure(windowId);
}
void NewMailNotifierAgent::configure(WId windowId)
{
QPointer<NewMailNotifierSettingsDialog> dialog = new NewMailNotifierSettingsDialog;
if (windowId) {
#ifndef Q_OS_WIN
KWindowSystem::setMainWindow(dialog, windowId);
#else
KWindowSystem::setMainWindow(dialog, (HWND)windowId);
#endif
}
dialog->exec();
delete dialog;
......
......@@ -265,11 +265,7 @@ int ImapResourceBase::configureSubscription(qlonglong windowId)
mSubscriptions = new SubscriptionDialog(nullptr, SubscriptionDialog::AllowToEnableSubscription);
if (windowId) {
#ifndef Q_OS_WIN
KWindowSystem::setMainWindow(mSubscriptions, windowId);
#else
KWindowSystem::setMainWindow(mSubscriptions, (HWND)windowId);
#endif
}
mSubscriptions->setWindowTitle(i18nc("@title:window", "Serverside Subscription"));
mSubscriptions->setWindowIcon(QIcon::fromTheme(QStringLiteral("network-server")));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment