From 6a8d0d08cf629e0f1c3935e3ac0902cbdfb59064 Mon Sep 17 00:00:00 2001 From: "Friedrich W. H. Kossebau" Date: Mon, 26 Aug 2019 01:49:58 +0200 Subject: [PATCH] Use QLatin1String overload for QString::endsWith GIT_SILENT --- plugins/clang/codecompletion/model.cpp | 2 +- plugins/cmake/duchain/cmakeparsejob.cpp | 2 +- plugins/git/gitplugin.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/clang/codecompletion/model.cpp b/plugins/clang/codecompletion/model.cpp index 58df29f118..73a4fa0532 100644 --- a/plugins/clang/codecompletion/model.cpp +++ b/plugins/clang/codecompletion/model.cpp @@ -203,7 +203,7 @@ bool ClangCodeCompletionModel::shouldStartCompletion(KTextEditor::View* view, co if (userInsertion && lastChar == QLatin1Char('-') && includePathCompletionRequired(view->document()->line(position.line()))) { return true; } - if (userInsertion && inserted.endsWith(QStringLiteral("::"))) { + if (userInsertion && inserted.endsWith(QLatin1String("::"))) { return true; } diff --git a/plugins/cmake/duchain/cmakeparsejob.cpp b/plugins/cmake/duchain/cmakeparsejob.cpp index 9a703fc84d..42b11aa068 100644 --- a/plugins/cmake/duchain/cmakeparsejob.cpp +++ b/plugins/cmake/duchain/cmakeparsejob.cpp @@ -63,7 +63,7 @@ void CMakeParseJob::run(ThreadWeaver::JobPointer /*self*/, ThreadWeaver::Thread* } ReferencedTopDUContext parentCtx; - if (document().str().endsWith(QStringLiteral("CMakeLists.txt"))) { + if (document().str().endsWith(QLatin1String("CMakeLists.txt"))) { IndexedString parentFile = parentCMakeFile(document()); if (QFile::exists(parentFile.toUrl().toLocalFile())) { diff --git a/plugins/git/gitplugin.cpp b/plugins/git/gitplugin.cpp index c35637df41..e3cef6e07d 100644 --- a/plugins/git/gitplugin.cpp +++ b/plugins/git/gitplugin.cpp @@ -1515,7 +1515,7 @@ void GitPlugin::registerRepositoryForCurrentBranchChanges(const QUrl& repository void GitPlugin::fileChanged(const QString& file) { - Q_ASSERT(file.endsWith(QStringLiteral("HEAD"))); + Q_ASSERT(file.endsWith(QLatin1String("HEAD"))); //SMTH/.git/HEAD -> SMTH/ const QUrl fileUrl = Path(file).parent().parent().toUrl(); -- GitLab