[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/extragear/graphics
From:       Michael Georg Hansen <mike () mghansen ! de>
Date:       2010-08-20 20:28:30
Message-ID: 20100820202830.64993AC855 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1166089 by mghansen:

Fix libkmap test.



 M  +1 -1      digikam/digikam/mapwidgetview.cpp  
 M  +1 -1      libkmap/libkmap/itemmarkertiler.cpp  
 M  +9 -1      libkmap/test/test-model.cpp  
 M  +3 -0      libkmap/test/test-model.h  


--- branches/extragear/graphics/digikam/digikam/mapwidgetview.cpp #1166088:1166089
@@ -177,7 +177,7 @@
             this, SLOT(slotThumbnailLoaded(const LoadingDescription&, const \
QPixmap&)));  
     connect(DatabaseAccess::databaseWatch(), SIGNAL(imageChange(const ImageChangeset \
                &)),
-            this, SLOT(slotImageChange(const ImageChangeset &)));
+            this, SLOT(slotImageChange(const ImageChangeset &)), \
Qt::QueuedConnection);  
     // TODO: disable this connection and rely only on the database based one above
 //     connect(d->model, SIGNAL(dataChanged(const QModelIndex&, const \
                QModelIndex&)),
--- branches/extragear/graphics/libkmap/libkmap/itemmarkertiler.cpp #1166088:1166089
@@ -81,7 +81,7 @@
 //                 this, SLOT(slotSourceModelDataChanged(const QModelIndex&, const \
QModelIndex&)));  
         connect(d->modelHelper, SIGNAL(signalModelChangedDrastically()),
-                this, SLOT(slotSourceModelReset()), Qt::QueuedConnection);
+                this, SLOT(slotSourceModelReset()));
 
         connect(d->markerModel, SIGNAL(modelReset()),
                 this, SLOT(slotSourceModelReset()));
--- branches/extragear/graphics/libkmap/test/test-model.cpp #1166088:1166089
@@ -37,12 +37,19 @@
    m_itemModel(itemModel),
    m_itemSelectionModel(itemSelectionModel)
 {
+    connect(itemModel, SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&)),
+            this, SLOT(slotDataChanged(const QModelIndex&, const QModelIndex&)));
 }
 
 MarkerModelHelper::~MarkerModelHelper()
 {
 }
 
+void MarkerModelHelper::slotDataChanged(const QModelIndex& topLeft, const \
QModelIndex& bottomRight) +{
+    emit(signalModelChangedDrastically());
+}
+
 QAbstractItemModel* MarkerModelHelper::model() const
 {
     return m_itemModel;
@@ -633,7 +640,8 @@
 
         QBENCHMARK
         {
-            for (int l = 0; l<=maxLevel; ++l)
+            const int l=maxLevel;
+//             for (int l = 0; l<=maxLevel; ++l)
             {
                 // iterate over the whole world:
                 ItemMarkerTiler::NonEmptyIterator it(&mm, l);
--- branches/extragear/graphics/libkmap/test/test-model.h #1166088:1166089
@@ -46,6 +46,9 @@
     virtual QItemSelectionModel* selectionModel() const;
     virtual bool itemCoordinates(const QModelIndex& index, KMap::GeoCoordinates* \
const coordinates) const;  
+private Q_SLOTS:
+    void slotDataChanged(const QModelIndex& topLeft, const QModelIndex& \
bottomRight); +
 private:
     QAbstractItemModel* const m_itemModel;
     QItemSelectionModel* const m_itemSelectionModel;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic