diff options
author | Oswald Buddenhagen <oswald.buddenhagen@digia.com> | 2014-03-18 14:46:29 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@digia.com> | 2014-03-18 14:46:29 +0100 |
commit | 868428cc634f0e2c6d5ace84555675cb80363d3f (patch) | |
tree | 98d321520f31107067ca45e5b5806d92551b2f3d /src/plugins/resourceeditor/resourcenode.cpp | |
parent | 0d303db8c2e79c772cd216bfc07b42637c37e1bd (diff) | |
parent | 93184f7959bd18ba6f77e8d8b312f0e3be95d70c (diff) | |
download | qt-creator-868428cc634f0e2c6d5ace84555675cb80363d3f.tar.gz |
Merge remote-tracking branch 'origin/3.1'
Conflicts:
qbs/imports/QtcTool.qbs
src/plugins/git/giteditor.cpp
src/plugins/qmldesigner/qmldesignerplugin.cpp
Change-Id: Icafd32f713effb1479480a0d1f61a01e429fbec0
Diffstat (limited to 'src/plugins/resourceeditor/resourcenode.cpp')
-rw-r--r-- | src/plugins/resourceeditor/resourcenode.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/plugins/resourceeditor/resourcenode.cpp b/src/plugins/resourceeditor/resourcenode.cpp index e01090a93a..7a95719efe 100644 --- a/src/plugins/resourceeditor/resourcenode.cpp +++ b/src/plugins/resourceeditor/resourcenode.cpp @@ -48,7 +48,7 @@ using namespace ResourceEditor::Internal; static bool priority(const QStringList &files) { if (files.isEmpty()) - return -1; + return false; Core::MimeType mt = Core::MimeDatabase::findByFile(files.at(0)); QString type = mt.type(); if (type.startsWith(QLatin1String("image/")) @@ -219,8 +219,6 @@ bool ResourceTopLevelNode::addPrefix(const QString &prefix, const QString &lang) file.save(); Core::DocumentManager::unexpectFileChange(path()); - update(); - return true; } @@ -236,8 +234,6 @@ bool ResourceTopLevelNode::removePrefix(const QString &prefix, const QString &la Core::DocumentManager::expectFileChange(path()); file.save(); Core::DocumentManager::unexpectFileChange(path()); - - update(); return true; } } @@ -261,6 +257,11 @@ ProjectExplorer::FolderNode::AddNewInformation ResourceTopLevelNode::addNewInfor return AddNewInformation(name, p); } +bool ResourceTopLevelNode::showInSimpleTree() const +{ + return true; +} + ResourceFolderNode::ResourceFolderNode(const QString &prefix, const QString &lang, ResourceTopLevelNode *parent) : ProjectExplorer::FolderNode(parent->path() + QLatin1Char('/') + prefix), // TOOD Why add existing directory doesn't work @@ -353,7 +354,7 @@ bool ResourceFolderNode::renamePrefix(const QString &prefix, const QString &lang ResourceFile file(m_topLevelNode->path()); if (!file.load()) return false; - int index = file.indexOfPrefix(prefix, lang); + int index = file.indexOfPrefix(m_prefix, m_lang); if (index == -1) return false; |