Commit 32217a0c authored by Orgad Shaneh's avatar Orgad Shaneh Committed by hjk

Git: Move static strings out of GitClient class

They're only used in gitclient.cpp, define them there

Change-Id: I601f23a6f2a8e533127d2ed068526815e1b9717d
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent abc6e351
......@@ -76,7 +76,8 @@
static const char GIT_DIRECTORY[] = ".git";
static const char graphLogFormatC[] = "%h %d %an %s %ci";
static const char HEAD[] = "HEAD";
static const char noColorOption[] = "--no-color";
static const char decorateOption[] = "--decorate";
namespace Git {
namespace Internal {
......@@ -791,9 +792,6 @@ GitClient::~GitClient()
{
}
const char *GitClient::noColorOption = "--no-color";
const char *GitClient::decorateOption = "--decorate";
QString GitClient::findRepositoryForDirectory(const QString &dir)
{
if (dir.isEmpty() || dir.endsWith(QLatin1String("/.git"))
......@@ -1308,7 +1306,7 @@ bool GitClient::synchronousLog(const QString &workingDirectory, const QStringLis
QByteArray outputText;
QByteArray errorText;
QStringList allArguments;
allArguments << QLatin1String("log") << QLatin1String(GitClient::noColorOption);
allArguments << QLatin1String("log") << QLatin1String(noColorOption);
allArguments.append(arguments);
const bool rc = fullySynchronousGit(workingDirectory, allArguments, &outputText, &errorText);
if (rc) {
......@@ -1786,7 +1784,7 @@ QString GitClient::synchronousShortDescription(const QString &workingDirectory,
QByteArray outputTextData;
QByteArray errorText;
QStringList arguments;
arguments << QLatin1String("log") << QLatin1String(GitClient::noColorOption)
arguments << QLatin1String("log") << QLatin1String(noColorOption)
<< (QLatin1String("--pretty=format:") + format)
<< QLatin1String("--max-count=1") << revision;
const bool rc = fullySynchronousGit(workingDirectory, arguments, &outputTextData, &errorText);
......
......@@ -313,9 +313,6 @@ public:
static QString msgNoChangedFiles();
static QString msgNoCommits(bool includeRemote);
static const char *noColorOption;
static const char *decorateOption;
public slots:
void show(const QString &source, const QString &id,
const QStringList &args = QStringList(), const QString &name = QString());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment