summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qstylefactory.cpp
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@digia.com>2013-03-04 10:16:42 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-05 08:31:23 +0100
commit97fcf3bc987a18f32233fea550eb4a5a22e2b822 (patch)
tree31d75557fdc4a525af8f5053db514066c63bd1bd /src/widgets/styles/qstylefactory.cpp
parent1b582d64eb6d13e60a02ebc40956302a4864eb6c (diff)
Introducing the Qt Android port
Based on the Necessitas project by Bogdan Vatra. Contributors to the Qt5 project: BogDan Vatra <bogdan@kde.org> Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> hjk <hjk121@nokiamail.com> Oswald Buddenhagen <oswald.buddenhagen@digia.com> Paul Olav Tvete <paul.tvete@digia.com> Robin Burchell <robin+qt@viroteck.net> Samuel Rødal <samuel.rodal@digia.com> Yoann Lopes <yoann.lopes@digia.com> The full history of the Qt5 port can be found in refs/old-heads/android, SHA-1 249ca9ca2c7d876b91b31df9434dde47f9065d0d Change-Id: Iff1a7b2dbb707c986f2639e65e39ed8f22430120 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/widgets/styles/qstylefactory.cpp')
-rw-r--r--src/widgets/styles/qstylefactory.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/widgets/styles/qstylefactory.cpp b/src/widgets/styles/qstylefactory.cpp
index 471d3b748d..5028371e23 100644
--- a/src/widgets/styles/qstylefactory.cpp
+++ b/src/widgets/styles/qstylefactory.cpp
@@ -48,6 +48,9 @@
#include "qwindowsstyle_p.h"
#ifndef QT_NO_STYLE_FUSION
#include "qfusionstyle_p.h"
+#ifndef QT_NO_STYLE_ANDROID
+#include "qandroidstyle_p.h"
+#endif
#endif
#ifndef QT_NO_STYLE_GTK
#include "qgtkstyle_p.h"
@@ -143,6 +146,11 @@ QStyle *QStyleFactory::create(const QString& key)
ret = new QFusionStyle;
else
#endif
+#ifndef QT_NO_STYLE_ANDROID
+ if (style == QLatin1String("android"))
+ ret = new QAndroidStyle;
+ else
+#endif
#ifndef QT_NO_STYLE_GTK
if (style == QLatin1String("gtk") || style == QLatin1String("gtk+"))
ret = new QGtkStyle;
@@ -206,6 +214,10 @@ QStringList QStyleFactory::keys()
(QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA && (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based)))
list << QLatin1String("WindowsVista");
#endif
+#ifndef QT_NO_STYLE_ANDROID
+ if (!list.contains(QLatin1String("Android")))
+ list << QLatin1String("Android");
+#endif
#ifndef QT_NO_STYLE_GTK
if (!list.contains(QLatin1String("GTK+")))
list << QLatin1String("GTK+");