forked from qt-creator/qt-creator
A few more direct FilePathAspect value accesses
Task-number: QTCREATORBUG-29167 Change-Id: I8eba582303c16dddbdb5cea5bce43f048bac06b7 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -132,7 +132,7 @@ void PythonWizardPage::initializePage()
|
||||
|
||||
const FilePath projectDir = FilePath::fromString(wiz->property("ProjectDirectory").toString());
|
||||
m_createVenv.setValue(!projectDir.isEmpty());
|
||||
if (m_venvPath.filePath().isEmpty())
|
||||
if (m_venvPath().isEmpty())
|
||||
m_venvPath.setValue(projectDir.isEmpty() ? FilePath{} : projectDir / "venv");
|
||||
|
||||
updateInterpreters();
|
||||
@@ -171,7 +171,7 @@ void PythonWizardPage::setupProject(const JsonWizard::GeneratorFiles &files)
|
||||
}
|
||||
}
|
||||
};
|
||||
PythonSettings::createVirtualEnvironment(m_venvPath.filePath(),
|
||||
PythonSettings::createVirtualEnvironment(m_venvPath(),
|
||||
interpreter,
|
||||
openProjectWithInterpreter,
|
||||
project ? project->displayName()
|
||||
|
||||
@@ -567,7 +567,7 @@ void QmlProfilerTool::showErrorDialog(const QString &error)
|
||||
static void saveLastTraceFile(const FilePath &filePath)
|
||||
{
|
||||
QmlProfilerSettings *settings = QmlProfilerPlugin::globalSettings();
|
||||
if (filePath != settings->lastTraceFile.filePath()) {
|
||||
if (filePath != settings->lastTraceFile()) {
|
||||
settings->lastTraceFile.setValue(filePath);
|
||||
settings->writeGlobalSettings();
|
||||
}
|
||||
@@ -579,7 +579,7 @@ void QmlProfilerTool::showSaveDialog()
|
||||
QLatin1String zFile(QztFileExtension);
|
||||
FilePath filePath = FileUtils::getSaveFilePath(
|
||||
nullptr, Tr::tr("Save QML Trace"),
|
||||
QmlProfilerPlugin::globalSettings()->lastTraceFile.filePath(),
|
||||
QmlProfilerPlugin::globalSettings()->lastTraceFile(),
|
||||
Tr::tr("QML traces (*%1 *%2)").arg(zFile).arg(tFile));
|
||||
if (!filePath.isEmpty()) {
|
||||
if (!filePath.endsWith(zFile) && !filePath.endsWith(tFile))
|
||||
@@ -603,7 +603,7 @@ void QmlProfilerTool::showLoadDialog()
|
||||
QLatin1String zFile(QztFileExtension);
|
||||
FilePath filePath = FileUtils::getOpenFilePath(
|
||||
nullptr, Tr::tr("Load QML Trace"),
|
||||
QmlProfilerPlugin::globalSettings()->lastTraceFile.filePath(),
|
||||
QmlProfilerPlugin::globalSettings()->lastTraceFile(),
|
||||
Tr::tr("QML traces (*%1 *%2)").arg(zFile).arg(tFile));
|
||||
|
||||
if (!filePath.isEmpty()) {
|
||||
|
||||
@@ -142,7 +142,7 @@ void TerminalWidget::setupPty()
|
||||
m_process = std::make_unique<Process>();
|
||||
|
||||
CommandLine shellCommand = m_openParameters.shellCommand.value_or(
|
||||
CommandLine{TerminalSettings::instance().shell.filePath(),
|
||||
CommandLine{TerminalSettings::instance().shell(),
|
||||
TerminalSettings::instance().shellArguments.value(),
|
||||
CommandLine::Raw});
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ void SuppressionAspectPrivate::slotAddSuppression()
|
||||
const FilePaths files =
|
||||
FileUtils::getOpenFilePaths(nullptr,
|
||||
Tr::tr("Valgrind Suppression Files"),
|
||||
conf->lastSuppressionDirectory.filePath(),
|
||||
conf->lastSuppressionDirectory(),
|
||||
Tr::tr("Valgrind Suppression File (*.supp);;All Files (*)"));
|
||||
//dialog.setHistory(conf->lastSuppressionDialogHistory());
|
||||
if (!files.isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user