summaryrefslogtreecommitdiff
path: root/src/plugins/git/branchmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/git/branchmodel.cpp')
-rw-r--r--src/plugins/git/branchmodel.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/plugins/git/branchmodel.cpp b/src/plugins/git/branchmodel.cpp
index b33b4ab277..c262f07c0b 100644
--- a/src/plugins/git/branchmodel.cpp
+++ b/src/plugins/git/branchmodel.cpp
@@ -2,8 +2,10 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
#include "branchmodel.h"
+
#include "gitclient.h"
#include "gitconstants.h"
+#include "gittr.h"
#include <vcsbase/vcscommand.h>
#include <vcsbase/vcsoutputwindow.h>
@@ -22,8 +24,7 @@
using namespace Utils;
using namespace VcsBase;
-namespace Git {
-namespace Internal {
+namespace Git::Internal {
enum RootNodes {
LocalBranches = 0,
@@ -254,8 +255,8 @@ BranchModel::BranchModel(GitClient *client, QObject *parent) :
QTC_CHECK(d->client);
// Abuse the sha field for ref prefix
- d->rootNode->append(new BranchNode(tr("Local Branches"), "refs/heads"));
- d->rootNode->append(new BranchNode(tr("Remote Branches"), "refs/remotes"));
+ d->rootNode->append(new BranchNode(Tr::tr("Local Branches"), "refs/heads"));
+ d->rootNode->append(new BranchNode(Tr::tr("Remote Branches"), "refs/remotes"));
connect(&d->fsWatcher, &Utils::FileSystemWatcher::fileChanged, this, [this] {
QString errorMessage;
refresh(d->workingDirectory, &errorMessage);
@@ -440,7 +441,7 @@ bool BranchModel::refresh(const FilePath &workingDirectory, QString *errorMessag
}
if (!d->currentBranch) {
BranchNode *local = d->rootNode->children.at(LocalBranches);
- d->currentBranch = d->headNode = new BranchNode(tr("Detached HEAD"), "HEAD", QString(),
+ d->currentBranch = d->headNode = new BranchNode(Tr::tr("Detached HEAD"), "HEAD", QString(),
d->currentDateTime);
local->prepend(d->headNode);
}
@@ -796,7 +797,7 @@ void BranchModel::Private::parseOutputLine(const QString &line, bool force)
oldEntriesRoot = root->append(new BranchNode(remoteName));
} else if (showTags && nameParts.first() == "tags") {
if (!hasTags()) // Tags is missing, add it
- rootNode->append(new BranchNode(tr("Tags"), "refs/tags"));
+ rootNode->append(new BranchNode(Tr::tr("Tags"), "refs/tags"));
rootType = Tags;
} else {
return;
@@ -925,6 +926,4 @@ QString BranchModel::toolTip(const QString &sha) const
return output;
}
-} // namespace Internal
-} // namespace Git
-
+} // Git::Internal