Commit 2b31dbad authored by dt_'s avatar dt_ Committed by Daniel Teske

Add a disabled reason to the display of runconfigurations

Also distinguish between qt runconfigurations that are disabled
due to parsing and due to not being parseable

Change-Id: Ia8ce4eaa7b6bfcc2c5290b254bb288c6d4892170
Task-Nr: QTCREATORBUG-5103
Reviewed-on: http://codereview.qt.nokia.com/451Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@nokia.com>
parent 91969214
......@@ -105,7 +105,8 @@ Qt4RunConfiguration::Qt4RunConfiguration(Qt4BaseTarget *parent, const QString &p
m_runMode(Gui),
m_isUsingDyldImageSuffix(false),
m_baseEnvironmentBase(Qt4RunConfiguration::BuildEnvironmentBase),
m_parseSuccess(parent->qt4Project()->validParse(m_proFilePath))
m_parseSuccess(parent->qt4Project()->validParse(m_proFilePath)),
m_parseInProgress(parent->qt4Project()->parseInProgress(m_proFilePath))
{
ctor();
}
......@@ -119,7 +120,8 @@ Qt4RunConfiguration::Qt4RunConfiguration(Qt4BaseTarget *parent, Qt4RunConfigurat
m_userWorkingDirectory(source->m_userWorkingDirectory),
m_userEnvironmentChanges(source->m_userEnvironmentChanges),
m_baseEnvironmentBase(source->m_baseEnvironmentBase),
m_parseSuccess(source->m_parseSuccess)
m_parseSuccess(source->m_parseSuccess),
m_parseInProgress(source->m_parseInProgress)
{
ctor();
}
......@@ -135,38 +137,33 @@ Qt4DesktopTarget *Qt4RunConfiguration::qt4Target() const
bool Qt4RunConfiguration::isEnabled() const
{
return m_parseSuccess;
return m_parseSuccess && !m_parseInProgress;
}
QString Qt4RunConfiguration::disabledReason() const
{
if (m_parseInProgress)
return tr("The .pro file is currently being parsed.");
if (!m_parseSuccess)
return tr("The .pro file could not be parsed");
return tr("The .pro file could not be parsed.");
return QString();
}
void Qt4RunConfiguration::handleParseState(bool success)
void Qt4RunConfiguration::proFileUpdated(Qt4ProjectManager::Qt4ProFileNode *pro, bool success, bool parseInProgress)
{
if (m_proFilePath != pro->path())
return;
bool enabled = isEnabled();
m_parseSuccess = success;
m_parseInProgress = parseInProgress;
if (enabled != isEnabled())
emit isEnabledChanged(!enabled);
}
void Qt4RunConfiguration::proFileUpdated(Qt4ProjectManager::Qt4ProFileNode *pro, bool success)
{
if (m_proFilePath != pro->path())
return;
handleParseState(success);
emit effectiveTargetInformationChanged();
emit baseEnvironmentChanged();
}
void Qt4RunConfiguration::proFileInvalidated(Qt4ProjectManager::Qt4ProFileNode *pro)
{
if (pro->path() != m_proFilePath)
return;
handleParseState(false);
if (!parseInProgress) {
emit effectiveTargetInformationChanged();
emit baseEnvironmentChanged();
}
}
void Qt4RunConfiguration::ctor()
......@@ -175,11 +172,8 @@ void Qt4RunConfiguration::ctor()
connect(qt4Target(), SIGNAL(environmentChanged()),
this, SIGNAL(baseEnvironmentChanged()));
connect(qt4Target()->qt4Project(), SIGNAL(proFileUpdated(Qt4ProjectManager::Qt4ProFileNode*,bool)),
this, SLOT(proFileUpdated(Qt4ProjectManager::Qt4ProFileNode*,bool)));
connect(qt4Target()->qt4Project(), SIGNAL(proFileInvalidated(Qt4ProjectManager::Qt4ProFileNode*)),
this, SLOT(proFileInvalidated(Qt4ProjectManager::Qt4ProFileNode*)));
connect(qt4Target()->qt4Project(), SIGNAL(proFileUpdated(Qt4ProjectManager::Qt4ProFileNode*,bool,bool)),
this, SLOT(proFileUpdated(Qt4ProjectManager::Qt4ProFileNode*,bool,bool)));
}
//////
......@@ -196,6 +190,17 @@ Qt4RunConfigurationWidget::Qt4RunConfigurationWidget(Qt4RunConfiguration *qt4Run
QVBoxLayout *vboxTopLayout = new QVBoxLayout(this);
vboxTopLayout->setMargin(0);
QHBoxLayout *hl = new QHBoxLayout();
hl->addStretch();
m_disabledIcon = new QLabel(this);
m_disabledIcon->setPixmap(QPixmap(QString::fromUtf8(":/projectexplorer/images/compile_warning.png")));
hl->addWidget(m_disabledIcon);
m_disabledReason = new QLabel(this);
m_disabledReason->setVisible(false);
hl->addWidget(m_disabledReason);
hl->addStretch();
vboxTopLayout->addLayout(hl);
m_detailsContainer = new Utils::DetailsWidget(this);
m_detailsContainer->setState(Utils::DetailsWidget::NoSummary);
vboxTopLayout->addWidget(m_detailsContainer);
......@@ -285,7 +290,7 @@ Qt4RunConfigurationWidget::Qt4RunConfigurationWidget(Qt4RunConfiguration *qt4Run
m_environmentWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
vboxTopLayout->addWidget(m_environmentWidget);
setEnabled(m_qt4RunConfiguration->isEnabled());
runConfigurationEnabledChange(m_qt4RunConfiguration->isEnabled());
connect(m_workingDirectoryEdit, SIGNAL(changed(QString)),
this, SLOT(workDirectoryEdited()));
......@@ -387,7 +392,11 @@ void Qt4RunConfigurationWidget::userChangesEdited()
void Qt4RunConfigurationWidget::runConfigurationEnabledChange(bool enabled)
{
setEnabled(enabled);
m_detailsContainer->setEnabled(enabled);
m_environmentWidget->setEnabled(enabled);
m_disabledIcon->setVisible(!enabled);
m_disabledReason->setVisible(!enabled);
m_disabledReason->setText(m_qt4RunConfiguration->disabledReason());
}
void Qt4RunConfigurationWidget::workDirectoryEdited()
......@@ -510,6 +519,7 @@ bool Qt4RunConfiguration::fromMap(const QVariantMap &map)
m_baseEnvironmentBase = static_cast<BaseEnvironmentBase>(map.value(QLatin1String(BASE_ENVIRONMENT_BASE_KEY), static_cast<int>(Qt4RunConfiguration::BuildEnvironmentBase)).toInt());
m_parseSuccess = qt4Target()->qt4Project()->validParse(m_proFilePath);
m_parseInProgress = qt4Target()->qt4Project()->parseInProgress(m_proFilePath);
return RunConfiguration::fromMap(map);
}
......
......@@ -38,8 +38,9 @@
#include <utils/environment.h>
#include <QtCore/QStringList>
#include <QtGui/QWidget>
#include <QtCore/QMetaType>
#include <QtGui/QLabel>
#include <QtGui/QWidget>
QT_BEGIN_NAMESPACE
class QCheckBox;
......@@ -117,15 +118,13 @@ signals:
void effectiveTargetInformationChanged();
private slots:
void proFileUpdated(Qt4ProjectManager::Qt4ProFileNode *pro, bool success);
void proFileInvalidated(Qt4ProjectManager::Qt4ProFileNode *pro);
void proFileUpdated(Qt4ProjectManager::Qt4ProFileNode *pro, bool success, bool parseInProgress);
protected:
Qt4RunConfiguration(Qt4BaseTarget *parent, Qt4RunConfiguration *source);
virtual bool fromMap(const QVariantMap &map);
private:
void handleParseState(bool success);
void setBaseWorkingDirectory(const QString &workingDirectory);
QString baseWorkingDirectory() const;
void setCommandLineArguments(const QString &argumentsString);
......@@ -156,6 +155,7 @@ private:
QList<Utils::EnvironmentItem> m_userEnvironmentChanges;
BaseEnvironmentBase m_baseEnvironmentBase;
bool m_parseSuccess;
bool m_parseInProgress;
};
class Qt4RunConfigurationWidget : public QWidget
......@@ -195,6 +195,8 @@ private slots:
private:
Qt4RunConfiguration *m_qt4RunConfiguration;
bool m_ignoreChange;
QLabel *m_disabledIcon;
QLabel *m_disabledReason;
QLineEdit *m_executableLineEdit;
Utils::PathChooser *m_workingDirectoryEdit;
QLineEdit *m_argumentsLineEdit;
......
......@@ -113,10 +113,8 @@ void S60DeployConfiguration::ctor()
setDefaultDisplayName(defaultDisplayName());
// TODO disable S60 Deploy Configuration while parsing
// requires keeping track of the parsing state of the project
// connect(qt4Target()->qt4Project(), SIGNAL(proFileInvalidated(Qt4ProjectManager::Qt4ProFileNode*)),
// this, SLOT(targetInformationInvalidated()));
connect(qt4Target()->qt4Project(), SIGNAL(proFileUpdated(Qt4ProjectManager::Qt4ProFileNode*,bool)),
this, SIGNAL(targetInformationChanged()));
connect(qt4Target()->qt4Project(), SIGNAL(proFileUpdated(Qt4ProjectManager::Qt4ProFileNode*,bool, bool)),
this, SLOT(slotTargetInformationChanged(bool,bool)));
connect(qt4Target(), SIGNAL(activeBuildConfigurationChanged(ProjectExplorer::BuildConfiguration*)),
this, SLOT(updateActiveBuildConfiguration(ProjectExplorer::BuildConfiguration*)));
connect(qt4Target(), SIGNAL(activeRunConfigurationChanged(ProjectExplorer::RunConfiguration*)),
......@@ -133,6 +131,13 @@ ProjectExplorer::DeployConfigurationWidget *S60DeployConfiguration::configuratio
return new S60DeployConfigurationWidget();
}
void S60DeployConfiguration::slotTargetInformationChanged(bool success, bool parseInProgress)
{
Q_UNUSED(success)
if (!parseInProgress)
emit targetInformationChanged();
}
bool S60DeployConfiguration::isStaticLibrary(const Qt4ProFileNode &projectNode) const
{
if (projectNode.projectType() == LibraryTemplate) {
......
......@@ -115,6 +115,7 @@ signals:
void installationDriveChanged();
private slots:
void slotTargetInformationChanged(bool success, bool parseInProgress);
void updateActiveBuildConfiguration(ProjectExplorer::BuildConfiguration *buildConfiguration);
void updateActiveRunConfiguration(ProjectExplorer::RunConfiguration *runConfiguration);
......
......@@ -73,7 +73,8 @@ QString pathFromId(const QString &id)
S60DeviceRunConfiguration::S60DeviceRunConfiguration(Qt4BaseTarget *parent, const QString &proFilePath) :
RunConfiguration(parent, QLatin1String(S60_DEVICE_RC_ID)),
m_proFilePath(proFilePath),
m_validParse(parent->qt4Project()->validParse(proFilePath))
m_validParse(parent->qt4Project()->validParse(proFilePath)),
m_parseInProgress(parent->qt4Project()->parseInProgress(proFilePath))
{
ctor();
}
......@@ -82,7 +83,8 @@ S60DeviceRunConfiguration::S60DeviceRunConfiguration(Qt4BaseTarget *target, S60D
RunConfiguration(target, source),
m_proFilePath(source->m_proFilePath),
m_commandLineArguments(source->m_commandLineArguments),
m_validParse(source->m_validParse)
m_validParse(source->m_validParse),
m_parseInProgress(source->m_parseInProgress)
{
ctor();
}
......@@ -97,33 +99,21 @@ void S60DeviceRunConfiguration::ctor()
setDefaultDisplayName(tr("Run on Symbian device"));
Qt4Project *pro = qt4Target()->qt4Project();
connect(pro, SIGNAL(proFileUpdated(Qt4ProjectManager::Qt4ProFileNode*,bool)),
this, SLOT(proFileUpdate(Qt4ProjectManager::Qt4ProFileNode*,bool)));
connect(pro, SIGNAL(proFileInvalidated(Qt4ProjectManager::Qt4ProFileNode *)),
this, SLOT(proFileInvalidated(Qt4ProjectManager::Qt4ProFileNode *)));
connect(pro, SIGNAL(proFileUpdated(Qt4ProjectManager::Qt4ProFileNode*,bool,bool)),
this, SLOT(proFileUpdate(Qt4ProjectManager::Qt4ProFileNode*,bool,bool)));
}
void S60DeviceRunConfiguration::handleParserState(bool success)
void S60DeviceRunConfiguration::proFileUpdate(Qt4ProjectManager::Qt4ProFileNode *pro, bool success, bool parseInProgress)
{
if (m_proFilePath != pro->path())
return;
bool enabled = isEnabled();
m_validParse = success;
m_parseInProgress = parseInProgress;
if (enabled != isEnabled())
emit isEnabledChanged(!enabled);
}
void S60DeviceRunConfiguration::proFileInvalidated(Qt4ProjectManager::Qt4ProFileNode *pro)
{
if (m_proFilePath != pro->path())
return;
handleParserState(false);
}
void S60DeviceRunConfiguration::proFileUpdate(Qt4ProjectManager::Qt4ProFileNode *pro, bool success)
{
if (m_proFilePath != pro->path())
return;
handleParserState(success);
emit targetInformationChanged();
if (!parseInProgress)
emit targetInformationChanged();
}
S60DeviceRunConfiguration::~S60DeviceRunConfiguration()
......@@ -137,13 +127,15 @@ Qt4SymbianTarget *S60DeviceRunConfiguration::qt4Target() const
bool S60DeviceRunConfiguration::isEnabled() const
{
return m_validParse;
return m_validParse && !m_parseInProgress;
}
QString S60DeviceRunConfiguration::disabledReason() const
{
if (m_parseInProgress)
return tr("The .pro file is currently being parsed.");
if (!m_validParse)
return tr("The .pro file could not be parsed");
return tr("The .pro file could not be parsed.");
return QString();
}
......@@ -181,6 +173,7 @@ bool S60DeviceRunConfiguration::fromMap(const QVariantMap &map)
return false;
m_validParse = qt4Target()->qt4Project()->validParse(m_proFilePath);
m_parseInProgress = qt4Target()->qt4Project()->parseInProgress(m_proFilePath);
setDefaultDisplayName(tr("%1 on Symbian Device").arg(QFileInfo(m_proFilePath).completeBaseName()));
......
......@@ -94,18 +94,17 @@ protected:
virtual bool fromMap(const QVariantMap &map);
private slots:
void proFileInvalidated(Qt4ProjectManager::Qt4ProFileNode *pro);
void proFileUpdate(Qt4ProjectManager::Qt4ProFileNode *pro, bool success);
void proFileUpdate(Qt4ProjectManager::Qt4ProFileNode *pro, bool success, bool parseInProgress);
private:
void ctor();
void handleParserState(bool success);
Internal::Qt4SymbianTarget *qt4Target() const;
Internal::SymbianQtVersion *qtVersion() const;
QString m_proFilePath;
QString m_commandLineArguments;
bool m_validParse;
bool m_parseInProgress;
};
class S60DeviceRunConfigurationFactory : public ProjectExplorer::IRunConfigurationFactory
......
......@@ -56,6 +56,18 @@ S60DeviceRunConfigurationWidget::S60DeviceRunConfigurationWidget(
m_detailsWidget->setState(Utils::DetailsWidget::NoSummary);
QVBoxLayout *mainBoxLayout = new QVBoxLayout();
mainBoxLayout->setMargin(0);
QHBoxLayout *hl = new QHBoxLayout();
hl->addStretch();
m_disabledIcon = new QLabel(this);
m_disabledIcon->setPixmap(QPixmap(QString::fromUtf8(":/projectexplorer/images/compile_warning.png")));
hl->addWidget(m_disabledIcon);
m_disabledReason = new QLabel(this);
m_disabledReason->setVisible(false);
hl->addWidget(m_disabledReason);
hl->addStretch();
mainBoxLayout->addLayout(hl);
setLayout(mainBoxLayout);
mainBoxLayout->addWidget(m_detailsWidget);
QWidget *detailsContainer = new QWidget;
......@@ -93,7 +105,7 @@ S60DeviceRunConfigurationWidget::S60DeviceRunConfigurationWidget(
connect(m_debuggerLanguageChooser, SIGNAL(qmlDebugServerPortChanged(uint)),
this, SLOT(qmlDebugServerPortChanged(uint)));
setEnabled(m_runConfiguration->isEnabled());
runConfigurationEnabledChange(m_runConfiguration->isEnabled());
}
void S60DeviceRunConfigurationWidget::argumentsEdited(const QString &text)
......@@ -103,7 +115,10 @@ void S60DeviceRunConfigurationWidget::argumentsEdited(const QString &text)
void S60DeviceRunConfigurationWidget::runConfigurationEnabledChange(bool enabled)
{
setEnabled(enabled);
m_detailsWidget->setEnabled(enabled);
m_disabledIcon->setVisible(!enabled);
m_disabledReason->setVisible(!enabled);
m_disabledReason->setText(m_runConfiguration->disabledReason());
}
void S60DeviceRunConfigurationWidget::useCppDebuggerToggled(bool enabled)
......
......@@ -34,6 +34,7 @@
#define S60DEVICERUNCONFIGURATIONWIDGET_H
#include <QtGui/QWidget>
#include <QtGui/QLabel>
QT_BEGIN_NAMESPACE
class QLineEdit;
......@@ -65,6 +66,8 @@ private slots:
private:
S60DeviceRunConfiguration *m_runConfiguration;
QLabel *m_disabledIcon;
QLabel *m_disabledReason;
Utils::DetailsWidget *m_detailsWidget;
Utils::DebuggerLanguageChooser *m_debuggerLanguageChooser;
QLineEdit *m_argumentsLineEdit;
......
......@@ -73,7 +73,8 @@ QString pathFromId(const QString &id)
S60EmulatorRunConfiguration::S60EmulatorRunConfiguration(Qt4BaseTarget *parent, const QString &proFilePath) :
RunConfiguration(parent, QLatin1String(S60_EMULATOR_RC_ID)),
m_proFilePath(proFilePath),
m_validParse(parent->qt4Project()->validParse(proFilePath))
m_validParse(parent->qt4Project()->validParse(proFilePath)),
m_parseInProgress(parent->qt4Project()->parseInProgress(proFilePath))
{
ctor();
}
......@@ -81,7 +82,8 @@ S60EmulatorRunConfiguration::S60EmulatorRunConfiguration(Qt4BaseTarget *parent,
S60EmulatorRunConfiguration::S60EmulatorRunConfiguration(Qt4BaseTarget *parent, S60EmulatorRunConfiguration *source) :
RunConfiguration(parent, source),
m_proFilePath(source->m_proFilePath),
m_validParse(source->m_validParse)
m_validParse(source->m_validParse),
m_parseInProgress(source->m_parseInProgress)
{
ctor();
}
......@@ -95,10 +97,8 @@ void S60EmulatorRunConfiguration::ctor()
//: S60 emulator run configuration default display name (no pro-file name)
setDefaultDisplayName(tr("Run on Symbian Emulator"));
Qt4Project *pro = qt4Target()->qt4Project();
connect(pro, SIGNAL(proFileUpdated(Qt4ProjectManager::Qt4ProFileNode*,bool)),
this, SLOT(proFileUpdate(Qt4ProjectManager::Qt4ProFileNode*,bool)));
connect(pro, SIGNAL(proFileInvalidated(Qt4ProjectManager::Qt4ProFileNode *)),
this, SLOT(proFileInvalidated(Qt4ProjectManager::Qt4ProFileNode *)));
connect(pro, SIGNAL(proFileUpdated(Qt4ProjectManager::Qt4ProFileNode*,bool,bool)),
this, SLOT(proFileUpdate(Qt4ProjectManager::Qt4ProFileNode*,bool,bool)));
}
......@@ -106,28 +106,18 @@ S60EmulatorRunConfiguration::~S60EmulatorRunConfiguration()
{
}
void S60EmulatorRunConfiguration::handleParserState(bool success)
void S60EmulatorRunConfiguration::proFileUpdate(Qt4ProjectManager::Qt4ProFileNode *pro, bool success, bool parseInProgress)
{
if (m_proFilePath != pro->path())
return;
bool enabled = isEnabled();
m_validParse = success;
m_parseInProgress = parseInProgress;
if (enabled != isEnabled()) {
emit isEnabledChanged(!enabled);
}
}
void S60EmulatorRunConfiguration::proFileInvalidated(Qt4ProjectManager::Qt4ProFileNode *pro)
{
if (m_proFilePath != pro->path())
return;
handleParserState(false);
}
void S60EmulatorRunConfiguration::proFileUpdate(Qt4ProjectManager::Qt4ProFileNode *pro, bool success)
{
if (m_proFilePath != pro->path())
return;
handleParserState(success);
emit targetInformationChanged();
if (parseInProgress)
emit targetInformationChanged();
}
Qt4SymbianTarget *S60EmulatorRunConfiguration::qt4Target() const
......@@ -137,13 +127,15 @@ Qt4SymbianTarget *S60EmulatorRunConfiguration::qt4Target() const
bool S60EmulatorRunConfiguration::isEnabled() const
{
return m_validParse;
return m_validParse && !m_parseInProgress;
}
QString S60EmulatorRunConfiguration::disabledReason() const
{
if (m_parseInProgress)
return tr("The .pro file is currently being parsed.");
if (!m_validParse)
return tr("The .pro file could not be parsed");
return tr("The .pro file could not be parsed.");
return QString();
}
......@@ -174,6 +166,7 @@ bool S60EmulatorRunConfiguration::fromMap(const QVariantMap &map)
return false;
m_validParse = qt4Target()->qt4Project()->validParse(m_proFilePath);
m_parseInProgress = qt4Target()->qt4Project()->parseInProgress(m_proFilePath);
//: S60 emulator run configuration default display name, %1 is base pro-File name
setDefaultDisplayName(tr("%1 in Symbian Emulator").arg(QFileInfo(m_proFilePath).completeBaseName()));
......@@ -217,6 +210,18 @@ S60EmulatorRunConfigurationWidget::S60EmulatorRunConfigurationWidget(S60Emulator
m_detailsWidget->setState(Utils::DetailsWidget::NoSummary);
QVBoxLayout *mainBoxLayout = new QVBoxLayout();
mainBoxLayout->setMargin(0);
QHBoxLayout *hl = new QHBoxLayout();
hl->addStretch();
m_disabledIcon = new QLabel(this);
m_disabledIcon->setPixmap(QPixmap(QString::fromUtf8(":/projectexplorer/images/compile_warning.png")));
hl->addWidget(m_disabledIcon);
m_disabledReason = new QLabel(this);
m_disabledReason->setVisible(false);
hl->addWidget(m_disabledReason);
hl->addStretch();
mainBoxLayout->addLayout(hl);
setLayout(mainBoxLayout);
mainBoxLayout->addWidget(m_detailsWidget);
QWidget *detailsContainer = new QWidget;
......@@ -234,7 +239,7 @@ S60EmulatorRunConfigurationWidget::S60EmulatorRunConfigurationWidget(S60Emulator
connect(m_runConfiguration, SIGNAL(isEnabledChanged(bool)),
this, SLOT(runConfigurationEnabledChange(bool)));
setEnabled(m_runConfiguration->isEnabled());
runConfigurationEnabledChange(m_runConfiguration->isEnabled());
}
void S60EmulatorRunConfigurationWidget::updateTargetInformation()
......@@ -244,7 +249,10 @@ void S60EmulatorRunConfigurationWidget::updateTargetInformation()
void S60EmulatorRunConfigurationWidget::runConfigurationEnabledChange(bool enabled)
{
setEnabled(enabled);
m_detailsWidget->setEnabled(enabled);
m_disabledIcon->setVisible(!enabled);
m_disabledReason->setVisible(!enabled);
m_disabledReason->setText(m_runConfiguration->disabledReason());
}
// ======== S60EmulatorRunConfigurationFactory
......
......@@ -84,8 +84,7 @@ signals:
void targetInformationChanged();
private slots:
void proFileUpdate(Qt4ProjectManager::Qt4ProFileNode *pro, bool success);
void proFileInvalidated(Qt4ProjectManager::Qt4ProFileNode *pro);
void proFileUpdate(Qt4ProjectManager::Qt4ProFileNode *pro, bool success, bool parseInProgress);
protected:
S60EmulatorRunConfiguration(Qt4ProjectManager::Qt4BaseTarget *parent, S60EmulatorRunConfiguration *source);
......@@ -93,11 +92,11 @@ protected:
private:
void ctor();
void handleParserState(bool success);
void updateTarget();
QString m_proFilePath;
bool m_validParse;
bool m_parseInProgress;
};
class S60EmulatorRunConfigurationWidget : public QWidget
......@@ -113,6 +112,8 @@ private slots:
private:
S60EmulatorRunConfiguration *m_runConfiguration;
QLabel *m_disabledIcon;
QLabel *m_disabledReason;
Utils::DetailsWidget *m_detailsWidget;
QLabel *m_executableLabel;
};
......
......@@ -1374,6 +1374,7 @@ Qt4ProFileNode::Qt4ProFileNode(Qt4Project *project,
: Qt4PriFileNode(project, this, filePath),
m_projectType(InvalidProject),
m_validParse(false),
m_parseInProgress(false),
m_readerExact(0),
m_readerCumulative(0)
{
......@@ -1447,7 +1448,7 @@ void Qt4ProFileNode::emitProFileUpdated()
{
foreach (ProjectExplorer::NodesWatcher *watcher, watchers())
if (Internal::Qt4NodesWatcher *qt4Watcher = qobject_cast<Internal::Qt4NodesWatcher*>(watcher))
emit qt4Watcher->proFileUpdated(this, m_validParse);
emit qt4Watcher->proFileUpdated(this, m_validParse, m_parseInProgress);
foreach (ProjectNode *subNode, subProjectNodes()) {
if (Qt4ProFileNode *node = qobject_cast<Qt4ProFileNode *>(subNode)) {
......@@ -1456,30 +1457,20 @@ void Qt4ProFileNode::emitProFileUpdated()
}
}
void Qt4ProFileNode::emitProFileInvalidated()
bool Qt4ProFileNode::validParse() const
{
foreach (ProjectExplorer::NodesWatcher *watcher, watchers())
if (Internal::Qt4NodesWatcher *qt4Watcher = qobject_cast<Internal::Qt4NodesWatcher*>(watcher))
emit qt4Watcher->proFileInvalidated(this);
foreach (ProjectNode *subNode, subProjectNodes()) {
if (Qt4ProFileNode *node = qobject_cast<Qt4ProFileNode *>(subNode)) {
node->emitProFileInvalidated();
}
}
return m_validParse;
}
bool Qt4ProFileNode::validParse() const
bool Qt4ProFileNode::parseInProgress() const
{
return m_validParse;
return m_parseInProgress;
}