summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergio Ahumada <sergio.ahumada@digia.com>2013-01-31 16:03:19 +0100
committerSergio Ahumada <sergio.ahumada@digia.com>2013-01-31 16:06:25 +0100
commit82365233831b212a7a230d42ea902d7e5df25e99 (patch)
treef445b2dfe827e6d60da40ac2f3df4950c59f8e7c
parent19550797aa16ee60fc19fdaf90832b4895612226 (diff)
parent3b26f6f6643978c9d041a6267dc88e2a59ced763 (diff)
downloadqtscript-82365233831b212a7a230d42ea902d7e5df25e99.tar.gz
Merge branch 'release' into stable
Change-Id: If3a1efe3888b872702d75e25d1943ff79d57e9c6
-rw-r--r--dist/changes-5.0.19
-rw-r--r--src/script/api/qscriptcontextinfo.cpp2
-rw-r--r--src/script/doc/qtscript.qdocconf4
-rw-r--r--src/script/doc/src/qtscript-index.qdoc3
-rw-r--r--src/script/doc/src/qtscriptdebugger-manual.qdoc10
-rw-r--r--src/scripttools/debugging/qscriptenginedebugger.cpp14
-rw-r--r--src/scripttools/doc/qtscripttools.qdocconf47
-rw-r--r--src/scripttools/doc/snippets/doc_src_qtscripttools.cpp43
-rw-r--r--src/scripttools/doc/snippets/doc_src_qtscripttools.pro43
-rw-r--r--src/scripttools/doc/snippets/scriptdebugger.cpp (renamed from doc/src/snippets/scriptdebugger.cpp)0
-rw-r--r--src/scripttools/doc/snippets/src.scripttools.qscriptenginedebugger.cpp (renamed from doc/src/snippets/code/src.scripttools.qscriptenginedebugger.cpp)0
-rw-r--r--src/scripttools/doc/src/qtscripttools-index.qdoc60
-rw-r--r--src/scripttools/doc/src/qtscripttools-module.qdoc49
-rw-r--r--src/scripttools/scripttools.pro2
-rw-r--r--tests/auto/qscriptcontext/tst_qscriptcontext.cpp3
15 files changed, 263 insertions, 26 deletions
diff --git a/dist/changes-5.0.1 b/dist/changes-5.0.1
index cc5a670..c21590a 100644
--- a/dist/changes-5.0.1
+++ b/dist/changes-5.0.1
@@ -22,6 +22,8 @@ information about a particular change.
General Improvements
--------------------
+-modularized Qt Script Tools documentation; did not exist previously
+
Third party components
----------------------
@@ -29,6 +31,7 @@ Third party components
* Library *
****************************************************************************
+ - no changes for this version
****************************************************************************
* Platform Specific Changes *
@@ -41,11 +44,5 @@ Third party components
****************************************************************************
-* Tools *
-****************************************************************************
-
-
-****************************************************************************
* Plugins *
****************************************************************************
-
diff --git a/src/script/api/qscriptcontextinfo.cpp b/src/script/api/qscriptcontextinfo.cpp
index b838f15..15f0966 100644
--- a/src/script/api/qscriptcontextinfo.cpp
+++ b/src/script/api/qscriptcontextinfo.cpp
@@ -159,7 +159,7 @@ QScriptContextInfoPrivate::QScriptContextInfoPrivate(const QScriptContext *conte
if (returnPC && codeBlock && QScriptEnginePrivate::hasValidCodeBlockRegister(frame)) {
#if ENABLE(JIT)
JSC::JITCode code = codeBlock->getJITCode();
- unsigned jitOffset = code.offsetOf(JSC::ReturnAddressPtr(returnPC).value());
+ uintptr_t jitOffset = reinterpret_cast<uintptr_t>(JSC::ReturnAddressPtr(returnPC).value()) - reinterpret_cast<uintptr_t>(code.addressForCall().executableAddress());
// We can only use the JIT code offset if it's smaller than the JIT size;
// otherwise calling getBytecodeIndex() is meaningless.
if (jitOffset < code.size()) {
diff --git a/src/script/doc/qtscript.qdocconf b/src/script/doc/qtscript.qdocconf
index 382e09d..7f8d37c 100644
--- a/src/script/doc/qtscript.qdocconf
+++ b/src/script/doc/qtscript.qdocconf
@@ -16,7 +16,7 @@ headerdirs += ..
imagedirs += images
sourcedirs += ..
-depends += qtcore qtlinguist
+depends += qtcore qtlinguist qtscripttools
# The following parameters are for creating a qhp file, the qhelpgenerator
# program can convert the qhp file into a qch file which can be opened in
@@ -32,7 +32,7 @@ qhp.qtscript.file = qtscript.qhp
# Namespace for the output file. This namespace is used to distinguish between
# different documentation files in Creator/Assistant.
-qhp.qtscript.namespace = org.qt-project.qtscript.500
+qhp.qtscript.namespace = org.qt-project.qtscript.501
# Title for the package, will be the main title for the package in
# Assistant/Creator.
diff --git a/src/script/doc/src/qtscript-index.qdoc b/src/script/doc/src/qtscript-index.qdoc
index 7e5af4c..ff4013b 100644
--- a/src/script/doc/src/qtscript-index.qdoc
+++ b/src/script/doc/src/qtscript-index.qdoc
@@ -1637,7 +1637,7 @@
doesn't provide any debugging-specific functionality (e.g. setting
breakpoints), but it is the basis of tools that do.
- The QScriptEngineDebugger class introduced in Qt 4.5 provides a
+ The \l{Qt Script Tools} module provides a
\l{Qt Script Debugger Manual}{Qt Script debugger} that can be embedded
into your application.
@@ -1876,4 +1876,3 @@
\brief Classes that add scripting capabilities to Qt applications.
*/
-
diff --git a/src/script/doc/src/qtscriptdebugger-manual.qdoc b/src/script/doc/src/qtscriptdebugger-manual.qdoc
index fbad2ed..7de9d6f 100644
--- a/src/script/doc/src/qtscriptdebugger-manual.qdoc
+++ b/src/script/doc/src/qtscriptdebugger-manual.qdoc
@@ -30,8 +30,8 @@
\title Qt Script Debugger Manual
\brief A manual describing how to use the Qt Script debugger.
- The Qt Script debugger is a tool for debugging script execution in
- Qt applications that use Qt Script. Application developers can embed
+ The \l{Qt Script Tools} module provides a debugger for script execution in
+ Qt applications that use \l{Qt Script}. Application developers can embed
the debugger into their application through the
QScriptEngineDebugger class. This manual describes how to use the
debugger. We assume that the reader is somewhat familiar with
@@ -291,7 +291,7 @@
previously.
\section3 ignore <breakpoint-id> <count>
-
+
Sets the ignore-count of a breakpoint, i.e., the breakpoint will not
stop the program execution unless it have been reached \c count
times. This can, for instance, be useful in loops to stop at a
@@ -356,7 +356,7 @@
\section3 eval <program>
- Evaluates a program.
+ Evaluates a program.
\section3 finish
@@ -402,7 +402,7 @@
Selects the previous (inner) stack frame. The execution will not
return to this frame, but you will get access to its local
- variables.
+ variables.
\section3 frame <index>
diff --git a/src/scripttools/debugging/qscriptenginedebugger.cpp b/src/scripttools/debugging/qscriptenginedebugger.cpp
index e5e7062..0a4ae85 100644
--- a/src/scripttools/debugging/qscriptenginedebugger.cpp
+++ b/src/scripttools/debugging/qscriptenginedebugger.cpp
@@ -70,12 +70,12 @@ public:
};
/*!
- \since 4.5
- \class QScriptEngineDebugger
+ \since 4.5
+ \class QScriptEngineDebugger
+ \inmodule QtScriptTools
+ \brief The QScriptEngineDebugger class provides a QScriptEngine debugger.
- \brief The QScriptEngineDebugger class provides a QScriptEngine debugger.
-
- \ingroup script
+ \ingroup script
The QScriptEngineDebugger class provides a debugger that can be
@@ -86,7 +86,7 @@ public:
To attach the debugger to a script engine, call the attachTo()
function.
- \snippet code/src.scripttools.qscriptenginedebugger.cpp 0
+ \snippet src.scripttools.qscriptenginedebugger.cpp 0
Once the debugger has been attached to a script engine, you can
proceed to evaluate scripts as usual, e.g. by calling
@@ -140,7 +140,7 @@ public:
the function call does not return until the user has finished
interacting with the debugger.
- \snippet code/src.scripttools.qscriptenginedebugger.cpp 1
+ \snippet src.scripttools.qscriptenginedebugger.cpp 1
When the Qt Script debugger is running, the C++ application itself
is not "frozen". This means that it is possible that more scripts
diff --git a/src/scripttools/doc/qtscripttools.qdocconf b/src/scripttools/doc/qtscripttools.qdocconf
new file mode 100644
index 0000000..362fc61
--- /dev/null
+++ b/src/scripttools/doc/qtscripttools.qdocconf
@@ -0,0 +1,47 @@
+include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
+
+# Name of the project which must match the outputdir. Determines the .index file
+project = qtscripttools
+
+# Directories in which to search for files to document and images.
+# By default set to the root directory of the project for sources
+# and headers and qdoc will therefore generate output for each file.
+# Images should be placed in <rootdir>/dic/images and examples in
+# <rootdir>/examples.
+# Paths are relative to the location of this file.
+exampledirs += ../../../examples \
+ snippets
+
+headerdirs += ..
+imagedirs += images
+sourcedirs += ..
+
+depends += qtcore qtlinguist qtscript
+
+# The following parameters are for creating a qhp file, the qhelpgenerator
+# program can convert the qhp file into a qch file which can be opened in
+# Qt Assistant and/or Qt Creator.
+
+# Defines the name of the project. You cannot use operators (+, =, -) in
+# the name. Properties for this project are set using a qhp.<projectname>.property
+# format.
+qhp.projects = qtscripttools
+
+# Sets the name of the output qhp file.
+qhp.qtscripttools.file = qtscripttools.qhp
+
+# Namespace for the output file. This namespace is used to distinguish between
+# different documentation files in Creator/Assistant.
+qhp.qtscripttools.namespace = org.qt-project.qtscripttools.501
+
+# Title for the package, will be the main title for the package in
+# Assistant/Creator.
+qhp.qtscripttools.indexTitle = Qt Script
+
+# Only update the name of the project for the next variables.
+qhp.qtscripttools.virtualFolder = qtscripttools
+qhp.qtscripttools.subprojects = classes
+qhp.qtscripttools.subprojects.classes.title = C++ Classes
+qhp.qtscripttools.subprojects.classes.indexTitle = Qt Script Tools C++ Classes
+qhp.qtscripttools.subprojects.classes.selectors = class fake:headerfile
+qhp.qtscripttools.subprojects.classes.sortPages = true
diff --git a/src/scripttools/doc/snippets/doc_src_qtscripttools.cpp b/src/scripttools/doc/snippets/doc_src_qtscripttools.cpp
new file mode 100644
index 0000000..d385f69
--- /dev/null
+++ b/src/scripttools/doc/snippets/doc_src_qtscripttools.cpp
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+#include <QtScriptTools>
+//! [0]
diff --git a/src/scripttools/doc/snippets/doc_src_qtscripttools.pro b/src/scripttools/doc/snippets/doc_src_qtscripttools.pro
new file mode 100644
index 0000000..6680f5f
--- /dev/null
+++ b/src/scripttools/doc/snippets/doc_src_qtscripttools.pro
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#! [1]
+QT += scripttools
+#! [1]
diff --git a/doc/src/snippets/scriptdebugger.cpp b/src/scripttools/doc/snippets/scriptdebugger.cpp
index 12a536d..12a536d 100644
--- a/doc/src/snippets/scriptdebugger.cpp
+++ b/src/scripttools/doc/snippets/scriptdebugger.cpp
diff --git a/doc/src/snippets/code/src.scripttools.qscriptenginedebugger.cpp b/src/scripttools/doc/snippets/src.scripttools.qscriptenginedebugger.cpp
index 741f427..741f427 100644
--- a/doc/src/snippets/code/src.scripttools.qscriptenginedebugger.cpp
+++ b/src/scripttools/doc/snippets/src.scripttools.qscriptenginedebugger.cpp
diff --git a/src/scripttools/doc/src/qtscripttools-index.qdoc b/src/scripttools/doc/src/qtscripttools-index.qdoc
new file mode 100644
index 0000000..1817753
--- /dev/null
+++ b/src/scripttools/doc/src/qtscripttools-index.qdoc
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qtscripttools-index.html
+ \title Qt Script Tools
+ \brief Provides a debugger for applications that use Qt Script
+
+ The Qt Script Tools module provides a debugger that can be embedded into Qt
+ applications that use \l{Qt Script}. The debugger enables the application
+ user to inspect the state of the script environment and control script
+ execution.
+
+ \section1 Configuring the Build Process
+
+ To include the definitions of the module's classes, use the
+ following directive:
+
+ \snippet doc_src_qtscripttools.cpp 0
+
+ To link against the module, add this line to your \l qmake \c .pro file:
+
+ \snippet doc_src_qtscripttools.pro 1
+
+ \section1 Related Information
+
+ \section2 Guides
+ \list
+ \li \l {Qt Script Debugger Manual}
+ \endlist
+ \section2 Reference
+ \list
+ \li \l{Qt Script Tools C++ Classes}{C++ Classes}
+ \endlist
+
+*/
diff --git a/src/scripttools/doc/src/qtscripttools-module.qdoc b/src/scripttools/doc/src/qtscripttools-module.qdoc
new file mode 100644
index 0000000..bc89994
--- /dev/null
+++ b/src/scripttools/doc/src/qtscripttools-module.qdoc
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \module QtScriptTools
+ \title Qt Script Tools C++ Classes
+ \since 4.5
+ \ingroup modules
+
+ \brief Provides additional components for applications that use Qt Script.
+
+ The \l{Qt Script Tools} module provides a debugger for applications that
+ use Qt Script.
+
+ \section1 Configuring the Build Process
+
+ To include the definitions of the module's classes, use the
+ following directive:
+
+ \snippet doc_src_qtscripttools.cpp 0
+
+ To link against the module, add this line to your \l qmake \c .pro file:
+
+ \snippet doc_src_qtscripttools.pro 1
+*/
diff --git a/src/scripttools/scripttools.pro b/src/scripttools/scripttools.pro
index 0cb8381..12d26a4 100644
--- a/src/scripttools/scripttools.pro
+++ b/src/scripttools/scripttools.pro
@@ -5,6 +5,8 @@ QT_PRIVATE = gui widgets-private script
DEFINES += QT_NO_USING_NAMESPACE
#win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x66000000
+QMAKE_DOCS = $$PWD/doc/qtscripttools.qdocconf
+
load(qt_module)
include(debugging/debugging.pri)
diff --git a/tests/auto/qscriptcontext/tst_qscriptcontext.cpp b/tests/auto/qscriptcontext/tst_qscriptcontext.cpp
index 6d9b889..2129521 100644
--- a/tests/auto/qscriptcontext/tst_qscriptcontext.cpp
+++ b/tests/auto/qscriptcontext/tst_qscriptcontext.cpp
@@ -964,9 +964,6 @@ void tst_QScriptContext::backtrace_data()
void tst_QScriptContext::backtrace()
{
-#if defined(UBUNTU_ONEIRIC) && defined(__x86_64__)
- QSKIP("Fails on this platform - QTBUG-23463");
-#endif
QFETCH(QString, code);
QFETCH(QStringList, expectedbacktrace);