diff options
author | A-Team <ateam@pad.test.qt.nokia.com> | 2010-10-20 22:00:14 (GMT) |
---|---|---|
committer | A-Team <ateam@pad.test.qt.nokia.com> | 2010-10-20 22:00:14 (GMT) |
commit | dd97db856bc19d648d7faa3aac4e27576dcb2512 (patch) | |
tree | 0bb9fde945a0d3883e6fa3291f807c8827bbb48c /src/declarative | |
parent | e4b0fe70c6435bb860df526d615dfdf53dfb5abd (diff) | |
parent | 80f031dfca7c161de4461514dfd8d9d664ea2f03 (diff) | |
download | Qt-dd97db856bc19d648d7faa3aac4e27576dcb2512.zip Qt-dd97db856bc19d648d7faa3aac4e27576dcb2512.tar.gz Qt-dd97db856bc19d648d7faa3aac4e27576dcb2512.tar.bz2 |
Merge branch '4.7-upstream' into 4.7-doc
Diffstat (limited to 'src/declarative')
40 files changed, 224 insertions, 189 deletions
diff --git a/src/declarative/debugger/qdeclarativedebug_p.h b/src/declarative/debugger/qdeclarativedebug_p.h index 3d83e8a..9b8572b 100644 --- a/src/declarative/debugger/qdeclarativedebug_p.h +++ b/src/declarative/debugger/qdeclarativedebug_p.h @@ -45,6 +45,8 @@ #include <QtCore/qurl.h> #include <QtCore/qvariant.h> +#include <private/qdeclarativeglobal_p.h> + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE @@ -65,7 +67,7 @@ class QDeclarativeDebugObjectReference; class QDeclarativeDebugFileReference; class QDeclarativeDebugEngineReference; class QDeclarativeEngineDebugPrivate; -class Q_DECLARATIVE_EXPORT QDeclarativeEngineDebug : public QObject +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeEngineDebug : public QObject { Q_OBJECT public: @@ -111,7 +113,7 @@ private: Q_DECLARE_PRIVATE(QDeclarativeEngineDebug) }; -class Q_DECLARATIVE_EXPORT QDeclarativeDebugWatch : public QObject +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugWatch : public QObject { Q_OBJECT public: @@ -142,7 +144,7 @@ private: int m_objectDebugId; }; -class Q_DECLARATIVE_EXPORT QDeclarativeDebugPropertyWatch : public QDeclarativeDebugWatch +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugPropertyWatch : public QDeclarativeDebugWatch { Q_OBJECT public: @@ -155,7 +157,7 @@ private: QString m_name; }; -class Q_DECLARATIVE_EXPORT QDeclarativeDebugObjectExpressionWatch : public QDeclarativeDebugWatch +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugObjectExpressionWatch : public QDeclarativeDebugWatch { Q_OBJECT public: @@ -170,7 +172,7 @@ private: }; -class Q_DECLARATIVE_EXPORT QDeclarativeDebugQuery : public QObject +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugQuery : public QObject { Q_OBJECT public: @@ -194,7 +196,7 @@ private: State m_state; }; -class Q_DECLARATIVE_EXPORT QDeclarativeDebugFileReference +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugFileReference { public: QDeclarativeDebugFileReference(); @@ -215,7 +217,7 @@ private: int m_columnNumber; }; -class Q_DECLARATIVE_EXPORT QDeclarativeDebugEngineReference +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugEngineReference { public: QDeclarativeDebugEngineReference(); @@ -232,7 +234,7 @@ private: QString m_name; }; -class Q_DECLARATIVE_EXPORT QDeclarativeDebugObjectReference +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugObjectReference { public: QDeclarativeDebugObjectReference(); @@ -263,7 +265,7 @@ private: QList<QDeclarativeDebugObjectReference> m_children; }; -class Q_DECLARATIVE_EXPORT QDeclarativeDebugContextReference +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugContextReference { public: QDeclarativeDebugContextReference(); @@ -284,7 +286,7 @@ private: QList<QDeclarativeDebugContextReference> m_contexts; }; -class Q_DECLARATIVE_EXPORT QDeclarativeDebugPropertyReference +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugPropertyReference { public: QDeclarativeDebugPropertyReference(); @@ -309,7 +311,7 @@ private: }; -class Q_DECLARATIVE_EXPORT QDeclarativeDebugEnginesQuery : public QDeclarativeDebugQuery +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugEnginesQuery : public QDeclarativeDebugQuery { Q_OBJECT public: @@ -324,7 +326,7 @@ private: QList<QDeclarativeDebugEngineReference> m_engines; }; -class Q_DECLARATIVE_EXPORT QDeclarativeDebugRootContextQuery : public QDeclarativeDebugQuery +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugRootContextQuery : public QDeclarativeDebugQuery { Q_OBJECT public: @@ -339,7 +341,7 @@ private: QDeclarativeDebugContextReference m_context; }; -class Q_DECLARATIVE_EXPORT QDeclarativeDebugObjectQuery : public QDeclarativeDebugQuery +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugObjectQuery : public QDeclarativeDebugQuery { Q_OBJECT public: @@ -355,7 +357,7 @@ private: }; -class Q_DECLARATIVE_EXPORT QDeclarativeDebugExpressionQuery : public QDeclarativeDebugQuery +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugExpressionQuery : public QDeclarativeDebugQuery { Q_OBJECT public: diff --git a/src/declarative/debugger/qdeclarativedebugclient_p.h b/src/declarative/debugger/qdeclarativedebugclient_p.h index 8d1706d..47f87a5 100644 --- a/src/declarative/debugger/qdeclarativedebugclient_p.h +++ b/src/declarative/debugger/qdeclarativedebugclient_p.h @@ -44,6 +44,8 @@ #include <QtNetwork/qtcpsocket.h> +#include <private/qdeclarativeglobal_p.h> + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE @@ -51,7 +53,7 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) class QDeclarativeDebugConnectionPrivate; -class Q_DECLARATIVE_EXPORT QDeclarativeDebugConnection : public QTcpSocket +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugConnection : public QTcpSocket { Q_OBJECT Q_DISABLE_COPY(QDeclarativeDebugConnection) @@ -67,7 +69,7 @@ private: }; class QDeclarativeDebugClientPrivate; -class Q_DECLARATIVE_EXPORT QDeclarativeDebugClient : public QObject +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugClient : public QObject { Q_OBJECT Q_DECLARE_PRIVATE(QDeclarativeDebugClient) diff --git a/src/declarative/debugger/qdeclarativedebuggerstatus_p.h b/src/declarative/debugger/qdeclarativedebuggerstatus_p.h index a3ba40a..a1499d8 100644 --- a/src/declarative/debugger/qdeclarativedebuggerstatus_p.h +++ b/src/declarative/debugger/qdeclarativedebuggerstatus_p.h @@ -44,13 +44,15 @@ #include <QtCore/qobject.h> +#include <private/qdeclarativeglobal_p.h> + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE QT_MODULE(Declarative) -class Q_DECLARATIVE_EXPORT QDeclarativeDebuggerStatus +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebuggerStatus { public: virtual ~QDeclarativeDebuggerStatus(); diff --git a/src/declarative/debugger/qdeclarativedebughelper_p.h b/src/declarative/debugger/qdeclarativedebughelper_p.h index c9cb839..5689dff 100644 --- a/src/declarative/debugger/qdeclarativedebughelper_p.h +++ b/src/declarative/debugger/qdeclarativedebughelper_p.h @@ -44,6 +44,8 @@ #include <QtCore/qglobal.h> +#include <private/qdeclarativeglobal_p.h> + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE @@ -53,7 +55,7 @@ class QDeclarativeEngine; // Helper methods to access private API through a stable interface // This is used in the qmljsdebugger library of QtCreator. -class Q_DECLARATIVE_EXPORT QDeclarativeDebugHelper +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugHelper { public: static QScriptEngine *getScriptEngine(QDeclarativeEngine *engine); diff --git a/src/declarative/debugger/qdeclarativedebugservice_p.h b/src/declarative/debugger/qdeclarativedebugservice_p.h index 0cadbe5..da27b9a 100644 --- a/src/declarative/debugger/qdeclarativedebugservice_p.h +++ b/src/declarative/debugger/qdeclarativedebugservice_p.h @@ -44,6 +44,8 @@ #include <QtCore/qobject.h> +#include <private/qdeclarativeglobal_p.h> + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE @@ -51,7 +53,7 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) class QDeclarativeDebugServicePrivate; -class Q_DECLARATIVE_EXPORT QDeclarativeDebugService : public QObject +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugService : public QObject { Q_OBJECT Q_DECLARE_PRIVATE(QDeclarativeDebugService) diff --git a/src/declarative/debugger/qpacketprotocol_p.h b/src/declarative/debugger/qpacketprotocol_p.h index cfdce4e..d153833 100644 --- a/src/declarative/debugger/qpacketprotocol_p.h +++ b/src/declarative/debugger/qpacketprotocol_p.h @@ -45,6 +45,8 @@ #include <QtCore/qobject.h> #include <QtCore/qdatastream.h> +#include <private/qdeclarativeglobal_p.h> + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE @@ -57,7 +59,7 @@ class QPacket; class QPacketAutoSend; class QPacketProtocolPrivate; -class Q_DECLARATIVE_EXPORT QPacketProtocol : public QObject +class Q_DECLARATIVE_PRIVATE_EXPORT QPacketProtocol : public QObject { Q_OBJECT public: @@ -87,7 +89,7 @@ private: }; -class Q_DECLARATIVE_EXPORT QPacket : public QDataStream +class Q_DECLARATIVE_PRIVATE_EXPORT QPacket : public QDataStream { public: QPacket(); @@ -104,7 +106,7 @@ protected: QBuffer * buf; }; -class Q_DECLARATIVE_EXPORT QPacketAutoSend : public QPacket +class Q_DECLARATIVE_PRIVATE_EXPORT QPacketAutoSend : public QPacket { public: virtual ~QPacketAutoSend(); diff --git a/src/declarative/graphicsitems/qdeclarativeanchors_p.h b/src/declarative/graphicsitems/qdeclarativeanchors_p.h index c929797..8223b17 100644 --- a/src/declarative/graphicsitems/qdeclarativeanchors_p.h +++ b/src/declarative/graphicsitems/qdeclarativeanchors_p.h @@ -48,6 +48,8 @@ #include <QtCore/QObject> +#include <private/qdeclarativeglobal_p.h> + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE @@ -56,7 +58,7 @@ QT_MODULE(Declarative) class QDeclarativeAnchorsPrivate; class QDeclarativeAnchorLine; -class Q_DECLARATIVE_EXPORT QDeclarativeAnchors : public QObject +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeAnchors : public QObject { Q_OBJECT diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp index 001abca..2e5a43d 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp +++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp @@ -85,7 +85,11 @@ qreal QDeclarativeFlickableVisibleArea::yPosition() const void QDeclarativeFlickableVisibleArea::updateVisible() { QDeclarativeFlickablePrivate *p = static_cast<QDeclarativeFlickablePrivate *>(QGraphicsItemPrivate::get(flickable)); - bool pageChange = false; + + bool changeX = false; + bool changeY = false; + bool changeWidth = false; + bool changeHeight = false; // Vertical const qreal viewheight = flickable->height(); @@ -95,11 +99,11 @@ void QDeclarativeFlickableVisibleArea::updateVisible() if (pageSize != m_heightRatio) { m_heightRatio = pageSize; - pageChange = true; + changeHeight = true; } if (pagePos != m_yPosition) { m_yPosition = pagePos; - pageChange = true; + changeY = true; } // Horizontal @@ -110,14 +114,21 @@ void QDeclarativeFlickableVisibleArea::updateVisible() if (pageSize != m_widthRatio) { m_widthRatio = pageSize; - pageChange = true; + changeWidth = true; } if (pagePos != m_xPosition) { m_xPosition = pagePos; - pageChange = true; + changeX = true; } - if (pageChange) - emit pageChanged(); + + if (changeX) + emit xPositionChanged(m_xPosition); + if (changeY) + emit yPositionChanged(m_yPosition); + if (changeWidth) + emit widthRatioChanged(m_widthRatio); + if (changeHeight) + emit heightRatioChanged(m_heightRatio); } diff --git a/src/declarative/graphicsitems/qdeclarativeflickable_p.h b/src/declarative/graphicsitems/qdeclarativeflickable_p.h index 44f2bcf..4fb9c25 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable_p.h +++ b/src/declarative/graphicsitems/qdeclarativeflickable_p.h @@ -163,7 +163,6 @@ Q_SIGNALS: void horizontalVelocityChanged(); void verticalVelocityChanged(); void isAtBoundaryChanged(); - void pageChanged(); void flickableDirectionChanged(); void interactiveChanged(); void boundsBehaviorChanged(); diff --git a/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h b/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h index beee741..afefde2 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h +++ b/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h @@ -182,10 +182,10 @@ class QDeclarativeFlickableVisibleArea : public QObject { Q_OBJECT - Q_PROPERTY(qreal xPosition READ xPosition NOTIFY pageChanged) - Q_PROPERTY(qreal yPosition READ yPosition NOTIFY pageChanged) - Q_PROPERTY(qreal widthRatio READ widthRatio NOTIFY pageChanged) - Q_PROPERTY(qreal heightRatio READ heightRatio NOTIFY pageChanged) + Q_PROPERTY(qreal xPosition READ xPosition NOTIFY xPositionChanged) + Q_PROPERTY(qreal yPosition READ yPosition NOTIFY yPositionChanged) + Q_PROPERTY(qreal widthRatio READ widthRatio NOTIFY widthRatioChanged) + Q_PROPERTY(qreal heightRatio READ heightRatio NOTIFY heightRatioChanged) public: QDeclarativeFlickableVisibleArea(QDeclarativeFlickable *parent=0); @@ -198,7 +198,10 @@ public: void updateVisible(); signals: - void pageChanged(); + void xPositionChanged(qreal xPosition); + void yPositionChanged(qreal yPosition); + void widthRatioChanged(qreal widthRatio); + void heightRatioChanged(qreal heightRatio); private: QDeclarativeFlickable *flickable; diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index f53625f..bbc03f3 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -112,7 +112,7 @@ public: , bufferMode(BufferBefore | BufferAfter), snapMode(QDeclarativeGridView::NoSnap) , ownModel(false), wrap(false), autoHighlight(true) , fixCurrentVisibility(false), lazyRelease(false), layoutScheduled(false) - , deferredRelease(false), haveHighlightRange(false), currentIndexSet(false) {} + , deferredRelease(false), haveHighlightRange(false), currentIndexCleared(false) {} void init(); void clear(); @@ -392,7 +392,7 @@ public: bool layoutScheduled : 1; bool deferredRelease : 1; bool haveHighlightRange : 1; - bool currentIndexSet : 1; + bool currentIndexCleared : 1; }; void QDeclarativeGridViewPrivate::init() @@ -1242,7 +1242,7 @@ void QDeclarativeGridView::setModel(const QVariant &model) d->bufferMode = QDeclarativeGridViewPrivate::BufferBefore | QDeclarativeGridViewPrivate::BufferAfter; if (isComponentComplete()) { refill(); - if ((d->currentIndex >= d->model->count() || d->currentIndex < 0) && !d->currentIndexSet) { + if ((d->currentIndex >= d->model->count() || d->currentIndex < 0) && !d->currentIndexCleared) { setCurrentIndex(0); } else { d->moveReason = QDeclarativeGridViewPrivate::SetIndex; @@ -1330,7 +1330,8 @@ void QDeclarativeGridView::setDelegate(QDeclarativeComponent *delegate) \qmlproperty Item GridView::currentItem The \c currentIndex property holds the index of the current item, and - \c currentItem holds the current item. + \c currentItem holds the current item. Setting the currentIndex to -1 + will clear the highlight and set currentItem to null. If highlightFollowsCurrentItem is \c true, setting either of these properties will smoothly scroll the GridView so that the current @@ -1350,7 +1351,7 @@ void QDeclarativeGridView::setCurrentIndex(int index) Q_D(QDeclarativeGridView); if (d->requestedIndex >= 0) // currently creating item return; - d->currentIndexSet = true; + d->currentIndexCleared = (index == -1); if (index == d->currentIndex) return; if (isComponentComplete() && d->isValid()) { @@ -1831,6 +1832,8 @@ void QDeclarativeGridView::viewportMoved() { Q_D(QDeclarativeGridView); QDeclarativeFlickable::viewportMoved(); + if (!d->itemCount) + return; d->lazyRelease = true; if (d->flickingHorizontally || d->flickingVertically) { if (yflick()) { @@ -2222,7 +2225,7 @@ void QDeclarativeGridView::componentComplete() if (d->isValid()) { refill(); d->moveReason = QDeclarativeGridViewPrivate::SetIndex; - if (d->currentIndex < 0 && !d->currentIndexSet) + if (d->currentIndex < 0 && !d->currentIndexCleared) d->updateCurrent(0); else d->updateCurrent(d->currentIndex); @@ -2297,13 +2300,13 @@ void QDeclarativeGridView::itemsInserted(int modelIndex, int count) return; if (!d->visibleItems.count() || d->model->count() <= 1) { d->scheduleLayout(); - if (d->currentIndex >= modelIndex) { + if (d->itemCount && d->currentIndex >= modelIndex) { // adjust current item index d->currentIndex += count; if (d->currentItem) d->currentItem->index = d->currentIndex; emit currentIndexChanged(); - } else if (d->currentIndex < 0 && !d->currentIndexSet) { + } else if (!d->currentIndex || (d->currentIndex < 0 && !d->currentIndexCleared)) { d->updateCurrent(0); } d->itemCount += count; @@ -2411,7 +2414,7 @@ void QDeclarativeGridView::itemsInserted(int modelIndex, int count) } } - if (d->currentIndex >= modelIndex) { + if (d->itemCount && d->currentIndex >= modelIndex) { // adjust current item index d->currentIndex += count; if (d->currentItem) { @@ -2498,8 +2501,8 @@ void QDeclarativeGridView::itemsRemoved(int modelIndex, int count) if (removedVisible && d->visibleItems.isEmpty()) { d->timeline.clear(); - d->setPosition(0); if (d->itemCount == 0) { + d->setPosition(0); d->updateHeader(); d->updateFooter(); update(); diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index 7dd5c75..e29f285 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -182,7 +182,7 @@ public: , bufferMode(BufferBefore | BufferAfter) , ownModel(false), wrap(false), autoHighlight(true), haveHighlightRange(false) , correctFlick(false), inFlickCorrection(false), lazyRelease(false) - , deferredRelease(false), layoutScheduled(false), currentIndexSet(false) + , deferredRelease(false), layoutScheduled(false), currentIndexCleared(false) , minExtentDirty(true), maxExtentDirty(true) {} @@ -394,44 +394,19 @@ public: } // map a model index to visibleItems index. - // These may differ if removed items are still present in the visible list, - // e.g. doing a removal animation int mapFromModel(int modelIndex) const { if (modelIndex < visibleIndex || modelIndex >= visibleIndex + visibleItems.count()) return -1; for (int i = 0; i < visibleItems.count(); ++i) { FxListItem *listItem = visibleItems.at(i); if (listItem->index == modelIndex) - return i + visibleIndex; + return i; if (listItem->index > modelIndex) return -1; } return -1; // Not in visibleList } - bool mapRangeFromModel(int &index, int &count) const { - if (index + count < visibleIndex) - return false; - - int lastIndex = -1; - for (int i = visibleItems.count()-1; i >= 0; --i) { - FxListItem *listItem = visibleItems.at(i); - if (listItem->index != -1) { - lastIndex = listItem->index; - break; - } - } - - if (index > lastIndex) - return false; - - int last = qMin(index + count - 1, lastIndex); - index = qMax(index, visibleIndex); - count = last - index + 1; - - return true; - } - void updateViewport() { Q_Q(QDeclarativeListView); if (orient == QDeclarativeListView::Vertical) { @@ -545,7 +520,7 @@ public: bool lazyRelease : 1; bool deferredRelease : 1; bool layoutScheduled : 1; - bool currentIndexSet : 1; + bool currentIndexCleared : 1; mutable bool minExtentDirty : 1; mutable bool maxExtentDirty : 1; }; @@ -1604,7 +1579,7 @@ void QDeclarativeListView::setModel(const QVariant &model) if (isComponentComplete()) { updateSections(); refill(); - if ((d->currentIndex >= d->model->count() || d->currentIndex < 0) && !d->currentIndexSet) { + if ((d->currentIndex >= d->model->count() || d->currentIndex < 0) && !d->currentIndexCleared) { setCurrentIndex(0); } else { d->moveReason = QDeclarativeListViewPrivate::SetIndex; @@ -1694,7 +1669,8 @@ void QDeclarativeListView::setDelegate(QDeclarativeComponent *delegate) \qmlproperty Item ListView::currentItem The \c currentIndex property holds the index of the current item, and - \c currentItem holds the current item. + \c currentItem holds the current item. Setting the currentIndex to -1 + will clear the highlight and set currentItem to null. If highlightFollowsCurrentItem is \c true, setting either of these properties will smoothly scroll the ListView so that the current @@ -1714,7 +1690,7 @@ void QDeclarativeListView::setCurrentIndex(int index) Q_D(QDeclarativeListView); if (d->requestedIndex >= 0) // currently creating item return; - d->currentIndexSet = true; + d->currentIndexCleared = (index == -1); if (index == d->currentIndex) return; if (isComponentComplete() && d->isValid()) { @@ -2329,6 +2305,8 @@ void QDeclarativeListView::viewportMoved() { Q_D(QDeclarativeListView); QDeclarativeFlickable::viewportMoved(); + if (!d->itemCount) + return; d->lazyRelease = true; refill(); if (d->flickingHorizontally || d->flickingVertically || d->movingHorizontally || d->movingVertically) @@ -2543,7 +2521,7 @@ void QDeclarativeListView::incrementCurrentIndex() if (count && (currentIndex() < count - 1 || d->wrap)) { d->moveReason = QDeclarativeListViewPrivate::SetIndex; int index = currentIndex()+1; - d->updateCurrent((index >= 0 && index < count) ? index : 0); + setCurrentIndex((index >= 0 && index < count) ? index : 0); } } @@ -2563,7 +2541,7 @@ void QDeclarativeListView::decrementCurrentIndex() if (count && (currentIndex() > 0 || d->wrap)) { d->moveReason = QDeclarativeListViewPrivate::SetIndex; int index = currentIndex()-1; - d->updateCurrent((index >= 0 && index < count) ? index : count-1); + setCurrentIndex((index >= 0 && index < count) ? index : count-1); } } @@ -2697,7 +2675,7 @@ void QDeclarativeListView::componentComplete() if (d->isValid()) { refill(); d->moveReason = QDeclarativeListViewPrivate::SetIndex; - if (d->currentIndex < 0 && !d->currentIndexSet) + if (d->currentIndex < 0 && !d->currentIndexCleared) d->updateCurrent(0); else d->updateCurrent(d->currentIndex); @@ -2797,13 +2775,13 @@ void QDeclarativeListView::itemsInserted(int modelIndex, int count) d->moveReason = QDeclarativeListViewPrivate::Other; if (!d->visibleItems.count() || d->model->count() <= 1) { d->scheduleLayout(); - if (d->currentIndex >= modelIndex) { + if (d->itemCount && d->currentIndex >= modelIndex) { // adjust current item index d->currentIndex += count; if (d->currentItem) d->currentItem->index = d->currentIndex; emit currentIndexChanged(); - } else if (d->currentIndex < 0 && !d->currentIndexSet) { + } else if (!d->currentIndex || (d->currentIndex < 0 && !d->currentIndexCleared)) { d->updateCurrent(0); } d->itemCount += count; @@ -2811,15 +2789,15 @@ void QDeclarativeListView::itemsInserted(int modelIndex, int count) return; } - int overlapCount = count; - if (!d->mapRangeFromModel(modelIndex, overlapCount)) { + int index = d->mapFromModel(modelIndex); + if (index < 0) { int i = d->visibleItems.count() - 1; while (i > 0 && d->visibleItems.at(i)->index == -1) --i; if (d->visibleItems.at(i)->index + 1 == modelIndex && d->visibleItems.at(i)->endPosition() < d->buffer+d->position()+d->size()-1) { // Special case of appending an item to the model. - modelIndex = d->visibleIndex + d->visibleItems.count(); + index = d->visibleItems.count(); } else { if (modelIndex < d->visibleIndex) { // Insert before visible items @@ -2846,7 +2824,6 @@ void QDeclarativeListView::itemsInserted(int modelIndex, int count) // At least some of the added items will be visible - int index = modelIndex - d->visibleIndex; // index can be the next item past the end of the visible items list (i.e. appended) int pos = index < d->visibleItems.count() ? d->visibleItems.at(index)->position() : d->visibleItems.at(index-1)->endPosition()+d->spacing+1; @@ -2910,7 +2887,7 @@ void QDeclarativeListView::itemsInserted(int modelIndex, int count) } diff = pos - initialPos; } - if (d->currentIndex >= modelIndex) { + if (d->itemCount && d->currentIndex >= modelIndex) { // adjust current item index d->currentIndex += count; if (d->currentItem) { diff --git a/src/declarative/graphicsitems/qdeclarativepositioners_p.h b/src/declarative/graphicsitems/qdeclarativepositioners_p.h index 15b91e5..d3ae926 100644 --- a/src/declarative/graphicsitems/qdeclarativepositioners_p.h +++ b/src/declarative/graphicsitems/qdeclarativepositioners_p.h @@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) class QDeclarativeBasePositionerPrivate; -class Q_DECLARATIVE_EXPORT QDeclarativeBasePositioner : public QDeclarativeItem +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeBasePositioner : public QDeclarativeItem { Q_OBJECT diff --git a/src/declarative/graphicsitems/qdeclarativerectangle_p.h b/src/declarative/graphicsitems/qdeclarativerectangle_p.h index ecc3fbf..99dca1b 100644 --- a/src/declarative/graphicsitems/qdeclarativerectangle_p.h +++ b/src/declarative/graphicsitems/qdeclarativerectangle_p.h @@ -46,12 +46,14 @@ #include <QtGui/qbrush.h> +#include <private/qdeclarativeglobal_p.h> + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE QT_MODULE(Declarative) -class Q_DECLARATIVE_EXPORT QDeclarativePen : public QObject +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativePen : public QObject { Q_OBJECT @@ -131,7 +133,7 @@ private: }; class QDeclarativeRectanglePrivate; -class Q_DECLARATIVE_EXPORT QDeclarativeRectangle : public QDeclarativeItem +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeRectangle : public QDeclarativeItem { Q_OBJECT diff --git a/src/declarative/graphicsitems/qdeclarativescalegrid_p_p.h b/src/declarative/graphicsitems/qdeclarativescalegrid_p_p.h index 42813dd..c6d4629 100644 --- a/src/declarative/graphicsitems/qdeclarativescalegrid_p_p.h +++ b/src/declarative/graphicsitems/qdeclarativescalegrid_p_p.h @@ -42,21 +42,22 @@ #ifndef QDECLARATIVESCALEGRID_H #define QDECLARATIVESCALEGRID_H -#include "private/qdeclarativeborderimage_p.h" - -#include <private/qdeclarativepixmapcache_p.h> #include <qdeclarative.h> #include <QtCore/QString> #include <QtCore/QObject> +#include <private/qdeclarativeborderimage_p.h> +#include <private/qdeclarativepixmapcache_p.h> +#include <private/qdeclarativeglobal_p.h> + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE QT_MODULE(Declarative) -class Q_DECLARATIVE_EXPORT QDeclarativeScaleGrid : public QObject +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeScaleGrid : public QObject { Q_OBJECT Q_ENUMS(TileRule) @@ -94,7 +95,7 @@ private: int _bottom; }; -class Q_DECLARATIVE_EXPORT QDeclarativeGridScaledImage +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeGridScaledImage { public: QDeclarativeGridScaledImage(); diff --git a/src/declarative/graphicsitems/qdeclarativetext_p.h b/src/declarative/graphicsitems/qdeclarativetext_p.h index 2cc4d52..51434d5 100644 --- a/src/declarative/graphicsitems/qdeclarativetext_p.h +++ b/src/declarative/graphicsitems/qdeclarativetext_p.h @@ -45,13 +45,15 @@ #include <QtGui/qtextoption.h> #include "qdeclarativeitem.h" +#include <private/qdeclarativeglobal_p.h> + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE QT_MODULE(Declarative) class QDeclarativeTextPrivate; -class Q_DECLARATIVE_EXPORT QDeclarativeText : public QDeclarativeItem +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeText : public QDeclarativeItem { Q_OBJECT Q_ENUMS(HAlignment) diff --git a/src/declarative/graphicsitems/qdeclarativetextlayout.cpp b/src/declarative/graphicsitems/qdeclarativetextlayout.cpp index e8b5fb2..89a2158 100644 --- a/src/declarative/graphicsitems/qdeclarativetextlayout.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextlayout.cpp @@ -321,7 +321,7 @@ void QDeclarativeTextLayout::draw(QPainter *painter, const QPointF &p) priv->extended->type() == QPaintEngine::OpenVG || priv->extended->type() == QPaintEngine::OpenGL); - if (!paintEngineSupportsTransformations) { + if (!paintEngineSupportsTransformations || !priv->state->matrix.isAffine()) { QTextLayout::draw(painter, p); return; } diff --git a/src/declarative/qml/parser/qdeclarativejslexer.cpp b/src/declarative/qml/parser/qdeclarativejslexer.cpp index 1eb42e4..52f6210 100644 --- a/src/declarative/qml/parser/qdeclarativejslexer.cpp +++ b/src/declarative/qml/parser/qdeclarativejslexer.cpp @@ -510,15 +510,18 @@ int Lexer::lex() setDone(Eof); } } else if (isLineTerminator()) { - shiftWindowsLineBreak(); - yylineno++; - yycolumn = 0; - bol = true; - terminator = true; - syncProhibitAutomaticSemicolon(); if (restrKeyword) { + // automatic semicolon insertion + recordStartPos(); token = QDeclarativeJSGrammar::T_SEMICOLON; setDone(Other); + } else { + shiftWindowsLineBreak(); + yylineno++; + yycolumn = 0; + bol = true; + terminator = true; + syncProhibitAutomaticSemicolon(); } } else if (current == '"' || current == '\'') { recordStartPos(); diff --git a/src/declarative/qml/qdeclarativebinding_p.h b/src/declarative/qml/qdeclarativebinding_p.h index 941a1b3..0b9bde6 100644 --- a/src/declarative/qml/qdeclarativebinding_p.h +++ b/src/declarative/qml/qdeclarativebinding_p.h @@ -64,7 +64,7 @@ QT_BEGIN_NAMESPACE -class Q_DECLARATIVE_EXPORT QDeclarativeAbstractBinding +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeAbstractBinding { public: typedef QWeakPointer<QDeclarativeAbstractBinding> Pointer; @@ -138,7 +138,7 @@ private: class QDeclarativeContext; class QDeclarativeBindingPrivate; -class Q_DECLARATIVE_EXPORT QDeclarativeBinding : public QDeclarativeExpression, public QDeclarativeAbstractBinding +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeBinding : public QDeclarativeExpression, public QDeclarativeAbstractBinding { Q_OBJECT public: diff --git a/src/declarative/qml/qdeclarativedom_p.h b/src/declarative/qml/qdeclarativedom_p.h index 6043ead..ee3625c 100644 --- a/src/declarative/qml/qdeclarativedom_p.h +++ b/src/declarative/qml/qdeclarativedom_p.h @@ -58,6 +58,8 @@ #include <QtCore/qlist.h> #include <QtCore/qshareddata.h> +#include <private/qdeclarativeglobal_p.h> + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE @@ -76,7 +78,7 @@ class QIODevice; class QDeclarativeDomDocumentPrivate; -class Q_DECLARATIVE_EXPORT QDeclarativeDomDocument +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomDocument { public: QDeclarativeDomDocument(); @@ -96,7 +98,7 @@ private: }; class QDeclarativeDomPropertyPrivate; -class Q_DECLARATIVE_EXPORT QDeclarativeDomProperty +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomProperty { public: QDeclarativeDomProperty(); @@ -123,7 +125,7 @@ private: }; class QDeclarativeDomDynamicPropertyPrivate; -class Q_DECLARATIVE_EXPORT QDeclarativeDomDynamicProperty +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomDynamicProperty { public: QDeclarativeDomDynamicProperty(); @@ -151,7 +153,7 @@ private: }; class QDeclarativeDomObjectPrivate; -class Q_DECLARATIVE_EXPORT QDeclarativeDomObject +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomObject { public: QDeclarativeDomObject(); @@ -196,7 +198,7 @@ private: class QDeclarativeDomValuePrivate; class QDeclarativeDomBasicValuePrivate; -class Q_DECLARATIVE_EXPORT QDeclarativeDomValueLiteral +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomValueLiteral { public: QDeclarativeDomValueLiteral(); @@ -211,7 +213,7 @@ private: QSharedDataPointer<QDeclarativeDomBasicValuePrivate> d; }; -class Q_DECLARATIVE_EXPORT QDeclarativeDomValueBinding +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomValueBinding { public: QDeclarativeDomValueBinding(); @@ -226,7 +228,7 @@ private: QSharedDataPointer<QDeclarativeDomBasicValuePrivate> d; }; -class Q_DECLARATIVE_EXPORT QDeclarativeDomValueValueSource +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomValueValueSource { public: QDeclarativeDomValueValueSource(); @@ -241,7 +243,7 @@ private: QSharedDataPointer<QDeclarativeDomBasicValuePrivate> d; }; -class Q_DECLARATIVE_EXPORT QDeclarativeDomValueValueInterceptor +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomValueValueInterceptor { public: QDeclarativeDomValueValueInterceptor(); @@ -257,7 +259,7 @@ private: }; -class Q_DECLARATIVE_EXPORT QDeclarativeDomComponent : public QDeclarativeDomObject +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomComponent : public QDeclarativeDomObject { public: QDeclarativeDomComponent(); @@ -268,7 +270,7 @@ public: QDeclarativeDomObject componentRoot() const; }; -class Q_DECLARATIVE_EXPORT QDeclarativeDomValue +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomValue { public: enum Type { @@ -312,7 +314,7 @@ private: QSharedDataPointer<QDeclarativeDomValuePrivate> d; }; -class Q_DECLARATIVE_EXPORT QDeclarativeDomList +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomList { public: QDeclarativeDomList(); @@ -333,7 +335,7 @@ private: }; class QDeclarativeDomImportPrivate; -class Q_DECLARATIVE_EXPORT QDeclarativeDomImport +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomImport { public: enum Type { Library, File }; diff --git a/src/declarative/qml/qdeclarativeenginedebug_p.h b/src/declarative/qml/qdeclarativeenginedebug_p.h index 613f1fe..97b8121 100644 --- a/src/declarative/qml/qdeclarativeenginedebug_p.h +++ b/src/declarative/qml/qdeclarativeenginedebug_p.h @@ -117,10 +117,10 @@ private: QList<QDeclarativeEngine *> m_engines; QDeclarativeWatcher *m_watch; }; -Q_DECLARATIVE_EXPORT QDataStream &operator<<(QDataStream &, const QDeclarativeEngineDebugServer::QDeclarativeObjectData &); -Q_DECLARATIVE_EXPORT QDataStream &operator>>(QDataStream &, QDeclarativeEngineDebugServer::QDeclarativeObjectData &); -Q_DECLARATIVE_EXPORT QDataStream &operator<<(QDataStream &, const QDeclarativeEngineDebugServer::QDeclarativeObjectProperty &); -Q_DECLARATIVE_EXPORT QDataStream &operator>>(QDataStream &, QDeclarativeEngineDebugServer::QDeclarativeObjectProperty &); +Q_DECLARATIVE_PRIVATE_EXPORT QDataStream &operator<<(QDataStream &, const QDeclarativeEngineDebugServer::QDeclarativeObjectData &); +Q_DECLARATIVE_PRIVATE_EXPORT QDataStream &operator>>(QDataStream &, QDeclarativeEngineDebugServer::QDeclarativeObjectData &); +Q_DECLARATIVE_PRIVATE_EXPORT QDataStream &operator<<(QDataStream &, const QDeclarativeEngineDebugServer::QDeclarativeObjectProperty &); +Q_DECLARATIVE_PRIVATE_EXPORT QDataStream &operator>>(QDataStream &, QDeclarativeEngineDebugServer::QDeclarativeObjectProperty &); QT_END_NAMESPACE diff --git a/src/declarative/qml/qdeclarativeglobal_p.h b/src/declarative/qml/qdeclarativeglobal_p.h index 65d9b24..31fbb1e 100644 --- a/src/declarative/qml/qdeclarativeglobal_p.h +++ b/src/declarative/qml/qdeclarativeglobal_p.h @@ -64,6 +64,12 @@ QT_MODULE(Declarative) return status == Yes; \ } +#ifdef Q_OS_SYMBIAN +#define Q_DECLARATIVE_PRIVATE_EXPORT +#else +#define Q_DECLARATIVE_PRIVATE_EXPORT Q_DECLARATIVE_EXPORT +#endif + struct QDeclarativeGraphics_DerivedObject : public QObject { void setParent_noEvent(QObject *parent) { diff --git a/src/declarative/qml/qdeclarativemetatype_p.h b/src/declarative/qml/qdeclarativemetatype_p.h index 382abd2..9c486d3 100644 --- a/src/declarative/qml/qdeclarativemetatype_p.h +++ b/src/declarative/qml/qdeclarativemetatype_p.h @@ -58,6 +58,7 @@ #include <QtCore/qglobal.h> #include <QtCore/qvariant.h> #include <QtCore/qbitarray.h> +#include <private/qdeclarativeglobal_p.h> QT_BEGIN_NAMESPACE @@ -65,7 +66,7 @@ class QDeclarativeType; class QDeclarativeCustomParser; class QDeclarativeTypePrivate; -class Q_DECLARATIVE_EXPORT QDeclarativeMetaType +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeMetaType { public: static bool copy(int type, void *data, const void *copy = 0); @@ -105,7 +106,7 @@ public: static QList<QDeclarativePrivate::AutoParentFunction> parentFunctions(); }; -class Q_DECLARATIVE_EXPORT QDeclarativeType +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeType { public: QByteArray typeName() const; diff --git a/src/declarative/qml/qdeclarativeparser_p.h b/src/declarative/qml/qdeclarativeparser_p.h index c58aebc..b4753df 100644 --- a/src/declarative/qml/qdeclarativeparser_p.h +++ b/src/declarative/qml/qdeclarativeparser_p.h @@ -54,7 +54,6 @@ // #include "qdeclarative.h" -#include "private/qdeclarativerefcount_p.h" #include <QtCore/qbytearray.h> #include <QtCore/qlist.h> @@ -63,6 +62,8 @@ #include <QtCore/qstringlist.h> #include <private/qobject_p.h> +#include <private/qdeclarativerefcount_p.h> +#include <private/qdeclarativeglobal_p.h> QT_BEGIN_HEADER diff --git a/src/declarative/qml/qdeclarativeproperty.cpp b/src/declarative/qml/qdeclarativeproperty.cpp index b5fb619..1395e97 100644 --- a/src/declarative/qml/qdeclarativeproperty.cpp +++ b/src/declarative/qml/qdeclarativeproperty.cpp @@ -1408,8 +1408,8 @@ static inline void flush_vme_signal(const QObject *object, int index) int methodOffset = metaObject->methodOffset(); while (methodOffset > index) { - methodOffset -= QMetaObject_methods(metaObject); metaObject = metaObject->d.superdata; + methodOffset -= QMetaObject_methods(metaObject); } QDeclarativeVMEMetaObject *vme = diff --git a/src/declarative/qml/qdeclarativeproperty_p.h b/src/declarative/qml/qdeclarativeproperty_p.h index a8438c8..a9d6979 100644 --- a/src/declarative/qml/qdeclarativeproperty_p.h +++ b/src/declarative/qml/qdeclarativeproperty_p.h @@ -55,17 +55,17 @@ #include "qdeclarativeproperty.h" -#include "private/qdeclarativepropertycache_p.h" -#include "private/qdeclarativeguard_p.h" - #include <private/qobject_p.h> +#include <private/qdeclarativeglobal_p.h> +#include <private/qdeclarativepropertycache_p.h> +#include <private/qdeclarativeguard_p.h> QT_BEGIN_NAMESPACE class QDeclarativeContext; class QDeclarativeEnginePrivate; class QDeclarativeExpression; -class Q_DECLARATIVE_EXPORT QDeclarativePropertyPrivate +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativePropertyPrivate { public: enum WriteFlag { BypassInterceptor = 0x01, DontRemoveBinding = 0x02 }; diff --git a/src/declarative/qml/qdeclarativepropertycache.cpp b/src/declarative/qml/qdeclarativepropertycache.cpp index 91aaaa4..0adcdbd 100644 --- a/src/declarative/qml/qdeclarativepropertycache.cpp +++ b/src/declarative/qml/qdeclarativepropertycache.cpp @@ -236,35 +236,6 @@ void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaOb { QDeclarativeEnginePrivate *enginePriv = QDeclarativeEnginePrivate::get(engine); - int propCount = metaObject->propertyCount(); - int propOffset = metaObject->propertyOffset(); - - indexCache.resize(propCount); - for (int ii = propOffset; ii < propCount; ++ii) { - QMetaProperty p = metaObject->property(ii); - if (!p.isScriptable()) - continue; - - QString propName = QString::fromUtf8(p.name()); - - RData *data = new RData; - data->identifier = enginePriv->objectClass->createPersistentIdentifier(propName); - indexCache[ii] = data; - - data->load(p, engine); - data->flags |= propertyFlags; - - if (stringCache.contains(propName)) { - stringCache[propName]->release(); - identifierCache[data->identifier.identifier]->release(); - } - - stringCache.insert(propName, data); - identifierCache.insert(data->identifier.identifier, data); - data->addref(); - data->addref(); - } - int methodCount = metaObject->methodCount(); // 3 to block the destroyed signal and the deleteLater() slot int methodOffset = qMax(3, metaObject->methodOffset()); @@ -304,6 +275,35 @@ void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaOb data->addref(); data->addref(); } + + int propCount = metaObject->propertyCount(); + int propOffset = metaObject->propertyOffset(); + + indexCache.resize(propCount); + for (int ii = propOffset; ii < propCount; ++ii) { + QMetaProperty p = metaObject->property(ii); + if (!p.isScriptable()) + continue; + + QString propName = QString::fromUtf8(p.name()); + + RData *data = new RData; + data->identifier = enginePriv->objectClass->createPersistentIdentifier(propName); + indexCache[ii] = data; + + data->load(p, engine); + data->flags |= propertyFlags; + + if (stringCache.contains(propName)) { + stringCache[propName]->release(); + identifierCache[data->identifier.identifier]->release(); + } + + stringCache.insert(propName, data); + identifierCache.insert(data->identifier.identifier, data); + data->addref(); + data->addref(); + } } void QDeclarativePropertyCache::updateRecur(QDeclarativeEngine *engine, const QMetaObject *metaObject) diff --git a/src/declarative/qml/qdeclarativestringconverters_p.h b/src/declarative/qml/qdeclarativestringconverters_p.h index e6b0abe..b632222 100644 --- a/src/declarative/qml/qdeclarativestringconverters_p.h +++ b/src/declarative/qml/qdeclarativestringconverters_p.h @@ -56,6 +56,8 @@ #include <QtCore/qglobal.h> #include <QtCore/qvariant.h> +#include <private/qdeclarativeglobal_p.h> + QT_BEGIN_NAMESPACE class QColor; @@ -69,19 +71,19 @@ class QVector3D; // XXX - Bauhaus currently uses these methods which is why they're exported namespace QDeclarativeStringConverters { - QVariant Q_DECLARATIVE_EXPORT variantFromString(const QString &); - QVariant Q_DECLARATIVE_EXPORT variantFromString(const QString &, int preferredType, bool *ok = 0); + QVariant Q_DECLARATIVE_PRIVATE_EXPORT variantFromString(const QString &); + QVariant Q_DECLARATIVE_PRIVATE_EXPORT variantFromString(const QString &, int preferredType, bool *ok = 0); - QColor Q_DECLARATIVE_EXPORT colorFromString(const QString &, bool *ok = 0); + QColor Q_DECLARATIVE_PRIVATE_EXPORT colorFromString(const QString &, bool *ok = 0); #ifndef QT_NO_DATESTRING - QDate Q_DECLARATIVE_EXPORT dateFromString(const QString &, bool *ok = 0); - QTime Q_DECLARATIVE_EXPORT timeFromString(const QString &, bool *ok = 0); - QDateTime Q_DECLARATIVE_EXPORT dateTimeFromString(const QString &, bool *ok = 0); + QDate Q_DECLARATIVE_PRIVATE_EXPORT dateFromString(const QString &, bool *ok = 0); + QTime Q_DECLARATIVE_PRIVATE_EXPORT timeFromString(const QString &, bool *ok = 0); + QDateTime Q_DECLARATIVE_PRIVATE_EXPORT dateTimeFromString(const QString &, bool *ok = 0); #endif - QPointF Q_DECLARATIVE_EXPORT pointFFromString(const QString &, bool *ok = 0); - QSizeF Q_DECLARATIVE_EXPORT sizeFFromString(const QString &, bool *ok = 0); - QRectF Q_DECLARATIVE_EXPORT rectFFromString(const QString &, bool *ok = 0); - QVector3D Q_DECLARATIVE_EXPORT vector3DFromString(const QString &, bool *ok = 0); + QPointF Q_DECLARATIVE_PRIVATE_EXPORT pointFFromString(const QString &, bool *ok = 0); + QSizeF Q_DECLARATIVE_PRIVATE_EXPORT sizeFFromString(const QString &, bool *ok = 0); + QRectF Q_DECLARATIVE_PRIVATE_EXPORT rectFFromString(const QString &, bool *ok = 0); + QVector3D Q_DECLARATIVE_PRIVATE_EXPORT vector3DFromString(const QString &, bool *ok = 0); } QT_END_NAMESPACE diff --git a/src/declarative/qml/qdeclarativevaluetype_p.h b/src/declarative/qml/qdeclarativevaluetype_p.h index 4b1bbd6..06c8669 100644 --- a/src/declarative/qml/qdeclarativevaluetype_p.h +++ b/src/declarative/qml/qdeclarativevaluetype_p.h @@ -70,7 +70,7 @@ QT_BEGIN_NAMESPACE -class Q_DECLARATIVE_EXPORT QDeclarativeValueType : public QObject +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeValueType : public QObject { Q_OBJECT public: @@ -81,7 +81,7 @@ public: virtual void setValue(QVariant) = 0; }; -class Q_DECLARATIVE_EXPORT QDeclarativeValueTypeFactory +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeValueTypeFactory { public: QDeclarativeValueTypeFactory(); diff --git a/src/declarative/qml/qmetaobjectbuilder_p.h b/src/declarative/qml/qmetaobjectbuilder_p.h index dbaf9e6..a90ba63 100644 --- a/src/declarative/qml/qmetaobjectbuilder_p.h +++ b/src/declarative/qml/qmetaobjectbuilder_p.h @@ -58,6 +58,8 @@ #include <QtCore/qdatastream.h> #include <QtCore/qmap.h> +#include <private/qdeclarativeglobal_p.h> + QT_BEGIN_NAMESPACE class QMetaObjectBuilderPrivate; @@ -68,7 +70,7 @@ class QMetaPropertyBuilderPrivate; class QMetaEnumBuilder; class QMetaEnumBuilderPrivate; -class Q_DECLARATIVE_EXPORT QMetaObjectBuilder +class Q_DECLARATIVE_PRIVATE_EXPORT QMetaObjectBuilder { public: enum AddMember @@ -193,7 +195,7 @@ private: friend class QMetaEnumBuilder; }; -class Q_DECLARATIVE_EXPORT QMetaMethodBuilder +class Q_DECLARATIVE_PRIVATE_EXPORT QMetaMethodBuilder { public: QMetaMethodBuilder() : _mobj(0), _index(0) {} @@ -231,7 +233,7 @@ private: QMetaMethodBuilderPrivate *d_func() const; }; -class Q_DECLARATIVE_EXPORT QMetaPropertyBuilder +class Q_DECLARATIVE_PRIVATE_EXPORT QMetaPropertyBuilder { public: QMetaPropertyBuilder() : _mobj(0), _index(0) {} @@ -282,7 +284,7 @@ private: QMetaPropertyBuilderPrivate *d_func() const; }; -class Q_DECLARATIVE_EXPORT QMetaEnumBuilder +class Q_DECLARATIVE_PRIVATE_EXPORT QMetaEnumBuilder { public: QMetaEnumBuilder() : _mobj(0), _index(0) {} diff --git a/src/declarative/util/qdeclarativeanimation_p.h b/src/declarative/util/qdeclarativeanimation_p.h index 8cb17e4..cd90417 100644 --- a/src/declarative/util/qdeclarativeanimation_p.h +++ b/src/declarative/util/qdeclarativeanimation_p.h @@ -63,7 +63,7 @@ QT_MODULE(Declarative) class QDeclarativeAbstractAnimationPrivate; class QDeclarativeAnimationGroup; -class Q_DECLARATIVE_EXPORT QDeclarativeAbstractAnimation : public QObject, public QDeclarativePropertyValueSource, public QDeclarativeParserStatus +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeAbstractAnimation : public QObject, public QDeclarativePropertyValueSource, public QDeclarativeParserStatus { Q_OBJECT Q_DECLARE_PRIVATE(QDeclarativeAbstractAnimation) @@ -165,7 +165,7 @@ protected: }; class QDeclarativeScriptActionPrivate; -class Q_DECLARATIVE_EXPORT QDeclarativeScriptAction : public QDeclarativeAbstractAnimation +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeScriptAction : public QDeclarativeAbstractAnimation { Q_OBJECT Q_DECLARE_PRIVATE(QDeclarativeScriptAction) diff --git a/src/declarative/util/qdeclarativebehavior_p.h b/src/declarative/util/qdeclarativebehavior_p.h index 9801fb2..80ed984 100644 --- a/src/declarative/util/qdeclarativebehavior_p.h +++ b/src/declarative/util/qdeclarativebehavior_p.h @@ -57,7 +57,7 @@ QT_MODULE(Declarative) class QDeclarativeAbstractAnimation; class QDeclarativeBehaviorPrivate; -class Q_DECLARATIVE_EXPORT QDeclarativeBehavior : public QObject, public QDeclarativePropertyValueInterceptor +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeBehavior : public QObject, public QDeclarativePropertyValueInterceptor { Q_OBJECT Q_DECLARE_PRIVATE(QDeclarativeBehavior) diff --git a/src/declarative/util/qdeclarativelistmodel_p.h b/src/declarative/util/qdeclarativelistmodel_p.h index e9673c8..90036f9 100644 --- a/src/declarative/util/qdeclarativelistmodel_p.h +++ b/src/declarative/util/qdeclarativelistmodel_p.h @@ -64,7 +64,7 @@ class NestedListModel; class QDeclarativeListModelWorkerAgent; struct ModelNode; class FlatListScriptClass; -class Q_DECLARATIVE_EXPORT QDeclarativeListModel : public QListModelInterface +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeListModel : public QListModelInterface { Q_OBJECT Q_PROPERTY(int count READ count NOTIFY countChanged) diff --git a/src/declarative/util/qdeclarativeopenmetaobject_p.h b/src/declarative/util/qdeclarativeopenmetaobject_p.h index c18fa3d..dff6776 100644 --- a/src/declarative/util/qdeclarativeopenmetaobject_p.h +++ b/src/declarative/util/qdeclarativeopenmetaobject_p.h @@ -42,10 +42,11 @@ #ifndef QDECLARATIVEOPENMETAOBJECT_H #define QDECLARATIVEOPENMETAOBJECT_H -#include <private/qdeclarativerefcount_p.h> #include <QtCore/QMetaObject> #include <QtCore/QObject> +#include <private/qdeclarativerefcount_p.h> +#include <private/qdeclarativeglobal_p.h> #include <private/qobject_p.h> QT_BEGIN_HEADER @@ -57,7 +58,7 @@ QT_MODULE(Declarative) class QDeclarativeEngine; class QMetaPropertyBuilder; class QDeclarativeOpenMetaObjectTypePrivate; -class Q_DECLARATIVE_EXPORT QDeclarativeOpenMetaObjectType : public QDeclarativeRefCount +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeOpenMetaObjectType : public QDeclarativeRefCount { public: QDeclarativeOpenMetaObjectType(const QMetaObject *base, QDeclarativeEngine *engine); @@ -78,7 +79,7 @@ private: }; class QDeclarativeOpenMetaObjectPrivate; -class Q_DECLARATIVE_EXPORT QDeclarativeOpenMetaObject : public QAbstractDynamicMetaObject +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeOpenMetaObject : public QAbstractDynamicMetaObject { public: QDeclarativeOpenMetaObject(QObject *, bool = true); diff --git a/src/declarative/util/qdeclarativepropertychanges_p.h b/src/declarative/util/qdeclarativepropertychanges_p.h index 199928f..449574c 100644 --- a/src/declarative/util/qdeclarativepropertychanges_p.h +++ b/src/declarative/util/qdeclarativepropertychanges_p.h @@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) class QDeclarativePropertyChangesPrivate; -class Q_DECLARATIVE_EXPORT QDeclarativePropertyChanges : public QDeclarativeStateOperation +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativePropertyChanges : public QDeclarativeStateOperation { Q_OBJECT Q_DECLARE_PRIVATE(QDeclarativePropertyChanges) diff --git a/src/declarative/util/qdeclarativestate_p.h b/src/declarative/util/qdeclarativestate_p.h index a0ab11b..d01af4e 100644 --- a/src/declarative/util/qdeclarativestate_p.h +++ b/src/declarative/util/qdeclarativestate_p.h @@ -45,6 +45,7 @@ #include <qdeclarative.h> #include <qdeclarativeproperty.h> #include <QtCore/qobject.h> +#include <private/qdeclarativeglobal_p.h> QT_BEGIN_HEADER @@ -56,7 +57,7 @@ class QDeclarativeActionEvent; class QDeclarativeAbstractBinding; class QDeclarativeBinding; class QDeclarativeExpression; -class Q_DECLARATIVE_EXPORT QDeclarativeAction +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeAction { public: QDeclarativeAction(); @@ -113,7 +114,7 @@ public: class QDeclarativeStateGroup; class QDeclarativeState; class QDeclarativeStateOperationPrivate; -class Q_DECLARATIVE_EXPORT QDeclarativeStateOperation : public QObject +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeStateOperation : public QObject { Q_OBJECT public: @@ -138,7 +139,7 @@ typedef QDeclarativeStateOperation::ActionList QDeclarativeStateActions; class QDeclarativeTransition; class QDeclarativeStatePrivate; -class Q_DECLARATIVE_EXPORT QDeclarativeState : public QObject +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeState : public QObject { Q_OBJECT diff --git a/src/declarative/util/qdeclarativestategroup_p.h b/src/declarative/util/qdeclarativestategroup_p.h index cac23f4..0222cf2 100644 --- a/src/declarative/util/qdeclarativestategroup_p.h +++ b/src/declarative/util/qdeclarativestategroup_p.h @@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) class QDeclarativeStateGroupPrivate; -class Q_DECLARATIVE_EXPORT QDeclarativeStateGroup : public QObject, public QDeclarativeParserStatus +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeStateGroup : public QObject, public QDeclarativeParserStatus { Q_OBJECT Q_INTERFACES(QDeclarativeParserStatus) diff --git a/src/declarative/util/qdeclarativetimer_p.h b/src/declarative/util/qdeclarativetimer_p.h index 08c3d4e..ee3d038 100644 --- a/src/declarative/util/qdeclarativetimer_p.h +++ b/src/declarative/util/qdeclarativetimer_p.h @@ -47,6 +47,8 @@ #include <QtCore/qobject.h> #include <QtCore/qabstractanimation.h> +#include <private/qdeclarativeglobal_p.h> + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE @@ -54,7 +56,7 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) class QDeclarativeTimerPrivate; -class Q_DECLARATIVE_EXPORT QDeclarativeTimer : public QObject, public QDeclarativeParserStatus +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeTimer : public QObject, public QDeclarativeParserStatus { Q_OBJECT Q_DECLARE_PRIVATE(QDeclarativeTimer) diff --git a/src/declarative/util/qdeclarativetransition_p.h b/src/declarative/util/qdeclarativetransition_p.h index fc7a577..5b20cb2 100644 --- a/src/declarative/util/qdeclarativetransition_p.h +++ b/src/declarative/util/qdeclarativetransition_p.h @@ -57,7 +57,7 @@ QT_MODULE(Declarative) class QDeclarativeAbstractAnimation; class QDeclarativeTransitionPrivate; class QDeclarativeTransitionManager; -class Q_DECLARATIVE_EXPORT QDeclarativeTransition : public QObject +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeTransition : public QObject { Q_OBJECT Q_DECLARE_PRIVATE(QDeclarativeTransition) diff --git a/src/declarative/util/qlistmodelinterface_p.h b/src/declarative/util/qlistmodelinterface_p.h index 8c8ebb3..8b62fc4 100644 --- a/src/declarative/util/qlistmodelinterface_p.h +++ b/src/declarative/util/qlistmodelinterface_p.h @@ -45,13 +45,15 @@ #include <QtCore/QHash> #include <QtCore/QVariant> +#include <private/qdeclarativeglobal_p.h> + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE QT_MODULE(Declarative) -class Q_DECLARATIVE_EXPORT QListModelInterface : public QObject +class Q_DECLARATIVE_PRIVATE_EXPORT QListModelInterface : public QObject { Q_OBJECT public: |