aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/git/gitsubmiteditorwidget.cpp
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2016-07-21 00:28:18 +0300
committerOrgad Shaneh <orgads@gmail.com>2016-07-22 10:12:59 +0000
commit516161c875bb059b1b3db534e6575c88050b31b1 (patch)
tree35bb8313626484183bf0407f36f471caaf577883 /src/plugins/git/gitsubmiteditorwidget.cpp
parent539e33da0289dcb66f71734ba2ac06f6ec910819 (diff)
Git: De-noise
* Remove QLatin1{String|Char} where possible * Use initializer lists for QStringList Change-Id: I8479f87f4fc909b5d74d854956885564209538e4 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src/plugins/git/gitsubmiteditorwidget.cpp')
-rw-r--r--src/plugins/git/gitsubmiteditorwidget.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/git/gitsubmiteditorwidget.cpp b/src/plugins/git/gitsubmiteditorwidget.cpp
index 6a7fab23be..196903e342 100644
--- a/src/plugins/git/gitsubmiteditorwidget.cpp
+++ b/src/plugins/git/gitsubmiteditorwidget.cpp
@@ -51,7 +51,7 @@ GitSubmitEditorWidget::GitSubmitEditorWidget() :
m_gitSubmitPanelUi.setupUi(m_gitSubmitPanel);
new GitSubmitHighlighter(descriptionEdit());
- m_emailValidator = new QRegExpValidator(QRegExp(QLatin1String("[^@ ]+@[^@ ]+\\.[a-zA-Z]+")), this);
+ m_emailValidator = new QRegExpValidator(QRegExp("[^@ ]+@[^@ ]+\\.[a-zA-Z]+"), this);
const QPixmap error = Core::Icons::ERROR.pixmap();
m_gitSubmitPanelUi.invalidAuthorLabel->setPixmap(error);
m_gitSubmitPanelUi.invalidEmailLabel->setToolTip(tr("Provide a valid email to commit."));
@@ -66,7 +66,7 @@ GitSubmitEditorWidget::GitSubmitEditorWidget() :
void GitSubmitEditorWidget::setPanelInfo(const GitSubmitEditorPanelInfo &info)
{
m_gitSubmitPanelUi.repositoryLabel->setText(QDir::toNativeSeparators(info.repository));
- if (info.branch.contains(QLatin1String("(no branch)")))
+ if (info.branch.contains("(no branch)"))
m_gitSubmitPanelUi.branchLabel->setText(QString::fromLatin1("<span style=\"color:red\">%1</span>")
.arg(tr("Detached HEAD")));
else
@@ -163,8 +163,8 @@ QString GitSubmitEditorWidget::cleanupDescription(const QString &input) const
{
// We need to manually purge out comment lines starting with
// hash '#' since git does not do that when using -F.
- const QChar newLine = QLatin1Char('\n');
- const QChar hash = QLatin1Char('#');
+ const QChar newLine = '\n';
+ const QChar hash = '#';
QString message = input;
for (int pos = 0; pos < message.size(); ) {
const int newLinePos = message.indexOf(newLine, pos);