Declarative: Compile on Windows.
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>
Fri, 30 Sep 2011 12:29:05 +0000 (14:29 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 5 Oct 2011 08:41:32 +0000 (10:41 +0200)
Initial-patch-by: Kent Hansen <kent.hansen@nokia.com>
Change-Id: Ieb7ff0537b641597fd0334ae1cb359f89c45ad50
Reviewed-on: http://codereview.qt-project.org/5871
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
src/declarative/qml/qdeclarativeengine_p.h
src/declarative/qml/qdeclarativeincubator.cpp
src/declarative/qml/qdeclarativeincubator_p.h

index 03d56e2..71d6220 100644 (file)
@@ -195,7 +195,11 @@ public:
 
     // Unfortunate workaround to avoid a circular dependency between 
     // qdeclarativeengine_p.h and qdeclarativeincubator_p.h
-    struct Incubator { QIntrusiveListNode next; };
+    struct Incubator {
+        QIntrusiveListNode next;
+        // Unfortunate workaround for MSVC
+        QIntrusiveListNode nextWaitingFor;
+    };
     QIntrusiveList<Incubator, &Incubator::next> incubatorList;
     unsigned int incubatorCount;
     QDeclarativeIncubationController *incubationController;
index ff0712d..ed75c9a 100644 (file)
@@ -525,7 +525,7 @@ void QDeclarativeIncubator::forceCompletion()
     QDeclarativeVME::Interrupt i;
     while (Loading == status()) {
         while (Loading == status() && !d->waitingFor.isEmpty())
-            d->waitingFor.first()->incubate(i);
+            static_cast<QDeclarativeIncubatorPrivate *>(d->waitingFor.first())->incubate(i);
         if (Loading == status())
             d->incubate(i);
     }
index e736aab..e71602a 100644 (file)
@@ -81,10 +81,9 @@ public:
     QDeclarativeVME vme;
     QDeclarativeVMEGuard vmeGuard;
 
-    typedef QDeclarativeIncubatorPrivate QIP;
-    QIP *waitingOnMe;
-    QIntrusiveListNode nextWaitingFor;
-    QIntrusiveList<QIP, &QIP::nextWaitingFor> waitingFor;
+    QDeclarativeIncubatorPrivate *waitingOnMe;
+    typedef QDeclarativeEnginePrivate::Incubator QIPBase;
+    QIntrusiveList<QIPBase, &QIPBase::nextWaitingFor> waitingFor;
 
     void clear();