aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/resourceeditor
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2017-05-15 15:31:55 +0200
committerEike Ziller <eike.ziller@qt.io>2017-05-15 15:31:55 +0200
commit64b19af7dd28f6c02588c977af9ce10441b28a3f (patch)
treeb78685ec58c633b652fa8f493e225152c2afd170 /src/plugins/resourceeditor
parent36c8227cafb58a97b28aadb12c14218337da9c64 (diff)
parent02d2b36ce7fcba99829c28325b803e07bb8b14b2 (diff)
Merge remote-tracking branch 'origin/4.3'
Conflicts: qbs/modules/qtc/qtc.qbs qtcreator.pri Change-Id: I6d89ea588de955f5d878500b59285d3adde6c77d
Diffstat (limited to 'src/plugins/resourceeditor')
-rw-r--r--src/plugins/resourceeditor/resourceeditorplugin.cpp1
-rw-r--r--src/plugins/resourceeditor/resourcenode.cpp5
2 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/resourceeditor/resourceeditorplugin.cpp b/src/plugins/resourceeditor/resourceeditorplugin.cpp
index 42a59226b7..75cce17542 100644
--- a/src/plugins/resourceeditor/resourceeditorplugin.cpp
+++ b/src/plugins/resourceeditor/resourceeditorplugin.cpp
@@ -287,6 +287,7 @@ void ResourceEditorPlugin::removeFileContextMenu()
QTC_ASSERT(rfn, return);
QString path = rfn->filePath().toString();
FolderNode *parent = rfn->parentFolderNode();
+ QTC_ASSERT(parent, return);
if (!parent->removeFiles(QStringList() << path))
QMessageBox::warning(Core::ICore::mainWindow(),
tr("File Removal Failed"),
diff --git a/src/plugins/resourceeditor/resourcenode.cpp b/src/plugins/resourceeditor/resourcenode.cpp
index b8fbcc10cb..20f67b2eec 100644
--- a/src/plugins/resourceeditor/resourcenode.cpp
+++ b/src/plugins/resourceeditor/resourcenode.cpp
@@ -70,8 +70,9 @@ public:
{
if (type == TypePermissions)
return true;
- auto newNode = new ResourceTopLevelNode(m_node->filePath(), false, m_node->contents(),
- m_node->parentFolderNode());
+ FolderNode *parent = m_node->parentFolderNode();
+ QTC_ASSERT(parent, return false);
+ auto newNode = new ResourceTopLevelNode(m_node->filePath(), false, m_node->contents(), parent);
m_node->parentFolderNode()->replaceSubtree(m_node, newNode);
return true;
}