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
Marco Bubke
flatpak-qt-creator
Commits
c09c5ec9
Commit
c09c5ec9
authored
Nov 02, 2010
by
dt
Browse files
Qt4ProjectManager: Emit correct state once on restoring
parent
fe4549f7
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/plugins/qt4projectmanager/qt4nodes.cpp
View file @
c09c5ec9
...
...
@@ -1308,6 +1308,20 @@ QStringList Qt4ProFileNode::variableValue(const Qt4Variable var) const
return
m_varValues
.
value
(
var
);
}
void
Qt4ProFileNode
::
emitProFileUpdated
()
{
foreach
(
NodesWatcher
*
watcher
,
watchers
())
if
(
Qt4NodesWatcher
*
qt4Watcher
=
qobject_cast
<
Qt4NodesWatcher
*>
(
watcher
))
emit
qt4Watcher
->
proFileUpdated
(
this
,
m_validParse
);
foreach
(
ProjectNode
*
subNode
,
subProjectNodes
())
{
if
(
Qt4ProFileNode
*
node
=
qobject_cast
<
Qt4ProFileNode
*>
(
subNode
))
{
node
->
emitProFileUpdated
();
}
}
}
void
Qt4ProFileNode
::
emitProFileInvalidated
()
{
foreach
(
NodesWatcher
*
watcher
,
watchers
())
...
...
src/plugins/qt4projectmanager/qt4nodes.h
View file @
c09c5ec9
...
...
@@ -299,6 +299,7 @@ public:
void
scheduleUpdate
();
void
emitProFileInvalidated
();
void
emitProFileUpdated
();
bool
validParse
()
const
;
...
...
src/plugins/qt4projectmanager/qt4project.cpp
View file @
c09c5ec9
...
...
@@ -331,12 +331,6 @@ bool Qt4Project::fromMap(const QVariantMap &map)
setSupportedTargetIds
(
QtVersionManager
::
instance
()
->
supportedTargetIds
());
// Setup Qt versions supported (== possible targets).
connect
(
this
,
SIGNAL
(
addedTarget
(
ProjectExplorer
::
Target
*
)),
this
,
SLOT
(
onAddedTarget
(
ProjectExplorer
::
Target
*
)));
connect
(
QtVersionManager
::
instance
(),
SIGNAL
(
qtVersionsChanged
(
QList
<
int
>
)),
this
,
SLOT
(
qtVersionsChanged
()));
connect
(
m_nodesWatcher
,
SIGNAL
(
proFileUpdated
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
,
bool
)),
this
,
SIGNAL
(
proFileUpdated
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
,
bool
)));
...
...
@@ -344,6 +338,17 @@ bool Qt4Project::fromMap(const QVariantMap &map)
connect
(
m_nodesWatcher
,
SIGNAL
(
proFileInvalidated
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
)),
this
,
SIGNAL
(
proFileInvalidated
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
)));
// Now we emit update once :)
m_rootProjectNode
->
emitProFileUpdated
();
// Setup Qt versions supported (== possible targets).
connect
(
this
,
SIGNAL
(
addedTarget
(
ProjectExplorer
::
Target
*
)),
this
,
SLOT
(
onAddedTarget
(
ProjectExplorer
::
Target
*
)));
connect
(
QtVersionManager
::
instance
(),
SIGNAL
(
qtVersionsChanged
(
QList
<
int
>
)),
this
,
SLOT
(
qtVersionsChanged
()));
connect
(
this
,
SIGNAL
(
activeTargetChanged
(
ProjectExplorer
::
Target
*
)),
this
,
SLOT
(
activeTargetWasChanged
()));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment