diff --git a/kdevplatform/language/duchain/navigation/problemnavigationcontext.cpp b/kdevplatform/language/duchain/navigation/problemnavigationcontext.cpp index 1e5772f3fc33f786154dc10aef7d6db3e712690e..c505b2993fb4fde18f0cf4f92987d90ba7862400 100644 --- a/kdevplatform/language/duchain/navigation/problemnavigationcontext.cpp +++ b/kdevplatform/language/duchain/navigation/problemnavigationcontext.cpp @@ -106,8 +106,8 @@ QString ProblemNavigationContext::name() const QString ProblemNavigationContext::escapedHtml(const QString& text) const { - static const QString htmlStart = QStringLiteral(""); - static const QString htmlEnd = QStringLiteral(""); + const QString htmlStart = QStringLiteral(""); + const QString htmlEnd = QStringLiteral(""); QString result = text.trimmed(); diff --git a/plugins/clang/codecompletion/model.cpp b/plugins/clang/codecompletion/model.cpp index 73a4fa05321c37d9ccc2618200c0bcd67c744d58..616ec284b72d68326273c538796bb259797e91e5 100644 --- a/plugins/clang/codecompletion/model.cpp +++ b/plugins/clang/codecompletion/model.cpp @@ -186,7 +186,7 @@ ClangCodeCompletionModel::~ClangCodeCompletionModel() bool ClangCodeCompletionModel::shouldStartCompletion(KTextEditor::View* view, const QString& inserted, bool userInsertion, const KTextEditor::Cursor& position) { - static const QString noCompletionAfter = QStringLiteral(";{}]) "); + const QString noCompletionAfter = QStringLiteral(";{}]) "); if (inserted.isEmpty() || isSpaceOnly(inserted)) { return false; diff --git a/plugins/cmake/cmakecodecompletionmodel.cpp b/plugins/cmake/cmakecodecompletionmodel.cpp index 53ceb0b8f29615ed3f26c3d8b344c66da96cbeb6..29d25486f2d506d0967f9a1d18957c15ec2612d6 100644 --- a/plugins/cmake/cmakecodecompletionmodel.cpp +++ b/plugins/cmake/cmakecodecompletionmodel.cpp @@ -62,7 +62,7 @@ bool isPathChar(QChar c) QString escapePath(QString path) { // see https://cmake.org/Wiki/CMake/Language_Syntax#Escapes - static const QString toBeEscaped = QStringLiteral("\"()#$^"); + const QString toBeEscaped = QStringLiteral("\"()#$^"); for(const QChar &ch : toBeEscaped) { path.replace(ch, QLatin1Char('\\') + ch); diff --git a/plugins/cmake/cmakeimportjsonjob.cpp b/plugins/cmake/cmakeimportjsonjob.cpp index bd7f66172b4e4b2dcb5281092108a55f881a4ce6..67ceb4cd7ff202d0ec9747357c944e94e20ba09d 100644 --- a/plugins/cmake/cmakeimportjsonjob.cpp +++ b/plugins/cmake/cmakeimportjsonjob.cpp @@ -71,9 +71,9 @@ CMakeFilesCompilationData importCommands(const Path& commandsFile) } MakeFileResolver resolver; - static const QString KEY_COMMAND = QStringLiteral("command"); - static const QString KEY_DIRECTORY = QStringLiteral("directory"); - static const QString KEY_FILE = QStringLiteral("file"); + const QString KEY_COMMAND = QStringLiteral("command"); + const QString KEY_DIRECTORY = QStringLiteral("directory"); + const QString KEY_FILE = QStringLiteral("file"); auto rt = ICore::self()->runtimeController()->currentRuntime(); const auto values = document.array(); for (const QJsonValue& value : values) { diff --git a/plugins/git/gitplugin.cpp b/plugins/git/gitplugin.cpp index e3cef6e07dcdf53a9ef57fe4f30b53c0a95a46a2..d2b027440e25f5c5ea452b5295ae71d5a25f4ced 100644 --- a/plugins/git/gitplugin.cpp +++ b/plugins/git/gitplugin.cpp @@ -82,7 +82,7 @@ QDir dotGitDirectory(const QUrl& dirPath) const QFileInfo finfo(dirPath.toLocalFile()); QDir dir = finfo.isDir() ? QDir(finfo.filePath()): finfo.absoluteDir(); - static const QString gitDir = QStringLiteral(".git"); + const QString gitDir = QStringLiteral(".git"); while (!dir.exists(gitDir) && dir.cdUp()) {} // cdUp, until there is a sub-directory called .git if (dir.isRoot()) { diff --git a/plugins/perforce/perforceplugin.cpp b/plugins/perforce/perforceplugin.cpp index 1e5a169dfe10f736df4546eaf1f431bf334a7bc1..69303584bda545d1fa2586167423a94530bea043 100644 --- a/plugins/perforce/perforceplugin.cpp +++ b/plugins/perforce/perforceplugin.cpp @@ -188,7 +188,7 @@ bool PerforcePlugin::parseP4fstat(const QFileInfo& curFile, OutputJob::OutputJob QString PerforcePlugin::getRepositoryName(const QFileInfo& curFile) { - static const QString DEPOT_FILE_STR(QStringLiteral("... depotFile ")); + const QString DEPOT_FILE_STR(QStringLiteral("... depotFile ")); QString ret; QScopedPointer job(p4fstatJob(curFile, KDevelop::OutputJob::Silent)); if (job->exec() && job->status() == KDevelop::VcsJob::JobSucceeded) { @@ -500,8 +500,8 @@ void PerforcePlugin::setEnvironmentForJob(DVcsJob* job, const QFileInfo& curFile QList PerforcePlugin::getQvariantFromLogOutput(QStringList const& outputLines) { - static const QString LOGENTRY_START(QStringLiteral("... #")); - static const QString DEPOTMESSAGE_START(QStringLiteral("... .")); + const QString LOGENTRY_START(QStringLiteral("... #")); + const QString DEPOTMESSAGE_START(QStringLiteral("... .")); QMap changes; QList commits; QString currentFileName; @@ -553,8 +553,8 @@ void PerforcePlugin::parseP4StatusOutput(DVcsJob* job) { const QStringList outputLines = job->output().split('\n', QString::SkipEmptyParts); QVariantList statuses; - static const QString ACTION_STR(QStringLiteral("... action ")); - static const QString CLIENT_FILE_STR(QStringLiteral("... clientFile ")); + const QString ACTION_STR(QStringLiteral("... action ")); + const QString CLIENT_FILE_STR(QStringLiteral("... clientFile ")); diff --git a/plugins/problemreporter/problemsview.cpp b/plugins/problemreporter/problemsview.cpp index abd6bdc466bd82f4ff40662dc5b9e34c5d187798..925d23fa553cb5b1b96e4de27afbc0f834d262ec 100644 --- a/plugins/problemreporter/problemsview.cpp +++ b/plugins/problemreporter/problemsview.cpp @@ -392,7 +392,7 @@ void ProblemsView::addModel(const ModelData& newData) // // 2) Other tabs are alphabetically ordered. - static const QString parserId = QStringLiteral("Parser"); + const QString parserId = QStringLiteral("Parser"); auto model = newData.model; auto view = new ProblemTreeView(nullptr, model); diff --git a/plugins/projectmanagerview/vcsoverlayproxymodel.cpp b/plugins/projectmanagerview/vcsoverlayproxymodel.cpp index 8d7b8539f7503031e3535b3bb8b822800a6db728..95f8c7d9c788581bd523c496edf585f863a97d56 100644 --- a/plugins/projectmanagerview/vcsoverlayproxymodel.cpp +++ b/plugins/projectmanagerview/vcsoverlayproxymodel.cpp @@ -116,7 +116,7 @@ void VcsOverlayProxyModel::repositoryBranchChanged(const QUrl& url) void VcsOverlayProxyModel::branchNameReady(KDevelop::VcsJob* job) { - static const QString noBranchStr = i18nc("Version control: Currently not on a branch", "(no branch)"); + const QString noBranchStr = i18nc("Version control: Currently not on a branch", "(no branch)"); if(job->status()==VcsJob::JobSucceeded) { SafeProjectPointer p = job->property("project").value();