forked from qt-creator/qt-creator
Coco: Create a CocoSettings class
... out of CocoInstallation and the GlobalSettings namespace and use the usual static-in-function singleton access which incidentally can be used to get the same access CocoInstallation had as all CocoInstallation object shared the same data. Further plan is to move m_cocoPathAspect from GlobalSettingsWidget and simplify a bit. Change-Id: I3b7b38404c972b8510911a1e24723124cf8a85d0 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -97,8 +97,7 @@ QWidget *CocoBuildStep::createConfigWidget()
|
|||||||
|
|
||||||
void CocoBuildStep::updateDisplay()
|
void CocoBuildStep::updateDisplay()
|
||||||
{
|
{
|
||||||
CocoInstallation coco;
|
if (!cocoSettings().isValid()) {
|
||||||
if (!coco.isValid()) {
|
|
||||||
setSummaryText("<i>" + Tr::tr("Coco Code Coverage: No working Coco installation") + "</i>");
|
setSummaryText("<i>" + Tr::tr("Coco Code Coverage: No working Coco installation") + "</i>");
|
||||||
emit setButtonState(false);
|
emit setButtonState(false);
|
||||||
return;
|
return;
|
||||||
|
@@ -61,8 +61,7 @@ public:
|
|||||||
m_client->shutdown();
|
m_client->shutdown();
|
||||||
m_client = nullptr;
|
m_client = nullptr;
|
||||||
|
|
||||||
CocoInstallation coco;
|
if (cocoSettings().isValid()) {
|
||||||
if (coco.isValid()) {
|
|
||||||
QDialog dialog(ICore::dialogParent());
|
QDialog dialog(ICore::dialogParent());
|
||||||
dialog.setModal(true);
|
dialog.setModal(true);
|
||||||
auto layout = new QFormLayout();
|
auto layout = new QFormLayout();
|
||||||
@@ -83,7 +82,7 @@ public:
|
|||||||
QObject::connect(&buttons, &QDialogButtonBox::rejected, &dialog, &QDialog::reject);
|
QObject::connect(&buttons, &QDialogButtonBox::rejected, &dialog, &QDialog::reject);
|
||||||
|
|
||||||
if (dialog.exec() == QDialog::Accepted) {
|
if (dialog.exec() == QDialog::Accepted) {
|
||||||
const FilePath cocoPath = coco.coverageBrowserPath();
|
const FilePath cocoPath = cocoSettings().coverageBrowserPath();
|
||||||
const FilePath csmesPath = csmesChoser.filePath();
|
const FilePath csmesPath = csmesChoser.filePath();
|
||||||
if (cocoPath.isExecutableFile() && csmesPath.exists()) {
|
if (cocoPath.isExecutableFile() && csmesPath.exists()) {
|
||||||
m_client = new CocoLanguageClient(cocoPath, csmesPath);
|
m_client = new CocoLanguageClient(cocoPath, csmesPath);
|
||||||
@@ -117,7 +116,7 @@ void CocoPlugin::initialize()
|
|||||||
QCoreApplication::translate("Coco", "Coco"),
|
QCoreApplication::translate("Coco", "Coco"),
|
||||||
":/cocoplugin/images/SquishCoco_48x48.png");
|
":/cocoplugin/images/SquishCoco_48x48.png");
|
||||||
|
|
||||||
GlobalSettings::read();
|
cocoSettings().read();
|
||||||
GlobalSettingsPage::instance().widget();
|
GlobalSettingsPage::instance().widget();
|
||||||
|
|
||||||
setupCocoProjectPanel();
|
setupCocoProjectPanel();
|
||||||
|
@@ -105,11 +105,11 @@ void CocoProjectWidget::reloadSettings()
|
|||||||
setState(configDone);
|
setState(configDone);
|
||||||
displayChanges();
|
displayChanges();
|
||||||
|
|
||||||
const bool valid = m_coco.isValid();
|
const bool valid = cocoSettings().isValid();
|
||||||
m_configerrorLabel.setVisible(!valid);
|
m_configerrorLabel.setVisible(!valid);
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
m_configerrorLabel.setText(
|
m_configerrorLabel.setText(
|
||||||
Tr::tr("Coco is not installed correctly: \"%1\"").arg(m_coco.errorMessage()));
|
Tr::tr("Coco is not installed correctly: \"%1\"").arg(cocoSettings().errorMessage()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -232,7 +232,7 @@ void Internal::CocoProjectWidget::onCoverageGroupBoxClicked()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_coco.isValid()) {
|
if (!cocoSettings().isValid()) {
|
||||||
m_coverageGroupBoxEnabled.setValue(false, Utils::BaseAspect::BeQuiet);
|
m_coverageGroupBoxEnabled.setValue(false, Utils::BaseAspect::BeQuiet);
|
||||||
|
|
||||||
QMessageBox box;
|
QMessageBox box;
|
||||||
@@ -245,7 +245,7 @@ void Internal::CocoProjectWidget::onCoverageGroupBoxClicked()
|
|||||||
if (box.clickedButton() == editButton)
|
if (box.clickedButton() == editButton)
|
||||||
Core::ICore::showOptionsDialog(Constants::COCO_SETTINGS_PAGE_ID);
|
Core::ICore::showOptionsDialog(Constants::COCO_SETTINGS_PAGE_ID);
|
||||||
|
|
||||||
m_coverageGroupBoxEnabled.setValue(m_coco.isValid(), Utils::BaseAspect::BeQuiet);
|
m_coverageGroupBoxEnabled.setValue(cocoSettings().isValid(), Utils::BaseAspect::BeQuiet);
|
||||||
} else
|
} else
|
||||||
m_buildSettings->setCoverage(checked);
|
m_buildSettings->setCoverage(checked);
|
||||||
|
|
||||||
|
@@ -4,7 +4,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "buildsettings.h"
|
#include "buildsettings.h"
|
||||||
#include "globalsettings.h"
|
|
||||||
|
|
||||||
#include <projectexplorer/buildconfiguration.h>
|
#include <projectexplorer/buildconfiguration.h>
|
||||||
#include <utils/aspects.h>
|
#include <utils/aspects.h>
|
||||||
@@ -75,7 +74,6 @@ private:
|
|||||||
QString m_selectionDirectory;
|
QString m_selectionDirectory;
|
||||||
ConfigurationState m_configState = configDone;
|
ConfigurationState m_configState = configDone;
|
||||||
QString m_buildConfigurationName;
|
QString m_buildConfigurationName;
|
||||||
CocoInstallation m_coco;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Coco::Internal
|
} // namespace Coco::Internal
|
||||||
|
@@ -50,7 +50,6 @@ private:
|
|||||||
bool cocoPathValid() const;
|
bool cocoPathValid() const;
|
||||||
|
|
||||||
QMakeFeatureFile m_featureFile;
|
QMakeFeatureFile m_featureFile;
|
||||||
CocoInstallation m_coco;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void CocoQMakeSettings::read()
|
void CocoQMakeSettings::read()
|
||||||
@@ -179,7 +178,7 @@ void CocoQMakeSettings::write(const QString &options, const QString &tweaks)
|
|||||||
|
|
||||||
QString CocoQMakeSettings::pathAssignment() const
|
QString CocoQMakeSettings::pathAssignment() const
|
||||||
{
|
{
|
||||||
return pathAssignmentPrefix + m_coco.directory().toUserOutput();
|
return pathAssignmentPrefix + cocoSettings().directory().toUserOutput();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CocoQMakeSettings::cocoPathValid() const
|
bool CocoQMakeSettings::cocoPathValid() const
|
||||||
|
@@ -20,23 +20,34 @@
|
|||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QStandardPaths>
|
#include <QStandardPaths>
|
||||||
|
|
||||||
|
using namespace Utils;
|
||||||
|
|
||||||
namespace Coco::Internal {
|
namespace Coco::Internal {
|
||||||
namespace GlobalSettings {
|
|
||||||
|
|
||||||
static const char DIRECTORY[] = "CocoDirectory";
|
static const char DIRECTORY[] = "CocoDirectory";
|
||||||
|
|
||||||
void read()
|
CocoSettings &cocoSettings()
|
||||||
|
{
|
||||||
|
static CocoSettings theCocoSettings;
|
||||||
|
return theCocoSettings;
|
||||||
|
}
|
||||||
|
|
||||||
|
CocoSettings::CocoSettings()
|
||||||
|
{
|
||||||
|
m_errorMessage = Tr::tr("Error: Coco installation directory not set. (This can't happen.)");
|
||||||
|
}
|
||||||
|
|
||||||
|
void CocoSettings::read()
|
||||||
{
|
{
|
||||||
CocoInstallation coco;
|
|
||||||
bool directoryInSettings = false;
|
bool directoryInSettings = false;
|
||||||
|
|
||||||
Utils::QtcSettings *s = Core::ICore::settings();
|
QtcSettings *s = Core::ICore::settings();
|
||||||
s->beginGroup(Constants::COCO_SETTINGS_GROUP);
|
s->beginGroup(Constants::COCO_SETTINGS_GROUP);
|
||||||
const QStringList keys = s->allKeys();
|
const QStringList keys = s->allKeys();
|
||||||
for (const QString &keyString : keys) {
|
for (const QString &keyString : keys) {
|
||||||
Utils::Key key(keyString.toLatin1());
|
Key key(keyString.toLatin1());
|
||||||
if (key == DIRECTORY) {
|
if (key == DIRECTORY) {
|
||||||
coco.setDirectory(Utils::FilePath::fromUserInput(s->value(key).toString()));
|
setDirectory(FilePath::fromUserInput(s->value(key).toString()));
|
||||||
directoryInSettings = true;
|
directoryInSettings = true;
|
||||||
} else
|
} else
|
||||||
s->remove(key);
|
s->remove(key);
|
||||||
@@ -44,74 +55,56 @@ void read()
|
|||||||
s->endGroup();
|
s->endGroup();
|
||||||
|
|
||||||
if (!directoryInSettings)
|
if (!directoryInSettings)
|
||||||
coco.findDefaultDirectory();
|
findDefaultDirectory();
|
||||||
|
|
||||||
GlobalSettings::save();
|
save();
|
||||||
}
|
}
|
||||||
|
|
||||||
void save()
|
void CocoSettings::save()
|
||||||
{
|
{
|
||||||
Utils::QtcSettings *s = Core::ICore::settings();
|
QtcSettings *s = Core::ICore::settings();
|
||||||
s->beginGroup(Constants::COCO_SETTINGS_GROUP);
|
s->beginGroup(Constants::COCO_SETTINGS_GROUP);
|
||||||
s->setValue(DIRECTORY, CocoInstallation().directory().toUserOutput());
|
s->setValue(DIRECTORY, directory().toUserOutput());
|
||||||
s->endGroup();
|
s->endGroup();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace GlobalSettings
|
FilePath CocoSettings::directory() const
|
||||||
|
|
||||||
struct CocoInstallationPrivate
|
|
||||||
{
|
{
|
||||||
Utils::FilePath cocoPath;
|
return m_cocoPath;
|
||||||
bool isValid = false;
|
|
||||||
QString errorMessage = Tr::tr("Error: Coco installation directory not set. (This can't happen.)");
|
|
||||||
};
|
|
||||||
|
|
||||||
CocoInstallationPrivate *CocoInstallation::d = nullptr;
|
|
||||||
|
|
||||||
CocoInstallation::CocoInstallation()
|
|
||||||
{
|
|
||||||
if (!d)
|
|
||||||
d = new CocoInstallationPrivate;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils::FilePath CocoInstallation::directory() const
|
FilePath CocoSettings::coverageBrowserPath() const
|
||||||
{
|
|
||||||
return d->cocoPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
Utils::FilePath CocoInstallation::coverageBrowserPath() const
|
|
||||||
{
|
{
|
||||||
QString browserPath;
|
QString browserPath;
|
||||||
|
|
||||||
if (Utils::HostOsInfo::isAnyUnixHost() || Utils::HostOsInfo::isMacHost())
|
if (HostOsInfo::isAnyUnixHost() || HostOsInfo::isMacHost())
|
||||||
browserPath = "bin/coveragebrowser";
|
browserPath = "bin/coveragebrowser";
|
||||||
else
|
else
|
||||||
browserPath = "coveragebrowser.exe";
|
browserPath = "coveragebrowser.exe";
|
||||||
|
|
||||||
return d->cocoPath.resolvePath(browserPath);
|
return m_cocoPath.resolvePath(browserPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CocoInstallation::setDirectory(const Utils::FilePath &dir)
|
void CocoSettings::setDirectory(const FilePath &dir)
|
||||||
{
|
{
|
||||||
if (isCocoDirectory(dir)) {
|
if (isCocoDirectory(dir)) {
|
||||||
d->cocoPath = dir;
|
m_cocoPath = dir;
|
||||||
d->isValid = true;
|
m_isValid = true;
|
||||||
d->errorMessage = "";
|
m_errorMessage.clear();
|
||||||
verifyCocoDirectory();
|
verifyCocoDirectory();
|
||||||
}
|
} else {
|
||||||
else {
|
m_cocoPath = Utils::FilePath();
|
||||||
d->cocoPath = Utils::FilePath();
|
m_isValid = false;
|
||||||
d->isValid = false;
|
m_errorMessage
|
||||||
d->errorMessage
|
|
||||||
= Tr::tr("Error: Coco installation directory not found at \"%1\".").arg(dir.nativePath());
|
= Tr::tr("Error: Coco installation directory not found at \"%1\".").arg(dir.nativePath());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils::FilePath CocoInstallation::coverageScannerPath(const Utils::FilePath &cocoDir) const
|
FilePath CocoSettings::coverageScannerPath(const FilePath &cocoDir) const
|
||||||
{
|
{
|
||||||
QString scannerPath;
|
QString scannerPath;
|
||||||
|
|
||||||
if (Utils::HostOsInfo::isAnyUnixHost() || Utils::HostOsInfo::isMacHost())
|
if (HostOsInfo::isAnyUnixHost() || HostOsInfo::isMacHost())
|
||||||
scannerPath = "bin/coveragescanner";
|
scannerPath = "bin/coveragescanner";
|
||||||
else
|
else
|
||||||
scannerPath = "coveragescanner.exe";
|
scannerPath = "coveragescanner.exe";
|
||||||
@@ -119,21 +112,21 @@ Utils::FilePath CocoInstallation::coverageScannerPath(const Utils::FilePath &coc
|
|||||||
return cocoDir.resolvePath(scannerPath);
|
return cocoDir.resolvePath(scannerPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CocoInstallation::isCocoDirectory(const Utils::FilePath &cocoDir) const
|
bool CocoSettings::isCocoDirectory(const Utils::FilePath &cocoDir) const
|
||||||
{
|
{
|
||||||
return coverageScannerPath(cocoDir).exists();
|
return coverageScannerPath(cocoDir).exists();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CocoInstallation::logError(const QString &msg)
|
void CocoSettings::logError(const QString &msg)
|
||||||
{
|
{
|
||||||
logFlashing(msg);
|
logFlashing(msg);
|
||||||
d->isValid = false;
|
m_isValid = false;
|
||||||
d->errorMessage = msg;
|
m_errorMessage = msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CocoInstallation::verifyCocoDirectory()
|
bool CocoSettings::verifyCocoDirectory()
|
||||||
{
|
{
|
||||||
QString coveragescanner = coverageScannerPath(d->cocoPath).nativePath();
|
QString coveragescanner = coverageScannerPath(m_cocoPath).nativePath();
|
||||||
|
|
||||||
QProcess proc;
|
QProcess proc;
|
||||||
proc.setProgram(coveragescanner);
|
proc.setProgram(coveragescanner);
|
||||||
@@ -170,19 +163,19 @@ bool CocoInstallation::verifyCocoDirectory()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CocoInstallation::isValid() const
|
bool CocoSettings::isValid() const
|
||||||
{
|
{
|
||||||
return d->isValid;
|
return m_isValid;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString CocoInstallation::errorMessage() const
|
QString CocoSettings::errorMessage() const
|
||||||
{
|
{
|
||||||
return d->errorMessage;
|
return m_errorMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CocoInstallation::tryPath(const QString &path)
|
void CocoSettings::tryPath(const QString &path)
|
||||||
{
|
{
|
||||||
if (d->isValid)
|
if (m_isValid)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const auto fpath = Utils::FilePath::fromString(path);
|
const auto fpath = Utils::FilePath::fromString(path);
|
||||||
@@ -190,17 +183,18 @@ void CocoInstallation::tryPath(const QString &path)
|
|||||||
if (isCocoDirectory(fpath)) {
|
if (isCocoDirectory(fpath)) {
|
||||||
logSilently(Tr::tr("Found Coco directory \"%1\".").arg(nativePath));
|
logSilently(Tr::tr("Found Coco directory \"%1\".").arg(nativePath));
|
||||||
setDirectory(fpath);
|
setDirectory(fpath);
|
||||||
GlobalSettings::save();
|
save();
|
||||||
} else
|
} else {
|
||||||
logSilently(Tr::tr("Checked Coco directory \"%1\".").arg(nativePath));
|
logSilently(Tr::tr("Checked Coco directory \"%1\".").arg(nativePath));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
QString CocoInstallation::envVar(const QString &var) const
|
QString CocoSettings::envVar(const QString &var) const
|
||||||
{
|
{
|
||||||
return QProcessEnvironment::systemEnvironment().value(var);
|
return QProcessEnvironment::systemEnvironment().value(var);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CocoInstallation::findDefaultDirectory()
|
void CocoSettings::findDefaultDirectory()
|
||||||
{
|
{
|
||||||
if (Utils::HostOsInfo::isMacHost())
|
if (Utils::HostOsInfo::isMacHost())
|
||||||
tryPath("/Applications/SquishCoco");
|
tryPath("/Applications/SquishCoco");
|
||||||
@@ -216,10 +210,11 @@ void CocoInstallation::findDefaultDirectory()
|
|||||||
tryPath(envVar("ProgramFiles(x86)") + "\\squishcoco");
|
tryPath(envVar("ProgramFiles(x86)") + "\\squishcoco");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GlobalSettingsWidget::GlobalSettingsWidget(QFrame *parent)
|
GlobalSettingsWidget::GlobalSettingsWidget(QFrame *parent)
|
||||||
: QFrame(parent)
|
: QFrame(parent)
|
||||||
{
|
{
|
||||||
m_cocoPathAspect.setDefaultPathValue(m_coco.directory());
|
m_cocoPathAspect.setDefaultPathValue(cocoSettings().directory());
|
||||||
m_cocoPathAspect.setExpectedKind(Utils::PathChooser::ExistingDirectory);
|
m_cocoPathAspect.setExpectedKind(Utils::PathChooser::ExistingDirectory);
|
||||||
m_cocoPathAspect.setPromptDialogTitle(Tr::tr("Coco Installation Directory"));
|
m_cocoPathAspect.setPromptDialogTitle(Tr::tr("Coco Installation Directory"));
|
||||||
|
|
||||||
@@ -245,13 +240,13 @@ void GlobalSettingsWidget::onCocoPathChanged()
|
|||||||
|
|
||||||
bool GlobalSettingsWidget::verifyCocoDirectory(const Utils::FilePath &cocoDir)
|
bool GlobalSettingsWidget::verifyCocoDirectory(const Utils::FilePath &cocoDir)
|
||||||
{
|
{
|
||||||
m_coco.setDirectory(cocoDir);
|
cocoSettings().setDirectory(cocoDir);
|
||||||
m_messageLabel.setText(m_coco.errorMessage());
|
m_messageLabel.setText(cocoSettings().errorMessage());
|
||||||
if (m_coco.isValid())
|
if (cocoSettings().isValid())
|
||||||
m_messageLabel.setIconType(Utils::InfoLabel::None);
|
m_messageLabel.setIconType(Utils::InfoLabel::None);
|
||||||
else
|
else
|
||||||
m_messageLabel.setIconType(Utils::InfoLabel::Error);
|
m_messageLabel.setIconType(Utils::InfoLabel::Error);
|
||||||
return m_coco.isValid();
|
return cocoSettings().isValid();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GlobalSettingsWidget::apply()
|
void GlobalSettingsWidget::apply()
|
||||||
@@ -259,21 +254,21 @@ void GlobalSettingsWidget::apply()
|
|||||||
if (!verifyCocoDirectory(widgetCocoDir()))
|
if (!verifyCocoDirectory(widgetCocoDir()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_coco.setDirectory(widgetCocoDir());
|
cocoSettings().setDirectory(widgetCocoDir());
|
||||||
GlobalSettings::save();
|
cocoSettings().save();
|
||||||
|
|
||||||
emit updateCocoDir();
|
emit updateCocoDir();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GlobalSettingsWidget::cancel()
|
void GlobalSettingsWidget::cancel()
|
||||||
{
|
{
|
||||||
m_coco.setDirectory(m_previousCocoDir);
|
cocoSettings().setDirectory(m_previousCocoDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GlobalSettingsWidget::setVisible(bool visible)
|
void GlobalSettingsWidget::setVisible(bool visible)
|
||||||
{
|
{
|
||||||
QFrame::setVisible(visible);
|
QFrame::setVisible(visible);
|
||||||
m_previousCocoDir = m_coco.directory();
|
m_previousCocoDir = cocoSettings().directory();
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils::FilePath GlobalSettingsWidget::widgetCocoDir() const
|
Utils::FilePath GlobalSettingsWidget::widgetCocoDir() const
|
||||||
|
@@ -8,21 +8,16 @@
|
|||||||
#include <QPointer>
|
#include <QPointer>
|
||||||
|
|
||||||
namespace Coco::Internal {
|
namespace Coco::Internal {
|
||||||
namespace GlobalSettings {
|
|
||||||
|
|
||||||
|
class CocoSettings
|
||||||
|
{
|
||||||
|
friend CocoSettings &cocoSettings();
|
||||||
|
CocoSettings();
|
||||||
|
|
||||||
|
public:
|
||||||
void read();
|
void read();
|
||||||
void save();
|
void save();
|
||||||
|
|
||||||
} // GlobalSettings
|
|
||||||
|
|
||||||
struct CocoInstallationPrivate;
|
|
||||||
|
|
||||||
// Borg pattern: There are many instances of this class, but all are the same.
|
|
||||||
class CocoInstallation
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
CocoInstallation();
|
|
||||||
|
|
||||||
Utils::FilePath directory() const;
|
Utils::FilePath directory() const;
|
||||||
Utils::FilePath coverageBrowserPath() const;
|
Utils::FilePath coverageBrowserPath() const;
|
||||||
void setDirectory(const Utils::FilePath &dir);
|
void setDirectory(const Utils::FilePath &dir);
|
||||||
@@ -39,9 +34,13 @@ private:
|
|||||||
void tryPath(const QString &path);
|
void tryPath(const QString &path);
|
||||||
QString envVar(const QString &var) const;
|
QString envVar(const QString &var) const;
|
||||||
|
|
||||||
static CocoInstallationPrivate *d;
|
Utils::FilePath m_cocoPath;
|
||||||
|
bool m_isValid = false;
|
||||||
|
QString m_errorMessage;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
CocoSettings &cocoSettings();
|
||||||
|
|
||||||
class GlobalSettingsWidget : public QFrame
|
class GlobalSettingsWidget : public QFrame
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@@ -67,7 +66,6 @@ private:
|
|||||||
Utils::FilePathAspect m_cocoPathAspect;
|
Utils::FilePathAspect m_cocoPathAspect;
|
||||||
Utils::TextDisplay m_messageLabel;
|
Utils::TextDisplay m_messageLabel;
|
||||||
|
|
||||||
CocoInstallation m_coco;
|
|
||||||
Utils::FilePath m_previousCocoDir;
|
Utils::FilePath m_previousCocoDir;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user