forked from qt-creator/qt-creator
Utils: Rename PathChooser::{f,setF}ileName() to {f,setF}ilePath()
It's returning a FilePath, so it's a better fit. Keep the old versions as inline function now to ease downstream migration. Change-Id: I535887928018f42b92895c8b0c82527f0d55e5ca Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
@@ -310,7 +310,7 @@ QString PathChooser::rawPath() const
|
|||||||
|
|
||||||
QString PathChooser::path() const
|
QString PathChooser::path() const
|
||||||
{
|
{
|
||||||
return fileName().toString();
|
return filePath().toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
FilePath PathChooser::rawFileName() const
|
FilePath PathChooser::rawFileName() const
|
||||||
@@ -318,7 +318,7 @@ FilePath PathChooser::rawFileName() const
|
|||||||
return FilePath::fromString(QDir::fromNativeSeparators(d->m_lineEdit->text()));
|
return FilePath::fromString(QDir::fromNativeSeparators(d->m_lineEdit->text()));
|
||||||
}
|
}
|
||||||
|
|
||||||
FilePath PathChooser::fileName() const
|
FilePath PathChooser::filePath() const
|
||||||
{
|
{
|
||||||
return FilePath::fromUserInput(d->expandedPath(rawFileName().toString()));
|
return FilePath::fromUserInput(d->expandedPath(rawFileName().toString()));
|
||||||
}
|
}
|
||||||
@@ -342,7 +342,7 @@ void PathChooser::setPath(const QString &path)
|
|||||||
d->m_lineEdit->setTextKeepingActiveCursor(QDir::toNativeSeparators(path));
|
d->m_lineEdit->setTextKeepingActiveCursor(QDir::toNativeSeparators(path));
|
||||||
}
|
}
|
||||||
|
|
||||||
void PathChooser::setFileName(const FilePath &fn)
|
void PathChooser::setFilePath(const FilePath &fn)
|
||||||
{
|
{
|
||||||
d->m_lineEdit->setTextKeepingActiveCursor(fn.toUserOutput());
|
d->m_lineEdit->setTextKeepingActiveCursor(fn.toUserOutput());
|
||||||
}
|
}
|
||||||
|
@@ -55,7 +55,7 @@ class QTCREATOR_UTILS_EXPORT PathChooser : public QWidget
|
|||||||
Q_PROPERTY(QStringList commandVersionArguments READ commandVersionArguments WRITE setCommandVersionArguments)
|
Q_PROPERTY(QStringList commandVersionArguments READ commandVersionArguments WRITE setCommandVersionArguments)
|
||||||
Q_PROPERTY(bool readOnly READ isReadOnly WRITE setReadOnly DESIGNABLE true)
|
Q_PROPERTY(bool readOnly READ isReadOnly WRITE setReadOnly DESIGNABLE true)
|
||||||
// Designer does not know this type, so force designable to false:
|
// Designer does not know this type, so force designable to false:
|
||||||
Q_PROPERTY(Utils::FilePath fileName READ fileName WRITE setFileName DESIGNABLE false)
|
Q_PROPERTY(Utils::FilePath filePath READ filePath WRITE setFilePath DESIGNABLE false)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static QString browseButtonLabel();
|
static QString browseButtonLabel();
|
||||||
@@ -88,10 +88,15 @@ public:
|
|||||||
bool isValid() const;
|
bool isValid() const;
|
||||||
QString errorMessage() const;
|
QString errorMessage() const;
|
||||||
|
|
||||||
|
FilePath filePath() const;
|
||||||
|
|
||||||
|
// Deprecated. Use filePath().toString()
|
||||||
QString path() const;
|
QString path() const;
|
||||||
|
// Deprecated. Use filePath()
|
||||||
|
FilePath fileName() const { return filePath(); }
|
||||||
|
|
||||||
QString rawPath() const; // The raw unexpanded input.
|
QString rawPath() const; // The raw unexpanded input.
|
||||||
FilePath rawFileName() const; // The raw unexpanded input.
|
FilePath rawFileName() const; // The raw unexpanded input.
|
||||||
FilePath fileName() const;
|
|
||||||
|
|
||||||
static QString expandedDirectory(const QString &input, const Environment &env,
|
static QString expandedDirectory(const QString &input, const Environment &env,
|
||||||
const QString &baseDir);
|
const QString &baseDir);
|
||||||
@@ -163,7 +168,9 @@ signals:
|
|||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void setPath(const QString &);
|
void setPath(const QString &);
|
||||||
void setFileName(const FilePath &);
|
// Deprecated: Use setFilePath()
|
||||||
|
void setFileName(const FilePath &path) { setFilePath(path); }
|
||||||
|
void setFilePath(const FilePath &);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
PathChooserPrivate *d = nullptr;
|
PathChooserPrivate *d = nullptr;
|
||||||
|
@@ -477,21 +477,21 @@ AndroidSettingsWidget::AndroidSettingsWidget()
|
|||||||
Utils::FilePath currentJdkPath = m_androidConfig.openJDKLocation();
|
Utils::FilePath currentJdkPath = m_androidConfig.openJDKLocation();
|
||||||
if (currentJdkPath.isEmpty())
|
if (currentJdkPath.isEmpty())
|
||||||
currentJdkPath = findJdkInCommonPaths();
|
currentJdkPath = findJdkInCommonPaths();
|
||||||
m_ui->OpenJDKLocationPathChooser->setFileName(currentJdkPath);
|
m_ui->OpenJDKLocationPathChooser->setFilePath(currentJdkPath);
|
||||||
m_ui->OpenJDKLocationPathChooser->setPromptDialogTitle(tr("Select JDK Path"));
|
m_ui->OpenJDKLocationPathChooser->setPromptDialogTitle(tr("Select JDK Path"));
|
||||||
|
|
||||||
Utils::FilePath currentSDKPath = m_androidConfig.sdkLocation();
|
Utils::FilePath currentSDKPath = m_androidConfig.sdkLocation();
|
||||||
if (currentSDKPath.isEmpty())
|
if (currentSDKPath.isEmpty())
|
||||||
currentSDKPath = getDefaultSdkPath();
|
currentSDKPath = getDefaultSdkPath();
|
||||||
|
|
||||||
m_ui->SDKLocationPathChooser->setFileName(currentSDKPath);
|
m_ui->SDKLocationPathChooser->setFilePath(currentSDKPath);
|
||||||
m_ui->SDKLocationPathChooser->setPromptDialogTitle(tr("Select Android SDK folder"));
|
m_ui->SDKLocationPathChooser->setPromptDialogTitle(tr("Select Android SDK folder"));
|
||||||
|
|
||||||
m_ui->openSslPathChooser->setPromptDialogTitle(tr("Select OpenSSL Include Project File"));
|
m_ui->openSslPathChooser->setPromptDialogTitle(tr("Select OpenSSL Include Project File"));
|
||||||
Utils::FilePath currentOpenSslPath = m_androidConfig.openSslLocation();
|
Utils::FilePath currentOpenSslPath = m_androidConfig.openSslLocation();
|
||||||
if (currentOpenSslPath.isEmpty())
|
if (currentOpenSslPath.isEmpty())
|
||||||
currentOpenSslPath = currentSDKPath.pathAppended("android_openssl");
|
currentOpenSslPath = currentSDKPath.pathAppended("android_openssl");
|
||||||
m_ui->openSslPathChooser->setFileName(currentOpenSslPath);
|
m_ui->openSslPathChooser->setFilePath(currentOpenSslPath);
|
||||||
|
|
||||||
m_ui->DataPartitionSizeSpinBox->setValue(m_androidConfig.partitionSize());
|
m_ui->DataPartitionSizeSpinBox->setValue(m_androidConfig.partitionSize());
|
||||||
m_ui->CreateKitCheckBox->setChecked(m_androidConfig.automaticKitCreation());
|
m_ui->CreateKitCheckBox->setChecked(m_androidConfig.automaticKitCreation());
|
||||||
@@ -808,7 +808,7 @@ void AndroidSettingsWidget::openOpenJDKDownloadUrl()
|
|||||||
|
|
||||||
void AndroidSettingsWidget::downloadOpenSslRepo(const bool silent)
|
void AndroidSettingsWidget::downloadOpenSslRepo(const bool silent)
|
||||||
{
|
{
|
||||||
const Utils::FilePath openSslPath = m_ui->openSslPathChooser->fileName();
|
const Utils::FilePath openSslPath = m_ui->openSslPathChooser->filePath();
|
||||||
const QString openSslCloneTitle(tr("OpenSSL Cloning"));
|
const QString openSslCloneTitle(tr("OpenSSL Cloning"));
|
||||||
|
|
||||||
auto openSslSummaryWidget = static_cast<SummaryWidget *>(m_ui->openSslDetailsWidget->widget());
|
auto openSslSummaryWidget = static_cast<SummaryWidget *>(m_ui->openSslDetailsWidget->widget());
|
||||||
|
@@ -356,9 +356,9 @@ void EBlinkGdbServerProviderConfigWidget::setFromProvider()
|
|||||||
Q_ASSERT(p);
|
Q_ASSERT(p);
|
||||||
|
|
||||||
m_gdbHostWidget->setChannel(p->channel());
|
m_gdbHostWidget->setChannel(p->channel());
|
||||||
m_executableFileChooser->setFileName(p->m_executableFile);
|
m_executableFileChooser->setFilePath(p->m_executableFile);
|
||||||
m_verboseLevelSpinBox->setValue(p->m_verboseLevel);
|
m_verboseLevelSpinBox->setValue(p->m_verboseLevel);
|
||||||
m_scriptFileChooser->setFileName(p->m_deviceScript);
|
m_scriptFileChooser->setFilePath(p->m_deviceScript);
|
||||||
m_interfaceTypeComboBox->setCurrentIndex(p->m_interfaceType);
|
m_interfaceTypeComboBox->setCurrentIndex(p->m_interfaceType);
|
||||||
m_resetOnConnectCheckBox->setChecked(p->m_interfaceResetOnConnect);
|
m_resetOnConnectCheckBox->setChecked(p->m_interfaceResetOnConnect);
|
||||||
m_interfaceSpeedSpinBox->setValue(p->m_interfaceSpeed);
|
m_interfaceSpeedSpinBox->setValue(p->m_interfaceSpeed);
|
||||||
@@ -376,9 +376,9 @@ void EBlinkGdbServerProviderConfigWidget::apply()
|
|||||||
Q_ASSERT(p);
|
Q_ASSERT(p);
|
||||||
|
|
||||||
p->setChannel(m_gdbHostWidget->channel());
|
p->setChannel(m_gdbHostWidget->channel());
|
||||||
p->m_executableFile = m_executableFileChooser->fileName();
|
p->m_executableFile = m_executableFileChooser->filePath();
|
||||||
p->m_verboseLevel = m_verboseLevelSpinBox->value();
|
p->m_verboseLevel = m_verboseLevelSpinBox->value();
|
||||||
p->m_deviceScript = m_scriptFileChooser->fileName();
|
p->m_deviceScript = m_scriptFileChooser->filePath();
|
||||||
p->m_interfaceType = interfaceTypeFromWidget();
|
p->m_interfaceType = interfaceTypeFromWidget();
|
||||||
p->m_interfaceResetOnConnect = m_resetOnConnectCheckBox->isChecked();
|
p->m_interfaceResetOnConnect = m_resetOnConnectCheckBox->isChecked();
|
||||||
p->m_interfaceSpeed = m_interfaceSpeedSpinBox->value();
|
p->m_interfaceSpeed = m_interfaceSpeedSpinBox->value();
|
||||||
|
@@ -311,12 +311,12 @@ void GdbServerProviderConfigWidget::populateStartupModes()
|
|||||||
|
|
||||||
Utils::FilePath GdbServerProviderConfigWidget::peripheralDescriptionFile() const
|
Utils::FilePath GdbServerProviderConfigWidget::peripheralDescriptionFile() const
|
||||||
{
|
{
|
||||||
return m_peripheralDescriptionFileChooser->fileName();
|
return m_peripheralDescriptionFileChooser->filePath();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GdbServerProviderConfigWidget::setPeripheralDescriptionFile(const Utils::FilePath &file)
|
void GdbServerProviderConfigWidget::setPeripheralDescriptionFile(const Utils::FilePath &file)
|
||||||
{
|
{
|
||||||
m_peripheralDescriptionFileChooser->setFileName(file);
|
m_peripheralDescriptionFileChooser->setFilePath(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GdbServerProviderConfigWidget::setFromProvider()
|
void GdbServerProviderConfigWidget::setFromProvider()
|
||||||
|
@@ -313,7 +313,7 @@ void JLinkGdbServerProviderConfigWidget::apply()
|
|||||||
Q_ASSERT(p);
|
Q_ASSERT(p);
|
||||||
|
|
||||||
p->setChannel(m_hostWidget->channel());
|
p->setChannel(m_hostWidget->channel());
|
||||||
p->m_executableFile = m_executableFileChooser->fileName();
|
p->m_executableFile = m_executableFileChooser->filePath();
|
||||||
p->m_jlinkDevice = m_jlinkDeviceLineEdit->text();
|
p->m_jlinkDevice = m_jlinkDeviceLineEdit->text();
|
||||||
p->m_jlinkHost = m_hostInterfaceComboBox->currentText();
|
p->m_jlinkHost = m_hostInterfaceComboBox->currentText();
|
||||||
p->m_jlinkHostAddr = m_hostInterfaceAddressLineEdit->text();
|
p->m_jlinkHostAddr = m_hostInterfaceAddressLineEdit->text();
|
||||||
@@ -357,7 +357,7 @@ void JLinkGdbServerProviderConfigWidget::setFromProvider()
|
|||||||
|
|
||||||
const QSignalBlocker blocker(this);
|
const QSignalBlocker blocker(this);
|
||||||
m_hostWidget->setChannel(p->channel());
|
m_hostWidget->setChannel(p->channel());
|
||||||
m_executableFileChooser->setFileName(p->m_executableFile);
|
m_executableFileChooser->setFilePath(p->m_executableFile);
|
||||||
m_jlinkDeviceLineEdit->setText(p->m_jlinkDevice);
|
m_jlinkDeviceLineEdit->setText(p->m_jlinkDevice);
|
||||||
m_additionalArgumentsTextEdit->setPlainText(p->m_additionalArguments);
|
m_additionalArgumentsTextEdit->setPlainText(p->m_additionalArguments);
|
||||||
m_jlinkDeviceLineEdit->setText( p->m_jlinkDevice);
|
m_jlinkDeviceLineEdit->setText( p->m_jlinkDevice);
|
||||||
|
@@ -259,9 +259,9 @@ void OpenOcdGdbServerProviderConfigWidget::apply()
|
|||||||
Q_ASSERT(p);
|
Q_ASSERT(p);
|
||||||
|
|
||||||
p->setChannel(m_hostWidget->channel());
|
p->setChannel(m_hostWidget->channel());
|
||||||
p->m_executableFile = m_executableFileChooser->fileName();
|
p->m_executableFile = m_executableFileChooser->filePath();
|
||||||
p->m_rootScriptsDir = m_rootScriptsDirChooser->fileName().toString();
|
p->m_rootScriptsDir = m_rootScriptsDirChooser->filePath().toString();
|
||||||
p->m_configurationFile = m_configurationFileChooser->fileName().toString();
|
p->m_configurationFile = m_configurationFileChooser->filePath().toString();
|
||||||
p->m_additionalArguments = m_additionalArgumentsLineEdit->text();
|
p->m_additionalArguments = m_additionalArgumentsLineEdit->text();
|
||||||
p->setInitCommands(m_initCommandsTextEdit->toPlainText());
|
p->setInitCommands(m_initCommandsTextEdit->toPlainText());
|
||||||
p->setResetCommands(m_resetCommandsTextEdit->toPlainText());
|
p->setResetCommands(m_resetCommandsTextEdit->toPlainText());
|
||||||
@@ -290,9 +290,9 @@ void OpenOcdGdbServerProviderConfigWidget::setFromProvider()
|
|||||||
const QSignalBlocker blocker(this);
|
const QSignalBlocker blocker(this);
|
||||||
startupModeChanged();
|
startupModeChanged();
|
||||||
m_hostWidget->setChannel(p->channel());
|
m_hostWidget->setChannel(p->channel());
|
||||||
m_executableFileChooser->setFileName(p->m_executableFile);
|
m_executableFileChooser->setFilePath(p->m_executableFile);
|
||||||
m_rootScriptsDirChooser->setFileName(Utils::FilePath::fromString(p->m_rootScriptsDir));
|
m_rootScriptsDirChooser->setFilePath(Utils::FilePath::fromString(p->m_rootScriptsDir));
|
||||||
m_configurationFileChooser->setFileName(Utils::FilePath::fromString(p->m_configurationFile));
|
m_configurationFileChooser->setFilePath(Utils::FilePath::fromString(p->m_configurationFile));
|
||||||
m_additionalArgumentsLineEdit->setText(p->m_additionalArguments);
|
m_additionalArgumentsLineEdit->setText(p->m_additionalArguments);
|
||||||
m_initCommandsTextEdit->setPlainText(p->initCommands());
|
m_initCommandsTextEdit->setPlainText(p->initCommands());
|
||||||
m_resetCommandsTextEdit->setPlainText(p->resetCommands());
|
m_resetCommandsTextEdit->setPlainText(p->resetCommands());
|
||||||
|
@@ -254,7 +254,7 @@ void StLinkUtilGdbServerProviderConfigWidget::apply()
|
|||||||
Q_ASSERT(p);
|
Q_ASSERT(p);
|
||||||
|
|
||||||
p->setChannel(m_hostWidget->channel());
|
p->setChannel(m_hostWidget->channel());
|
||||||
p->m_executableFile = m_executableFileChooser->fileName();
|
p->m_executableFile = m_executableFileChooser->filePath();
|
||||||
p->m_verboseLevel = m_verboseLevelSpinBox->value();
|
p->m_verboseLevel = m_verboseLevelSpinBox->value();
|
||||||
p->m_extendedMode = m_extendedModeCheckBox->isChecked();
|
p->m_extendedMode = m_extendedModeCheckBox->isChecked();
|
||||||
p->m_resetBoard = m_resetBoardCheckBox->isChecked();
|
p->m_resetBoard = m_resetBoardCheckBox->isChecked();
|
||||||
@@ -312,7 +312,7 @@ void StLinkUtilGdbServerProviderConfigWidget::setFromProvider()
|
|||||||
|
|
||||||
const QSignalBlocker blocker(this);
|
const QSignalBlocker blocker(this);
|
||||||
m_hostWidget->setChannel(p->channel());
|
m_hostWidget->setChannel(p->channel());
|
||||||
m_executableFileChooser->setFileName(p->m_executableFile);
|
m_executableFileChooser->setFilePath(p->m_executableFile);
|
||||||
m_verboseLevelSpinBox->setValue(p->m_verboseLevel);
|
m_verboseLevelSpinBox->setValue(p->m_verboseLevel);
|
||||||
m_extendedModeCheckBox->setChecked(p->m_extendedMode);
|
m_extendedModeCheckBox->setChecked(p->m_extendedMode);
|
||||||
m_resetBoardCheckBox->setChecked(p->m_resetBoard);
|
m_resetBoardCheckBox->setChecked(p->m_resetBoard);
|
||||||
|
@@ -298,7 +298,7 @@ UvscServerProviderConfigWidget::UvscServerProviderConfigWidget(UvscServerProvide
|
|||||||
this, &UvscServerProviderConfigWidget::dirty);
|
this, &UvscServerProviderConfigWidget::dirty);
|
||||||
|
|
||||||
auto updateSelectors = [this]() {
|
auto updateSelectors = [this]() {
|
||||||
const FilePath toolsIniFile = m_toolsIniChooser->fileName();
|
const FilePath toolsIniFile = m_toolsIniChooser->filePath();
|
||||||
m_deviceSelector->setToolsIniFile(toolsIniFile);
|
m_deviceSelector->setToolsIniFile(toolsIniFile);
|
||||||
m_driverSelector->setToolsIniFile(toolsIniFile);
|
m_driverSelector->setToolsIniFile(toolsIniFile);
|
||||||
};
|
};
|
||||||
@@ -324,12 +324,12 @@ void UvscServerProviderConfigWidget::discard()
|
|||||||
|
|
||||||
void UvscServerProviderConfigWidget::setToolsIniFile(const Utils::FilePath &toolsIniFile)
|
void UvscServerProviderConfigWidget::setToolsIniFile(const Utils::FilePath &toolsIniFile)
|
||||||
{
|
{
|
||||||
m_toolsIniChooser->setFileName(toolsIniFile);
|
m_toolsIniChooser->setFilePath(toolsIniFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils::FilePath UvscServerProviderConfigWidget::toolsIniFile() const
|
Utils::FilePath UvscServerProviderConfigWidget::toolsIniFile() const
|
||||||
{
|
{
|
||||||
return m_toolsIniChooser->fileName();
|
return m_toolsIniChooser->filePath();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UvscServerProviderConfigWidget::setDeviceSelection(const DeviceSelection &deviceSelection)
|
void UvscServerProviderConfigWidget::setDeviceSelection(const DeviceSelection &deviceSelection)
|
||||||
@@ -356,7 +356,7 @@ void UvscServerProviderConfigWidget::setFromProvider()
|
|||||||
{
|
{
|
||||||
const auto p = static_cast<UvscServerProvider *>(m_provider);
|
const auto p = static_cast<UvscServerProvider *>(m_provider);
|
||||||
m_hostWidget->setChannel(p->channel());
|
m_hostWidget->setChannel(p->channel());
|
||||||
m_toolsIniChooser->setFileName(p->toolsIniFile());
|
m_toolsIniChooser->setFilePath(p->toolsIniFile());
|
||||||
m_deviceSelector->setSelection(p->deviceSelection());
|
m_deviceSelector->setSelection(p->deviceSelection());
|
||||||
m_driverSelector->setSelection(p->driverSelection());
|
m_driverSelector->setSelection(p->driverSelection());
|
||||||
}
|
}
|
||||||
|
@@ -562,7 +562,7 @@ void IarToolChainConfigWidget::applyImpl()
|
|||||||
|
|
||||||
const auto tc = static_cast<IarToolChain *>(toolChain());
|
const auto tc = static_cast<IarToolChain *>(toolChain());
|
||||||
const QString displayName = tc->displayName();
|
const QString displayName = tc->displayName();
|
||||||
tc->setCompilerCommand(m_compilerCommand->fileName());
|
tc->setCompilerCommand(m_compilerCommand->filePath());
|
||||||
tc->setTargetAbi(m_abiWidget->currentAbi());
|
tc->setTargetAbi(m_abiWidget->currentAbi());
|
||||||
tc->setDisplayName(displayName);
|
tc->setDisplayName(displayName);
|
||||||
|
|
||||||
@@ -578,7 +578,7 @@ void IarToolChainConfigWidget::applyImpl()
|
|||||||
bool IarToolChainConfigWidget::isDirtyImpl() const
|
bool IarToolChainConfigWidget::isDirtyImpl() const
|
||||||
{
|
{
|
||||||
const auto tc = static_cast<IarToolChain *>(toolChain());
|
const auto tc = static_cast<IarToolChain *>(toolChain());
|
||||||
return m_compilerCommand->fileName() != tc->compilerCommand()
|
return m_compilerCommand->filePath() != tc->compilerCommand()
|
||||||
|| m_abiWidget->currentAbi() != tc->targetAbi()
|
|| m_abiWidget->currentAbi() != tc->targetAbi()
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
@@ -593,15 +593,15 @@ void IarToolChainConfigWidget::setFromToolchain()
|
|||||||
{
|
{
|
||||||
const QSignalBlocker blocker(this);
|
const QSignalBlocker blocker(this);
|
||||||
const auto tc = static_cast<IarToolChain *>(toolChain());
|
const auto tc = static_cast<IarToolChain *>(toolChain());
|
||||||
m_compilerCommand->setFileName(tc->compilerCommand());
|
m_compilerCommand->setFilePath(tc->compilerCommand());
|
||||||
m_abiWidget->setAbis({}, tc->targetAbi());
|
m_abiWidget->setAbis({}, tc->targetAbi());
|
||||||
const bool haveCompiler = compilerExists(m_compilerCommand->fileName());
|
const bool haveCompiler = compilerExists(m_compilerCommand->filePath());
|
||||||
m_abiWidget->setEnabled(haveCompiler && !tc->isAutoDetected());
|
m_abiWidget->setEnabled(haveCompiler && !tc->isAutoDetected());
|
||||||
}
|
}
|
||||||
|
|
||||||
void IarToolChainConfigWidget::handleCompilerCommandChange()
|
void IarToolChainConfigWidget::handleCompilerCommandChange()
|
||||||
{
|
{
|
||||||
const FilePath compilerPath = m_compilerCommand->fileName();
|
const FilePath compilerPath = m_compilerCommand->filePath();
|
||||||
const bool haveCompiler = compilerExists(compilerPath);
|
const bool haveCompiler = compilerExists(compilerPath);
|
||||||
if (haveCompiler) {
|
if (haveCompiler) {
|
||||||
const auto env = Environment::systemEnvironment();
|
const auto env = Environment::systemEnvironment();
|
||||||
|
@@ -620,7 +620,7 @@ void KeilToolChainConfigWidget::applyImpl()
|
|||||||
|
|
||||||
const auto tc = static_cast<KeilToolChain *>(toolChain());
|
const auto tc = static_cast<KeilToolChain *>(toolChain());
|
||||||
const QString displayName = tc->displayName();
|
const QString displayName = tc->displayName();
|
||||||
tc->setCompilerCommand(m_compilerCommand->fileName());
|
tc->setCompilerCommand(m_compilerCommand->filePath());
|
||||||
tc->setTargetAbi(m_abiWidget->currentAbi());
|
tc->setTargetAbi(m_abiWidget->currentAbi());
|
||||||
tc->setDisplayName(displayName);
|
tc->setDisplayName(displayName);
|
||||||
|
|
||||||
@@ -636,7 +636,7 @@ void KeilToolChainConfigWidget::applyImpl()
|
|||||||
bool KeilToolChainConfigWidget::isDirtyImpl() const
|
bool KeilToolChainConfigWidget::isDirtyImpl() const
|
||||||
{
|
{
|
||||||
const auto tc = static_cast<KeilToolChain *>(toolChain());
|
const auto tc = static_cast<KeilToolChain *>(toolChain());
|
||||||
return m_compilerCommand->fileName() != tc->compilerCommand()
|
return m_compilerCommand->filePath() != tc->compilerCommand()
|
||||||
|| m_abiWidget->currentAbi() != tc->targetAbi()
|
|| m_abiWidget->currentAbi() != tc->targetAbi()
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
@@ -651,15 +651,15 @@ void KeilToolChainConfigWidget::setFromToolChain()
|
|||||||
{
|
{
|
||||||
const QSignalBlocker blocker(this);
|
const QSignalBlocker blocker(this);
|
||||||
const auto tc = static_cast<KeilToolChain *>(toolChain());
|
const auto tc = static_cast<KeilToolChain *>(toolChain());
|
||||||
m_compilerCommand->setFileName(tc->compilerCommand());
|
m_compilerCommand->setFilePath(tc->compilerCommand());
|
||||||
m_abiWidget->setAbis({}, tc->targetAbi());
|
m_abiWidget->setAbis({}, tc->targetAbi());
|
||||||
const bool haveCompiler = compilerExists(m_compilerCommand->fileName());
|
const bool haveCompiler = compilerExists(m_compilerCommand->filePath());
|
||||||
m_abiWidget->setEnabled(haveCompiler && !tc->isAutoDetected());
|
m_abiWidget->setEnabled(haveCompiler && !tc->isAutoDetected());
|
||||||
}
|
}
|
||||||
|
|
||||||
void KeilToolChainConfigWidget::handleCompilerCommandChange()
|
void KeilToolChainConfigWidget::handleCompilerCommandChange()
|
||||||
{
|
{
|
||||||
const FilePath compilerPath = m_compilerCommand->fileName();
|
const FilePath compilerPath = m_compilerCommand->filePath();
|
||||||
const bool haveCompiler = compilerExists(compilerPath);
|
const bool haveCompiler = compilerExists(compilerPath);
|
||||||
if (haveCompiler) {
|
if (haveCompiler) {
|
||||||
const auto env = Environment::systemEnvironment();
|
const auto env = Environment::systemEnvironment();
|
||||||
|
@@ -528,7 +528,7 @@ void SdccToolChainConfigWidget::applyImpl()
|
|||||||
|
|
||||||
const auto tc = static_cast<SdccToolChain *>(toolChain());
|
const auto tc = static_cast<SdccToolChain *>(toolChain());
|
||||||
const QString displayName = tc->displayName();
|
const QString displayName = tc->displayName();
|
||||||
tc->setCompilerCommand(m_compilerCommand->fileName());
|
tc->setCompilerCommand(m_compilerCommand->filePath());
|
||||||
tc->setTargetAbi(m_abiWidget->currentAbi());
|
tc->setTargetAbi(m_abiWidget->currentAbi());
|
||||||
tc->setDisplayName(displayName);
|
tc->setDisplayName(displayName);
|
||||||
|
|
||||||
@@ -544,7 +544,7 @@ void SdccToolChainConfigWidget::applyImpl()
|
|||||||
bool SdccToolChainConfigWidget::isDirtyImpl() const
|
bool SdccToolChainConfigWidget::isDirtyImpl() const
|
||||||
{
|
{
|
||||||
const auto tc = static_cast<SdccToolChain *>(toolChain());
|
const auto tc = static_cast<SdccToolChain *>(toolChain());
|
||||||
return m_compilerCommand->fileName() != tc->compilerCommand()
|
return m_compilerCommand->filePath() != tc->compilerCommand()
|
||||||
|| m_abiWidget->currentAbi() != tc->targetAbi()
|
|| m_abiWidget->currentAbi() != tc->targetAbi()
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
@@ -559,15 +559,15 @@ void SdccToolChainConfigWidget::setFromToolchain()
|
|||||||
{
|
{
|
||||||
const QSignalBlocker blocker(this);
|
const QSignalBlocker blocker(this);
|
||||||
const auto tc = static_cast<SdccToolChain *>(toolChain());
|
const auto tc = static_cast<SdccToolChain *>(toolChain());
|
||||||
m_compilerCommand->setFileName(tc->compilerCommand());
|
m_compilerCommand->setFilePath(tc->compilerCommand());
|
||||||
m_abiWidget->setAbis({}, tc->targetAbi());
|
m_abiWidget->setAbis({}, tc->targetAbi());
|
||||||
const bool haveCompiler = compilerExists(m_compilerCommand->fileName());
|
const bool haveCompiler = compilerExists(m_compilerCommand->filePath());
|
||||||
m_abiWidget->setEnabled(haveCompiler && !tc->isAutoDetected());
|
m_abiWidget->setEnabled(haveCompiler && !tc->isAutoDetected());
|
||||||
}
|
}
|
||||||
|
|
||||||
void SdccToolChainConfigWidget::handleCompilerCommandChange()
|
void SdccToolChainConfigWidget::handleCompilerCommandChange()
|
||||||
{
|
{
|
||||||
const FilePath compilerPath = m_compilerCommand->fileName();
|
const FilePath compilerPath = m_compilerCommand->filePath();
|
||||||
const bool haveCompiler = compilerExists(compilerPath);
|
const bool haveCompiler = compilerExists(compilerPath);
|
||||||
if (haveCompiler) {
|
if (haveCompiler) {
|
||||||
const auto env = Environment::systemEnvironment();
|
const auto env = Environment::systemEnvironment();
|
||||||
|
@@ -82,7 +82,7 @@ void ArtisticStyleOptionsPageWidget::apply()
|
|||||||
m_settings->setSupportedMimeTypes(ui.mime->text());
|
m_settings->setSupportedMimeTypes(ui.mime->text());
|
||||||
m_settings->setUseOtherFiles(ui.useOtherFiles->isChecked());
|
m_settings->setUseOtherFiles(ui.useOtherFiles->isChecked());
|
||||||
m_settings->setUseSpecificConfigFile(ui.useSpecificConfigFile->isChecked());
|
m_settings->setUseSpecificConfigFile(ui.useSpecificConfigFile->isChecked());
|
||||||
m_settings->setSpecificConfigFile(ui.specificConfigFile->fileName());
|
m_settings->setSpecificConfigFile(ui.specificConfigFile->filePath());
|
||||||
m_settings->setUseHomeFile(ui.useHomeFile->isChecked());
|
m_settings->setUseHomeFile(ui.useHomeFile->isChecked());
|
||||||
m_settings->setUseCustomStyle(ui.useCustomStyle->isChecked());
|
m_settings->setUseCustomStyle(ui.useCustomStyle->isChecked());
|
||||||
m_settings->setCustomStyle(ui.configurations->currentConfiguration());
|
m_settings->setCustomStyle(ui.configurations->currentConfiguration());
|
||||||
|
@@ -71,7 +71,7 @@ ClangFormatOptionsPageWidget::ClangFormatOptionsPageWidget(ClangFormatSettings *
|
|||||||
});
|
});
|
||||||
ui.configurations->setSettings(m_settings);
|
ui.configurations->setSettings(m_settings);
|
||||||
|
|
||||||
ui.command->setFileName(m_settings->command());
|
ui.command->setFilePath(m_settings->command());
|
||||||
ui.mime->setText(m_settings->supportedMimeTypesAsString());
|
ui.mime->setText(m_settings->supportedMimeTypesAsString());
|
||||||
const int predefinedStyleIndex = ui.predefinedStyle->findText(m_settings->predefinedStyle());
|
const int predefinedStyleIndex = ui.predefinedStyle->findText(m_settings->predefinedStyle());
|
||||||
if (predefinedStyleIndex != -1)
|
if (predefinedStyleIndex != -1)
|
||||||
|
@@ -67,12 +67,12 @@ UncrustifyOptionsPageWidget::UncrustifyOptionsPageWidget(UncrustifySettings *set
|
|||||||
connect(ui.command, &Utils::PathChooser::validChanged, ui.options, &QWidget::setEnabled);
|
connect(ui.command, &Utils::PathChooser::validChanged, ui.options, &QWidget::setEnabled);
|
||||||
ui.configurations->setSettings(m_settings);
|
ui.configurations->setSettings(m_settings);
|
||||||
|
|
||||||
ui.command->setFileName(m_settings->command());
|
ui.command->setFilePath(m_settings->command());
|
||||||
ui.mime->setText(m_settings->supportedMimeTypesAsString());
|
ui.mime->setText(m_settings->supportedMimeTypesAsString());
|
||||||
ui.useOtherFiles->setChecked(m_settings->useOtherFiles());
|
ui.useOtherFiles->setChecked(m_settings->useOtherFiles());
|
||||||
ui.useHomeFile->setChecked(m_settings->useHomeFile());
|
ui.useHomeFile->setChecked(m_settings->useHomeFile());
|
||||||
ui.useSpecificFile->setChecked(m_settings->useSpecificConfigFile());
|
ui.useSpecificFile->setChecked(m_settings->useSpecificConfigFile());
|
||||||
ui.uncrusifyFilePath->setFileName(m_settings->specificConfigFile());
|
ui.uncrusifyFilePath->setFilePath(m_settings->specificConfigFile());
|
||||||
ui.useCustomStyle->setChecked(m_settings->useCustomStyle());
|
ui.useCustomStyle->setChecked(m_settings->useCustomStyle());
|
||||||
ui.configurations->setCurrentConfiguration(m_settings->customStyle());
|
ui.configurations->setCurrentConfiguration(m_settings->customStyle());
|
||||||
ui.formatEntireFileFallback->setChecked(m_settings->formatEntireFileFallback());
|
ui.formatEntireFileFallback->setChecked(m_settings->formatEntireFileFallback());
|
||||||
@@ -85,7 +85,7 @@ void UncrustifyOptionsPageWidget::apply()
|
|||||||
m_settings->setUseOtherFiles(ui.useOtherFiles->isChecked());
|
m_settings->setUseOtherFiles(ui.useOtherFiles->isChecked());
|
||||||
m_settings->setUseHomeFile(ui.useHomeFile->isChecked());
|
m_settings->setUseHomeFile(ui.useHomeFile->isChecked());
|
||||||
m_settings->setUseSpecificConfigFile(ui.useSpecificFile->isChecked());
|
m_settings->setUseSpecificConfigFile(ui.useSpecificFile->isChecked());
|
||||||
m_settings->setSpecificConfigFile(ui.uncrusifyFilePath->fileName());
|
m_settings->setSpecificConfigFile(ui.uncrusifyFilePath->filePath());
|
||||||
m_settings->setUseCustomStyle(ui.useCustomStyle->isChecked());
|
m_settings->setUseCustomStyle(ui.useCustomStyle->isChecked());
|
||||||
m_settings->setCustomStyle(ui.configurations->currentConfiguration());
|
m_settings->setCustomStyle(ui.configurations->currentConfiguration());
|
||||||
m_settings->setFormatEntireFileFallback(ui.formatEntireFileFallback->isChecked());
|
m_settings->setFormatEntireFileFallback(ui.formatEntireFileFallback->isChecked());
|
||||||
|
@@ -54,7 +54,7 @@ static void setupPathChooser(Utils::PathChooser *const chooser,
|
|||||||
chooser->setExpectedKind(Utils::PathChooser::ExistingCommand);
|
chooser->setExpectedKind(Utils::PathChooser::ExistingCommand);
|
||||||
chooser->setHistoryCompleter(historyCompleterId);
|
chooser->setHistoryCompleter(historyCompleterId);
|
||||||
chooser->setValidationFunction([chooser](Utils::FancyLineEdit *edit, QString *errorMessage) {
|
chooser->setValidationFunction([chooser](Utils::FancyLineEdit *edit, QString *errorMessage) {
|
||||||
const QString currentFilePath = chooser->fileName().toString();
|
const QString currentFilePath = chooser->filePath().toString();
|
||||||
Utils::PathChooser pc;
|
Utils::PathChooser pc;
|
||||||
Utils::PathChooser *helperPathChooser;
|
Utils::PathChooser *helperPathChooser;
|
||||||
if (currentFilePath.isEmpty()) {
|
if (currentFilePath.isEmpty()) {
|
||||||
|
@@ -469,7 +469,7 @@ CMakeToolItemConfigWidget::CMakeToolItemConfigWidget(CMakeToolItemModel *model)
|
|||||||
|
|
||||||
connect(m_binaryChooser, &PathChooser::rawPathChanged, this, [this]() {
|
connect(m_binaryChooser, &PathChooser::rawPathChanged, this, [this]() {
|
||||||
updateQchFilePath();
|
updateQchFilePath();
|
||||||
m_qchFileChooser->setBaseDirectory(m_binaryChooser->fileName().parentDir());
|
m_qchFileChooser->setBaseDirectory(m_binaryChooser->filePath().parentDir());
|
||||||
store();
|
store();
|
||||||
});
|
});
|
||||||
connect(m_qchFileChooser, &PathChooser::rawPathChanged, this, &CMakeToolItemConfigWidget::store);
|
connect(m_qchFileChooser, &PathChooser::rawPathChanged, this, &CMakeToolItemConfigWidget::store);
|
||||||
@@ -485,16 +485,16 @@ void CMakeToolItemConfigWidget::store() const
|
|||||||
if (!m_loadingItem && m_id.isValid())
|
if (!m_loadingItem && m_id.isValid())
|
||||||
m_model->updateCMakeTool(m_id,
|
m_model->updateCMakeTool(m_id,
|
||||||
m_displayNameLineEdit->text(),
|
m_displayNameLineEdit->text(),
|
||||||
m_binaryChooser->fileName(),
|
m_binaryChooser->filePath(),
|
||||||
m_qchFileChooser->fileName(),
|
m_qchFileChooser->filePath(),
|
||||||
m_autoRunCheckBox->checkState() == Qt::Checked,
|
m_autoRunCheckBox->checkState() == Qt::Checked,
|
||||||
m_autoCreateBuildDirectoryCheckBox->checkState() == Qt::Checked);
|
m_autoCreateBuildDirectoryCheckBox->checkState() == Qt::Checked);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMakeToolItemConfigWidget::updateQchFilePath()
|
void CMakeToolItemConfigWidget::updateQchFilePath()
|
||||||
{
|
{
|
||||||
if (m_qchFileChooser->fileName().isEmpty())
|
if (m_qchFileChooser->filePath().isEmpty())
|
||||||
m_qchFileChooser->setFileName(CMakeTool::searchQchFile(m_binaryChooser->fileName()));
|
m_qchFileChooser->setFilePath(CMakeTool::searchQchFile(m_binaryChooser->filePath()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMakeToolItemConfigWidget::load(const CMakeToolTreeItem *item)
|
void CMakeToolItemConfigWidget::load(const CMakeToolTreeItem *item)
|
||||||
@@ -511,11 +511,11 @@ void CMakeToolItemConfigWidget::load(const CMakeToolTreeItem *item)
|
|||||||
m_displayNameLineEdit->setText(item->m_name);
|
m_displayNameLineEdit->setText(item->m_name);
|
||||||
|
|
||||||
m_binaryChooser->setReadOnly(item->m_autodetected);
|
m_binaryChooser->setReadOnly(item->m_autodetected);
|
||||||
m_binaryChooser->setFileName(item->m_executable);
|
m_binaryChooser->setFilePath(item->m_executable);
|
||||||
|
|
||||||
m_qchFileChooser->setReadOnly(item->m_autodetected);
|
m_qchFileChooser->setReadOnly(item->m_autodetected);
|
||||||
m_qchFileChooser->setBaseDirectory(item->m_executable.parentDir());
|
m_qchFileChooser->setBaseDirectory(item->m_executable.parentDir());
|
||||||
m_qchFileChooser->setFileName(item->m_qchFile);
|
m_qchFileChooser->setFilePath(item->m_qchFile);
|
||||||
|
|
||||||
m_autoRunCheckBox->setChecked(item->m_isAutoRun);
|
m_autoRunCheckBox->setChecked(item->m_isAutoRun);
|
||||||
m_autoCreateBuildDirectoryCheckBox->setChecked(item->m_autoCreateBuildDirectory);
|
m_autoCreateBuildDirectoryCheckBox->setChecked(item->m_autoCreateBuildDirectory);
|
||||||
|
@@ -86,7 +86,7 @@ void ConfigModelItemDelegate::setEditorData(QWidget *editor, const QModelIndex &
|
|||||||
ConfigModel::DataItem data = ConfigModel::dataItemFromIndex(index);
|
ConfigModel::DataItem data = ConfigModel::dataItemFromIndex(index);
|
||||||
if (data.type == ConfigModel::DataItem::FILE || data.type == ConfigModel::DataItem::DIRECTORY) {
|
if (data.type == ConfigModel::DataItem::FILE || data.type == ConfigModel::DataItem::DIRECTORY) {
|
||||||
auto edit = static_cast<Utils::PathChooser *>(editor);
|
auto edit = static_cast<Utils::PathChooser *>(editor);
|
||||||
edit->setFileName(Utils::FilePath::fromUserInput(data.value));
|
edit->setFilePath(Utils::FilePath::fromUserInput(data.value));
|
||||||
return;
|
return;
|
||||||
} else if (!data.values.isEmpty()) {
|
} else if (!data.values.isEmpty()) {
|
||||||
auto edit = static_cast<QComboBox *>(editor);
|
auto edit = static_cast<QComboBox *>(editor);
|
||||||
@@ -114,7 +114,7 @@ void ConfigModelItemDelegate::setModelData(QWidget *editor, QAbstractItemModel *
|
|||||||
if (data.type == ConfigModel::DataItem::FILE || data.type == ConfigModel::DataItem::DIRECTORY) {
|
if (data.type == ConfigModel::DataItem::FILE || data.type == ConfigModel::DataItem::DIRECTORY) {
|
||||||
auto edit = static_cast<Utils::PathChooser *>(editor);
|
auto edit = static_cast<Utils::PathChooser *>(editor);
|
||||||
if (edit->rawPath() != data.value)
|
if (edit->rawPath() != data.value)
|
||||||
model->setData(index, edit->fileName().toString(), Qt::EditRole);
|
model->setData(index, edit->filePath().toString(), Qt::EditRole);
|
||||||
return;
|
return;
|
||||||
} else if (!data.values.isEmpty()) {
|
} else if (!data.values.isEmpty()) {
|
||||||
auto edit = static_cast<QComboBox *>(editor);
|
auto edit = static_cast<QComboBox *>(editor);
|
||||||
|
@@ -702,7 +702,7 @@ void BreakpointDialog::setParts(unsigned mask, const BreakpointParameters &data)
|
|||||||
m_lineEditMessage->setText(data.message);
|
m_lineEditMessage->setText(data.message);
|
||||||
|
|
||||||
if (mask & FileAndLinePart) {
|
if (mask & FileAndLinePart) {
|
||||||
m_pathChooserFileName->setFileName(data.fileName);
|
m_pathChooserFileName->setFilePath(data.fileName);
|
||||||
m_lineEditLineNumber->setText(QString::number(data.lineNumber));
|
m_lineEditLineNumber->setText(QString::number(data.lineNumber));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -479,8 +479,8 @@ StartApplicationParameters StartApplicationDialog::parameters() const
|
|||||||
StartApplicationParameters result;
|
StartApplicationParameters result;
|
||||||
result.serverPort = d->serverPortSpinBox->value();
|
result.serverPort = d->serverPortSpinBox->value();
|
||||||
result.serverAddress = d->channelOverrideEdit->text();
|
result.serverAddress = d->channelOverrideEdit->text();
|
||||||
result.runnable.executable = d->localExecutablePathChooser->fileName();
|
result.runnable.executable = d->localExecutablePathChooser->filePath();
|
||||||
result.serverStartScript = d->serverStartScriptPathChooser->fileName();
|
result.serverStartScript = d->serverStartScriptPathChooser->filePath();
|
||||||
result.serverInitCommands = d->serverInitCommandsTextEdit->toPlainText();
|
result.serverInitCommands = d->serverInitCommandsTextEdit->toPlainText();
|
||||||
result.serverResetCommands = d->serverResetCommandsTextEdit->toPlainText();
|
result.serverResetCommands = d->serverResetCommandsTextEdit->toPlainText();
|
||||||
result.kitId = d->kitChooser->currentKitId();
|
result.kitId = d->kitChooser->currentKitId();
|
||||||
@@ -497,8 +497,8 @@ void StartApplicationDialog::setParameters(const StartApplicationParameters &p)
|
|||||||
d->kitChooser->setCurrentKitId(p.kitId);
|
d->kitChooser->setCurrentKitId(p.kitId);
|
||||||
d->serverPortSpinBox->setValue(p.serverPort);
|
d->serverPortSpinBox->setValue(p.serverPort);
|
||||||
d->channelOverrideEdit->setText(p.serverAddress);
|
d->channelOverrideEdit->setText(p.serverAddress);
|
||||||
d->localExecutablePathChooser->setFileName(p.runnable.executable);
|
d->localExecutablePathChooser->setFilePath(p.runnable.executable);
|
||||||
d->serverStartScriptPathChooser->setFileName(p.serverStartScript);
|
d->serverStartScriptPathChooser->setFilePath(p.serverStartScript);
|
||||||
d->serverInitCommandsTextEdit->setPlainText(p.serverInitCommands);
|
d->serverInitCommandsTextEdit->setPlainText(p.serverInitCommands);
|
||||||
d->serverResetCommandsTextEdit->setPlainText(p.serverResetCommands);
|
d->serverResetCommandsTextEdit->setPlainText(p.serverResetCommands);
|
||||||
d->debuginfoPathChooser->setPath(p.debugInfoLocation);
|
d->debuginfoPathChooser->setPath(p.debugInfoLocation);
|
||||||
|
@@ -348,8 +348,8 @@ DebuggerItem DebuggerItemConfigWidget::item() const
|
|||||||
{
|
{
|
||||||
DebuggerItem item(m_id);
|
DebuggerItem item(m_id);
|
||||||
item.setUnexpandedDisplayName(m_displayNameLineEdit->text());
|
item.setUnexpandedDisplayName(m_displayNameLineEdit->text());
|
||||||
item.setCommand(m_binaryChooser->fileName());
|
item.setCommand(m_binaryChooser->filePath());
|
||||||
item.setWorkingDirectory(m_workingDirectoryChooser->fileName());
|
item.setWorkingDirectory(m_workingDirectoryChooser->filePath());
|
||||||
item.setAutoDetected(m_autodetected);
|
item.setAutoDetected(m_autodetected);
|
||||||
Abis abiList;
|
Abis abiList;
|
||||||
const QStringList abis = m_abis->text().split(QRegExp("[^A-Za-z0-9-_]+"));
|
const QStringList abis = m_abis->text().split(QRegExp("[^A-Za-z0-9-_]+"));
|
||||||
@@ -390,10 +390,10 @@ void DebuggerItemConfigWidget::load(const DebuggerItem *item)
|
|||||||
m_typeLineEdit->setText(item->engineTypeName());
|
m_typeLineEdit->setText(item->engineTypeName());
|
||||||
|
|
||||||
m_binaryChooser->setReadOnly(item->isAutoDetected());
|
m_binaryChooser->setReadOnly(item->isAutoDetected());
|
||||||
m_binaryChooser->setFileName(item->command());
|
m_binaryChooser->setFilePath(item->command());
|
||||||
|
|
||||||
m_workingDirectoryChooser->setReadOnly(item->isAutoDetected());
|
m_workingDirectoryChooser->setReadOnly(item->isAutoDetected());
|
||||||
m_workingDirectoryChooser->setFileName(item->workingDirectory());
|
m_workingDirectoryChooser->setFilePath(item->workingDirectory());
|
||||||
|
|
||||||
QString text;
|
QString text;
|
||||||
QString versionCommand;
|
QString versionCommand;
|
||||||
|
@@ -370,9 +370,9 @@ void AttachCoreDialog::coreFileChanged(const QString &core)
|
|||||||
Runnable debugger = DebuggerKitAspect::runnable(k);
|
Runnable debugger = DebuggerKitAspect::runnable(k);
|
||||||
CoreInfo cinfo = CoreInfo::readExecutableNameFromCore(debugger, core);
|
CoreInfo cinfo = CoreInfo::readExecutableNameFromCore(debugger, core);
|
||||||
if (!cinfo.foundExecutableName.isEmpty())
|
if (!cinfo.foundExecutableName.isEmpty())
|
||||||
d->symbolFileName->setFileName(FilePath::fromString(cinfo.foundExecutableName));
|
d->symbolFileName->setFilePath(FilePath::fromString(cinfo.foundExecutableName));
|
||||||
else if (!d->symbolFileName->isValid() && !cinfo.rawStringFromCore.isEmpty())
|
else if (!d->symbolFileName->isValid() && !cinfo.rawStringFromCore.isEmpty())
|
||||||
d->symbolFileName->setFileName(FilePath::fromString(cinfo.rawStringFromCore));
|
d->symbolFileName->setFilePath(FilePath::fromString(cinfo.rawStringFromCore));
|
||||||
}
|
}
|
||||||
changed();
|
changed();
|
||||||
}
|
}
|
||||||
@@ -417,7 +417,7 @@ QString AttachCoreDialog::localCoreFile() const
|
|||||||
|
|
||||||
FilePath AttachCoreDialog::symbolFile() const
|
FilePath AttachCoreDialog::symbolFile() const
|
||||||
{
|
{
|
||||||
return d->symbolFileName->fileName();
|
return d->symbolFileName->filePath();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AttachCoreDialog::setSymbolFile(const QString &symbolFileName)
|
void AttachCoreDialog::setSymbolFile(const QString &symbolFileName)
|
||||||
|
@@ -121,7 +121,7 @@ UnstartedAppWatcherDialog::UnstartedAppWatcherDialog(QWidget *parent)
|
|||||||
if (isLocal(runConfig)) {
|
if (isLocal(runConfig)) {
|
||||||
resetExecutable->setEnabled(true);
|
resetExecutable->setEnabled(true);
|
||||||
connect(resetExecutable, &QPushButton::clicked, this, [this, runnable] {
|
connect(resetExecutable, &QPushButton::clicked, this, [this, runnable] {
|
||||||
m_pathChooser->setFileName(runnable.executable);
|
m_pathChooser->setFilePath(runnable.executable);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -187,12 +187,12 @@ void ExportDialog::exportHeightChanged(int height)
|
|||||||
|
|
||||||
QString ExportDialog::exportFileName() const
|
QString ExportDialog::exportFileName() const
|
||||||
{
|
{
|
||||||
return m_pathChooser->fileName().toString();
|
return m_pathChooser->filePath().toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExportDialog::setExportFileName(const QString &f)
|
void ExportDialog::setExportFileName(const QString &f)
|
||||||
{
|
{
|
||||||
m_pathChooser->setFileName(Utils::FilePath::fromString(f));
|
m_pathChooser->setFilePath(Utils::FilePath::fromString(f));
|
||||||
}
|
}
|
||||||
|
|
||||||
ExportData ExportDialog::exportData() const
|
ExportData ExportDialog::exportData() const
|
||||||
|
@@ -329,7 +329,7 @@ void MultiExportDialog::accept()
|
|||||||
|
|
||||||
QString MultiExportDialog::exportFileName() const
|
QString MultiExportDialog::exportFileName() const
|
||||||
{
|
{
|
||||||
return m_pathChooser->fileName().toString();
|
return m_pathChooser->filePath().toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MultiExportDialog::setExportFileName(QString f)
|
void MultiExportDialog::setExportFileName(QString f)
|
||||||
@@ -337,7 +337,7 @@ void MultiExportDialog::setExportFileName(QString f)
|
|||||||
const int lastDot = f.lastIndexOf('.');
|
const int lastDot = f.lastIndexOf('.');
|
||||||
if (lastDot != -1)
|
if (lastDot != -1)
|
||||||
f.insert(lastDot, "-%1");
|
f.insert(lastDot, "-%1");
|
||||||
m_pathChooser->setFileName(Utils::FilePath::fromString(f));
|
m_pathChooser->setFilePath(Utils::FilePath::fromString(f));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
@@ -73,7 +73,7 @@ IosSettingsWidget::IosSettingsWidget()
|
|||||||
m_ui->deviceView->header()->setSectionResizeMode(0, QHeaderView::ResizeToContents);
|
m_ui->deviceView->header()->setSectionResizeMode(0, QHeaderView::ResizeToContents);
|
||||||
m_ui->pathWidget->setExpectedKind(Utils::PathChooser::ExistingDirectory);
|
m_ui->pathWidget->setExpectedKind(Utils::PathChooser::ExistingDirectory);
|
||||||
m_ui->pathWidget->lineEdit()->setReadOnly(true);
|
m_ui->pathWidget->lineEdit()->setReadOnly(true);
|
||||||
m_ui->pathWidget->setFileName(IosConfigurations::screenshotDir());
|
m_ui->pathWidget->setFilePath(IosConfigurations::screenshotDir());
|
||||||
m_ui->pathWidget->addButton(tr("Screenshot"), this,
|
m_ui->pathWidget->addButton(tr("Screenshot"), this,
|
||||||
std::bind(&IosSettingsWidget::onScreenshot, this));
|
std::bind(&IosSettingsWidget::onScreenshot, this));
|
||||||
|
|
||||||
@@ -280,7 +280,7 @@ void IosSettingsWidget::onScreenshot()
|
|||||||
const auto generatePath = [this](const SimulatorInfo &info) {
|
const auto generatePath = [this](const SimulatorInfo &info) {
|
||||||
const QString fileName = QString("%1_%2_%3.png").arg(info.name).arg(info.runtimeName)
|
const QString fileName = QString("%1_%2_%3.png").arg(info.name).arg(info.runtimeName)
|
||||||
.arg(QDateTime::currentDateTime().toString("yyyy-MM-dd_HH-mm-ss-z")).replace(' ', '_');
|
.arg(QDateTime::currentDateTime().toString("yyyy-MM-dd_HH-mm-ss-z")).replace(' ', '_');
|
||||||
return m_ui->pathWidget->fileName().pathAppended(fileName).toString();
|
return m_ui->pathWidget->filePath().pathAppended(fileName).toString();
|
||||||
};
|
};
|
||||||
|
|
||||||
QPointer<SimulatorOperationDialog> statusDialog = new SimulatorOperationDialog(this);
|
QPointer<SimulatorOperationDialog> statusDialog = new SimulatorOperationDialog(this);
|
||||||
@@ -318,7 +318,7 @@ void IosSettingsWidget::onSelectionChanged()
|
|||||||
void IosSettingsWidget::saveSettings()
|
void IosSettingsWidget::saveSettings()
|
||||||
{
|
{
|
||||||
IosConfigurations::setIgnoreAllDevices(!m_ui->deviceAskCheckBox->isChecked());
|
IosConfigurations::setIgnoreAllDevices(!m_ui->deviceAskCheckBox->isChecked());
|
||||||
IosConfigurations::setScreenshotDir(m_ui->pathWidget->fileName());
|
IosConfigurations::setScreenshotDir(m_ui->pathWidget->filePath());
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
@@ -111,7 +111,7 @@ void NimToolChainConfigWidget::applyImpl()
|
|||||||
Q_ASSERT(tc);
|
Q_ASSERT(tc);
|
||||||
if (tc->isAutoDetected())
|
if (tc->isAutoDetected())
|
||||||
return;
|
return;
|
||||||
tc->setCompilerCommand(m_compilerCommand->fileName());
|
tc->setCompilerCommand(m_compilerCommand->filePath());
|
||||||
}
|
}
|
||||||
|
|
||||||
void NimToolChainConfigWidget::discardImpl()
|
void NimToolChainConfigWidget::discardImpl()
|
||||||
|
@@ -563,8 +563,8 @@ void CustomToolChainConfigWidget::applyImpl()
|
|||||||
auto tc = static_cast<CustomToolChain *>(toolChain());
|
auto tc = static_cast<CustomToolChain *>(toolChain());
|
||||||
Q_ASSERT(tc);
|
Q_ASSERT(tc);
|
||||||
QString displayName = tc->displayName();
|
QString displayName = tc->displayName();
|
||||||
tc->setCompilerCommand(m_compilerCommand->fileName());
|
tc->setCompilerCommand(m_compilerCommand->filePath());
|
||||||
tc->setMakeCommand(m_makeCommand->fileName());
|
tc->setMakeCommand(m_makeCommand->filePath());
|
||||||
tc->setTargetAbi(m_abiWidget->currentAbi());
|
tc->setTargetAbi(m_abiWidget->currentAbi());
|
||||||
Macros macros = Utils::transform<QVector>(
|
Macros macros = Utils::transform<QVector>(
|
||||||
m_predefinedDetails->text().split('\n', QString::SkipEmptyParts),
|
m_predefinedDetails->text().split('\n', QString::SkipEmptyParts),
|
||||||
@@ -588,8 +588,8 @@ void CustomToolChainConfigWidget::setFromToolchain()
|
|||||||
// subwidgets are not yet connected!
|
// subwidgets are not yet connected!
|
||||||
QSignalBlocker blocker(this);
|
QSignalBlocker blocker(this);
|
||||||
auto tc = static_cast<CustomToolChain *>(toolChain());
|
auto tc = static_cast<CustomToolChain *>(toolChain());
|
||||||
m_compilerCommand->setFileName(tc->compilerCommand());
|
m_compilerCommand->setFilePath(tc->compilerCommand());
|
||||||
m_makeCommand->setFileName(tc->makeCommand(Environment()));
|
m_makeCommand->setFilePath(tc->makeCommand(Environment()));
|
||||||
m_abiWidget->setAbis(Abis(), tc->targetAbi());
|
m_abiWidget->setAbis(Abis(), tc->targetAbi());
|
||||||
const QStringList macroLines = Utils::transform<QList>(tc->rawPredefinedMacros(), [](const Macro &m) {
|
const QStringList macroLines = Utils::transform<QList>(tc->rawPredefinedMacros(), [](const Macro &m) {
|
||||||
return QString::fromUtf8(m.toKeyValue(QByteArray()));
|
return QString::fromUtf8(m.toKeyValue(QByteArray()));
|
||||||
@@ -607,7 +607,7 @@ bool CustomToolChainConfigWidget::isDirtyImpl() const
|
|||||||
{
|
{
|
||||||
auto tc = static_cast<CustomToolChain *>(toolChain());
|
auto tc = static_cast<CustomToolChain *>(toolChain());
|
||||||
Q_ASSERT(tc);
|
Q_ASSERT(tc);
|
||||||
return m_compilerCommand->fileName() != tc->compilerCommand()
|
return m_compilerCommand->filePath() != tc->compilerCommand()
|
||||||
|| m_makeCommand->path() != tc->makeCommand(Environment()).toString()
|
|| m_makeCommand->path() != tc->makeCommand(Environment()).toString()
|
||||||
|| m_abiWidget->currentAbi() != tc->targetAbi()
|
|| m_abiWidget->currentAbi() != tc->targetAbi()
|
||||||
|| Macro::toMacros(m_predefinedDetails->text().toUtf8()) != tc->rawPredefinedMacros()
|
|| Macro::toMacros(m_predefinedDetails->text().toUtf8()) != tc->rawPredefinedMacros()
|
||||||
|
@@ -109,13 +109,13 @@ void SshSettingsWidget::saveSettings()
|
|||||||
SshSettings::setConnectionSharingEnabled(m_connectionSharingCheckBox.isChecked());
|
SshSettings::setConnectionSharingEnabled(m_connectionSharingCheckBox.isChecked());
|
||||||
SshSettings::setConnectionSharingTimeout(m_connectionSharingSpinBox.value());
|
SshSettings::setConnectionSharingTimeout(m_connectionSharingSpinBox.value());
|
||||||
if (m_sshPathChanged)
|
if (m_sshPathChanged)
|
||||||
SshSettings::setSshFilePath(m_sshChooser.fileName());
|
SshSettings::setSshFilePath(m_sshChooser.filePath());
|
||||||
if (m_sftpPathChanged)
|
if (m_sftpPathChanged)
|
||||||
SshSettings::setSftpFilePath(m_sftpChooser.fileName());
|
SshSettings::setSftpFilePath(m_sftpChooser.filePath());
|
||||||
if (m_askpassPathChanged)
|
if (m_askpassPathChanged)
|
||||||
SshSettings::setAskpassFilePath(m_askpassChooser.fileName());
|
SshSettings::setAskpassFilePath(m_askpassChooser.filePath());
|
||||||
if (m_keygenPathChanged)
|
if (m_keygenPathChanged)
|
||||||
SshSettings::setKeygenFilePath(m_keygenChooser.fileName());
|
SshSettings::setKeygenFilePath(m_keygenChooser.filePath());
|
||||||
SshSettings::storeSettings(Core::ICore::settings());
|
SshSettings::storeSettings(Core::ICore::settings());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -157,7 +157,7 @@ void SshSettingsWidget::setupPathChooser(PathChooser &chooser, const FilePath &i
|
|||||||
bool &changedFlag)
|
bool &changedFlag)
|
||||||
{
|
{
|
||||||
chooser.setExpectedKind(PathChooser::ExistingCommand);
|
chooser.setExpectedKind(PathChooser::ExistingCommand);
|
||||||
chooser.setFileName(initialPath);
|
chooser.setFilePath(initialPath);
|
||||||
connect(&chooser, &PathChooser::pathChanged, [&changedFlag] { changedFlag = true; });
|
connect(&chooser, &PathChooser::pathChanged, [&changedFlag] { changedFlag = true; });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1274,7 +1274,7 @@ void GccToolChainConfigWidget::applyImpl()
|
|||||||
auto tc = static_cast<GccToolChain *>(toolChain());
|
auto tc = static_cast<GccToolChain *>(toolChain());
|
||||||
Q_ASSERT(tc);
|
Q_ASSERT(tc);
|
||||||
QString displayName = tc->displayName();
|
QString displayName = tc->displayName();
|
||||||
tc->setCompilerCommand(m_compilerCommand->fileName());
|
tc->setCompilerCommand(m_compilerCommand->filePath());
|
||||||
if (m_abiWidget) {
|
if (m_abiWidget) {
|
||||||
tc->setSupportedAbis(m_abiWidget->supportedAbis());
|
tc->setSupportedAbis(m_abiWidget->supportedAbis());
|
||||||
tc->setTargetAbi(m_abiWidget->currentAbi());
|
tc->setTargetAbi(m_abiWidget->currentAbi());
|
||||||
@@ -1300,7 +1300,7 @@ void GccToolChainConfigWidget::setFromToolchain()
|
|||||||
// subwidgets are not yet connected!
|
// subwidgets are not yet connected!
|
||||||
QSignalBlocker blocker(this);
|
QSignalBlocker blocker(this);
|
||||||
auto tc = static_cast<GccToolChain *>(toolChain());
|
auto tc = static_cast<GccToolChain *>(toolChain());
|
||||||
m_compilerCommand->setFileName(tc->compilerCommand());
|
m_compilerCommand->setFilePath(tc->compilerCommand());
|
||||||
m_platformCodeGenFlagsLineEdit->setText(QtcProcess::joinArgs(tc->platformCodeGenFlags()));
|
m_platformCodeGenFlagsLineEdit->setText(QtcProcess::joinArgs(tc->platformCodeGenFlags()));
|
||||||
m_platformLinkerFlagsLineEdit->setText(QtcProcess::joinArgs(tc->platformLinkerFlags()));
|
m_platformLinkerFlagsLineEdit->setText(QtcProcess::joinArgs(tc->platformLinkerFlags()));
|
||||||
if (m_abiWidget) {
|
if (m_abiWidget) {
|
||||||
@@ -1314,7 +1314,7 @@ bool GccToolChainConfigWidget::isDirtyImpl() const
|
|||||||
{
|
{
|
||||||
auto tc = static_cast<GccToolChain *>(toolChain());
|
auto tc = static_cast<GccToolChain *>(toolChain());
|
||||||
Q_ASSERT(tc);
|
Q_ASSERT(tc);
|
||||||
return m_compilerCommand->fileName() != tc->compilerCommand()
|
return m_compilerCommand->filePath() != tc->compilerCommand()
|
||||||
|| m_platformCodeGenFlagsLineEdit->text()
|
|| m_platformCodeGenFlagsLineEdit->text()
|
||||||
!= QtcProcess::joinArgs(tc->platformCodeGenFlags())
|
!= QtcProcess::joinArgs(tc->platformCodeGenFlags())
|
||||||
|| m_platformLinkerFlagsLineEdit->text()
|
|| m_platformLinkerFlagsLineEdit->text()
|
||||||
@@ -1356,7 +1356,7 @@ void GccToolChainConfigWidget::handleCompilerCommandChange()
|
|||||||
bool haveCompiler = false;
|
bool haveCompiler = false;
|
||||||
Abi currentAbi = m_abiWidget->currentAbi();
|
Abi currentAbi = m_abiWidget->currentAbi();
|
||||||
bool customAbi = m_abiWidget->isCustomAbi() && m_abiWidget->isEnabled();
|
bool customAbi = m_abiWidget->isCustomAbi() && m_abiWidget->isEnabled();
|
||||||
FilePath path = m_compilerCommand->fileName();
|
FilePath path = m_compilerCommand->filePath();
|
||||||
Abis abiList;
|
Abis abiList;
|
||||||
|
|
||||||
if (!path.isEmpty()) {
|
if (!path.isEmpty()) {
|
||||||
|
@@ -80,7 +80,7 @@ ImportWidget::ImportWidget(QWidget *parent) :
|
|||||||
void ImportWidget::setCurrentDirectory(const Utils::FilePath &dir)
|
void ImportWidget::setCurrentDirectory(const Utils::FilePath &dir)
|
||||||
{
|
{
|
||||||
m_pathChooser->setBaseDirectory(dir);
|
m_pathChooser->setBaseDirectory(dir);
|
||||||
m_pathChooser->setFileName(dir);
|
m_pathChooser->setFilePath(dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ImportWidget::ownsReturnKey() const
|
bool ImportWidget::ownsReturnKey() const
|
||||||
@@ -90,10 +90,10 @@ bool ImportWidget::ownsReturnKey() const
|
|||||||
|
|
||||||
void ImportWidget::handleImportRequest()
|
void ImportWidget::handleImportRequest()
|
||||||
{
|
{
|
||||||
Utils::FilePath dir = m_pathChooser->fileName();
|
Utils::FilePath dir = m_pathChooser->filePath();
|
||||||
emit importFrom(dir);
|
emit importFrom(dir);
|
||||||
|
|
||||||
m_pathChooser->setFileName(m_pathChooser->baseDirectory());
|
m_pathChooser->setFilePath(m_pathChooser->baseDirectory());
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
@@ -77,7 +77,7 @@ public:
|
|||||||
m_chooser = new Utils::PathChooser;
|
m_chooser = new Utils::PathChooser;
|
||||||
m_chooser->setExpectedKind(Utils::PathChooser::ExistingDirectory);
|
m_chooser->setExpectedKind(Utils::PathChooser::ExistingDirectory);
|
||||||
m_chooser->setHistoryCompleter(QLatin1String("PE.SysRoot.History"));
|
m_chooser->setHistoryCompleter(QLatin1String("PE.SysRoot.History"));
|
||||||
m_chooser->setFileName(SysRootKitAspect::sysRoot(k));
|
m_chooser->setFilePath(SysRootKitAspect::sysRoot(k));
|
||||||
connect(m_chooser, &Utils::PathChooser::pathChanged,
|
connect(m_chooser, &Utils::PathChooser::pathChanged,
|
||||||
this, &SysRootKitAspectWidget::pathWasChanged);
|
this, &SysRootKitAspectWidget::pathWasChanged);
|
||||||
}
|
}
|
||||||
@@ -92,13 +92,13 @@ private:
|
|||||||
void refresh() override
|
void refresh() override
|
||||||
{
|
{
|
||||||
if (!m_ignoreChange)
|
if (!m_ignoreChange)
|
||||||
m_chooser->setFileName(SysRootKitAspect::sysRoot(m_kit));
|
m_chooser->setFilePath(SysRootKitAspect::sysRoot(m_kit));
|
||||||
}
|
}
|
||||||
|
|
||||||
void pathWasChanged()
|
void pathWasChanged()
|
||||||
{
|
{
|
||||||
m_ignoreChange = true;
|
m_ignoreChange = true;
|
||||||
SysRootKitAspect::setSysRoot(m_kit, m_chooser->fileName());
|
SysRootKitAspect::setSysRoot(m_kit, m_chooser->filePath());
|
||||||
m_ignoreChange = false;
|
m_ignoreChange = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1466,7 +1466,7 @@ void ClangClToolChainConfigWidget::setFromClangClToolChain()
|
|||||||
if (clangClToolChain->isAutoDetected())
|
if (clangClToolChain->isAutoDetected())
|
||||||
m_llvmDirLabel->setText(QDir::toNativeSeparators(clangClToolChain->clangPath()));
|
m_llvmDirLabel->setText(QDir::toNativeSeparators(clangClToolChain->clangPath()));
|
||||||
else
|
else
|
||||||
m_compilerCommand->setFileName(Utils::FilePath::fromString(clangClToolChain->clangPath()));
|
m_compilerCommand->setFilePath(Utils::FilePath::fromString(clangClToolChain->clangPath()));
|
||||||
}
|
}
|
||||||
|
|
||||||
static const MsvcToolChain *findMsvcToolChain(unsigned char wordWidth, Abi::OSFlavor flavor)
|
static const MsvcToolChain *findMsvcToolChain(unsigned char wordWidth, Abi::OSFlavor flavor)
|
||||||
@@ -1579,7 +1579,7 @@ static QString compilerFromPath(const QString &path)
|
|||||||
|
|
||||||
void ClangClToolChainConfigWidget::applyImpl()
|
void ClangClToolChainConfigWidget::applyImpl()
|
||||||
{
|
{
|
||||||
Utils::FilePath clangClPath = m_compilerCommand->fileName();
|
Utils::FilePath clangClPath = m_compilerCommand->filePath();
|
||||||
auto clangClToolChain = static_cast<ClangClToolChain *>(toolChain());
|
auto clangClToolChain = static_cast<ClangClToolChain *>(toolChain());
|
||||||
clangClToolChain->setClangPath(clangClPath.toString());
|
clangClToolChain->setClangPath(clangClPath.toString());
|
||||||
|
|
||||||
|
@@ -384,7 +384,7 @@ void BaseStringAspect::update()
|
|||||||
: d->m_value;
|
: d->m_value;
|
||||||
|
|
||||||
if (d->m_pathChooserDisplay) {
|
if (d->m_pathChooserDisplay) {
|
||||||
d->m_pathChooserDisplay->setFileName(FilePath::fromString(displayedString));
|
d->m_pathChooserDisplay->setFilePath(FilePath::fromString(displayedString));
|
||||||
d->updateWidgetFromCheckStatus(d->m_pathChooserDisplay.data());
|
d->updateWidgetFromCheckStatus(d->m_pathChooserDisplay.data());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -516,7 +516,7 @@ public:
|
|||||||
targetDirLayout->addWidget(new QLabel(tr("Target directory:"), this));
|
targetDirLayout->addWidget(new QLabel(tr("Target directory:"), this));
|
||||||
m_targetDirChooser = new PathChooser(this);
|
m_targetDirChooser = new PathChooser(this);
|
||||||
m_targetDirChooser->setExpectedKind(PathChooser::ExistingDirectory);
|
m_targetDirChooser->setExpectedKind(PathChooser::ExistingDirectory);
|
||||||
m_targetDirChooser->setFileName(defaultTargetDir);
|
m_targetDirChooser->setFilePath(defaultTargetDir);
|
||||||
connect(m_targetDirChooser, &PathChooser::validChanged, this, [this](bool valid) {
|
connect(m_targetDirChooser, &PathChooser::validChanged, this, [this](bool valid) {
|
||||||
m_buttonBox->button(QDialogButtonBox::Ok)->setEnabled(valid);
|
m_buttonBox->button(QDialogButtonBox::Ok)->setEnabled(valid);
|
||||||
});
|
});
|
||||||
@@ -549,7 +549,7 @@ public:
|
|||||||
DropAction dropAction() const { return static_cast<DropAction>(m_buttonGroup->checkedId()); }
|
DropAction dropAction() const { return static_cast<DropAction>(m_buttonGroup->checkedId()); }
|
||||||
FilePath targetDir() const
|
FilePath targetDir() const
|
||||||
{
|
{
|
||||||
return m_targetDirChooser ? m_targetDirChooser->fileName() : FilePath();
|
return m_targetDirChooser ? m_targetDirChooser->filePath() : FilePath();
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@@ -563,7 +563,7 @@ SelectableFilesWidget::SelectableFilesWidget(QWidget *parent) :
|
|||||||
connect(m_baseDirChooser, &Utils::PathChooser::validChanged,
|
connect(m_baseDirChooser, &Utils::PathChooser::validChanged,
|
||||||
this, &SelectableFilesWidget::baseDirectoryChanged);
|
this, &SelectableFilesWidget::baseDirectoryChanged);
|
||||||
connect(m_startParsingButton, &QAbstractButton::clicked,
|
connect(m_startParsingButton, &QAbstractButton::clicked,
|
||||||
this, [this]() { startParsing(m_baseDirChooser->fileName()); });
|
this, [this]() { startParsing(m_baseDirChooser->filePath()); });
|
||||||
|
|
||||||
m_selectFilesFilterLabel->setText(tr("Select files matching:"));
|
m_selectFilesFilterLabel->setText(tr("Select files matching:"));
|
||||||
m_selectFilesFilterEdit->setText(selectFilter);
|
m_selectFilesFilterEdit->setText(selectFilter);
|
||||||
@@ -645,7 +645,7 @@ void SelectableFilesWidget::resetModel(const Utils::FilePath &path, const Utils:
|
|||||||
connect(m_model, &SelectableFilesModel::checkedFilesChanged,
|
connect(m_model, &SelectableFilesModel::checkedFilesChanged,
|
||||||
this, &SelectableFilesWidget::selectedFilesChanged);
|
this, &SelectableFilesWidget::selectedFilesChanged);
|
||||||
|
|
||||||
m_baseDirChooser->setFileName(path);
|
m_baseDirChooser->setFilePath(path);
|
||||||
m_view->setModel(m_model);
|
m_view->setModel(m_model);
|
||||||
|
|
||||||
startParsing(path);
|
startParsing(path);
|
||||||
|
@@ -160,7 +160,7 @@ void TargetSetupWidget::addBuildInfo(const BuildInfo &info, bool isImport)
|
|||||||
|
|
||||||
store.pathChooser = new Utils::PathChooser();
|
store.pathChooser = new Utils::PathChooser();
|
||||||
store.pathChooser->setExpectedKind(Utils::PathChooser::Directory);
|
store.pathChooser->setExpectedKind(Utils::PathChooser::Directory);
|
||||||
store.pathChooser->setFileName(info.buildDirectory);
|
store.pathChooser->setFilePath(info.buildDirectory);
|
||||||
store.pathChooser->setHistoryCompleter(QLatin1String("TargetSetup.BuildDir.History"));
|
store.pathChooser->setHistoryCompleter(QLatin1String("TargetSetup.BuildDir.History"));
|
||||||
store.pathChooser->setReadOnly(isImport);
|
store.pathChooser->setReadOnly(isImport);
|
||||||
m_newBuildsLayout->addWidget(store.pathChooser, pos * 2, 1);
|
m_newBuildsLayout->addWidget(store.pathChooser, pos * 2, 1);
|
||||||
@@ -302,7 +302,7 @@ void TargetSetupWidget::updateDefaultBuildDirectories()
|
|||||||
if (buildInfoStore.buildInfo.typeName == buildInfo.typeName) {
|
if (buildInfoStore.buildInfo.typeName == buildInfo.typeName) {
|
||||||
if (!buildInfoStore.customBuildDir) {
|
if (!buildInfoStore.customBuildDir) {
|
||||||
m_ignoreChange = true;
|
m_ignoreChange = true;
|
||||||
buildInfoStore.pathChooser->setFileName(buildInfo.buildDirectory);
|
buildInfoStore.pathChooser->setFilePath(buildInfo.buildDirectory);
|
||||||
m_ignoreChange = false;
|
m_ignoreChange = false;
|
||||||
}
|
}
|
||||||
found = true;
|
found = true;
|
||||||
@@ -344,7 +344,7 @@ void TargetSetupWidget::pathChanged()
|
|||||||
return store.pathChooser == pathChooser;
|
return store.pathChooser == pathChooser;
|
||||||
});
|
});
|
||||||
QTC_ASSERT(it != m_infoStore.end(), return);
|
QTC_ASSERT(it != m_infoStore.end(), return);
|
||||||
it->buildInfo.buildDirectory = pathChooser->fileName();
|
it->buildInfo.buildDirectory = pathChooser->filePath();
|
||||||
it->customBuildDir = true;
|
it->customBuildDir = true;
|
||||||
reportIssues(static_cast<int>(std::distance(m_infoStore.begin(), it)));
|
reportIssues(static_cast<int>(std::distance(m_infoStore.begin(), it)));
|
||||||
}
|
}
|
||||||
|
@@ -680,7 +680,7 @@ void QbsBuildStepConfigWidget::updateState()
|
|||||||
cleanInstallRootCheckBox->setChecked(qbsStep()->cleanInstallRoot());
|
cleanInstallRootCheckBox->setChecked(qbsStep()->cleanInstallRoot());
|
||||||
forceProbesCheckBox->setChecked(qbsStep()->forceProbes());
|
forceProbesCheckBox->setChecked(qbsStep()->forceProbes());
|
||||||
updatePropertyEdit(qbsStep()->qbsConfiguration(QbsBuildStep::PreserveVariables));
|
updatePropertyEdit(qbsStep()->qbsConfiguration(QbsBuildStep::PreserveVariables));
|
||||||
installDirChooser->setFileName(qbsStep()->installRoot(QbsBuildStep::PreserveVariables));
|
installDirChooser->setFilePath(qbsStep()->installRoot(QbsBuildStep::PreserveVariables));
|
||||||
defaultInstallDirCheckBox->setChecked(!qbsStep()->hasCustomInstallRoot());
|
defaultInstallDirCheckBox->setChecked(!qbsStep()->hasCustomInstallRoot());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -138,7 +138,7 @@ public:
|
|||||||
SettingsWidget()
|
SettingsWidget()
|
||||||
{
|
{
|
||||||
m_qbsExePathChooser.setExpectedKind(PathChooser::ExistingCommand);
|
m_qbsExePathChooser.setExpectedKind(PathChooser::ExistingCommand);
|
||||||
m_qbsExePathChooser.setFileName(QbsSettings::qbsExecutableFilePath());
|
m_qbsExePathChooser.setFilePath(QbsSettings::qbsExecutableFilePath());
|
||||||
m_defaultInstallDirLineEdit.setText(QbsSettings::defaultInstallDirTemplate());
|
m_defaultInstallDirLineEdit.setText(QbsSettings::defaultInstallDirTemplate());
|
||||||
m_versionLabel.setText(getQbsVersion());
|
m_versionLabel.setText(getQbsVersion());
|
||||||
m_settingsDirCheckBox.setText(tr("Use %1 settings directory for Qbs")
|
m_settingsDirCheckBox.setText(tr("Use %1 settings directory for Qbs")
|
||||||
@@ -155,8 +155,8 @@ public:
|
|||||||
void apply()
|
void apply()
|
||||||
{
|
{
|
||||||
QbsSettingsData settings = QbsSettings::rawSettingsData();
|
QbsSettingsData settings = QbsSettings::rawSettingsData();
|
||||||
if (m_qbsExePathChooser.fileName() != QbsSettings::qbsExecutableFilePath())
|
if (m_qbsExePathChooser.filePath() != QbsSettings::qbsExecutableFilePath())
|
||||||
settings.qbsExecutableFilePath = m_qbsExePathChooser.fileName();
|
settings.qbsExecutableFilePath = m_qbsExePathChooser.filePath();
|
||||||
settings.defaultInstallDirTemplate = m_defaultInstallDirLineEdit.text();
|
settings.defaultInstallDirTemplate = m_defaultInstallDirLineEdit.text();
|
||||||
settings.useCreatorSettings = m_settingsDirCheckBox.isChecked();
|
settings.useCreatorSettings = m_settingsDirCheckBox.isChecked();
|
||||||
QbsSettings::setSettingsData(settings);
|
QbsSettings::setSettingsData(settings);
|
||||||
|
@@ -195,7 +195,7 @@ DetailsPage::DetailsPage(AddLibraryWizard *parent)
|
|||||||
|
|
||||||
const auto pathValidator = [libPathChooser](Utils::FancyLineEdit *edit, QString *errorMessage) {
|
const auto pathValidator = [libPathChooser](Utils::FancyLineEdit *edit, QString *errorMessage) {
|
||||||
return libPathChooser->defaultValidationFunction()(edit, errorMessage)
|
return libPathChooser->defaultValidationFunction()(edit, errorMessage)
|
||||||
&& validateLibraryPath(libPathChooser->fileName(),
|
&& validateLibraryPath(libPathChooser->filePath(),
|
||||||
libPathChooser, errorMessage);
|
libPathChooser, errorMessage);
|
||||||
};
|
};
|
||||||
libPathChooser->setValidationFunction(pathValidator);
|
libPathChooser->setValidationFunction(pathValidator);
|
||||||
|
@@ -178,7 +178,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
QString projectSource() const { return m_projectSource->path(); }
|
QString projectSource() const { return m_projectSource->path(); }
|
||||||
FilePath localExecutable() const { return m_localExecutable->fileName(); }
|
FilePath localExecutable() const { return m_localExecutable->filePath(); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
PathChooser *m_projectSource;
|
PathChooser *m_projectSource;
|
||||||
|
@@ -235,7 +235,7 @@ QnxToolChainConfigWidget::QnxToolChainConfigWidget(QnxToolChain *tc)
|
|||||||
{
|
{
|
||||||
m_compilerCommand->setExpectedKind(PathChooser::ExistingCommand);
|
m_compilerCommand->setExpectedKind(PathChooser::ExistingCommand);
|
||||||
m_compilerCommand->setHistoryCompleter(QLatin1String("Qnx.ToolChain.History"));
|
m_compilerCommand->setHistoryCompleter(QLatin1String("Qnx.ToolChain.History"));
|
||||||
m_compilerCommand->setFileName(tc->compilerCommand());
|
m_compilerCommand->setFilePath(tc->compilerCommand());
|
||||||
m_compilerCommand->setEnabled(!tc->isAutoDetected());
|
m_compilerCommand->setEnabled(!tc->isAutoDetected());
|
||||||
|
|
||||||
m_sdpPath->setExpectedKind(PathChooser::ExistingDirectory);
|
m_sdpPath->setExpectedKind(PathChooser::ExistingDirectory);
|
||||||
@@ -243,7 +243,7 @@ QnxToolChainConfigWidget::QnxToolChainConfigWidget(QnxToolChain *tc)
|
|||||||
m_sdpPath->setPath(tc->sdpPath());
|
m_sdpPath->setPath(tc->sdpPath());
|
||||||
m_sdpPath->setEnabled(!tc->isAutoDetected());
|
m_sdpPath->setEnabled(!tc->isAutoDetected());
|
||||||
|
|
||||||
const Abis abiList = detectTargetAbis(m_sdpPath->fileName());
|
const Abis abiList = detectTargetAbis(m_sdpPath->filePath());
|
||||||
m_abiWidget->setAbis(abiList, tc->targetAbi());
|
m_abiWidget->setAbis(abiList, tc->targetAbi());
|
||||||
m_abiWidget->setEnabled(!tc->isAutoDetected() && !abiList.isEmpty());
|
m_abiWidget->setEnabled(!tc->isAutoDetected() && !abiList.isEmpty());
|
||||||
|
|
||||||
@@ -267,9 +267,9 @@ void QnxToolChainConfigWidget::applyImpl()
|
|||||||
Q_ASSERT(tc);
|
Q_ASSERT(tc);
|
||||||
QString displayName = tc->displayName();
|
QString displayName = tc->displayName();
|
||||||
tc->setDisplayName(displayName); // reset display name
|
tc->setDisplayName(displayName); // reset display name
|
||||||
tc->setSdpPath(m_sdpPath->fileName().toString());
|
tc->setSdpPath(m_sdpPath->filePath().toString());
|
||||||
tc->setTargetAbi(m_abiWidget->currentAbi());
|
tc->setTargetAbi(m_abiWidget->currentAbi());
|
||||||
tc->resetToolChain(m_compilerCommand->fileName());
|
tc->resetToolChain(m_compilerCommand->filePath());
|
||||||
}
|
}
|
||||||
|
|
||||||
void QnxToolChainConfigWidget::discardImpl()
|
void QnxToolChainConfigWidget::discardImpl()
|
||||||
@@ -277,7 +277,7 @@ void QnxToolChainConfigWidget::discardImpl()
|
|||||||
// subwidgets are not yet connected!
|
// subwidgets are not yet connected!
|
||||||
QSignalBlocker blocker(this);
|
QSignalBlocker blocker(this);
|
||||||
auto tc = static_cast<const QnxToolChain *>(toolChain());
|
auto tc = static_cast<const QnxToolChain *>(toolChain());
|
||||||
m_compilerCommand->setFileName(tc->compilerCommand());
|
m_compilerCommand->setFilePath(tc->compilerCommand());
|
||||||
m_sdpPath->setPath(tc->sdpPath());
|
m_sdpPath->setPath(tc->sdpPath());
|
||||||
m_abiWidget->setAbis(tc->supportedAbis(), tc->targetAbi());
|
m_abiWidget->setAbis(tc->supportedAbis(), tc->targetAbi());
|
||||||
if (!m_compilerCommand->path().isEmpty())
|
if (!m_compilerCommand->path().isEmpty())
|
||||||
@@ -288,7 +288,7 @@ bool QnxToolChainConfigWidget::isDirtyImpl() const
|
|||||||
{
|
{
|
||||||
auto tc = static_cast<const QnxToolChain *>(toolChain());
|
auto tc = static_cast<const QnxToolChain *>(toolChain());
|
||||||
Q_ASSERT(tc);
|
Q_ASSERT(tc);
|
||||||
return m_compilerCommand->fileName() != tc->compilerCommand()
|
return m_compilerCommand->filePath() != tc->compilerCommand()
|
||||||
|| m_sdpPath->path() != tc->sdpPath()
|
|| m_sdpPath->path() != tc->sdpPath()
|
||||||
|| m_abiWidget->currentAbi() != tc->targetAbi();
|
|| m_abiWidget->currentAbi() != tc->targetAbi();
|
||||||
}
|
}
|
||||||
@@ -297,7 +297,7 @@ void QnxToolChainConfigWidget::handleSdpPathChange()
|
|||||||
{
|
{
|
||||||
const Abi currentAbi = m_abiWidget->currentAbi();
|
const Abi currentAbi = m_abiWidget->currentAbi();
|
||||||
const bool customAbi = m_abiWidget->isCustomAbi();
|
const bool customAbi = m_abiWidget->isCustomAbi();
|
||||||
const Abis abiList = detectTargetAbis(m_sdpPath->fileName());
|
const Abis abiList = detectTargetAbis(m_sdpPath->filePath());
|
||||||
|
|
||||||
m_abiWidget->setEnabled(!abiList.isEmpty());
|
m_abiWidget->setEnabled(!abiList.isEmpty());
|
||||||
|
|
||||||
|
@@ -196,7 +196,7 @@ GenericLinuxDeviceConfigurationWizardKeyDeploymentPage::GenericLinuxDeviceConfig
|
|||||||
deployLayout->addStretch();
|
deployLayout->addStretch();
|
||||||
mainLayout->addLayout(deployLayout);
|
mainLayout->addLayout(deployLayout);
|
||||||
connect(&d->keyFileChooser, &PathChooser::pathChanged, this, [this, deployButton] {
|
connect(&d->keyFileChooser, &PathChooser::pathChanged, this, [this, deployButton] {
|
||||||
deployButton->setEnabled(d->keyFileChooser.fileName().exists());
|
deployButton->setEnabled(d->keyFileChooser.filePath().exists());
|
||||||
d->iconLabel.clear();
|
d->iconLabel.clear();
|
||||||
emit completeChanged();
|
emit completeChanged();
|
||||||
});
|
});
|
||||||
@@ -227,7 +227,7 @@ void GenericLinuxDeviceConfigurationWizardKeyDeploymentPage::initializePage()
|
|||||||
|
|
||||||
bool GenericLinuxDeviceConfigurationWizardKeyDeploymentPage::isComplete() const
|
bool GenericLinuxDeviceConfigurationWizardKeyDeploymentPage::isComplete() const
|
||||||
{
|
{
|
||||||
return d->keyFileChooser.path().isEmpty() || d->keyFileChooser.fileName().exists();
|
return d->keyFileChooser.path().isEmpty() || d->keyFileChooser.filePath().exists();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GenericLinuxDeviceConfigurationWizardKeyDeploymentPage::validatePage()
|
bool GenericLinuxDeviceConfigurationWizardKeyDeploymentPage::validatePage()
|
||||||
|
@@ -205,7 +205,7 @@ QWidget *FindInFiles::createConfigWidget()
|
|||||||
|
|
||||||
FilePath FindInFiles::path() const
|
FilePath FindInFiles::path() const
|
||||||
{
|
{
|
||||||
return m_directory->fileName();
|
return m_directory->filePath();
|
||||||
}
|
}
|
||||||
|
|
||||||
void FindInFiles::writeSettings(QSettings *settings)
|
void FindInFiles::writeSettings(QSettings *settings)
|
||||||
@@ -224,7 +224,7 @@ void FindInFiles::readSettings(QSettings *settings)
|
|||||||
|
|
||||||
void FindInFiles::setDirectory(const FilePath &directory)
|
void FindInFiles::setDirectory(const FilePath &directory)
|
||||||
{
|
{
|
||||||
m_directory->setFileName(directory);
|
m_directory->setFilePath(directory);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FindInFiles::setBaseDirectory(const FilePath &directory)
|
void FindInFiles::setBaseDirectory(const FilePath &directory)
|
||||||
@@ -234,7 +234,7 @@ void FindInFiles::setBaseDirectory(const FilePath &directory)
|
|||||||
|
|
||||||
FilePath FindInFiles::directory() const
|
FilePath FindInFiles::directory() const
|
||||||
{
|
{
|
||||||
return m_directory->fileName();
|
return m_directory->filePath();
|
||||||
}
|
}
|
||||||
|
|
||||||
void FindInFiles::findOnFileSystem(const QString &path)
|
void FindInFiles::findOnFileSystem(const QString &path)
|
||||||
|
Reference in New Issue
Block a user