Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
a88a635e
Commit
a88a635e
authored
Jun 28, 2010
by
Roberto Raggi
Browse files
Let's start from scratch with a new debugger for QmlJS.
parent
92e4fd9f
Changes
14
Hide whitespace changes
Inline
Side-by-side
src/plugins/plugins.pro
View file @
a88a635e
...
...
@@ -43,10 +43,10 @@ contains(QT_CONFIG, declarative) {
include(../private_headers.pri)
exists($${QT_PRIVATE_HEADERS}/QtDeclarative/private/qdeclarativecontext_p.h) {
SUBDIRS += plugin_qmldesigner \
plugin_qmlinspector
plugin_qml
js
inspector
} else {
warning()
warning("QmlDesigner and QmlInspector plugins have been disabled")
warning("QmlDesigner and Qml
JS
Inspector plugins have been disabled")
warning("The plugins depend on on private headers from QtDeclarative module.")
warning("To enable them, pass '
QT_PRIVATE_HEADERS
=
$
QTDIR
/
include
'
to
qmake
,
where
$
QTDIR
is
the
source
directory
of
qt
.
"
)
warning
()
...
...
@@ -200,12 +200,10 @@ plugin_qmldesigner.depends = plugin_coreplugin
plugin_qmldesigner
.
depends
+=
plugin_texteditor
plugin_qmldesigner
.
depends
+=
plugin_qmljseditor
plugin_qmlinspector
.
subdir
=
qmlinspector
plugin_qmlinspector
.
depends
+=
plugin_projectexplorer
plugin_qmlinspector
.
depends
+=
plugin_cppeditor
plugin_qmlinspector
.
depends
+=
plugin_qmlprojectmanager
plugin_qmlinspector
.
depends
+=
plugin_debugger
plugin_qmlinspector
.
depends
+=
plugin_cpptools
plugin_qmljsinspector
.
subdir
=
qmljsinspector
plugin_qmljsinspector
.
depends
+=
plugin_projectexplorer
plugin_qmljsinspector
.
depends
+=
plugin_qmlprojectmanager
plugin_qmljsinspector
.
depends
+=
plugin_debugger
plugin_mercurial
.
subdir
=
mercurial
plugin_mercurial
.
depends
=
plugin_vcsbase
...
...
src/plugins/qmlinspector/QmlInspector.pluginspec
→
src/plugins/qml
js
inspector/Qml
JS
Inspector.pluginspec
View file @
a88a635e
<plugin name="QmlInspector" version="2.1.80" compatVersion="2.1.80">
<plugin name="Qml
JS
Inspector" version="2.1.80" compatVersion="2.1.80">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2010 Nokia Corporation</copyright>
<license>
...
...
src/plugins/qmlinspector/images/logo.png
→
src/plugins/qml
js
inspector/images/logo.png
View file @
a88a635e
File moved
src/plugins/qmljsinspector/qmljsdebuggerclient.cpp
0 → 100644
View file @
a88a635e
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** Commercial Usage
**
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at http://qt.nokia.com/contact.
**
**************************************************************************/
#include "qmljsdebuggerclient.h"
using
namespace
QmlJSInspector
::
Internal
;
DebuggerClient
::
DebuggerClient
(
QDeclarativeDebugConnection
*
client
,
Debugger
::
Internal
::
QmlEngine
*
engine
)
:
QDeclarativeDebugClient
(
QLatin1String
(
"Debugger"
),
client
)
,
connection
(
client
),
engine
(
engine
)
{
connect
(
engine
,
SIGNAL
(
sendMessage
(
QByteArray
)),
this
,
SLOT
(
slotSendMessage
(
QByteArray
)));
setEnabled
(
true
);
}
DebuggerClient
::~
DebuggerClient
()
{
}
void
DebuggerClient
::
messageReceived
(
const
QByteArray
&
data
)
{
engine
->
messageReceived
(
data
);
}
void
DebuggerClient
::
slotSendMessage
(
const
QByteArray
&
message
)
{
QDeclarativeDebugClient
::
sendMessage
(
message
);
}
src/plugins/qmljsinspector/qmljsdebuggerclient.h
0 → 100644
View file @
a88a635e
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** Commercial Usage
**
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at http://qt.nokia.com/contact.
**
**************************************************************************/
#ifndef QMLJSDEBUGGERCLIENT_H
#define QMLJSDEBUGGERCLIENT_H
#include <debugger/qml/qmlengine.h>
#include <debugger/stackframe.h>
#include <debugger/stackhandler.h>
#include <debugger/debuggerrunner.h>
#include <private/qdeclarativedebugclient_p.h> // QML private API
namespace
QmlJSInspector
{
namespace
Internal
{
class
DebuggerClient
:
public
QDeclarativeDebugClient
{
Q_OBJECT
public:
DebuggerClient
(
QDeclarativeDebugConnection
*
client
,
Debugger
::
Internal
::
QmlEngine
*
engine
);
virtual
~
DebuggerClient
();
public:
// attributes
QDeclarativeDebugConnection
*
connection
;
Debugger
::
Internal
::
QmlEngine
*
engine
;
private
Q_SLOTS
:
void
slotSendMessage
(
const
QByteArray
&
message
);
protected:
virtual
void
messageReceived
(
const
QByteArray
&
data
);
};
}
// Internal
}
// QmlJSInspector
#endif // QMLJSDEBUGGERCLIENT_H
src/plugins/qmlinspector/qmlinspector.pro
→
src/plugins/qml
js
inspector/qml
js
inspector.pro
View file @
a88a635e
TEMPLATE
=
lib
TARGET
=
QmlInspector
TARGET
=
QmlJSInspector
INCLUDEPATH
+=
.
DEPENDPATH
+=
.
QT
+=
declarative
include
(..
/../
private_headers
.
pri
)
DEFINES
+=
QMLINSPECTOR_LIBRARY
DEFINES
+=
QML
JS
INSPECTOR_LIBRARY
HEADERS
+=
qmlinspectorplugin
.
h
\
qmlinspectorconstants
.
h
\
qmlinspector_global
.
h
\
inspectorcontext
.
h
\
HEADERS
+=
\
qmljsdebuggerclient
.
h
\
qmljsinspector_global
.
h
\
qmljsinspectorconstants
.
h
\
qmljsinspectorcontext
.
h
\
qmljsinspectorplugin
.
h
SOURCES
+=
qmlinspectorplugin
.
cpp
\
inspectorcontext
.
cpp
SOURCES
+=
\
qmljsdebuggerclient
.
cpp
\
qmljsinspectorcontext
.
cpp
\
qmljsinspectorplugin
.
cpp
OTHER_FILES
+=
QmlInspector
.
pluginspec
RESOURCES
+=
qmlinspector
.
qrc
OTHER_FILES
+=
Qml
JS
Inspector
.
pluginspec
RESOURCES
+=
qml
js
inspector
.
qrc
include
(..
/../
qtcreatorplugin
.
pri
)
include
(..
/../
plugins
/
projectexplorer
/
projectexplorer
.
pri
)
...
...
src/plugins/qmlinspector/qmlinspector.qrc
→
src/plugins/qml
js
inspector/qml
js
inspector.qrc
View file @
a88a635e
File moved
src/plugins/qmlinspector/qmlinspector_global.h
→
src/plugins/qml
js
inspector/qml
js
inspector_global.h
View file @
a88a635e
...
...
@@ -31,7 +31,7 @@
#include <QtCore/QtGlobal>
#if defined(QMLINSPECTOR_LIBRARY)
#if defined(QML
JS
INSPECTOR_LIBRARY)
# define QMLINSPECTOR_EXPORT Q_DECL_EXPORT
#else
# define QMLINSPECTOR_EXPORT Q_DECL_IMPORT
...
...
src/plugins/qmlinspector/qmlinspectorconstants.h
→
src/plugins/qml
js
inspector/qml
js
inspectorconstants.h
View file @
a88a635e
...
...
@@ -26,10 +26,10 @@
** contact the sales department at http://qt.nokia.com/contact.
**
**************************************************************************/
#ifndef QMLINSPECTORCONSTANTS_H
#define QMLINSPECTORCONSTANTS_H
#ifndef QML
JS
INSPECTORCONSTANTS_H
#define QML
JS
INSPECTORCONSTANTS_H
namespace
QmlInspector
{
namespace
Qml
JS
Inspector
{
namespace
Constants
{
const
char
*
const
RUN
=
"QmlInspector.Run"
;
const
char
*
const
STOP
=
"QmlInspector.Stop"
;
...
...
src/plugins/qmlinspector/inspectorcontext.cpp
→
src/plugins/qml
js
inspector/
qmljs
inspectorcontext.cpp
View file @
a88a635e
...
...
@@ -27,15 +27,15 @@
**
**************************************************************************/
#include "inspectorcontext.h"
#include "qmlinspectorconstants.h"
#include "
qmljs
inspectorcontext.h"
#include "qml
js
inspectorconstants.h"
#include <coreplugin/icore.h>
#include <QtGui/QWidget>
#include <QtCore/QDebug>
using
namespace
QmlInspector
::
Internal
;
using
namespace
QmlInspector
::
Constants
;
using
namespace
Qml
JS
Inspector
::
Internal
;
using
namespace
Qml
JS
Inspector
::
Constants
;
InspectorContext
::
InspectorContext
(
QWidget
*
widget
)
:
IContext
(
widget
),
...
...
src/plugins/qmlinspector/inspectorcontext.h
→
src/plugins/qml
js
inspector/
qmljs
inspectorcontext.h
View file @
a88a635e
...
...
@@ -27,8 +27,8 @@
**
**************************************************************************/
#ifndef INSPECTORCONTEXT_H
#define INSPECTORCONTEXT_H
#ifndef
QMLJS
INSPECTORCONTEXT_H
#define
QMLJS
INSPECTORCONTEXT_H
#include <coreplugin/icontext.h>
#include <QList>
...
...
@@ -37,7 +37,7 @@ QT_BEGIN_NAMESPACE
class
QWidget
;
QT_END_NAMESPACE
namespace
QmlInspector
{
namespace
Qml
JS
Inspector
{
namespace
Internal
{
class
ObjectPropertiesView
;
...
...
@@ -72,4 +72,5 @@ private:
}
// Internal
}
// QmlInspector
#endif // DESIGNMODECONTEXT_H
#endif
src/plugins/qmlinspector/qmlinspectorplugin.cpp
→
src/plugins/qml
js
inspector/qml
js
inspectorplugin.cpp
View file @
a88a635e
...
...
@@ -27,8 +27,8 @@
**
**************************************************************************/
#include "qmlinspectorconstants.h"
#include "qmlinspectorplugin.h"
#include "qml
js
inspectorconstants.h"
#include "qml
js
inspectorplugin.h"
#include <debugger/debuggeruiswitcher.h>
#include <debugger/debuggerconstants.h>
...
...
@@ -59,8 +59,8 @@
#include <QtCore/QDebug>
using
namespace
QmlInspector
::
Internal
;
using
namespace
QmlInspector
::
Constants
;
using
namespace
Qml
JS
Inspector
::
Internal
;
using
namespace
Qml
JS
Inspector
::
Constants
;
namespace
{
QToolButton
*
createToolButton
(
QAction
*
action
)
...
...
src/plugins/qmlinspector/qmlinspectorplugin.h
→
src/plugins/qml
js
inspector/qml
js
inspectorplugin.h
View file @
a88a635e
...
...
@@ -26,8 +26,8 @@
** contact the sales department at http://qt.nokia.com/contact.
**
**************************************************************************/
#ifndef QMLINSPECTORPLUGIN_H
#define QMLINSPECTORPLUGIN_H
#ifndef QML
JS
INSPECTORPLUGIN_H
#define QML
JS
INSPECTORPLUGIN_H
#include <extensionsystem/iplugin.h>
...
...
@@ -45,7 +45,7 @@ namespace ProjectExplorer {
class
Project
;
}
namespace
QmlInspector
{
namespace
Qml
JS
Inspector
{
namespace
Internal
{
class
QmlInspectorPlugin
:
public
ExtensionSystem
::
IPlugin
...
...
@@ -69,6 +69,6 @@ private slots:
};
}
// end of namespace Internal
}
// end of
namespace
QmlInspector
}
// end of Qml
JS
Inspector
#endif // QMLINSPECTORPLUGIN_H
src/plugins/qmlprojectmanager/qmlprojectruncontrol.cpp
View file @
a88a635e
...
...
@@ -41,7 +41,7 @@
#include <debugger/debuggerconstants.h>
#include <debugger/debuggeruiswitcher.h>
#include <qmlinspector/qmlinspectorconstants.h>
#include <qml
js
inspector/qml
js
inspectorconstants.h>
#include <QDir>
#include <QLabel>
...
...
@@ -86,7 +86,7 @@ void QmlRunControl::start()
// FIXME this line should be refactored out in order to remove the dependency between
// debugger and qmlprojectmanager, because debugger also relies on cpptools.
Debugger
::
DebuggerUISwitcher
::
instance
()
->
setActiveLanguage
(
QmlInspector
::
Constants
::
LANG_QML
);
Debugger
::
DebuggerUISwitcher
::
instance
()
->
setActiveLanguage
(
Qml
JS
Inspector
::
Constants
::
LANG_QML
);
emit
started
();
emit
appendMessage
(
this
,
tr
(
"Starting %1 %2"
).
arg
(
QDir
::
toNativeSeparators
(
m_executable
),
...
...
Write
Preview
Supports
Markdown
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