forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
+17
-12
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
+153
-153
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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(); });
|
||||
|
||||
@@ -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"));
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
@@ -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()));
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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"));
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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", {}};
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()));
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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 {};
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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());
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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()),
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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."))
|
||||
|
||||
@@ -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"}});
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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());
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user