diff options
author | hjk <hjk@qt.io> | 2020-04-09 11:35:12 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2020-04-09 17:45:06 +0000 |
commit | 68c539bb9d697a1496b41af8efa939e1fe1f9715 (patch) | |
tree | 03056243a1c63924592e7042d07ed414ef2c6195 /src | |
parent | 79b680e7f0b0ff5ecca9b17fabb11fd03947ec8f (diff) |
Utils: Replace FileChooser::path() by filePath().toString()
Keep the old method for now to ease downstream porting.
The change is kept mechanical, there's a lot of cleanup possible now
on the user code side.
Change-Id: I936baedd45b7ba057f1c789a1bec896886f48eff
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src')
51 files changed, 91 insertions, 96 deletions
diff --git a/src/libs/utils/delegates.cpp b/src/libs/utils/delegates.cpp index 1eb281e3af..240b20fe0c 100644 --- a/src/libs/utils/delegates.cpp +++ b/src/libs/utils/delegates.cpp @@ -162,7 +162,7 @@ void PathChooserDelegate::setModelData(QWidget *editor, QAbstractItemModel *mode if (!pathChooser) return; - model->setData(index, pathChooser->path(), Qt::EditRole); + model->setData(index, pathChooser->filePath().toString(), Qt::EditRole); } void PathChooserDelegate::updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const diff --git a/src/libs/utils/filewizardpage.cpp b/src/libs/utils/filewizardpage.cpp index f486229253..d280cf2dbb 100644 --- a/src/libs/utils/filewizardpage.cpp +++ b/src/libs/utils/filewizardpage.cpp @@ -82,7 +82,7 @@ QString FileWizardPage::fileName() const QString FileWizardPage::path() const { - return d->m_ui.pathChooser->path(); + return d->m_ui.pathChooser->filePath().toString(); } void FileWizardPage::setPath(const QString &path) diff --git a/src/libs/utils/pathchooser.cpp b/src/libs/utils/pathchooser.cpp index 8440e16e71..8d0d78918f 100644 --- a/src/libs/utils/pathchooser.cpp +++ b/src/libs/utils/pathchooser.cpp @@ -295,9 +295,9 @@ FilePath PathChooser::baseDirectory() const void PathChooser::setEnvironment(const Environment &env) { - QString oldExpand = path(); + QString oldExpand = filePath().toString(); d->m_environment = env; - if (path() != oldExpand) { + if (filePath().toString() != oldExpand) { triggerChanged(); emit rawPathChanged(rawPath()); } @@ -308,11 +308,6 @@ QString PathChooser::rawPath() const return rawFileName().toString(); } -QString PathChooser::path() const -{ - return filePath().toString(); -} - FilePath PathChooser::rawFileName() const { return FilePath::fromString(QDir::fromNativeSeparators(d->m_lineEdit->text())); @@ -364,7 +359,7 @@ void PathChooser::slotBrowse() { emit beforeBrowsing(); - QString predefined = path(); + QString predefined = filePath().toString(); QFileInfo fi(predefined); if (!predefined.isEmpty() && !fi.isDir()) { diff --git a/src/libs/utils/pathchooser.h b/src/libs/utils/pathchooser.h index e60f82ec2a..9fa371fa0e 100644 --- a/src/libs/utils/pathchooser.h +++ b/src/libs/utils/pathchooser.h @@ -90,11 +90,6 @@ public: FilePath filePath() const; - // Deprecated. Use filePath().toString() - QString path() const; - // Deprecated. Use filePath() - FilePath fileName() const { return filePath(); } - QString rawPath() const; // The raw unexpanded input. FilePath rawFileName() const; // The raw unexpanded input. @@ -150,6 +145,11 @@ public: using AboutToShowContextMenuHandler = std::function<void (PathChooser *, QMenu *)>; static void setAboutToShowContextMenuHandler(AboutToShowContextMenuHandler handler); + // Deprecated. Use filePath().toString() or better suitable conversions. + QString path() const { return filePath().toString(); } + // Deprecated. Use filePath() + FilePath fileName() const { return filePath(); } + private: bool validatePath(FancyLineEdit *edit, QString *errorMessage) const; // Returns overridden title or the one from <title> diff --git a/src/libs/utils/projectintropage.cpp b/src/libs/utils/projectintropage.cpp index a98095b3d9..ac172f4078 100644 --- a/src/libs/utils/projectintropage.cpp +++ b/src/libs/utils/projectintropage.cpp @@ -116,7 +116,7 @@ QString ProjectIntroPage::projectName() const QString ProjectIntroPage::path() const { - return d->m_ui.pathChooser->path(); + return d->m_ui.pathChooser->filePath().toString(); } void ProjectIntroPage::setPath(const QString &path) diff --git a/src/plugins/android/androidsettingswidget.cpp b/src/plugins/android/androidsettingswidget.cpp index 8169358d94..8a8bf175fe 100644 --- a/src/plugins/android/androidsettingswidget.cpp +++ b/src/plugins/android/androidsettingswidget.cpp @@ -990,7 +990,7 @@ void AndroidSettingsWidget::downloadSdk() if (javaSummaryWidget->allRowsOk()) { auto javaPath = Utils::FilePath::fromUserInput(m_ui->OpenJDKLocationPathChooser->rawPath()); m_sdkDownloader->downloadAndExtractSdk(javaPath.toString(), - m_ui->SDKLocationPathChooser->path()); + m_ui->SDKLocationPathChooser->filePath().toString()); } } } diff --git a/src/plugins/android/createandroidmanifestwizard.cpp b/src/plugins/android/createandroidmanifestwizard.cpp index 16547afdca..097828ce38 100644 --- a/src/plugins/android/createandroidmanifestwizard.cpp +++ b/src/plugins/android/createandroidmanifestwizard.cpp @@ -196,7 +196,7 @@ void ChooseDirectoryPage::checkPackageSourceDir() const BuildTargetInfo bti = m_wizard->buildSystem()->buildTarget(buildKey); const QString projectDir = bti.projectFilePath.toFileInfo().absolutePath(); - const QString newDir = m_androidPackageSourceDir->path(); + const QString newDir = m_androidPackageSourceDir->filePath().toString(); bool isComplete = QFileInfo(projectDir) != QFileInfo(newDir); m_sourceDirectoryWarning->setVisible(!isComplete); @@ -238,7 +238,7 @@ void ChooseDirectoryPage::initializePage() } - m_wizard->setDirectory(m_androidPackageSourceDir->path()); + m_wizard->setDirectory(m_androidPackageSourceDir->filePath().toString()); } // diff --git a/src/plugins/autotoolsprojectmanager/autotoolsopenprojectwizard.cpp b/src/plugins/autotoolsprojectmanager/autotoolsopenprojectwizard.cpp index d56f2ecdb7..8617f5e47e 100644 --- a/src/plugins/autotoolsprojectmanager/autotoolsopenprojectwizard.cpp +++ b/src/plugins/autotoolsprojectmanager/autotoolsopenprojectwizard.cpp @@ -95,5 +95,5 @@ BuildPathPage::BuildPathPage(AutotoolsOpenProjectWizard *w) : QWizardPage(w), void BuildPathPage::buildDirectoryChanged() { - static_cast<AutotoolsOpenProjectWizard *>(wizard())->setBuildDirectory(m_pc->path()); + static_cast<AutotoolsOpenProjectWizard *>(wizard())->setBuildDirectory(m_pc->filePath().toString()); } diff --git a/src/plugins/bazaar/pullorpushdialog.cpp b/src/plugins/bazaar/pullorpushdialog.cpp index 691dbca0db..c85b72c530 100644 --- a/src/plugins/bazaar/pullorpushdialog.cpp +++ b/src/plugins/bazaar/pullorpushdialog.cpp @@ -57,7 +57,7 @@ QString PullOrPushDialog::branchLocation() const if (m_ui->defaultButton->isChecked()) return QString(); if (m_ui->localButton->isChecked()) - return m_ui->localPathChooser->path(); + return m_ui->localPathChooser->filePath().toString(); return m_ui->urlLineEdit->text(); } diff --git a/src/plugins/beautifier/artisticstyle/artisticstyleoptionspage.cpp b/src/plugins/beautifier/artisticstyle/artisticstyleoptionspage.cpp index 63b4ed28d0..922f747742 100644 --- a/src/plugins/beautifier/artisticstyle/artisticstyleoptionspage.cpp +++ b/src/plugins/beautifier/artisticstyle/artisticstyleoptionspage.cpp @@ -66,11 +66,11 @@ ArtisticStyleOptionsPageWidget::ArtisticStyleOptionsPageWidget(ArtisticStyleSett connect(ui.command, &Utils::PathChooser::validChanged, ui.options, &QWidget::setEnabled); ui.configurations->setSettings(m_settings); - ui.command->setFileName(m_settings->command()); + ui.command->setFilePath(m_settings->command()); ui.mime->setText(m_settings->supportedMimeTypesAsString()); ui.useOtherFiles->setChecked(m_settings->useOtherFiles()); ui.useSpecificConfigFile->setChecked(m_settings->useSpecificConfigFile()); - ui.specificConfigFile->setFileName(m_settings->specificConfigFile()); + ui.specificConfigFile->setFilePath(m_settings->specificConfigFile()); ui.useHomeFile->setChecked(m_settings->useHomeFile()); ui.useCustomStyle->setChecked(m_settings->useCustomStyle()); ui.configurations->setCurrentConfiguration(m_settings->customStyle()); @@ -78,7 +78,7 @@ ArtisticStyleOptionsPageWidget::ArtisticStyleOptionsPageWidget(ArtisticStyleSett void ArtisticStyleOptionsPageWidget::apply() { - m_settings->setCommand(ui.command->path()); + m_settings->setCommand(ui.command->filePath().toString()); m_settings->setSupportedMimeTypes(ui.mime->text()); m_settings->setUseOtherFiles(ui.useOtherFiles->isChecked()); m_settings->setUseSpecificConfigFile(ui.useSpecificConfigFile->isChecked()); diff --git a/src/plugins/beautifier/clangformat/clangformatoptionspage.cpp b/src/plugins/beautifier/clangformat/clangformatoptionspage.cpp index d6f85baa98..767b44064c 100644 --- a/src/plugins/beautifier/clangformat/clangformatoptionspage.cpp +++ b/src/plugins/beautifier/clangformat/clangformatoptionspage.cpp @@ -90,7 +90,7 @@ ClangFormatOptionsPageWidget::ClangFormatOptionsPageWidget(ClangFormatSettings * void ClangFormatOptionsPageWidget::apply() { - m_settings->setCommand(ui.command->path()); + m_settings->setCommand(ui.command->filePath().toString()); m_settings->setSupportedMimeTypes(ui.mime->text()); m_settings->setUsePredefinedStyle(ui.usePredefinedStyle->isChecked()); m_settings->setPredefinedStyle(ui.predefinedStyle->currentText()); diff --git a/src/plugins/beautifier/uncrustify/uncrustifyoptionspage.cpp b/src/plugins/beautifier/uncrustify/uncrustifyoptionspage.cpp index 07b447d529..10dd6377d8 100644 --- a/src/plugins/beautifier/uncrustify/uncrustifyoptionspage.cpp +++ b/src/plugins/beautifier/uncrustify/uncrustifyoptionspage.cpp @@ -80,7 +80,7 @@ UncrustifyOptionsPageWidget::UncrustifyOptionsPageWidget(UncrustifySettings *set void UncrustifyOptionsPageWidget::apply() { - m_settings->setCommand(ui.command->path()); + m_settings->setCommand(ui.command->filePath().toString()); m_settings->setSupportedMimeTypes(ui.mime->text()); m_settings->setUseOtherFiles(ui.useOtherFiles->isChecked()); m_settings->setUseHomeFile(ui.useHomeFile->isChecked()); diff --git a/src/plugins/coreplugin/coreplugin.cpp b/src/plugins/coreplugin/coreplugin.cpp index 1b3a80d718..ba2b91cc6e 100644 --- a/src/plugins/coreplugin/coreplugin.cpp +++ b/src/plugins/coreplugin/coreplugin.cpp @@ -274,23 +274,23 @@ void CorePlugin::addToPathChooserContextMenu(Utils::PathChooser *pathChooser, QM QList<QAction*> actions = menu->actions(); QAction *firstAction = actions.isEmpty() ? nullptr : actions.first(); - if (QDir().exists(pathChooser->path())) { + if (QDir().exists(pathChooser->filePath().toString())) { auto *showInGraphicalShell = new QAction(Core::FileUtils::msgGraphicalShellAction(), menu); connect(showInGraphicalShell, &QAction::triggered, pathChooser, [pathChooser]() { - Core::FileUtils::showInGraphicalShell(pathChooser, pathChooser->path()); + Core::FileUtils::showInGraphicalShell(pathChooser, pathChooser->filePath().toString()); }); menu->insertAction(firstAction, showInGraphicalShell); auto *showInTerminal = new QAction(Core::FileUtils::msgTerminalHereAction(), menu); connect(showInTerminal, &QAction::triggered, pathChooser, [pathChooser]() { - Core::FileUtils::openTerminal(pathChooser->path()); + Core::FileUtils::openTerminal(pathChooser->filePath().toString()); }); menu->insertAction(firstAction, showInTerminal); } else { auto *mkPathAct = new QAction(tr("Create Folder"), menu); connect(mkPathAct, &QAction::triggered, pathChooser, [pathChooser]() { - QDir().mkpath(pathChooser->path()); + QDir().mkpath(pathChooser->filePath().toString()); pathChooser->triggerChanged(); }); menu->insertAction(firstAction, mkPathAct); diff --git a/src/plugins/coreplugin/systemsettings.cpp b/src/plugins/coreplugin/systemsettings.cpp index a0627359d8..59b2d518fc 100644 --- a/src/plugins/coreplugin/systemsettings.cpp +++ b/src/plugins/coreplugin/systemsettings.cpp @@ -182,7 +182,7 @@ void SystemSettingsWidget::apply() m_ui.externalFileBrowserEdit->text()); } } - PatchTool::setPatchCommand(m_ui.patchChooser->path()); + PatchTool::setPatchCommand(m_ui.patchChooser->filePath().toString()); EditorManagerPrivate::setAutoSaveEnabled(m_ui.autoSaveCheckBox->isChecked()); EditorManagerPrivate::setAutoSaveInterval(m_ui.autoSaveInterval->value()); EditorManagerPrivate::setAutoSuspendEnabled(m_ui.autoSuspendCheckBox->isChecked()); diff --git a/src/plugins/cpaster/fileshareprotocolsettingspage.cpp b/src/plugins/cpaster/fileshareprotocolsettingspage.cpp index a0b160176b..8d7737934f 100644 --- a/src/plugins/cpaster/fileshareprotocolsettingspage.cpp +++ b/src/plugins/cpaster/fileshareprotocolsettingspage.cpp @@ -84,7 +84,7 @@ void FileShareProtocolSettingsWidget::setSettings(const FileShareProtocolSetting FileShareProtocolSettings FileShareProtocolSettingsWidget::settings() const { FileShareProtocolSettings rc; - rc.path = m_ui.pathChooser->path(); + rc.path = m_ui.pathChooser->filePath().toString(); rc.displayCount = m_ui.displayCountSpinBox->value(); return rc; } diff --git a/src/plugins/cppcheck/cppcheckoptions.cpp b/src/plugins/cppcheck/cppcheckoptions.cpp index a3070560bd..bb963c06e7 100644 --- a/src/plugins/cppcheck/cppcheckoptions.cpp +++ b/src/plugins/cppcheck/cppcheckoptions.cpp @@ -121,7 +121,7 @@ void OptionsWidget::load(const CppcheckOptions &options) void OptionsWidget::save(CppcheckOptions &options) const { - options.binary = m_binary->path(); + options.binary = m_binary->filePath().toString(); options.customArguments = m_customArguments->text(); options.ignoredPatterns = m_ignorePatterns->text(); options.warning = m_warning->isChecked(); diff --git a/src/plugins/cpptools/cppfilesettingspage.cpp b/src/plugins/cpptools/cppfilesettingspage.cpp index c706076291..7589b20185 100644 --- a/src/plugins/cpptools/cppfilesettingspage.cpp +++ b/src/plugins/cpptools/cppfilesettingspage.cpp @@ -297,7 +297,7 @@ CppFileSettingsWidget::CppFileSettingsWidget(CppFileSettings *settings) QString CppFileSettingsWidget::licenseTemplatePath() const { - return m_ui.licenseTemplatePathChooser->path(); + return m_ui.licenseTemplatePathChooser->filePath().toString(); } void CppFileSettingsWidget::setLicenseTemplatePath(const QString &lp) diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp index 89bad28ed1..e0aecca42c 100644 --- a/src/plugins/debugger/breakhandler.cpp +++ b/src/plugins/debugger/breakhandler.cpp @@ -665,7 +665,7 @@ void BreakpointDialog::getParts(unsigned partsMask, BreakpointParameters *data) if (partsMask & FileAndLinePart) { data->lineNumber = m_lineEditLineNumber->text().toInt(); data->pathUsage = static_cast<BreakpointPathUsage>(m_comboBoxPathUsage->currentIndex()); - data->fileName = FilePath::fromUserInput(m_pathChooserFileName->path()); + data->fileName = FilePath::fromUserInput(m_pathChooserFileName->filePath().toString()); } if (partsMask & FunctionPart) data->functionName = m_lineEditFunction->text(); diff --git a/src/plugins/debugger/debuggerdialogs.cpp b/src/plugins/debugger/debuggerdialogs.cpp index 00e6d269e1..afaaf6af56 100644 --- a/src/plugins/debugger/debuggerdialogs.cpp +++ b/src/plugins/debugger/debuggerdialogs.cpp @@ -484,9 +484,9 @@ StartApplicationParameters StartApplicationDialog::parameters() const result.serverInitCommands = d->serverInitCommandsTextEdit->toPlainText(); result.serverResetCommands = d->serverResetCommandsTextEdit->toPlainText(); result.kitId = d->kitChooser->currentKitId(); - result.debugInfoLocation = d->debuginfoPathChooser->path(); + result.debugInfoLocation = d->debuginfoPathChooser->filePath().toString(); result.runnable.commandLineArguments = d->arguments->text(); - result.runnable.workingDirectory = d->workingDirectory->path(); + result.runnable.workingDirectory = d->workingDirectory->filePath().toString(); result.breakAtMain = d->breakAtMainCheckBox->isChecked(); result.runInTerminal = d->runInTerminalCheckBox->isChecked(); return result; diff --git a/src/plugins/debugger/debuggeritemmanager.cpp b/src/plugins/debugger/debuggeritemmanager.cpp index 1a4f0f845e..4be3de93a9 100644 --- a/src/plugins/debugger/debuggeritemmanager.cpp +++ b/src/plugins/debugger/debuggeritemmanager.cpp @@ -427,7 +427,7 @@ void DebuggerItemConfigWidget::binaryPathHasChanged() return; DebuggerItem tmp; - QFileInfo fi = QFileInfo(m_binaryChooser->path()); + QFileInfo fi = QFileInfo(m_binaryChooser->filePath().toString()); if (fi.isExecutable()) { tmp = item(); tmp.reinitializeFromFile(); diff --git a/src/plugins/debugger/loadcoredialog.cpp b/src/plugins/debugger/loadcoredialog.cpp index aa4121ebd8..550fdc2d20 100644 --- a/src/plugins/debugger/loadcoredialog.cpp +++ b/src/plugins/debugger/loadcoredialog.cpp @@ -412,7 +412,7 @@ void AttachCoreDialog::selectRemoteCoreFile() QString AttachCoreDialog::localCoreFile() const { - return d->localCoreFileName->path(); + return d->localCoreFileName->filePath().toString(); } FilePath AttachCoreDialog::symbolFile() const @@ -462,7 +462,7 @@ Kit *AttachCoreDialog::kit() const QString AttachCoreDialog::overrideStartScript() const { - return d->overrideStartScriptFileName->path(); + return d->overrideStartScriptFileName->filePath().toString(); } void AttachCoreDialog::setOverrideStartScript(const QString &scriptName) diff --git a/src/plugins/debugger/shared/cdbsymbolpathlisteditor.cpp b/src/plugins/debugger/shared/cdbsymbolpathlisteditor.cpp index 0bd667f457..ae5e38366c 100644 --- a/src/plugins/debugger/shared/cdbsymbolpathlisteditor.cpp +++ b/src/plugins/debugger/shared/cdbsymbolpathlisteditor.cpp @@ -75,7 +75,7 @@ void CacheDirectoryDialog::setPath(const QString &p) QString CacheDirectoryDialog::path() const { - return m_chooser->path(); + return m_chooser->filePath().toString(); } void CacheDirectoryDialog::accept() diff --git a/src/plugins/debugger/shared/symbolpathsdialog.cpp b/src/plugins/debugger/shared/symbolpathsdialog.cpp index eb396c2c9b..db0354cca4 100644 --- a/src/plugins/debugger/shared/symbolpathsdialog.cpp +++ b/src/plugins/debugger/shared/symbolpathsdialog.cpp @@ -56,7 +56,7 @@ bool SymbolPathsDialog::useSymbolServer() const QString SymbolPathsDialog::path() const { - return ui->pathChooser->path(); + return ui->pathChooser->filePath().toString(); } void SymbolPathsDialog::setUseSymbolCache(bool useSymbolCache) diff --git a/src/plugins/debugger/unstartedappwatcherdialog.cpp b/src/plugins/debugger/unstartedappwatcherdialog.cpp index a167cce735..2ef8c67588 100644 --- a/src/plugins/debugger/unstartedappwatcherdialog.cpp +++ b/src/plugins/debugger/unstartedappwatcherdialog.cpp @@ -256,7 +256,7 @@ void UnstartedAppWatcherDialog::startStopTimer(bool start) void UnstartedAppWatcherDialog::findProcess() { - const QString &appName = Utils::FileUtils::normalizePathName(m_pathChooser->path()); + const QString &appName = Utils::FileUtils::normalizePathName(m_pathChooser->filePath().toString()); DeviceProcessItem fallback; foreach (const DeviceProcessItem &p, DeviceProcessList::localProcesses()) { if (Utils::FileUtils::normalizePathName(p.exe) == appName) { @@ -291,8 +291,8 @@ void UnstartedAppWatcherDialog::kitChanged() bool UnstartedAppWatcherDialog::checkExecutableString() const { - if (!m_pathChooser->path().isEmpty()) { - QFileInfo fileInfo(m_pathChooser->path()); + if (!m_pathChooser->filePath().toString().isEmpty()) { + QFileInfo fileInfo(m_pathChooser->filePath().toString()); return (fileInfo.exists() && fileInfo.isFile()); } return false; diff --git a/src/plugins/designer/cpp/newclasswidget.cpp b/src/plugins/designer/cpp/newclasswidget.cpp index 2cd400e666..249b91048a 100644 --- a/src/plugins/designer/cpp/newclasswidget.cpp +++ b/src/plugins/designer/cpp/newclasswidget.cpp @@ -174,7 +174,7 @@ QString NewClassWidget::formFileName() const QString NewClassWidget::path() const { - return d->m_ui.pathChooser->path(); + return d->m_ui.pathChooser->filePath().toString(); } void NewClassWidget::setPath(const QString &path) diff --git a/src/plugins/git/changeselectiondialog.cpp b/src/plugins/git/changeselectiondialog.cpp index 52f8c4762f..f14cbf8f9d 100644 --- a/src/plugins/git/changeselectiondialog.cpp +++ b/src/plugins/git/changeselectiondialog.cpp @@ -137,7 +137,7 @@ void ChangeSelectionDialog::selectCommitFromRecentHistory() QString ChangeSelectionDialog::workingDirectory() const { - const QString workingDir = m_ui->workingDirectoryChooser->path(); + const QString workingDir = m_ui->workingDirectoryChooser->filePath().toString(); if (workingDir.isEmpty() || !QDir(workingDir).exists()) return QString(); diff --git a/src/plugins/git/gerrit/gerritoptionspage.cpp b/src/plugins/git/gerrit/gerritoptionspage.cpp index 21d273312c..99985c8ba2 100644 --- a/src/plugins/git/gerrit/gerritoptionspage.cpp +++ b/src/plugins/git/gerrit/gerritoptionspage.cpp @@ -124,8 +124,8 @@ GerritParameters GerritOptionsWidget::parameters() const static_cast<unsigned short>(m_portSpinBox->value()), m_userLineEdit->text().trimmed(), GerritServer::Ssh); - result.ssh = m_sshChooser->path(); - result.curl = m_curlChooser->path(); + result.ssh = m_sshChooser->filePath().toString(); + result.curl = m_curlChooser->filePath().toString(); result.https = m_httpsCheckBox->isChecked(); return result; } diff --git a/src/plugins/languageclient/languageclientsettings.cpp b/src/plugins/languageclient/languageclientsettings.cpp index c27a8f599a..75cff18668 100644 --- a/src/plugins/languageclient/languageclientsettings.cpp +++ b/src/plugins/languageclient/languageclientsettings.cpp @@ -890,7 +890,7 @@ StdIOSettingsWidget::StdIOSettingsWidget(const StdIOSettings *settings, QWidget QString StdIOSettingsWidget::executable() const { - return m_executable->path(); + return m_executable->filePath().toString(); } QString StdIOSettingsWidget::arguments() const diff --git a/src/plugins/mcusupport/mcusupportoptions.cpp b/src/plugins/mcusupport/mcusupportoptions.cpp index 6d888b48f5..c8361f7d18 100644 --- a/src/plugins/mcusupport/mcusupportoptions.cpp +++ b/src/plugins/mcusupport/mcusupportoptions.cpp @@ -80,7 +80,7 @@ McuPackage::McuPackage(const QString &label, const QString &defaultPath, QString McuPackage::path() const { - return QFileInfo(m_fileChooser->path() + m_relativePathModifier).absoluteFilePath(); + return QFileInfo(m_fileChooser->filePath().toString() + m_relativePathModifier).absoluteFilePath(); } QString McuPackage::label() const @@ -180,7 +180,7 @@ void McuPackage::updateStatus() m_path = m_fileChooser->rawPath(); const bool validPath = m_fileChooser->isValid(); const Utils::FilePath detectionPath = Utils::FilePath::fromString( - m_fileChooser->path() + "/" + m_detectionPath); + m_fileChooser->filePath().toString() + "/" + m_detectionPath); const QString displayDetectionPath = Utils::FilePath::fromString(m_detectionPath).toUserOutput(); const bool validPackage = detectionPath.exists(); diff --git a/src/plugins/mercurial/srcdestdialog.cpp b/src/plugins/mercurial/srcdestdialog.cpp index a1aec460fe..34d9339110 100644 --- a/src/plugins/mercurial/srcdestdialog.cpp +++ b/src/plugins/mercurial/srcdestdialog.cpp @@ -86,7 +86,7 @@ QString SrcDestDialog::getRepositoryString() const return repoUrl.toString(); } if (m_ui->localButton->isChecked()) - return m_ui->localPathChooser->path(); + return m_ui->localPathChooser->filePath().toString(); return m_ui->urlLineEdit->text(); } diff --git a/src/plugins/nim/project/nimtoolchainfactory.cpp b/src/plugins/nim/project/nimtoolchainfactory.cpp index f1c8b5386b..7bf2377121 100644 --- a/src/plugins/nim/project/nimtoolchainfactory.cpp +++ b/src/plugins/nim/project/nimtoolchainfactory.cpp @@ -123,7 +123,7 @@ bool NimToolChainConfigWidget::isDirtyImpl() const { auto tc = static_cast<NimToolChain *>(toolChain()); Q_ASSERT(tc); - return tc->compilerCommand().toString() != m_compilerCommand->path(); + return tc->compilerCommand().toString() != m_compilerCommand->filePath().toString(); } void NimToolChainConfigWidget::makeReadOnlyImpl() diff --git a/src/plugins/nim/settings/nimtoolssettingspage.cpp b/src/plugins/nim/settings/nimtoolssettingspage.cpp index 129e4c24c0..a30b44ce06 100644 --- a/src/plugins/nim/settings/nimtoolssettingspage.cpp +++ b/src/plugins/nim/settings/nimtoolssettingspage.cpp @@ -47,7 +47,7 @@ NimToolsSettingsWidget::~NimToolsSettingsWidget() QString NimToolsSettingsWidget::command() const { - return ui->pathWidget->path(); + return ui->pathWidget->filePath().toString(); } void NimToolsSettingsWidget::setCommand(const QString &filename) diff --git a/src/plugins/projectexplorer/customtoolchain.cpp b/src/plugins/projectexplorer/customtoolchain.cpp index 4b466e4284..a1afadbfaa 100644 --- a/src/plugins/projectexplorer/customtoolchain.cpp +++ b/src/plugins/projectexplorer/customtoolchain.cpp @@ -608,7 +608,7 @@ bool CustomToolChainConfigWidget::isDirtyImpl() const auto tc = static_cast<CustomToolChain *>(toolChain()); Q_ASSERT(tc); return m_compilerCommand->filePath() != tc->compilerCommand() - || m_makeCommand->path() != tc->makeCommand(Environment()).toString() + || m_makeCommand->filePath().toString() != tc->makeCommand(Environment()).toString() || m_abiWidget->currentAbi() != tc->targetAbi() || Macro::toMacros(m_predefinedDetails->text().toUtf8()) != tc->rawPredefinedMacros() || m_headerDetails->entries() != tc->headerPathsList() diff --git a/src/plugins/projectexplorer/customwizard/customwizardpage.cpp b/src/plugins/projectexplorer/customwizard/customwizardpage.cpp index 3c10eef37c..d171ef05fd 100644 --- a/src/plugins/projectexplorer/customwizard/customwizardpage.cpp +++ b/src/plugins/projectexplorer/customwizard/customwizardpage.cpp @@ -360,8 +360,8 @@ void CustomWizardFieldPage::cleanupPage() PathChooserData &ped = m_pathChoosers[i]; QString defaultText = ped.defaultText; CustomWizardContext::replaceFields(m_context->baseReplacements, &defaultText); - if (ped.pathChooser->path() != ped.defaultText) - ped.userChange = ped.pathChooser->path(); + if (ped.pathChooser->filePath().toString() != ped.defaultText) + ped.userChange = ped.pathChooser->filePath().toString(); else ped.userChange.clear(); } @@ -435,7 +435,7 @@ CustomWizardPage::CustomWizardPage(const QSharedPointer<CustomWizardContext> &ct QString CustomWizardPage::path() const { - return m_pathChooser->path(); + return m_pathChooser->filePath().toString(); } void CustomWizardPage::setPath(const QString &path) diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp index 89bca8690c..092cc6102d 100644 --- a/src/plugins/projectexplorer/gcctoolchain.cpp +++ b/src/plugins/projectexplorer/gcctoolchain.cpp @@ -1305,7 +1305,7 @@ void GccToolChainConfigWidget::setFromToolchain() m_platformLinkerFlagsLineEdit->setText(QtcProcess::joinArgs(tc->platformLinkerFlags())); if (m_abiWidget) { m_abiWidget->setAbis(tc->supportedAbis(), tc->targetAbi()); - if (!m_isReadOnly && !m_compilerCommand->path().isEmpty()) + if (!m_isReadOnly && !m_compilerCommand->filePath().toString().isEmpty()) m_abiWidget->setEnabled(true); } } diff --git a/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp b/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp index 5b2b97d43e..6f141fe58e 100644 --- a/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp +++ b/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp @@ -746,7 +746,7 @@ QWidget *PathChooserField::createWidget(const QString &displayName, JsonFieldPag if (!m_historyId.isEmpty()) w->setHistoryCompleter(m_historyId); QObject::connect(w, &PathChooser::pathChanged, [this, w] { - if (w->path() != m_path) + if (w->filePath().toString() != m_path) setHasUserChanges(); }); return w; @@ -798,7 +798,7 @@ void PathChooserField::fromSettings(const QVariant &value) QVariant PathChooserField::toSettings() const { - return qobject_cast<PathChooser *>(widget())->path(); + return qobject_cast<PathChooser *>(widget())->filePath().toString(); } // -------------------------------------------------------------------- diff --git a/src/plugins/projectexplorer/projectexplorersettingspage.cpp b/src/plugins/projectexplorer/projectexplorersettingspage.cpp index 4172424160..14d5a33e6f 100644 --- a/src/plugins/projectexplorer/projectexplorersettingspage.cpp +++ b/src/plugins/projectexplorer/projectexplorersettingspage.cpp @@ -137,7 +137,7 @@ void ProjectExplorerSettingsWidget::setSettings(const ProjectExplorerSettings & QString ProjectExplorerSettingsWidget::projectsDirectory() const { - return m_ui.projectsDirectoryPathChooser->path(); + return m_ui.projectsDirectoryPathChooser->filePath().toString(); } void ProjectExplorerSettingsWidget::setProjectsDirectory(const QString &pd) diff --git a/src/plugins/projectexplorer/runconfigurationaspects.cpp b/src/plugins/projectexplorer/runconfigurationaspects.cpp index 4ec47bca4e..4e0f573b0c 100644 --- a/src/plugins/projectexplorer/runconfigurationaspects.cpp +++ b/src/plugins/projectexplorer/runconfigurationaspects.cpp @@ -148,7 +148,7 @@ void WorkingDirectoryAspect::addToLayout(LayoutBuilder &builder) m_chooser->setExpectedKind(Utils::PathChooser::Directory); m_chooser->setPromptDialogTitle(tr("Select Working Directory")); m_chooser->setBaseDirectory(m_defaultWorkingDirectory); - m_chooser->setFileName(m_workingDirectory.isEmpty() ? m_defaultWorkingDirectory : m_workingDirectory); + m_chooser->setFilePath(m_workingDirectory.isEmpty() ? m_defaultWorkingDirectory : m_workingDirectory); connect(m_chooser.data(), &PathChooser::pathChanged, this, [this]() { m_workingDirectory = m_chooser->rawFileName(); @@ -183,7 +183,7 @@ QString WorkingDirectoryAspect::keyForDefaultWd() const void WorkingDirectoryAspect::resetPath() { - m_chooser->setFileName(m_defaultWorkingDirectory); + m_chooser->setFilePath(m_defaultWorkingDirectory); } void WorkingDirectoryAspect::fromMap(const QVariantMap &map) @@ -195,7 +195,7 @@ void WorkingDirectoryAspect::fromMap(const QVariantMap &map) m_workingDirectory = m_defaultWorkingDirectory; if (m_chooser) - m_chooser->setFileName(m_workingDirectory.isEmpty() ? m_defaultWorkingDirectory : m_workingDirectory); + m_chooser->setFilePath(m_workingDirectory.isEmpty() ? m_defaultWorkingDirectory : m_workingDirectory); } void WorkingDirectoryAspect::toMap(QVariantMap &data) const @@ -238,7 +238,7 @@ void WorkingDirectoryAspect::setDefaultWorkingDirectory(const FilePath &defaultW if (m_workingDirectory.isEmpty() || m_workingDirectory == oldDefaultDir) { if (m_chooser) - m_chooser->setFileName(m_defaultWorkingDirectory); + m_chooser->setFilePath(m_defaultWorkingDirectory); m_workingDirectory = defaultWorkingDir; } } diff --git a/src/plugins/python/pythonsettings.cpp b/src/plugins/python/pythonsettings.cpp index d2d1d74f87..cc497e9e14 100644 --- a/src/plugins/python/pythonsettings.cpp +++ b/src/plugins/python/pythonsettings.cpp @@ -79,7 +79,7 @@ public: Interpreter toInterpreter() { - return {m_currentId, m_name->text(), FilePath::fromUserInput(m_executable->path())}; + return {m_currentId, m_name->text(), FilePath::fromUserInput(m_executable->filePath().toString())}; } QLineEdit *m_name = nullptr; PathChooser *m_executable = nullptr; diff --git a/src/plugins/qmakeprojectmanager/customwidgetwizard/classdefinition.cpp b/src/plugins/qmakeprojectmanager/customwidgetwizard/classdefinition.cpp index 0d0ab31179..0407387dc2 100644 --- a/src/plugins/qmakeprojectmanager/customwidgetwizard/classdefinition.cpp +++ b/src/plugins/qmakeprojectmanager/customwidgetwizard/classdefinition.cpp @@ -140,7 +140,7 @@ PluginOptions::WidgetOptions ClassDefinition::widgetOptions(const QString &class wo.pluginClassName = m_ui.pluginClassEdit->text(); wo.pluginHeaderFile = m_ui.pluginHeaderEdit->text(); wo.pluginSourceFile = m_ui.pluginSourceEdit->text(); - wo.iconFile = m_ui.iconPathChooser->path(); + wo.iconFile = m_ui.iconPathChooser->filePath().toString(); wo.group = m_ui.groupEdit->text(); wo.toolTip = m_ui.tooltipEdit->text(); wo.whatsThis = m_ui.whatsthisEdit->toPlainText(); diff --git a/src/plugins/qmakeprojectmanager/librarydetailscontroller.cpp b/src/plugins/qmakeprojectmanager/librarydetailscontroller.cpp index 4569ad9dfa..8a79dcf314 100644 --- a/src/plugins/qmakeprojectmanager/librarydetailscontroller.cpp +++ b/src/plugins/qmakeprojectmanager/librarydetailscontroller.cpp @@ -622,7 +622,7 @@ AddLibraryWizard::LinkageType NonInternalLibraryDetailsController::suggestedLink AddLibraryWizard::LinkageType type = AddLibraryWizard::NoLinkage; if (libraryPlatformType() != Utils::OsTypeWindows) { if (libraryDetailsWidget()->libraryPathChooser->isValid()) { - QFileInfo fi(libraryDetailsWidget()->libraryPathChooser->path()); + QFileInfo fi(libraryDetailsWidget()->libraryPathChooser->filePath().toString()); if (fi.suffix() == QLatin1String("a")) type = AddLibraryWizard::StaticLinkage; else @@ -637,7 +637,7 @@ AddLibraryWizard::MacLibraryType NonInternalLibraryDetailsController::suggestedM AddLibraryWizard::MacLibraryType type = AddLibraryWizard::NoLibraryType; if (libraryPlatformType() == Utils::OsTypeMac) { if (libraryDetailsWidget()->libraryPathChooser->isValid()) { - QFileInfo fi(libraryDetailsWidget()->libraryPathChooser->path()); + QFileInfo fi(libraryDetailsWidget()->libraryPathChooser->filePath().toString()); if (fi.suffix() == QLatin1String("framework")) type = AddLibraryWizard::FrameworkType; else @@ -651,7 +651,7 @@ QString NonInternalLibraryDetailsController::suggestedIncludePath() const { QString includePath; if (libraryDetailsWidget()->libraryPathChooser->isValid()) { - QFileInfo fi(libraryDetailsWidget()->libraryPathChooser->path()); + QFileInfo fi(libraryDetailsWidget()->libraryPathChooser->filePath().toString()); includePath = fi.absolutePath(); QFileInfo dfi(includePath); // TODO: Win: remove debug or release folder first if appropriate @@ -722,7 +722,7 @@ void NonInternalLibraryDetailsController::slotLibraryPathChanged() bool subfoldersEnabled = true; bool removeSuffixEnabled = true; if (libraryDetailsWidget()->libraryPathChooser->isValid()) { - QFileInfo fi(libraryDetailsWidget()->libraryPathChooser->path()); + QFileInfo fi(libraryDetailsWidget()->libraryPathChooser->filePath().toString()); QFileInfo dfi(fi.absolutePath()); const QString parentFolderName = dfi.fileName().toLower(); if (parentFolderName != QLatin1String("debug") && @@ -755,7 +755,7 @@ bool NonInternalLibraryDetailsController::isComplete() const QString NonInternalLibraryDetailsController::snippet() const { - QString libPath = libraryDetailsWidget()->libraryPathChooser->path(); + QString libPath = libraryDetailsWidget()->libraryPathChooser->filePath().toString(); QFileInfo fi(libPath); QString libName; const bool removeSuffix = isWindowsGroupVisible() @@ -801,7 +801,7 @@ QString NonInternalLibraryDetailsController::snippet() const } targetRelativePath = appendSeparator(pdir.relativeFilePath(absoluteLibraryPath)); - const QString includePath = libraryDetailsWidget()->includePathChooser->path(); + const QString includePath = libraryDetailsWidget()->includePathChooser->filePath().toString(); if (!includePath.isEmpty()) includeRelativePath = pdir.relativeFilePath(includePath); } @@ -914,7 +914,7 @@ void ExternalLibraryDetailsController::updateWindowsOptionsEnablement() bool removeSuffixEnabled = true; if (libraryPlatformType() == Utils::OsTypeWindows && libraryDetailsWidget()->libraryPathChooser->isValid()) { - QFileInfo fi(libraryDetailsWidget()->libraryPathChooser->path()); + QFileInfo fi(libraryDetailsWidget()->libraryPathChooser->filePath().toString()); QFileInfo dfi(fi.absolutePath()); const QString parentFolderName = dfi.fileName().toLower(); if (parentFolderName != QLatin1String("debug") && @@ -1117,7 +1117,7 @@ QString InternalLibraryDetailsController::snippet() const TargetInformation targetInfo = m_proFiles.at(currentIndex)->targetInformation(); const QString targetRelativePath = appendSeparator(projectBuildDir.relativeFilePath(targetInfo.buildDir.toString())); - const QString includeRelativePath = projectSrcDir.relativeFilePath(libraryDetailsWidget()->includePathChooser->path()); + const QString includeRelativePath = projectSrcDir.relativeFilePath(libraryDetailsWidget()->includePathChooser->filePath().toString()); const bool useSubfolders = libraryDetailsWidget()->useSubfoldersCheckBox->isChecked(); const bool addSuffix = libraryDetailsWidget()->addSuffixCheckBox->isChecked(); diff --git a/src/plugins/qmljseditor/qmljscomponentnamedialog.cpp b/src/plugins/qmljseditor/qmljscomponentnamedialog.cpp index 1f486a8265..0be9d8ee24 100644 --- a/src/plugins/qmljseditor/qmljscomponentnamedialog.cpp +++ b/src/plugins/qmljseditor/qmljscomponentnamedialog.cpp @@ -87,7 +87,7 @@ bool ComponentNameDialog::go(QString *proposedName, if (QDialog::Accepted == d.exec()) { *proposedName = d.ui->componentNameEdit->text(); - *proposedPath = d.ui->pathEdit->path(); + *proposedPath = d.ui->pathEdit->filePath().toString(); if (d.ui->checkBox->isChecked()) *proposedSuffix = "ui.qml"; diff --git a/src/plugins/qnx/qnxdebugsupport.cpp b/src/plugins/qnx/qnxdebugsupport.cpp index 8853578247..4451e23c1f 100644 --- a/src/plugins/qnx/qnxdebugsupport.cpp +++ b/src/plugins/qnx/qnxdebugsupport.cpp @@ -177,7 +177,7 @@ public: mainLayout->insertLayout(mainLayout->count() - 2, formLayout); } - QString projectSource() const { return m_projectSource->path(); } + QString projectSource() const { return m_projectSource->filePath().toString(); } FilePath localExecutable() const { return m_localExecutable->filePath(); } private: diff --git a/src/plugins/qnx/qnxtoolchain.cpp b/src/plugins/qnx/qnxtoolchain.cpp index 974fceb56f..88ac04bde3 100644 --- a/src/plugins/qnx/qnxtoolchain.cpp +++ b/src/plugins/qnx/qnxtoolchain.cpp @@ -280,7 +280,7 @@ void QnxToolChainConfigWidget::discardImpl() m_compilerCommand->setFilePath(tc->compilerCommand()); m_sdpPath->setPath(tc->sdpPath()); m_abiWidget->setAbis(tc->supportedAbis(), tc->targetAbi()); - if (!m_compilerCommand->path().isEmpty()) + if (!m_compilerCommand->filePath().toString().isEmpty()) m_abiWidget->setEnabled(true); } @@ -289,7 +289,7 @@ bool QnxToolChainConfigWidget::isDirtyImpl() const auto tc = static_cast<const QnxToolChain *>(toolChain()); Q_ASSERT(tc); return m_compilerCommand->filePath() != tc->compilerCommand() - || m_sdpPath->path() != tc->sdpPath() + || m_sdpPath->filePath().toString() != tc->sdpPath() || m_abiWidget->currentAbi() != tc->targetAbi(); } diff --git a/src/plugins/qtsupport/gettingstartedwelcomepage.cpp b/src/plugins/qtsupport/gettingstartedwelcomepage.cpp index db737fb5ac..cfd675158d 100644 --- a/src/plugins/qtsupport/gettingstartedwelcomepage.cpp +++ b/src/plugins/qtsupport/gettingstartedwelcomepage.cpp @@ -125,7 +125,7 @@ QString ExamplesWelcomePage::copyToAlternativeLocation(const QFileInfo& proFileI int code = d.exec(); if (code == Copy) { QString exampleDirName = proFileInfo.dir().dirName(); - QString destBaseDir = chooser->path(); + QString destBaseDir = chooser->filePath().toString(); settings->setValue(QString::fromLatin1(C_FALLBACK_ROOT), destBaseDir); QDir toDirWithExamplesDir(destBaseDir); if (toDirWithExamplesDir.cd(exampleDirName)) { diff --git a/src/plugins/remotelinux/genericlinuxdeviceconfigurationwidget.cpp b/src/plugins/remotelinux/genericlinuxdeviceconfigurationwidget.cpp index 5def09d3c8..74dbe099a0 100644 --- a/src/plugins/remotelinux/genericlinuxdeviceconfigurationwidget.cpp +++ b/src/plugins/remotelinux/genericlinuxdeviceconfigurationwidget.cpp @@ -123,7 +123,7 @@ void GenericLinuxDeviceConfigurationWidget::userNameEditingFinished() void GenericLinuxDeviceConfigurationWidget::keyFileEditingFinished() { SshConnectionParameters sshParams = device()->sshParameters(); - sshParams.privateKeyFile = m_ui->keyFileLineEdit->path(); + sshParams.privateKeyFile = m_ui->keyFileLineEdit->filePath().toString(); device()->setSshParameters(sshParams); } diff --git a/src/plugins/remotelinux/genericlinuxdeviceconfigurationwizardpages.cpp b/src/plugins/remotelinux/genericlinuxdeviceconfigurationwizardpages.cpp index d568caa1f3..9165ee56c8 100644 --- a/src/plugins/remotelinux/genericlinuxdeviceconfigurationwizardpages.cpp +++ b/src/plugins/remotelinux/genericlinuxdeviceconfigurationwizardpages.cpp @@ -227,15 +227,15 @@ void GenericLinuxDeviceConfigurationWizardKeyDeploymentPage::initializePage() bool GenericLinuxDeviceConfigurationWizardKeyDeploymentPage::isComplete() const { - return d->keyFileChooser.path().isEmpty() || d->keyFileChooser.filePath().exists(); + return d->keyFileChooser.filePath().toString().isEmpty() || d->keyFileChooser.filePath().exists(); } bool GenericLinuxDeviceConfigurationWizardKeyDeploymentPage::validatePage() { - if (!d->defaultKeys().contains(d->keyFileChooser.path())) { + if (!d->defaultKeys().contains(d->keyFileChooser.filePath().toString())) { SshConnectionParameters sshParams = d->device->sshParameters(); sshParams.authenticationType = SshConnectionParameters::AuthenticationTypeSpecificKey; - sshParams.privateKeyFile = d->keyFileChooser.path(); + sshParams.privateKeyFile = d->keyFileChooser.filePath().toString(); d->device->setSshParameters(sshParams); } return true; @@ -243,7 +243,7 @@ bool GenericLinuxDeviceConfigurationWizardKeyDeploymentPage::validatePage() QString GenericLinuxDeviceConfigurationWizardKeyDeploymentPage::privateKeyFilePath() const { - return d->keyFileChooser.path(); + return d->keyFileChooser.filePath().toString(); } void GenericLinuxDeviceConfigurationWizardKeyDeploymentPage::createKey() diff --git a/src/plugins/texteditor/highlightersettingspage.cpp b/src/plugins/texteditor/highlightersettingspage.cpp index 3f31051c09..7180e1dc14 100644 --- a/src/plugins/texteditor/highlightersettingspage.cpp +++ b/src/plugins/texteditor/highlightersettingspage.cpp @@ -150,7 +150,7 @@ const HighlighterSettings &HighlighterSettingsPage::highlighterSettings() const void HighlighterSettingsPage::settingsFromUI() { m_d->ensureInitialized(); - m_d->m_settings.setDefinitionFilesPath(m_d->m_page->definitionFilesPath->path()); + m_d->m_settings.setDefinitionFilesPath(m_d->m_page->definitionFilesPath->filePath().toString()); m_d->m_settings.setIgnoredFilesPatterns(m_d->m_page->ignoreEdit->text()); m_d->m_settings.toSettings(m_d->m_settingsPrefix, Core::ICore::settings()); } @@ -165,6 +165,6 @@ void HighlighterSettingsPage::settingsToUI() bool HighlighterSettingsPage::settingsChanged() const { m_d->ensureInitialized(); - return (m_d->m_settings.definitionFilesPath() != m_d->m_page->definitionFilesPath->path()) + return (m_d->m_settings.definitionFilesPath() != m_d->m_page->definitionFilesPath->filePath().toString()) || (m_d->m_settings.ignoredFilesPatterns() != m_d->m_page->ignoreEdit->text()); } diff --git a/src/plugins/valgrind/memchecktool.cpp b/src/plugins/valgrind/memchecktool.cpp index c5073bd40f..ec58ea86ed 100644 --- a/src/plugins/valgrind/memchecktool.cpp +++ b/src/plugins/valgrind/memchecktool.cpp @@ -1390,7 +1390,7 @@ bool HeobDialog::attach() const QString HeobDialog::path() const { - return m_pathChooser->path(); + return m_pathChooser->filePath().toString(); } void HeobDialog::keyPressEvent(QKeyEvent *e) @@ -1475,7 +1475,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->path()); + settings->setValue(heobPathC, m_pathChooser->filePath().toString()); settings->endGroup(); } diff --git a/src/plugins/valgrind/suppressiondialog.cpp b/src/plugins/valgrind/suppressiondialog.cpp index e853791f8c..695aa42b02 100644 --- a/src/plugins/valgrind/suppressiondialog.cpp +++ b/src/plugins/valgrind/suppressiondialog.cpp @@ -194,7 +194,7 @@ void SuppressionDialog::maybeShow(MemcheckErrorView *view) void SuppressionDialog::accept() { - const QString path = m_fileChooser->path(); + const QString path = m_fileChooser->filePath().toString(); QTC_ASSERT(!path.isEmpty(), return); QTC_ASSERT(!m_suppressionEdit->toPlainText().trimmed().isEmpty(), return); diff --git a/src/plugins/vcsbase/commonsettingspage.cpp b/src/plugins/vcsbase/commonsettingspage.cpp index 9c3920dfe8..f1f2a73f7e 100644 --- a/src/plugins/vcsbase/commonsettingspage.cpp +++ b/src/plugins/vcsbase/commonsettingspage.cpp @@ -74,12 +74,12 @@ CommonSettingsWidget::~CommonSettingsWidget() CommonVcsSettings CommonSettingsWidget::settings() const { CommonVcsSettings rc; - rc.nickNameMailMap = m_ui->nickNameMailMapChooser->path(); - rc.nickNameFieldListFile = m_ui->nickNameFieldsFileChooser->path(); - rc.submitMessageCheckScript = m_ui->submitMessageCheckScriptChooser->path(); + rc.nickNameMailMap = m_ui->nickNameMailMapChooser->filePath().toString(); + rc.nickNameFieldListFile = m_ui->nickNameFieldsFileChooser->filePath().toString(); + rc.submitMessageCheckScript = m_ui->submitMessageCheckScriptChooser->filePath().toString(); rc.lineWrap= m_ui->lineWrapCheckBox->isChecked(); rc.lineWrapWidth = m_ui->lineWrapSpinBox->value(); - rc.sshPasswordPrompt = m_ui->sshPromptChooser->path(); + rc.sshPasswordPrompt = m_ui->sshPromptChooser->filePath().toString(); return rc; } |