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
4fb517c5
Commit
4fb517c5
authored
14 years ago
by
hjk
Browse files
Options
Downloads
Patches
Plain Diff
qmljsinspector: code cosmetics
parent
d9fa7501
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/qmljsinspector/qmljsclientproxy.cpp
+48
-43
48 additions, 43 deletions
src/plugins/qmljsinspector/qmljsclientproxy.cpp
with
48 additions
and
43 deletions
src/plugins/qmljsinspector/qmljsclientproxy.cpp
+
48
−
43
View file @
4fb517c5
...
...
@@ -67,25 +67,25 @@ bool ClientProxy::connectToViewer(const QString &host, quint16 port)
if
(
m_designClient
)
{
disconnect
(
m_designClient
,
SIGNAL
(
currentObjectsChanged
(
QList
<
int
>
)),
this
,
SLOT
(
onCurrentObjectsChanged
(
QList
<
int
>
)));
disconnect
(
m_designClient
,
SIGNAL
(
colorPickerActivated
()),
this
,
SIGNAL
(
colorPickerActivated
()));
disconnect
(
m_designClient
,
SIGNAL
(
zoomToolActivated
()),
this
,
SIGNAL
(
zoomToolActivated
()));
disconnect
(
m_designClient
,
SIGNAL
(
selectToolActivated
()),
this
,
SIGNAL
(
selectToolActivated
()));
disconnect
(
m_designClient
,
SIGNAL
(
selectMarqueeToolActivated
()),
this
,
SIGNAL
(
selectMarqueeToolActivated
()));
disconnect
(
m_designClient
,
SIGNAL
(
animationSpeedChanged
(
qreal
)),
this
,
SIGNAL
(
animationSpeedChanged
(
qreal
)));
disconnect
(
m_designClient
,
SIGNAL
(
designModeBehaviorChanged
(
bool
)),
this
,
SIGNAL
(
designModeBehaviorChanged
(
bool
)));
disconnect
(
m_designClient
,
SIGNAL
(
selectedColorChanged
(
QColor
)),
this
,
SIGNAL
(
selectedColorChanged
(
QColor
)));
disconnect
(
m_designClient
,
SIGNAL
(
contextPathUpdated
(
QStringList
)),
this
,
SIGNAL
(
contextPathUpdated
(
QStringList
)));
disconnect
(
m_designClient
,
SIGNAL
(
treeRefreshRequested
()),
this
,
SLOT
(
refreshObjectTree
()));
this
,
SLOT
(
onCurrentObjectsChanged
(
QList
<
int
>
)));
disconnect
(
m_designClient
,
SIGNAL
(
colorPickerActivated
()),
this
,
SIGNAL
(
colorPickerActivated
()));
disconnect
(
m_designClient
,
SIGNAL
(
zoomToolActivated
()),
this
,
SIGNAL
(
zoomToolActivated
()));
disconnect
(
m_designClient
,
SIGNAL
(
selectToolActivated
()),
this
,
SIGNAL
(
selectToolActivated
()));
disconnect
(
m_designClient
,
SIGNAL
(
selectMarqueeToolActivated
()),
this
,
SIGNAL
(
selectMarqueeToolActivated
()));
disconnect
(
m_designClient
,
SIGNAL
(
animationSpeedChanged
(
qreal
)),
this
,
SIGNAL
(
animationSpeedChanged
(
qreal
)));
disconnect
(
m_designClient
,
SIGNAL
(
designModeBehaviorChanged
(
bool
)),
this
,
SIGNAL
(
designModeBehaviorChanged
(
bool
)));
disconnect
(
m_designClient
,
SIGNAL
(
selectedColorChanged
(
QColor
)),
this
,
SIGNAL
(
selectedColorChanged
(
QColor
)));
disconnect
(
m_designClient
,
SIGNAL
(
contextPathUpdated
(
QStringList
)),
this
,
SIGNAL
(
contextPathUpdated
(
QStringList
)));
disconnect
(
m_designClient
,
SIGNAL
(
treeRefreshRequested
()),
this
,
SLOT
(
refreshObjectTree
()));
emit
aboutToDisconnect
();
...
...
@@ -138,15 +138,17 @@ void ClientProxy::onCurrentObjectsChanged(const QList<int> &debugIds)
{
QList
<
QDeclarativeDebugObjectReference
>
selectedItems
;
foreach
(
int
debugId
,
debugIds
)
{
foreach
(
int
debugId
,
debugIds
)
{
QDeclarativeDebugObjectReference
ref
=
objectReferenceForId
(
debugId
);
if
(
ref
.
debugId
()
!=
-
1
)
{
selectedItems
<<
ref
;
}
else
{
// ### FIXME right now, there's no way in the protocol to
// a) get some item and know its parent (although that's possible by adding it to a separate plugin)
// a) get some item and know its parent (although that's possible
// by adding it to a separate plugin)
// b) add children to part of an existing tree.
// So the only choice that remains is to update the complete tree when we have an unknown debug id.
// So the only choice that remains is to update the complete
// tree when we have an unknown debug id.
if
(
!
m_objectTreeQuery
)
m_objectTreeQuery
=
m_client
->
queryObjectRecursive
(
m_rootObject
,
this
);
break
;
...
...
@@ -214,25 +216,28 @@ void ClientProxy::connectionStateChanged()
m_designClient
=
new
QmlJSDesignDebugClient
(
m_conn
,
this
);
emit
connected
(
m_client
);
connect
(
m_designClient
,
SIGNAL
(
currentObjectsChanged
(
QList
<
int
>
)),
SLOT
(
onCurrentObjectsChanged
(
QList
<
int
>
)));
connect
(
m_designClient
,
SIGNAL
(
colorPickerActivated
()),
SIGNAL
(
colorPickerActivated
()));
connect
(
m_designClient
,
SIGNAL
(
zoomToolActivated
()),
SIGNAL
(
zoomToolActivated
()));
connect
(
m_designClient
,
SIGNAL
(
selectToolActivated
()),
SIGNAL
(
selectToolActivated
()));
connect
(
m_designClient
,
SIGNAL
(
selectMarqueeToolActivated
()),
SIGNAL
(
selectMarqueeToolActivated
()));
connect
(
m_designClient
,
SIGNAL
(
animationSpeedChanged
(
qreal
)),
SIGNAL
(
animationSpeedChanged
(
qreal
)));
connect
(
m_designClient
,
SIGNAL
(
designModeBehaviorChanged
(
bool
)),
SIGNAL
(
designModeBehaviorChanged
(
bool
)));
connect
(
m_designClient
,
SIGNAL
(
reloaded
()),
this
,
SIGNAL
(
serverReloaded
()));
connect
(
m_designClient
,
SIGNAL
(
selectedColorChanged
(
QColor
)),
SIGNAL
(
selectedColorChanged
(
QColor
)));
connect
(
m_designClient
,
SIGNAL
(
contextPathUpdated
(
QStringList
)),
SIGNAL
(
contextPathUpdated
(
QStringList
)));
connect
(
m_designClient
,
SIGNAL
(
treeRefreshRequested
()),
SLOT
(
refreshObjectTree
()));
connect
(
m_designClient
,
SIGNAL
(
currentObjectsChanged
(
QList
<
int
>
)),
SLOT
(
onCurrentObjectsChanged
(
QList
<
int
>
)));
connect
(
m_designClient
,
SIGNAL
(
colorPickerActivated
()),
SIGNAL
(
colorPickerActivated
()));
connect
(
m_designClient
,
SIGNAL
(
zoomToolActivated
()),
SIGNAL
(
zoomToolActivated
()));
connect
(
m_designClient
,
SIGNAL
(
selectToolActivated
()),
SIGNAL
(
selectToolActivated
()));
connect
(
m_designClient
,
SIGNAL
(
selectMarqueeToolActivated
()),
SIGNAL
(
selectMarqueeToolActivated
()));
connect
(
m_designClient
,
SIGNAL
(
animationSpeedChanged
(
qreal
)),
SIGNAL
(
animationSpeedChanged
(
qreal
)));
connect
(
m_designClient
,
SIGNAL
(
designModeBehaviorChanged
(
bool
)),
SIGNAL
(
designModeBehaviorChanged
(
bool
)));
connect
(
m_designClient
,
SIGNAL
(
reloaded
()),
this
,
SIGNAL
(
serverReloaded
()));
connect
(
m_designClient
,
SIGNAL
(
selectedColorChanged
(
QColor
)),
SIGNAL
(
selectedColorChanged
(
QColor
)));
connect
(
m_designClient
,
SIGNAL
(
contextPathUpdated
(
QStringList
)),
SIGNAL
(
contextPathUpdated
(
QStringList
)));
connect
(
m_designClient
,
SIGNAL
(
treeRefreshRequested
()),
SLOT
(
refreshObjectTree
()));
}
(
void
)
new
DebuggerClient
(
m_conn
);
...
...
@@ -252,12 +257,12 @@ void ClientProxy::connectionStateChanged()
bool
ClientProxy
::
isConnected
()
const
{
return
(
m_conn
&&
m_client
&&
m_conn
->
state
()
==
QAbstractSocket
::
ConnectedState
)
;
return
m_conn
&&
m_client
&&
m_conn
->
state
()
==
QAbstractSocket
::
ConnectedState
;
}
bool
ClientProxy
::
isUnconnected
()
const
{
return
(
!
m_conn
||
m_conn
->
state
()
==
QAbstractSocket
::
UnconnectedState
)
;
return
!
m_conn
||
m_conn
->
state
()
==
QAbstractSocket
::
UnconnectedState
;
}
void
ClientProxy
::
setSelectedItemsByObjectId
(
const
QList
<
QDeclarativeDebugObjectReference
>
&
objectRefs
)
...
...
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