forked from qt-creator/qt-creator
Squish: Handle changing configured Squish path
Update shared folders if the path to Squish has changed. Change-Id: Iea861d1f51dd4170bc4b481176fa1a8019c24d3d Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -108,6 +108,7 @@ void SquishPluginPrivate::initializeMenuEntries()
|
||||
bool SquishPluginPrivate::initializeGlobalScripts()
|
||||
{
|
||||
QTC_ASSERT(dd->m_squishTools, return false);
|
||||
SquishFileHandler::instance()->setSharedFolders({});
|
||||
|
||||
const Utils::FilePath squishserver = dd->m_squishSettings.squishPath.filePath().pathAppended(
|
||||
Utils::HostOsInfo::withExecutableSuffix("bin/squishserver"));
|
||||
@@ -135,6 +136,10 @@ bool SquishPlugin::initialize(const QStringList &, QString *)
|
||||
|
||||
bool SquishPlugin::delayedInitialize()
|
||||
{
|
||||
|
||||
connect(&dd->m_squishSettings, &SquishSettings::squishPathChanged,
|
||||
dd, &SquishPluginPrivate::initializeGlobalScripts);
|
||||
|
||||
return dd->initializeGlobalScripts();
|
||||
}
|
||||
|
||||
|
@@ -84,6 +84,8 @@ SquishSettings::SquishSettings()
|
||||
serverHost.setEnabled(!checked);
|
||||
serverPort.setEnabled(!checked);
|
||||
});
|
||||
connect(&squishPath, &Utils::StringAspect::valueChanged,
|
||||
this, &SquishSettings::squishPathChanged);
|
||||
}
|
||||
|
||||
Utils::FilePath SquishSettings::scriptsPath(Language language) const
|
||||
|
@@ -38,6 +38,7 @@ public:
|
||||
|
||||
class SquishSettings : public Utils::AspectContainer
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SquishSettings();
|
||||
|
||||
@@ -50,6 +51,9 @@ public:
|
||||
Utils::BoolAspect local;
|
||||
Utils::BoolAspect verbose;
|
||||
Utils::BoolAspect minimizeIDE;
|
||||
|
||||
signals:
|
||||
void squishPathChanged();
|
||||
};
|
||||
|
||||
class SquishSettingsPage final : public Core::IOptionsPage
|
||||
|
Reference in New Issue
Block a user