From 689742c6e3ed2f6528768e838dc610e861c7cc1a Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Fri, 28 Feb 2014 09:00:24 +0100 Subject: [PATCH] Use dialog parent for cpaster dialogs Change-Id: I2561d74522b70bc81345ab9beb60ec7242045509 Reviewed-by: hjk --- src/plugins/cpaster/cpasterplugin.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/cpaster/cpasterplugin.cpp b/src/plugins/cpaster/cpasterplugin.cpp index 29161938890..e409d59a488 100644 --- a/src/plugins/cpaster/cpasterplugin.cpp +++ b/src/plugins/cpaster/cpasterplugin.cpp @@ -254,7 +254,7 @@ void CodepasterPlugin::post(QString data, const QString &mimeType) const QString username = m_settings->username; - PasteView view(m_protocols, mimeType, ICore::mainWindow()); + PasteView view(m_protocols, mimeType, ICore::dialogParent()); view.setProtocol(m_settings->protocol); const FileDataList diffChunks = splitDiffToFiles(data); @@ -274,7 +274,7 @@ void CodepasterPlugin::fetchUrl() QUrl url; do { bool ok = true; - url = QUrl(QInputDialog::getText(0, tr("Fetch from URL"), tr("Enter URL:"), QLineEdit::Normal, QString(), &ok)); + url = QUrl(QInputDialog::getText(ICore::dialogParent(), tr("Fetch from URL"), tr("Enter URL:"), QLineEdit::Normal, QString(), &ok)); if (!ok) return; } while (!url.isValid()); @@ -283,7 +283,7 @@ void CodepasterPlugin::fetchUrl() void CodepasterPlugin::fetch() { - PasteSelectDialog dialog(m_protocols, ICore::mainWindow()); + PasteSelectDialog dialog(m_protocols, ICore::dialogParent()); dialog.setProtocol(m_settings->protocol); if (dialog.exec() != QDialog::Accepted)