Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Extract all QtQuick 1 elements into a separate library/plugin.
Change-Id: I41a280de2739ee08202f4be2519e5012870090f2
Reviewed-on: http://codereview.qt.nokia.com/1391
Reviewed-by: Martin Jones <martin.jones@nokia.com>
  • Loading branch information
Martin Jones authored and Qt by Nokia committed Jul 12, 2011
1 parent b119220 commit 4442dea
Show file tree
Hide file tree
Showing 1,339 changed files with 39,882 additions and 9,610 deletions.
13 changes: 13 additions & 0 deletions doc/src/declarative/whatsnew.qdoc
Expand Up @@ -43,6 +43,19 @@ set binding when its \e when clause becomes false.
QDeclarativeExpression can now be directly (and more efficiently) constructed from a
QDeclarativeScriptString.

\section2 QtQuick 1 is now a separate library and module

Writing C++ applications using QtQuick 1 specific API, i.e. QDeclarativeView or QDeclarativeItem
requires adding the "qtquick1" module to the .pro file, e.g. QT += declarative qtquick1

QDeclarativeView and QDeclarativeItem headers are now in the QtQuick 1 module, i.e.
#include <QtQuick1/QDeclarativeView>
#include <QtQuick1/QDeclarativeItem>

"import QtQuick 1.0" loads the module dynamically. To deploy QtQuick 1 applications
the library (lib/libQtQuick1*) and plugin (imports/QtQuick/) must be installed.


\section1 Qt 4.7.4 includes QtQuick 1.1

QtQuick 1.1 is a minor feature update. \e {import QtQuick 1.1} to use the new
Expand Down
@@ -1,6 +1,6 @@
TEMPLATE = lib
CONFIG += qt plugin
QT += declarative
QT += declarative qtquick1

DESTDIR = ImageProviderCore
TARGET = qmlimageproviderplugin
Expand Down
Expand Up @@ -2,7 +2,7 @@ TEMPLATE = app
TARGET = networkaccessmanagerfactory
DEPENDPATH += .
INCLUDEPATH += .
QT += declarative network
QT += declarative network qtquick1

# Input
SOURCES += main.cpp
Expand Down
Expand Up @@ -2,7 +2,7 @@ TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += .
QT += declarative
QT += declarative qtquick1

SOURCES += main.cpp
RESOURCES += layoutitem.qrc
@@ -1,6 +1,6 @@
TEMPLATE = app
TARGET = qgraphicsgridlayout
QT += declarative
QT += declarative qtquick1

SOURCES += \
gridlayout.cpp \
Expand Down
@@ -1,6 +1,6 @@
TEMPLATE = app
TARGET = qgraphicslinearlayout
QT += declarative
QT += declarative qtquick1

SOURCES += \
linearlayout.cpp \
Expand Down
2 changes: 1 addition & 1 deletion examples/declarative/minehunt/main.cpp
Expand Up @@ -40,7 +40,7 @@
****************************************************************************/

#include <QtGui/QApplication>
#include <QtDeclarative/QDeclarativeView>
#include <QtQuick1/QDeclarativeView>
#include <QtDeclarative/QDeclarativeContext>
#include <QtDeclarative/QDeclarativeEngine>

Expand Down
2 changes: 1 addition & 1 deletion examples/declarative/minehunt/minehunt.pro
@@ -1,6 +1,6 @@
TEMPLATE = app
TARGET = minehunt
QT += declarative
QT += declarative qtquick1

# Input
HEADERS += minehunt.h
Expand Down
7 changes: 4 additions & 3 deletions examples/declarative/modelviews/objectlistmodel/main.cpp
Expand Up @@ -43,8 +43,8 @@
#include <qdeclarativeengine.h>
#include <qdeclarativecontext.h>
#include <qdeclarative.h>
#include <qdeclarativeitem.h>
#include <qdeclarativeview.h>
#include <qsgitem.h>
#include <qsgview.h>

#include "dataobject.h"

Expand All @@ -64,7 +64,8 @@ int main(int argc, char ** argv)
dataList.append(new DataObject("Item 3", "blue"));
dataList.append(new DataObject("Item 4", "yellow"));

QDeclarativeView view;
QSGView view;
view.setResizeMode(QSGView::SizeRootObjectToView);
QDeclarativeContext *ctxt = view.rootContext();
ctxt->setContextProperty("myModel", QVariant::fromValue(dataList));
//![0]
Expand Down
3 changes: 1 addition & 2 deletions examples/declarative/modelviews/objectlistmodel/view.qml
Expand Up @@ -38,12 +38,11 @@
**
****************************************************************************/

import QtQuick 1.0
import QtQuick 2.0

//![0]
ListView {
width: 100; height: 100
anchors.fill: parent

model: myModel
delegate: Rectangle {
Expand Down
6 changes: 3 additions & 3 deletions examples/declarative/modelviews/stringlistmodel/main.cpp
Expand Up @@ -43,8 +43,8 @@
#include <qdeclarativeengine.h>
#include <qdeclarativecontext.h>
#include <qdeclarative.h>
#include <qdeclarativeitem.h>
#include <qdeclarativeview.h>
#include <qsgitem.h>
#include <qsgview.h>


/*
Expand All @@ -63,7 +63,7 @@ int main(int argc, char ** argv)
dataList.append("Item 3");
dataList.append("Item 4");

QDeclarativeView view;
QSGView view;
QDeclarativeContext *ctxt = view.rootContext();
ctxt->setContextProperty("myModel", QVariant::fromValue(dataList));
//![0]
Expand Down
3 changes: 1 addition & 2 deletions examples/declarative/modelviews/stringlistmodel/view.qml
Expand Up @@ -38,12 +38,11 @@
**
****************************************************************************/

import QtQuick 1.0
import QtQuick 2.0
//![0]

ListView {
width: 100; height: 100
anchors.fill: parent

model: myModel
delegate: Rectangle {
Expand Down
@@ -1,4 +1,4 @@
QT += declarative
QT += declarative qtquick1

HEADERS += piechart.h
SOURCES += piechart.cpp \
Expand Down
@@ -1,4 +1,4 @@
QT += declarative
QT += declarative qtquick1

HEADERS += piechart.h
SOURCES += piechart.cpp \
Expand Down
@@ -1,4 +1,4 @@
QT += declarative
QT += declarative qtquick1

HEADERS += piechart.h
SOURCES += piechart.cpp \
Expand Down
@@ -1,4 +1,4 @@
QT += declarative
QT += declarative qtquick1

HEADERS += piechart.h \
pieslice.h
Expand Down
@@ -1,4 +1,4 @@
QT += declarative
QT += declarative qtquick1

HEADERS += piechart.h \
pieslice.h
Expand Down
@@ -1,6 +1,6 @@
TEMPLATE = lib
CONFIG += qt plugin
QT += declarative
QT += declarative qtquick1

DESTDIR = lib
OBJECTS_DIR = tmp
Expand Down
17 changes: 17 additions & 0 deletions modules/qt_qtquick1.pri
@@ -0,0 +1,17 @@
QT.qtquick1.VERSION = 5.0.0
QT.qtquick1.MAJOR_VERSION = 5
QT.qtquick1.MINOR_VERSION = 0
QT.qtquick1.PATCH_VERSION = 0

QT.qtquick1.name = QtQuick1
QT.qtquick1.bins = $$QT_MODULE_BIN_BASE
QT.qtquick1.includes = $$QT_MODULE_INCLUDE_BASE $$QT_MODULE_INCLUDE_BASE/QtQuick1
QT.qtquick1.private_includes = $$QT_MODULE_INCLUDE_BASE/QtQuick1/$$QT.qtquick1.VERSION
QT.qtquick1.sources = $$QT_MODULE_BASE/src/qtquick1
QT.qtquick1.libs = $$QT_MODULE_LIB_BASE
QT.qtquick1.plugins = $$QT_MODULE_PLUGIN_BASE
QT.qtquick1.imports = $$QT_MODULE_IMPORT_BASE
QT.qtquick1.depends = declarative
QT.qtquick1.DEFINES = QT_DECLARATIVE_LIB

QT_CONFIG += qtquick1
2 changes: 1 addition & 1 deletion src/declarative/debugger/qdeclarativedebugtrace_p.h
Expand Up @@ -63,7 +63,7 @@ struct QDeclarativeDebugData
};

class QUrl;
class Q_AUTOTEST_EXPORT QDeclarativeDebugTrace : public QDeclarativeDebugService
class Q_DECLARATIVE_EXPORT QDeclarativeDebugTrace : public QDeclarativeDebugService
{
public:
enum Message {
Expand Down
1 change: 0 additions & 1 deletion src/declarative/declarative.pro
Expand Up @@ -28,7 +28,6 @@ HEADERS += qtdeclarativeversion.h

#modules
include(util/util.pri)
include(graphicsitems/graphicsitems.pri)
include(qml/qml.pri)
include(debugger/debugger.pri)
include(scenegraph/scenegraph.pri)
Expand Down

0 comments on commit 4442dea

Please sign in to comment.