2011-03-10 Andreas Kling <kling@webkit.org>

        Unreviewed build fix after r80774.

        QML property versioning is introduced in Qt 4.7.3, not 4.7.2.
        See also: http://bugreports.qt.nokia.com/browse/QTBUG-13451

        * declarative/plugin.cpp:
        (WebKitQmlPlugin::registerTypes):
        * declarative/qdeclarativewebview.cpp:
        * declarative/qdeclarativewebview_p.h:
        * tests/qdeclarativewebview/tst_qdeclarativewebview.cpp:


git-svn-id: svn://svn.chromium.org/blink/trunk@80781 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent e447ab31
2011-03-10 Andreas Kling <kling@webkit.org>
Unreviewed build fix after r80774.
QML property versioning is introduced in Qt 4.7.3, not 4.7.2.
See also: http://bugreports.qt.nokia.com/browse/QTBUG-13451
* declarative/plugin.cpp:
(WebKitQmlPlugin::registerTypes):
* declarative/qdeclarativewebview.cpp:
* declarative/qdeclarativewebview_p.h:
* tests/qdeclarativewebview/tst_qdeclarativewebview.cpp:
2011-03-10 Alexis Menard <alexis.menard@openbossa.org> 2011-03-10 Alexis Menard <alexis.menard@openbossa.org>
Reviewed by Andreas Kling. Reviewed by Andreas Kling.
......
...@@ -32,7 +32,7 @@ public: ...@@ -32,7 +32,7 @@ public:
Q_ASSERT(QLatin1String(uri) == QLatin1String("QtWebKit")); Q_ASSERT(QLatin1String(uri) == QLatin1String("QtWebKit"));
qmlRegisterType<QDeclarativeWebSettings>(); qmlRegisterType<QDeclarativeWebSettings>();
qmlRegisterType<QDeclarativeWebView>(uri, 1, 0, "WebView"); qmlRegisterType<QDeclarativeWebView>(uri, 1, 0, "WebView");
#if QT_VERSION >= 0x040702 #if QT_VERSION >= 0x040703
qmlRegisterType<QDeclarativeWebView>(uri, 1, 1, "WebView"); qmlRegisterType<QDeclarativeWebView>(uri, 1, 1, "WebView");
qmlRegisterRevision<QDeclarativeWebView, 0>("QtWebKit", 1, 0); qmlRegisterRevision<QDeclarativeWebView, 0>("QtWebKit", 1, 0);
qmlRegisterRevision<QDeclarativeWebView, 1>("QtWebKit", 1, 1); qmlRegisterRevision<QDeclarativeWebView, 1>("QtWebKit", 1, 1);
......
...@@ -983,7 +983,7 @@ void QDeclarativeWebView::setContentsScale(qreal scale) ...@@ -983,7 +983,7 @@ void QDeclarativeWebView::setContentsScale(qreal scale)
emit contentsScaleChanged(); emit contentsScaleChanged();
} }
#if QT_VERSION >= 0x040702 #if QT_VERSION >= 0x040703
/*! /*!
\qmlproperty color WebView::backgroundColor \qmlproperty color WebView::backgroundColor
\since QtWebKit 1.1 \since QtWebKit 1.1
......
...@@ -123,7 +123,7 @@ class QDeclarativeWebView : public QDeclarativeItem { ...@@ -123,7 +123,7 @@ class QDeclarativeWebView : public QDeclarativeItem {
Q_PROPERTY(QSize contentsSize READ contentsSize NOTIFY contentsSizeChanged) Q_PROPERTY(QSize contentsSize READ contentsSize NOTIFY contentsSizeChanged)
Q_PROPERTY(qreal contentsScale READ contentsScale WRITE setContentsScale NOTIFY contentsScaleChanged) Q_PROPERTY(qreal contentsScale READ contentsScale WRITE setContentsScale NOTIFY contentsScaleChanged)
#if QT_VERSION >= 0x040702 #if QT_VERSION >= 0x040703
Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setBackgroundColor NOTIFY backgroundColorChanged REVISION 1) Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setBackgroundColor NOTIFY backgroundColorChanged REVISION 1)
#endif #endif
...@@ -196,7 +196,7 @@ public: ...@@ -196,7 +196,7 @@ public:
void setContentsScale(qreal scale); void setContentsScale(qreal scale);
qreal contentsScale() const; qreal contentsScale() const;
#if QT_VERSION >= 0x040702 #if QT_VERSION >= 0x040703
Q_REVISION(1) QColor backgroundColor() const; Q_REVISION(1) QColor backgroundColor() const;
Q_REVISION(1) void setBackgroundColor(const QColor&); Q_REVISION(1) void setBackgroundColor(const QColor&);
#endif #endif
...@@ -217,7 +217,7 @@ Q_SIGNALS: ...@@ -217,7 +217,7 @@ Q_SIGNALS:
void renderingEnabledChanged(); void renderingEnabledChanged();
void contentsSizeChanged(const QSize&); void contentsSizeChanged(const QSize&);
void contentsScaleChanged(); void contentsScaleChanged();
#if QT_VERSION >= 0x040702 #if QT_VERSION >= 0x040703
void backgroundColorChanged(); void backgroundColorChanged();
#endif #endif
......
...@@ -23,7 +23,7 @@ private slots: ...@@ -23,7 +23,7 @@ private slots:
void preferredHeightTest(); void preferredHeightTest();
void preferredWidthDefaultTest(); void preferredWidthDefaultTest();
void preferredHeightDefaultTest(); void preferredHeightDefaultTest();
#if QT_VERSION >= 0x040702 #if QT_VERSION >= 0x040703
void backgroundColor(); void backgroundColor();
#endif #endif
...@@ -86,7 +86,7 @@ void tst_QDeclarativeWebView::preferredHeightDefaultTest() ...@@ -86,7 +86,7 @@ void tst_QDeclarativeWebView::preferredHeightDefaultTest()
QCOMPARE(wv->property("prefHeight").toDouble(), view.preferredHeight()); QCOMPARE(wv->property("prefHeight").toDouble(), view.preferredHeight());
} }
#if QT_VERSION >= 0x040702 #if QT_VERSION >= 0x040703
void tst_QDeclarativeWebView::backgroundColor() void tst_QDeclarativeWebView::backgroundColor()
{ {
// We test here the rendering of the background. // We test here the rendering of the background.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment