Commit 2aa4ef51 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Remove duplicate code

parent b1bff23b
......@@ -709,9 +709,7 @@ bool KMKernel::showMail(qint64 serialNumber)
const auto item = job->items().at(0);
win->showMessage(MessageCore::MessageCoreSettings::self()->overrideCharacterEncoding(),
item, item.parentCollection());
win->show();
win->raise();
win->activateWindow();
win->showAndActivateWindow();
return true;
}
}
......
......@@ -798,6 +798,13 @@ void KMReaderMainWin::showMessagePopup(const Akonadi::Item &msg, const QUrl &url
}
}
void KMReaderMainWin::showAndActivateWindow()
{
show();
raise();
activateWindow();
}
void KMReaderMainWin::slotEditToolbars()
{
KConfigGroup grp(KMKernel::self()->config(), "ReaderWindow");
......
......@@ -60,6 +60,7 @@ public:
void showMessage(const QString &encoding, const QList<KMime::Message::Ptr> &message);
void showMessage(const QString &encoding, const KMime::Message::Ptr &message);
void showMessagePopup(const Akonadi::Item &msg, const QUrl &aUrl, const QUrl &imageUrl, const QPoint &aPoint, bool contactAlreadyExists, bool uniqueContactFound, const WebEngineViewer::WebHitTestResult &result);
void showAndActivateWindow();
public Q_SLOTS:
void slotForwardInlineMsg();
void slotForwardAttachedMessage();
......
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