Commit eee8cb50 authored by Kent Hansen's avatar Kent Hansen Committed by Qt by Nokia

Say hello to QtQmlDevTools library

QtQmlDevTools is a private helper library. It provides QML/JS
file parsing for tools that live outside of the qtdeclarative
repository, such as lupdate.

This allows us to remove qttools's dependency on the
qtdeclarative sources.

To use the library:

QT += qmldevtools-private

 #include <private/qdeclarativejsparser_p.h>

Change-Id: Ia43751b9be3d9fe05da03e65c6aca1cd9e3fdbbc
Reviewed-on: http://codereview.qt-project.org/6116Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarRoberto Raggi <roberto.raggi@nokia.com>
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: default avatarAaron Kennedy <aaron.kennedy@nokia.com>
parent fcfea59e
QT.qmldevtools.VERSION = 5.0.0
QT.qmldevtools.MAJOR_VERSION = 5
QT.qmldevtools.MINOR_VERSION = 0
QT.qmldevtools.PATCH_VERSION = 0
QT.qmldevtools.name = QtQmlDevTools
QT.qmldevtools.bins = $$QT_MODULE_BIN_BASE
QT.qmldevtools.includes = $$QT_MODULE_INCLUDE_BASE/QtQmlDevTools
QT.qmldevtools.private_includes = $$QT_MODULE_INCLUDE_BASE/QtQmlDevTools/$$QT.qmldevtools.VERSION
QT.qmldevtools.sources = $$QT_MODULE_BASE/src/qmldevtools
QT.qmldevtools.libs = $$QT_MODULE_LIB_BASE
QT.qmldevtools.plugins = $$QT_MODULE_PLUGIN_BASE
QT.qmldevtools.imports = $$QT_MODULE_IMPORT_BASE
QT.qmldevtools.depends = core
QT.qmldevtools.module_config = staticlib
QT.qmldevtools.DEFINES = QT_QMLDEVTOOLS_LIB
QT_CONFIG += qmldevtools
......@@ -58,7 +58,12 @@
#else // !QT_CREATOR
# define QT_QML_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
# define QT_QML_END_NAMESPACE QT_END_NAMESPACE
# define QML_PARSER_EXPORT Q_AUTOTEST_EXPORT
# if defined(QT_BUILD_QMLDEVTOOLS_LIB) || defined(QT_QMLDEVTOOLS_LIB)
// QmlDevTools is a static library
# define QML_PARSER_EXPORT
# else
# define QML_PARSER_EXPORT Q_AUTOTEST_EXPORT
# endif
#endif // QT_CREATOR
#endif // QDECLARATIVEJSGLOBAL_P_H
load(qt_module)
TARGET = QtQmlDevTools
QT = core
TEMPLATE = lib
DESTDIR = $$QMAKE_LIBDIR_QT
CONFIG += module
CONFIG += staticlib
MODULE_PRI = ../../modules/qt_qmldevtools.pri
DEFINES += QT_BUILD_QMLDEVTOOLS_LIB
load(qt_module_config)
HEADERS += qtqmldevtoolsversion.h
unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore
include($$QT.declarative.sources/qml/parser/parser.pri)
......@@ -5,4 +5,5 @@ SUBDIRS += declarative qtquick1 plugins
contains(QT_CONFIG, qmltest): SUBDIRS += qmltest
SUBDIRS += imports
SUBDIRS += qmldevtools
......@@ -2,8 +2,10 @@
"QtDeclarative" => "$basedir/src/declarative",
"QtQuick1" => "$basedir/src/qtquick1",
"QtQuickTest" => "$basedir/src/qmltest",
"QtQmlDevTools" => "$basedir/src/qmldevtools",
);
%moduleheaders = ( # restrict the module headers to those found in relative path
"QtQmlDevTools" => "../declarative/qml/parser",
);
%classnames = (
"qtdeclarativeversion.h" => "QtDeclarativeVersion",
......@@ -18,6 +20,7 @@
"QtDeclarative" => "$basedir/modules/qt_declarative.pri",
"QtQuick1" => "$basedir/modules/qt_qtquick1.pri",
"QtQuickTest" => "$basedir/modules/qt_qmltest.pri",
"QtQmlDevTools" => "$basedir/modules/qt_qmldevtools.pri",
);
# Module dependencies.
# Every module that is required to build this module should have one entry.
......
......@@ -6,4 +6,6 @@ SUBDIRS=\
# ### refactor: port properly
# contains(QT_CONFIG, qmltest): SUBDIRS += qmltest
SUBDIRS += qmldevtools
!cross_compile: SUBDIRS += host.pro
load(qttest_p4)
QT = core qmldevtools-private
macx:CONFIG -= app_bundle
SOURCES += tst_compile.cpp
CONFIG += parallel_test
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** 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.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include <qtest.h>
#include <private/qdeclarativejsengine_p.h>
#include <private/qdeclarativejslexer_p.h>
#include <private/qdeclarativejsparser_p.h>
#include <private/qdeclarativejsastvisitor_p.h>
#include <private/qdeclarativejsast_p.h>
class tst_compile : public QObject
{
Q_OBJECT
public:
tst_compile() { }
private slots:
// Nothing - this test just makes sure that the QmlDevTools headers
// are present, and that we can link against the library.
};
QTEST_MAIN(tst_compile)
#include "tst_compile.moc"
TEMPLATE = subdirs
contains(QT_CONFIG, private_tests) {
SUBDIRS += \
compile
}
# Tests which should run in Pulse
PULSE_TESTS = $$SUBDIRS
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment