aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/resourceeditor
diff options
context:
space:
mode:
authorRobert Loehning <robert.loehning@qt.io>2017-08-17 12:56:15 +0200
committerRobert Loehning <robert.loehning@qt.io>2017-08-18 12:28:45 +0000
commitb9167a192f99940a30aca5d8dbb69207c90d2fc7 (patch)
treec0a0bd7ec8d995c38fe355db4bd88956c4e5690f /src/plugins/resourceeditor
parent8353d76df4238d4979953974dbc434c01c2a44fb (diff)
ProjectExplorer: Don't hide empty resource files like empty directories
Task-number: QTCREATORBUG-18748 Change-Id: I4de59743c42b99ce0b402f814b4cd0ba5d299338 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/resourceeditor')
-rw-r--r--src/plugins/resourceeditor/resourcenode.cpp5
-rw-r--r--src/plugins/resourceeditor/resourcenode.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/resourceeditor/resourcenode.cpp b/src/plugins/resourceeditor/resourcenode.cpp
index cb7b5be887..fe0ec8e789 100644
--- a/src/plugins/resourceeditor/resourcenode.cpp
+++ b/src/plugins/resourceeditor/resourcenode.cpp
@@ -492,6 +492,11 @@ bool ResourceTopLevelNode::showInSimpleTree() const
return true;
}
+bool ResourceTopLevelNode::showWhenEmpty() const
+{
+ return true;
+}
+
ResourceFolderNode::ResourceFolderNode(const QString &prefix, const QString &lang, ResourceTopLevelNode *parent)
: FolderNode(FileName(parent->filePath()).appendPath(prefix)),
// TOOD Why add existing directory doesn't work
diff --git a/src/plugins/resourceeditor/resourcenode.h b/src/plugins/resourceeditor/resourcenode.h
index e2f84e005a..f9b9e65c37 100644
--- a/src/plugins/resourceeditor/resourcenode.h
+++ b/src/plugins/resourceeditor/resourcenode.h
@@ -51,6 +51,7 @@ public:
AddNewInformation addNewInformation(const QStringList &files, Node *context) const override;
bool showInSimpleTree() const override;
+ bool showWhenEmpty() const override;
bool removeNonExistingFiles();
QString contents() const { return m_contents; }