From 82444f5dff8257fede56b23ed898f9acd7cd2d61 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 9 May 2011 15:34:25 +1000 Subject: Add qglobal.h exports for QtLocation & QtSensors Plus the QtLocation configure options Reviewed-By: Lincoln Ramsay --- configure | 33 ++++++++++++++++++++++ src/corelib/global/qglobal.h | 66 ++++++++++++++++++++++++++++++-------------- 2 files changed, 79 insertions(+), 20 deletions(-) diff --git a/configure b/configure index e6956fbda9..f533958987 100755 --- a/configure +++ b/configure @@ -712,6 +712,7 @@ CFG_DECLARATIVE=auto CFG_DECLARATIVE_DEBUG=yes CFG_WEBKIT=auto # (yes|no|auto|debug) CFG_JAVASCRIPTCORE_JIT=auto +CFG_LOCATION=auto CFG_GFX_AVAILABLE="linuxfb transformed qvfb vnc multiscreen directfb" CFG_GFX_ON="linuxfb multiscreen" @@ -2145,6 +2146,17 @@ while [ "$#" -gt 0 ]; do [ "$VAL" = "auto" ] && VAL="yes" CFG_WEBKIT="$VAL" ;; + location) + if [ "$VAL" = "yes" ]; then + CFG_LOCATION="yes" + else + if [ "$VAL" = "no" ]; then + CFG_LOCATION="no" + else + UNKNOWN_OPT=yes + fi + fi + ;; javascript-jit) if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then CFG_JAVASCRIPTCORE_JIT="$VAL" @@ -3726,6 +3738,7 @@ Usage: $relconf [-h] [-prefix ] [-prefix-install] [-bindir ] [-libdir [-no-javascript-jit] [-javascript-jit] [-no-script] [-script] [-no-scripttools] [-scripttools] [-no-declarative] [-declarative] [-no-declarative-debug] [-declarative-debug] + [-no-location] [-location] [additional platform specific options (see below)] @@ -3897,6 +3910,9 @@ fi -no-declarative-debug ..... Do not build the declarative debugging support. + -declarative-debug ....... Build the declarative debugging support. + -no-location ....... Do not build the QtLocation module. + + -location .......... Build the QtLocation module. + -platform target ... The operating system and compiler you are building on ($PLATFORM). @@ -7659,6 +7675,22 @@ else QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DECLARATIVE" fi +if [ "$CFG_LOCATION" = "auto" ]; then + CFG_LOCATION="$CFG_GUI" +fi + +if [ "$CFG_LOCATION" = "yes" ] && [ "$CFG_GUI" = "no" ]; then + echo "QtLocation requested, but it can't be built without QtGui" + exit 1 +fi + +#Disable QtLocation until ready +CFG_LOCATION="no" + +if [ "$CFG_LOCATION" = "no" ]; then + QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_LOCATION" +fi + if [ "$CFG_EXCEPTIONS" = "no" ]; then case "$COMPILER" in g++*) @@ -8679,6 +8711,7 @@ echo "Declarative module ..... $CFG_DECLARATIVE" if [ "$CFG_DECLARATIVE" = "yes" ]; then echo "Declarative debugging ...$CFG_DECLARATIVE_DEBUG" fi +echo "Location module ........ $CFG_LOCATION" echo "Support for S60 ........ $CFG_S60" echo "Symbian DEF files ...... $CFG_SYMBIAN_DEFFILES" echo "STL support ............ $CFG_STL" diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 0c861990fa..35edcdb1a1 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -1368,6 +1368,16 @@ class QDataStream; # else # define Q_DBUS_EXPORT Q_DECL_IMPORT # endif +# if defined(QT_BUILD_LOCATION_LIB) +# define Q_LOCATION_EXPORT Q_DECL_EXPORT +# else +# define Q_LOCATION_EXPORT Q_DECL_IMPORT +# endif +# if defined(QT_BUILD_SENSORS_LIB) +# define Q_SENSORS_EXPORT Q_DECL_EXPORT +# else +# define Q_SENSORS_EXPORT Q_DECL_IMPORT +# endif # define Q_TEMPLATEDLL # elif defined(QT_DLL) /* use a Qt DLL library */ # define Q_CORE_EXPORT Q_DECL_IMPORT @@ -1386,6 +1396,8 @@ class QDataStream; # define Q_SCRIPTTOOLS_EXPORT Q_DECL_IMPORT # define Q_COMPAT_EXPORT Q_DECL_IMPORT # define Q_DBUS_EXPORT Q_DECL_IMPORT +# define Q_LOCATION_EXPORT Q_DECL_IMPORT +# define Q_SENSORS_EXPORT Q_DECL_IMPORT # define Q_TEMPLATEDLL # endif # define Q_NO_DECLARED_NOT_DEFINED @@ -1415,6 +1427,8 @@ class QDataStream; # define Q_SCRIPTTOOLS_EXPORT Q_DECL_EXPORT # define Q_COMPAT_EXPORT Q_DECL_EXPORT # define Q_DBUS_EXPORT Q_DECL_EXPORT +# define Q_LOCATION_EXPORT Q_DECL_EXPORT +# define Q_SENSORS_EXPORT Q_DECL_EXPORT # else # define Q_CORE_EXPORT # define Q_GUI_EXPORT @@ -1430,6 +1444,8 @@ class QDataStream; # define Q_SCRIPTTOOLS_EXPORT # define Q_COMPAT_EXPORT # define Q_DBUS_EXPORT +# define Q_LOCATION_EXPORT +# define Q_SENSORS_EXPORT # endif #endif @@ -2591,26 +2607,28 @@ Q_CORE_EXPORT int qt_symbian_exception2Error(const std::exception& ex); */ /* Qt modules */ -#define QT_MODULE_CORE 0x00001 -#define QT_MODULE_GUI 0x00002 -#define QT_MODULE_NETWORK 0x00004 -#define QT_MODULE_OPENGL 0x00008 -#define QT_MODULE_SQL 0x00010 -#define QT_MODULE_XML 0x00020 -#define QT_MODULE_QT3SUPPORTLIGHT 0x00040 -#define QT_MODULE_QT3SUPPORT 0x00080 -#define QT_MODULE_SVG 0x00100 -#define QT_MODULE_ACTIVEQT 0x00200 -#define QT_MODULE_GRAPHICSVIEW 0x00400 -#define QT_MODULE_SCRIPT 0x00800 -#define QT_MODULE_XMLPATTERNS 0x01000 -#define QT_MODULE_HELP 0x02000 -#define QT_MODULE_TEST 0x04000 -#define QT_MODULE_DBUS 0x08000 -#define QT_MODULE_SCRIPTTOOLS 0x10000 -#define QT_MODULE_OPENVG 0x20000 -#define QT_MODULE_MULTIMEDIA 0x40000 -#define QT_MODULE_DECLARATIVE 0x80000 +#define QT_MODULE_CORE 0x000001 +#define QT_MODULE_GUI 0x000002 +#define QT_MODULE_NETWORK 0x000004 +#define QT_MODULE_OPENGL 0x000008 +#define QT_MODULE_SQL 0x000010 +#define QT_MODULE_XML 0x000020 +#define QT_MODULE_QT3SUPPORTLIGHT 0x000040 +#define QT_MODULE_QT3SUPPORT 0x000080 +#define QT_MODULE_SVG 0x000100 +#define QT_MODULE_ACTIVEQT 0x000200 +#define QT_MODULE_GRAPHICSVIEW 0x000400 +#define QT_MODULE_SCRIPT 0x000800 +#define QT_MODULE_XMLPATTERNS 0x001000 +#define QT_MODULE_HELP 0x002000 +#define QT_MODULE_TEST 0x004000 +#define QT_MODULE_DBUS 0x008000 +#define QT_MODULE_SCRIPTTOOLS 0x010000 +#define QT_MODULE_OPENVG 0x020000 +#define QT_MODULE_MULTIMEDIA 0x040000 +#define QT_MODULE_DECLARATIVE 0x080000 +#define QT_MODULE_LOCATION 0x100000 +#define QT_MODULE_SENSORS 0x200000 /* Qt editions */ #define QT_EDITION_CONSOLE (QT_MODULE_CORE \ @@ -2646,6 +2664,8 @@ Q_CORE_EXPORT int qt_symbian_exception2Error(const std::exception& ex); | QT_MODULE_HELP \ | QT_MODULE_TEST \ | QT_MODULE_DBUS \ + | QT_MODULE_LOCATION \ + | QT_MODULE_SENSORS \ | QT_MODULE_ACTIVEQT) #define QT_EDITION_DESKTOP (QT_EDITION_OPENSOURCE) #define QT_EDITION_UNIVERSAL QT_EDITION_DESKTOP @@ -2725,6 +2745,12 @@ QT_LICENSED_MODULE(Test) #if (QT_EDITION & QT_MODULE_DBUS) QT_LICENSED_MODULE(DBus) #endif +#if (QT_EDITION & QT_MODULE_LOCATION) +QT_LICENSED_MODULE(Location) +#endif +#if (QT_EDITION & QT_MODULE_SENSORS) +QT_LICENSED_MODULE(Sensors) +#endif #define QT_MODULE(x) \ typedef QtValidLicenseFor##x##Module Qt##x##Module; -- cgit v1.2.3