summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libs/utils/delegates.cpp2
-rw-r--r--src/libs/utils/filepath.cpp15
-rw-r--r--src/libs/utils/filepath.h6
-rw-r--r--src/plugins/android/androidbuildapkstep.cpp4
-rw-r--r--src/plugins/android/javalanguageserver.cpp4
-rw-r--r--src/plugins/baremetal/debugservers/gdb/eblinkgdbserverprovider.cpp8
-rw-r--r--src/plugins/baremetal/debugservers/gdb/gdbserverprovider.cpp4
-rw-r--r--src/plugins/baremetal/debugservers/gdb/jlinkgdbserverprovider.cpp4
-rw-r--r--src/plugins/baremetal/debugservers/gdb/openocdgdbserverprovider.cpp12
-rw-r--r--src/plugins/baremetal/debugservers/gdb/stlinkutilgdbserverprovider.cpp4
-rw-r--r--src/plugins/baremetal/debugservers/uvsc/uvscserverprovider.cpp4
-rw-r--r--src/plugins/clangtools/clangtoolssettings.cpp8
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeprojectimporter.cpp2
-rw-r--r--src/plugins/cmakeprojectmanager/cmaketool.cpp2
-rw-r--r--src/plugins/coreplugin/documentmanager.cpp6
-rw-r--r--src/plugins/coreplugin/patchtool.cpp4
-rw-r--r--src/plugins/debugger/breakhandler.cpp4
-rw-r--r--src/plugins/debugger/debuggerdialogs.cpp16
-rw-r--r--src/plugins/debugger/debuggeritem.cpp8
-rw-r--r--src/plugins/debugger/debuggerplugin.cpp20
-rw-r--r--src/plugins/docker/dockerdevice.cpp4
-rw-r--r--src/plugins/git/gerrit/gerritparameters.cpp8
-rw-r--r--src/plugins/gitlab/gitlabparameters.cpp4
-rw-r--r--src/plugins/incredibuild/commandbuilder.cpp4
-rw-r--r--src/plugins/ios/iosdsymbuildstep.cpp4
-rw-r--r--src/plugins/languageclient/languageclientsettings.cpp4
-rw-r--r--src/plugins/mcusupport/mcukitmanager.cpp4
-rw-r--r--src/plugins/mesonprojectmanager/mesonwrapper.h4
-rw-r--r--src/plugins/mesonprojectmanager/ninjawrapper.h4
-rw-r--r--src/plugins/projectexplorer/deploymentdataview.cpp2
-rw-r--r--src/plugins/projectexplorer/devicesupport/devicefilesystemmodel.cpp2
-rw-r--r--src/plugins/projectexplorer/devicesupport/idevice.cpp12
-rw-r--r--src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp8
-rw-r--r--src/plugins/projectexplorer/jsonwizard/jsonsummarypage.cpp4
-rw-r--r--src/plugins/projectexplorer/jsonwizard/jsonwizardfilegenerator.cpp4
-rw-r--r--src/plugins/projectexplorer/projectexplorer.cpp2
-rw-r--r--src/plugins/projectexplorer/session.cpp8
-rw-r--r--src/plugins/projectexplorer/taskfile.cpp2
-rw-r--r--src/plugins/projectexplorer/toolchain.cpp12
-rw-r--r--src/plugins/python/pythonsettings.cpp4
-rw-r--r--src/plugins/qbsprojectmanager/qbsproject.cpp2
-rw-r--r--src/plugins/qmlprojectmanager/fileformat/qmlprojectfileformat.cpp2
-rw-r--r--src/plugins/qnx/qnxqtversion.cpp4
-rw-r--r--src/plugins/qnx/qnxtoolchain.cpp4
-rw-r--r--src/plugins/qtsupport/baseqtversion.cpp6
-rw-r--r--src/plugins/qtsupport/gettingstartedwelcomepage.cpp2
-rw-r--r--src/plugins/qtsupport/qtoptionspage.cpp2
-rw-r--r--src/plugins/remotelinux/deploymenttimeinfo.cpp2
-rw-r--r--src/plugins/scxmleditor/common/mainwidget.cpp4
-rw-r--r--src/plugins/texteditor/fontsettings.cpp4
-rw-r--r--src/plugins/texteditor/highlightersettings.cpp6
-rw-r--r--src/plugins/updateinfo/updateinfoplugin.cpp2
-rw-r--r--src/plugins/valgrind/memchecktool.cpp4
-rw-r--r--src/plugins/vcsbase/vcsbaseclient.cpp2
-rw-r--r--src/plugins/vcsbase/wizard/vcscommandpage.cpp2
-rw-r--r--src/tools/sdktool/adddebuggeroperation.cpp2
-rw-r--r--src/tools/sdktool/addkitoperation.cpp2
-rw-r--r--src/tools/sdktool/addqtoperation.cpp2
-rw-r--r--src/tools/sdktool/addtoolchainoperation.cpp2
59 files changed, 154 insertions, 139 deletions
diff --git a/src/libs/utils/delegates.cpp b/src/libs/utils/delegates.cpp
index d70ebe58b9..3b0623027b 100644
--- a/src/libs/utils/delegates.cpp
+++ b/src/libs/utils/delegates.cpp
@@ -128,7 +128,7 @@ QWidget *PathChooserDelegate::createEditor(QWidget *parent, const QStyleOptionVi
void PathChooserDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const
{
- if (auto *pathChooser = qobject_cast<PathChooser *>(editor)) {
+ if (auto pathChooser = qobject_cast<PathChooser *>(editor)) {
pathChooser->setExpectedKind(m_kind);
pathChooser->setPromptDialogFilter(m_filter);
pathChooser->setFilePath(FilePath::fromVariant(index.model()->data(index, Qt::EditRole)));
diff --git a/src/libs/utils/filepath.cpp b/src/libs/utils/filepath.cpp
index 7eb95343a6..e80247a70e 100644
--- a/src/libs/utils/filepath.cpp
+++ b/src/libs/utils/filepath.cpp
@@ -168,6 +168,11 @@ QFileInfo FilePath::toFileInfo() const
return QFileInfo(toFSPathString());
}
+FilePath FilePath::fromVariant(const QVariant &variant)
+{
+ return fromSettings(variant); // FIXME: Use variant.value<FilePath>()
+}
+
FilePath FilePath::fromParts(const QStringView scheme, const QStringView host, const QStringView path)
{
FilePath result;
@@ -989,7 +994,7 @@ FilePath FilePath::fromUtf8(const char *filename, int filenameSize)
return FilePath::fromString(QString::fromUtf8(filename, filenameSize));
}
-FilePath FilePath::fromVariant(const QVariant &variant)
+FilePath FilePath::fromSettings(const QVariant &variant)
{
if (variant.type() == QVariant::Url) {
const QUrl url = variant.toUrl();
@@ -998,11 +1003,17 @@ FilePath FilePath::fromVariant(const QVariant &variant)
return FilePath::fromUserInput(variant.toString());
}
-QVariant FilePath::toVariant() const
+QVariant FilePath::toSettings() const
{
return toString();
}
+QVariant FilePath::toVariant() const
+{
+ // FIXME: Use qVariantFromValue
+ return toSettings();
+}
+
/*!
\returns whether FilePath is a child of \a s
*/
diff --git a/src/libs/utils/filepath.h b/src/libs/utils/filepath.h
index 05a851d431..01050d70c3 100644
--- a/src/libs/utils/filepath.h
+++ b/src/libs/utils/filepath.h
@@ -62,6 +62,7 @@ public:
[[nodiscard]] static FilePath fromStringWithExtension(const QString &filepath, const QString &defaultExtension);
[[nodiscard]] static FilePath fromUserInput(const QString &filepath);
[[nodiscard]] static FilePath fromUtf8(const char *filepath, int filepathSize = -1);
+ [[nodiscard]] static FilePath fromSettings(const QVariant &variant);
[[nodiscard]] static FilePath fromVariant(const QVariant &variant);
[[nodiscard]] static FilePath fromParts(const QStringView scheme, const QStringView host, const QStringView path);
[[nodiscard]] static FilePath fromPathPart(const QStringView path);
@@ -69,7 +70,7 @@ public:
[[nodiscard]] static FilePath currentWorkingPath();
QString toUserOutput() const;
- QString toString() const;
+ QVariant toSettings() const;
QVariant toVariant() const;
QUrl toUrl() const;
@@ -236,6 +237,9 @@ public:
//! Returns a filepath the represents the same file on a local drive
expected_str<FilePath> localSource() const;
+ // FIXME: Avoid. See toSettings, toVariant, toUserOutput, toFSPathString, path, nativePath.
+ QString toString() const;
+
private:
// These are needed.
QTCREATOR_UTILS_EXPORT friend bool operator==(const FilePath &first, const FilePath &second);
diff --git a/src/plugins/android/androidbuildapkstep.cpp b/src/plugins/android/androidbuildapkstep.cpp
index 5c2290925a..a8ae7d1440 100644
--- a/src/plugins/android/androidbuildapkstep.cpp
+++ b/src/plugins/android/androidbuildapkstep.cpp
@@ -843,7 +843,7 @@ void AndroidBuildApkStep::reportWarningOrError(const QString &message, Task::Tas
bool AndroidBuildApkStep::fromMap(const QVariantMap &map)
{
- m_keystorePath = FilePath::fromVariant(map.value(KeystoreLocationKey));
+ m_keystorePath = FilePath::fromSettings(map.value(KeystoreLocationKey));
m_signPackage = false; // don't restore this
m_buildTargetSdk = map.value(BuildTargetSdkKey).toString();
if (m_buildTargetSdk.isEmpty()) {
@@ -857,7 +857,7 @@ bool AndroidBuildApkStep::fromMap(const QVariantMap &map)
QVariantMap AndroidBuildApkStep::toMap() const
{
QVariantMap map = ProjectExplorer::AbstractProcessStep::toMap();
- map.insert(KeystoreLocationKey, m_keystorePath.toVariant());
+ map.insert(KeystoreLocationKey, m_keystorePath.toSettings());
map.insert(BuildTargetSdkKey, m_buildTargetSdk);
map.insert(VerboseOutputKey, m_verbose);
return map;
diff --git a/src/plugins/android/javalanguageserver.cpp b/src/plugins/android/javalanguageserver.cpp
index 5a1a648cab..977b3fc61a 100644
--- a/src/plugins/android/javalanguageserver.cpp
+++ b/src/plugins/android/javalanguageserver.cpp
@@ -139,14 +139,14 @@ bool JLSSettings::isValid() const
QVariantMap JLSSettings::toMap() const
{
QVariantMap map = StdIOSettings::toMap();
- map.insert(languageServerKey, m_languageServer.toVariant());
+ map.insert(languageServerKey, m_languageServer.toSettings());
return map;
}
void JLSSettings::fromMap(const QVariantMap &map)
{
StdIOSettings::fromMap(map);
- m_languageServer = FilePath::fromVariant(map[languageServerKey]);
+ m_languageServer = FilePath::fromSettings(map[languageServerKey]);
}
LanguageClient::BaseSettings *JLSSettings::copy() const
diff --git a/src/plugins/baremetal/debugservers/gdb/eblinkgdbserverprovider.cpp b/src/plugins/baremetal/debugservers/gdb/eblinkgdbserverprovider.cpp
index 69702fa97a..d307eefb0e 100644
--- a/src/plugins/baremetal/debugservers/gdb/eblinkgdbserverprovider.cpp
+++ b/src/plugins/baremetal/debugservers/gdb/eblinkgdbserverprovider.cpp
@@ -145,10 +145,10 @@ bool EBlinkGdbServerProvider::isValid() const
QVariantMap EBlinkGdbServerProvider::toMap() const
{
QVariantMap data = GdbServerProvider::toMap();
- data.insert(executableFileKeyC, m_executableFile.toVariant());
+ data.insert(executableFileKeyC, m_executableFile.toSettings());
data.insert(verboseLevelKeyC, m_verboseLevel);
data.insert(interfaceTypeC, m_interfaceType);
- data.insert(deviceScriptC, m_deviceScript.toVariant());
+ data.insert(deviceScriptC, m_deviceScript.toSettings());
data.insert(interfaceResetOnConnectC, m_interfaceResetOnConnect);
data.insert(interfaceSpeedC, m_interfaceSpeed);
data.insert(interfaceExplicidDeviceC, m_interfaceExplicidDevice);
@@ -165,12 +165,12 @@ bool EBlinkGdbServerProvider::fromMap(const QVariantMap &data)
if (!GdbServerProvider::fromMap(data))
return false;
- m_executableFile = FilePath::fromVariant(data.value(executableFileKeyC));
+ m_executableFile = FilePath::fromSettings(data.value(executableFileKeyC));
m_verboseLevel = data.value(verboseLevelKeyC).toInt();
m_interfaceResetOnConnect = data.value(interfaceResetOnConnectC).toBool();
m_interfaceType = static_cast<InterfaceType>(
data.value(interfaceTypeC).toInt());
- m_deviceScript = FilePath::fromVariant(data.value(deviceScriptC));
+ m_deviceScript = FilePath::fromSettings(data.value(deviceScriptC));
m_interfaceResetOnConnect = data.value(interfaceResetOnConnectC).toBool();
m_interfaceSpeed = data.value(interfaceSpeedC).toInt();
m_interfaceExplicidDevice = data.value(interfaceExplicidDeviceC).toString();
diff --git a/src/plugins/baremetal/debugservers/gdb/gdbserverprovider.cpp b/src/plugins/baremetal/debugservers/gdb/gdbserverprovider.cpp
index d86fdf3c5e..336b606d79 100644
--- a/src/plugins/baremetal/debugservers/gdb/gdbserverprovider.cpp
+++ b/src/plugins/baremetal/debugservers/gdb/gdbserverprovider.cpp
@@ -122,7 +122,7 @@ QVariantMap GdbServerProvider::toMap() const
{
QVariantMap data = IDebugServerProvider::toMap();
data.insert(startupModeKeyC, m_startupMode);
- data.insert(peripheralDescriptionFileKeyC, m_peripheralDescriptionFile.toVariant());
+ data.insert(peripheralDescriptionFileKeyC, m_peripheralDescriptionFile.toSettings());
data.insert(initCommandsKeyC, m_initCommands);
data.insert(resetCommandsKeyC, m_resetCommands);
data.insert(useExtendedRemoteKeyC, m_useExtendedRemote);
@@ -185,7 +185,7 @@ bool GdbServerProvider::fromMap(const QVariantMap &data)
return false;
m_startupMode = static_cast<StartupMode>(data.value(startupModeKeyC).toInt());
- m_peripheralDescriptionFile = FilePath::fromVariant(data.value(peripheralDescriptionFileKeyC));
+ m_peripheralDescriptionFile = FilePath::fromSettings(data.value(peripheralDescriptionFileKeyC));
m_initCommands = data.value(initCommandsKeyC).toString();
m_resetCommands = data.value(resetCommandsKeyC).toString();
m_useExtendedRemote = data.value(useExtendedRemoteKeyC).toBool();
diff --git a/src/plugins/baremetal/debugservers/gdb/jlinkgdbserverprovider.cpp b/src/plugins/baremetal/debugservers/gdb/jlinkgdbserverprovider.cpp
index f33c884d5a..d631923788 100644
--- a/src/plugins/baremetal/debugservers/gdb/jlinkgdbserverprovider.cpp
+++ b/src/plugins/baremetal/debugservers/gdb/jlinkgdbserverprovider.cpp
@@ -121,7 +121,7 @@ bool JLinkGdbServerProvider::isValid() const
QVariantMap JLinkGdbServerProvider::toMap() const
{
QVariantMap data = GdbServerProvider::toMap();
- data.insert(executableFileKeyC, m_executableFile.toVariant());
+ data.insert(executableFileKeyC, m_executableFile.toSettings());
data.insert(jlinkDeviceKeyC, m_jlinkDevice);
data.insert(jlinkHostInterfaceKeyC, m_jlinkHost);
data.insert(jlinkHostInterfaceIPAddressKeyC, m_jlinkHostAddr);
@@ -136,7 +136,7 @@ bool JLinkGdbServerProvider::fromMap(const QVariantMap &data)
if (!GdbServerProvider::fromMap(data))
return false;
- m_executableFile = FilePath::fromVariant(data.value(executableFileKeyC));
+ m_executableFile = FilePath::fromSettings(data.value(executableFileKeyC));
m_jlinkDevice = data.value(jlinkDeviceKeyC).toString();
m_additionalArguments = data.value(additionalArgumentsKeyC).toString();
m_jlinkHost = data.value(jlinkHostInterfaceKeyC).toString();
diff --git a/src/plugins/baremetal/debugservers/gdb/openocdgdbserverprovider.cpp b/src/plugins/baremetal/debugservers/gdb/openocdgdbserverprovider.cpp
index a9201e1a38..334f31132c 100644
--- a/src/plugins/baremetal/debugservers/gdb/openocdgdbserverprovider.cpp
+++ b/src/plugins/baremetal/debugservers/gdb/openocdgdbserverprovider.cpp
@@ -128,9 +128,9 @@ bool OpenOcdGdbServerProvider::isValid() const
QVariantMap OpenOcdGdbServerProvider::toMap() const
{
QVariantMap data = GdbServerProvider::toMap();
- data.insert(executableFileKeyC, m_executableFile.toVariant());
- data.insert(rootScriptsDirKeyC, m_rootScriptsDir.toVariant());
- data.insert(configurationFileKeyC, m_configurationFile.toVariant());
+ data.insert(executableFileKeyC, m_executableFile.toSettings());
+ data.insert(rootScriptsDirKeyC, m_rootScriptsDir.toSettings());
+ data.insert(configurationFileKeyC, m_configurationFile.toSettings());
data.insert(additionalArgumentsKeyC, m_additionalArguments);
return data;
}
@@ -140,9 +140,9 @@ bool OpenOcdGdbServerProvider::fromMap(const QVariantMap &data)
if (!GdbServerProvider::fromMap(data))
return false;
- m_executableFile = FilePath::fromVariant(data.value(executableFileKeyC));
- m_rootScriptsDir = FilePath::fromVariant(data.value(rootScriptsDirKeyC));
- m_configurationFile = FilePath::fromVariant(data.value(configurationFileKeyC));
+ m_executableFile = FilePath::fromSettings(data.value(executableFileKeyC));
+ m_rootScriptsDir = FilePath::fromSettings(data.value(rootScriptsDirKeyC));
+ m_configurationFile = FilePath::fromSettings(data.value(configurationFileKeyC));
m_additionalArguments = data.value(additionalArgumentsKeyC).toString();
return true;
}
diff --git a/src/plugins/baremetal/debugservers/gdb/stlinkutilgdbserverprovider.cpp b/src/plugins/baremetal/debugservers/gdb/stlinkutilgdbserverprovider.cpp
index f61dea5a91..78d0e6fedb 100644
--- a/src/plugins/baremetal/debugservers/gdb/stlinkutilgdbserverprovider.cpp
+++ b/src/plugins/baremetal/debugservers/gdb/stlinkutilgdbserverprovider.cpp
@@ -116,7 +116,7 @@ bool StLinkUtilGdbServerProvider::isValid() const
QVariantMap StLinkUtilGdbServerProvider::toMap() const
{
QVariantMap data = GdbServerProvider::toMap();
- data.insert(executableFileKeyC, m_executableFile.toVariant());
+ data.insert(executableFileKeyC, m_executableFile.toSettings());
data.insert(verboseLevelKeyC, m_verboseLevel);
data.insert(extendedModeKeyC, m_extendedMode);
data.insert(resetBoardKeyC, m_resetBoard);
@@ -130,7 +130,7 @@ bool StLinkUtilGdbServerProvider::fromMap(const QVariantMap &data)
if (!GdbServerProvider::fromMap(data))
return false;
- m_executableFile = FilePath::fromVariant(data.value(executableFileKeyC));
+ m_executableFile = FilePath::fromSettings(data.value(executableFileKeyC));
m_verboseLevel = data.value(verboseLevelKeyC).toInt();
m_extendedMode = data.value(extendedModeKeyC).toBool();
m_resetBoard = data.value(resetBoardKeyC).toBool();
diff --git a/src/plugins/baremetal/debugservers/uvsc/uvscserverprovider.cpp b/src/plugins/baremetal/debugservers/uvsc/uvscserverprovider.cpp
index 6fe708ebbd..b95c333600 100644
--- a/src/plugins/baremetal/debugservers/uvsc/uvscserverprovider.cpp
+++ b/src/plugins/baremetal/debugservers/uvsc/uvscserverprovider.cpp
@@ -149,7 +149,7 @@ FilePath UvscServerProvider::buildOptionsFilePath(DebuggerRunTool *runTool) cons
QVariantMap UvscServerProvider::toMap() const
{
QVariantMap data = IDebugServerProvider::toMap();
- data.insert(toolsIniKeyC, m_toolsIniFile.toVariant());
+ data.insert(toolsIniKeyC, m_toolsIniFile.toSettings());
data.insert(deviceSelectionKeyC, m_deviceSelection.toMap());
data.insert(driverSelectionKeyC, m_driverSelection.toMap());
return data;
@@ -223,7 +223,7 @@ bool UvscServerProvider::fromMap(const QVariantMap &data)
{
if (!IDebugServerProvider::fromMap(data))
return false;
- m_toolsIniFile = FilePath::fromVariant(data.value(toolsIniKeyC));
+ m_toolsIniFile = FilePath::fromSettings(data.value(toolsIniKeyC));
m_deviceSelection.fromMap(data.value(deviceSelectionKeyC).toMap());
m_driverSelection.fromMap(data.value(driverSelectionKeyC).toMap());
return true;
diff --git a/src/plugins/clangtools/clangtoolssettings.cpp b/src/plugins/clangtools/clangtoolssettings.cpp
index 260e778601..bc0adcba76 100644
--- a/src/plugins/clangtools/clangtoolssettings.cpp
+++ b/src/plugins/clangtools/clangtoolssettings.cpp
@@ -126,8 +126,8 @@ void ClangToolsSettings::readSettings()
QSettings *s = Core::ICore::settings();
s->beginGroup(Constants::SETTINGS_ID);
- m_clangTidyExecutable = FilePath::fromVariant(s->value(clangTidyExecutableKey));
- m_clazyStandaloneExecutable = FilePath::fromVariant(s->value(clazyStandaloneExecutableKey));
+ m_clangTidyExecutable = FilePath::fromSettings(s->value(clangTidyExecutableKey));
+ m_clazyStandaloneExecutable = FilePath::fromSettings(s->value(clazyStandaloneExecutableKey));
m_diagnosticConfigs.append(diagnosticConfigsFromSettings(s));
QVariantMap map;
@@ -159,8 +159,8 @@ void ClangToolsSettings::writeSettings()
QSettings *s = Core::ICore::settings();
s->beginGroup(Constants::SETTINGS_ID);
- s->setValue(clangTidyExecutableKey, m_clangTidyExecutable.toVariant());
- s->setValue(clazyStandaloneExecutableKey, m_clazyStandaloneExecutable.toVariant());
+ s->setValue(clangTidyExecutableKey, m_clangTidyExecutable.toSettings());
+ s->setValue(clazyStandaloneExecutableKey, m_clazyStandaloneExecutable.toSettings());
diagnosticConfigsToSettings(s, m_diagnosticConfigs);
QVariantMap map;
diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectimporter.cpp b/src/plugins/cmakeprojectmanager/cmakeprojectimporter.cpp
index 54986b0891..4585ada0c3 100644
--- a/src/plugins/cmakeprojectmanager/cmakeprojectimporter.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeprojectimporter.cpp
@@ -766,7 +766,7 @@ const QList<BuildInfo> CMakeProjectImporter::buildInfoList(void *directoryData)
info.buildDirectory = data->buildDirectory;
QVariantMap config = info.extraInfo.toMap(); // new empty, or existing one from createBuildInfo
- config.insert(Constants::CMAKE_HOME_DIR, data->cmakeHomeDirectory.toString());
+ config.insert(Constants::CMAKE_HOME_DIR, data->cmakeHomeDirectory.toVariant());
// Potentially overwrite the default QML Debugging settings for the build type as set by
// createBuildInfo, in case we are importing a "Debug" CMake configuration without QML Debugging
config.insert(Constants::QML_DEBUG_SETTING,
diff --git a/src/plugins/cmakeprojectmanager/cmaketool.cpp b/src/plugins/cmakeprojectmanager/cmaketool.cpp
index 41647c4e29..184811884d 100644
--- a/src/plugins/cmakeprojectmanager/cmaketool.cpp
+++ b/src/plugins/cmakeprojectmanager/cmaketool.cpp
@@ -122,7 +122,7 @@ CMakeTool::CMakeTool(const QVariantMap &map, bool fromSdk) :
setFilePath(FilePath::fromString(map.value(CMAKE_INFORMATION_COMMAND).toString()));
- m_qchFilePath = FilePath::fromVariant(map.value(CMAKE_INFORMATION_QCH_FILE_PATH));
+ m_qchFilePath = FilePath::fromSettings(map.value(CMAKE_INFORMATION_QCH_FILE_PATH));
if (m_qchFilePath.isEmpty())
m_qchFilePath = searchQchFile(m_executable);
diff --git a/src/plugins/coreplugin/documentmanager.cpp b/src/plugins/coreplugin/documentmanager.cpp
index 18d926bb04..5cb133a610 100644
--- a/src/plugins/coreplugin/documentmanager.cpp
+++ b/src/plugins/coreplugin/documentmanager.cpp
@@ -1384,7 +1384,7 @@ void restoreRecentFiles(const QVariantList &recentFiles, const QStringList &rece
QString editorId;
if (i < recentEditorIds.size()) // guard against old or weird settings
editorId = recentEditorIds.at(i);
- const Utils::FilePath &filePath = FilePath::fromVariant(recentFiles.at(i));
+ const Utils::FilePath &filePath = FilePath::fromSettings(recentFiles.at(i));
result.append({filePath, Id::fromString(editorId)});
}
@@ -1404,8 +1404,8 @@ void readSettings()
s->beginGroup(QLatin1String(directoryGroupC));
- d->m_projectsDirectory = FilePath::fromVariant(
- s->value(QLatin1String(projectDirectoryKeyC), PathChooser::homePath().toVariant()));
+ d->m_projectsDirectory = FilePath::fromSettings(
+ s->value(QLatin1String(projectDirectoryKeyC), PathChooser::homePath().toSettings()));
d->m_useProjectsDirectory
= s->value(QLatin1String(useProjectDirectoryKeyC), kUseProjectsDirectoryDefault).toBool();
diff --git a/src/plugins/coreplugin/patchtool.cpp b/src/plugins/coreplugin/patchtool.cpp
index 31da17411c..4049321748 100644
--- a/src/plugins/coreplugin/patchtool.cpp
+++ b/src/plugins/coreplugin/patchtool.cpp
@@ -24,7 +24,7 @@ FilePath PatchTool::patchCommand()
QSettings *s = ICore::settings();
s->beginGroup(settingsGroupC);
- const FilePath command = FilePath::fromVariant(s->value(patchCommandKeyC, patchCommandDefaultC));
+ const FilePath command = FilePath::fromSettings(s->value(patchCommandKeyC, patchCommandDefaultC));
s->endGroup();
return command;
@@ -34,7 +34,7 @@ void PatchTool::setPatchCommand(const FilePath &newCommand)
{
Utils::QtcSettings *s = ICore::settings();
s->beginGroup(settingsGroupC);
- s->setValueWithDefault(patchCommandKeyC, newCommand.toVariant(), QVariant(QString(patchCommandDefaultC)));
+ s->setValueWithDefault(patchCommandKeyC, newCommand.toSettings(), QVariant(QString(patchCommandDefaultC)));
s->endGroup();
}
diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp
index abb3a67bfe..596ce2924c 100644
--- a/src/plugins/debugger/breakhandler.cpp
+++ b/src/plugins/debugger/breakhandler.cpp
@@ -2762,7 +2762,7 @@ void BreakpointManager::saveSessionData()
if (params.type != BreakpointByFileAndLine)
map.insert("type", params.type);
if (!params.fileName.isEmpty())
- map.insert("filename", params.fileName.toVariant());
+ map.insert("filename", params.fileName.toSettings());
if (params.lineNumber)
map.insert("linenumber", params.lineNumber);
if (!params.functionName.isEmpty())
@@ -2807,7 +2807,7 @@ void BreakpointManager::loadSessionData()
BreakpointParameters params(BreakpointByFileAndLine);
QVariant v = map.value("filename");
if (v.isValid())
- params.fileName = FilePath::fromVariant(v);
+ params.fileName = FilePath::fromSettings(v);
v = map.value("linenumber");
if (v.isValid())
params.lineNumber = v.toString().toInt();
diff --git a/src/plugins/debugger/debuggerdialogs.cpp b/src/plugins/debugger/debuggerdialogs.cpp
index 2d00030f62..ece2c22669 100644
--- a/src/plugins/debugger/debuggerdialogs.cpp
+++ b/src/plugins/debugger/debuggerdialogs.cpp
@@ -146,16 +146,16 @@ void StartApplicationParameters::toSettings(QSettings *settings) const
settings->setValue("LastKitId", kitId.toSetting());
settings->setValue("LastServerPort", serverPort);
settings->setValue("LastServerAddress", serverAddress);
- settings->setValue("LastExternalExecutable", runnable.command.executable().toVariant());
+ settings->setValue("LastExternalExecutable", runnable.command.executable().toSettings());
settings->setValue("LastExternalExecutableArguments", runnable.command.arguments());
- settings->setValue("LastExternalWorkingDirectory", runnable.workingDirectory.toVariant());
+ settings->setValue("LastExternalWorkingDirectory", runnable.workingDirectory.toSettings());
settings->setValue("LastExternalBreakAtMain", breakAtMain);
settings->setValue("LastExternalRunInTerminal", runInTerminal);
settings->setValue("LastExternalUseTargetExtended", useTargetExtendedRemote);
settings->setValue("LastServerInitCommands", serverInitCommands);
settings->setValue("LastServerResetCommands", serverResetCommands);
- settings->setValue("LastDebugInfoLocation", debugInfoLocation.toVariant());
- settings->setValue("LastSysRoot", sysRoot.toVariant());
+ settings->setValue("LastDebugInfoLocation", debugInfoLocation.toSettings());
+ settings->setValue("LastSysRoot", sysRoot.toSettings());
}
void StartApplicationParameters::fromSettings(const QSettings *settings)
@@ -163,16 +163,16 @@ void StartApplicationParameters::fromSettings(const QSettings *settings)
kitId = Id::fromSetting(settings->value("LastKitId"));
serverPort = settings->value("LastServerPort").toUInt();
serverAddress = settings->value("LastServerAddress").toString();
- runnable.command.setExecutable(FilePath::fromVariant(settings->value("LastExternalExecutable")));
+ runnable.command.setExecutable(FilePath::fromSettings(settings->value("LastExternalExecutable")));
runnable.command.setArguments(settings->value("LastExternalExecutableArguments").toString());
- runnable.workingDirectory = FilePath::fromVariant(settings->value("LastExternalWorkingDirectory"));
+ runnable.workingDirectory = FilePath::fromSettings(settings->value("LastExternalWorkingDirectory"));
breakAtMain = settings->value("LastExternalBreakAtMain").toBool();
runInTerminal = settings->value("LastExternalRunInTerminal").toBool();
useTargetExtendedRemote = settings->value("LastExternalUseTargetExtended").toBool();
serverInitCommands = settings->value("LastServerInitCommands").toString();
serverResetCommands = settings->value("LastServerResetCommands").toString();
- debugInfoLocation = FilePath::fromVariant(settings->value("LastDebugInfoLocation"));
- sysRoot = FilePath::fromVariant(settings->value("LastSysRoot"));
+ debugInfoLocation = FilePath::fromSettings(settings->value("LastDebugInfoLocation"));
+ sysRoot = FilePath::fromSettings(settings->value("LastSysRoot"));
}
///////////////////////////////////////////////////////////////////////
diff --git a/src/plugins/debugger/debuggeritem.cpp b/src/plugins/debugger/debuggeritem.cpp
index e8a9187d82..a7205d34a1 100644
--- a/src/plugins/debugger/debuggeritem.cpp
+++ b/src/plugins/debugger/debuggeritem.cpp
@@ -81,8 +81,8 @@ DebuggerItem::DebuggerItem(const QVariant &id)
DebuggerItem::DebuggerItem(const QVariantMap &data)
{
m_id = data.value(DEBUGGER_INFORMATION_ID).toString();
- m_command = FilePath::fromVariant(data.value(DEBUGGER_INFORMATION_COMMAND));
- m_workingDirectory = FilePath::fromVariant(data.value(DEBUGGER_INFORMATION_WORKINGDIRECTORY));
+ m_command = FilePath::fromSettings(data.value(DEBUGGER_INFORMATION_COMMAND));
+ m_workingDirectory = FilePath::fromSettings(data.value(DEBUGGER_INFORMATION_WORKINGDIRECTORY));
m_unexpandedDisplayName = data.value(DEBUGGER_INFORMATION_DISPLAYNAME).toString();
m_isAutoDetected = data.value(DEBUGGER_INFORMATION_AUTODETECTED, false).toBool();
m_detectionSource = data.value(DEBUGGER_INFORMATION_DETECTION_SOURCE).toString();
@@ -328,8 +328,8 @@ QVariantMap DebuggerItem::toMap() const
QVariantMap data;
data.insert(DEBUGGER_INFORMATION_DISPLAYNAME, m_unexpandedDisplayName);
data.insert(DEBUGGER_INFORMATION_ID, m_id);
- data.insert(DEBUGGER_INFORMATION_COMMAND, m_command.toVariant());
- data.insert(DEBUGGER_INFORMATION_WORKINGDIRECTORY, m_workingDirectory.toVariant());
+ data.insert(DEBUGGER_INFORMATION_COMMAND, m_command.toSettings());
+ data.insert(DEBUGGER_INFORMATION_WORKINGDIRECTORY, m_workingDirectory.toSettings());
data.insert(DEBUGGER_INFORMATION_ENGINETYPE, int(m_engineType));
data.insert(DEBUGGER_INFORMATION_AUTODETECTED, m_isAutoDetected);
data.insert(DEBUGGER_INFORMATION_DETECTION_SOURCE, m_detectionSource);
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index 4ec5dbeedd..e4c40c1e4c 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -1528,22 +1528,22 @@ void DebuggerPluginPrivate::attachCore()
const QString lastExternalKit = configValue("LastExternalKit").toString();
if (!lastExternalKit.isEmpty())
dlg.setKitId(Id::fromString(lastExternalKit));
- dlg.setSymbolFile(FilePath::fromVariant(configValue("LastExternalExecutableFile")));
- dlg.setLocalCoreFile(FilePath::fromVariant(configValue("LastLocalCoreFile")));
- dlg.setRemoteCoreFile(FilePath::fromVariant(configValue("LastRemoteCoreFile")));
- dlg.setOverrideStartScript(FilePath::fromVariant(configValue("LastExternalStartScript")));
- dlg.setSysRoot(FilePath::fromVariant(configValue("LastSysRoot")));
+ dlg.setSymbolFile(FilePath::fromSettings(configValue("LastExternalExecutableFile")));
+ dlg.setLocalCoreFile(FilePath::fromSettings(configValue("LastLocalCoreFile")));
+ dlg.setRemoteCoreFile(FilePath::fromSettings(configValue("LastRemoteCoreFile")));
+ dlg.setOverrideStartScript(FilePath::fromSettings(configValue("LastExternalStartScript")));
+ dlg.setSysRoot(FilePath::fromSettings(configValue("LastSysRoot")));
dlg.setForceLocalCoreFile(configValue("LastForceLocalCoreFile").toBool());
if (dlg.exec() != QDialog::Accepted)
return;
- setConfigValue("LastExternalExecutableFile", dlg.symbolFile().toVariant());
- setConfigValue("LastLocalCoreFile", dlg.localCoreFile().toVariant());
- setConfigValue("LastRemoteCoreFile", dlg.remoteCoreFile().toVariant());
+ setConfigValue("LastExternalExecutableFile", dlg.symbolFile().toSettings());
+ setConfigValue("LastLocalCoreFile", dlg.localCoreFile().toSettings());
+ setConfigValue("LastRemoteCoreFile", dlg.remoteCoreFile().toSettings());
setConfigValue("LastExternalKit", dlg.kit()->id().toSetting());
- setConfigValue("LastExternalStartScript", dlg.overrideStartScript().toVariant());
- setConfigValue("LastSysRoot", dlg.sysRoot().toVariant());
+ setConfigValue("LastExternalStartScript", dlg.overrideStartScript().toSettings());
+ setConfigValue("LastSysRoot", dlg.sysRoot().toSettings());
setConfigValue("LastForceLocalCoreFile", dlg.forcesLocalCoreFile());
auto runControl = new RunControl(ProjectExplorer::Constants::DEBUG_RUN_MODE);
diff --git a/src/plugins/docker/dockerdevice.cpp b/src/plugins/docker/dockerdevice.cpp
index ad962e9641..4626e0ca4d 100644
--- a/src/plugins/docker/dockerdevice.cpp
+++ b/src/plugins/docker/dockerdevice.cpp
@@ -721,7 +721,7 @@ void DockerDevice::fromMap(const QVariantMap &map)
data.mounts = map.value(DockerDeviceMappedPaths).toStringList();
data.keepEntryPoint = map.value(DockerDeviceKeepEntryPoint).toBool();
data.enableLldbFlags = map.value(DockerDeviceEnableLldbFlags).toBool();
- data.clangdExecutable = FilePath::fromVariant(map.value(DockerDeviceClangDExecutable));
+ data.clangdExecutable = FilePath::fromSettings(map.value(DockerDeviceClangDExecutable));
d->setData(data);
}
@@ -738,7 +738,7 @@ QVariantMap DockerDevice::toMap() const
map.insert(DockerDeviceMappedPaths, data.mounts);
map.insert(DockerDeviceKeepEntryPoint, data.keepEntryPoint);
map.insert(DockerDeviceEnableLldbFlags, data.enableLldbFlags);
- map.insert(DockerDeviceClangDExecutable, data.clangdExecutable.toVariant());
+ map.insert(DockerDeviceClangDExecutable, data.clangdExecutable.toSettings());
return map;
}
diff --git a/src/plugins/git/gerrit/gerritparameters.cpp b/src/plugins/git/gerrit/gerritparameters.cpp
index b2efacd537..ace85a81c4 100644
--- a/src/plugins/git/gerrit/gerritparameters.cpp
+++ b/src/plugins/git/gerrit/gerritparameters.cpp
@@ -93,8 +93,8 @@ void GerritParameters::toSettings(QSettings *s) const
s->setValue(userKeyC, server.user.userName);
s->setValue(portKeyC, server.port);
s->setValue(portFlagKeyC, portFlag);
- s->setValue(sshKeyC, ssh.toVariant());
- s->setValue(curlKeyC, curl.toVariant());
+ s->setValue(sshKeyC, ssh.toSettings());
+ s->setValue(curlKeyC, curl.toSettings());
s->setValue(httpsKeyC, https);
s->endGroup();
}
@@ -111,8 +111,8 @@ void GerritParameters::fromSettings(const QSettings *s)
const QString rootKey = QLatin1String(settingsGroupC) + '/';
server.host = s->value(rootKey + hostKeyC, GerritServer::defaultHost()).toString();
server.user.userName = s->value(rootKey + userKeyC, QString()).toString();
- ssh = FilePath::fromVariant(s->value(rootKey + sshKeyC, QString()));
- curl = FilePath::fromVariant(s->value(rootKey + curlKeyC));
+ ssh = FilePath::fromSettings(s->value(rootKey + sshKeyC, QString()));
+ curl = FilePath::fromSettings(s->value(rootKey + curlKeyC));
server.port = ushort(s->value(rootKey + portKeyC, QVariant(GerritServer::defaultPort)).toInt());
portFlag = s->value(rootKey + portFlagKeyC, defaultPortFlag).toString();
savedQueries = s->value(rootKey + savedQueriesKeyC, QString()).toString()
diff --git a/src/plugins/gitlab/gitlabparameters.cpp b/src/plugins/gitlab/gitlabparameters.cpp
index 30995e1f9e..1a3f970edb 100644
--- a/src/plugins/gitlab/gitlabparameters.cpp
+++ b/src/plugins/gitlab/gitlabparameters.cpp
@@ -157,7 +157,7 @@ void GitLabParameters::toSettings(QSettings *s) const
writeTokensFile(tokensFilePath(s), gitLabServers);
s->beginGroup(settingsGroupC);
- s->setValue(curlKeyC, curl.toVariant());
+ s->setValue(curlKeyC, curl.toSettings());
s->setValue(defaultUuidKeyC, defaultGitLabServer.toSetting());
s->endGroup();
}
@@ -165,7 +165,7 @@ void GitLabParameters::toSettings(QSettings *s) const
void GitLabParameters::fromSettings(const QSettings *s)
{
const QString rootKey = QLatin1String(settingsGroupC) + '/';
- curl = Utils::FilePath::fromVariant(s->value(rootKey + curlKeyC));
+ curl = Utils::FilePath::fromSettings(s->value(rootKey + curlKeyC));
defaultGitLabServer = Utils::Id::fromSetting(s->value(rootKey + defaultUuidKeyC));
gitLabServers = readTokensFile(tokensFilePath(s));
diff --git a/src/plugins/incredibuild/commandbuilder.cpp b/src/plugins/incredibuild/commandbuilder.cpp
index 10e2fc5134..73585de89f 100644
--- a/src/plugins/incredibuild/commandbuilder.cpp
+++ b/src/plugins/incredibuild/commandbuilder.cpp
@@ -13,13 +13,13 @@ const char CUSTOMCOMMANDBUILDER_ARGS[] = "IncrediBuild.BuildConsole.%1.Arguments
void CommandBuilder::fromMap(const QVariantMap &map)
{
- m_command = FilePath::fromVariant(map.value(QString(CUSTOMCOMMANDBUILDER_COMMAND).arg(id())));
+ m_command = FilePath::fromSettings(map.value(QString(CUSTOMCOMMANDBUILDER_COMMAND).arg(id())));
m_args = map.value(QString(CUSTOMCOMMANDBUILDER_ARGS).arg(id())).toString();
}
void CommandBuilder::toMap(QVariantMap *map) const
{
- (*map)[QString(CUSTOMCOMMANDBUILDER_COMMAND).arg(id())] = m_command.toVariant();
+ (*map)[QString(CUSTOMCOMMANDBUILDER_COMMAND).arg(id())] = m_command.toSettings();
(*map)[QString(CUSTOMCOMMANDBUILDER_ARGS).arg(id())] = QVariant(m_args);
}
diff --git a/src/plugins/ios/iosdsymbuildstep.cpp b/src/plugins/ios/iosdsymbuildstep.cpp
index 4dd7367f29..e9110a24bf 100644
--- a/src/plugins/ios/iosdsymbuildstep.cpp
+++ b/src/plugins/ios/iosdsymbuildstep.cpp
@@ -64,7 +64,7 @@ QVariantMap IosDsymBuildStep::toMap() const
map.insert(id().withSuffix(USE_DEFAULT_ARGS_PARTIAL_KEY).toString(),
isDefault());
map.insert(id().withSuffix(CLEAN_PARTIAL_KEY).toString(), m_clean);
- map.insert(id().withSuffix(COMMAND_PARTIAL_KEY).toString(), command().toVariant());
+ map.insert(id().withSuffix(COMMAND_PARTIAL_KEY).toString(), command().toSettings());
return map;
}
@@ -75,7 +75,7 @@ bool IosDsymBuildStep::fromMap(const QVariantMap &map)
bool useDefaultArguments = map.value(
id().withSuffix(USE_DEFAULT_ARGS_PARTIAL_KEY).toString()).toBool();
m_clean = map.value(id().withSuffix(CLEAN_PARTIAL_KEY).toString(), m_clean).toBool();
- m_command = FilePath::fromVariant(map.value(id().withSuffix(COMMAND_PARTIAL_KEY).toString()));
+ m_command = FilePath::fromSettings(map.value(id().withSuffix(COMMAND_PARTIAL_KEY).toString()));
if (useDefaultArguments) {
m_command = defaultCommand();
m_arguments = defaultArguments();
diff --git a/src/plugins/languageclient/languageclientsettings.cpp b/src/plugins/languageclient/languageclientsettings.cpp
index 4e4846d2da..e2827e5c4e 100644
--- a/src/plugins/languageclient/languageclientsettings.cpp
+++ b/src/plugins/languageclient/languageclientsettings.cpp
@@ -737,7 +737,7 @@ bool StdIOSettings::isValid() const
QVariantMap StdIOSettings::toMap() const
{
QVariantMap map = BaseSettings::toMap();
- map.insert(executableKey, m_executable.toVariant());
+ map.insert(executableKey, m_executable.toSettings());
map.insert(argumentsKey, m_arguments);
return map;
}
@@ -745,7 +745,7 @@ QVariantMap StdIOSettings::toMap() const
void StdIOSettings::fromMap(const QVariantMap &map)
{
BaseSettings::fromMap(map);
- m_executable = Utils::FilePath::fromVariant(map[executableKey]);
+ m_executable = Utils::FilePath::fromSettings(map[executableKey]);
m_arguments = map[argumentsKey].toString();
}
diff --git a/src/plugins/mcusupport/mcukitmanager.cpp b/src/plugins/mcusupport/mcukitmanager.cpp
index 600ebbe832..bf5cc7f181 100644
--- a/src/plugins/mcusupport/mcukitmanager.cpp
+++ b/src/plugins/mcusupport/mcukitmanager.cpp
@@ -114,7 +114,8 @@ public:
if (mcuTarget->toolChainPackage()->isDesktopToolchain())
k->setDeviceTypeForIcon(DEVICE_TYPE);
k->setValue(QtSupport::SuppliesQtQuickImportPath::id(), true);
- k->setValue(QtSupport::KitQmlImportPath::id(), (sdkPath / "include/qul").toVariant());
+ // FIXME: This is treated as a pathlist in CMakeBuildSystem::updateQmlJSCodeModel
+ k->setValue(QtSupport::KitQmlImportPath::id(), (sdkPath / "include/qul").toString());
k->setValue(QtSupport::KitHasMergedHeaderPathsWithQmlImportPaths::id(), true);
QSet<Id> irrelevant = {
SysRootKitAspect::id(),
@@ -679,6 +680,7 @@ void fixExistingKits(const SettingsHandler::Ptr &settingsHandler)
if (cfgItem.key == "QUL_GENERATORS") {
auto idx = cfgItem.value.indexOf("/lib/cmake/Qul");
auto qulDir = cfgItem.value.left(idx);
+ // FIXME: This is treated as a pathlist in CMakeBuildSystem::updateQmlJSCodeModel
kit->setValue(kitQmlImportPath, QVariant(qulDir + "/include/qul"));
break;
}
diff --git a/src/plugins/mesonprojectmanager/mesonwrapper.h b/src/plugins/mesonprojectmanager/mesonwrapper.h
index 73191ee600..a93be28a0f 100644
--- a/src/plugins/mesonprojectmanager/mesonwrapper.h
+++ b/src/plugins/mesonprojectmanager/mesonwrapper.h
@@ -91,7 +91,7 @@ inline QVariantMap toVariantMap<MesonWrapper>(const MesonWrapper &meson)
{
QVariantMap data;
data.insert(Constants::ToolsSettings::NAME_KEY, meson.m_name);
- data.insert(Constants::ToolsSettings::EXE_KEY, meson.m_exe.toVariant());
+ data.insert(Constants::ToolsSettings::EXE_KEY, meson.m_exe.toSettings());
data.insert(Constants::ToolsSettings::AUTO_DETECTED_KEY, meson.m_autoDetected);
data.insert(Constants::ToolsSettings::ID_KEY, meson.m_id.toSetting());
data.insert(Constants::ToolsSettings::TOOL_TYPE_KEY, Constants::ToolsSettings::TOOL_TYPE_MESON);
@@ -101,7 +101,7 @@ template<>
inline MesonWrapper *fromVariantMap<MesonWrapper *>(const QVariantMap &data)
{
return new MesonWrapper(data[Constants::ToolsSettings::NAME_KEY].toString(),
- Utils::FilePath::fromVariant(data[Constants::ToolsSettings::EXE_KEY]),
+ Utils::FilePath::fromSettings(data[Constants::ToolsSettings::EXE_KEY]),
Utils::Id::fromSetting(data[Constants::ToolsSettings::ID_KEY]),
data[Constants::ToolsSettings::AUTO_DETECTED_KEY].toBool());
}
diff --git a/src/plugins/mesonprojectmanager/ninjawrapper.h b/src/plugins/mesonprojectmanager/ninjawrapper.h
index 0699e54fb4..4b99fdf402 100644
--- a/src/plugins/mesonprojectmanager/ninjawrapper.h
+++ b/src/plugins/mesonprojectmanager/ninjawrapper.h
@@ -26,7 +26,7 @@ inline QVariantMap toVariantMap<NinjaWrapper>(const NinjaWrapper &meson)
{
QVariantMap data;
data.insert(Constants::ToolsSettings::NAME_KEY, meson.m_name);
- data.insert(Constants::ToolsSettings::EXE_KEY, meson.m_exe.toVariant());
+ data.insert(Constants::ToolsSettings::EXE_KEY, meson.m_exe.toSettings());
data.insert(Constants::ToolsSettings::AUTO_DETECTED_KEY, meson.m_autoDetected);
data.insert(Constants::ToolsSettings::ID_KEY, meson.m_id.toSetting());
data.insert(Constants::ToolsSettings::TOOL_TYPE_KEY, Constants::ToolsSettings::TOOL_TYPE_NINJA);
@@ -36,7 +36,7 @@ template<>
inline NinjaWrapper *fromVariantMap<NinjaWrapper *>(const QVariantMap &data)
{
return new NinjaWrapper(data[Constants::ToolsSettings::NAME_KEY].toString(),
- Utils::FilePath::fromVariant(data[Constants::ToolsSettings::EXE_KEY]),
+ Utils::FilePath::fromSettings(data[Constants::ToolsSettings::EXE_KEY]),
Utils::Id::fromSetting(data[Constants::ToolsSettings::ID_KEY]),
data[Constants::ToolsSettings::AUTO_DETECTED_KEY].toBool());
}
diff --git a/src/plugins/projectexplorer/deploymentdataview.cpp b/src/plugins/projectexplorer/deploymentdataview.cpp
index 9bc7eba2a1..6c73d02dd6 100644
--- a/src/plugins/projectexplorer/deploymentdataview.cpp
+++ b/src/plugins/projectexplorer/deploymentdataview.cpp
@@ -52,7 +52,7 @@ public:
if (role != Qt::EditRole)
return false;
if (column == 0)
- file = DeployableFile(FilePath::fromVariant(data), file.remoteDirectory());
+ file = DeployableFile(FilePath::fromSettings(data), file.remoteDirectory());
else if (column == 1)
file = DeployableFile(file.localFilePath(), data.toString());
return true;
diff --git a/src/plugins/projectexplorer/devicesupport/devicefilesystemmodel.cpp b/src/plugins/projectexplorer/devicesupport/devicefilesystemmodel.cpp
index de7b0fb0a6..3ddf2e420b 100644
--- a/src/plugins/projectexplorer/devicesupport/devicefilesystemmodel.cpp
+++ b/src/plugins/projectexplorer/devicesupport/devicefilesystemmodel.cpp
@@ -163,7 +163,7 @@ QVariant DeviceFileSystemModel::data(const QModelIndex &index, int role) const
return node->m_filePath.fileName();
}
if (role == PathRole)
- return node->m_filePath.toString();
+ return node->m_filePath.toVariant();
}
return QVariant();
}
diff --git a/src/plugins/projectexplorer/devicesupport/idevice.cpp b/src/plugins/projectexplorer/devicesupport/idevice.cpp
index edaa845b33..0add96f1df 100644
--- a/src/plugins/projectexplorer/devicesupport/idevice.cpp
+++ b/src/plugins/projectexplorer/devicesupport/idevice.cpp
@@ -443,7 +443,7 @@ void IDevice::fromMap(const QVariantMap &map)
: static_cast<AuthType>(storedAuthType);
d->sshParameters.privateKeyFile =
- FilePath::fromVariant(map.value(QLatin1String(KeyFileKey), defaultPrivateKeyFilePath()));
+ FilePath::fromSettings(map.value(QLatin1String(KeyFileKey), defaultPrivateKeyFilePath()));
d->sshParameters.timeout = map.value(QLatin1String(TimeoutKey), DefaultTimeout).toInt();
d->sshParameters.hostKeyCheckingMode = static_cast<SshHostKeyCheckingMode>
(map.value(QLatin1String(HostKeyCheckingKey), SshHostKeyCheckingNone).toInt());
@@ -455,8 +455,8 @@ void IDevice::fromMap(const QVariantMap &map)
d->machineType = static_cast<MachineType>(map.value(QLatin1String(MachineTypeKey), DefaultMachineType).toInt());
d->version = map.value(QLatin1String(VersionKey), 0).toInt();
- d->debugServerPath = FilePath::fromVariant(map.value(QLatin1String(DebugServerKey)));
- d->qmlRunCommand = FilePath::fromVariant(map.value(QLatin1String(QmlRuntimeKey)));
+ d->debugServerPath = FilePath::fromSettings(map.value(QLatin1String(DebugServerKey)));
+ d->qmlRunCommand = FilePath::fromSettings(map.value(QLatin1String(QmlRuntimeKey)));
d->extraData = map.value(ExtraDataKey).toMap();
}
@@ -480,15 +480,15 @@ QVariantMap IDevice::toMap() const
map.insert(QLatin1String(SshPortKey), d->sshParameters.port());
map.insert(QLatin1String(UserNameKey), d->sshParameters.userName());
map.insert(QLatin1String(AuthKey), d->sshParameters.authenticationType);
- map.insert(QLatin1String(KeyFileKey), d->sshParameters.privateKeyFile.toVariant());
+ map.insert(QLatin1String(KeyFileKey), d->sshParameters.privateKeyFile.toSettings());
map.insert(QLatin1String(TimeoutKey), d->sshParameters.timeout);
map.insert(QLatin1String(HostKeyCheckingKey), d->sshParameters.hostKeyCheckingMode);
map.insert(QLatin1String(PortsSpecKey), d->freePorts.toString());
map.insert(QLatin1String(VersionKey), d->version);
- map.insert(QLatin1String(DebugServerKey), d->debugServerPath.toVariant());
- map.insert(QLatin1String(QmlRuntimeKey), d->qmlRunCommand.toVariant());
+ map.insert(QLatin1String(DebugServerKey), d->debugServerPath.toSettings());
+ map.insert(QLatin1String(QmlRuntimeKey), d->qmlRunCommand.toSettings());
map.insert(ExtraDataKey, d->extraData);
return map;
diff --git a/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp b/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp
index f5d85df59e..3cec46243e 100644
--- a/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp
+++ b/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp
@@ -795,8 +795,8 @@ bool PathChooserField::parseData(const QVariant &data, QString *errorMessage)
QVariantMap tmp = data.toMap();
- m_path = FilePath::fromVariant(consumeValue(tmp, "path"));
- m_basePath = FilePath::fromVariant(consumeValue(tmp, "basePath"));
+ m_path = FilePath::fromSettings(consumeValue(tmp, "path"));
+ m_basePath = FilePath::fromSettings(consumeValue(tmp, "basePath"));
m_historyId = consumeValue(tmp, "historyId").toString();
QString kindStr = consumeValue(tmp, "kind", "existingDirectory").toString();
@@ -877,12 +877,12 @@ void PathChooserField::initializeData(MacroExpander *expander)
void PathChooserField::fromSettings(const QVariant &value)
{
- m_path = FilePath::fromVariant(value);
+ m_path = FilePath::fromSettings(value);
}
QVariant PathChooserField::toSettings() const
{
- return qobject_cast<PathChooser *>(widget())->filePath().toVariant();
+ return qobject_cast<PathChooser *>(widget())->filePath().toSettings();
}
// --------------------------------------------------------------------
diff --git a/src/plugins/projectexplorer/jsonwizard/jsonsummarypage.cpp b/src/plugins/projectexplorer/jsonwizard/jsonsummarypage.cpp
index eca7629d40..4d4c0b28e5 100644
--- a/src/plugins/projectexplorer/jsonwizard/jsonsummarypage.cpp
+++ b/src/plugins/projectexplorer/jsonwizard/jsonsummarypage.cpp
@@ -211,9 +211,9 @@ Node *JsonSummaryPage::findWizardContextNode(Node *contextNode) const
// Static cast from void * to avoid qobject_cast (which needs a valid object) in value().
auto project = static_cast<Project *>(m_wizard->value(Constants::PROJECT_POINTER).value<void *>());
if (SessionManager::projects().contains(project) && project->rootProjectNode()) {
- const QString path = m_wizard->value(Constants::PREFERRED_PROJECT_NODE_PATH).toString();
+ const FilePath path = FilePath::fromVariant(m_wizard->value(Constants::PREFERRED_PROJECT_NODE_PATH));
contextNode = project->rootProjectNode()->findNode([path](const Node *n) {
- return path == n->filePath().toString();
+ return path == n->filePath();
});
}
}
diff --git a/src/plugins/projectexplorer/jsonwizard/jsonwizardfilegenerator.cpp b/src/plugins/projectexplorer/jsonwizard/jsonwizardfilegenerator.cpp
index c239d3f432..34bd074b68 100644
--- a/src/plugins/projectexplorer/jsonwizard/jsonwizardfilegenerator.cpp
+++ b/src/plugins/projectexplorer/jsonwizard/jsonwizardfilegenerator.cpp
@@ -41,8 +41,8 @@ bool JsonWizardFileGenerator::setup(const QVariant &data, QString *errorMessage)
File f;
const QVariantMap tmp = d.toMap();
- f.source = Utils::FilePath::fromVariant(tmp.value(QLatin1String("source")));
- f.target = Utils::FilePath::fromVariant(tmp.value(QLatin1String("target")));
+ f.source = Utils::FilePath::fromSettings(tmp.value(QLatin1String("source")));
+ f.target = Utils::FilePath::fromSettings(tmp.value(QLatin1String("target")));
f.condition = tmp.value(QLatin1String("condition"), true);
f.isBinary = tmp.value(QLatin1String("isBinary"), false);
f.overwrite = tmp.value(QLatin1String("overwrite"), false);
diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp
index 42ffe796dc..f673e9f48a 100644
--- a/src/plugins/projectexplorer/projectexplorer.cpp
+++ b/src/plugins/projectexplorer/projectexplorer.cpp
@@ -2487,7 +2487,7 @@ void ProjectExplorerPluginPrivate::updateWelcomePage()
void ProjectExplorerPluginPrivate::loadSesssionTasks()
{
- const FilePath filePath = FilePath::fromVariant(
+ const FilePath filePath = FilePath::fromSettings(
SessionManager::value(Constants::SESSION_TASKFILE_KEY));
if (!filePath.isEmpty())
TaskFile::openTasks(filePath);
diff --git a/src/plugins/projectexplorer/session.cpp b/src/plugins/projectexplorer/session.cpp
index 3719fe8010..a5d5b91c62 100644
--- a/src/plugins/projectexplorer/session.cpp
+++ b/src/plugins/projectexplorer/session.cpp
@@ -482,10 +482,8 @@ bool SessionManager::save()
}
} else {
// save the startup project
- if (d->m_startupProject) {
- data.insert(QLatin1String("StartupProject"),
- d->m_startupProject->projectFilePath().toString());
- }
+ if (d->m_startupProject)
+ data.insert("StartupProject", d->m_startupProject->projectFilePath().toSettings());
const QColor c = StyleHelper::requestedBaseColor();
if (c.isValid()) {
@@ -941,7 +939,7 @@ void SessionManagerPrivate::askUserAboutFailedProjects()
void SessionManagerPrivate::restoreStartupProject(const PersistentSettingsReader &reader)
{
- const FilePath startupProject = FilePath::fromVariant(reader.restoreValue("StartupProject"));
+ const FilePath startupProject = FilePath::fromSettings(reader.restoreValue("StartupProject"));
if (!startupProject.isEmpty()) {
for (Project *pro : std::as_const(m_projects)) {
if (pro->projectFilePath() == startupProject) {
diff --git a/src/plugins/projectexplorer/taskfile.cpp b/src/plugins/projectexplorer/taskfile.cpp
index f2a280c3f7..011b64124f 100644
--- a/src/plugins/projectexplorer/taskfile.cpp
+++ b/src/plugins/projectexplorer/taskfile.cpp
@@ -174,7 +174,7 @@ bool TaskFile::load(QString *errorString, const FilePath &fileName)
bool result = parseTaskFile(errorString, fileName);
if (result) {
if (!SessionManager::isDefaultSession(SessionManager::activeSession()))
- SessionManager::setValue(Constants::SESSION_TASKFILE_KEY, fileName.toVariant());
+ SessionManager::setValue(Constants::SESSION_TASKFILE_KEY, fileName.toSettings());
} else {
stopMonitoring();
}
diff --git a/src/plugins/projectexplorer/toolchain.cpp b/src/plugins/projectexplorer/toolchain.cpp
index 2266230574..1a3d3d43f5 100644
--- a/src/plugins/projectexplorer/toolchain.cpp
+++ b/src/plugins/projectexplorer/toolchain.cpp
@@ -259,7 +259,7 @@ QVariantMap ToolChain::toMap() const
if (!d->m_targetAbiKey.isEmpty())
result.insert(d->m_targetAbiKey, d->m_targetAbi.toString());
if (!d->m_compilerCommandKey.isEmpty())
- result.insert(d->m_compilerCommandKey, d->m_compilerCommand.toVariant());
+ result.insert(d->m_compilerCommandKey, d->m_compilerCommand.toSettings());
return result;
}
@@ -382,7 +382,7 @@ bool ToolChain::fromMap(const QVariantMap &data)
if (!d->m_targetAbiKey.isEmpty())
d->m_targetAbi = Abi::fromString(data.value(d->m_targetAbiKey).toString());
- d->m_compilerCommand = FilePath::fromVariant(data.value(d->m_compilerCommandKey));
+ d->m_compilerCommand = FilePath::fromSettings(data.value(d->m_compilerCommandKey));
d->m_isValid.reset();
return true;
@@ -695,16 +695,16 @@ static QString badToolchainTimestampKey() { return {"Timestamp"}; }
QVariantMap BadToolchain::toMap() const
{
- return {{badToolchainFilePathKey(), filePath.toVariant()},
- {badToolchainSymlinkTargetKey(), symlinkTarget.toVariant()},
+ return {{badToolchainFilePathKey(), filePath.toSettings()},
+ {badToolchainSymlinkTargetKey(), symlinkTarget.toSettings()},
{badToolchainTimestampKey(), timestamp.toMSecsSinceEpoch()}};
}
BadToolchain BadToolchain::fromMap(const QVariantMap &map)
{
return {
- FilePath::fromVariant(map.value(badToolchainFilePathKey())),
- FilePath::fromVariant(map.value(badToolchainSymlinkTargetKey())),
+ FilePath::fromSettings(map.value(badToolchainFilePathKey())),
+ FilePath::fromSettings(map.value(badToolchainSymlinkTargetKey())),
QDateTime::fromMSecsSinceEpoch(map.value(badToolchainTimestampKey()).toLongLong())
};
}
diff --git a/src/plugins/python/pythonsettings.cpp b/src/plugins/python/pythonsettings.cpp
index f7ca98a817..92630bafff 100644
--- a/src/plugins/python/pythonsettings.cpp
+++ b/src/plugins/python/pythonsettings.cpp
@@ -821,7 +821,7 @@ void PythonSettings::initFromSettings(QSettings *settings)
auto interpreterList = interpreterVar.toList();
const Interpreter interpreter{interpreterList.value(0).toString(),
interpreterList.value(1).toString(),
- FilePath::fromVariant(interpreterList.value(2)),
+ FilePath::fromSettings(interpreterList.value(2)),
interpreterList.value(3, true).toBool()};
if (interpreterList.size() == 3)
oldSettings << interpreter;
@@ -865,7 +865,7 @@ void PythonSettings::writeToSettings(QSettings *settings)
for (const Interpreter &interpreter : m_interpreters) {
QVariantList interpreterVar{interpreter.id,
interpreter.name,
- interpreter.command.toVariant()};
+ interpreter.command.toSettings()};
interpretersVar.append(QVariant(interpreterVar)); // old settings
interpreterVar.append(interpreter.autoDetected);
interpretersVar.append(QVariant(interpreterVar)); // new settings
diff --git a/src/plugins/qbsprojectmanager/qbsproject.cpp b/src/plugins/qbsprojectmanager/qbsproject.cpp
index 97a1d720c8..7c2f611c4a 100644
--- a/src/plugins/qbsprojectmanager/qbsproject.cpp
+++ b/src/plugins/qbsprojectmanager/qbsproject.cpp
@@ -1152,7 +1152,7 @@ void QbsBuildSystem::updateDeploymentInfo()
const QJsonObject installData = artifact.value("install-data").toObject();
if (installData.value("is-installable").toBool()) {
deploymentData.addFile(
- FilePath::fromVariant(artifact.value("file-path")),
+ FilePath::fromSettings(artifact.value("file-path")),
QFileInfo(installData.value("install-file-path").toString()).path(),
artifact.value("is-executable").toBool()
? DeployableFile::TypeExecutable : DeployableFile::TypeNormal);
diff --git a/src/plugins/qmlprojectmanager/fileformat/qmlprojectfileformat.cpp b/src/plugins/qmlprojectmanager/fileformat/qmlprojectfileformat.cpp
index dc248138f1..4065b7f658 100644
--- a/src/plugins/qmlprojectmanager/fileformat/qmlprojectfileformat.cpp
+++ b/src/plugins/qmlprojectmanager/fileformat/qmlprojectfileformat.cpp
@@ -114,7 +114,7 @@ std::unique_ptr<QmlProjectItem> QmlProjectFileFormat::parseProjectFile(const Uti
const auto targetDirectoryPropery = rootNode->property("targetDirectory");
if (targetDirectoryPropery.isValid())
- projectItem->setTargetDirectory(FilePath::fromVariant(targetDirectoryPropery.value));
+ projectItem->setTargetDirectory(FilePath::fromSettings(targetDirectoryPropery.value));
const auto qtForMCUProperty = rootNode->property("qtForMCUs");
if (qtForMCUProperty.isValid() && qtForMCUProperty.value.toBool())
diff --git a/src/plugins/qnx/qnxqtversion.cpp b/src/plugins/qnx/qnxqtversion.cpp
index 582a8dec2c..b5dd0518d8 100644
--- a/src/plugins/qnx/qnxqtversion.cpp
+++ b/src/plugins/qnx/qnxqtversion.cpp
@@ -112,14 +112,14 @@ QString QnxQtVersion::cpuDir() const
QVariantMap QnxQtVersion::toMap() const
{
QVariantMap result = QtVersion::toMap();
- result.insert(SDP_PATH_KEY, sdpPath().toVariant());
+ result.insert(SDP_PATH_KEY, sdpPath().toSettings());
return result;
}
void QnxQtVersion::fromMap(const QVariantMap &map)
{
QtVersion::fromMap(map);
- setSdpPath(FilePath::fromVariant(map.value(SDP_PATH_KEY)));
+ setSdpPath(FilePath::fromSettings(map.value(SDP_PATH_KEY)));
}
Abis QnxQtVersion::detectQtAbis() const
diff --git a/src/plugins/qnx/qnxtoolchain.cpp b/src/plugins/qnx/qnxtoolchain.cpp
index 9156c79bf7..773efc0c74 100644
--- a/src/plugins/qnx/qnxtoolchain.cpp
+++ b/src/plugins/qnx/qnxtoolchain.cpp
@@ -135,7 +135,7 @@ QStringList QnxToolChain::suggestedMkspecList() const
QVariantMap QnxToolChain::toMap() const
{
QVariantMap data = GccToolChain::toMap();
- data.insert(QLatin1String(CompilerSdpPath), m_sdpPath.toVariant());
+ data.insert(QLatin1String(CompilerSdpPath), m_sdpPath.toSettings());
data.insert(QLatin1String(CpuDirKey), m_cpuDir);
return data;
}
@@ -145,7 +145,7 @@ bool QnxToolChain::fromMap(const QVariantMap &data)
if (!GccToolChain::fromMap(data))
return false;
- m_sdpPath = FilePath::fromVariant(data.value(CompilerSdpPath));
+ m_sdpPath = FilePath::fromSettings(data.value(CompilerSdpPath));
m_cpuDir = data.value(QLatin1String(CpuDirKey)).toString();
// Make the ABIs QNX specific (if they aren't already).
diff --git a/src/plugins/qtsupport/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp
index 9126e72e32..bb162cd217 100644
--- a/src/plugins/qtsupport/baseqtversion.cpp
+++ b/src/plugins/qtsupport/baseqtversion.cpp
@@ -649,7 +649,7 @@ void QtVersion::fromMap(const QVariantMap &map)
d->m_isAutodetected = map.value(QTVERSIONAUTODETECTED).toBool();
d->m_detectionSource = map.value(QTVERSIONDETECTIONSOURCE).toString();
d->m_overrideFeatures = Utils::Id::fromStringList(map.value(QTVERSION_OVERRIDE_FEATURES).toStringList());
- d->m_qmakeCommand = FilePath::fromVariant(map.value(QTVERSIONQMAKEPATH));
+ d->m_qmakeCommand = FilePath::fromSettings(map.value(QTVERSIONQMAKEPATH));
FilePath qmake = d->m_qmakeCommand;
// FIXME: Check this is still needed or whether ProcessArgs::splitArg handles it.
@@ -666,7 +666,7 @@ void QtVersion::fromMap(const QVariantMap &map)
}
}
- d->m_data.qtSources = FilePath::fromVariant(map.value(QTVERSIONSOURCEPATH));
+ d->m_data.qtSources = FilePath::fromSettings(map.value(QTVERSIONSOURCEPATH));
// Handle ABIs provided by the SDKTool:
// Note: Creator does not write these settings itself, so it has to come from the SDKTool!
@@ -692,7 +692,7 @@ QVariantMap QtVersion::toMap() const
if (!d->m_overrideFeatures.isEmpty())
result.insert(QTVERSION_OVERRIDE_FEATURES, Utils::Id::toStringList(d->m_overrideFeatures));
- result.insert(QTVERSIONQMAKEPATH, qmakeFilePath().toVariant());
+ result.insert(QTVERSIONQMAKEPATH, qmakeFilePath().toSettings());
return result;
}
diff --git a/src/plugins/qtsupport/gettingstartedwelcomepage.cpp b/src/plugins/qtsupport/gettingstartedwelcomepage.cpp
index aa44c2f51c..443c4f3047 100644
--- a/src/plugins/qtsupport/gettingstartedwelcomepage.cpp
+++ b/src/plugins/qtsupport/gettingstartedwelcomepage.cpp
@@ -94,7 +94,7 @@ QString ExamplesWelcomePage::copyToAlternativeLocation(const QFileInfo& proFileI
chooser->setHistoryCompleter(QLatin1String("Qt.WritableExamplesDir.History"));
const QString defaultRootDirectory = DocumentManager::projectsDirectory().toString();
QtcSettings *settings = ICore::settings();
- chooser->setFilePath(FilePath::fromVariant(settings->value(C_FALLBACK_ROOT, defaultRootDirectory)));
+ chooser->setFilePath(FilePath::fromSettings(settings->value(C_FALLBACK_ROOT, defaultRootDirectory)));
lay->addWidget(txt, 1, 0);
lay->addWidget(chooser, 1, 1);
enum { Copy = QDialog::Accepted + 1, Keep = QDialog::Accepted + 2 };
diff --git a/src/plugins/qtsupport/qtoptionspage.cpp b/src/plugins/qtsupport/qtoptionspage.cpp
index 279fa9839a..2854648549 100644
--- a/src/plugins/qtsupport/qtoptionspage.cpp
+++ b/src/plugins/qtsupport/qtoptionspage.cpp
@@ -826,7 +826,7 @@ static std::optional<FilePath> currentlyLinkedQtDir(bool *hasInstallSettings)
const QVariant value = QSettings(installSettingsFilePath, QSettings::IniFormat)
.value(kInstallSettingsKey);
if (value.isValid())
- return FilePath::fromVariant(value);
+ return FilePath::fromSettings(value);
}
return {};
}
diff --git a/src/plugins/remotelinux/deploymenttimeinfo.cpp b/src/plugins/remotelinux/deploymenttimeinfo.cpp
index ae1d53581e..e9c5915615 100644
--- a/src/plugins/remotelinux/deploymenttimeinfo.cpp
+++ b/src/plugins/remotelinux/deploymenttimeinfo.cpp
@@ -155,7 +155,7 @@ void DeploymentTimeInfo::importDeployTimes(const QVariantMap &map)
sysrootList.size());
for (int i = 0; i < elemCount; ++i) {
- const DeployableFile df(FilePath::fromVariant(fileList.at(i)),
+ const DeployableFile df(FilePath::fromSettings(fileList.at(i)),
remotePathList.at(i).toString());
const DeployParameters dp{df, hostList.at(i).toString(), sysrootList.at(i).toString()};
d->lastDeployed.insert(dp, { localTimesList.at(i).toDateTime(),
diff --git a/src/plugins/scxmleditor/common/mainwidget.cpp b/src/plugins/scxmleditor/common/mainwidget.cpp
index c1a32dc330..8cd7618944 100644
--- a/src/plugins/scxmleditor/common/mainwidget.cpp
+++ b/src/plugins/scxmleditor/common/mainwidget.cpp
@@ -450,7 +450,7 @@ void MainWidget::saveScreenShot()
QSettings *s = Core::ICore::settings();
const QString documentsLocation = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation);
- const FilePath lastFolder = FilePath::fromVariant(
+ const FilePath lastFolder = FilePath::fromSettings(
s->value(Constants::C_SETTINGS_LASTSAVESCREENSHOTFOLDER, documentsLocation));
const FilePath filePath = FileUtils::getSaveFilePath(this,
Tr::tr("Save Screenshot"),
@@ -460,7 +460,7 @@ void MainWidget::saveScreenShot()
const QImage image = view->view()->grabView();
if (image.save(filePath.toString())) {
- s->setValue(Constants::C_SETTINGS_LASTSAVESCREENSHOTFOLDER, filePath.parentDir().toVariant());
+ s->setValue(Constants::C_SETTINGS_LASTSAVESCREENSHOTFOLDER, filePath.parentDir().toSettings());
} else {
QMessageBox::warning(this, Tr::tr("Saving Failed"), Tr::tr("Could not save the screenshot."));
}
diff --git a/src/plugins/texteditor/fontsettings.cpp b/src/plugins/texteditor/fontsettings.cpp
index cd79a63b8b..8434ab0b89 100644
--- a/src/plugins/texteditor/fontsettings.cpp
+++ b/src/plugins/texteditor/fontsettings.cpp
@@ -79,7 +79,7 @@ void FontSettings::toSettings(QSettings *s) const
auto schemeFileNames = s->value(QLatin1String(schemeFileNamesKey)).toMap();
if (m_schemeFileName != defaultSchemeFileName() || schemeFileNames.contains(Utils::creatorTheme()->id())) {
- schemeFileNames.insert(Utils::creatorTheme()->id(), m_schemeFileName.toVariant());
+ schemeFileNames.insert(Utils::creatorTheme()->id(), m_schemeFileName.toSettings());
s->setValue(QLatin1String(schemeFileNamesKey), schemeFileNames);
}
@@ -106,7 +106,7 @@ bool FontSettings::fromSettings(const FormatDescriptions &descriptions, const QS
// Load the selected color scheme for the current theme
auto schemeFileNames = s->value(group + QLatin1String(schemeFileNamesKey)).toMap();
if (schemeFileNames.contains(Utils::creatorTheme()->id())) {
- const FilePath scheme = FilePath::fromVariant(schemeFileNames.value(Utils::creatorTheme()->id()));
+ const FilePath scheme = FilePath::fromSettings(schemeFileNames.value(Utils::creatorTheme()->id()));
loadColorScheme(scheme, descriptions);
}
}
diff --git a/src/plugins/texteditor/highlightersettings.cpp b/src/plugins/texteditor/highlightersettings.cpp
index d048fa3ff8..095295162a 100644
--- a/src/plugins/texteditor/highlightersettings.cpp
+++ b/src/plugins/texteditor/highlightersettings.cpp
@@ -27,7 +27,7 @@ void HighlighterSettings::toSettings(const QString &category, QSettings *s) cons
{
const QString &group = groupSpecifier(Constants::HIGHLIGHTER_SETTINGS_CATEGORY, category);
s->beginGroup(group);
- s->setValue(kDefinitionFilesPath, m_definitionFilesPath.toVariant());
+ s->setValue(kDefinitionFilesPath, m_definitionFilesPath.toSettings());
s->setValue(kIgnoredFilesPatterns, ignoredFilesPatterns());
s->endGroup();
}
@@ -36,11 +36,11 @@ void HighlighterSettings::fromSettings(const QString &category, QSettings *s)
{
const QString &group = groupSpecifier(Constants::HIGHLIGHTER_SETTINGS_CATEGORY, category);
s->beginGroup(group);
- m_definitionFilesPath = FilePath::fromVariant(s->value(kDefinitionFilesPath));
+ m_definitionFilesPath = FilePath::fromSettings(s->value(kDefinitionFilesPath));
if (!s->contains(kDefinitionFilesPath))
assignDefaultDefinitionsPath();
else
- m_definitionFilesPath = FilePath::fromVariant(s->value(kDefinitionFilesPath));
+ m_definitionFilesPath = FilePath::fromSettings(s->value(kDefinitionFilesPath));
if (!s->contains(kIgnoredFilesPatterns))
assignDefaultIgnoredPatterns();
else
diff --git a/src/plugins/updateinfo/updateinfoplugin.cpp b/src/plugins/updateinfo/updateinfoplugin.cpp
index 4daa02482b..3ca420d60a 100644
--- a/src/plugins/updateinfo/updateinfoplugin.cpp
+++ b/src/plugins/updateinfo/updateinfoplugin.cpp
@@ -340,7 +340,7 @@ void UpdateInfoPlugin::loadSettings() const
UpdateInfoPluginPrivate::Settings def;
QSettings *settings = ICore::settings();
const QString updaterKey = QLatin1String(UpdaterGroup) + '/';
- d->m_maintenanceTool = FilePath::fromVariant(settings->value(updaterKey + MaintenanceToolKey));
+ d->m_maintenanceTool = FilePath::fromSettings(settings->value(updaterKey + MaintenanceToolKey));
d->m_lastCheckDate = settings->value(updaterKey + LastCheckDateKey, QDate()).toDate();
d->m_settings.automaticCheck
= settings->value(updaterKey + AutomaticCheckKey, def.automaticCheck).toBool();
diff --git a/src/plugins/valgrind/memchecktool.cpp b/src/plugins/valgrind/memchecktool.cpp
index 9e16db191f..f68bdcf639 100644
--- a/src/plugins/valgrind/memchecktool.cpp
+++ b/src/plugins/valgrind/memchecktool.cpp
@@ -1429,7 +1429,7 @@ void HeobDialog::updateProfile()
int leakRecording = settings->value(heobLeakRecordingC, 2).toInt();
bool attach = settings->value(heobAttachC, false).toBool();
const QString extraArgs = settings->value(heobExtraArgsC).toString();
- FilePath path = FilePath::fromVariant(settings->value(heobPathC));
+ FilePath path = FilePath::fromSettings(settings->value(heobPathC));
settings->endGroup();
if (path.isEmpty()) {
@@ -1486,7 +1486,7 @@ void HeobDialog::saveOptions()
settings->setValue(heobLeakRecordingC, m_leakRecordingCombo->currentIndex());
settings->setValue(heobAttachC, m_attachCheck->isChecked());
settings->setValue(heobExtraArgsC, m_extraArgsEdit->text());
- settings->setValue(heobPathC, m_pathChooser->filePath().toString());
+ settings->setValue(heobPathC, m_pathChooser->filePath().toSettings());
settings->endGroup();
}
diff --git a/src/plugins/vcsbase/vcsbaseclient.cpp b/src/plugins/vcsbase/vcsbaseclient.cpp
index 22a1c2b379..102c2ee2fb 100644
--- a/src/plugins/vcsbase/vcsbaseclient.cpp
+++ b/src/plugins/vcsbase/vcsbaseclient.cpp
@@ -309,7 +309,7 @@ bool VcsBaseClient::synchronousPull(const FilePath &workingDir,
const bool ok = vcsSynchronousExec(workingDir, args, flags).result()
== ProcessResult::FinishedWithSuccess;
if (ok)
- emit changed(workingDir.toString());
+ emit changed(workingDir.toVariant());
return ok;
}
diff --git a/src/plugins/vcsbase/wizard/vcscommandpage.cpp b/src/plugins/vcsbase/wizard/vcscommandpage.cpp
index 4f76db8066..52475ba13f 100644
--- a/src/plugins/vcsbase/wizard/vcscommandpage.cpp
+++ b/src/plugins/vcsbase/wizard/vcscommandpage.cpp
@@ -89,7 +89,7 @@ WizardPage *VcsCommandPageFactory::create(JsonWizard *wizard, Id typeId, const Q
for (const QVariant &value : values) {
const QVariantMap job = value.toMap();
const bool skipEmpty = job.value(QLatin1String(JOB_SKIP_EMPTY), true).toBool();
- const FilePath workDir = FilePath::fromVariant(job.value(QLatin1String(JOB_WORK_DIRECTORY)));
+ const FilePath workDir = FilePath::fromSettings(job.value(QLatin1String(JOB_WORK_DIRECTORY)));
const QString cmdString = job.value(QLatin1String(JOB_COMMAND)).toString();
QTC_ASSERT(!cmdString.isEmpty(), continue);
diff --git a/src/tools/sdktool/adddebuggeroperation.cpp b/src/tools/sdktool/adddebuggeroperation.cpp
index 55e48f6b68..c11b20ec81 100644
--- a/src/tools/sdktool/adddebuggeroperation.cpp
+++ b/src/tools/sdktool/adddebuggeroperation.cpp
@@ -223,7 +223,7 @@ QVariantMap AddDebuggerData::addDebugger(const QVariantMap &map) const
data << KeyValuePair(QStringList() << debugger << QLatin1String(ABIS), QVariant(m_abis));
data << KeyValuePair(QStringList() << debugger << QLatin1String(ENGINE_TYPE), QVariant(m_engine));
data << KeyValuePair(QStringList() << debugger << QLatin1String(BINARY),
- Utils::FilePath::fromUserInput(m_binary).toVariant());
+ Utils::FilePath::fromUserInput(m_binary).toSettings());
data << KeyValuePair(QStringList() << QLatin1String(COUNT), QVariant(count + 1));
diff --git a/src/tools/sdktool/addkitoperation.cpp b/src/tools/sdktool/addkitoperation.cpp
index eb689b2918..14569ba839 100644
--- a/src/tools/sdktool/addkitoperation.cpp
+++ b/src/tools/sdktool/addkitoperation.cpp
@@ -686,7 +686,7 @@ QVariantMap AddKitData::addKit(const QVariantMap &map,
data << KeyValuePair({kit, DATA, BUILDDEVICE_ID}, QVariant(m_buildDevice));
if (!m_sysRoot.isNull())
data << KeyValuePair({kit, DATA, SYSROOT},
- Utils::FilePath::fromUserInput(m_sysRoot).toVariant());
+ Utils::FilePath::fromUserInput(m_sysRoot).toSettings());
for (auto i = m_tcs.constBegin(); i != m_tcs.constEnd(); ++i)
data << KeyValuePair({kit, DATA, TOOLCHAIN, i.key()}, QVariant(i.value()));
if (!qtId.isNull())
diff --git a/src/tools/sdktool/addqtoperation.cpp b/src/tools/sdktool/addqtoperation.cpp
index 82b9a29a1e..875e59d914 100644
--- a/src/tools/sdktool/addqtoperation.cpp
+++ b/src/tools/sdktool/addqtoperation.cpp
@@ -291,7 +291,7 @@ QVariantMap AddQtData::addQt(const QVariantMap &map) const
data << KeyValuePair(QStringList() << qt << QLatin1String(AUTODETECTED), QVariant(true));
data << KeyValuePair(QStringList() << qt << QLatin1String(AUTODETECTION_SOURCE), QVariant(sdkId));
- data << KeyValuePair(QStringList() << qt << QLatin1String(QMAKE), saneQmake.toVariant());
+ data << KeyValuePair(QStringList() << qt << QLatin1String(QMAKE), saneQmake.toSettings());
data << KeyValuePair(QStringList() << qt << QLatin1String(TYPE), QVariant(m_type));
data << KeyValuePair(QStringList() << qt << ABIS, QVariant(m_abis));
diff --git a/src/tools/sdktool/addtoolchainoperation.cpp b/src/tools/sdktool/addtoolchainoperation.cpp
index 750f320274..1290711e56 100644
--- a/src/tools/sdktool/addtoolchainoperation.cpp
+++ b/src/tools/sdktool/addtoolchainoperation.cpp
@@ -283,7 +283,7 @@ QVariantMap AddToolChainData::addToolChain(const QVariantMap &map) const
data << KeyValuePair({tc, LANGUAGE_KEY_V2}, QVariant(newLang));
data << KeyValuePair({tc, DISPLAYNAME}, QVariant(m_displayName));
data << KeyValuePair({tc, AUTODETECTED}, QVariant(true));
- data << KeyValuePair({tc, PATH}, Utils::FilePath::fromUserInput(m_path).toVariant());
+ data << KeyValuePair({tc, PATH}, Utils::FilePath::fromUserInput(m_path).toSettings());
data << KeyValuePair({tc, TARGET_ABI}, QVariant(m_targetAbi));
QVariantList abis;
const QStringList abiStrings = m_supportedAbis.split(',');