summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-06-14 22:50:20 +0200
committerMontel Laurent <[email protected]>2017-06-14 22:50:20 +0200
commitcd9540381b932b55827120e5a4059ae0e137109a (patch)
treeaa38ab7834930e89e1c1ff8559859e5c38feecfc
parent9b47218ec2e9fae81fa08098ef813c13b78986ab (diff)
Add parent
-rw-r--r--agents/archivemailagent/archivemailwidget.cpp2
-rw-r--r--agents/followupreminderagent/followupreminderinfowidget.cpp2
-rw-r--r--agents/sendlateragent/sendlaterconfigurewidget.cpp2
-rw-r--r--src/editor/kmcomposerwin.cpp2
-rw-r--r--src/kmmainwidget.cpp2
-rw-r--r--src/kmreadermainwin.cpp8
6 files changed, 9 insertions, 9 deletions
diff --git a/agents/archivemailagent/archivemailwidget.cpp b/agents/archivemailagent/archivemailwidget.cpp
index 5968fe6..dd7fb87 100644
--- a/agents/archivemailagent/archivemailwidget.cpp
+++ b/agents/archivemailagent/archivemailwidget.cpp
@@ -98,7 +98,7 @@ ArchiveMailWidget::~ArchiveMailWidget()
void ArchiveMailWidget::customContextMenuRequested(const QPoint &)
{
const QList<QTreeWidgetItem *> listItems = mWidget->treeWidget->selectedItems();
- QMenu menu;
+ QMenu menu(this);
menu.addAction(i18n("Add..."), this, &ArchiveMailWidget::slotAddItem);
if (!listItems.isEmpty()) {
if (listItems.count() == 1) {
diff --git a/agents/followupreminderagent/followupreminderinfowidget.cpp b/agents/followupreminderagent/followupreminderinfowidget.cpp
index 14cfc03..65f074f 100644
--- a/agents/followupreminderagent/followupreminderinfowidget.cpp
+++ b/agents/followupreminderagent/followupreminderinfowidget.cpp
@@ -192,7 +192,7 @@ void FollowUpReminderInfoWidget::customContextMenuRequested(const QPoint &pos)
const QList<QTreeWidgetItem *> listItems = mTreeWidget->selectedItems();
const int nbElementSelected = listItems.count();
if (nbElementSelected > 0) {
- QMenu menu;
+ QMenu menu(this);
QAction *showMessage = nullptr;
FollowUpReminderInfoItem *mailItem = nullptr;
if ((nbElementSelected == 1)) {
diff --git a/agents/sendlateragent/sendlaterconfigurewidget.cpp b/agents/sendlateragent/sendlaterconfigurewidget.cpp
index b3d0d44..861c567 100644
--- a/agents/sendlateragent/sendlaterconfigurewidget.cpp
+++ b/agents/sendlateragent/sendlaterconfigurewidget.cpp
@@ -104,7 +104,7 @@ void SendLaterWidget::customContextMenuRequested(const QPoint &)
{
const QList<QTreeWidgetItem *> listItems = mWidget->treeWidget->selectedItems();
if (!listItems.isEmpty()) {
- QMenu menu;
+ QMenu menu(this);
if (listItems.count() == 1) {
menu.addAction(i18n("Send now"), this, &SendLaterWidget::slotSendNow);
}
diff --git a/src/editor/kmcomposerwin.cpp b/src/editor/kmcomposerwin.cpp
index dbddef6..2c5613f 100644
--- a/src/editor/kmcomposerwin.cpp
+++ b/src/editor/kmcomposerwin.cpp
@@ -1996,7 +1996,7 @@ bool KMComposerWin::insertFromMimeData(const QMimeData *source, bool forceAttach
QImage image = qvariant_cast<QImage>(source->imageData());
QFileInfo fi(source->text());
- QMenu menu;
+ QMenu menu(this);
const QAction *addAsInlineImageAction = menu.addAction(i18n("Add as &Inline Image"));
/*const QAction *addAsAttachmentAction = */ menu.addAction(i18n("Add as &Attachment"));
const QAction *selectedAction = menu.exec(QCursor::pos());
diff --git a/src/kmmainwidget.cpp b/src/kmmainwidget.cpp
index 31cd9b6..38a1f7d 100644
--- a/src/kmmainwidget.cpp
+++ b/src/kmmainwidget.cpp
@@ -2677,7 +2677,7 @@ void KMMainWidget::slotContactSearchJobForMessagePopupDone(KJob *job)
void KMMainWidget::showMessagePopup(const Akonadi::Item &msg, const QUrl &url, const QUrl &imageUrl, const QPoint &aPoint, bool contactAlreadyExists, bool uniqueContactFound,
const WebEngineViewer::WebHitTestResult &result)
{
- QMenu *menu = new QMenu;
+ QMenu *menu = new QMenu(this);
bool urlMenuAdded = false;
diff --git a/src/kmreadermainwin.cpp b/src/kmreadermainwin.cpp
index b8f88d9..90dbe1a 100644
--- a/src/kmreadermainwin.cpp
+++ b/src/kmreadermainwin.cpp
@@ -503,7 +503,7 @@ void KMReaderMainWin::showMessagePopup(const Akonadi::Item &msg, const QUrl &url
if (!url.isEmpty()) {
if (url.scheme() == QLatin1String("mailto")) {
// popup on a mailto URL
- menu = new QMenu;
+ menu = new QMenu(this);
menu->addAction(mReaderWin->mailToComposeAction());
if (messageHasPayload) {
menu->addAction(mReaderWin->mailToReplyAction());
@@ -529,7 +529,7 @@ void KMReaderMainWin::showMessagePopup(const Akonadi::Item &msg, const QUrl &url
urlMenuAdded = true;
} else if (url.scheme() != QLatin1String("attachment")) {
// popup on a not-mailto URL
- menu = new QMenu;
+ menu = new QMenu(this);
menu->addAction(mReaderWin->urlOpenAction());
menu->addAction(mReaderWin->addBookmarksAction());
menu->addAction(mReaderWin->urlSaveAsAction());
@@ -550,7 +550,7 @@ void KMReaderMainWin::showMessagePopup(const Akonadi::Item &msg, const QUrl &url
const QString selectedText(mReaderWin->copyText());
if (!selectedText.isEmpty()) {
if (!menu) {
- menu = new QMenu;
+ menu = new QMenu(this);
}
if (urlMenuAdded) {
menu->addSeparator();
@@ -575,7 +575,7 @@ void KMReaderMainWin::showMessagePopup(const Akonadi::Item &msg, const QUrl &url
}
} else if (!urlMenuAdded) {
if (!menu) {
- menu = new QMenu;
+ menu = new QMenu(this);
}
// popup somewhere else (i.e., not a URL) on the message