Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
flatpak-qt-creator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
89443cfb
Commit
89443cfb
authored
Sep 28, 2010
by
Lasse Holmstedt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
QML Observer: Complain about not having it if debugging .qmlprojects
Reviewed-by: hjk
parent
96d991bb
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
94 additions
and
5 deletions
+94
-5
src/plugins/debugger/debuggeractions.cpp
src/plugins/debugger/debuggeractions.cpp
+8
-0
src/plugins/debugger/debuggeractions.h
src/plugins/debugger/debuggeractions.h
+2
-0
src/plugins/debugger/debuggerengine.cpp
src/plugins/debugger/debuggerengine.cpp
+29
-0
src/plugins/debugger/debuggerengine.h
src/plugins/debugger/debuggerengine.h
+2
-0
src/plugins/debugger/debuggerplugin.cpp
src/plugins/debugger/debuggerplugin.cpp
+5
-1
src/plugins/debugger/dumperoptionpage.ui
src/plugins/debugger/dumperoptionpage.ui
+29
-2
src/plugins/debugger/qml/qmlengine.cpp
src/plugins/debugger/qml/qmlengine.cpp
+8
-0
src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
+6
-1
src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.h
src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.h
+2
-0
src/plugins/qmlprojectmanager/qmlprojectruncontrol.cpp
src/plugins/qmlprojectmanager/qmlprojectruncontrol.cpp
+2
-0
src/plugins/qt4projectmanager/qmldumptool.cpp
src/plugins/qt4projectmanager/qmldumptool.cpp
+1
-1
No files found.
src/plugins/debugger/debuggeractions.cpp
View file @
89443cfb
...
...
@@ -306,6 +306,14 @@ DebuggerSettings *DebuggerSettings::instance()
item
->
setValue
(
false
);
instance
->
insertItem
(
DebugDebuggingHelpers
,
item
);
item
=
new
SavedAction
(
instance
);
item
->
setSettingsKey
(
debugModeGroup
,
QLatin1String
(
"UseQmlObserver"
));
item
->
setText
(
tr
(
"Use QML Observer"
));
item
->
setCheckable
(
true
);
item
->
setDefaultValue
(
true
);
item
->
setValue
(
true
);
instance
->
insertItem
(
UseQmlObserver
,
item
);
item
=
new
SavedAction
(
instance
);
item
->
setSettingsKey
(
debugModeGroup
,
QLatin1String
(
"UseCodeModel"
));
item
->
setText
(
tr
(
"Use Code Model"
));
...
...
src/plugins/debugger/debuggeractions.h
View file @
89443cfb
...
...
@@ -99,6 +99,8 @@ enum DebuggerActionCode
CustomDebuggingHelperLocation
,
DebugDebuggingHelpers
,
UseQmlObserver
,
UseCodeModel
,
UseToolTipsInMainEditor
,
...
...
src/plugins/debugger/debuggerengine.cpp
View file @
89443cfb
...
...
@@ -1054,6 +1054,35 @@ void DebuggerEngine::showQtDumperLibraryWarning(const QString &details)
}
}
void
DebuggerEngine
::
showQmlObserverToolWarning
()
{
QMessageBox
dialog
;
QPushButton
*
qtPref
=
dialog
.
addButton
(
tr
(
"Open Qt4 Options"
),
QMessageBox
::
ActionRole
);
QPushButton
*
helperOff
=
dialog
.
addButton
(
tr
(
"Turn off QML Observer Usage"
),
QMessageBox
::
ActionRole
);
QPushButton
*
justContinue
=
dialog
.
addButton
(
tr
(
"Continue Anyway"
),
QMessageBox
::
AcceptRole
);
dialog
.
setDefaultButton
(
justContinue
);
dialog
.
setWindowTitle
(
tr
(
"QML Observer Missing"
));
dialog
.
setText
(
tr
(
"QML Observer could not be found."
));
dialog
.
setInformativeText
(
tr
(
"QML Observer is used to offer additional debugging features for "
"QML applications, such as interactive debugging and inspection tools."
"It must be compiled for each used Qt version separately. "
"On the Qt4 options page, select a Qt installation "
"and click Rebuild."
));
dialog
.
exec
();
if
(
dialog
.
clickedButton
()
==
qtPref
)
{
Core
::
ICore
::
instance
()
->
showOptionsDialog
(
_
(
Qt4ProjectManager
::
Constants
::
QT_SETTINGS_CATEGORY
),
_
(
Qt4ProjectManager
::
Constants
::
QTVERSION_SETTINGS_PAGE_ID
));
}
else
if
(
dialog
.
clickedButton
()
==
helperOff
)
{
theDebuggerAction
(
UseQmlObserver
)
->
setValue
(
qVariantFromValue
(
false
),
false
);
}
}
QString
DebuggerEngine
::
qtDumperLibraryName
()
const
{
if
(
theDebuggerAction
(
UseCustomDebuggingHelperLocation
)
->
value
().
toBool
())
...
...
src/plugins/debugger/debuggerengine.h
View file @
89443cfb
...
...
@@ -84,6 +84,7 @@ public:
quint16
qmlServerPort
;
QString
projectBuildDir
;
QString
projectDir
;
bool
qmlObserverAvailable
;
// for cpp+qml debugging
DebuggerEngineType
cppEngineType
;
...
...
@@ -264,6 +265,7 @@ public:
QString
qtDumperLibraryName
()
const
;
QStringList
qtDumperLibraryLocations
()
const
;
void
showQtDumperLibraryWarning
(
const
QString
&
details
);
void
showQmlObserverToolWarning
();
static
const
char
*
stateName
(
int
s
);
...
...
src/plugins/debugger/debuggerplugin.cpp
View file @
89443cfb
...
...
@@ -669,6 +669,9 @@ QWidget *DebuggingHelperOptionPage::createPage(QWidget *parent)
m_group
.
insert
(
theDebuggerAction
(
UseCodeModel
),
m_ui
.
checkBoxUseCodeModel
);
m_group
.
insert
(
theDebuggerAction
(
UseQmlObserver
),
m_ui
.
checkBoxUseQmlObserver
);
#ifdef QT_DEBUG
m_group
.
insert
(
theDebuggerAction
(
DebugDebuggingHelpers
),
m_ui
.
checkBoxDebugDebuggingHelpers
);
...
...
@@ -692,7 +695,8 @@ QWidget *DebuggingHelperOptionPage::createPage(QWidget *parent)
<<
' '
<<
m_ui
.
customLocationGroupBox
->
title
()
<<
' '
<<
m_ui
.
dumperLocationLabel
->
text
()
<<
' '
<<
m_ui
.
checkBoxUseCodeModel
->
text
()
<<
' '
<<
m_ui
.
checkBoxDebugDebuggingHelpers
->
text
();
<<
' '
<<
m_ui
.
checkBoxDebugDebuggingHelpers
->
text
()
<<
' '
<<
m_ui
.
checkBoxUseQmlObserver
->
text
();
m_searchKeywords
.
remove
(
QLatin1Char
(
'&'
));
}
return
w
;
...
...
src/plugins/debugger/dumperoptionpage.ui
View file @
89443cfb
...
...
@@ -2,7 +2,15 @@
<ui
version=
"4.0"
>
<class>
DebuggingHelperOptionPage
</class>
<widget
class=
"QWidget"
name=
"DebuggingHelperOptionPage"
>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_2"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
529
</width>
<height>
411
</height>
</rect>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_3"
>
<item>
<widget
class=
"QLabel"
name=
"label"
>
<property
name=
"text"
>
...
...
@@ -47,7 +55,7 @@
</widget>
</item>
<item
row=
"0"
column=
"1"
>
<widget
class=
"Utils::PathChooser"
name=
"dumperLocationChooser"
/>
<widget
class=
"Utils::PathChooser"
name=
"dumperLocationChooser"
native=
"true"
/>
</item>
</layout>
</widget>
...
...
@@ -75,6 +83,25 @@
</layout>
</widget>
</item>
<item>
<widget
class=
"QLabel"
name=
"label_2"
>
<property
name=
"text"
>
<string>
QML Observer is used to offer additional debugging facilities to QML applications, such as interactive preview of code changes and inspection tools.
It is not strictly necessary for debugging with Qt Creator.
</string>
</property>
<property
name=
"wordWrap"
>
<bool>
true
</bool>
</property>
</widget>
</item>
<item>
<widget
class=
"QCheckBox"
name=
"checkBoxUseQmlObserver"
>
<property
name=
"text"
>
<string>
Use QML Observer
</string>
</property>
</widget>
</item>
<item>
<spacer
name=
"verticalSpacer"
>
<property
name=
"orientation"
>
...
...
src/plugins/debugger/qml/qmlengine.cpp
View file @
89443cfb
...
...
@@ -30,6 +30,7 @@
#include "qmlengine.h"
#include "qmladapter.h"
#include "debuggeractions.h"
#include "debuggertooltip.h"
#include "debuggerconstants.h"
#include "debuggerplugin.h"
...
...
@@ -315,6 +316,13 @@ void QmlEngine::shutdownEngine()
void
QmlEngine
::
setupEngine
()
{
if
(
!
d
->
m_attachToRunningExternalApp
&&
!
startParameters
().
qmlObserverAvailable
&&
Internal
::
theDebuggerBoolSetting
(
Internal
::
UseQmlObserver
))
{
showQmlObserverToolWarning
();
}
d
->
m_adapter
->
setMaxConnectionAttempts
(
MaxConnectionAttempts
);
d
->
m_adapter
->
setConnectionAttemptInterval
(
ConnectionAttemptDefaultInterval
);
connect
(
d
->
m_adapter
,
SIGNAL
(
connectionError
(
QAbstractSocket
::
SocketError
)),
...
...
src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
View file @
89443cfb
...
...
@@ -110,6 +110,11 @@ Internal::QmlProjectTarget *QmlProjectRunConfiguration::qmlTarget() const
return
static_cast
<
Internal
::
QmlProjectTarget
*>
(
target
());
}
bool
QmlProjectRunConfiguration
::
qmlObserverAvailable
()
const
{
return
m_qmlObserverAvailable
;
}
QString
QmlProjectRunConfiguration
::
viewerPath
()
const
{
if
(
!
m_qmlViewerCustomPath
.
isEmpty
())
...
...
@@ -376,9 +381,9 @@ QString QmlProjectRunConfiguration::viewerDefaultPath() const
foreach
(
Qt4ProjectManager
::
QtVersion
*
version
,
qtVersions
->
validVersions
())
{
if
(
version
->
supportsTargetId
(
Qt4ProjectManager
::
Constants
::
DESKTOP_TARGET_ID
))
{
// Search for QmlObserver
const
QString
qtInstallData
=
version
->
versionInfo
().
value
(
"QT_INSTALL_DATA"
);
path
=
Qt4ProjectManager
::
QmlObserverTool
::
toolByInstallData
(
qtInstallData
);
m_qmlObserverAvailable
=
!
path
.
isEmpty
();
if
(
path
.
isEmpty
()
&&
!
version
->
qmlviewerCommand
().
isEmpty
())
{
path
=
version
->
qmlviewerCommand
();
...
...
src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.h
View file @
89443cfb
...
...
@@ -67,6 +67,7 @@ public:
bool
isEnabled
(
ProjectExplorer
::
BuildConfiguration
*
bc
)
const
;
bool
qmlObserverAvailable
()
const
;
QString
viewerPath
()
const
;
QStringList
viewerArguments
()
const
;
QString
workingDirectory
()
const
;
...
...
@@ -120,6 +121,7 @@ private:
bool
m_usingCurrentFile
;
bool
m_isEnabled
;
mutable
bool
m_qmlObserverAvailable
;
};
...
...
src/plugins/qmlprojectmanager/qmlprojectruncontrol.cpp
View file @
89443cfb
...
...
@@ -46,6 +46,7 @@
#include <QDir>
#include <QLabel>
#include <QMessageBox>
using
ProjectExplorer
::
RunConfiguration
;
using
ProjectExplorer
::
RunControl
;
...
...
@@ -179,6 +180,7 @@ ProjectExplorer::RunControl *QmlRunControlFactory::createDebugRunControl(QmlProj
params
.
executable
=
runConfig
->
viewerPath
();
params
.
qmlServerAddress
=
"127.0.0.1"
;
params
.
qmlServerPort
=
runConfig
->
qmlDebugServerPort
();
params
.
qmlObserverAvailable
=
runConfig
->
qmlObserverAvailable
();
params
.
processArgs
=
runConfig
->
viewerArguments
();
params
.
processArgs
.
append
(
QLatin1String
(
"-qmljsdebugger=port:"
)
+
QString
::
number
(
runConfig
->
qmlDebugServerPort
()));
params
.
workingDirectory
=
runConfig
->
workingDirectory
();
...
...
src/plugins/qt4projectmanager/qmldumptool.cpp
View file @
89443cfb
...
...
@@ -57,7 +57,7 @@ bool QmlDumpTool::canBuild(const QString &installHeadersDir)
QString
QmlDumpTool
::
toolForProject
(
ProjectExplorer
::
Project
*
project
)
{
if
(
project
->
id
()
==
Qt4ProjectManager
::
Constants
::
QT4PROJECT_ID
)
{
if
(
project
&&
project
->
id
()
==
Qt4ProjectManager
::
Constants
::
QT4PROJECT_ID
)
{
Qt4Project
*
qt4Project
=
static_cast
<
Qt4Project
*>
(
project
);
if
(
qt4Project
&&
qt4Project
->
activeTarget
()
&&
qt4Project
->
activeTarget
()
->
activeBuildConfiguration
())
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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