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
308b4629
Commit
308b4629
authored
Jul 29, 2010
by
Lasse Holmstedt
Browse files
QML Inspector: Disable debug actions when qml inspector is disabled
Reviewed-by: Thomas Hartmann
parent
4660ff4a
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/debuggeruiswitcher.cpp
View file @
308b4629
...
...
@@ -153,6 +153,11 @@ DebuggerUISwitcher::~DebuggerUISwitcher()
delete
d
;
}
QStringList
DebuggerUISwitcher
::
supportedLanguages
()
const
{
return
d
->
m_languages
;
}
void
DebuggerUISwitcher
::
addMenuAction
(
Core
::
Command
*
command
,
const
QString
&
langName
,
const
QString
&
group
)
{
...
...
src/plugins/debugger/debuggeruiswitcher.h
View file @
308b4629
...
...
@@ -77,6 +77,8 @@ public:
void
addMenuAction
(
Core
::
Command
*
command
,
const
QString
&
langName
,
const
QString
&
group
=
QString
());
QStringList
supportedLanguages
()
const
;
// Changes the active language UI to the one specified by langName.
// Does nothing if automatic switching is toggled off from settings.
void
setActiveLanguage
(
const
QString
&
langName
);
...
...
src/plugins/qmlprojectmanager/qmlprojectruncontrol.cpp
View file @
308b4629
...
...
@@ -37,7 +37,6 @@
#include
<projectexplorer/projectexplorerconstants.h>
#include
<projectexplorer/applicationlauncher.h>
#include
<utils/qtcassert.h>
#include
<debugger/debuggerconstants.h>
#include
<debugger/debuggerconstants.h>
#include
<debugger/debuggeruiswitcher.h>
...
...
@@ -147,8 +146,12 @@ QmlRunControlFactory::~QmlRunControlFactory()
bool
QmlRunControlFactory
::
canRun
(
RunConfiguration
*
runConfiguration
,
const
QString
&
mode
)
const
{
Q_UNUSED
(
mode
);
return
(
qobject_cast
<
QmlProjectRunConfiguration
*>
(
runConfiguration
)
!=
0
);
QmlProjectRunConfiguration
*
config
=
qobject_cast
<
QmlProjectRunConfiguration
*>
(
runConfiguration
);
if
(
mode
==
ProjectExplorer
::
Constants
::
RUNMODE
)
{
return
config
!=
0
;
}
else
{
return
(
config
!=
0
)
&&
Debugger
::
DebuggerUISwitcher
::
instance
()
->
supportedLanguages
().
contains
(
Qml
::
Constants
::
LANG_QML
);
}
}
RunControl
*
QmlRunControlFactory
::
create
(
RunConfiguration
*
runConfiguration
,
...
...
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