aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/resourceeditor
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2019-04-30 12:58:33 +0200
committerhjk <hjk@qt.io>2019-04-30 17:10:39 +0000
commita5148b53638bdc9abe2006c7748936524f2d902c (patch)
treeea17e589f62d594bf840f71c8282098c7d9af8d6 /src/plugins/resourceeditor
parent28de30df18db15d081ccad3944cc341b8b29829b (diff)
ProjectExplorer: Rename ProjectTree::findCurrentNode to currentNode
For consistency, it's straight forwards access, similar to currentProject, not much to search and find. Change-Id: I7ce696bdc24b6a8713d6f11e02443a6f94c605f6 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/resourceeditor')
-rw-r--r--src/plugins/resourceeditor/resourceeditorplugin.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/plugins/resourceeditor/resourceeditorplugin.cpp b/src/plugins/resourceeditor/resourceeditorplugin.cpp
index f5c3fa1928..6b7e7c471f 100644
--- a/src/plugins/resourceeditor/resourceeditorplugin.cpp
+++ b/src/plugins/resourceeditor/resourceeditorplugin.cpp
@@ -241,7 +241,7 @@ void ResourceEditorPlugin::onRefresh()
void ResourceEditorPlugin::addPrefixContextMenu()
{
- auto topLevel = dynamic_cast<ResourceTopLevelNode *>(ProjectTree::findCurrentNode());
+ auto topLevel = dynamic_cast<ResourceTopLevelNode *>(ProjectTree::currentNode());
QTC_ASSERT(topLevel, return);
PrefixLangDialog dialog(tr("Add Prefix"), QString(), QString(), Core::ICore::mainWindow());
if (dialog.exec() != QDialog::Accepted)
@@ -254,7 +254,7 @@ void ResourceEditorPlugin::addPrefixContextMenu()
void ResourceEditorPlugin::removePrefixContextMenu()
{
- auto rfn = dynamic_cast<ResourceFolderNode *>(ProjectTree::findCurrentNode());
+ auto rfn = dynamic_cast<ResourceFolderNode *>(ProjectTree::currentNode());
QTC_ASSERT(rfn, return);
if (QMessageBox::question(Core::ICore::mainWindow(),
tr("Remove Prefix"),
@@ -267,7 +267,7 @@ void ResourceEditorPlugin::removePrefixContextMenu()
void ResourceEditorPlugin::removeNonExisting()
{
- auto topLevel = dynamic_cast<ResourceTopLevelNode *>(ProjectTree::findCurrentNode());
+ auto topLevel = dynamic_cast<ResourceTopLevelNode *>(ProjectTree::currentNode());
QTC_ASSERT(topLevel, return);
topLevel->removeNonExistingFiles();
}
@@ -279,7 +279,7 @@ void ResourceEditorPlugin::renameFileContextMenu()
void ResourceEditorPlugin::removeFileContextMenu()
{
- auto rfn = dynamic_cast<ResourceTopLevelNode *>(ProjectTree::findCurrentNode());
+ auto rfn = dynamic_cast<ResourceTopLevelNode *>(ProjectTree::currentNode());
QTC_ASSERT(rfn, return);
QString path = rfn->filePath().toString();
FolderNode *parent = rfn->parentFolderNode();
@@ -292,26 +292,26 @@ void ResourceEditorPlugin::removeFileContextMenu()
void ResourceEditorPlugin::openEditorContextMenu()
{
- Core::EditorManager::openEditor(ProjectTree::findCurrentNode()->filePath().toString());
+ Core::EditorManager::openEditor(ProjectTree::currentNode()->filePath().toString());
}
void ResourceEditorPlugin::copyPathContextMenu()
{
- auto node = dynamic_cast<ResourceFileNode *>(ProjectTree::findCurrentNode());
+ auto node = dynamic_cast<ResourceFileNode *>(ProjectTree::currentNode());
QTC_ASSERT(node, return);
QApplication::clipboard()->setText(QLatin1String(resourcePrefix) + node->qrcPath());
}
void ResourceEditorPlugin::copyUrlContextMenu()
{
- auto node = dynamic_cast<ResourceFileNode *>(ProjectTree::findCurrentNode());
+ auto node = dynamic_cast<ResourceFileNode *>(ProjectTree::currentNode());
QTC_ASSERT(node, return);
QApplication::clipboard()->setText(QLatin1String(urlPrefix) + node->qrcPath());
}
void ResourceEditorPlugin::renamePrefixContextMenu()
{
- auto node = dynamic_cast<ResourceFolderNode *>(ProjectTree::findCurrentNode());
+ auto node = dynamic_cast<ResourceFolderNode *>(ProjectTree::currentNode());
QTC_ASSERT(node, return);
PrefixLangDialog dialog(tr("Rename Prefix"), node->prefix(), node->lang(), Core::ICore::mainWindow());
@@ -326,7 +326,7 @@ void ResourceEditorPlugin::renamePrefixContextMenu()
void ResourceEditorPlugin::updateContextActions()
{
- const Node *node = ProjectTree::findCurrentNode();
+ const Node *node = ProjectTree::currentNode();
const bool isResourceNode = dynamic_cast<const ResourceTopLevelNode *>(node);
m_addPrefix->setEnabled(isResourceNode);
m_addPrefix->setVisible(isResourceNode);