summaryrefslogtreecommitdiff
path: root/src/plugins/git/gitclient.cpp
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2022-05-12 13:53:56 +0300
committerOrgad Shaneh <orgads@gmail.com>2022-05-12 12:41:11 +0000
commit086b47afeedf349ca75e4355efa2513643bef54f (patch)
tree11c0a726ba88d89758b13a70876a7be48fe18245 /src/plugins/git/gitclient.cpp
parent51be3be2eadb3a8001c192a40f6076ea233117f3 (diff)
downloadqt-creator-086b47afeedf349ca75e4355efa2513643bef54f.tar.gz
Git: Fix compilation with Qt5
Change-Id: Ib35095ccdacd13eaf2f599c9b47f7934c5d02591 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src/plugins/git/gitclient.cpp')
-rw-r--r--src/plugins/git/gitclient.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp
index b16af4d84b..5308b8c344 100644
--- a/src/plugins/git/gitclient.cpp
+++ b/src/plugins/git/gitclient.cpp
@@ -85,6 +85,8 @@
#include <QToolButton>
#include <QTextCodec>
+#include <vector>
+
const char GIT_DIRECTORY[] = ".git";
const char HEAD[] = "HEAD";
const char CHERRY_PICK_HEAD[] = "CHERRY_PICK_HEAD";
@@ -482,7 +484,7 @@ private:
QString m_header;
QString m_body;
QString m_precedes;
- QStringList m_follows;
+ std::vector<QString> m_follows;
QList<QPointer<VcsCommand>> m_commands;
};
@@ -514,7 +516,7 @@ void ShowController::processDescription(const QString &output)
m_header = output.left(lastHeaderLine) + Constants::EXPAND_BRANCHES + '\n';
m_body = output.mid(lastHeaderLine + 1);
m_precedes = tr("<resolving>");
- m_follows.append(m_precedes);
+ m_follows.push_back(m_precedes);
updateDescription();
const QString commit = modText.mid(7, 8);
m_commands.append(m_instance->execBgCommand(
@@ -547,7 +549,11 @@ void ShowController::updateDescription()
QString desc = m_header;
if (!m_precedes.isEmpty())
desc.append("Precedes: " + m_precedes + '\n');
- QStringList follows = Utils::filtered(m_follows, &QString::size);
+ QStringList follows;
+ for (const QString &str : m_follows) {
+ if (!str.isEmpty())
+ follows.append(str);
+ }
if (!follows.isEmpty())
desc.append("Follows: " + follows.join(", ") + '\n');
desc.append('\n' + m_body);