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
205268fb
Commit
205268fb
authored
Jan 19, 2011
by
Christian Kandeler
Browse files
Maemo: Fix some qemu button behavior glitches.
parent
c1789f8b
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/qt4projectmanager/qt-maemo/maemoqemumanager.cpp
View file @
205268fb
...
...
@@ -182,8 +182,7 @@ void MaemoQemuManager::qtVersionsChanged(const QList<int> &uniqueIds)
}
}
// make visible only if we have a runtime and a maemo target
m_qemuAction
->
setVisible
(
!
m_runtimes
.
isEmpty
()
&&
sessionHasMaemoTarget
());
showOrHideQemuButton
();
}
void
MaemoQemuManager
::
projectAdded
(
ProjectExplorer
::
Project
*
project
)
...
...
@@ -211,7 +210,7 @@ void MaemoQemuManager::projectRemoved(ProjectExplorer::Project *project)
foreach
(
Target
*
target
,
project
->
targets
())
targetRemoved
(
target
);
m_qemuAction
->
setVisible
(
!
m_runtimes
.
isEmpty
()
&&
sessionHasMaemoTarget
()
);
showOrHideQemuButton
(
);
}
void
MaemoQemuManager
::
projectChanged
(
ProjectExplorer
::
Project
*
project
)
...
...
@@ -274,7 +273,7 @@ void MaemoQemuManager::targetRemoved(ProjectExplorer::Target *target)
foreach
(
RunConfiguration
*
rc
,
target
->
runConfigurations
())
toggleDeviceConnections
(
qobject_cast
<
MaemoRunConfiguration
*>
(
rc
),
false
);
m_qemuAction
->
setVisible
(
!
m_runtimes
.
isEmpty
()
&&
sessionHasMaemoTarget
()
);
showOrHideQemuButton
(
);
}
void
MaemoQemuManager
::
targetChanged
(
ProjectExplorer
::
Target
*
target
)
...
...
@@ -518,9 +517,14 @@ void MaemoQemuManager::toggleStarterButton(Target *target)
if
(
m_runningQtId
==
uniqueId
)
isRunning
=
false
;
m_qemuAction
->
setEnabled
(
m_runtimes
.
value
(
uniqueId
,
MaemoQemuRuntime
()).
isValid
()
&&
targetUsesMatchingRuntimeConfig
(
target
)
&&
!
isRunning
);
m_qemuAction
->
setVisible
(
!
m_runtimes
.
isEmpty
()
&&
sessionHasMaemoTarget
());
const
Project
*
const
p
=
ProjectExplorerPlugin
::
instance
()
->
session
()
->
startupProject
();
const
bool
qemuButtonEnabled
=
p
&&
p
->
activeTarget
()
&&
MaemoGlobal
::
isMaemoTargetId
(
p
->
activeTarget
()
->
id
())
&&
m_runtimes
.
value
(
uniqueId
,
MaemoQemuRuntime
()).
isValid
()
&&
targetUsesMatchingRuntimeConfig
(
target
)
&&
!
isRunning
;
m_qemuAction
->
setEnabled
(
qemuButtonEnabled
);
showOrHideQemuButton
();
}
bool
MaemoQemuManager
::
sessionHasMaemoTarget
()
const
...
...
@@ -580,3 +584,11 @@ void MaemoQemuManager::toggleDeviceConnections(MaemoRunConfiguration *mrc,
this
,
SLOT
(
deviceConfigurationChanged
(
ProjectExplorer
::
Target
*
)));
}
}
void
MaemoQemuManager
::
showOrHideQemuButton
()
{
const
bool
showButton
=
!
m_runtimes
.
isEmpty
()
&&
sessionHasMaemoTarget
();
if
(
!
showButton
)
terminateRuntime
();
m_qemuAction
->
setVisible
(
showButton
);
}
src/plugins/qt4projectmanager/qt-maemo/maemoqemumanager.h
View file @
205268fb
...
...
@@ -118,6 +118,7 @@ private:
void
notify
(
const
QList
<
int
>
uniqueIds
);
void
toggleDeviceConnections
(
MaemoRunConfiguration
*
mrc
,
bool
connect
);
void
showOrHideQemuButton
();
private:
QAction
*
m_qemuAction
;
...
...
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