summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorGareth Stockwell <ext-gareth.stockwell@nokia.com>2009-11-03 13:42:29 (GMT)
committerGareth Stockwell <ext-gareth.stockwell@nokia.com>2009-11-03 13:42:29 (GMT)
commit63f2cc8d9526d3fd8a64e62be2a469bf0eee54f0 (patch)
tree7e6724964ceb6e38f478074780f06df0bdd11dbd /src/plugins
parent6a89291da7e1322ad81c4939cc9d69db01957a4c (diff)
parentdc89c842779f87ce69882ba54fa8d5bb79e0edbd (diff)
downloadQt-63f2cc8d9526d3fd8a64e62be2a469bf0eee54f0.zip
Qt-63f2cc8d9526d3fd8a64e62be2a469bf0eee54f0.tar.gz
Qt-63f2cc8d9526d3fd8a64e62be2a469bf0eee54f0.tar.bz2
Merge branch '4.6' into mmfphonon
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/gfxdrivers/qvfb/main.cpp2
-rw-r--r--src/plugins/gfxdrivers/transformed/main.cpp8
-rw-r--r--src/plugins/gfxdrivers/vnc/main.cpp8
-rw-r--r--src/plugins/graphicssystems/graphicssystems.pro2
-rw-r--r--src/plugins/s60/src/qlocale_3_1.cpp96
-rw-r--r--src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro6
6 files changed, 111 insertions, 11 deletions
diff --git a/src/plugins/gfxdrivers/qvfb/main.cpp b/src/plugins/gfxdrivers/qvfb/main.cpp
index bcaecab..beca37e 100644
--- a/src/plugins/gfxdrivers/qvfb/main.cpp
+++ b/src/plugins/gfxdrivers/qvfb/main.cpp
@@ -43,6 +43,7 @@
#include <qscreenvfb_qws.h>
#include <qstringlist.h>
+#ifndef QT_NO_LIBRARY
QT_BEGIN_NAMESPACE
class ScreenVfbDriver : public QScreenDriverPlugin
@@ -78,3 +79,4 @@ Q_EXPORT_STATIC_PLUGIN(ScreenVfbDriver)
Q_EXPORT_PLUGIN2(qscreenvfb, ScreenVfbDriver)
QT_END_NAMESPACE
+#endif //QT_NO_LIBRARY
diff --git a/src/plugins/gfxdrivers/transformed/main.cpp b/src/plugins/gfxdrivers/transformed/main.cpp
index 982882e..a9ff97d 100644
--- a/src/plugins/gfxdrivers/transformed/main.cpp
+++ b/src/plugins/gfxdrivers/transformed/main.cpp
@@ -42,7 +42,7 @@
#include <qscreendriverplugin_qws.h>
#include <qscreentransformed_qws.h>
#include <qstringlist.h>
-
+#ifndef QT_NO_LIBRARY
QT_BEGIN_NAMESPACE
class GfxTransformedDriver : public QScreenDriverPlugin
@@ -68,9 +68,12 @@ QStringList GfxTransformedDriver::keys() const
QScreen* GfxTransformedDriver::create(const QString& driver, int displayId)
{
+#ifndef QT_NO_QWS_TRANSFORMED
if (driver.toLower() == "transformed")
return new QTransformedScreen(displayId);
-
+#else //QT_NO_QWS_TRANSFORMED
+ printf("QT buildt with QT_NO_QWS_TRANSFORMED. No screen driver returned\n");
+#endif //QT_NO_QWS_TRANSFORMED
return 0;
}
@@ -78,3 +81,4 @@ Q_EXPORT_STATIC_PLUGIN(GfxTransformedDriver)
Q_EXPORT_PLUGIN2(qgfxtransformed, GfxTransformedDriver)
QT_END_NAMESPACE
+#endif //QT_NO_LIBRARY
diff --git a/src/plugins/gfxdrivers/vnc/main.cpp b/src/plugins/gfxdrivers/vnc/main.cpp
index aa20d11..58c8c25 100644
--- a/src/plugins/gfxdrivers/vnc/main.cpp
+++ b/src/plugins/gfxdrivers/vnc/main.cpp
@@ -43,6 +43,7 @@
#include <qscreenvnc_qws.h>
#include <qstringlist.h>
+#ifndef QT_NO_LIBRARY
QT_BEGIN_NAMESPACE
class GfxVncDriver : public QScreenDriverPlugin
@@ -68,9 +69,12 @@ QStringList GfxVncDriver::keys() const
QScreen* GfxVncDriver::create(const QString& driver, int displayId)
{
+#ifndef QT_NO_QWS_VNC
if (driver.toLower() == "vnc")
return new QVNCScreen(displayId);
-
+#else //QT_NO_QWS_VNC
+ printf("QT buildt with QT_NO_QWS_VNC. No screen driver returned\n");
+#endif //QT_NO_QWS_VNC
return 0;
}
@@ -78,3 +82,5 @@ Q_EXPORT_STATIC_PLUGIN(GfxVncDriver)
Q_EXPORT_PLUGIN2(qgfxvnc, GfxVncDriver)
QT_END_NAMESPACE
+
+#endif //QT_NO_LIBRARY
diff --git a/src/plugins/graphicssystems/graphicssystems.pro b/src/plugins/graphicssystems/graphicssystems.pro
index 14e3cfc..0788933 100644
--- a/src/plugins/graphicssystems/graphicssystems.pro
+++ b/src/plugins/graphicssystems/graphicssystems.pro
@@ -1,6 +1,6 @@
TEMPLATE = subdirs
SUBDIRS += trace
-contains(QT_CONFIG, opengl):SUBDIRS += opengl
+!wince*:contains(QT_CONFIG, opengl):SUBDIRS += opengl
contains(QT_CONFIG, openvg):contains(QT_CONFIG, egl):SUBDIRS += openvg
contains(QT_CONFIG, shivavg) {
diff --git a/src/plugins/s60/src/qlocale_3_1.cpp b/src/plugins/s60/src/qlocale_3_1.cpp
index 0afd10a..beeee7f 100644
--- a/src/plugins/s60/src/qlocale_3_1.cpp
+++ b/src/plugins/s60/src/qlocale_3_1.cpp
@@ -40,23 +40,109 @@
****************************************************************************/
#include <e32std.h>
+#include <e32const.h>
+#include <e32debug.h>
-EXPORT_C void defaultFormatL(TTime&, TDes& des, const TDesC&, const TLocale&)
+_LIT(KYear, "%Y");
+_LIT(KMonth, "%M");
+_LIT(KDay, "%D");
+_LIT(KLocaleIndependent, "%F");
+static TBuf<10> dateFormat;
+static TBuf<10> timeFormat;
+
+static void initialiseDateFormat()
+{
+ if(dateFormat.Length())
+ return;
+
+ TLocale locale;
+
+ //Separator 1 is used between 1st and 2nd components of the date
+ //Separator 2 is used between 2nd and 3rd components of the date
+ //Usually they are the same, but they are allowed to be different
+ TChar s1 = locale.DateSeparator(1);
+ TChar s2 = locale.DateSeparator(2);
+ dateFormat=KLocaleIndependent;
+ switch(locale.DateFormat()) {
+ case EDateAmerican:
+ dateFormat.Append(KMonth);
+ dateFormat.Append(s1);
+ dateFormat.Append(KDay);
+ dateFormat.Append(s2);
+ dateFormat.Append(KYear);
+ break;
+ case EDateEuropean:
+ dateFormat.Append(KDay);
+ dateFormat.Append(s1);
+ dateFormat.Append(KMonth);
+ dateFormat.Append(s2);
+ dateFormat.Append(KYear);
+ break;
+ case EDateJapanese:
+ default: //it's closest to ISO format
+ dateFormat.Append(KYear);
+ dateFormat.Append(s1);
+ dateFormat.Append(KMonth);
+ dateFormat.Append(s2);
+ dateFormat.Append(KDay);
+ break;
+ }
+#ifdef _DEBUG
+ RDebug::Print(_L("Date Format \"%S\""), &dateFormat);
+#endif
+}
+
+static void initialiseTimeFormat()
+{
+ if(timeFormat.Length())
+ return;
+
+ TLocale locale;
+ //Separator 1 is used between 1st and 2nd components of the time
+ //Separator 2 is used between 2nd and 3rd components of the time
+ //Usually they are the same, but they are allowed to be different
+ TChar s1 = locale.TimeSeparator(1);
+ TChar s2 = locale.TimeSeparator(2);
+ switch(locale.TimeFormat()) {
+ case ETime12:
+ timeFormat.Append(_L("%I"));
+ break;
+ case ETime24:
+ default:
+ timeFormat.Append(_L("%H"));
+ break;
+ }
+ timeFormat.Append(s1);
+ timeFormat.Append(_L("%T"));
+ timeFormat.Append(s2);
+ timeFormat.Append(_L("%S"));
+
+#ifdef _DEBUG
+ RDebug::Print(_L("Time Format \"%S\""), &timeFormat);
+#endif
+}
+
+EXPORT_C void defaultFormatL(TTime& time, TDes& des, const TDesC& fmt, const TLocale&)
{
- des.Zero();
+ //S60 3.1 does not support format for a specific locale, so use default locale
+ time.FormatL(des, fmt);
}
+//S60 3.1 doesn't support extended locale date&time formats, so use default locale
EXPORT_C TPtrC defaultGetTimeFormatSpec(TExtendedLocale&)
{
- return TPtrC(KNullDesC);
+ initialiseTimeFormat();
+ return TPtrC(timeFormat);
}
EXPORT_C TPtrC defaultGetLongDateFormatSpec(TExtendedLocale&)
{
- return TPtrC(KNullDesC);
+ initialiseDateFormat();
+ return TPtrC(dateFormat);
}
EXPORT_C TPtrC defaultGetShortDateFormatSpec(TExtendedLocale&)
{
- return TPtrC(KNullDesC);
+ initialiseDateFormat();
+ return TPtrC(dateFormat);
}
diff --git a/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro
index 4734144..158633d 100644
--- a/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro
+++ b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro
@@ -1,5 +1,7 @@
# Use subdirs template to suppress generation of unnecessary files
TEMPLATE = subdirs
-# We just want to extract the zip file containing sqlite binaries for Symbian
-BLD_INF_RULES.prj_exports += ":zip SQLite3_v9.2.zip"
+# We just want to export the sqlite3 binaries for Symbian for platforms that do not have them.
+!exists($${EPOCROOT}epoc32/release/armv5/lib/sqlite3.dso) {
+ BLD_INF_RULES.prj_exports += ":zip SQLite3_v9.2.zip"
+}