summaryrefslogtreecommitdiffstats
path: root/tools/qmlviewer
diff options
context:
space:
mode:
Diffstat (limited to 'tools/qmlviewer')
-rw-r--r--tools/qmlviewer/deviceorientation.cpp2
-rw-r--r--tools/qmlviewer/deviceorientation.h4
-rw-r--r--tools/qmlviewer/main.cpp2
-rw-r--r--tools/qmlviewer/proxysettings.cpp4
-rw-r--r--tools/qmlviewer/proxysettings.h3
-rw-r--r--tools/qmlviewer/qfxtester.h20
-rw-r--r--tools/qmlviewer/qmlfolderlistmodel.cpp2
-rw-r--r--tools/qmlviewer/qmlfolderlistmodel.h4
-rw-r--r--tools/qmlviewer/qmlviewer.cpp17
-rw-r--r--tools/qmlviewer/qmlviewer.pro6
10 files changed, 57 insertions, 7 deletions
diff --git a/tools/qmlviewer/deviceorientation.cpp b/tools/qmlviewer/deviceorientation.cpp
index c507479..0fb4a5a 100644
--- a/tools/qmlviewer/deviceorientation.cpp
+++ b/tools/qmlviewer/deviceorientation.cpp
@@ -41,6 +41,8 @@
#include "deviceorientation.h"
+QT_USE_NAMESPACE
+
class DefaultDeviceOrientation : public DeviceOrientation
{
Q_OBJECT
diff --git a/tools/qmlviewer/deviceorientation.h b/tools/qmlviewer/deviceorientation.h
index fa7758f..efd45b3 100644
--- a/tools/qmlviewer/deviceorientation.h
+++ b/tools/qmlviewer/deviceorientation.h
@@ -44,6 +44,8 @@
#include <QObject>
+QT_BEGIN_NAMESPACE
+
class DeviceOrientationPrivate;
class DeviceOrientation : public QObject
{
@@ -66,4 +68,6 @@ private:
friend class DeviceOrientationPrivate;
};
+QT_END_NAMESPACE
+
#endif
diff --git a/tools/qmlviewer/main.cpp b/tools/qmlviewer/main.cpp
index b7a3f1a..14a4735 100644
--- a/tools/qmlviewer/main.cpp
+++ b/tools/qmlviewer/main.cpp
@@ -47,6 +47,8 @@
#include <QTranslator>
#include <QDebug>
+QT_USE_NAMESPACE
+
#if defined (Q_OS_SYMBIAN)
#include <unistd.h>
#include <sys/types.h>
diff --git a/tools/qmlviewer/proxysettings.cpp b/tools/qmlviewer/proxysettings.cpp
index 52fa74f..c3ec32e 100644
--- a/tools/qmlviewer/proxysettings.cpp
+++ b/tools/qmlviewer/proxysettings.cpp
@@ -45,6 +45,8 @@
#include "proxysettings.h"
+QT_BEGIN_NAMESPACE
+
ProxySettings::ProxySettings (QWidget * parent)
: QDialog (parent), Ui::ProxySettings()
{
@@ -104,3 +106,5 @@ bool ProxySettings::httpProxyInUse()
QSettings settings;
return settings.value ("http_proxy/use", 0).toBool ();
}
+
+QT_END_NAMESPACE
diff --git a/tools/qmlviewer/proxysettings.h b/tools/qmlviewer/proxysettings.h
index b2f3e25..2392127 100644
--- a/tools/qmlviewer/proxysettings.h
+++ b/tools/qmlviewer/proxysettings.h
@@ -46,6 +46,7 @@
#include <QNetworkProxy>
#include "ui_proxysettings.h"
+QT_BEGIN_NAMESPACE
/**
*/
class ProxySettings : public QDialog, public Ui::ProxySettings
@@ -65,4 +66,6 @@ public slots:
virtual void accept ();
};
+QT_END_NAMESPACE
+
#endif // PROXYSETTINGS_H
diff --git a/tools/qmlviewer/qfxtester.h b/tools/qmlviewer/qfxtester.h
index 303ac3a..0a10763 100644
--- a/tools/qmlviewer/qfxtester.h
+++ b/tools/qmlviewer/qfxtester.h
@@ -65,8 +65,13 @@ public:
private:
QList<QObject *> m_events;
};
+
+QT_END_NAMESPACE
+
QML_DECLARE_TYPE(QmlGraphicsVisualTest)
+QT_BEGIN_NAMESPACE
+
class QmlGraphicsVisualTestFrame : public QObject
{
Q_OBJECT
@@ -90,8 +95,13 @@ private:
QString m_hash;
QUrl m_image;
};
+
+QT_END_NAMESPACE
+
QML_DECLARE_TYPE(QmlGraphicsVisualTestFrame)
+QT_BEGIN_NAMESPACE
+
class QmlGraphicsVisualTestMouse : public QObject
{
Q_OBJECT
@@ -134,8 +144,13 @@ private:
int m_modifiers;
bool m_viewport;
};
+
+QT_END_NAMESPACE
+
QML_DECLARE_TYPE(QmlGraphicsVisualTestMouse)
+QT_BEGIN_NAMESPACE
+
class QmlGraphicsVisualTestKey : public QObject
{
Q_OBJECT
@@ -178,8 +193,13 @@ private:
int m_count;
bool m_viewport;
};
+
+QT_END_NAMESPACE
+
QML_DECLARE_TYPE(QmlGraphicsVisualTestKey)
+QT_BEGIN_NAMESPACE
+
class QmlGraphicsTester : public QAbstractAnimation
{
public:
diff --git a/tools/qmlviewer/qmlfolderlistmodel.cpp b/tools/qmlviewer/qmlfolderlistmodel.cpp
index 35c672d..cf63fec 100644
--- a/tools/qmlviewer/qmlfolderlistmodel.cpp
+++ b/tools/qmlviewer/qmlfolderlistmodel.cpp
@@ -44,6 +44,8 @@
#include <QDebug>
#include <qmlcontext.h>
+QT_BEGIN_NAMESPACE
+
class QmlFolderListModelPrivate
{
public:
diff --git a/tools/qmlviewer/qmlfolderlistmodel.h b/tools/qmlviewer/qmlfolderlistmodel.h
index 7357954..188ac27 100644
--- a/tools/qmlviewer/qmlfolderlistmodel.h
+++ b/tools/qmlviewer/qmlfolderlistmodel.h
@@ -45,6 +45,8 @@
#include <qml.h>
#include "../../src/declarative/3rdparty/qlistmodelinterface_p.h"
+QT_BEGIN_NAMESPACE
+
class QmlContext;
class QModelIndex;
@@ -114,6 +116,8 @@ private:
QmlFolderListModelPrivate *d;
};
+QT_END_NAMESPACE
+
QML_DECLARE_TYPE(QmlFolderListModel)
#endif // QMLFOLDERLISTMODEL_H
diff --git a/tools/qmlviewer/qmlviewer.cpp b/tools/qmlviewer/qmlviewer.cpp
index 1566473..7c620ef 100644
--- a/tools/qmlviewer/qmlviewer.cpp
+++ b/tools/qmlviewer/qmlviewer.cpp
@@ -52,8 +52,9 @@
#include <QAbstractAnimation>
#include "deviceskin.h"
-#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 2))
+#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 3))
#include <private/qzipreader_p.h>
+#define QMLVIEWER_ZIP_SUPPORT
#endif
#include <QSettings>
@@ -107,7 +108,6 @@
QT_BEGIN_NAMESPACE
-
class Screen : public QObject
{
Q_OBJECT
@@ -130,7 +130,12 @@ signals:
void orientationChanged();
};
+QT_END_NAMESPACE
+
QML_DECLARE_TYPE(Screen)
+
+QT_BEGIN_NAMESPACE
+
QML_DEFINE_TYPE(QmlViewer, 1, 0, Screen, Screen)
class SizedMenuBar : public QMenuBar
@@ -866,7 +871,7 @@ void QmlViewer::reload()
void QmlViewer::open(const QString& doc)
{
-#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 2))
+#ifdef QMLVIEWER_ZIP_SUPPORT
if (doc.endsWith(".wgt",Qt::CaseInsensitive)
|| doc.endsWith(".wgz",Qt::CaseInsensitive)
|| doc.endsWith(".zip",Qt::CaseInsensitive))
@@ -878,7 +883,7 @@ void QmlViewer::open(const QString& doc)
void QmlViewer::openWgt(const QString& doc)
{
-#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 2))
+#ifdef QMLVIEWER_ZIP_SUPPORT
// XXX This functionality could be migrated to QmlView once refined
QUrl url(doc);
@@ -891,7 +896,7 @@ void QmlViewer::openWgt(const QString& doc)
#endif
}
-#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 2))
+#ifdef QMLVIEWER_ZIP_SUPPORT
static void removeRecursive(const QString& dirname)
{
QDir dir(dirname);
@@ -907,7 +912,7 @@ static void removeRecursive(const QString& dirname)
void QmlViewer::unpackWgt()
{
-#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 2))
+#ifdef QMLVIEWER_ZIP_SUPPORT
QByteArray all = wgtreply->readAll();
QBuffer buf(&all);
buf.open(QIODevice::ReadOnly);
diff --git a/tools/qmlviewer/qmlviewer.pro b/tools/qmlviewer/qmlviewer.pro
index 35e4ba8..aba3cf5 100644
--- a/tools/qmlviewer/qmlviewer.pro
+++ b/tools/qmlviewer/qmlviewer.pro
@@ -33,6 +33,7 @@ FORMS = recopts.ui \
proxysettings.ui
INCLUDEPATH += ../../include/QtDeclarative
INCLUDEPATH += ../../src/declarative/util
+INCLUDEPATH += ../../src/declarative/graphicsitems
include(../shared/deviceskin/deviceskin.pri)
target.path = $$[QT_INSTALL_BINS]
INSTALLS += target
@@ -41,8 +42,11 @@ wince* {
QT += scripttools \
xml \
xmlpatterns \
- webkit \
phonon
+
+ contains(QT_CONFIG, webkit) {
+ QT += webkit
+ }
}
symbian {
# TARGET.UID3 =