aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/resourceeditor
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2017-05-09 15:07:30 +0200
committerEike Ziller <eike.ziller@qt.io>2017-05-09 15:07:30 +0200
commit6e8ee7479e7fda2c79c50f1ffea5d7bda36f96d0 (patch)
treec62a96b84f7b6af02faa3eca7d603a8aa96944ea /src/plugins/resourceeditor
parentd571e8d442e862f3e89825f5d3eb02fae94dd9ec (diff)
parent3282f85f3db743aa96e4d3410e4737284a9b566c (diff)
Merge remote-tracking branch 'origin/4.3'
Conflicts: src/plugins/debugger/cdb/cdbengine.cpp Change-Id: Ib9aeccc4162c43e9ee3d85847d96678045625dd0
Diffstat (limited to 'src/plugins/resourceeditor')
-rw-r--r--src/plugins/resourceeditor/resourceeditorplugin.cpp3
-rw-r--r--src/plugins/resourceeditor/resourcenode.cpp7
-rw-r--r--src/plugins/resourceeditor/resourcenode.h3
3 files changed, 8 insertions, 5 deletions
diff --git a/src/plugins/resourceeditor/resourceeditorplugin.cpp b/src/plugins/resourceeditor/resourceeditorplugin.cpp
index 1ae83161ca..42a59226b7 100644
--- a/src/plugins/resourceeditor/resourceeditorplugin.cpp
+++ b/src/plugins/resourceeditor/resourceeditorplugin.cpp
@@ -222,7 +222,8 @@ void ResourceEditorPlugin::extensionsInitialized()
FolderNode *const pn = file->parentFolderNode();
QTC_ASSERT(pn, continue);
const Utils::FileName path = file->filePath();
- pn->replaceSubtree(file, new ResourceTopLevelNode(path, QString(), pn));
+ pn->replaceSubtree(file, new ResourceTopLevelNode(path, file->isGenerated(),
+ QString(), pn));
}
});
}
diff --git a/src/plugins/resourceeditor/resourcenode.cpp b/src/plugins/resourceeditor/resourcenode.cpp
index cdf418ec43..b8fbcc10cb 100644
--- a/src/plugins/resourceeditor/resourcenode.cpp
+++ b/src/plugins/resourceeditor/resourcenode.cpp
@@ -70,7 +70,7 @@ public:
{
if (type == TypePermissions)
return true;
- auto newNode = new ResourceTopLevelNode(m_node->filePath(), m_node->contents(),
+ auto newNode = new ResourceTopLevelNode(m_node->filePath(), false, m_node->contents(),
m_node->parentFolderNode());
m_node->parentFolderNode()->replaceSubtree(m_node, newNode);
return true;
@@ -263,10 +263,11 @@ bool SimpleResourceFolderNode::renameFile(const QString &filePath, const QString
} // Internal
-ResourceTopLevelNode::ResourceTopLevelNode(const FileName &filePath, const QString &contents,
- FolderNode *parent)
+ResourceTopLevelNode::ResourceTopLevelNode(const FileName &filePath, bool generated,
+ const QString &contents, FolderNode *parent)
: FolderNode(filePath)
{
+ setIsGenerated(generated);
setIcon(FileIconProvider::icon(filePath.toString()));
if (contents.isEmpty()) {
m_document = new ResourceFileWatcher(this);
diff --git a/src/plugins/resourceeditor/resourcenode.h b/src/plugins/resourceeditor/resourcenode.h
index 0d6b7a1b64..f1377eaa14 100644
--- a/src/plugins/resourceeditor/resourcenode.h
+++ b/src/plugins/resourceeditor/resourcenode.h
@@ -34,7 +34,8 @@ namespace Internal { class ResourceFileWatcher; }
class RESOURCE_EXPORT ResourceTopLevelNode : public ProjectExplorer::FolderNode
{
public:
- ResourceTopLevelNode(const Utils::FileName &filePath, const QString &contents, FolderNode *parent);
+ ResourceTopLevelNode(const Utils::FileName &filePath, bool generated,
+ const QString &contents, FolderNode *parent);
~ResourceTopLevelNode() override;
void addInternalNodes();