Move uitools from QtTools to QtBase
This commit is contained in:
parent
a3d79d1d3c
commit
80473d3c2c
12
src/modules/qt_uilib.pri
Normal file
12
src/modules/qt_uilib.pri
Normal file
@ -0,0 +1,12 @@
|
||||
QT_UILIB_VERSION = $$QT_VERSION
|
||||
QT_UILIB_MAJOR_VERSION = $$QT_MAJOR_VERSION
|
||||
QT_UILIB_MINOR_VERSION = $$QT_MINOR_VERSION
|
||||
QT_UILIB_PATCH_VERSION = $$QT_PATCH_VERSION
|
||||
|
||||
QT.uilib.name =
|
||||
QT.uilib.bins = $$QT_MODULE_BIN_BASE
|
||||
QT.uilib.includes = $$QT_MODULE_INCLUDE_BASE/QtDesigner
|
||||
QT.uilib.private_includes = $$QT_MODULE_INCLUDE_BASE/QtDesigner/private
|
||||
QT.uilib.sources = $$QT_MODULE_BASE/tools/uilib
|
||||
QT.uilib.libs = $$QT_MODULE_LIB_BASE
|
||||
QT.uilib.depends = xml
|
15
src/modules/qt_uitools.pri
Normal file
15
src/modules/qt_uitools.pri
Normal file
@ -0,0 +1,15 @@
|
||||
QT_UITOOLS_VERSION = $$QT_VERSION
|
||||
QT_UITOOLS_MAJOR_VERSION = $$QT_MAJOR_VERSION
|
||||
QT_UITOOLS_MINOR_VERSION = $$QT_MINOR_VERSION
|
||||
QT_UITOOLS_PATCH_VERSION = $$QT_PATCH_VERSION
|
||||
|
||||
QT.uitools.name = QtUiTools
|
||||
QT.uitools.bins = $$QT_MODULE_BIN_BASE
|
||||
QT.uitools.includes = $$QT_MODULE_INCLUDE_BASE/QtUiTools
|
||||
QT.uitools.private_includes = $$QT_MODULE_INCLUDE_BASE/QtUiTools/private
|
||||
QT.uitools.sources = $$QT_MODULE_BASE/src/uitools
|
||||
QT.uitools.libs = $$QT_MODULE_LIB_BASE
|
||||
QT.uitools.depends = xml
|
||||
QT.uitools.DEFINES = QT_UITOOLS_LIB
|
||||
|
||||
QT_CONFIG += uitools
|
@ -4,7 +4,7 @@ TEMPLATE = subdirs
|
||||
unset(SRC_SUBDIRS)
|
||||
win32:SRC_SUBDIRS += src_winmain
|
||||
symbian:SRC_SUBDIRS += src_s60main
|
||||
SRC_SUBDIRS += src_corelib src_network src_sql src_testlib src_xml
|
||||
SRC_SUBDIRS += src_corelib src_network src_sql src_testlib src_xml src_uitools
|
||||
nacl: SRC_SUBDIRS -= src_network src_testlib
|
||||
!symbian:contains(QT_CONFIG, dbus):SRC_SUBDIRS += src_dbus
|
||||
!contains(QT_CONFIG, no-gui): SRC_SUBDIRS += src_gui
|
||||
@ -29,6 +29,8 @@ src_corelib.subdir = $$QT_SOURCE_TREE/src/corelib
|
||||
src_corelib.target = sub-corelib
|
||||
src_xml.subdir = $$QT_SOURCE_TREE/src/xml
|
||||
src_xml.target = sub-xml
|
||||
src_uitools.subdir = $$QT_SOURCE_TREE/src/uitools
|
||||
src_uitools.target = sub-uitools
|
||||
src_dbus.subdir = $$QT_SOURCE_TREE/src/dbus
|
||||
src_dbus.target = sub-dbus
|
||||
src_gui.subdir = $$QT_SOURCE_TREE/src/gui
|
||||
@ -52,6 +54,7 @@ src_testlib.target = sub-testlib
|
||||
src_gui.depends = src_corelib src_tools_uic
|
||||
embedded: src_gui.depends += src_network
|
||||
src_xml.depends = src_corelib
|
||||
src_uitools.depends = src_corelib src_xml
|
||||
src_dbus.depends = src_corelib src_xml
|
||||
src_network.depends = src_corelib
|
||||
src_opengl.depends = src_gui
|
||||
|
@ -1,9 +1,9 @@
|
||||
MODULE = uitools
|
||||
QPRO_PWD = $$PWD
|
||||
TEMPLATE = lib
|
||||
TARGET = QtUiTools
|
||||
QT += xml
|
||||
TARGET = $$qtLibraryTarget(QtUiTools)
|
||||
QT = core xml
|
||||
CONFIG += qt staticlib
|
||||
DESTDIR = ../../../../lib
|
||||
DLLDESTDIR = ../../../../bin
|
||||
|
||||
symbian {
|
||||
TARGET.UID3 = 0x2001E628
|
||||
@ -18,11 +18,11 @@ isEmpty(QT_MAJOR_VERSION) {
|
||||
} else {
|
||||
VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION}
|
||||
}
|
||||
include(../../../../src/qt_targets.pri)
|
||||
include(../qt_targets.pri)
|
||||
QMAKE_TARGET_PRODUCT = UiLoader
|
||||
QMAKE_TARGET_DESCRIPTION = QUiLoader
|
||||
|
||||
include(../lib/uilib/uilib.pri)
|
||||
include(../../tools/uilib/uilib.pri)
|
||||
|
||||
HEADERS += quiloader.h
|
||||
SOURCES += quiloader.cpp
|
||||
|
@ -8,6 +8,8 @@
|
||||
"QtNetwork" => "$basedir/src/network",
|
||||
"QtTest" => "$basedir/src/testlib",
|
||||
"QtDBus" => "$basedir/src/dbus",
|
||||
"QtUiTools" => "$basedir/src/uitools",
|
||||
"QtDesigner" => "$basedir/tools/uilib",
|
||||
);
|
||||
%moduleheaders = ( # restrict the module headers to those found in relative path
|
||||
);
|
||||
@ -34,6 +36,8 @@
|
||||
"opengl" => "#include <QtOpenGL/QtOpenGL>\n",
|
||||
"openvg" => "#include <QtOpenVG/QtOpenVG>\n",
|
||||
"xml" => "#include <QtXml/QtXml>\n",
|
||||
"uitools" => "#include <QtUiTools/QtUiTools>\n",
|
||||
"designer" => "#include <QtDesigner/QtDesigner>\n",
|
||||
);
|
||||
%modulepris = (
|
||||
"QtCore" => "$basedir/src/modules/qt_core.pri",
|
||||
@ -45,6 +49,8 @@
|
||||
"QtSql" => "$basedir/src/modules/qt_sql.pri",
|
||||
"QtTest" => "$basedir/src/modules/qt_testlib.pri",
|
||||
"QtXml" => "$basedir/src/modules/qt_xml.pri",
|
||||
"QtUiTools" => "$basedir/src/modules/qt_uitools.pri",
|
||||
"QtDesigner" => "$basedir/src/modules/qt_uilib.pri",
|
||||
);
|
||||
|
||||
@ignore_for_master_contents = ( "qt.h", "qpaintdevicedefs.h" );
|
||||
|
@ -42,7 +42,7 @@
|
||||
#ifndef ABSTRACTFORMBUILDER_H
|
||||
#define ABSTRACTFORMBUILDER_H
|
||||
|
||||
#include <QtDesigner/uilib_global.h>
|
||||
#include "uilib_global.h"
|
||||
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QHash>
|
||||
|
@ -42,7 +42,7 @@
|
||||
#ifndef CUSTOMWIDGET_H
|
||||
#define CUSTOMWIDGET_H
|
||||
|
||||
#include <QtDesigner/extension.h>
|
||||
#include "extension.h"
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QString>
|
||||
#include <QtGui/QIcon>
|
||||
|
109
tools/uilib/extension.h
Normal file
109
tools/uilib/extension.h
Normal file
@ -0,0 +1,109 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** All rights reserved.
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
** This file is part of the Qt Designer of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** No Commercial Usage
|
||||
** This file contains pre-release code and may not be distributed.
|
||||
** You may use this file in accordance with the terms and conditions
|
||||
** contained in the Technology Preview License Agreement accompanying
|
||||
** this package.
|
||||
**
|
||||
** 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.
|
||||
**
|
||||
** 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.
|
||||
**
|
||||
** If you have questions regarding the use of this file, please contact
|
||||
** Nokia at qt-info@nokia.com.
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef EXTENSION_H
|
||||
#define EXTENSION_H
|
||||
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QObject>
|
||||
|
||||
QT_BEGIN_HEADER
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#define Q_TYPEID(IFace) QLatin1String(IFace##_iid)
|
||||
|
||||
class QAbstractExtensionFactory
|
||||
{
|
||||
public:
|
||||
virtual ~QAbstractExtensionFactory() {}
|
||||
|
||||
virtual QObject *extension(QObject *object, const QString &iid) const = 0;
|
||||
};
|
||||
Q_DECLARE_INTERFACE(QAbstractExtensionFactory, "com.trolltech.Qt.QAbstractExtensionFactory")
|
||||
|
||||
class QAbstractExtensionManager
|
||||
{
|
||||
public:
|
||||
virtual ~QAbstractExtensionManager() {}
|
||||
|
||||
virtual void registerExtensions(QAbstractExtensionFactory *factory, const QString &iid) = 0;
|
||||
virtual void unregisterExtensions(QAbstractExtensionFactory *factory, const QString &iid) = 0;
|
||||
|
||||
virtual QObject *extension(QObject *object, const QString &iid) const = 0;
|
||||
};
|
||||
Q_DECLARE_INTERFACE(QAbstractExtensionManager, "com.trolltech.Qt.QAbstractExtensionManager")
|
||||
|
||||
#if defined(Q_CC_MSVC) && (_MSC_VER < 1300)
|
||||
|
||||
template <class T>
|
||||
inline T qt_extension_helper(QAbstractExtensionManager *, QObject *, T)
|
||||
{ return 0; }
|
||||
|
||||
template <class T>
|
||||
inline T qt_extension(QAbstractExtensionManager* manager, QObject *object)
|
||||
{ return qt_extension_helper(manager, object, T(0)); }
|
||||
|
||||
#define Q_DECLARE_EXTENSION_INTERFACE(IFace, IId) \
|
||||
const char * const IFace##_iid = IId; \
|
||||
Q_DECLARE_INTERFACE(IFace, IId) \
|
||||
template <> inline IFace *qt_extension_helper<IFace *>(QAbstractExtensionManager *manager, QObject *object, IFace *) \
|
||||
{ QObject *extension = manager->extension(object, Q_TYPEID(IFace)); return (IFace *)(extension ? extension->qt_metacast(IFace##_iid) : 0); }
|
||||
|
||||
#else
|
||||
|
||||
template <class T>
|
||||
inline T qt_extension(QAbstractExtensionManager* manager, QObject *object)
|
||||
{ return 0; }
|
||||
|
||||
#define Q_DECLARE_EXTENSION_INTERFACE(IFace, IId) \
|
||||
const char * const IFace##_iid = IId; \
|
||||
Q_DECLARE_INTERFACE(IFace, IId) \
|
||||
template <> inline IFace *qt_extension<IFace *>(QAbstractExtensionManager *manager, QObject *object) \
|
||||
{ QObject *extension = manager->extension(object, Q_TYPEID(IFace)); return extension ? static_cast<IFace *>(extension->qt_metacast(IFace##_iid)) : static_cast<IFace *>(0); }
|
||||
|
||||
#endif
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
QT_END_HEADER
|
||||
|
||||
#endif // EXTENSION_H
|
@ -42,8 +42,8 @@
|
||||
#ifndef FORMBUILDER_H
|
||||
#define FORMBUILDER_H
|
||||
|
||||
#include <QtDesigner/uilib_global.h>
|
||||
#include <QtDesigner/QAbstractFormBuilder>
|
||||
#include "uilib_global.h"
|
||||
#include "abstractformbuilder.h"
|
||||
|
||||
#include <QtCore/QStringList>
|
||||
#include <QtCore/QMap>
|
||||
|
@ -53,7 +53,7 @@
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtDesigner/uilib_global.h>
|
||||
#include "uilib_global.h"
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QFlags>
|
||||
#include <QtCore/QString>
|
||||
|
@ -53,7 +53,7 @@
|
||||
#ifndef UILIBPROPERTIES_H
|
||||
#define UILIBPROPERTIES_H
|
||||
|
||||
#include <QtDesigner/uilib_global.h>
|
||||
#include "uilib_global.h"
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QMetaProperty>
|
||||
|
@ -53,7 +53,7 @@
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtDesigner/uilib_global.h>
|
||||
#include "uilib_global.h"
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QString>
|
||||
|
||||
|
@ -53,7 +53,7 @@
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtDesigner/uilib_global.h>
|
||||
#include "uilib_global.h"
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QString>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user