Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
flatpak-qt-creator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marco Bubke
flatpak-qt-creator
Commits
d16e7a30
Commit
d16e7a30
authored
14 years ago
by
Thorbjørn Lindeijer
Browse files
Options
Downloads
Patches
Plain Diff
QmlJSDebugger: Only show the tool box when a debugging client connected
Reviewed-by: Christiaan Janssen
parent
64c32469
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
share/qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver.cpp
+16
-6
16 additions, 6 deletions
.../qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver.cpp
share/qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver_p.h
+3
-0
3 additions, 0 deletions
.../qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver_p.h
with
19 additions
and
6 deletions
share/qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver.cpp
+
16
−
6
View file @
d16e7a30
...
@@ -70,6 +70,7 @@ QDeclarativeViewObserverPrivate::QDeclarativeViewObserverPrivate(QDeclarativeVie
...
@@ -70,6 +70,7 @@ QDeclarativeViewObserverPrivate::QDeclarativeViewObserverPrivate(QDeclarativeVie
executionPaused
(
false
),
executionPaused
(
false
),
slowdownFactor
(
1.0
f
),
slowdownFactor
(
1.0
f
),
toolBar
(
0
),
toolBar
(
0
),
toolBox
(
0
),
settings
(
0
)
settings
(
0
)
{
{
}
}
...
@@ -105,6 +106,10 @@ QDeclarativeViewObserver::QDeclarativeViewObserver(QDeclarativeView *view, QObje
...
@@ -105,6 +106,10 @@ QDeclarativeViewObserver::QDeclarativeViewObserver(QDeclarativeView *view, QObje
data
->
setViewport
(
data
->
view
->
viewport
());
data
->
setViewport
(
data
->
view
->
viewport
());
data
->
debugService
=
QDeclarativeObserverService
::
instance
();
data
->
debugService
=
QDeclarativeObserverService
::
instance
();
connect
(
data
->
debugService
,
SIGNAL
(
debuggingClientChanged
(
bool
)),
data
.
data
(),
SLOT
(
_q_setToolBoxVisible
(
bool
)));
connect
(
data
->
debugService
,
SIGNAL
(
designModeBehaviorChanged
(
bool
)),
connect
(
data
->
debugService
,
SIGNAL
(
designModeBehaviorChanged
(
bool
)),
SLOT
(
setDesignModeBehavior
(
bool
)));
SLOT
(
setDesignModeBehavior
(
bool
)));
connect
(
data
->
debugService
,
SIGNAL
(
showAppOnTopChanged
(
bool
)),
connect
(
data
->
debugService
,
SIGNAL
(
showAppOnTopChanged
(
bool
)),
...
@@ -146,10 +151,6 @@ QDeclarativeViewObserver::QDeclarativeViewObserver(QDeclarativeView *view, QObje
...
@@ -146,10 +151,6 @@ QDeclarativeViewObserver::QDeclarativeViewObserver(QDeclarativeView *view, QObje
connect
(
data
->
subcomponentEditorTool
,
SIGNAL
(
contextPathChanged
(
QStringList
)),
connect
(
data
->
subcomponentEditorTool
,
SIGNAL
(
contextPathChanged
(
QStringList
)),
data
->
debugService
,
SLOT
(
contextPathUpdated
(
QStringList
)));
data
->
debugService
,
SLOT
(
contextPathUpdated
(
QStringList
)));
#if !defined(Q_OS_SYMBIAN) && !defined(Q_WS_MAEMO_5)
data
->
createToolBox
();
#endif
data
->
_q_changeToSingleSelectTool
();
data
->
_q_changeToSingleSelectTool
();
}
}
...
@@ -166,6 +167,16 @@ void QDeclarativeViewObserver::setObserverContext(int contextIndex)
...
@@ -166,6 +167,16 @@ void QDeclarativeViewObserver::setObserverContext(int contextIndex)
}
}
}
}
void
QDeclarativeViewObserverPrivate
::
_q_setToolBoxVisible
(
bool
visible
)
{
#if !defined(Q_OS_SYMBIAN) && !defined(Q_WS_MAEMO_5)
if
(
!
toolBox
&&
visible
)
createToolBox
();
if
(
toolBox
)
toolBox
->
setVisible
(
visible
);
#endif
}
void
QDeclarativeViewObserverPrivate
::
_q_reloadView
()
void
QDeclarativeViewObserverPrivate
::
_q_reloadView
()
{
{
subcomponentEditorTool
->
clear
();
subcomponentEditorTool
->
clear
();
...
@@ -906,14 +917,13 @@ void QDeclarativeViewObserverPrivate::createToolBox()
...
@@ -906,14 +917,13 @@ void QDeclarativeViewObserverPrivate::createToolBox()
verticalLayout
->
setMargin
(
0
);
verticalLayout
->
setMargin
(
0
);
verticalLayout
->
addWidget
(
toolBar
);
verticalLayout
->
addWidget
(
toolBar
);
QWidget
*
toolBox
=
new
QWidget
(
q
->
declarativeView
(),
Qt
::
Tool
);
toolBox
=
new
QWidget
(
q
->
declarativeView
(),
Qt
::
Tool
);
toolBox
->
setWindowFlags
((
toolBox
->
windowFlags
()
&
~
Qt
::
WindowCloseButtonHint
)
toolBox
->
setWindowFlags
((
toolBox
->
windowFlags
()
&
~
Qt
::
WindowCloseButtonHint
)
|
Qt
::
CustomizeWindowHint
);
|
Qt
::
CustomizeWindowHint
);
toolBox
->
setWindowTitle
(
tr
(
"Qt Quick Toolbox"
));
toolBox
->
setWindowTitle
(
tr
(
"Qt Quick Toolbox"
));
toolBox
->
setLayout
(
verticalLayout
);
toolBox
->
setLayout
(
verticalLayout
);
toolBox
->
restoreGeometry
(
settings
->
value
(
QLatin1String
(
KEY_TOOLBOX_GEOMETRY
)).
toByteArray
());
toolBox
->
restoreGeometry
(
settings
->
value
(
QLatin1String
(
KEY_TOOLBOX_GEOMETRY
)).
toByteArray
());
toolBox
->
show
();
}
}
}
//namespace QmlJSDebugger
}
//namespace QmlJSDebugger
This diff is collapsed.
Click to expand it.
share/qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver_p.h
+
3
−
0
View file @
d16e7a30
...
@@ -94,6 +94,7 @@ public:
...
@@ -94,6 +94,7 @@ public:
qreal
slowdownFactor
;
qreal
slowdownFactor
;
QmlToolBar
*
toolBar
;
QmlToolBar
*
toolBar
;
QWidget
*
toolBox
;
QSettings
*
settings
;
QSettings
*
settings
;
void
setViewport
(
QWidget
*
widget
);
void
setViewport
(
QWidget
*
widget
);
...
@@ -127,6 +128,8 @@ public:
...
@@ -127,6 +128,8 @@ public:
void
enterContext
(
QGraphicsItem
*
itemToEnter
);
void
enterContext
(
QGraphicsItem
*
itemToEnter
);
public
slots
:
public
slots
:
void
_q_setToolBoxVisible
(
bool
visible
);
void
_q_reloadView
();
void
_q_reloadView
();
void
_q_onStatusChanged
(
QDeclarativeView
::
Status
status
);
void
_q_onStatusChanged
(
QDeclarativeView
::
Status
status
);
void
_q_onCurrentObjectsChanged
(
QList
<
QObject
*>
objects
);
void
_q_onCurrentObjectsChanged
(
QList
<
QObject
*>
objects
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment