Commit 659e37d4 authored by Laurent Montel's avatar Laurent Montel 😁

Use directly KWindowSystem::setMainWindow

parent 3533b3e4
......@@ -110,11 +110,7 @@ void ArchiveMailAgent::showConfigureDialog(qlonglong windowId)
{
QPointer<ArchiveMailDialog> dialog = new ArchiveMailDialog();
if (windowId) {
#ifndef Q_OS_WIN
KWindowSystem::setMainWindow(dialog, windowId);
#else
KWindowSystem::setMainWindow(dialog, (HWND)windowId);
#endif
}
connect(dialog.data(), &ArchiveMailDialog::archiveNow, mArchiveManager, &ArchiveMailManager::slotArchiveNow);
connect(this, &ArchiveMailAgent::needUpdateConfigDialogBox, dialog.data(), &ArchiveMailDialog::slotNeedReloadConfig);
......
......@@ -106,11 +106,7 @@ void FollowUpReminderAgent::showConfigureDialog(qlonglong windowId)
QPointer<FollowUpReminderInfoDialog> dialog = new FollowUpReminderInfoDialog();
dialog->load();
if (windowId) {
#ifndef Q_OS_WIN
KWindowSystem::setMainWindow(dialog, windowId);
#else
KWindowSystem::setMainWindow(dialog, (HWND)windowId);
#endif
}
if (dialog->exec()) {
const QList<qint32> lstRemoveItem = dialog->listRemoveId();
......
......@@ -344,11 +344,7 @@ void MailFilterAgent::showFilterLogDialog(qlonglong windowId)
if (!m_filterLogDialog) {
m_filterLogDialog = new FilterLogDialog(nullptr);
}
#ifndef Q_OS_WIN
KWindowSystem::setMainWindow(m_filterLogDialog, windowId);
#else
KWindowSystem::setMainWindow(m_filterLogDialog, (HWND)windowId);
#endif
m_filterLogDialog->show();
m_filterLogDialog->raise();
m_filterLogDialog->activateWindow();
......
......@@ -150,11 +150,7 @@ void SendLaterAgent::showConfigureDialog(qlonglong windowId)
{
QPointer<SendLaterConfigureDialog> dialog = new SendLaterConfigureDialog();
if (windowId) {
#ifndef Q_OS_WIN
KWindowSystem::setMainWindow(dialog, windowId);
#else
KWindowSystem::setMainWindow(dialog, (HWND)windowId);
#endif
}
connect(this, &SendLaterAgent::needUpdateConfigDialogBox, dialog.data(), &SendLaterConfigureDialog::slotNeedToReloadConfig);
connect(dialog.data(), &SendLaterConfigureDialog::sendNow, this, &SendLaterAgent::slotSendNow);
......
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