diff options
author | hjk <hjk@qt.io> | 2021-08-10 16:19:02 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2021-08-17 05:34:10 +0000 |
commit | 7c28c4f744e11adda5fcf86270d680797b33f223 (patch) | |
tree | 04aea004daa9cc46faaea2cff1ef97c2934ee2d5 /src | |
parent | 98cba6e50c899a672000575bf060541e0b61e456 (diff) |
Utils: Introduce a FilePath constructor from char arrays
Similar to QT_RESTRICTED_CAST_FROM_ASCII to avoid the need for
decorations in user code.
At the same time, drop some convenience constructors and functions
in CommandLine and Icon essentially serving the same purpose.
Change-Id: Ida4e5ac19c2da0a4298a97b2a8e1511d56bbb79d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src')
104 files changed, 408 insertions, 439 deletions
diff --git a/src/libs/cplusplus/CppDocument.h b/src/libs/cplusplus/CppDocument.h index b386f46d54..1dfa5043b9 100644 --- a/src/libs/cplusplus/CppDocument.h +++ b/src/libs/cplusplus/CppDocument.h @@ -428,14 +428,6 @@ public: Document::Ptr preprocessedDocument(const QByteArray &source, const Utils::FilePath &fileName, int withDefinedMacrosFromDocumentUntilLine = -1) const; - Document::Ptr preprocessedDocument(const QByteArray &source, - const QString &fileName, - int withDefinedMacrosFromDocumentUntilLine = -1) const - { - return preprocessedDocument(source, - Utils::FilePath::fromString(fileName), - withDefinedMacrosFromDocumentUntilLine); - } Document::Ptr documentFromSource(const QByteArray &preprocessedDocument, const QString &fileName) const; diff --git a/src/libs/extensionsystem/pluginmanager.cpp b/src/libs/extensionsystem/pluginmanager.cpp index 0940d21c03..f2aac6b673 100644 --- a/src/libs/extensionsystem/pluginmanager.cpp +++ b/src/libs/extensionsystem/pluginmanager.cpp @@ -417,8 +417,8 @@ static QString filled(const QString &s, int min) QString PluginManager::systemInformation() { QString result; - CommandLine qtDiag(HostOsInfo::withExecutableSuffix( - QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qtdiag")); + CommandLine qtDiag(FilePath::fromString(HostOsInfo::withExecutableSuffix( + QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qtdiag"))); QtcProcess qtDiagProc; qtDiagProc.setCommand(qtDiag); qtDiagProc.runBlocking(); diff --git a/src/libs/tracing/timelinetheme.cpp b/src/libs/tracing/timelinetheme.cpp index f9c3bc12c3..13b185e6f0 100644 --- a/src/libs/tracing/timelinetheme.cpp +++ b/src/libs/tracing/timelinetheme.cpp @@ -37,6 +37,8 @@ #include <QQuickImageProvider> #include <QtQml> +using namespace Utils; + namespace Timeline { class TimelineImageIconProvider : public QQuickImageProvider @@ -59,40 +61,35 @@ public: && idElements.at(1) == QLatin1String("disabled")) ? QIcon::Disabled : QIcon::Normal; - Utils::Icon icon; - if (iconName == QLatin1String("prev")) - icon = Utils::Icons::PREV_TOOLBAR; - else if (iconName == QLatin1String("next")) - icon = Utils::Icons::NEXT_TOOLBAR; - else if (iconName == QLatin1String("zoom")) - icon = Utils::Icons::ZOOM_TOOLBAR; - else if (iconName == QLatin1String("rangeselection")) - icon = Utils::Icon({{QLatin1String(":/QtCreator/Tracing/ico_rangeselection.png"), - Utils::Theme::IconsBaseColor}}); - else if (iconName == QLatin1String("rangeselected")) - icon = Utils::Icon({{QLatin1String(":/QtCreator/Tracing/ico_rangeselected.png"), - Utils::Theme::IconsBaseColor}}); - else if (iconName == QLatin1String("selectionmode")) - icon = Utils::Icon({{QLatin1String(":/QtCreator/Tracing/ico_selectionmode.png"), - Utils::Theme::IconsBaseColor}}); - else if (iconName == QLatin1String("edit")) - icon = Utils::Icon({{QLatin1String(":/QtCreator/Tracing/ico_edit.png"), - Utils::Theme::IconsBaseColor}}); - else if (iconName == QLatin1String("lock_open")) - icon = Utils::Icons::UNLOCKED_TOOLBAR; - else if (iconName == QLatin1String("lock_closed")) - icon = Utils::Icons::LOCKED_TOOLBAR; - else if (iconName == QLatin1String("range_handle")) - icon = Utils::Icon({{QLatin1String(":/QtCreator/Tracing/range_handle.png"), - Utils::Theme::IconsBaseColor}}); - else if (iconName == QLatin1String("note")) - icon = Utils::Icons::INFO_TOOLBAR; - else if (iconName == QLatin1String("split")) - icon = Utils::Icons::SPLIT_HORIZONTAL_TOOLBAR; - else if (iconName == QLatin1String("close_split")) - icon = Utils::Icons::CLOSE_SPLIT_TOP; - else if (iconName == QLatin1String("close_window")) - icon = Utils::Icons::CLOSE_TOOLBAR; + Icon icon; + if (iconName == "prev") + icon = Icons::PREV_TOOLBAR; + else if (iconName == "next") + icon = Icons::NEXT_TOOLBAR; + else if (iconName == "zoom") + icon = Icons::ZOOM_TOOLBAR; + else if (iconName == "rangeselection") + icon = Icon({{":/QtCreator/Tracing/ico_rangeselection.png", Theme::IconsBaseColor}}); + else if (iconName == "rangeselected") + icon = Icon({{":/QtCreator/Tracing/ico_rangeselected.png", Theme::IconsBaseColor}}); + else if (iconName == "selectionmode") + icon = Icon({{":/QtCreator/Tracing/ico_selectionmode.png", Theme::IconsBaseColor}}); + else if (iconName == "edit") + icon = Icon({{":/QtCreator/Tracing/ico_edit.png", Theme::IconsBaseColor}}); + else if (iconName == "lock_open") + icon = Icons::UNLOCKED_TOOLBAR; + else if (iconName == "lock_closed") + icon = Icons::LOCKED_TOOLBAR; + else if (iconName == "range_handle") + icon = Icon({{":/QtCreator/Tracing/range_handle.png", Theme::IconsBaseColor}}); + else if (iconName == "note") + icon = Icons::INFO_TOOLBAR; + else if (iconName == "split") + icon = Icons::SPLIT_HORIZONTAL_TOOLBAR; + else if (iconName == "close_split") + icon = Icons::CLOSE_SPLIT_TOP; + else if (iconName == "close_window") + icon = Icons::CLOSE_TOOLBAR; const QSize iconSize(16, 16); const QPixmap result = icon.icon().pixmap(iconSize, iconMode); diff --git a/src/libs/utils/archive.cpp b/src/libs/utils/archive.cpp index 02be93b006..120969b124 100644 --- a/src/libs/utils/archive.cpp +++ b/src/libs/utils/archive.cpp @@ -251,13 +251,13 @@ Archive *Archive::unarchive(const FilePath &src, const FilePath &dest) QTimer::singleShot(0, archive, [archive, tool, workingDirectory] { archive->outputReceived( tr("Running %1\nin \"%2\".\n\n", "Running <cmd> in <workingdirectory>") - .arg(CommandLine(tool->executable, tool->arguments).toUserOutput(), + .arg(CommandLine(FilePath::fromString(tool->executable), tool->arguments).toUserOutput(), workingDirectory)); }); CommandLine cmd = tool->nativeWindowsArguments ? CommandLine{FilePath::fromString(tool->executable), tool->arguments[0], CommandLine::Raw} - : CommandLine{tool->executable, tool->arguments}; + : CommandLine{FilePath::fromString(tool->executable), tool->arguments}; archive->m_process->setCommand(cmd); archive->m_process->setWorkingDirectory(workingDirectory); archive->m_process->start(); diff --git a/src/libs/utils/commandline.cpp b/src/libs/utils/commandline.cpp index a62badb95c..de0128c3be 100644 --- a/src/libs/utils/commandline.cpp +++ b/src/libs/utils/commandline.cpp @@ -1418,18 +1418,10 @@ QString ProcessArgs::toString() const CommandLine::CommandLine() = default; -CommandLine::CommandLine(const QString &executable) - : m_executable(FilePath::fromString(executable)) -{} - CommandLine::CommandLine(const FilePath &executable) : m_executable(executable) {} -CommandLine::CommandLine(const QString &exe, const QStringList &args) - : CommandLine(FilePath::fromString(exe), args) -{} - CommandLine::CommandLine(const FilePath &exe, const QStringList &args) : m_executable(exe) { diff --git a/src/libs/utils/commandline.h b/src/libs/utils/commandline.h index a1831b5ce4..d287bb04bb 100644 --- a/src/libs/utils/commandline.h +++ b/src/libs/utils/commandline.h @@ -134,9 +134,7 @@ public: enum RawType { Raw }; CommandLine(); - explicit CommandLine(const QString &executable); explicit CommandLine(const FilePath &executable); - CommandLine(const QString &exe, const QStringList &args); CommandLine(const FilePath &exe, const QStringList &args); CommandLine(const FilePath &exe, const QString &unparsedArgs, RawType); diff --git a/src/libs/utils/crumblepath.cpp b/src/libs/utils/crumblepath.cpp index 378f41545b..a49e0c30ac 100644 --- a/src/libs/utils/crumblepath.cpp +++ b/src/libs/utils/crumblepath.cpp @@ -96,7 +96,7 @@ static QPixmap segmentPixmap(CrumblePathButton::SegmentType type, QStyle::State if (!QPixmapCache::find(pixmapKey, &pixmap)) { const QString maskFileName = QStringLiteral(":/utils/images/crumblepath-segment-%1%2.png") .arg(segmentName).arg(QLatin1String(hover ? "-hover" : "")); - pixmap = Icon({{maskFileName, Theme::IconsBaseColor}}).pixmap(iconMode); + pixmap = Icon({{FilePath::fromString(maskFileName), Theme::IconsBaseColor}}).pixmap(iconMode); QPixmapCache::insert(pixmapKey, pixmap); } diff --git a/src/libs/utils/filepath.cpp b/src/libs/utils/filepath.cpp index e96d331eb0..c2c4730f1e 100644 --- a/src/libs/utils/filepath.cpp +++ b/src/libs/utils/filepath.cpp @@ -825,30 +825,35 @@ FilePath FilePath::absoluteFilePath(const FilePath &tail) const /// Constructs a FilePath from \a filename /// \a filename is not checked for validity. -FilePath FilePath::fromString(const QString &filename) +FilePath FilePath::fromString(const QString &filepath) { FilePath fn; + fn.setFromString(filepath); + return fn; +} + +void FilePath::setFromString(const QString &filename) +{ if (filename.startsWith('/')) { - fn.m_data = filename; // fast track: absolute local paths + m_data = filename; // fast track: absolute local paths } else { int pos1 = filename.indexOf("://"); if (pos1 >= 0) { - fn.m_scheme = filename.left(pos1); + m_scheme = filename.left(pos1); pos1 += 3; int pos2 = filename.indexOf('/', pos1); if (pos2 == -1) { - fn.m_data = filename.mid(pos1); + m_data = filename.mid(pos1); } else { - fn.m_host = filename.mid(pos1, pos2 - pos1); - fn.m_data = filename.mid(pos2); + m_host = filename.mid(pos1, pos2 - pos1); + m_data = filename.mid(pos2); } - if (fn.m_data.startsWith("/./")) - fn.m_data = fn.m_data.mid(3); + if (m_data.startsWith("/./")) + m_data = m_data.mid(3); } else { - fn.m_data = filename; // treat everything else as local, too. + m_data = filename; // treat everything else as local, too. } } - return fn; } /// Constructs a FilePath from \a filePath. The \a defaultExtension is appended @@ -1097,7 +1102,7 @@ QString FilePath::calcRelativePath(const QString &absolutePath, const QString &a Example usage: \code - localDir = FilePath::fromString("/tmp/workingdir"); + localDir = FilePath("/tmp/workingdir"); executable = FilePath::fromUrl("docker://123/bin/ls") realDir = localDir.onDevice(executable) assert(realDir == FilePath::fromUrl("docker://123/tmp/workingdir")) @@ -1118,7 +1123,7 @@ FilePath FilePath::onDevice(const FilePath &deviceTemplate) const Example usage: \code - devicePath = FilePath::fromString("docker://123/tmp"); + devicePath = FilePath("docker://123/tmp"); newPath = devicePath.withNewPath("/bin/ls"); assert(realDir == FilePath::fromUrl("docker://123/bin/ls")) \endcode diff --git a/src/libs/utils/filepath.h b/src/libs/utils/filepath.h index 579a2dae5e..f31746ddf7 100644 --- a/src/libs/utils/filepath.h +++ b/src/libs/utils/filepath.h @@ -54,6 +54,8 @@ class QTCREATOR_UTILS_EXPORT FilePath public: FilePath(); + template <size_t N> FilePath(const char (&literal)[N]) { setFromString(literal); } + static FilePath fromString(const QString &filepath); static FilePath fromFileInfo(const QFileInfo &info); static FilePath fromStringWithExtension(const QString &filepath, const QString &defaultExtension); @@ -178,6 +180,7 @@ public: private: friend class ::tst_fileutils; static QString calcRelativePath(const QString &absolutePath, const QString &absoluteAnchorPath); + void setFromString(const QString &filepath); QString m_scheme; QString m_host; diff --git a/src/libs/utils/icon.cpp b/src/libs/utils/icon.cpp index 6d585518f1..c778923f22 100644 --- a/src/libs/utils/icon.cpp +++ b/src/libs/utils/icon.cpp @@ -163,24 +163,11 @@ Icon::Icon(std::initializer_list<IconMaskAndColor> args, Icon::IconStyleOptions { } -Icon::Icon(std::initializer_list<IconStringMaskAndColor> args, Icon::IconStyleOptions style) - : m_style(style) -{ - reserve(int(args.size())); - for (const IconStringMaskAndColor &i : args) - append({FilePath::fromString(i.first), i.second}); -} - Icon::Icon(const FilePath &imageFileName) { append({imageFileName, Theme::Color(-1)}); } -Icon::Icon(const QString &imageFileName) - : Icon(FilePath::fromString(imageFileName)) -{ -} - QIcon Icon::icon() const { if (isEmpty()) { diff --git a/src/libs/utils/icon.h b/src/libs/utils/icon.h index a0ae7fd3e3..d784ea5e5e 100644 --- a/src/libs/utils/icon.h +++ b/src/libs/utils/icon.h @@ -40,7 +40,6 @@ QT_FORWARD_DECLARE_CLASS(QString) namespace Utils { using IconMaskAndColor = QPair<FilePath, Theme::Color>; -using IconStringMaskAndColor = QPair<QString, Theme::Color>; // Returns a recolored icon with shadow and custom disabled state for a // series of grayscalemask|Theme::Color mask pairs @@ -61,9 +60,7 @@ public: Icon(); Icon(std::initializer_list<IconMaskAndColor> args, IconStyleOptions style = ToolBarStyle); - Icon(std::initializer_list<IconStringMaskAndColor> args, IconStyleOptions style = ToolBarStyle); Icon(const FilePath &imageFileName); - Icon(const QString &imageFileName); Icon(const Icon &other) = default; diff --git a/src/libs/utils/pathchooser.cpp b/src/libs/utils/pathchooser.cpp index 432ec2b1ac..b2b620a30b 100644 --- a/src/libs/utils/pathchooser.cpp +++ b/src/libs/utils/pathchooser.cpp @@ -126,7 +126,7 @@ bool BinaryVersionToolTipEventFilter::eventFilter(QObject *o, QEvent *e) const QString binary = le->text(); if (!binary.isEmpty()) { const QString version = BinaryVersionToolTipEventFilter::toolVersion( - CommandLine(QDir::cleanPath(binary), m_arguments)); + CommandLine(FilePath::fromString(QDir::cleanPath(binary)), m_arguments)); if (!version.isEmpty()) { // Concatenate tooltips. QString tooltip = "<html><head/><body>"; @@ -720,7 +720,7 @@ FancyLineEdit *PathChooser::lineEdit() const QString PathChooser::toolVersion(const QString &binary, const QStringList &arguments) { - return BinaryVersionToolTipEventFilter::toolVersion({binary, arguments}); + return BinaryVersionToolTipEventFilter::toolVersion({FilePath::fromString(binary), arguments}); } void PathChooser::installLineEditVersionToolTip(QLineEdit *le, const QStringList &arguments) diff --git a/src/libs/utils/progressindicator.cpp b/src/libs/utils/progressindicator.cpp index 7bc016f8ee..2ecfb578fe 100644 --- a/src/libs/utils/progressindicator.cpp +++ b/src/libs/utils/progressindicator.cpp @@ -73,24 +73,21 @@ Very large progress indicator that can be used to cover large parts of a UI. */ -namespace { +namespace Utils { -static QString imageFileNameForIndicatorSize(Utils::ProgressIndicatorSize size) +static FilePath imageFileNameForIndicatorSize(ProgressIndicatorSize size) { switch (size) { - case Utils::ProgressIndicatorSize::Large: - return QLatin1String(":/utils/images/progressindicator_big.png"); - case Utils::ProgressIndicatorSize::Medium: - return QLatin1String(":/utils/images/progressindicator_medium.png"); - case Utils::ProgressIndicatorSize::Small: + case ProgressIndicatorSize::Large: + return ":/utils/images/progressindicator_big.png"; + case ProgressIndicatorSize::Medium: + return ":/utils/images/progressindicator_medium.png"; + case ProgressIndicatorSize::Small: default: - return QLatin1String(":/utils/images/progressindicator_small.png"); + return ":/utils/images/progressindicator_small.png"; } } -} // namespace - -namespace Utils { /*! Constructs a progress indicator painter for the indicator \a size. diff --git a/src/libs/utils/qtcprocess.cpp b/src/libs/utils/qtcprocess.cpp index b2fa57fc6e..3f19153159 100644 --- a/src/libs/utils/qtcprocess.cpp +++ b/src/libs/utils/qtcprocess.cpp @@ -535,7 +535,7 @@ void QtcProcess::setUseCtrlCStub(bool enabled) void QtcProcess::start(const QString &cmd, const QStringList &args) { - setCommand({cmd, args}); + setCommand({FilePath::fromString(cmd), args}); start(); } diff --git a/src/libs/utils/utilsicons.cpp b/src/libs/utils/utilsicons.cpp index 6450891cc6..cb93709f6e 100644 --- a/src/libs/utils/utilsicons.cpp +++ b/src/libs/utils/utilsicons.cpp @@ -29,231 +29,231 @@ namespace Utils { namespace Icons { const Icon HOME({ - {QLatin1String(":/utils/images/home.png"), Theme::PanelTextColorDark}}, Icon::Tint); + {":/utils/images/home.png", Theme::PanelTextColorDark}}, Icon::Tint); const Icon HOME_TOOLBAR({ - {QLatin1String(":/utils/images/home.png"), Theme::IconsBaseColor}}); + {":/utils/images/home.png", Theme::IconsBaseColor}}); const Icon EDIT_CLEAR({ - {QLatin1String(":/utils/images/editclear.png"), Theme::PanelTextColorMid}}, Icon::Tint); + {":/utils/images/editclear.png", Theme::PanelTextColorMid}}, Icon::Tint); const Icon EDIT_CLEAR_TOOLBAR({ - {QLatin1String(":/utils/images/editclear.png"), Theme::IconsBaseColor}}); + {":/utils/images/editclear.png", Theme::IconsBaseColor}}); const Icon LOCKED_TOOLBAR({ - {QLatin1String(":/utils/images/locked.png"), Theme::IconsBaseColor}}); + {":/utils/images/locked.png", Theme::IconsBaseColor}}); const Icon LOCKED({ - {QLatin1String(":/utils/images/locked.png"), Theme::PanelTextColorDark}}, Icon::Tint); + {":/utils/images/locked.png", Theme::PanelTextColorDark}}, Icon::Tint); const Icon UNLOCKED_TOOLBAR({ - {QLatin1String(":/utils/images/unlocked.png"), Theme::IconsBaseColor}}); + {":/utils/images/unlocked.png", Theme::IconsBaseColor}}); const Icon UNLOCKED({ - {QLatin1String(":/utils/images/unlocked.png"), Theme::PanelTextColorDark}}, Icon::Tint); + {":/utils/images/unlocked.png", Theme::PanelTextColorDark}}, Icon::Tint); const Icon PINNED({ - {QLatin1String(":/utils/images/pinned.png"), Theme::PanelTextColorDark}}, Icon::Tint); + {":/utils/images/pinned.png", Theme::PanelTextColorDark}}, Icon::Tint); const Icon NEXT({ - {QLatin1String(":/utils/images/next.png"), Theme::IconsWarningColor}}, Icon::MenuTintedStyle); + {":/utils/images/next.png", Theme::IconsWarningColor}}, Icon::MenuTintedStyle); const Icon NEXT_TOOLBAR({ - {QLatin1String(":/utils/images/next.png"), Theme::IconsNavigationArrowsColor}}); + {":/utils/images/next.png", Theme::IconsNavigationArrowsColor}}); const Icon PREV({ - {QLatin1String(":/utils/images/prev.png"), Theme::IconsWarningColor}}, Icon::MenuTintedStyle); + {":/utils/images/prev.png", Theme::IconsWarningColor}}, Icon::MenuTintedStyle); const Icon PREV_TOOLBAR({ - {QLatin1String(":/utils/images/prev.png"), Theme::IconsNavigationArrowsColor}}); + {":/utils/images/prev.png", Theme::IconsNavigationArrowsColor}}); const Icon PROJECT({ - {QLatin1String(":/utils/images/project.png"), Theme::PanelTextColorDark}}, Icon::Tint); + {":/utils/images/project.png", Theme::PanelTextColorDark}}, Icon::Tint); const Icon ZOOM({ - {QLatin1String(":/utils/images/zoom.png"), Theme::PanelTextColorMid}}, Icon::Tint); + {":/utils/images/zoom.png", Theme::PanelTextColorMid}}, Icon::Tint); const Icon ZOOM_TOOLBAR({ - {QLatin1String(":/utils/images/zoom.png"), Theme::IconsBaseColor}}); + {":/utils/images/zoom.png", Theme::IconsBaseColor}}); const Icon ZOOMIN_TOOLBAR({ - {QLatin1String(":/utils/images/zoom.png"), Theme::IconsBaseColor}, - {QLatin1String(":/utils/images/zoomin_overlay.png"), Theme::IconsBaseColor}}); + {":/utils/images/zoom.png", Theme::IconsBaseColor}, + {":/utils/images/zoomin_overlay.png", Theme::IconsBaseColor}}); const Icon ZOOMOUT_TOOLBAR({ - {QLatin1String(":/utils/images/zoom.png"), Theme::IconsBaseColor}, - {QLatin1String(":/utils/images/zoomout_overlay.png"), Theme::IconsBaseColor}}); + {":/utils/images/zoom.png", Theme::IconsBaseColor}, + {":/utils/images/zoomout_overlay.png", Theme::IconsBaseColor}}); const Icon FITTOVIEW_TOOLBAR({ - {QLatin1String(":/utils/images/fittoview.png"), Theme::IconsBaseColor}}); + {":/utils/images/fittoview.png", Theme::IconsBaseColor}}); const Icon OK({ - {QLatin1String(":/utils/images/ok.png"), Theme::IconsRunColor}}, Icon::Tint); + {":/utils/images/ok.png", Theme::IconsRunColor}}, Icon::Tint); const Icon NOTLOADED({ - {QLatin1String(":/utils/images/notloaded.png"), Theme::IconsErrorColor}}, Icon::Tint); + {":/utils/images/notloaded.png", Theme::IconsErrorColor}}, Icon::Tint); const Icon BROKEN({ - {QLatin1String(":/utils/images/broken.png"), Theme::IconsErrorColor}}, Icon::Tint); + {":/utils/images/broken.png", Theme::IconsErrorColor}}, Icon::Tint); const Icon CRITICAL({ - {QLatin1String(":/utils/images/warningfill.png"), Theme::BackgroundColorNormal}, - {QLatin1String(":/utils/images/error.png"), Theme::IconsErrorColor}}, Icon::Tint); + {":/utils/images/warningfill.png", Theme::BackgroundColorNormal}, + {":/utils/images/error.png", Theme::IconsErrorColor}}, Icon::Tint); const Icon BOOKMARK({ - {QLatin1String(":/utils/images/bookmark.png"), Theme::PanelTextColorMid}}, Icon::Tint); + {":/utils/images/bookmark.png", Theme::PanelTextColorMid}}, Icon::Tint); const Icon BOOKMARK_TOOLBAR({ - {QLatin1String(":/utils/images/bookmark.png"), Theme::IconsBaseColor}}); + {":/utils/images/bookmark.png", Theme::IconsBaseColor}}); const Icon BOOKMARK_TEXTEDITOR({ - {QLatin1String(":/utils/images/bookmark.png"), Theme::Bookmarks_TextMarkColor}}, Icon::Tint); + {":/utils/images/bookmark.png", Theme::Bookmarks_TextMarkColor}}, Icon::Tint); const Icon SNAPSHOT_TOOLBAR({ - {QLatin1String(":/utils/images/snapshot.png"), Theme::IconsBaseColor}}); + {":/utils/images/snapshot.png", Theme::IconsBaseColor}}); const Icon NEWSEARCH_TOOLBAR({ - {QLatin1String(":/utils/images/zoom.png"), Theme::IconsBaseColor}, - {QLatin1String(":/utils/images/iconoverlay_add_small.png"), Theme::IconsRunColor}}); + {":/utils/images/zoom.png", Theme::IconsBaseColor}, + {":/utils/images/iconoverlay_add_small.png", Theme::IconsRunColor}}); const Icon SETTINGS_TOOLBAR({ - {QLatin1String(":/utils/images/settings.png"), Theme::IconsBaseColor}}); + {":/utils/images/settings.png", Theme::IconsBaseColor}}); const Icon NEWFILE({ - {QLatin1String(":/utils/images/filenew.png"), Theme::PanelTextColorMid}}, Icon::Tint); + {":/utils/images/filenew.png", Theme::PanelTextColorMid}}, Icon::Tint); const Icon OPENFILE({ - {QLatin1String(":/utils/images/fileopen.png"), Theme::PanelTextColorMid}}, Icon::Tint); + {":/utils/images/fileopen.png", Theme::PanelTextColorMid}}, Icon::Tint); const Icon OPENFILE_TOOLBAR({ - {QLatin1String(":/utils/images/fileopen.png"), Theme::IconsBaseColor}}); + {":/utils/images/fileopen.png", Theme::IconsBaseColor}}); const Icon SAVEFILE({ - {QLatin1String(":/utils/images/filesave.png"), Theme::PanelTextColorMid}}, Icon::Tint); + {":/utils/images/filesave.png", Theme::PanelTextColorMid}}, Icon::Tint); const Icon SAVEFILE_TOOLBAR({ - {QLatin1String(":/utils/images/filesave.png"), Theme::IconsBaseColor}}); + {":/utils/images/filesave.png", Theme::IconsBaseColor}}); const Icon EXPORTFILE_TOOLBAR({ - {QLatin1String(":/utils/images/fileexport.png"), Theme::IconsBaseColor}}); + {":/utils/images/fileexport.png", Theme::IconsBaseColor}}); const Icon MULTIEXPORTFILE_TOOLBAR({ - {QLatin1String(":/utils/images/filemultiexport.png"), Theme::IconsBaseColor}}); + {":/utils/images/filemultiexport.png", Theme::IconsBaseColor}}); const Icon UNKNOWN_FILE({ - {QLatin1String(":/utils/images/unknownfile.png"), Theme::IconsBaseColor}}); + {":/utils/images/unknownfile.png", Theme::IconsBaseColor}}); const Icon DIR({ - {QLatin1String(":/utils/images/dir.png"), Theme::IconsBaseColor}}); + {":/utils/images/dir.png", Theme::IconsBaseColor}}); const Icon UNDO({ - {QLatin1String(":/utils/images/undo.png"), Theme::PanelTextColorMid}}, Icon::Tint); + {":/utils/images/undo.png", Theme::PanelTextColorMid}}, Icon::Tint); const Icon UNDO_TOOLBAR({ - {QLatin1String(":/utils/images/undo.png"), Theme::IconsBaseColor}}); + {":/utils/images/undo.png", Theme::IconsBaseColor}}); const Icon REDO({ - {QLatin1String(":/utils/images/redo.png"), Theme::PanelTextColorMid}}, Icon::Tint); + {":/utils/images/redo.png", Theme::PanelTextColorMid}}, Icon::Tint); const Icon REDO_TOOLBAR({ - {QLatin1String(":/utils/images/redo.png"), Theme::IconsBaseColor}}); + {":/utils/images/redo.png", Theme::IconsBaseColor}}); const Icon COPY({ - {QLatin1String(":/utils/images/editcopy.png"), Theme::PanelTextColorMid}}, Icon::Tint); + {":/utils/images/editcopy.png", Theme::PanelTextColorMid}}, Icon::Tint); const Icon COPY_TOOLBAR({ - {QLatin1String(":/utils/images/editcopy.png"), Theme::IconsBaseColor}}); + {":/utils/images/editcopy.png", Theme::IconsBaseColor}}); const Icon PASTE({ - {QLatin1String(":/utils/images/editpaste.png"), Theme::PanelTextColorMid}}, Icon::Tint); + {":/utils/images/editpaste.png", Theme::PanelTextColorMid}}, Icon::Tint); const Icon PASTE_TOOLBAR({ - {QLatin1String(":/utils/images/editpaste.png"), Theme::IconsBaseColor}}); + {":/utils/images/editpaste.png", Theme::IconsBaseColor}}); const Icon CUT({ - {QLatin1String(":/utils/images/editcut.png"), Theme::PanelTextColorMid}}, Icon::Tint); + {":/utils/images/editcut.png", Theme::PanelTextColorMid}}, Icon::Tint); const Icon CUT_TOOLBAR({ - {QLatin1String(":/utils/images/editcut.png"), Theme::IconsBaseColor}}); + {":/utils/images/editcut.png", Theme::IconsBaseColor}}); const Icon RESET({ - {QLatin1String(":/utils/images/reset.png"), Theme::PanelTextColorMid}}, Icon::Tint); + {":/utils/images/reset.png", Theme::PanelTextColorMid}}, Icon::Tint); const Icon RESET_TOOLBAR({ - {QLatin1String(":/utils/images/reset.png"), Theme::IconsBaseColor}}); + {":/utils/images/reset.png", Theme::IconsBaseColor}}); const Icon ARROW_UP({ - {QLatin1String(":/utils/images/arrowup.png"), Theme::IconsBaseColor}}); + {":/utils/images/arrowup.png", Theme::IconsBaseColor}}); const Icon ARROW_DOWN({ - {QLatin1String(":/utils/images/arrowdown.png"), Theme::IconsBaseColor}}); + {":/utils/images/arrowdown.png", Theme::IconsBaseColor}}); const Icon MINUS({ - {QLatin1String(":/utils/images/minus.png"), Theme::IconsBaseColor}}); + {":/utils/images/minus.png", Theme::IconsBaseColor}}); const Icon PLUS_TOOLBAR({ - {QLatin1String(":/utils/images/plus.png"), Theme::IconsBaseColor}}); + {":/utils/images/plus.png", Theme::IconsBaseColor}}); const Icon PLUS({ - {QLatin1String(":/utils/images/plus.png"), Theme::PaletteText}}, Icon::Tint); + {":/utils/images/plus.png", Theme::PaletteText}}, Icon::Tint); const Icon MAGNIFIER({ - {QLatin1String(":/utils/images/magnifier.png"), Theme::PanelTextColorMid}}, Icon::Tint); + {":/utils/images/magnifier.png", Theme::PanelTextColorMid}}, Icon::Tint); const Icon CLEAN({ - {QLatin1String(":/utils/images/clean_pane_small.png"), Theme::PanelTextColorMid}}, Icon::Tint); + {":/utils/images/clean_pane_small.png", Theme::PanelTextColorMid}}, Icon::Tint); const Icon CLEAN_TOOLBAR({ - {QLatin1String(":/utils/images/clean_pane_small.png"), Theme::IconsBaseColor}}); + {":/utils/images/clean_pane_small.png", Theme::IconsBaseColor}}); const Icon RELOAD({ - {QLatin1String(":/utils/images/reload_gray.png"), Theme::PanelTextColorMid}}, Icon::Tint); + {":/utils/images/reload_gray.png", Theme::PanelTextColorMid}}, Icon::Tint); const Icon RELOAD_TOOLBAR({ - {QLatin1String(":/utils/images/reload_gray.png"), Theme::IconsBaseColor}}); + {":/utils/images/reload_gray.png", Theme::IconsBaseColor}}); const Icon TOGGLE_LEFT_SIDEBAR({ - {QLatin1String(":/utils/images/leftsidebaricon.png"), Theme::PanelTextColorMid}}, Icon::MenuTintedStyle); + {":/utils/images/leftsidebaricon.png", Theme::PanelTextColorMid}}, Icon::MenuTintedStyle); const Icon TOGGLE_LEFT_SIDEBAR_TOOLBAR({ - {QLatin1String(":/utils/images/leftsidebaricon.png"), Theme::IconsBaseColor}}); + {":/utils/images/leftsidebaricon.png", Theme::IconsBaseColor}}); const Icon TOGGLE_RIGHT_SIDEBAR({ - {QLatin1String(":/utils/images/rightsidebaricon.png"), Theme::PanelTextColorMid}}, Icon::MenuTintedStyle); + {":/utils/images/rightsidebaricon.png", Theme::PanelTextColorMid}}, Icon::MenuTintedStyle); const Icon TOGGLE_RIGHT_SIDEBAR_TOOLBAR({ - {QLatin1String(":/utils/images/rightsidebaricon.png"), Theme::IconsBaseColor}}); + {":/utils/images/rightsidebaricon.png", Theme::IconsBaseColor}}); const Icon CLOSE_TOOLBAR({ - {QLatin1String(":/utils/images/close.png"), Theme::IconsBaseColor}}); + {":/utils/images/close.png", Theme::IconsBaseColor}}); const Icon CLOSE_FOREGROUND({ - {QLatin1String(":/utils/images/close.png"), Theme::PanelTextColorDark}}, Icon::Tint); + {":/utils/images/close.png", Theme::PanelTextColorDark}}, Icon::Tint); const Icon CLOSE_BACKGROUND({ - {QLatin1String(":/utils/images/close.png"), Theme::PanelTextColorLight}}, Icon::Tint); + {":/utils/images/close.png", Theme::PanelTextColorLight}}, Icon::Tint); const Icon SPLIT_HORIZONTAL({ - {QLatin1String(":/utils/images/splitbutton_horizontal.png"), Theme::PanelTextColorMid}}, Icon::MenuTintedStyle); + {":/utils/images/splitbutton_horizontal.png", Theme::PanelTextColorMid}}, Icon::MenuTintedStyle); const Icon SPLIT_HORIZONTAL_TOOLBAR({ - {QLatin1String(":/utils/images/splitbutton_horizontal.png"), Theme::IconsBaseColor}}); + {":/utils/images/splitbutton_horizontal.png", Theme::IconsBaseColor}}); const Icon SPLIT_VERTICAL({ - {QLatin1String(":/utils/images/splitbutton_vertical.png"), Theme::PanelTextColorMid}}, Icon::MenuTintedStyle); + {":/utils/images/splitbutton_vertical.png", Theme::PanelTextColorMid}}, Icon::MenuTintedStyle); const Icon SPLIT_VERTICAL_TOOLBAR({ - {QLatin1String(":/utils/images/splitbutton_vertical.png"), Theme::IconsBaseColor}}); + {":/utils/images/splitbutton_vertical.png", Theme::IconsBaseColor}}); const Icon CLOSE_SPLIT_TOP({ - {QLatin1String(":/utils/images/splitbutton_closetop.png"), Theme::IconsBaseColor}}); + {":/utils/images/splitbutton_closetop.png", Theme::IconsBaseColor}}); const Icon CLOSE_SPLIT_BOTTOM({ - {QLatin1String(":/utils/images/splitbutton_closebottom.png"), Theme::IconsBaseColor}}); + {":/utils/images/splitbutton_closebottom.png", Theme::IconsBaseColor}}); const Icon CLOSE_SPLIT_LEFT({ - {QLatin1String(":/utils/images/splitbutton_closeleft.png"), Theme::IconsBaseColor}}); + {":/utils/images/splitbutton_closeleft.png", Theme::IconsBaseColor}}); const Icon CLOSE_SPLIT_RIGHT({ - {QLatin1String(":/utils/images/splitbutton_closeright.png"), Theme::IconsBaseColor}}); + {":/utils/images/splitbutton_closeright.png", Theme::IconsBaseColor}}); const Icon FILTER({ - {QLatin1String(":/utils/images/filtericon.png"), Theme::IconsBaseColor}, - {QLatin1String(":/utils/images/toolbuttonexpandarrow.png"), Theme::IconsBaseColor}}); + {":/utils/images/filtericon.png", Theme::IconsBaseColor}, + {":/utils/images/toolbuttonexpandarrow.png", Theme::IconsBaseColor}}); const Icon LINK({ - {QLatin1String(":/utils/images/linkicon.png"), Theme::PanelTextColorMid}}, Icon::Tint); + {":/utils/images/linkicon.png", Theme::PanelTextColorMid}}, Icon::Tint); const Icon LINK_TOOLBAR({ - {QLatin1String(":/utils/images/linkicon.png"), Theme::IconsBaseColor}}); + {":/utils/images/linkicon.png", Theme::IconsBaseColor}}); const Icon SORT_ALPHABETICALLY_TOOLBAR({ - {QLatin1String(":/utils/images/sort_alphabetically.png"), Theme::IconsBaseColor}}); + {":/utils/images/sort_alphabetically.png", Theme::IconsBaseColor}}); const Icon TOGGLE_PROGRESSDETAILS_TOOLBAR({ - {QLatin1String(":/utils/images/toggleprogressdetails.png"), Theme::IconsBaseColor}}); + {":/utils/images/toggleprogressdetails.png", Theme::IconsBaseColor}}); const Icon ONLINE({ - {QLatin1String(":/utils/images/online.png"), Theme::PanelTextColorMid}}, Icon::Tint); + {":/utils/images/online.png", Theme::PanelTextColorMid}}, Icon::Tint); const Icon ONLINE_TOOLBAR({ - {QLatin1String(":/utils/images/online.png"), Theme::IconsBaseColor}}); + {":/utils/images/online.png", Theme::IconsBaseColor}}); const Icon DOWNLOAD({ - {QLatin1String(":/utils/images/download.png"), Theme::PanelTextColorMid}}, Icon::Tint); + {":/utils/images/download.png", Theme::PanelTextColorMid}}, Icon::Tint); const Icon WARNING({ - {QLatin1String(":/utils/images/warningfill.png"), Theme::BackgroundColorNormal}, - {QLatin1String(":/utils/images/warning.png"), Theme::IconsWarningColor}}, Icon::Tint); + {":/utils/images/warningfill.png", Theme::BackgroundColorNormal}, + {":/utils/images/warning.png", Theme::IconsWarningColor}}, Icon::Tint); const Icon WARNING_TOOLBAR({ - {QLatin1String(":/utils/images/warning.png"), Theme::IconsWarningToolBarColor}}); + {":/utils/images/warning.png", Theme::IconsWarningToolBarColor}}); const Icon CRITICAL_TOOLBAR({ - {QLatin1String(":/utils/images/error.png"), Theme::IconsErrorToolBarColor}}); + {":/utils/images/error.png", Theme::IconsErrorToolBarColor}}); const Icon ERROR_TASKBAR({ - {QLatin1String(":/utils/images/compile_error_taskbar.png"), Theme::IconsErrorColor}}, Icon::Tint); + {":/utils/images/compile_error_taskbar.png", Theme::IconsErrorColor}}, Icon::Tint); const Icon INFO({ - {QLatin1String(":/utils/images/warningfill.png"), Theme::BackgroundColorNormal}, - {QLatin1String(":/utils/images/info.png"), Theme::IconsInfoColor}}, Icon::Tint); + {":/utils/images/warningfill.png", Theme::BackgroundColorNormal}, + {":/utils/images/info.png", Theme::IconsInfoColor}}, Icon::Tint); const Icon INFO_TOOLBAR({ - {QLatin1String(":/utils/images/info.png"), Theme::IconsInfoToolBarColor}}); + {":/utils/images/info.png", Theme::IconsInfoToolBarColor}}); const Icon EXPAND_ALL_TOOLBAR({ - {QLatin1String(":/find/images/expand.png"), Theme::IconsBaseColor}}); + {":/find/images/expand.png", Theme::IconsBaseColor}}); const Icon TOOLBAR_EXTENSION({ - {QLatin1String(":/utils/images/extension.png"), Theme::IconsBaseColor}}); + {":/utils/images/extension.png", Theme::IconsBaseColor}}); const Icon RUN_SMALL({ - {QLatin1String(":/utils/images/run_small.png"), Theme::IconsRunColor}}, Icon::MenuTintedStyle); + {":/utils/images/run_small.png", Theme::IconsRunColor}}, Icon::MenuTintedStyle); const Icon RUN_SMALL_TOOLBAR({ - {QLatin1String(":/utils/images/run_small.png"), Theme::IconsRunToolBarColor}}); + {":/utils/images/run_small.png", Theme::IconsRunToolBarColor}}); const Icon STOP_SMALL({ - {QLatin1String(":/utils/images/stop_small.png"), Theme::IconsStopColor}}, Icon::MenuTintedStyle); + {":/utils/images/stop_small.png", Theme::IconsStopColor}}, Icon::MenuTintedStyle); const Icon STOP_SMALL_TOOLBAR({ - {QLatin1String(":/utils/images/stop_small.png"), Theme::IconsStopToolBarColor}}); + {":/utils/images/stop_small.png", Theme::IconsStopToolBarColor}}); const Icon INTERRUPT_SMALL({ - {QLatin1String(":/utils/images/interrupt_small.png"), Theme::IconsInterruptColor}}, Icon::MenuTintedStyle); + {":/utils/images/interrupt_small.png", Theme::IconsInterruptColor}}, Icon::MenuTintedStyle); const Icon INTERRUPT_SMALL_TOOLBAR({ - {QLatin1String(":/utils/images/interrupt_small.png"), Theme::IconsInterruptToolBarColor}}); + {":/utils/images/interrupt_small.png", Theme::IconsInterruptToolBarColor}}); const Icon BOUNDING_RECT({ - {QLatin1String(":/utils/images/boundingrect.png"), Theme::IconsBaseColor}}); + {":/utils/images/boundingrect.png", Theme::IconsBaseColor}}); const Icon EYE_OPEN_TOOLBAR({ - {QLatin1String(":/utils/images/eye_open.png"), Theme::IconsBaseColor}}); + {":/utils/images/eye_open.png", Theme::IconsBaseColor}}); const Icon EYE_CLOSED_TOOLBAR({ - {QLatin1String(":/utils/images/eye_closed.png"), Theme::IconsBaseColor}}); + {":/utils/images/eye_closed.png", Theme::IconsBaseColor}}); const Icon REPLACE({ - {QLatin1String(":/utils/images/replace_a.png"), Theme::PanelTextColorMid}, - {QLatin1String(":/utils/images/replace_b.png"), Theme::IconsInfoColor}}, Icon::Tint); + {":/utils/images/replace_a.png", Theme::PanelTextColorMid}, + {":/utils/images/replace_b.png", Theme::IconsInfoColor}}, Icon::Tint); const Icon EXPAND({ - {QLatin1String(":/utils/images/expand.png"), Theme::PanelTextColorMid}}, Icon::Tint); + {":/utils/images/expand.png", Theme::PanelTextColorMid}}, Icon::Tint); const Icon EXPAND_TOOLBAR({ - {QLatin1String(":/utils/images/expand.png"), Theme::IconsBaseColor}}); + {":/utils/images/expand.png", Theme::IconsBaseColor}}); const Icon COLLAPSE({ - {QLatin1String(":/utils/images/collapse.png"), Theme::PanelTextColorMid}}, Icon::Tint); + {":/utils/images/collapse.png", Theme::PanelTextColorMid}}, Icon::Tint); const Icon COLLAPSE_TOOLBAR({ - {QLatin1String(":/utils/images/collapse.png"), Theme::IconsBaseColor}}); + {":/utils/images/collapse.png", Theme::IconsBaseColor}}); const Icon PAN_TOOLBAR({ - {QLatin1String(":/utils/images/pan.png"), Theme::IconsBaseColor}}); + {":/utils/images/pan.png", Theme::IconsBaseColor}}); const Icon EMPTY14(":/utils/images/empty14.png"); const Icon EMPTY16(":/utils/images/empty16.png"); const Icon OVERLAY_ADD({ @@ -300,44 +300,44 @@ const Icon MACOS_TOUCHBAR_CLEAR( QIcon CodeModelIcon::iconForType(CodeModelIcon::Type type) { - static const IconStringMaskAndColor classRelationIcon { - QLatin1String(":/codemodel/images/classrelation.png"), Theme::IconsCodeModelOverlayForegroundColor}; - static const IconStringMaskAndColor classRelationBackgroundIcon { - QLatin1String(":/codemodel/images/classrelationbackground.png"), Theme::IconsCodeModelOverlayBackgroundColor}; - static const IconStringMaskAndColor classMemberFunctionIcon { - QLatin1String(":/codemodel/images/classmemberfunction.png"), Theme::IconsCodeModelFunctionColor}; - static const IconStringMaskAndColor classMemberVariableIcon { - QLatin1String(":/codemodel/images/classmembervariable.png"), Theme::IconsCodeModelVariableColor}; - static const IconStringMaskAndColor functionIcon { - QLatin1String(":/codemodel/images/member.png"), Theme::IconsCodeModelFunctionColor}; - static const IconStringMaskAndColor variableIcon { - QLatin1String(":/codemodel/images/member.png"), Theme::IconsCodeModelVariableColor}; - static const IconStringMaskAndColor signalIcon { - QLatin1String(":/codemodel/images/signal.png"), Theme::IconsCodeModelFunctionColor}; - static const IconStringMaskAndColor slotIcon { - QLatin1String(":/codemodel/images/slot.png"), Theme::IconsCodeModelFunctionColor}; - static const IconStringMaskAndColor propertyIcon { - QLatin1String(":/codemodel/images/property.png"), Theme::IconsCodeModelOverlayForegroundColor}; - static const IconStringMaskAndColor propertyBackgroundIcon { - QLatin1String(":/codemodel/images/propertybackground.png"), Theme::IconsCodeModelOverlayBackgroundColor}; - static const IconStringMaskAndColor protectedIcon { - QLatin1String(":/codemodel/images/protected.png"), Theme::IconsCodeModelOverlayForegroundColor}; - static const IconStringMaskAndColor protectedBackgroundIcon { - QLatin1String(":/codemodel/images/protectedbackground.png"), Theme::IconsCodeModelOverlayBackgroundColor}; - static const IconStringMaskAndColor privateIcon { - QLatin1String(":/codemodel/images/private.png"), Theme::IconsCodeModelOverlayForegroundColor}; - static const IconStringMaskAndColor privateBackgroundIcon { - QLatin1String(":/codemodel/images/privatebackground.png"), Theme::IconsCodeModelOverlayBackgroundColor}; - static const IconStringMaskAndColor staticIcon { - QLatin1String(":/codemodel/images/static.png"), Theme::IconsCodeModelOverlayForegroundColor}; - static const IconStringMaskAndColor staticBackgroundIcon { - QLatin1String(":/codemodel/images/staticbackground.png"), Theme::IconsCodeModelOverlayBackgroundColor}; + static const IconMaskAndColor classRelationIcon { + ":/codemodel/images/classrelation.png", Theme::IconsCodeModelOverlayForegroundColor}; + static const IconMaskAndColor classRelationBackgroundIcon { + ":/codemodel/images/classrelationbackground.png", Theme::IconsCodeModelOverlayBackgroundColor}; + static const IconMaskAndColor classMemberFunctionIcon { + ":/codemodel/images/classmemberfunction.png", Theme::IconsCodeModelFunctionColor}; + static const IconMaskAndColor classMemberVariableIcon { + ":/codemodel/images/classmembervariable.png", Theme::IconsCodeModelVariableColor}; + static const IconMaskAndColor functionIcon { + ":/codemodel/images/member.png", Theme::IconsCodeModelFunctionColor}; + static const IconMaskAndColor variableIcon { + ":/codemodel/images/member.png", Theme::IconsCodeModelVariableColor}; + static const IconMaskAndColor signalIcon { + ":/codemodel/images/signal.png", Theme::IconsCodeModelFunctionColor}; + static const IconMaskAndColor slotIcon { + ":/codemodel/images/slot.png", Theme::IconsCodeModelFunctionColor}; + static const IconMaskAndColor propertyIcon { + ":/codemodel/images/property.png", Theme::IconsCodeModelOverlayForegroundColor}; + static const IconMaskAndColor propertyBackgroundIcon { + ":/codemodel/images/propertybackground.png", Theme::IconsCodeModelOverlayBackgroundColor}; + static const IconMaskAndColor protectedIcon { + ":/codemodel/images/protected.png", Theme::IconsCodeModelOverlayForegroundColor}; + static const IconMaskAndColor protectedBackgroundIcon { + ":/codemodel/images/protectedbackground.png", Theme::IconsCodeModelOverlayBackgroundColor}; + static const IconMaskAndColor privateIcon { + ":/codemodel/images/private.png", Theme::IconsCodeModelOverlayForegroundColor}; + static const IconMaskAndColor privateBackgroundIcon { + ":/codemodel/images/privatebackground.png", Theme::IconsCodeModelOverlayBackgroundColor}; + static const IconMaskAndColor staticIcon { + ":/codemodel/images/static.png", Theme::IconsCodeModelOverlayForegroundColor}; + static const IconMaskAndColor staticBackgroundIcon { + ":/codemodel/images/staticbackground.png", Theme::IconsCodeModelOverlayBackgroundColor}; switch (type) { case Class: { const static QIcon icon(Icon({ classRelationBackgroundIcon, classRelationIcon, - {QLatin1String(":/codemodel/images/classparent.png"), Theme::IconsCodeModelClassColor}, + {":/codemodel/images/classparent.png", Theme::IconsCodeModelClassColor}, classMemberFunctionIcon, classMemberVariableIcon }, Icon::Tint).icon()); return icon; @@ -345,20 +345,20 @@ QIcon CodeModelIcon::iconForType(CodeModelIcon::Type type) case Struct: { const static QIcon icon(Icon({ classRelationBackgroundIcon, classRelationIcon, - {QLatin1String(":/codemodel/images/classparent.png"), Theme::IconsCodeModelStructColor}, + {":/codemodel/images/classparent.png", Theme::IconsCodeModelStructColor}, classMemberFunctionIcon, classMemberVariableIcon }, Icon::Tint).icon()); return icon; } case Enum: { const static QIcon icon(Icon({ - {QLatin1String(":/codemodel/images/enum.png"), Theme::IconsCodeModelEnumColor} + {":/codemodel/images/enum.png", Theme::IconsCodeModelEnumColor} }, Icon::Tint).icon()); return icon; } case Enumerator: { const static QIcon icon(Icon({ - {QLatin1String(":/codemodel/images/enumerator.png"), Theme::IconsCodeModelEnumColor} + {":/codemodel/images/enumerator.png", Theme::IconsCodeModelEnumColor} }, Icon::Tint).icon()); return icon; } @@ -399,7 +399,7 @@ QIcon CodeModelIcon::iconForType(CodeModelIcon::Type type) } case Namespace: { const static QIcon icon(Icon({ - {QLatin1String(":/utils/images/namespace.png"), Theme::IconsCodeModelKeywordColor} + {":/utils/images/namespace.png", Theme::IconsCodeModelKeywordColor} }, Icon::Tint).icon()); return icon; } @@ -465,13 +465,13 @@ QIcon CodeModelIcon::iconForType(CodeModelIcon::Type type) } case Keyword: { const static QIcon icon(Icon({ - {QLatin1String(":/codemodel/images/keyword.png"), Theme::IconsCodeModelKeywordColor} + {":/codemodel/images/keyword.png", Theme::IconsCodeModelKeywordColor} }, Icon::Tint).icon()); return icon; } case Macro: { const static QIcon icon(Icon({ - {QLatin1String(":/codemodel/images/macro.png"), Theme::IconsCodeModelMacroColor} + {":/codemodel/images/macro.png", Theme::IconsCodeModelMacroColor} }, Icon::Tint).icon()); return icon; } diff --git a/src/plugins/android/androidavdmanager.cpp b/src/plugins/android/androidavdmanager.cpp index c75c773042..c385b964ee 100644 --- a/src/plugins/android/androidavdmanager.cpp +++ b/src/plugins/android/androidavdmanager.cpp @@ -115,15 +115,15 @@ static CreateAvdInfo createAvdCommand(const AndroidConfig &config, const CreateA if (result.overwrite) arguments << "-f"; - const QString avdManagerTool = config.avdManagerToolPath().toString(); + const FilePath avdManagerTool = config.avdManagerToolPath(); qCDebug(avdManagerLog) << "Running AVD Manager command:" << CommandLine(avdManagerTool, arguments).toUserOutput(); QProcess proc; - proc.start(avdManagerTool, arguments); + proc.start(avdManagerTool.toString(), arguments); if (!proc.waitForStarted()) { result.error = QApplication::translate("AndroidAvdManager", "Could not start process \"%1 %2\"") - .arg(avdManagerTool, arguments.join(' ')); + .arg(avdManagerTool.toString(), arguments.join(' ')); return result; } QTC_CHECK(proc.state() == QProcess::Running); diff --git a/src/plugins/android/androidbuildapkstep.cpp b/src/plugins/android/androidbuildapkstep.cpp index 1e89531172..e3c6291841 100644 --- a/src/plugins/android/androidbuildapkstep.cpp +++ b/src/plugins/android/androidbuildapkstep.cpp @@ -564,10 +564,7 @@ bool AndroidBuildApkStep::init() qCDebug(buildapkstepLog) << "APK or AAB path:" << m_packagePath; - QString command = version->hostBinPath().toString(); - if (!command.endsWith('/')) - command += '/'; - command += Utils::HostOsInfo::withExecutableSuffix("androiddeployqt"); + FilePath command = version->hostBinPath().pathAppended(HostOsInfo::withExecutableSuffix("androiddeployqt")); QString outputDir = buildDirectory().pathAppended(Constants::ANDROID_BUILDDIRECTORY).toString(); diff --git a/src/plugins/android/androidconfigurations.cpp b/src/plugins/android/androidconfigurations.cpp index c93d5a78f2..e2abf5d29d 100644 --- a/src/plugins/android/androidconfigurations.cpp +++ b/src/plugins/android/androidconfigurations.cpp @@ -151,7 +151,7 @@ namespace { if (HostOsInfo::isLinuxHost()) { if (QSysInfo::WordSize == 32 ) { Environment env = Environment::systemEnvironment(); - QString executable = env.searchInPath(QLatin1String("file")).toString(); + FilePath executable = env.searchInPath("file"); QString shell = env.value(QLatin1String("SHELL")); if (executable.isEmpty() || shell.isEmpty()) return true; // we can't detect, but creator is 32bit so assume 32bit diff --git a/src/plugins/android/androidmanager.cpp b/src/plugins/android/androidmanager.cpp index f2e75a5fd4..fe6994b703 100644 --- a/src/plugins/android/androidmanager.cpp +++ b/src/plugins/android/androidmanager.cpp @@ -701,9 +701,9 @@ QProcess *AndroidManager::runAdbCommandDetached(const QStringList &args, QString bool deleteOnFinish) { std::unique_ptr<QProcess> p(new QProcess); - const QString adb = AndroidConfigurations::currentConfig().adbToolPath().toString(); + const FilePath adb = AndroidConfigurations::currentConfig().adbToolPath(); qCDebug(androidManagerLog) << "Running command (async):" << CommandLine(adb, args).toUserOutput(); - p->start(adb, args); + p->start(adb.toString(), args); if (p->waitForStarted(500) && p->state() == QProcess::Running) { if (deleteOnFinish) { connect(p.get(), QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), diff --git a/src/plugins/android/androidrunnerworker.cpp b/src/plugins/android/androidrunnerworker.cpp index 8563187894..adfdf9ab93 100644 --- a/src/plugins/android/androidrunnerworker.cpp +++ b/src/plugins/android/androidrunnerworker.cpp @@ -535,10 +535,10 @@ void Android::Internal::AndroidRunnerWorker::asyncStartLogcat() } const QStringList logcatArgs = selector() << "logcat" << timeArg; - const QString adb = AndroidConfigurations::currentConfig().adbToolPath().toString(); + const FilePath adb = AndroidConfigurations::currentConfig().adbToolPath(); qCDebug(androidRunWorkerLog) << "Running logcat command (async):" << CommandLine(adb, logcatArgs).toUserOutput(); - m_adbLogcatProcess->start(adb, logcatArgs); + m_adbLogcatProcess->start(adb.toString(), logcatArgs); if (m_adbLogcatProcess->waitForStarted(500) && m_adbLogcatProcess->state() == QProcess::Running) m_adbLogcatProcess->setObjectName("AdbLogcatProcess"); } diff --git a/src/plugins/android/androidtoolchain.cpp b/src/plugins/android/androidtoolchain.cpp index a06ddfa920..5a7d68fe6f 100644 --- a/src/plugins/android/androidtoolchain.cpp +++ b/src/plugins/android/androidtoolchain.cpp @@ -146,7 +146,7 @@ FilePath AndroidToolChain::makeCommand(const Environment &env) const { Q_UNUSED(env) FilePath makePath = AndroidConfigurations::currentConfig().makePathFromNdk(m_ndkLocation); - return makePath.exists() ? makePath : FilePath::fromString("make"); + return makePath.exists() ? makePath : FilePath("make"); } GccToolChain::DetectedAbisResult AndroidToolChain::detectSupportedAbis() const diff --git a/src/plugins/android/javalanguageserver.cpp b/src/plugins/android/javalanguageserver.cpp index c7c093f53c..1de0411cbb 100644 --- a/src/plugins/android/javalanguageserver.cpp +++ b/src/plugins/android/javalanguageserver.cpp @@ -192,7 +192,7 @@ private: LanguageClient::BaseClientInterface *JLSSettings::createInterface() const { auto interface = new JLSInterface(); - CommandLine cmd{m_executable}; + CommandLine cmd{FilePath::fromString(m_executable)}; cmd.addArgs(arguments(), CommandLine::Raw); cmd.addArgs({"-data", interface->workspaceDir()}); interface->setCommandLine(cmd); diff --git a/src/plugins/autotoolsprojectmanager/autogenstep.cpp b/src/plugins/autotoolsprojectmanager/autogenstep.cpp index 58a57c8450..da1279793e 100644 --- a/src/plugins/autotoolsprojectmanager/autogenstep.cpp +++ b/src/plugins/autotoolsprojectmanager/autogenstep.cpp @@ -83,7 +83,7 @@ AutogenStep::AutogenStep(BuildStepList *bsl, Id id) : AbstractProcessStep(bsl, i }); setCommandLineProvider([arguments] { - return CommandLine(FilePath::fromString("./autogen.sh"), + return CommandLine(FilePath("./autogen.sh"), arguments->value(), CommandLine::Raw); }); diff --git a/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp b/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp index c1a92298da..b1a4212c31 100644 --- a/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp +++ b/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp @@ -83,9 +83,7 @@ AutoreconfStep::AutoreconfStep(BuildStepList *bsl, Id id) }); setCommandLineProvider([arguments] { - return CommandLine(FilePath::fromString("autoreconf"), - arguments->value(), - CommandLine::Raw); + return CommandLine("autoreconf", arguments->value(), CommandLine::Raw); }); setWorkingDirectoryProvider([this] { return project()->projectDirectory(); }); diff --git a/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp b/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp index 5866912c24..fd2faf37de 100644 --- a/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp +++ b/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp @@ -53,7 +53,7 @@ public: { // /<foobar> is used so the un-changed check in setBuildDirectory() works correctly. // The leading / is to avoid the relative the path expansion in BuildConfiguration::buildDirectory. - setBuildDirectory(FilePath::fromString("/<foobar>")); + setBuildDirectory("/<foobar>"); setBuildDirectoryHistoryCompleter("AutoTools.BuildDir.History"); setConfigWidgetDisplayName(tr("Autotools Manager")); diff --git a/src/plugins/baremetal/debugservers/gdb/eblinkgdbserverprovider.h b/src/plugins/baremetal/debugservers/gdb/eblinkgdbserverprovider.h index f1bba6ee23..722e297eef 100644 --- a/src/plugins/baremetal/debugservers/gdb/eblinkgdbserverprovider.h +++ b/src/plugins/baremetal/debugservers/gdb/eblinkgdbserverprovider.h @@ -61,12 +61,10 @@ private: static QString defaultInitCommands(); static QString defaultResetCommands(); - Utils::FilePath m_executableFile = - Utils::FilePath::fromString("eblink"); // server execute filename + Utils::FilePath m_executableFile = "eblink"; // server execute filename int m_verboseLevel = 0; // verbose <0..7> Specify generally verbose logging InterfaceType m_interfaceType = SWD; // -I stlink ;swd(default) jtag - Utils::FilePath m_deviceScript = - Utils::FilePath::fromString("stm32-auto.script"); // -D <script> ;Select the device script <>.script + Utils::FilePath m_deviceScript = "stm32-auto.script"; // -D <script> ;Select the device script <>.script bool m_interfaceResetOnConnect = true; // (inversed)-I stlink,dr ;Disable reset at connection (hotplug) int m_interfaceSpeed = 4000; // -I stlink,speed=4000 QString m_interfaceExplicidDevice; // device=<usb_bus>:<usb_addr> ; Set device explicit diff --git a/src/plugins/baremetal/debugservers/gdb/jlinkgdbserverprovider.h b/src/plugins/baremetal/debugservers/gdb/jlinkgdbserverprovider.h index 1ec55d30ee..5c71322b27 100644 --- a/src/plugins/baremetal/debugservers/gdb/jlinkgdbserverprovider.h +++ b/src/plugins/baremetal/debugservers/gdb/jlinkgdbserverprovider.h @@ -58,7 +58,7 @@ private: static QString defaultInitCommands(); static QString defaultResetCommands(); - Utils::FilePath m_executableFile = Utils::FilePath::fromString(""); + Utils::FilePath m_executableFile; QString m_jlinkDevice; QString m_jlinkHost = {"USB"}; QString m_jlinkHostAddr; diff --git a/src/plugins/baremetal/debugservers/gdb/openocdgdbserverprovider.h b/src/plugins/baremetal/debugservers/gdb/openocdgdbserverprovider.h index ab64d8c7dc..41e03f688a 100644 --- a/src/plugins/baremetal/debugservers/gdb/openocdgdbserverprovider.h +++ b/src/plugins/baremetal/debugservers/gdb/openocdgdbserverprovider.h @@ -58,7 +58,7 @@ private: static QString defaultInitCommands(); static QString defaultResetCommands(); - Utils::FilePath m_executableFile = Utils::FilePath::fromString("openocd"); + Utils::FilePath m_executableFile = "openocd"; QString m_rootScriptsDir; QString m_configurationFile; QString m_additionalArguments; diff --git a/src/plugins/baremetal/debugservers/gdb/stlinkutilgdbserverprovider.h b/src/plugins/baremetal/debugservers/gdb/stlinkutilgdbserverprovider.h index 4114e45259..a5d8a6f82a 100644 --- a/src/plugins/baremetal/debugservers/gdb/stlinkutilgdbserverprovider.h +++ b/src/plugins/baremetal/debugservers/gdb/stlinkutilgdbserverprovider.h @@ -61,7 +61,7 @@ private: static QString defaultInitCommands(); static QString defaultResetCommands(); - Utils::FilePath m_executableFile = Utils::FilePath::fromString("st-util"); + Utils::FilePath m_executableFile = "st-util"; int m_verboseLevel = 0; // 0..99 bool m_extendedMode = false; // Listening for connections after disconnect bool m_resetBoard = true; diff --git a/src/plugins/boot2qt/qdbdevice.cpp b/src/plugins/boot2qt/qdbdevice.cpp index 1f6ba72280..808eaf7f28 100644 --- a/src/plugins/boot2qt/qdbdevice.cpp +++ b/src/plugins/boot2qt/qdbdevice.cpp @@ -65,7 +65,7 @@ public: void terminate() override { ProjectExplorer::Runnable r; - r.command = {QString(Constants::AppcontrollerFilepath), {"--stop"}}; + r.command = {Constants::AppcontrollerFilepath, {"--stop"}}; (new ApplicationLauncher(this))->start(r, device()); } diff --git a/src/plugins/boot2qt/qdbstopapplicationservice.cpp b/src/plugins/boot2qt/qdbstopapplicationservice.cpp index 4c43cc6af6..8aa78aab7f 100644 --- a/src/plugins/boot2qt/qdbstopapplicationservice.cpp +++ b/src/plugins/boot2qt/qdbstopapplicationservice.cpp @@ -102,8 +102,8 @@ void QdbStopApplicationService::doDeploy() this, &QdbStopApplicationService::stdOutData); ProjectExplorer::Runnable runnable; - runnable.command = {QString(Constants::AppcontrollerFilepath), {"--stop"}}; - runnable.workingDirectory = FilePath::fromString("/usr/bin"); + runnable.command = {Constants::AppcontrollerFilepath, {"--stop"}}; + runnable.workingDirectory = "/usr/bin"; d->applicationLauncher.start(runnable, ProjectExplorer::DeviceKitAspect::device(target()->kit())); diff --git a/src/plugins/clangtools/clangselectablefilesdialog.cpp b/src/plugins/clangtools/clangselectablefilesdialog.cpp index 0999c5aee6..4e9eb52436 100644 --- a/src/plugins/clangtools/clangselectablefilesdialog.cpp +++ b/src/plugins/clangtools/clangselectablefilesdialog.cpp @@ -124,7 +124,7 @@ public: // Add files outside of the base directory to a separate node Tree *externalFilesNode = createDirNode(SelectableFilesDialog::tr( "Files outside of the base directory"), - FilePath::fromString("/")); + "/"); linkDirNode(m_root, externalFilesNode); for (const FileInfo &fileInfo : outOfBaseDirFiles) linkFileNode(externalFilesNode, createFileNode(fileInfo, true)); diff --git a/src/plugins/clangtools/clangtoolrunner.cpp b/src/plugins/clangtools/clangtoolrunner.cpp index 8b25eccb96..2809cac40d 100644 --- a/src/plugins/clangtools/clangtoolrunner.cpp +++ b/src/plugins/clangtools/clangtoolrunner.cpp @@ -105,7 +105,7 @@ bool ClangToolRunner::supportsVFSOverlay() const auto it = vfsCapabilities.find(m_executable); if (it == vfsCapabilities.end()) { QtcProcess p; - p.setCommand({m_executable, {"--help"}}); + p.setCommand({FilePath::fromString(m_executable), {"--help"}}); p.runBlocking(); it = vfsCapabilities.insert(m_executable, p.allOutput().contains("vfsoverlay")); } @@ -137,7 +137,7 @@ bool ClangToolRunner::run(const QString &fileToAnalyze, const QStringList &compi m_outputFilePath = createOutputFilePath(m_outputDirPath, fileToAnalyze); QTC_ASSERT(!m_outputFilePath.isEmpty(), return false); - m_commandLine = {m_executable, m_argsCreator(compilerOptions)}; + m_commandLine = {FilePath::fromString(m_executable), m_argsCreator(compilerOptions)}; qCDebug(LOG).noquote() << "Starting" << m_commandLine.toUserOutput(); m_process->setCommand(m_commandLine); diff --git a/src/plugins/clangtools/executableinfo.cpp b/src/plugins/clangtools/executableinfo.cpp index 57a4aca719..10e7f1e6bb 100644 --- a/src/plugins/clangtools/executableinfo.cpp +++ b/src/plugins/clangtools/executableinfo.cpp @@ -66,7 +66,7 @@ static QString runExecutable(const Utils::CommandLine &commandLine, QueryFailMod return cpp.stdOut(); } -static QStringList queryClangTidyChecks(const QString &executable, +static QStringList queryClangTidyChecks(const FilePath &executable, const QString &checksArgument) { QStringList arguments = QStringList("-list-checks"); @@ -100,7 +100,7 @@ static QStringList queryClangTidyChecks(const QString &executable, return checks; } -static ClazyChecks querySupportedClazyChecks(const QString &executablePath) +static ClazyChecks querySupportedClazyChecks(const FilePath &executablePath) { static const QString queryFlag = "-supported-checks-json"; QString jsonOutput = runExecutable(CommandLine(executablePath, {queryFlag}), @@ -159,15 +159,15 @@ static ClazyChecks querySupportedClazyChecks(const QString &executablePath) } ClangTidyInfo::ClangTidyInfo(const QString &executablePath) - : defaultChecks(queryClangTidyChecks(executablePath, {})) - , supportedChecks(queryClangTidyChecks(executablePath, "-checks=*")) + : defaultChecks(queryClangTidyChecks(FilePath::fromString(executablePath), {})) + , supportedChecks(queryClangTidyChecks(FilePath::fromString(executablePath), "-checks=*")) {} ClazyStandaloneInfo::ClazyStandaloneInfo(const QString &executablePath) - : defaultChecks(queryClangTidyChecks(executablePath, {})) // Yup, behaves as clang-tidy. - , supportedChecks(querySupportedClazyChecks(executablePath)) + : defaultChecks(queryClangTidyChecks(FilePath::fromString(executablePath), {})) // Yup, behaves as clang-tidy. + , supportedChecks(querySupportedClazyChecks(FilePath::fromString(executablePath))) { - QString output = runExecutable(CommandLine(executablePath, {"--version"}), + QString output = runExecutable(CommandLine(FilePath::fromString(executablePath), {"--version"}), QueryFailMode::Silent); QTextStream stream(&output); while (!stream.atEnd()) { diff --git a/src/plugins/clearcase/clearcaseplugin.cpp b/src/plugins/clearcase/clearcaseplugin.cpp index e17c7ac184..8b526e21bc 100644 --- a/src/plugins/clearcase/clearcaseplugin.cpp +++ b/src/plugins/clearcase/clearcaseplugin.cpp @@ -1672,7 +1672,7 @@ ClearCasePluginPrivate::runCleartool(const FilePath &workingDir, VcsCommand command(workingDir, Environment::systemEnvironment()); command.addFlags(flags); command.setCodec(outputCodec); - command.runCommand(proc, {executable, arguments}); + command.runCommand(proc, {FilePath::fromString(executable), arguments}); response.error = proc.result() != QtcProcess::FinishedWithSuccess; if (response.error) diff --git a/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp b/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp index 741030cfbb..89cd9f1f55 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp @@ -755,7 +755,7 @@ void CMakeBuildSystem::handleParsingSucceeded() checkAndReportError(errorMessage); } - m_ctestPath = m_reader.ctestPath(); + m_ctestPath = FilePath::fromString(m_reader.ctestPath()); setApplicationTargets(appTargets()); setDeploymentData(deploymentData()); diff --git a/src/plugins/cmakeprojectmanager/cmakebuildsystem.h b/src/plugins/cmakeprojectmanager/cmakebuildsystem.h index 95d31367d8..4f063a24d5 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildsystem.h +++ b/src/plugins/cmakeprojectmanager/cmakebuildsystem.h @@ -180,7 +180,7 @@ private: mutable bool m_isHandlingError = false; // CTest integration - QString m_ctestPath; + Utils::FilePath m_ctestPath; QList<ProjectExplorer::TestCaseInfo> m_testNames; Utils::FutureSynchronizer m_futureSynchronizer; }; diff --git a/src/plugins/cmakeprojectmanager/cmaketoolsettingsaccessor.cpp b/src/plugins/cmakeprojectmanager/cmaketoolsettingsaccessor.cpp index 315fc6878d..e89e599cd5 100644 --- a/src/plugins/cmakeprojectmanager/cmaketoolsettingsaccessor.cpp +++ b/src/plugins/cmakeprojectmanager/cmaketoolsettingsaccessor.cpp @@ -85,9 +85,9 @@ static std::vector<std::unique_ptr<CMakeTool>> autoDetectCMakeTools() } if (HostOsInfo::isMacHost()) { - path.append(FilePath::fromString("/Applications/CMake.app/Contents/bin")); - path.append(FilePath::fromString("/usr/local/bin")); - path.append(FilePath::fromString("/opt/local/bin")); + path.append("/Applications/CMake.app/Contents/bin"); + path.append("/usr/local/bin"); + path.append("/opt/local/bin"); } const QStringList execs = env.appendExeExtensions(QLatin1String("cmake")); diff --git a/src/plugins/coreplugin/coreicons.cpp b/src/plugins/coreplugin/coreicons.cpp index 516d95d936..1f10b74bdf 100644 --- a/src/plugins/coreplugin/coreicons.cpp +++ b/src/plugins/coreplugin/coreicons.cpp @@ -31,28 +31,28 @@ namespace Core { namespace Icons { const Icon QTCREATORLOGO_BIG( - QLatin1String(":/core/images/qtcreatorlogo-big.png")); + ":/core/images/qtcreatorlogo-big.png"); const Icon FIND_CASE_INSENSITIVELY( - QLatin1String(":/find/images/casesensitively.png")); + ":/find/images/casesensitively.png"); const Icon FIND_WHOLE_WORD( - QLatin1String(":/find/images/wholewords.png")); + ":/find/images/wholewords.png"); const Icon FIND_REGEXP( - QLatin1String(":/find/images/regexp.png")); + ":/find/images/regexp.png"); const Icon FIND_PRESERVE_CASE( - QLatin1String(":/find/images/preservecase.png")); + ":/find/images/preservecase.png"); const Icon MODE_EDIT_CLASSIC( - QLatin1String(":/fancyactionbar/images/mode_Edit.png")); + ":/fancyactionbar/images/mode_Edit.png"); const Icon MODE_EDIT_FLAT({ - {QLatin1String(":/fancyactionbar/images/mode_edit_mask.png"), Theme::IconsBaseColor}}); + {":/fancyactionbar/images/mode_edit_mask.png", Theme::IconsBaseColor}}); const Icon MODE_EDIT_FLAT_ACTIVE({ - {QLatin1String(":/fancyactionbar/images/mode_edit_mask.png"), Theme::IconsModeEditActiveColor}}); + {":/fancyactionbar/images/mode_edit_mask.png", Theme::IconsModeEditActiveColor}}); const Icon MODE_DESIGN_CLASSIC( - QLatin1String(":/fancyactionbar/images/mode_Design.png")); + ":/fancyactionbar/images/mode_Design.png"); const Icon MODE_DESIGN_FLAT({ - {QLatin1String(":/fancyactionbar/images/mode_design_mask.png"), Theme::IconsBaseColor}}); + {":/fancyactionbar/images/mode_design_mask.png", Theme::IconsBaseColor}}); const Icon MODE_DESIGN_FLAT_ACTIVE({ - {QLatin1String(":/fancyactionbar/images/mode_design_mask.png"), Theme::IconsModeDesignActiveColor}}); + {":/fancyactionbar/images/mode_design_mask.png", Theme::IconsModeDesignActiveColor}}); } // namespace Icons } // namespace Core diff --git a/src/plugins/coreplugin/dialogs/ioptionspage.cpp b/src/plugins/coreplugin/dialogs/ioptionspage.cpp index 6f03c23668..981a3d8678 100644 --- a/src/plugins/coreplugin/dialogs/ioptionspage.cpp +++ b/src/plugins/coreplugin/dialogs/ioptionspage.cpp @@ -185,7 +185,7 @@ void IOptionsPage::finish() */ void IOptionsPage::setCategoryIconPath(const QString &categoryIconPath) { - m_categoryIcon = Icon({{categoryIconPath, Theme::PanelTextColorDark}}, Icon::Tint); + m_categoryIcon = Icon({{FilePath::fromString(categoryIconPath), Theme::PanelTextColorDark}}, Icon::Tint); } void IOptionsPage::setSettings(AspectContainer *settings) diff --git a/src/plugins/coreplugin/patchtool.cpp b/src/plugins/coreplugin/patchtool.cpp index 4e43d6d5ea..ce40a79d01 100644 --- a/src/plugins/coreplugin/patchtool.cpp +++ b/src/plugins/coreplugin/patchtool.cpp @@ -104,7 +104,7 @@ static bool runPatchHelper(const QByteArray &input, const QString &workingDirect .arg(QDir::toNativeSeparators(workingDirectory), QDir::toNativeSeparators(patch), args.join(QLatin1Char(' ')))); - patchProcess.setCommand({patch, args}); + patchProcess.setCommand({FilePath::fromString(patch), args}); patchProcess.setWriteData(input); patchProcess.start(); if (!patchProcess.waitForStarted()) { diff --git a/src/plugins/cppeditor/fileandtokenactions_test.cpp b/src/plugins/cppeditor/fileandtokenactions_test.cpp index 06da943077..719dc92fe4 100644 --- a/src/plugins/cppeditor/fileandtokenactions_test.cpp +++ b/src/plugins/cppeditor/fileandtokenactions_test.cpp @@ -195,7 +195,7 @@ TestActionsTestCase::TestActionsTestCase(const Actions &tokenActions, const Acti const Snapshot snapshot = globalSnapshot(); Document::Ptr document = snapshot.preprocessedDocument( - editorWidget->document()->toPlainText().toUtf8(), filePath); + editorWidget->document()->toPlainText().toUtf8(), Utils::FilePath::fromString(filePath)); QVERIFY(document); document->parse(); TranslationUnit *translationUnit = document->translationUnit(); diff --git a/src/plugins/cpptools/cppcodemodelsettings.cpp b/src/plugins/cpptools/cppcodemodelsettings.cpp index e62cec22c8..8c85fd02dd 100644 --- a/src/plugins/cpptools/cppcodemodelsettings.cpp +++ b/src/plugins/cpptools/cppcodemodelsettings.cpp @@ -77,7 +77,7 @@ static FilePath fallbackClangdFilePath() { if (g_defaultClangdFilePath.exists()) return g_defaultClangdFilePath; - return FilePath::fromString("clangd"); + return "clangd"; } static Utils::Id clangDiagnosticConfigIdFromSettings(QSettings *s) diff --git a/src/plugins/cpptools/cppfindreferences.cpp b/src/plugins/cpptools/cppfindreferences.cpp index 9180e7d15a..9c96b5e44e 100644 --- a/src/plugins/cpptools/cppfindreferences.cpp +++ b/src/plugins/cpptools/cppfindreferences.cpp @@ -58,6 +58,7 @@ using namespace Core; using namespace ProjectExplorer; +using namespace Utils; namespace CppTools { @@ -618,7 +619,7 @@ CPlusPlus::Symbol *CppFindReferences::findSymbol(const CppFindReferencesParamete QByteArray source = getSource(Utils::FilePath::fromString(newSymbolDocument->fileName()), m_modelManager->workingCopy()); CPlusPlus::Document::Ptr doc = - snapshot.preprocessedDocument(source, newSymbolDocument->fileName()); + snapshot.preprocessedDocument(source, FilePath::fromString(newSymbolDocument->fileName())); doc->check(); // find matching symbol in new document and return the new parameters diff --git a/src/plugins/cpptools/cppmodelmanager.cpp b/src/plugins/cpptools/cppmodelmanager.cpp index 920e2353b0..54d7db6faa 100644 --- a/src/plugins/cpptools/cppmodelmanager.cpp +++ b/src/plugins/cpptools/cppmodelmanager.cpp @@ -364,7 +364,8 @@ bool CppModelManager::positionRequiresSignal(const QString &filePath, const QByt fixedContent.insert(position, 'x'); const Snapshot snapshot = this->snapshot(); - const Document::Ptr document = snapshot.preprocessedDocument(fixedContent, filePath); + const Document::Ptr document = snapshot.preprocessedDocument(fixedContent, + Utils::FilePath::fromString(filePath)); document->check(); QTextDocument textDocument(QString::fromUtf8(fixedContent)); QTextCursor cursor(&textDocument); diff --git a/src/plugins/cpptools/cpprefactoringchanges.cpp b/src/plugins/cpptools/cpprefactoringchanges.cpp index d452204756..c05b264730 100644 --- a/src/plugins/cpptools/cpprefactoringchanges.cpp +++ b/src/plugins/cpptools/cpprefactoringchanges.cpp @@ -163,10 +163,9 @@ Document::Ptr CppRefactoringFile::cppDocument() const if (!m_cppDocument || !m_cppDocument->translationUnit() || !m_cppDocument->translationUnit()->ast()) { const QByteArray source = document()->toPlainText().toUtf8(); - const QString name = filePath().toString(); const Snapshot &snapshot = data()->m_snapshot; - m_cppDocument = snapshot.preprocessedDocument(source, name); + m_cppDocument = snapshot.preprocessedDocument(source, filePath()); m_cppDocument->check(); } diff --git a/src/plugins/cpptools/cppsemanticinfoupdater.cpp b/src/plugins/cpptools/cppsemanticinfoupdater.cpp index 0c94c7715c..64819115aa 100644 --- a/src/plugins/cpptools/cppsemanticinfoupdater.cpp +++ b/src/plugins/cpptools/cppsemanticinfoupdater.cpp @@ -118,7 +118,8 @@ SemanticInfo SemanticInfoUpdaterPrivate::update(const SemanticInfo::Source &sour newSemanticInfo.revision = source.revision; newSemanticInfo.snapshot = source.snapshot; - Document::Ptr doc = newSemanticInfo.snapshot.preprocessedDocument(source.code, source.fileName); + Document::Ptr doc = newSemanticInfo.snapshot.preprocessedDocument(source.code, + Utils::FilePath::fromString(source.fileName)); if (processor) doc->control()->setTopLevelDeclarationProcessor(processor); doc->check(); diff --git a/src/plugins/cpptools/cpptoolsjsextension.cpp b/src/plugins/cpptools/cpptoolsjsextension.cpp index 64df64c101..04104d1526 100644 --- a/src/plugins/cpptools/cpptoolsjsextension.cpp +++ b/src/plugins/cpptools/cpptoolsjsextension.cpp @@ -164,7 +164,8 @@ bool CppToolsJsExtension::hasQObjectParent(const QString &klassName) const return false; source = file.readAll(); } - const auto doc = snapshot.preprocessedDocument(source, item->fileName()); + const auto doc = snapshot.preprocessedDocument(source, + Utils::FilePath::fromString(item->fileName())); if (!doc) return false; doc->check(); diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp index d6d1f2da78..e053ebd1be 100644 --- a/src/plugins/debugger/cdb/cdbengine.cpp +++ b/src/plugins/debugger/cdb/cdbengine.cpp @@ -2453,7 +2453,7 @@ static CPlusPlus::Document::Ptr getParsedDocument(const Utils::FilePath &filePat else src = QString::fromLocal8Bit(filePath.fileContents()).toUtf8(); - CPlusPlus::Document::Ptr doc = snapshot.preprocessedDocument(src, filePath.toString()); + CPlusPlus::Document::Ptr doc = snapshot.preprocessedDocument(src, filePath); doc->parse(); return doc; } diff --git a/src/plugins/debugger/debuggerruncontrol.cpp b/src/plugins/debugger/debuggerruncontrol.cpp index 9349ee0bf8..c9a9a52687 100644 --- a/src/plugins/debugger/debuggerruncontrol.cpp +++ b/src/plugins/debugger/debuggerruncontrol.cpp @@ -1038,7 +1038,7 @@ DebugServerRunner::DebugServerRunner(RunControl *runControl, DebugServerPortsGat } else { debugServer.command.setExecutable(FilePath::fromString(runControl->device()->debugServerPath())); if (debugServer.command.isEmpty()) - debugServer.command.setExecutable(FilePath::fromString("gdbserver")); + debugServer.command.setExecutable("gdbserver"); args.clear(); if (debugServer.command.executable().toString().contains("lldb-server")) { args.append("platform"); diff --git a/src/plugins/designer/qtcreatorintegration.cpp b/src/plugins/designer/qtcreatorintegration.cpp index 5460377554..8ff7371360 100644 --- a/src/plugins/designer/qtcreatorintegration.cpp +++ b/src/plugins/designer/qtcreatorintegration.cpp @@ -66,6 +66,7 @@ using namespace Designer::Internal; using namespace CPlusPlus; using namespace TextEditor; using namespace ProjectExplorer; +using namespace Utils; static QString msgClassNotFound(const QString &uiClassName, const QList<Document::Ptr> &docList) { @@ -413,7 +414,7 @@ static Document::Ptr getParsedDocument(const QString &fileName, src = QString::fromLocal8Bit(reader.data()).toUtf8(); } - Document::Ptr doc = snapshot.preprocessedDocument(src, fileName); + Document::Ptr doc = snapshot.preprocessedDocument(src, FilePath::fromString(fileName)); doc->check(); snapshot.insert(doc); return doc; diff --git a/src/plugins/docker/dockerbuildstep.cpp b/src/plugins/docker/dockerbuildstep.cpp index debda46aba..52c6c6cf45 100644 --- a/src/plugins/docker/dockerbuildstep.cpp +++ b/src/plugins/docker/dockerbuildstep.cpp @@ -106,7 +106,7 @@ private: MacroExpander *expander = target()->kit()->macroExpander(); CommandLine cmd; if (dockerBuildDevice()) { - CommandLine dockerCmd(QString::fromLatin1(DOCKER_COMMAND)); + CommandLine dockerCmd(DOCKER_COMMAND); QString dockerCommand = m_dockerCommand->value(); // Sneak working directory into docker "run" or "exec" call @@ -119,7 +119,7 @@ private: dockerCmd.addArgs(expander->expand(m_command->value()), CommandLine::Raw); cmd = dockerCmd; } else { - CommandLine localCmd(expander->expand(m_command->value())); + CommandLine localCmd(FilePath::fromString(expander->expand(m_command->value()))); cmd = localCmd; } cmd.addArgs(expander->expand(m_arguments->value()), CommandLine::Raw); diff --git a/src/plugins/docker/dockerdevice.cpp b/src/plugins/docker/dockerdevice.cpp index 83bb5bbe0a..256939c4ad 100644 --- a/src/plugins/docker/dockerdevice.cpp +++ b/src/plugins/docker/dockerdevice.cpp @@ -214,7 +214,7 @@ class DockerPortsGatheringMethod : public PortsGatheringMethod // /proc/net/tcp* covers /proc/net/tcp and /proc/net/tcp6 Runnable runnable; - runnable.command.setExecutable(FilePath::fromString("sed")); + runnable.command.setExecutable("sed"); runnable.command.setArguments("-e 's/.*: [[:xdigit:]]*:\\([[:xdigit:]]\\{4\\}\\).*/\\1/g' /proc/net/tcp*"); return runnable; } diff --git a/src/plugins/git/gerrit/gerritmodel.cpp b/src/plugins/git/gerrit/gerritmodel.cpp index 836ed55fd1..aae9f0ede7 100644 --- a/src/plugins/git/gerrit/gerritmodel.cpp +++ b/src/plugins/git/gerrit/gerritmodel.cpp @@ -321,9 +321,10 @@ void QueryContext::start() fp->setKeepOnFinish(Core::FutureProgress::HideOnFinish); m_progress.reportStarted(); // Order: synchronous call to error handling if something goes wrong. - VcsOutputWindow::appendCommand(m_process.workingDirectory().toString(), {m_binary, m_arguments}); + VcsOutputWindow::appendCommand(m_process.workingDirectory().toString(), + {FilePath::fromString(m_binary), m_arguments}); m_timer.start(); - m_process.setCommand({m_binary, m_arguments}); + m_process.setCommand({FilePath::fromString(m_binary), m_arguments}); m_process.start(); } diff --git a/src/plugins/git/gerrit/gerritserver.cpp b/src/plugins/git/gerrit/gerritserver.cpp index b678bde9ae..8e10ec3443 100644 --- a/src/plugins/git/gerrit/gerritserver.cpp +++ b/src/plugins/git/gerrit/gerritserver.cpp @@ -245,7 +245,7 @@ int GerritServer::testConnection() static GitClient *const client = GitClient::instance(); const QStringList arguments = curlArguments() << (url(RestUrl) + accountUrlC); QtcProcess proc; - client->vcsFullySynchronousExec(proc, {}, {curlBinary, arguments}, + client->vcsFullySynchronousExec(proc, {}, {FilePath::fromString(curlBinary), arguments}, Core::ShellCommand::NoOutput); if (proc.result() == QtcProcess::FinishedWithSuccess) { QString output = proc.stdOut(); @@ -346,7 +346,7 @@ void GerritServer::resolveVersion(const GerritParameters &p, bool forceReload) if (port) arguments << p.portFlag << QString::number(port); arguments << hostArgument() << "gerrit" << "version"; - client->vcsFullySynchronousExec(proc, {}, {p.ssh, arguments}, + client->vcsFullySynchronousExec(proc, {}, {FilePath::fromString(p.ssh), arguments}, Core::ShellCommand::NoOutput); QString stdOut = proc.stdOut().trimmed(); stdOut.remove("gerrit version "); @@ -354,7 +354,7 @@ void GerritServer::resolveVersion(const GerritParameters &p, bool forceReload) } else { const QStringList arguments = curlArguments() << (url(RestUrl) + versionUrlC); QtcProcess proc; - client->vcsFullySynchronousExec(proc, {}, {curlBinary, arguments}, + client->vcsFullySynchronousExec(proc, {}, {FilePath::fromString(curlBinary), arguments}, Core::ShellCommand::NoOutput); // REST endpoint for version is only available from 2.8 and up. Do not consider invalid // if it fails. diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index edfad745ca..3898758558 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -2593,7 +2593,8 @@ bool GitClient::tryLauchingGitK(const Environment &env, arguments.append(ProcessArgs::splitArgs(gitkOpts, HostOsInfo::hostOs())); if (!fileName.isEmpty()) arguments << "--" << fileName; - VcsOutputWindow::appendCommand(workingDirectory.toString(), {binary, arguments}); + VcsOutputWindow::appendCommand(workingDirectory.toString(), + {FilePath::fromString(binary), arguments}); // This should always use QProcess::startDetached (as not to kill // the child), but that does not have an environment parameter. bool success = false; diff --git a/src/plugins/glsleditor/glslcompletionassist.cpp b/src/plugins/glsleditor/glslcompletionassist.cpp index 063562d207..c818791ee1 100644 --- a/src/plugins/glsleditor/glslcompletionassist.cpp +++ b/src/plugins/glsleditor/glslcompletionassist.cpp @@ -150,7 +150,7 @@ static QIcon glslIcon(IconTypes iconType) using namespace CPlusPlus; using namespace Utils; - const QString member = QLatin1String(":/codemodel/images/member.png"); + const char member[] = ":/codemodel/images/member.png"; switch (iconType) { case IconTypeType: diff --git a/src/plugins/imageviewer/imageviewer.cpp b/src/plugins/imageviewer/imageviewer.cpp index b7c6612238..c676fe22d5 100644 --- a/src/plugins/imageviewer/imageviewer.cpp +++ b/src/plugins/imageviewer/imageviewer.cpp @@ -103,7 +103,7 @@ void ImageViewer::ctor() d->ui_toolbar.toolButtonExportImage->setIcon(Utils::Icons::EXPORTFILE_TOOLBAR.icon()); d->ui_toolbar.toolButtonMultiExportImages->setIcon(Utils::Icons::MULTIEXPORTFILE_TOOLBAR.icon()); const Utils::Icon backgroundIcon({ - {QLatin1String(":/utils/images/desktopdevicesmall.png"), Utils::Theme::IconsBaseColor}}); + {":/utils/images/desktopdevicesmall.png", Utils::Theme::IconsBaseColor}}); d->ui_toolbar.toolButtonBackground->setIcon(backgroundIcon.icon()); d->ui_toolbar.toolButtonOutline->setIcon(Utils::Icons::BOUNDING_RECT.icon()); d->ui_toolbar.toolButtonZoomIn->setIcon( diff --git a/src/plugins/ios/iosbuildstep.cpp b/src/plugins/ios/iosbuildstep.cpp index 05904fae34..8c518e3a00 100644 --- a/src/plugins/ios/iosbuildstep.cpp +++ b/src/plugins/ios/iosbuildstep.cpp @@ -246,7 +246,7 @@ QStringList IosBuildStep::defaultArguments() const FilePath IosBuildStep::buildCommand() const { - return FilePath::fromString("xcodebuild"); // add path? + return "xcodebuild"; // add path? } void IosBuildStep::doRun() diff --git a/src/plugins/mcusupport/mcusupportplugin.cpp b/src/plugins/mcusupport/mcusupportplugin.cpp index a318928f19..d004aa42dd 100644 --- a/src/plugins/mcusupport/mcusupportplugin.cpp +++ b/src/plugins/mcusupport/mcusupportplugin.cpp @@ -84,8 +84,7 @@ bool McuSupportPlugin::initialize(const QStringList& arguments, QString* errorSt McuSupportOptions::registerQchFiles(); McuSupportOptions::registerExamples(); - ProjectExplorer::JsonWizardFactory::addWizardPath( - Utils::FilePath::fromString(":/mcusupport/wizards/")); + ProjectExplorer::JsonWizardFactory::addWizardPath(":/mcusupport/wizards/"); return true; } diff --git a/src/plugins/nim/project/nimtoolchain.cpp b/src/plugins/nim/project/nimtoolchain.cpp index 7a8c8d0189..bfa4798eb8 100644 --- a/src/plugins/nim/project/nimtoolchain.cpp +++ b/src/plugins/nim/project/nimtoolchain.cpp @@ -83,7 +83,7 @@ void NimToolChain::addToEnvironment(Environment &env) const FilePath NimToolChain::makeCommand(const Environment &env) const { const FilePath tmp = env.searchInPath("make"); - return tmp.isEmpty() ? FilePath::fromString("make") : tmp; + return tmp.isEmpty() ? FilePath("make") : tmp; } QList<Utils::OutputLineParser *> NimToolChain::createOutputParsers() const diff --git a/src/plugins/perforce/perforcechecker.cpp b/src/plugins/perforce/perforcechecker.cpp index 6c1c7f2f00..373350fabe 100644 --- a/src/plugins/perforce/perforcechecker.cpp +++ b/src/plugins/perforce/perforcechecker.cpp @@ -89,7 +89,7 @@ void PerforceChecker::start(const QString &binary, const QString &workingDirecto if (!workingDirectory.isEmpty()) m_process.setWorkingDirectory(workingDirectory); - m_process.setCommand({m_binary, args}); + m_process.setCommand({FilePath::fromString(m_binary), args}); m_process.start(); // Timeout handling m_timeOutMS = timeoutMS; diff --git a/src/plugins/perforce/perforceplugin.cpp b/src/plugins/perforce/perforceplugin.cpp index 0cc78e5df4..3734704c96 100644 --- a/src/plugins/perforce/perforceplugin.cpp +++ b/src/plugins/perforce/perforceplugin.cpp @@ -1264,7 +1264,7 @@ PerforceResponse PerforcePluginPrivate::synchronousProcess(const QString &workin process.setStdOutCallback([](const QString &lines) { VcsOutputWindow::append(lines); }); } process.setTimeOutMessageBoxEnabled(true); - process.setCommand({m_settings.p4BinaryPath.value(), args}); + process.setCommand({m_settings.p4BinaryPath.filePath(), args}); process.setProcessUserEventWhileRunning(); process.runBlocking(); @@ -1309,7 +1309,7 @@ PerforceResponse PerforcePluginPrivate::fullySynchronousProcess(const QString &w process.setWorkingDirectory(workingDir); PerforceResponse response; - process.setCommand({m_settings.p4BinaryPath.value(), args}); + process.setCommand({m_settings.p4BinaryPath.filePath(), args}); process.setWriteData(stdInput); process.start(); @@ -1377,7 +1377,7 @@ PerforceResponse PerforcePluginPrivate::runP4Cmd(const FilePath &workingDir, actualArgs.append(args); if (flags & CommandToWindow) - VcsOutputWindow::appendCommand(workingDir.toString(), {m_settings.p4BinaryPath.value(), actualArgs}); + VcsOutputWindow::appendCommand(workingDir.toString(), {m_settings.p4BinaryPath.filePath(), actualArgs}); if (flags & ShowBusyCursor) QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); diff --git a/src/plugins/perfprofiler/perfprofilerruncontrol.cpp b/src/plugins/perfprofiler/perfprofilerruncontrol.cpp index c032edde37..4bdecd52db 100644 --- a/src/plugins/perfprofiler/perfprofilerruncontrol.cpp +++ b/src/plugins/perfprofiler/perfprofilerruncontrol.cpp @@ -153,7 +153,7 @@ public: arguments << "-o" << "-" << "--" << perfRunnable.command.executable().toString() << ProcessArgs::splitArgs(perfRunnable.command.arguments(), OsTypeLinux); - perfRunnable.command.setExecutable(FilePath::fromString("perf")); + perfRunnable.command.setExecutable("perf"); perfRunnable.command.setArguments(ProcessArgs::joinArgs(arguments, OsTypeLinux)); m_process->start(perfRunnable); } diff --git a/src/plugins/perfprofiler/perftracepointdialog.cpp b/src/plugins/perfprofiler/perftracepointdialog.cpp index ec6f5ba146..b439fd7cbe 100644 --- a/src/plugins/perfprofiler/perftracepointdialog.cpp +++ b/src/plugins/perfprofiler/perftracepointdialog.cpp @@ -41,11 +41,12 @@ #include <QPushButton> #include <QTimer> +using namespace ProjectExplorer; +using namespace Utils; + namespace PerfProfiler { namespace Internal { -using namespace ProjectExplorer; - PerfTracePointDialog::PerfTracePointDialog() : m_ui(new Ui::PerfTracePointDialog) { @@ -102,7 +103,7 @@ void PerfTracePointDialog::runScript() Runnable runnable; const QString elevate = m_ui->privilegesChooser->currentText(); if (elevate != QLatin1String("n.a.")) - runnable.command = {elevate, {"sh"}}; + runnable.command = {FilePath::fromString(elevate), {"sh"}}; else runnable.command = {"sh", {}}; diff --git a/src/plugins/projectexplorer/customparser.cpp b/src/plugins/projectexplorer/customparser.cpp index 7fbd9ffb58..8703b2c7c9 100644 --- a/src/plugins/projectexplorer/customparser.cpp +++ b/src/plugins/projectexplorer/customparser.cpp @@ -454,7 +454,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data() const QString pathPattern = "^([a-z\\./]+):(\\d+): error: ([^\\s].+)$"; QString workingDir = "/home/src/project"; - FilePath expandedFileName = FilePath::fromString("/home/src/project/main.c"); + FilePath expandedFileName = "/home/src/project/main.c"; QTest::newRow("simple error with expanded path") << "main.c:9: error: `sfasdf' undeclared (first use this function)" @@ -467,7 +467,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data() << Tasks({CompileTask(Task::Error, message, expandedFileName, 9)}) << QString(); - expandedFileName = FilePath::fromString("/home/src/project/subdir/main.c"); + expandedFileName = "/home/src/project/subdir/main.c"; QTest::newRow("simple error with subdir path") << "subdir/main.c:9: error: `sfasdf' undeclared (first use this function)" << workingDir diff --git a/src/plugins/projectexplorer/customwizard/customwizardscriptgenerator.cpp b/src/plugins/projectexplorer/customwizard/customwizardscriptgenerator.cpp index c56310a350..bb2253bdf2 100644 --- a/src/plugins/projectexplorer/customwizard/customwizardscriptgenerator.cpp +++ b/src/plugins/projectexplorer/customwizard/customwizardscriptgenerator.cpp @@ -36,6 +36,8 @@ #include <QDebug> #include <QSharedPointer> +using namespace Utils; + namespace ProjectExplorer { namespace Internal { @@ -108,7 +110,7 @@ static bool } process.setWorkingDirectory(workingDirectory); process.setTimeoutS(30); - const Utils::CommandLine cmd(binary, arguments); + const Utils::CommandLine cmd(FilePath::fromString(binary), arguments); if (CustomWizard::verbose()) qDebug("In %s, running:\n%s\n", qPrintable(workingDirectory), qPrintable(cmd.toUserOutput())); diff --git a/src/plugins/projectexplorer/devicesupport/idevicefactory.cpp b/src/plugins/projectexplorer/devicesupport/idevicefactory.cpp index 9281e8b739..675dcebd91 100644 --- a/src/plugins/projectexplorer/devicesupport/idevicefactory.cpp +++ b/src/plugins/projectexplorer/devicesupport/idevicefactory.cpp @@ -28,6 +28,8 @@ #include <utils/algorithm.h> #include <utils/icon.h> +using namespace Utils; + namespace ProjectExplorer { /*! @@ -105,7 +107,7 @@ void IDeviceFactory::setIcon(const QIcon &icon) m_icon = icon; } -void IDeviceFactory::setCombinedIcon(const QString &small, const QString &large) +void IDeviceFactory::setCombinedIcon(const FilePath &small, const FilePath &large) { using namespace Utils; m_icon = Icon::combinedIcon({Icon({{small, Theme::PanelTextColorDark}}, Icon::Tint), diff --git a/src/plugins/projectexplorer/devicesupport/idevicefactory.h b/src/plugins/projectexplorer/devicesupport/idevicefactory.h index 36ba7bf7d1..05bc2bf493 100644 --- a/src/plugins/projectexplorer/devicesupport/idevicefactory.h +++ b/src/plugins/projectexplorer/devicesupport/idevicefactory.h @@ -58,7 +58,7 @@ protected: void setDisplayName(const QString &displayName); void setIcon(const QIcon &icon); - void setCombinedIcon(const QString &small, const QString &large); + void setCombinedIcon(const Utils::FilePath &small, const Utils::FilePath &large); void setCanCreate(bool canCreate); void setConstructionFunction(const std::function<IDevice::Ptr ()> &constructor); diff --git a/src/plugins/projectexplorer/gccparser.cpp b/src/plugins/projectexplorer/gccparser.cpp index 96ac617beb..6479240c2b 100644 --- a/src/plugins/projectexplorer/gccparser.cpp +++ b/src/plugins/projectexplorer/gccparser.cpp @@ -1003,7 +1003,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() "Undefined symbols for architecture x86_64:\n" " \"SvgLayoutTest()\", referenced from:\n" " _main in main.cpp.o", - FilePath::fromString("main.cpp.o"))}) + "main.cpp.o")}) << QString(); QTest::newRow("ld: undefined member function reference") @@ -1013,7 +1013,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << (Tasks() << CompileTask(Task::Error, "error: undefined reference to 'llvm::DisableABIBreakingChecks'", - FilePath::fromString("gtest-clang-printing.cpp"))) + "gtest-clang-printing.cpp")) << QString(); const auto task = [](Task::TaskType type, const QString &msg, @@ -1364,7 +1364,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << Tasks{ CompileTask(Task::Error, "one or more PCH files were found, but they were invalid"), CompileTask(Task::Error, "use -Winvalid-pch for more information"), - CompileTask(Task::Error, ".pch/Qt6Core5Compat: No such file or directory", FilePath::fromString(".pch/Qt6Core5Compat")), + CompileTask(Task::Error, ".pch/Qt6Core5Compat: No such file or directory", ".pch/Qt6Core5Compat"), CompileTask(Task::Warning, "-Wformat-security ignored without -Wformat [-Wformat-security]")} << QString(); } diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp index 72da8fe626..e2955d4050 100644 --- a/src/plugins/projectexplorer/gcctoolchain.cpp +++ b/src/plugins/projectexplorer/gcctoolchain.cpp @@ -687,7 +687,7 @@ QStringList GccToolChain::suggestedMkspecList() const FilePath GccToolChain::makeCommand(const Environment &environment) const { const FilePath tmp = environment.searchInPath("make"); - return tmp.isEmpty() ? FilePath::fromString("make") : tmp; + return tmp.isEmpty() ? "make" : tmp; } QList<OutputLineParser *> GccToolChain::createOutputParsers() const @@ -1081,9 +1081,9 @@ static FilePaths findCompilerCandidates(const IDevice::Ptr &device, searchPaths << atmelSearchPathsFromRegistry(); searchPaths << renesasRl78SearchPathsFromRegistry(); if (HostOsInfo::isAnyUnixHost()) { - FilePath ccachePath = FilePath::fromString("/usr/lib/ccache/bin"); + FilePath ccachePath = "/usr/lib/ccache/bin"; if (!ccachePath.exists()) - ccachePath = FilePath::fromString("/usr/lib/ccache"); + ccachePath = "/usr/lib/ccache"; if (ccachePath.exists() && !searchPaths.contains(ccachePath)) searchPaths << ccachePath; } diff --git a/src/plugins/projectexplorer/gnumakeparser.cpp b/src/plugins/projectexplorer/gnumakeparser.cpp index d51a371060..1bf71ee760 100644 --- a/src/plugins/projectexplorer/gnumakeparser.cpp +++ b/src/plugins/projectexplorer/gnumakeparser.cpp @@ -344,7 +344,7 @@ void ProjectExplorerPlugin::testGnuMakeParserParsing_data() << (Tasks() << BuildSystemTask(Task::Warning, "overriding commands for target `xxxx.app/Contents/Info.plist'", - FilePath::fromString("Makefile"), 794)) + "Makefile", 794)) << QString() << QStringList(); } diff --git a/src/plugins/projectexplorer/msvctoolchain.cpp b/src/plugins/projectexplorer/msvctoolchain.cpp index cc637f17fe..37619e6a3d 100644 --- a/src/plugins/projectexplorer/msvctoolchain.cpp +++ b/src/plugins/projectexplorer/msvctoolchain.cpp @@ -241,7 +241,7 @@ static QVector<VisualStudioInstallation> detectVisualStudioFromVsWhere(const QSt vsWhereProcess.setCodec(QTextCodec::codecForName("UTF-8")); const int timeoutS = 5; vsWhereProcess.setTimeoutS(timeoutS); - vsWhereProcess.setCommand({vswhere, + vsWhereProcess.setCommand({FilePath::fromString(vswhere), {"-products", "*", "-prerelease", "-legacy", "-format", "json", "-utf8"}}); vsWhereProcess.runBlocking(); switch (vsWhereProcess.result()) { @@ -1504,7 +1504,7 @@ static const MsvcToolChain *findMsvcToolChain(const QString &displayedVarsBat) static QVersionNumber clangClVersion(const QString &clangClPath) { QtcProcess clangClProcess; - clangClProcess.setCommand({clangClPath, {"--version"}}); + clangClProcess.setCommand({FilePath::fromString(clangClPath), {"--version"}}); clangClProcess.runBlocking(); if (clangClProcess.result() != QtcProcess::FinishedWithSuccess) return {}; diff --git a/src/plugins/projectexplorer/project.cpp b/src/plugins/projectexplorer/project.cpp index b6ecb8e69b..d336a45e41 100644 --- a/src/plugins/projectexplorer/project.cpp +++ b/src/plugins/projectexplorer/project.cpp @@ -1100,7 +1100,7 @@ static Utils::FilePath constructTestPath(const char *basePath) { Utils::FilePath drive; if (Utils::HostOsInfo::isWindowsHost()) - drive = Utils::FilePath::fromString("C:"); + drive = "C:"; return drive + QLatin1String(basePath); } @@ -1304,7 +1304,7 @@ void ProjectExplorerPlugin::testProject_multipleBuildConfigs() QVERIFY(tempDir->isValid()); QString error; const FilePath projectDir = FilePath::fromString(tempDir->path() + "/generic-project"); - FileUtils::copyRecursively(FilePath::fromString(":/projectexplorer/testdata/generic-project"), + FileUtils::copyRecursively(":/projectexplorer/testdata/generic-project", projectDir, &error); QVERIFY2(error.isEmpty(), qPrintable(error)); const QFileInfoList files = QDir(projectDir.toString()).entryInfoList(QDir::Files | QDir::Dirs); diff --git a/src/plugins/projectexplorer/projectwelcomepage.cpp b/src/plugins/projectexplorer/projectwelcomepage.cpp index 9858cb48f3..64fc21f1c1 100644 --- a/src/plugins/projectexplorer/projectwelcomepage.cpp +++ b/src/plugins/projectexplorer/projectwelcomepage.cpp @@ -199,7 +199,7 @@ static QFont sizedFont(int size, const QWidget *widget, bool underline = false) static QPixmap pixmap(const QString &id, const Theme::Color &color) { const QString fileName = QString(":/welcome/images/%1.png").arg(id); - return Icon({{fileName, color}}, Icon::Tint).pixmap(); + return Icon({{FilePath::fromString(fileName), color}}, Icon::Tint).pixmap(); } class BaseDelegate : public QAbstractItemDelegate diff --git a/src/plugins/projectexplorer/toolchainsettingsaccessor.cpp b/src/plugins/projectexplorer/toolchainsettingsaccessor.cpp index 021cd0992f..7879955272 100644 --- a/src/plugins/projectexplorer/toolchainsettingsaccessor.cpp +++ b/src/plugins/projectexplorer/toolchainsettingsaccessor.cpp @@ -309,7 +309,7 @@ public: setLanguage(Constants::CXX_LANGUAGE_ID); setTypeDisplayName("Test Tool Chain"); setTargetAbiNoSignal(Abi::hostAbi()); - setCompilerCommand(FilePath::fromString("/tmp/test/gcc")); + setCompilerCommand("/tmp/test/gcc"); } static QList<TTC *> toolChains() { return m_toolChains; } @@ -321,7 +321,7 @@ public: WarningFlags warningFlags(const QStringList &cflags) const override { Q_UNUSED(cflags) return WarningFlags::NoWarnings; } BuiltInHeaderPathsRunner createBuiltInHeaderPathsRunner(const Utils::Environment &) const override { return BuiltInHeaderPathsRunner(); } void addToEnvironment(Environment &env) const override { Q_UNUSED(env) } - FilePath makeCommand(const Environment &) const override { return FilePath::fromString("make"); } + FilePath makeCommand(const Environment &) const override { return "make"; } QList<OutputLineParser *> createOutputParsers() const override { return {}; } std::unique_ptr<ToolChainConfigWidget> createConfigurationWidget() override { return nullptr; } bool operator ==(const ToolChain &other) const override { diff --git a/src/plugins/projectexplorer/userfileaccessor.cpp b/src/plugins/projectexplorer/userfileaccessor.cpp index f68bd9cd36..39749ba5a3 100644 --- a/src/plugins/projectexplorer/userfileaccessor.cpp +++ b/src/plugins/projectexplorer/userfileaccessor.cpp @@ -924,9 +924,7 @@ private: class TestProject : public Project { public: - TestProject() : Project("x-test/testproject", Utils::FilePath::fromString("/test/project")) { - setDisplayName("Test Project"); - } + TestProject() : Project("x-test/testproject", "/test/project") { setDisplayName("Test Project"); } bool needsConfiguration() const final { return false; } }; @@ -1021,7 +1019,7 @@ void ProjectExplorerPlugin::testUserFileAccessor_mergeSettings() sharedData.insert("shared1", "bar"); sharedData.insert("shared2", "baz"); sharedData.insert("shared3", "foooo"); - TestUserFileAccessor::RestoreData shared(FilePath::fromString("/shared/data"), sharedData); + TestUserFileAccessor::RestoreData shared("/shared/data", sharedData); QVariantMap data; data.insert("Version", accessor.currentVersion()); @@ -1030,7 +1028,7 @@ void ProjectExplorerPlugin::testUserFileAccessor_mergeSettings() data.insert("shared1", "bar1"); data.insert("unique1", 1234); data.insert("shared3", "foo"); - TestUserFileAccessor::RestoreData user(FilePath::fromString("/user/data"), data); + TestUserFileAccessor::RestoreData user("/user/data", data); TestUserFileAccessor::RestoreData result = accessor.mergeSettings(user, shared); QVERIFY(!result.hasIssue()); @@ -1056,10 +1054,10 @@ void ProjectExplorerPlugin::testUserFileAccessor_mergeSettingsEmptyUser() sharedData.insert("shared1", "bar"); sharedData.insert("shared2", "baz"); sharedData.insert("shared3", "foooo"); - TestUserFileAccessor::RestoreData shared(FilePath::fromString("/shared/data"), sharedData); + TestUserFileAccessor::RestoreData shared("/shared/data", sharedData); QVariantMap data; - TestUserFileAccessor::RestoreData user(FilePath::fromString("/shared/data"), data); + TestUserFileAccessor::RestoreData user("/shared/data", data); TestUserFileAccessor::RestoreData result = accessor.mergeSettings(user, shared); @@ -1073,7 +1071,7 @@ void ProjectExplorerPlugin::testUserFileAccessor_mergeSettingsEmptyShared() TestUserFileAccessor accessor(&project); QVariantMap sharedData; - TestUserFileAccessor::RestoreData shared(FilePath::fromString("/shared/data"), sharedData); + TestUserFileAccessor::RestoreData shared("/shared/data", sharedData); QVariantMap data; data.insert("Version", accessor.currentVersion()); @@ -1083,7 +1081,7 @@ void ProjectExplorerPlugin::testUserFileAccessor_mergeSettingsEmptyShared() data.insert("shared1", "bar1"); data.insert("unique1", 1234); data.insert("shared3", "foo"); - TestUserFileAccessor::RestoreData user(FilePath::fromString("/shared/data"), data); + TestUserFileAccessor::RestoreData user("/shared/data", data); TestUserFileAccessor::RestoreData result = accessor.mergeSettings(user, shared); diff --git a/src/plugins/projectexplorer/xcodebuildparser.cpp b/src/plugins/projectexplorer/xcodebuildparser.cpp index 8a63649e46..d967cd40b3 100644 --- a/src/plugins/projectexplorer/xcodebuildparser.cpp +++ b/src/plugins/projectexplorer/xcodebuildparser.cpp @@ -239,7 +239,7 @@ void ProjectExplorerPlugin::testXcodebuildParserParsing_data() << (Tasks() << CompileTask(Task::Warning, XcodebuildParser::tr("Replacing signature"), - FilePath::fromString("/somepath/somefile.app"))) + "/somepath/somefile.app")) << QString() << XcodebuildParser::InXcodebuild; diff --git a/src/plugins/python/pythonutils.cpp b/src/plugins/python/pythonutils.cpp index 043802e336..4340da3bac 100644 --- a/src/plugins/python/pythonutils.cpp +++ b/src/plugins/python/pythonutils.cpp @@ -140,10 +140,8 @@ QList<const StdIOSettings *> configuredPythonLanguageServer() using namespace LanguageClient; QList<const StdIOSettings *> result; for (const BaseSettings *setting : LanguageClientManager::currentSettings()) { - if (setting->m_languageFilter.isSupported(FilePath::fromString("foo.py"), - Constants::C_PY_MIMETYPE)) { + if (setting->m_languageFilter.isSupported("foo.py", Constants::C_PY_MIMETYPE)) result << dynamic_cast<const StdIOSettings *>(setting); - } } return result; } diff --git a/src/plugins/qmldesigner/components/componentcore/abstractaction.cpp b/src/plugins/qmldesigner/components/componentcore/abstractaction.cpp index ee684dc63a..50dc733a85 100644 --- a/src/plugins/qmldesigner/components/componentcore/abstractaction.cpp +++ b/src/plugins/qmldesigner/components/componentcore/abstractaction.cpp @@ -33,7 +33,7 @@ AbstractAction::AbstractAction(const QString &description) : m_defaultAction(new DefaultAction(description)) { const Utils::Icon defaultIcon({ - {QLatin1String(":/utils/images/select.png"), Utils::Theme::QmlDesigner_FormEditorForegroundColor}}, Utils::Icon::MenuTintedStyle); + {":/utils/images/select.png", Utils::Theme::QmlDesigner_FormEditorForegroundColor}}, Utils::Icon::MenuTintedStyle); action()->setIcon(defaultIcon.icon()); } diff --git a/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp b/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp index 77cd00d7fa..c26e029f54 100644 --- a/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp +++ b/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp @@ -919,13 +919,13 @@ void DesignerActionManager::createDefaultDesignerActions() using namespace FormatOperation; const Utils::Icon prevIcon({ - {QLatin1String(":/utils/images/prev.png"), Utils::Theme::QmlDesigner_FormEditorForegroundColor}}, Utils::Icon::MenuTintedStyle); + {":/utils/images/prev.png", Utils::Theme::QmlDesigner_FormEditorForegroundColor}}, Utils::Icon::MenuTintedStyle); const Utils::Icon nextIcon({ - {QLatin1String(":/utils/images/next.png"), Utils::Theme::QmlDesigner_FormEditorForegroundColor}}, Utils::Icon::MenuTintedStyle); + {":/utils/images/next.png", Utils::Theme::QmlDesigner_FormEditorForegroundColor}}, Utils::Icon::MenuTintedStyle); const Utils::Icon addIcon({ - {QLatin1String(":/utils/images/plus.png"), Utils::Theme::QmlDesigner_FormEditorForegroundColor}}, Utils::Icon::MenuTintedStyle); + {":/utils/images/plus.png", Utils::Theme::QmlDesigner_FormEditorForegroundColor}}, Utils::Icon::MenuTintedStyle); addDesignerAction(new SelectionModelNodeAction( selectionCategoryDisplayName, diff --git a/src/plugins/qmldesigner/components/sourcetool/sourcetool.cpp b/src/plugins/qmldesigner/components/sourcetool/sourcetool.cpp index d121e60c73..9d49adb41d 100644 --- a/src/plugins/qmldesigner/components/sourcetool/sourcetool.cpp +++ b/src/plugins/qmldesigner/components/sourcetool/sourcetool.cpp @@ -74,7 +74,7 @@ public: SourceToolAction() : AbstractAction(QCoreApplication::translate("SourceToolAction","Change Source URL...")) { const Utils::Icon prevIcon({ - {QLatin1String(":/utils/images/fileopen.png"), Utils::Theme::OutputPanes_NormalMessageTextColor}}, Utils::Icon::MenuTintedStyle); + {":/utils/images/fileopen.png", Utils::Theme::OutputPanes_NormalMessageTextColor}}, Utils::Icon::MenuTintedStyle); action()->setIcon(prevIcon.icon()); } diff --git a/src/plugins/qmldesigner/qmldesignericons.h b/src/plugins/qmldesigner/qmldesignericons.h index b112b11d14..b4a97d8fae 100644 --- a/src/plugins/qmldesigner/qmldesignericons.h +++ b/src/plugins/qmldesigner/qmldesignericons.h @@ -31,56 +31,56 @@ namespace QmlDesigner { namespace Icons { const Utils::Icon ARROW_UP({ - {QLatin1String(":/navigator/icon/arrowup.png"), Utils::Theme::IconsBaseColor}}); + {":/navigator/icon/arrowup.png", Utils::Theme::IconsBaseColor}}); const Utils::Icon ARROW_RIGHT({ - {QLatin1String(":/navigator/icon/arrowright.png"), Utils::Theme::IconsBaseColor}}); + {":/navigator/icon/arrowright.png", Utils::Theme::IconsBaseColor}}); const Utils::Icon ARROW_DOWN({ - {QLatin1String(":/navigator/icon/arrowdown.png"), Utils::Theme::IconsBaseColor}}); + {":/navigator/icon/arrowdown.png", Utils::Theme::IconsBaseColor}}); const Utils::Icon ARROW_LEFT({ - {QLatin1String(":/navigator/icon/arrowleft.png"), Utils::Theme::IconsBaseColor}}); + {":/navigator/icon/arrowleft.png", Utils::Theme::IconsBaseColor}}); const Utils::Icon EXPORT_CHECKED(":/navigator/icon/export_checked.png"); const Utils::Icon EXPORT_UNCHECKED(":/navigator/icon/export_unchecked.png"); const Utils::Icon SNAPPING({ - {QLatin1String(":/icon/layout/snapping.png"), Utils::Theme::IconsBaseColor}}); + {":/icon/layout/snapping.png", Utils::Theme::IconsBaseColor}}); const Utils::Icon NO_SNAPPING({ - {QLatin1String(":/icon/layout/no_snapping.png"), Utils::Theme::IconsBaseColor}}); + {":/icon/layout/no_snapping.png", Utils::Theme::IconsBaseColor}}); const Utils::Icon NO_SNAPPING_AND_ANCHORING({ - {QLatin1String(":/icon/layout/snapping_and_anchoring.png"), Utils::Theme::IconsBaseColor}}); + {":/icon/layout/snapping_and_anchoring.png", Utils::Theme::IconsBaseColor}}); const Utils::Icon EDIT3D_LIGHT_ON({ - {QLatin1String(":/edit3d/images/edit_light_on.png"), Utils::Theme::QmlDesigner_HighlightColor}}); + {":/edit3d/images/edit_light_on.png", Utils::Theme::QmlDesigner_HighlightColor}}); const Utils::Icon EDIT3D_LIGHT_OFF({ - {QLatin1String(":/edit3d/images/edit_light_off.png"), Utils::Theme::IconsBaseColor}}); + {":/edit3d/images/edit_light_off.png", Utils::Theme::IconsBaseColor}}); const Utils::Icon EDIT3D_GRID_ON({ - {QLatin1String(":/edit3d/images/grid_on.png"), Utils::Theme::QmlDesigner_HighlightColor}}); + {":/edit3d/images/grid_on.png", Utils::Theme::QmlDesigner_HighlightColor}}); const Utils::Icon EDIT3D_GRID_OFF({ - {QLatin1String(":/edit3d/images/grid_off.png"), Utils::Theme::IconsBaseColor}}); + {":/edit3d/images/grid_off.png", Utils::Theme::IconsBaseColor}}); const Utils::Icon EDIT3D_SELECTION_MODE_ON({ - {QLatin1String(":/edit3d/images/select_group.png"), Utils::Theme::QmlDesigner_HighlightColor}}); + {":/edit3d/images/select_group.png", Utils::Theme::QmlDesigner_HighlightColor}}); const Utils::Icon EDIT3D_SELECTION_MODE_OFF({ - {QLatin1String(":/edit3d/images/select_item.png"), Utils::Theme::IconsBaseColor}}); + {":/edit3d/images/select_item.png", Utils::Theme::IconsBaseColor}}); const Utils::Icon EDIT3D_MOVE_TOOL_ON({ - {QLatin1String(":/edit3d/images/move_on.png"), Utils::Theme::QmlDesigner_HighlightColor}}); + {":/edit3d/images/move_on.png", Utils::Theme::QmlDesigner_HighlightColor}}); const Utils::Icon EDIT3D_MOVE_TOOL_OFF({ - {QLatin1String(":/edit3d/images/move_off.png"), Utils::Theme::IconsBaseColor}}); + {":/edit3d/images/move_off.png", Utils::Theme::IconsBaseColor}}); const Utils::Icon EDIT3D_ROTATE_TOOL_ON({ - {QLatin1String(":/edit3d/images/rotate_on.png"), Utils::Theme::QmlDesigner_HighlightColor}}); + {":/edit3d/images/rotate_on.png", Utils::Theme::QmlDesigner_HighlightColor}}); const Utils::Icon EDIT3D_ROTATE_TOOL_OFF({ - {QLatin1String(":/edit3d/images/rotate_off.png"), Utils::Theme::IconsBaseColor}}); + {":/edit3d/images/rotate_off.png", Utils::Theme::IconsBaseColor}}); const Utils::Icon EDIT3D_SCALE_TOOL_ON({ - {QLatin1String(":/edit3d/images/scale_on.png"), Utils::Theme::QmlDesigner_HighlightColor}}); + {":/edit3d/images/scale_on.png", Utils::Theme::QmlDesigner_HighlightColor}}); const Utils::Icon EDIT3D_SCALE_TOOL_OFF({ - {QLatin1String(":/edit3d/images/scale_off.png"), Utils::Theme::IconsBaseColor}}); + {":/edit3d/images/scale_off.png", Utils::Theme::IconsBaseColor}}); const Utils::Icon EDIT3D_FIT_SELECTED_OFF({ - {QLatin1String(":/edit3d/images/fit_selected.png"), Utils::Theme::IconsBaseColor}}); + {":/edit3d/images/fit_selected.png", Utils::Theme::IconsBaseColor}}); const Utils::Icon EDIT3D_EDIT_CAMERA_ON({ - {QLatin1String(":/edit3d/images/perspective_camera.png"), Utils::Theme::QmlDesigner_HighlightColor}}); + {":/edit3d/images/perspective_camera.png", Utils::Theme::QmlDesigner_HighlightColor}}); const Utils::Icon EDIT3D_EDIT_CAMERA_OFF({ - {QLatin1String(":/edit3d/images/orthographic_camera.png"), Utils::Theme::IconsBaseColor}}); + {":/edit3d/images/orthographic_camera.png", Utils::Theme::IconsBaseColor}}); const Utils::Icon EDIT3D_ORIENTATION_ON({ - {QLatin1String(":/edit3d/images/global.png"), Utils::Theme::QmlDesigner_HighlightColor}}); + {":/edit3d/images/global.png", Utils::Theme::QmlDesigner_HighlightColor}}); const Utils::Icon EDIT3D_ORIENTATION_OFF({ - {QLatin1String(":/edit3d/images/local.png"), Utils::Theme::IconsBaseColor}}); + {":/edit3d/images/local.png", Utils::Theme::IconsBaseColor}}); } // Icons } // QmlDesigner diff --git a/src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.cpp b/src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.cpp index 5aebc2243f..15f30b1025 100644 --- a/src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.cpp +++ b/src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.cpp @@ -56,7 +56,7 @@ void LocalQmlProfilerRunnerTest::testRunner() int runCount = 0; int stopCount = 0; - debuggee.command.setExecutable(Utils::FilePath::fromString("\\-/|\\-/")); + debuggee.command.setExecutable("\\-/|\\-/"); debuggee.environment = Utils::Environment::systemEnvironment(); // should not be used anywhere but cannot be empty @@ -110,7 +110,8 @@ void LocalQmlProfilerRunnerTest::testRunner() serverUrl = Utils::urlFromLocalSocket(); // comma is used to specify a test function. In this case, an invalid one. - debuggee.command = Utils::CommandLine(QCoreApplication::applicationFilePath(), {"-test", "QmlProfiler,"}); + debuggee.command = Utils::CommandLine(Utils::FilePath::fromString(QCoreApplication::applicationFilePath()), + {"-test", "QmlProfiler,"}); runControl = new ProjectExplorer::RunControl(ProjectExplorer::Constants::QML_PROFILER_RUN_MODE); runControl->setRunnable(debuggee); profiler = new LocalQmlProfilerSupport(runControl, serverUrl); diff --git a/src/plugins/qmlprofiler/tests/qmlprofilerdetailsrewriter_test.cpp b/src/plugins/qmlprofiler/tests/qmlprofilerdetailsrewriter_test.cpp index 418cc4641e..d54e096d8a 100644 --- a/src/plugins/qmlprofiler/tests/qmlprofilerdetailsrewriter_test.cpp +++ b/src/plugins/qmlprofiler/tests/qmlprofilerdetailsrewriter_test.cpp @@ -178,10 +178,9 @@ void QmlProfilerDetailsRewriterTest::testPopulateFileFinder() QCOMPARE(m_rewriter.getLocalFile("Test.qml"), QString()); // Test that the rewriter will populate from available projects if given nullptr as parameter. - DummyProject *project1 = new DummyProject(Utils::FilePath::fromString(":/nix.nix")); + DummyProject *project1 = new DummyProject(":/nix.nix"); ProjectExplorer::SessionManager::addProject(project1); - DummyProject *project2 = new DummyProject( - Utils::FilePath::fromString(":/qmlprofiler/tests/Test.qml")); + DummyProject *project2 = new DummyProject(":/qmlprofiler/tests/Test.qml"); ProjectExplorer::SessionManager::addProject(project2); m_rewriter.populateFileFinder(nullptr); QCOMPARE(m_rewriter.getLocalFile("Test.qml"), @@ -216,8 +215,7 @@ void QmlProfilerDetailsRewriterTest::seedRewriter() QVERIFY(!doc->source().isEmpty()); auto kit = std::make_unique<ProjectExplorer::Kit>(); - ProjectExplorer::SysRootKitAspect::setSysRoot( - kit.get(), Utils::FilePath::fromString("/nowhere")); + ProjectExplorer::SysRootKitAspect::setSysRoot(kit.get(), "/nowhere"); DummyProject *project = new DummyProject(Utils::FilePath::fromString(filename)); ProjectExplorer::SessionManager::addProject(project); diff --git a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp index a3587d99a1..1ecdc0630e 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp +++ b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp @@ -190,7 +190,7 @@ FilePath QmlProjectRunConfiguration::qmlRuntimeFilePath() const if (deviceType == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE) { // If not given explicitly by Qt Version, try to pick it from $PATH. const bool isDesktop = version->type() == QtSupport::Constants::DESKTOPQT; - return isDesktop ? version->qmlRuntimeFilePath() : FilePath::fromString("qmlscene"); + return isDesktop ? version->qmlRuntimeFilePath() : "qmlscene"; } IDevice::ConstPtr dev = DeviceKitAspect::device(kit); diff --git a/src/plugins/qnx/qnxdebugsupport.cpp b/src/plugins/qnx/qnxdebugsupport.cpp index bc7b0b2b60..d545f90461 100644 --- a/src/plugins/qnx/qnxdebugsupport.cpp +++ b/src/plugins/qnx/qnxdebugsupport.cpp @@ -202,7 +202,7 @@ public: const int pdebugPort = portsGatherer->gdbServer().port(); Runnable r; - r.command = {QString(QNX_DEBUG_EXECUTABLE), {QString::number(pdebugPort)}}; + r.command = {QNX_DEBUG_EXECUTABLE, {QString::number(pdebugPort)}}; doStart(r, runControl->device()); }); } diff --git a/src/plugins/qnx/slog2inforunner.cpp b/src/plugins/qnx/slog2inforunner.cpp index ae1ee57087..cd341899ad 100644 --- a/src/plugins/qnx/slog2inforunner.cpp +++ b/src/plugins/qnx/slog2inforunner.cpp @@ -109,7 +109,7 @@ void Slog2InfoRunner::handleTestProcessCompleted() void Slog2InfoRunner::readLaunchTime() { Runnable r; - r.command = CommandLine(FilePath::fromString("date"), "+\"%d %H:%M:%S\"", CommandLine::Raw); + r.command = CommandLine("date", "+\"%d %H:%M:%S\"", CommandLine::Raw); m_launchDateTimeProcess->start(r); } diff --git a/src/plugins/qtsupport/qtprojectimporter.cpp b/src/plugins/qtsupport/qtprojectimporter.cpp index 19e9054fb4..1127482bc7 100644 --- a/src/plugins/qtsupport/qtprojectimporter.cpp +++ b/src/plugins/qtsupport/qtprojectimporter.cpp @@ -376,8 +376,8 @@ void QtSupportPlugin::testQtProjectImporter_oneProject() // Customize kit numbers 1 and 2: QtKitAspect::setQtVersion(kitTemplates[1], nullptr); QtKitAspect::setQtVersion(kitTemplates[2], nullptr); - SysRootKitAspect::setSysRoot(kitTemplates[1], Utils::FilePath::fromString("/some/path")); - SysRootKitAspect::setSysRoot(kitTemplates[2], Utils::FilePath::fromString("/some/other/path")); + SysRootKitAspect::setSysRoot(kitTemplates[1], "/some/path"); + SysRootKitAspect::setSysRoot(kitTemplates[2], "/some/other/path"); QVector<Utils::FilePath> qmakePaths = {defaultQt->qmakeFilePath(), setupQmake(defaultQt, tempDir1.path().path()), diff --git a/src/plugins/remotelinux/linuxdevice.cpp b/src/plugins/remotelinux/linuxdevice.cpp index 8d2888ef61..a7636b5b15 100644 --- a/src/plugins/remotelinux/linuxdevice.cpp +++ b/src/plugins/remotelinux/linuxdevice.cpp @@ -144,7 +144,7 @@ class LinuxPortsGatheringMethod : public PortsGatheringMethod // /proc/net/tcp* covers /proc/net/tcp and /proc/net/tcp6 Runnable runnable; - runnable.command.setExecutable(FilePath::fromString("sed")); + runnable.command.setExecutable("sed"); runnable.command.setArguments("-e 's/.*: [[:xdigit:]]*:\\([[:xdigit:]]\\{4\\}\\).*/\\1/g' /proc/net/tcp*"); return runnable; } @@ -209,7 +209,7 @@ LinuxDevice::LinuxDevice() // It seems we cannot pass an environment to OpenSSH dynamically // without specifying an executable. if (env.size() > 0) - runnable.command.setExecutable(FilePath::fromString("/bin/sh")); + runnable.command.setExecutable("/bin/sh"); proc->setRunInTerminal(true); proc->start(runnable); diff --git a/src/plugins/remotelinux/remotelinuxenvironmentreader.cpp b/src/plugins/remotelinux/remotelinuxenvironmentreader.cpp index b2f359ecaf..6f477bdcce 100644 --- a/src/plugins/remotelinux/remotelinuxenvironmentreader.cpp +++ b/src/plugins/remotelinux/remotelinuxenvironmentreader.cpp @@ -59,7 +59,7 @@ void RemoteLinuxEnvironmentReader::start() connect(m_deviceProcess, &DeviceProcess::finished, this, &RemoteLinuxEnvironmentReader::remoteProcessFinished); Runnable runnable; - runnable.command.setExecutable(FilePath::fromString("env")); + runnable.command.setExecutable("env"); m_deviceProcess->start(runnable); } diff --git a/src/plugins/scxmleditor/common/mainwidget.cpp b/src/plugins/scxmleditor/common/mainwidget.cpp index 1b6af68e16..4f8e3e0759 100644 --- a/src/plugins/scxmleditor/common/mainwidget.cpp +++ b/src/plugins/scxmleditor/common/mainwidget.cpp @@ -83,6 +83,8 @@ using namespace ScxmlEditor::PluginInterface; using namespace ScxmlEditor::Common; using namespace ScxmlEditor::OutputPane; +using namespace Utils; + void msgHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg) { QString strOutput; @@ -159,7 +161,7 @@ static QIcon toolButtonIcon(ActionType actionType) return QIcon(); } - return Utils::Icon({{iconFileName, Utils::Theme::IconsBaseColor}}).icon(); + return Icon({{FilePath::fromString(iconFileName), Theme::IconsBaseColor}}).icon(); } MainWidget::MainWidget(QWidget *parent) diff --git a/src/plugins/studiowelcome/examplecheckout.cpp b/src/plugins/studiowelcome/examplecheckout.cpp index a1145ba764..1782b81747 100644 --- a/src/plugins/studiowelcome/examplecheckout.cpp +++ b/src/plugins/studiowelcome/examplecheckout.cpp @@ -219,7 +219,7 @@ FileExtractor::FileExtractor(QObject *parent) if (Core::DocumentManager::instance()) m_targetPath = Core::DocumentManager::projectsDirectory(); else - m_targetPath = Utils::FilePath::fromString("/temp/"); + m_targetPath = "/temp/"; m_timer.setInterval(500); m_timer.setSingleShot(false); diff --git a/src/plugins/subversion/subversionclient.cpp b/src/plugins/subversion/subversionclient.cpp index 8ddef09d0a..cd6e6663e9 100644 --- a/src/plugins/subversion/subversionclient.cpp +++ b/src/plugins/subversion/subversionclient.cpp @@ -152,7 +152,7 @@ QString SubversionClient::synchronousTopic(const FilePath &repository) const svnVersionBinary = svnVersionBinary.left(pos + 1); svnVersionBinary.append(HostOsInfo::withExecutableSuffix("svnversion")); QtcProcess proc; - vcsFullySynchronousExec(proc, repository, {svnVersionBinary, args}); + vcsFullySynchronousExec(proc, repository, {FilePath::fromString(svnVersionBinary), args}); if (proc.result() != QtcProcess::FinishedWithSuccess) return QString(); diff --git a/src/plugins/texteditor/formattexteditor.cpp b/src/plugins/texteditor/formattexteditor.cpp index be927da920..c06fe1aee2 100644 --- a/src/plugins/texteditor/formattexteditor.cpp +++ b/src/plugins/texteditor/formattexteditor.cpp @@ -90,7 +90,7 @@ static FormatTask format(FormatTask task) options.replaceInStrings(QLatin1String("%file"), sourceFile.filePath().toString()); QtcProcess process; process.setTimeoutS(5); - process.setCommand({executable, options}); + process.setCommand({FilePath::fromString(executable), options}); process.runBlocking(); if (process.result() != QtcProcess::FinishedWithSuccess) { task.error = QString(QT_TRANSLATE_NOOP("TextEditor", "Failed to format: %1.")) diff --git a/src/plugins/texteditor/highlightersettings.cpp b/src/plugins/texteditor/highlightersettings.cpp index 6dc5f9984b..9cd417882c 100644 --- a/src/plugins/texteditor/highlightersettings.cpp +++ b/src/plugins/texteditor/highlightersettings.cpp @@ -70,8 +70,8 @@ QString findFallbackDefinitionsLocation() } // Try kde-config. - const QStringList programs = {"kde-config", "kde4-config"}; - for (auto &program : programs) { + const Utils::FilePath programs[] = {"kde-config", "kde4-config"}; + for (const auto &program : programs) { Utils::QtcProcess process; process.setTimeoutS(5); process.setCommand({program, {"--prefix"}}); diff --git a/src/plugins/valgrind/valgrindengine.cpp b/src/plugins/valgrind/valgrindengine.cpp index 6c24c8c037..6b34dc809d 100644 --- a/src/plugins/valgrind/valgrindengine.cpp +++ b/src/plugins/valgrind/valgrindengine.cpp @@ -77,7 +77,7 @@ void ValgrindToolRunner::start() emit outputReceived(tr("Command line arguments: %1").arg(runnable().debuggeeArgs), LogMessageFormat); #endif - CommandLine valgrind{m_settings.valgrindExecutable.value()}; + CommandLine valgrind{m_settings.valgrindExecutable.filePath()}; valgrind.addArgs(m_settings.valgrindArguments.value(), CommandLine::Raw); valgrind.addArgs(genericToolArguments()); valgrind.addArgs(toolArguments()); diff --git a/src/plugins/valgrind/valgrindmemcheckparsertest.cpp b/src/plugins/valgrind/valgrindmemcheckparsertest.cpp index 2c35acc16a..5138018302 100644 --- a/src/plugins/valgrind/valgrindmemcheckparsertest.cpp +++ b/src/plugins/valgrind/valgrindmemcheckparsertest.cpp @@ -478,7 +478,7 @@ void ValgrindMemcheckParserTest::testValgrindGarbage() void ValgrindMemcheckParserTest::testParserStop() { ValgrindRunner runner; - runner.setValgrindCommand({fakeValgrindExecutable(), + runner.setValgrindCommand({FilePath::fromString(fakeValgrindExecutable()), {QString("--xml-socket=127.0.0.1:%1").arg(m_server->serverPort()), "-i", dataFile("memcheck-output-sample1.xml"), "--wait", "5" }}); runner.setProcessChannelMode(QProcess::ForwardedChannels); @@ -542,7 +542,7 @@ void ValgrindMemcheckParserTest::testValgrindStartError() debuggeeExecutable.environment = Utils::Environment::systemEnvironment(); ValgrindRunner runner; - runner.setValgrindCommand({valgrindExe, valgrindArgs}); + runner.setValgrindCommand({FilePath::fromString(valgrindExe), valgrindArgs}); runner.setDebuggee(debuggeeExecutable); runner.setDevice(ProjectExplorer::DeviceManager::instance()->defaultDevice( ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE)); diff --git a/src/plugins/valgrind/valgrindrunner.cpp b/src/plugins/valgrind/valgrindrunner.cpp index cfd3fd81ea..cfcf63a350 100644 --- a/src/plugins/valgrind/valgrindrunner.cpp +++ b/src/plugins/valgrind/valgrindrunner.cpp @@ -192,7 +192,7 @@ void ValgrindRunner::Private::remoteProcessStarted() Runnable findPid; // sleep required since otherwise we might only match "bash -c..." // and not the actual valgrind run - findPid.command.setExecutable(FilePath::fromString("/bin/sh")); + findPid.command.setExecutable("/bin/sh"); findPid.command.setArguments(QString("-c \"" "sleep 1; ps ax" // list all processes with aliased name " | grep '\\b%1.*%2'" // find valgrind process diff --git a/src/plugins/vcsbase/vcsbasesubmiteditor.cpp b/src/plugins/vcsbase/vcsbasesubmiteditor.cpp index bf8d538616..89e3a962ea 100644 --- a/src/plugins/vcsbase/vcsbasesubmiteditor.cpp +++ b/src/plugins/vcsbase/vcsbasesubmiteditor.cpp @@ -660,7 +660,7 @@ bool VcsBaseSubmitEditor::runSubmitMessageCheckScript(const QString &checkScript QtcProcess checkProcess; if (!d->m_checkScriptWorkingDirectory.isEmpty()) checkProcess.setWorkingDirectory(d->m_checkScriptWorkingDirectory); - checkProcess.setCommand({checkScript, {saver.filePath().toString()}}); + checkProcess.setCommand({FilePath::fromString(checkScript), {saver.filePath().toString()}}); checkProcess.start(); if (!checkProcess.waitForStarted()) { *errorMessage = tr("The check script \"%1\" could not be started: %2").arg(checkScript, checkProcess.errorString()); diff --git a/src/plugins/webassembly/webassemblyemsdk.cpp b/src/plugins/webassembly/webassemblyemsdk.cpp index 71f8f2d9f4..8033666cc0 100644 --- a/src/plugins/webassembly/webassemblyemsdk.cpp +++ b/src/plugins/webassembly/webassemblyemsdk.cpp @@ -53,14 +53,14 @@ static QString emSdkEnvOutput(const FilePath &sdkRoot) const QString cacheKey = sdkRoot.toString(); const bool isWindows = sdkRoot.osType() == OsTypeWindows; if (!emSdkEnvCache()->contains(cacheKey)) { - const QString scriptFile = sdkRoot.pathAppended(QLatin1String("emsdk_env") + - (isWindows ? ".bat" : ".sh")).path(); + const FilePath scriptFile = sdkRoot.pathAppended(QLatin1String("emsdk_env") + + (isWindows ? ".bat" : ".sh")); QtcProcess emSdkEnv; if (isWindows) { emSdkEnv.setCommand(CommandLine(scriptFile)); } else { // File needs to be source'd, not executed. - emSdkEnv.setCommand({sdkRoot.withNewPath("bash"), {"-c", ". " + scriptFile}}); + emSdkEnv.setCommand({sdkRoot.withNewPath("bash"), {"-c", ". " + scriptFile.path()}}); } emSdkEnv.runBlocking(); const QString output = emSdkEnv.allOutput(); diff --git a/src/plugins/welcome/welcomeplugin.cpp b/src/plugins/welcome/welcomeplugin.cpp index 9ec2b36bbf..3808ea4301 100644 --- a/src/plugins/welcome/welcomeplugin.cpp +++ b/src/plugins/welcome/welcomeplugin.cpp @@ -179,7 +179,8 @@ public: setToolTip(m_openUrl); const QString fileName = QString(":/welcome/images/%1.png").arg(iconSource); - const Icon icon({{fileName, Theme::Welcome_ForegroundPrimaryColor}}, Icon::Tint); + const Icon icon({{FilePath::fromString(fileName), Theme::Welcome_ForegroundPrimaryColor}}, + Icon::Tint); m_icon = new QLabel; m_icon->setPixmap(icon.pixmap()); diff --git a/src/plugins/winrt/winrtdevice.cpp b/src/plugins/winrt/winrtdevice.cpp index 4685106837..12f5a551df 100644 --- a/src/plugins/winrt/winrtdevice.cpp +++ b/src/plugins/winrt/winrtdevice.cpp @@ -149,7 +149,7 @@ void WinRtDeviceFactory::autoDetect() connect(m_process, &QtcProcess::finished, this, &WinRtDeviceFactory::onProcessFinished); } - const CommandLine cmd{runnerFilePath, {"--list-devices"}}; + const CommandLine cmd{FilePath::fromString(runnerFilePath), {"--list-devices"}}; m_process->setCommand(cmd); qCDebug(winrtDeviceLog) << __FUNCTION__ << "Starting process" << cmd.toUserOutput(); m_process->start(); diff --git a/src/shared/help/helpicons.h b/src/shared/help/helpicons.h index 0dfae1f093..f5aea7f360 100644 --- a/src/shared/help/helpicons.h +++ b/src/shared/help/helpicons.h @@ -31,11 +31,11 @@ namespace Help { namespace Icons { const Utils::Icon MODE_HELP_CLASSIC( - QLatin1String(":/help/images/mode_help.png")); + ":/help/images/mode_help.png"); const Utils::Icon MODE_HELP_FLAT({ - {QLatin1String(":/help/images/mode_help_mask.png"), Utils::Theme::IconsBaseColor}}); + {":/help/images/mode_help_mask.png", Utils::Theme::IconsBaseColor}}); const Utils::Icon MODE_HELP_FLAT_ACTIVE({ - {QLatin1String(":/help/images/mode_help_mask.png"), Utils::Theme::IconsModeHelpActiveColor}}); + {":/help/images/mode_help_mask.png", Utils::Theme::IconsModeHelpActiveColor}}); const Utils::Icon MACOS_TOUCHBAR_HELP( ":/help/images/macos_touchbar_help.png"); |