diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2010-02-15 01:47:52 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2010-02-15 01:47:52 (GMT) |
commit | fb28599786d069a2b99040bd7eee8c5ad8ef1ba9 (patch) | |
tree | 9a14a0274563ba9a4bfe4ba40742d56361e8d132 /tools | |
parent | 21f9b43979f5a8193de8932448466aa42d7a4e5f (diff) | |
download | Qt-fb28599786d069a2b99040bd7eee8c5ad8ef1ba9.zip Qt-fb28599786d069a2b99040bd7eee8c5ad8ef1ba9.tar.gz Qt-fb28599786d069a2b99040bd7eee8c5ad8ef1ba9.tar.bz2 |
Not exported in Qt 4.6.2, push to next release.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qmlviewer/qmlviewer.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/qmlviewer/qmlviewer.cpp b/tools/qmlviewer/qmlviewer.cpp index 1566473..8b3b7aa 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> @@ -866,7 +867,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 +879,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 +892,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 +908,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); |