diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2016-11-10 16:56:15 +0100 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2016-11-14 09:03:10 +0000 |
commit | 49f5d98871f7f0728a56ea78e577ba1bda9f54d9 (patch) | |
tree | ee4982464abcaa3455587891a8ce45eebd314e68 /src/plugins/resourceeditor/resourcenode.cpp | |
parent | 3af13723951dc1604bb5d5d5a4b214b1e173df91 (diff) |
ProjectExplorer: Make priorities available on more nodes
Make priority available on all FolderNodes. Make the sort order
of all kinds of FolderNodes check the priority.
This allows no reorder e.g. ProjectNodes as needed.
Change-Id: I369edd28807ab9f89fb646b0001e1b3eb1a19d7e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Diffstat (limited to 'src/plugins/resourceeditor/resourcenode.cpp')
-rw-r--r-- | src/plugins/resourceeditor/resourcenode.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/resourceeditor/resourcenode.cpp b/src/plugins/resourceeditor/resourcenode.cpp index c91763be35..1bb7b8c0ed 100644 --- a/src/plugins/resourceeditor/resourcenode.cpp +++ b/src/plugins/resourceeditor/resourcenode.cpp @@ -44,7 +44,7 @@ using namespace ResourceEditor; using namespace ResourceEditor::Internal; -static bool priority(const QStringList &files) +static bool hasPriority(const QStringList &files) { if (files.isEmpty()) return false; @@ -341,7 +341,7 @@ ProjectExplorer::FolderNode::AddNewInformation ResourceTopLevelNode::addNewInfor .arg(QLatin1Char('/')); int p = -1; - if (priority(files)) { // images/* and qml/js mimetypes + if (hasPriority(files)) { // images/* and qml/js mimetypes p = 110; if (context == this) p = 120; @@ -497,7 +497,7 @@ ProjectExplorer::FolderNode::AddNewInformation ResourceFolderNode::addNewInforma .arg(displayName()); int p = -1; // never the default - if (priority(files)) { // image/* and qml/js mimetypes + if (hasPriority(files)) { // image/* and qml/js mimetypes p = 105; // prefer against .pro and .pri files if (context == this) p = 120; |