Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
45dd1ad7
Commit
45dd1ad7
authored
Oct 27, 2010
by
dt
Browse files
Disable Run Configurations while parsing .pro files
Initial patch and idea by hunger. Reviewed-By: hunger
parent
6fe7c441
Changes
18
Hide whitespace changes
Inline
Side-by-side
src/plugins/qt4projectmanager/qt-maemo/maemodeployables.cpp
View file @
45dd1ad7
...
...
@@ -67,9 +67,12 @@ MaemoDeployables::~MaemoDeployables() {}
void
MaemoDeployables
::
init
()
{
connect
(
qt4BuildConfiguration
()
->
qt4Target
()
->
qt4Project
(),
SIGNAL
(
proFileUpdated
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
)),
m_updateTimer
,
SLOT
(
start
()));
Qt4Project
*
pro
=
qt4BuildConfiguration
()
->
qt4Target
()
->
qt4Project
();
connect
(
pro
,
SIGNAL
(
proFileUpdated
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
,
bool
)),
m_updateTimer
,
SLOT
(
start
()));
// TODO do we want to disable the view
createModels
();
}
...
...
@@ -85,7 +88,7 @@ void MaemoDeployables::createModels()
return
;
m_updateTimer
->
stop
();
disconnect
(
qt4BuildConfiguration
()
->
qt4Target
()
->
qt4Project
(),
SIGNAL
(
proFileUpdated
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
)),
SIGNAL
(
proFileUpdated
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
,
bool
)),
m_updateTimer
,
SLOT
(
start
()));
beginResetModel
();
qDeleteAll
(
m_listModels
);
...
...
@@ -116,9 +119,8 @@ void MaemoDeployables::createModels()
}
endResetModel
();
connect
(
qt4BuildConfiguration
()
->
qt4Target
()
->
qt4Project
(),
SIGNAL
(
proFileUpdated
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
)),
m_updateTimer
,
SLOT
(
start
()));
connect
(
pro
,
SIGNAL
(
proFileUpdated
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
,
bool
)),
m_updateTimer
,
SLOT
(
start
()));
}
void
MaemoDeployables
::
createModels
(
const
Qt4ProFileNode
*
proFileNode
)
...
...
src/plugins/qt4projectmanager/qt-maemo/maemorunconfiguration.cpp
View file @
45dd1ad7
...
...
@@ -67,6 +67,7 @@ MaemoRunConfiguration::MaemoRunConfiguration(Qt4Target *parent,
,
m_proFilePath
(
proFilePath
)
,
m_useRemoteGdb
(
DefaultUseRemoteGdbValue
)
,
m_baseEnvironmentBase
(
SystemEnvironmentBase
)
,
m_validParse
(
parent
->
qt4Project
()
->
validParse
(
m_proFilePath
))
{
init
();
}
...
...
@@ -81,6 +82,7 @@ MaemoRunConfiguration::MaemoRunConfiguration(Qt4Target *parent,
,
m_baseEnvironmentBase
(
source
->
m_baseEnvironmentBase
)
,
m_systemEnvironment
(
source
->
m_systemEnvironment
)
,
m_userEnvironmentChanges
(
source
->
m_userEnvironmentChanges
)
,
m_validParse
(
source
->
m_validParse
)
{
init
();
}
...
...
@@ -97,9 +99,11 @@ void MaemoRunConfiguration::init()
this
,
SLOT
(
handleDeployConfigChanged
()));
handleDeployConfigChanged
();
connect
(
qt4Target
()
->
qt4Project
(),
SIGNAL
(
proFileUpdated
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
)),
this
,
SLOT
(
proFileUpdate
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
)));
Qt4Project
*
pro
=
qt4Target
()
->
qt4Project
();
connect
(
pro
,
SIGNAL
(
proFileUpdated
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
,
bool
)),
this
,
SLOT
(
proFileUpdate
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
,
bool
)));
connect
(
pro
,
SIGNAL
(
profFileInvalidated
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
)),
this
,
SLOT
(
proFileInvalidated
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
)));
}
MaemoRunConfiguration
::~
MaemoRunConfiguration
()
...
...
@@ -118,6 +122,8 @@ Qt4BuildConfiguration *MaemoRunConfiguration::activeQt4BuildConfiguration() cons
bool
MaemoRunConfiguration
::
isEnabled
(
ProjectExplorer
::
BuildConfiguration
*
config
)
const
{
if
(
!
m_validParse
)
return
false
;
Qt4BuildConfiguration
*
qt4bc
=
qobject_cast
<
Qt4BuildConfiguration
*>
(
config
);
QTC_ASSERT
(
qt4bc
,
return
false
);
ToolChain
::
ToolChainType
type
=
qt4bc
->
toolChainType
();
...
...
@@ -134,10 +140,30 @@ ProjectExplorer::OutputFormatter *MaemoRunConfiguration::createOutputFormatter()
return
new
QtOutputFormatter
(
qt4Target
()
->
qt4Project
());
}
void
MaemoRunConfiguration
::
proFileUpdate
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
pro
)
void
MaemoRunConfiguration
::
handleParseState
(
bool
success
)
{
bool
enabled
=
isEnabled
();
m_validParse
=
success
;
if
(
enabled
!=
isEnabled
())
{
qDebug
()
<<
"Emitting isEnabledChanged()"
<<!
enabled
;
emit
isEnabledChanged
(
!
enabled
);
}
}
void
MaemoRunConfiguration
::
proFileInvalidated
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
pro
)
{
if
(
m_proFilePath
==
pro
->
path
())
if
(
m_proFilePath
!=
pro
->
path
())
return
;
qDebug
()
<<
"proFileInvalidated"
;
handleParseState
(
false
);
}
void
MaemoRunConfiguration
::
proFileUpdate
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
pro
,
bool
success
)
{
if
(
m_proFilePath
==
pro
->
path
())
{
handleParseState
(
success
);
emit
targetInformationChanged
();
}
}
QVariantMap
MaemoRunConfiguration
::
toMap
()
const
...
...
src/plugins/qt4projectmanager/qt-maemo/maemorunconfiguration.h
View file @
45dd1ad7
...
...
@@ -76,6 +76,7 @@ public:
MaemoRunConfiguration
(
Qt4Target
*
parent
,
const
QString
&
proFilePath
);
virtual
~
MaemoRunConfiguration
();
using
ProjectExplorer
::
RunConfiguration
::
isEnabled
;
bool
isEnabled
(
ProjectExplorer
::
BuildConfiguration
*
config
)
const
;
QWidget
*
createConfigurationWidget
();
ProjectExplorer
::
OutputFormatter
*
createOutputFormatter
()
const
;
...
...
@@ -135,14 +136,15 @@ protected:
QString
defaultDisplayName
();
private
slots
:
void
proFileUpdate
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
pro
);
void
proFileUpdate
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
pro
,
bool
success
);
void
proFileInvalidated
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
pro
);
void
updateDeviceConfigurations
();
void
handleDeployConfigChanged
();
private:
void
init
();
void
handleParseState
(
bool
success
);
private:
QString
m_proFilePath
;
mutable
QString
m_gdbPath
;
MaemoRemoteMountsModel
*
m_remoteMounts
;
...
...
@@ -152,6 +154,7 @@ private:
BaseEnvironmentBase
m_baseEnvironmentBase
;
Utils
::
Environment
m_systemEnvironment
;
QList
<
Utils
::
EnvironmentItem
>
m_userEnvironmentChanges
;
bool
m_validParse
;
};
}
// namespace Internal
...
...
src/plugins/qt4projectmanager/qt-maemo/maemorunconfigurationwidget.cpp
View file @
45dd1ad7
...
...
@@ -96,9 +96,18 @@ MaemoRunConfigurationWidget::MaemoRunConfigurationWidget(
connect
(
m_runConfiguration
->
qt4Target
(),
SIGNAL
(
activeBuildConfigurationChanged
(
ProjectExplorer
::
BuildConfiguration
*
)),
this
,
SLOT
(
handleBuildConfigChanged
()));
connect
(
m_runConfiguration
,
SIGNAL
(
isEnabledChanged
(
bool
)),
this
,
SLOT
(
runConfigurationEnabledChange
(
bool
)));
handleBuildConfigChanged
();
}
void
MaemoRunConfigurationWidget
::
runConfigurationEnabledChange
(
bool
enabled
)
{
setEnabled
(
enabled
);
}
void
MaemoRunConfigurationWidget
::
addGenericWidgets
(
QVBoxLayout
*
mainLayout
)
{
QFormLayout
*
formLayout
=
new
QFormLayout
;
...
...
src/plugins/qt4projectmanager/qt-maemo/maemorunconfigurationwidget.h
View file @
45dd1ad7
...
...
@@ -71,9 +71,10 @@ class MaemoRunConfigurationWidget : public QWidget
Q_OBJECT
public:
explicit
MaemoRunConfigurationWidget
(
MaemoRunConfiguration
*
runConfiguration
,
QWidget
*
parent
=
0
);
QWidget
*
parent
=
0
);
private
slots
:
void
runConfigurationEnabledChange
(
bool
enabled
);
void
argumentsEdited
(
const
QString
&
args
);
void
showSettingsDialog
(
const
QString
&
link
);
void
updateTargetInformation
();
...
...
src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.cpp
View file @
45dd1ad7
...
...
@@ -110,6 +110,10 @@ S60DeployConfiguration::S60DeployConfiguration(Target *target, S60DeployConfigur
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::Internal::Qt4ProFileNode*)),
// this, SLOT(targetInformationInvalidated()));
connect
(
qt4Target
()
->
qt4Project
(),
SIGNAL
(
proFileUpdated
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
)),
this
,
SIGNAL
(
targetInformationChanged
()));
connect
(
qt4Target
(),
SIGNAL
(
activeBuildConfigurationChanged
(
ProjectExplorer
::
BuildConfiguration
*
)),
...
...
src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp
View file @
45dd1ad7
...
...
@@ -107,17 +107,19 @@ QString pathToId(const QString &path)
// ======== S60DeviceRunConfiguration
S60DeviceRunConfiguration
::
S60DeviceRunConfiguration
(
Target
*
parent
,
const
QString
&
proFilePath
)
:
S60DeviceRunConfiguration
::
S60DeviceRunConfiguration
(
Qt4
Target
*
parent
,
const
QString
&
proFilePath
)
:
RunConfiguration
(
parent
,
QLatin1String
(
S60_DEVICE_RC_ID
)),
m_proFilePath
(
proFilePath
)
m_proFilePath
(
proFilePath
),
m_validParse
(
parent
->
qt4Project
()
->
validParse
(
proFilePath
))
{
ctor
();
}
S60DeviceRunConfiguration
::
S60DeviceRunConfiguration
(
Target
*
target
,
S60DeviceRunConfiguration
*
source
)
:
S60DeviceRunConfiguration
::
S60DeviceRunConfiguration
(
Qt4
Target
*
target
,
S60DeviceRunConfiguration
*
source
)
:
RunConfiguration
(
target
,
source
),
m_proFilePath
(
source
->
m_proFilePath
),
m_commandLineArguments
(
source
->
m_commandLineArguments
)
m_commandLineArguments
(
source
->
m_commandLineArguments
),
m_validParse
(
source
->
m_validParse
)
{
ctor
();
}
...
...
@@ -130,12 +132,35 @@ void S60DeviceRunConfiguration::ctor()
else
//: S60 device runconfiguration default display name (no profile set)
setDefaultDisplayName
(
tr
(
"Run on Symbian device"
));
Qt4Project
*
pro
=
qt4Target
()
->
qt4Project
();
connect
(
pro
,
SIGNAL
(
proFileUpdated
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
,
bool
)),
this
,
SLOT
(
proFileUpdate
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
,
bool
)));
connect
(
pro
,
SIGNAL
(
proFileInvalidated
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
)),
this
,
SLOT
(
proFileInvalidated
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
)));
}
void
S60DeviceRunConfiguration
::
handleParserState
(
bool
success
)
{
bool
enabled
=
isEnabled
();
m_validParse
=
success
;
if
(
enabled
!=
isEnabled
())
emit
isEnabledChanged
(
!
enabled
);
}
void
S60DeviceRunConfiguration
::
proFileInvalidated
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
pro
)
{
if
(
m_proFilePath
!=
pro
->
path
())
return
;
handleParserState
(
false
);
}
void
S60DeviceRunConfiguration
::
proFileUpdate
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
pro
)
void
S60DeviceRunConfiguration
::
proFileUpdate
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
pro
,
bool
success
)
{
if
(
m_proFilePath
==
pro
->
path
())
emit
targetInformationChanged
();
if
(
m_proFilePath
!=
pro
->
path
())
return
;
handleParserState
(
success
);
emit
targetInformationChanged
();
}
S60DeviceRunConfiguration
::~
S60DeviceRunConfiguration
()
...
...
@@ -164,6 +189,8 @@ ProjectExplorer::ToolChain::ToolChainType S60DeviceRunConfiguration::toolChainTy
bool
S60DeviceRunConfiguration
::
isEnabled
(
ProjectExplorer
::
BuildConfiguration
*
configuration
)
const
{
if
(
!
m_validParse
)
return
false
;
const
Qt4BuildConfiguration
*
qt4bc
=
static_cast
<
const
Qt4BuildConfiguration
*>
(
configuration
);
switch
(
qt4bc
->
toolChainType
())
{
case
ToolChain
::
GCCE
:
...
...
src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.h
View file @
45dd1ad7
...
...
@@ -69,12 +69,13 @@ class S60DeviceRunConfiguration : public ProjectExplorer::RunConfiguration
friend
class
S60DeviceRunConfigurationFactory
;
public:
S60DeviceRunConfiguration
(
Project
Explorer
::
Target
*
parent
,
const
QString
&
proFilePath
);
S60DeviceRunConfiguration
(
Qt4
Project
Manager
::
Internal
::
Qt4
Target
*
parent
,
const
QString
&
proFilePath
);
virtual
~
S60DeviceRunConfiguration
();
Qt4Target
*
qt4Target
()
const
;
const
QtVersion
*
qtVersion
()
const
;
using
ProjectExplorer
::
RunConfiguration
::
isEnabled
;
bool
isEnabled
(
ProjectExplorer
::
BuildConfiguration
*
configuration
)
const
;
QWidget
*
createConfigurationWidget
();
...
...
@@ -97,22 +98,26 @@ public:
QVariantMap
toMap
()
const
;
void
proFileUpdate
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
pro
);
signals:
void
targetInformationChanged
();
protected:
S60DeviceRunConfiguration
(
Project
Explorer
::
Target
*
parent
,
S60DeviceRunConfiguration
*
source
);
S60DeviceRunConfiguration
(
Qt4
Project
Manager
::
Internal
::
Qt4
Target
*
parent
,
S60DeviceRunConfiguration
*
source
);
QString
defaultDisplayName
()
const
;
virtual
bool
fromMap
(
const
QVariantMap
&
map
);
private
slots
:
void
proFileInvalidated
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
pro
);
void
proFileUpdate
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
pro
,
bool
success
);
private:
ProjectExplorer
::
ToolChain
::
ToolChainType
toolChainType
(
ProjectExplorer
::
BuildConfiguration
*
configuration
)
const
;
void
ctor
();
void
handleParserState
(
bool
sucess
);
QString
m_proFilePath
;
QStringList
m_commandLineArguments
;
bool
m_validParse
;
};
class
S60DeviceRunConfigurationFactory
:
public
ProjectExplorer
::
IRunConfigurationFactory
...
...
src/plugins/qt4projectmanager/qt-s60/s60devicerunconfigurationwidget.cpp
View file @
45dd1ad7
...
...
@@ -73,6 +73,9 @@ S60DeviceRunConfigurationWidget::S60DeviceRunConfigurationWidget(
connect
(
m_argumentsLineEdit
,
SIGNAL
(
textEdited
(
QString
)),
this
,
SLOT
(
argumentsEdited
(
QString
)));
connect
(
m_runConfiguration
,
SIGNAL
(
isEnabledChanged
(
bool
)),
this
,
SLOT
(
runConfigurationEnabledChange
(
bool
)));
}
void
S60DeviceRunConfigurationWidget
::
argumentsEdited
(
const
QString
&
text
)
...
...
@@ -86,5 +89,10 @@ void S60DeviceRunConfigurationWidget::argumentsEdited(const QString &text)
}
}
void
S60DeviceRunConfigurationWidget
::
runConfigurationEnabledChange
(
bool
enabled
)
{
setEnabled
(
enabled
);
}
}
// namespace Internal
}
// namespace Qt4ProjectManager
src/plugins/qt4projectmanager/qt-s60/s60devicerunconfigurationwidget.h
View file @
45dd1ad7
...
...
@@ -50,10 +50,10 @@ class S60DeviceRunConfigurationWidget : public QWidget
Q_OBJECT
public:
explicit
S60DeviceRunConfigurationWidget
(
S60DeviceRunConfiguration
*
runConfiguration
,
QWidget
*
parent
=
0
);
QWidget
*
parent
=
0
);
private
slots
:
void
argumentsEdited
(
const
QString
&
text
);
void
runConfigurationEnabledChange
(
bool
enabled
);
private:
S60DeviceRunConfiguration
*
m_runConfiguration
;
...
...
src/plugins/qt4projectmanager/qt-s60/s60emulatorrunconfiguration.cpp
View file @
45dd1ad7
...
...
@@ -78,16 +78,18 @@ QString pathToId(const QString &path)
// ======== S60EmulatorRunConfiguration
S60EmulatorRunConfiguration
::
S60EmulatorRunConfiguration
(
Target
*
parent
,
const
QString
&
proFilePath
)
:
S60EmulatorRunConfiguration
::
S60EmulatorRunConfiguration
(
Qt4
Target
*
parent
,
const
QString
&
proFilePath
)
:
RunConfiguration
(
parent
,
QLatin1String
(
S60_EMULATOR_RC_ID
)),
m_proFilePath
(
proFilePath
)
m_proFilePath
(
proFilePath
),
m_validParse
(
parent
->
qt4Project
()
->
validParse
(
proFilePath
))
{
ctor
();
}
S60EmulatorRunConfiguration
::
S60EmulatorRunConfiguration
(
Target
*
parent
,
S60EmulatorRunConfiguration
*
source
)
:
S60EmulatorRunConfiguration
::
S60EmulatorRunConfiguration
(
Qt4
Target
*
parent
,
S60EmulatorRunConfiguration
*
source
)
:
RunConfiguration
(
parent
,
source
),
m_proFilePath
(
source
->
m_proFilePath
)
m_proFilePath
(
source
->
m_proFilePath
),
m_validParse
(
source
->
m_validParse
)
{
ctor
();
}
...
...
@@ -100,8 +102,11 @@ void S60EmulatorRunConfiguration::ctor()
else
//: S60 emulator run configuration default display name (no pro-file name)
setDefaultDisplayName
(
tr
(
"Run on Symbian Emulator"
));
connect
(
qt4Target
()
->
qt4Project
(),
SIGNAL
(
proFileUpdated
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
)),
this
,
SLOT
(
proFileUpdate
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
)));
Qt4Project
*
pro
=
qt4Target
()
->
qt4Project
();
connect
(
pro
,
SIGNAL
(
proFileUpdated
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
,
bool
)),
this
,
SLOT
(
proFileUpdate
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
,
bool
)));
connect
(
pro
,
SIGNAL
(
proFileInvalidated
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
)),
this
,
SLOT
(
proFileInvalidated
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
)));
}
...
...
@@ -109,10 +114,29 @@ S60EmulatorRunConfiguration::~S60EmulatorRunConfiguration()
{
}
void
S60EmulatorRunConfiguration
::
proFileUpdate
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
pro
)
void
S60EmulatorRunConfiguration
::
handleParserState
(
bool
success
)
{
if
(
m_proFilePath
==
pro
->
path
())
emit
targetInformationChanged
();
bool
enabled
=
isEnabled
();
m_validParse
=
success
;
if
(
enabled
!=
isEnabled
())
{
qDebug
()
<<
"Emitting isEnabledChanged()"
<<!
enabled
;
emit
isEnabledChanged
(
!
enabled
);
}
}
void
S60EmulatorRunConfiguration
::
proFileInvalidated
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
pro
)
{
if
(
m_proFilePath
!=
pro
->
path
())
return
;
handleParserState
(
false
);
}
void
S60EmulatorRunConfiguration
::
proFileUpdate
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
pro
,
bool
success
)
{
if
(
m_proFilePath
!=
pro
->
path
())
return
;
handleParserState
(
success
);
emit
targetInformationChanged
();
}
Qt4Target
*
S60EmulatorRunConfiguration
::
qt4Target
()
const
...
...
@@ -122,6 +146,8 @@ Qt4Target *S60EmulatorRunConfiguration::qt4Target() const
bool
S60EmulatorRunConfiguration
::
isEnabled
(
ProjectExplorer
::
BuildConfiguration
*
configuration
)
const
{
if
(
!
m_validParse
)
return
false
;
Qt4BuildConfiguration
*
qt4bc
=
qobject_cast
<
Qt4BuildConfiguration
*>
(
configuration
);
QTC_ASSERT
(
qt4bc
,
return
false
);
ToolChain
::
ToolChainType
type
=
qt4bc
->
toolChainType
();
...
...
@@ -203,6 +229,9 @@ S60EmulatorRunConfigurationWidget::S60EmulatorRunConfigurationWidget(S60Emulator
connect
(
m_runConfiguration
,
SIGNAL
(
targetInformationChanged
()),
this
,
SLOT
(
updateTargetInformation
()));
connect
(
m_runConfiguration
,
SIGNAL
(
isEnabledChanged
(
bool
)),
this
,
SLOT
(
runConfigurationEnabledChange
(
bool
)));
}
void
S60EmulatorRunConfigurationWidget
::
updateTargetInformation
()
...
...
@@ -210,6 +239,11 @@ void S60EmulatorRunConfigurationWidget::updateTargetInformation()
m_executableLabel
->
setText
(
m_runConfiguration
->
executable
());
}
void
S60EmulatorRunConfigurationWidget
::
runConfigurationEnabledChange
(
bool
enabled
)
{
setEnabled
(
enabled
);
}
// ======== S60EmulatorRunConfigurationFactory
S60EmulatorRunConfigurationFactory
::
S60EmulatorRunConfigurationFactory
(
QObject
*
parent
)
...
...
src/plugins/qt4projectmanager/qt-s60/s60emulatorrunconfiguration.h
View file @
45dd1ad7
...
...
@@ -59,11 +59,12 @@ class S60EmulatorRunConfiguration : public ProjectExplorer::RunConfiguration
friend
class
S60EmulatorRunConfigurationFactory
;
public:
S60EmulatorRunConfiguration
(
Project
Explorer
::
Target
*
parent
,
const
QString
&
proFilePath
);
S60EmulatorRunConfiguration
(
Qt4
Project
Manager
::
Internal
::
Qt4
Target
*
parent
,
const
QString
&
proFilePath
);
virtual
~
S60EmulatorRunConfiguration
();
Qt4Target
*
qt4Target
()
const
;
using
ProjectExplorer
::
RunConfiguration
::
isEnabled
;
bool
isEnabled
(
ProjectExplorer
::
BuildConfiguration
*
configuration
)
const
;
QWidget
*
createConfigurationWidget
();
...
...
@@ -77,17 +78,20 @@ signals:
void
targetInformationChanged
();
private
slots
:
void
proFileUpdate
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
pro
);
void
proFileUpdate
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
pro
,
bool
success
);
void
proFileInvalidated
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
pro
);
protected:
S60EmulatorRunConfiguration
(
Project
Explorer
::
Target
*
parent
,
S60EmulatorRunConfiguration
*
source
);
S60EmulatorRunConfiguration
(
Qt4
Project
Manager
::
Internal
::
Qt4
Target
*
parent
,
S60EmulatorRunConfiguration
*
source
);
virtual
bool
fromMap
(
const
QVariantMap
&
map
);
private:
void
ctor
();
void
handleParserState
(
bool
sucess
);
void
updateTarget
();
QString
m_proFilePath
;
bool
m_validParse
;
};
class
S60EmulatorRunConfigurationWidget
:
public
QWidget
...
...
@@ -99,6 +103,7 @@ public:
private
slots
:
void
updateTargetInformation
();
void
runConfigurationEnabledChange
(
bool
enabled
);
private:
S60EmulatorRunConfiguration
*
m_runConfiguration
;
...
...
src/plugins/qt4projectmanager/qt4nodes.cpp
View file @
45dd1ad7
...
...
@@ -1243,6 +1243,7 @@ Qt4ProFileNode::Qt4ProFileNode(Qt4Project *project,
QObject
*
parent
)
:
Qt4PriFileNode
(
project
,
this
,
filePath
),
m_projectType
(
InvalidProject
),
m_validParse
(
false
),
m_readerExact
(
0
),
m_readerCumulative
(
0
)
{
...
...
@@ -1307,8 +1308,30 @@ QStringList Qt4ProFileNode::variableValue(const Qt4Variable var) const
return
m_varValues
.
value
(
var
);
}
void
Qt4ProFileNode
::
emitProFileInvalidated
()
{
foreach
(
NodesWatcher
*
watcher
,
watchers
())
if
(
Qt4NodesWatcher
*
qt4Watcher
=
qobject_cast
<
Qt4NodesWatcher
*>
(
watcher
))
emit
qt4Watcher
->
proFileInvalidated
(
this
);
foreach
(
ProjectNode
*
subNode
,
subProjectNodes
())
{
if
(
Qt4ProFileNode
*
node
=
qobject_cast
<
Qt4ProFileNode
*>
(
subNode
))
{
node
->
emitProFileInvalidated
();
}
}
}
bool
Qt4ProFileNode
::
validParse
()
const
{
return
m_validParse
;
}
void
Qt4ProFileNode
::
scheduleUpdate
()
{
if
(
m_validParse
)
{
m_validParse
=
false
;
emitProFileInvalidated
();
}
m_project
->
scheduleAsyncUpdate
(
this
);
}
...
...
@@ -1323,6 +1346,13 @@ void Qt4ProFileNode::asyncUpdate()
void
Qt4ProFileNode
::
update
()
{
if
(
m_validParse
)
{
m_validParse
=
false
;
foreach
(
NodesWatcher
*
watcher
,
watchers
())
if
(
Qt4NodesWatcher
*
qt4Watcher
=
qobject_cast
<
Qt4NodesWatcher
*>
(
watcher
))
emit
qt4Watcher
->
proFileInvalidated
(
this
);
}
setupReader
();
bool
parserError
=
evaluate
();
applyEvaluate
(
!
parserError
,
false
);
...
...
@@ -1405,6 +1435,9 @@ void Qt4ProFileNode::applyEvaluate(bool parseResult, bool async)
m_project
->
proFileParseError
(
tr
(
"Error while parsing file %1. Giving up."
).
arg
(
m_projectFilePath
));
invalidate
();
}
foreach
(
NodesWatcher
*
watcher
,
watchers
())
if
(
Qt4NodesWatcher
*
qt4Watcher
=
qobject_cast
<
Qt4NodesWatcher
*>
(
watcher
))
emit
qt4Watcher
->
proFileUpdated
(
this
,
false
);
return
;
}
...
...
@@ -1634,9 +1667,11 @@ void Qt4ProFileNode::applyEvaluate(bool parseResult, bool async)
createUiCodeModelSupport
();
updateUiFiles
();
m_validParse
=
true
;
foreach
(
NodesWatcher
*
watcher
,
watchers
())
if
(
Qt4NodesWatcher
*
qt4Watcher
=
qobject_cast
<
Qt4NodesWatcher
*>
(
watcher
))
emit
qt4Watcher
->
proFileUpdated
(
this
);
emit
qt4Watcher
->
proFileUpdated
(
this
,
parseResult
);
m_project
->
destroyProFileReader
(
m_readerExact
);
if
(
m_readerCumulative
)
...
...
src/plugins/qt4projectmanager/qt4nodes.h
View file @
45dd1ad7
...
...
@@ -298,6 +298,10 @@ public:
void
update
();
void
scheduleUpdate
();
void
emitProFileInvalidated
();
bool
validParse
()
const
;
public
slots
:
void
asyncUpdate
();
...
...
@@ -335,6 +339,8 @@ private:
InstallsList
m_installsList
;
friend
class
Qt4NodeHierarchy
;
bool
m_validParse
;
// Async stuff
QFutureWatcher
<
bool
>
m_parseFutureWatcher
;
ProFileReader
*
m_readerExact
;
...
...
@@ -357,7 +363,8 @@ signals:
const
QHash
<
Qt4Variable
,
QStringList
>
&
oldValues
,
const
QHash
<
Qt4Variable
,
QStringList
>
&
newValues
);
void
proFileUpdated
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
projectNode
);
void
proFileUpdated
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
projectNode
,
bool
success
);
void
proFileInvalidated
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
projectNode
);
private: