diff options
author | hjk <[email protected]> | 2019-04-30 12:58:33 +0200 |
---|---|---|
committer | hjk <[email protected]> | 2019-04-30 17:10:39 +0000 |
commit | a5148b53638bdc9abe2006c7748936524f2d902c (patch) | |
tree | ea17e589f62d594bf840f71c8282098c7d9af8d6 /src/plugins/qmlpreview/qmlpreviewplugin.cpp | |
parent | 28de30df18db15d081ccad3944cc341b8b29829b (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 <[email protected]>
Diffstat (limited to 'src/plugins/qmlpreview/qmlpreviewplugin.cpp')
-rw-r--r-- | src/plugins/qmlpreview/qmlpreviewplugin.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/qmlpreview/qmlpreviewplugin.cpp b/src/plugins/qmlpreview/qmlpreviewplugin.cpp index 0094e9211b9..732f81ddd11 100644 --- a/src/plugins/qmlpreview/qmlpreviewplugin.cpp +++ b/src/plugins/qmlpreview/qmlpreviewplugin.cpp @@ -143,7 +143,7 @@ bool QmlPreviewPlugin::initialize(const QStringList &arguments, QString *errorSt Constants::G_FILE_OTHER); action->setVisible(false); connect(ProjectTree::instance(), &ProjectTree::currentNodeChanged, action, [action]() { - const Node *node = ProjectTree::findCurrentNode(); + const Node *node = ProjectTree::currentNode(); const FileNode *fileNode = node ? node->asFileNode() : nullptr; action->setVisible(fileNode ? fileNode->fileType() == FileType::QML : false); }); @@ -297,7 +297,7 @@ void QmlPreviewPlugin::setFileLoader(QmlPreviewFileLoader fileLoader) void QmlPreviewPlugin::previewCurrentFile() { - const Node *currentNode = ProjectTree::findCurrentNode(); + const Node *currentNode = ProjectTree::currentNode(); if (!currentNode || !currentNode->asFileNode() || currentNode->asFileNode()->fileType() != FileType::QML) return; |