summaryrefslogtreecommitdiff
path: root/src/plugins/bazaar
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2015-02-25 14:36:03 +0200
committerOrgad Shaneh <orgads@gmail.com>2015-02-26 14:56:25 +0000
commitaee35662a2b2b65ba31797a970edaf9bcd0fb05b (patch)
tree9aeb21e92f9b95694c135c0e188fc9d8a05110cd /src/plugins/bazaar
parent991cf8499106e1e6a35efd35bcd62cfb2387552c (diff)
downloadqt-creator-aee35662a2b2b65ba31797a970edaf9bcd0fb05b.tar.gz
Prefix duplicate names in Open Documents to make them unique
If a document has a file name associated with it then the prefix is composed from path components (subdirectories), starting from the one where the file is located and going up the parents until the resulting name becomes unique among other open documents. If a document doesn't have an associated file name, then a sequential number (starting from 1) is appended to the display name of the document. This feature is useful when working with big projects that have lots of idendical file names across different subdirectories (e.g. Makefile.in, main.cpp, etc.) that need to be edited at the same time. It allows to easily recognize such a file when switching between documents in the editor, w/o the need to place the mouse pointer over the name entry to get its full path. Started-by: Dmitriy Kuminov <coding@dmik.org> Task-number: QTCREATORBUG-10185 Change-Id: I633ea6d9b9b4fce8b67335dbcce1bda29254efde Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Diffstat (limited to 'src/plugins/bazaar')
-rw-r--r--src/plugins/bazaar/bazaarplugin.cpp2
-rw-r--r--src/plugins/bazaar/commiteditor.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/bazaar/bazaarplugin.cpp b/src/plugins/bazaar/bazaarplugin.cpp
index 7e7d5dac57..9729f00d97 100644
--- a/src/plugins/bazaar/bazaarplugin.cpp
+++ b/src/plugins/bazaar/bazaarplugin.cpp
@@ -601,7 +601,7 @@ void BazaarPlugin::showCommitWidget(const QList<VcsBaseClient::StatusItem> &stat
const QString msg = tr("Commit changes for \"%1\".").
arg(QDir::toNativeSeparators(m_submitRepository));
- commitEditor->document()->setDisplayName(msg);
+ commitEditor->document()->setPreferredDisplayName(msg);
const BranchInfo branch = m_client->synchronousBranchQuery(m_submitRepository);
commitEditor->setFields(m_submitRepository, branch,
diff --git a/src/plugins/bazaar/commiteditor.cpp b/src/plugins/bazaar/commiteditor.cpp
index 885bb6d38a..332f753949 100644
--- a/src/plugins/bazaar/commiteditor.cpp
+++ b/src/plugins/bazaar/commiteditor.cpp
@@ -42,7 +42,7 @@ CommitEditor::CommitEditor(const VcsBase::VcsBaseSubmitEditorParameters *paramet
: VcsBase::VcsBaseSubmitEditor(parameters, new BazaarCommitWidget),
m_fileModel(0)
{
- document()->setDisplayName(tr("Commit Editor"));
+ document()->setPreferredDisplayName(tr("Commit Editor"));
}
BazaarCommitWidget *CommitEditor::commitWidget()