diff options
Diffstat (limited to 'src/plugins/resourceeditor/resourceeditorplugin.cpp')
-rw-r--r-- | src/plugins/resourceeditor/resourceeditorplugin.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/plugins/resourceeditor/resourceeditorplugin.cpp b/src/plugins/resourceeditor/resourceeditorplugin.cpp index b6d35956da..c317f7627a 100644 --- a/src/plugins/resourceeditor/resourceeditorplugin.cpp +++ b/src/plugins/resourceeditor/resourceeditorplugin.cpp @@ -32,7 +32,6 @@ #include <coreplugin/icore.h> #include <coreplugin/coreconstants.h> -#include <coreplugin/id.h> #include <coreplugin/actionmanager/actioncontainer.h> #include <coreplugin/actionmanager/actionmanager.h> #include <coreplugin/actionmanager/command.h> @@ -284,7 +283,7 @@ void ResourceEditorPluginPrivate::addPrefixContextMenu() { auto topLevel = dynamic_cast<ResourceTopLevelNode *>(ProjectTree::currentNode()); QTC_ASSERT(topLevel, return); - PrefixLangDialog dialog(tr("Add Prefix"), QString(), QString(), Core::ICore::mainWindow()); + PrefixLangDialog dialog(tr("Add Prefix"), QString(), QString(), Core::ICore::dialogParent()); if (dialog.exec() != QDialog::Accepted) return; QString prefix = dialog.prefix(); @@ -297,7 +296,7 @@ void ResourceEditorPluginPrivate::removePrefixContextMenu() { auto rfn = dynamic_cast<ResourceFolderNode *>(ProjectTree::currentNode()); QTC_ASSERT(rfn, return); - if (QMessageBox::question(Core::ICore::mainWindow(), + if (QMessageBox::question(Core::ICore::dialogParent(), tr("Remove Prefix"), tr("Remove prefix %1 and all its files?").arg(rfn->displayName())) == QMessageBox::Yes) { @@ -326,7 +325,7 @@ void ResourceEditorPluginPrivate::removeFileContextMenu() FolderNode *parent = rfn->parentFolderNode(); QTC_ASSERT(parent, return); if (parent->removeFiles(QStringList() << path) != RemovedFilesFromProject::Ok) - QMessageBox::warning(Core::ICore::mainWindow(), + QMessageBox::warning(Core::ICore::dialogParent(), tr("File Removal Failed"), tr("Removing file %1 from the project failed.").arg(path)); } @@ -355,7 +354,10 @@ void ResourceEditorPluginPrivate::renamePrefixContextMenu() auto node = dynamic_cast<ResourceFolderNode *>(ProjectTree::currentNode()); QTC_ASSERT(node, return); - PrefixLangDialog dialog(tr("Rename Prefix"), node->prefix(), node->lang(), Core::ICore::mainWindow()); + PrefixLangDialog dialog(tr("Rename Prefix"), + node->prefix(), + node->lang(), + Core::ICore::dialogParent()); if (dialog.exec() != QDialog::Accepted) return; QString prefix = dialog.prefix(); |