From fd2236a59a35a0219a49b63b1728281af961ac5c Mon Sep 17 00:00:00 2001 From: hjk Date: Mon, 22 Jun 2020 09:16:14 +0200 Subject: [PATCH] More Qt 6 fixes Task-number: QTCREATORBUG-24098 Change-Id: I1e30b49218b18f426aea6e4cd3680be513894746 Reviewed-by: Eike Ziller --- src/plugins/fakevim/fakevimhandler.cpp | 4 ++-- src/plugins/projectexplorer/editorconfiguration.h | 6 +++--- src/plugins/projectexplorer/projectexplorer.cpp | 6 +++--- src/plugins/texteditor/colorpreviewhoverhandler.cpp | 2 +- src/plugins/texteditor/highlightersettingspage.cpp | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/plugins/fakevim/fakevimhandler.cpp b/src/plugins/fakevim/fakevimhandler.cpp index f48f0e09872..66ebe44a461 100644 --- a/src/plugins/fakevim/fakevimhandler.cpp +++ b/src/plugins/fakevim/fakevimhandler.cpp @@ -7234,8 +7234,8 @@ void FakeVimHandler::Private::invertCase(const Range &range) [] (const QString &text) -> QString { QString result = text; for (int i = 0; i < result.length(); ++i) { - QCharRef c = result[i]; - c = c.isUpper() ? c.toLower() : c.toUpper(); + const QChar c = result[i]; + result[i] = c.isUpper() ? c.toLower() : c.toUpper(); } return result; }); diff --git a/src/plugins/projectexplorer/editorconfiguration.h b/src/plugins/projectexplorer/editorconfiguration.h index af9402a77b6..59f7c4733d1 100644 --- a/src/plugins/projectexplorer/editorconfiguration.h +++ b/src/plugins/projectexplorer/editorconfiguration.h @@ -34,9 +34,9 @@ #include -namespace Core { -class IEditor; -} +QT_BEGIN_NAMESPACE +class QTextCodec; +QT_END_NAMESPACE namespace TextEditor { class BaseTextEditor; diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index c873fa80144..3bc5ce49e12 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -147,17 +147,17 @@ #include #include -#include -#include - #include +#include #include #include #include +#include #include #include #include #include +#include #include #include diff --git a/src/plugins/texteditor/colorpreviewhoverhandler.cpp b/src/plugins/texteditor/colorpreviewhoverhandler.cpp index ea8b1d0dd4c..f23ee0a4bf8 100644 --- a/src/plugins/texteditor/colorpreviewhoverhandler.cpp +++ b/src/plugins/texteditor/colorpreviewhoverhandler.cpp @@ -222,7 +222,7 @@ static bool extractFuncAndArgs(const QString &s, retFuncName = removeWhitespace(s.mid(funcStart, funcEnd - funcStart + 1)); QString argStr = s.mid(openBrace + 1, closeBrace - openBrace - 1); - retArgs = argStr.split(QLatin1Char(','), QString::KeepEmptyParts); + retArgs = argStr.split(','); return true; } diff --git a/src/plugins/texteditor/highlightersettingspage.cpp b/src/plugins/texteditor/highlightersettingspage.cpp index 7180e1dc14d..0b2cf4447e1 100644 --- a/src/plugins/texteditor/highlightersettingspage.cpp +++ b/src/plugins/texteditor/highlightersettingspage.cpp @@ -64,8 +64,8 @@ void HighlighterSettingsPage::HighlighterSettingsPagePrivate::migrateGenericHigh QDir userDefinitionPath(m_settings.definitionFilesPath()); if (userDefinitionPath.mkdir("syntax")) { const auto link = Utils::HostOsInfo::isAnyUnixHost() - ? QOverload::of(&QFile::link) - : QOverload::of(&QFile::copy); + ? static_cast(&QFile::link) + : static_cast(&QFile::copy); for (const QFileInfo &file : userDefinitionPath.entryInfoList({"*.xml"}, QDir::Files)) link(file.filePath(), file.absolutePath() + "/syntax/" + file.fileName());