Hi Oliver:

Am 04.11.11 09:58 schrieb(en) Oliver Eichler:
Can't ignore. It's already in svn

The current svn doesn't build on Qt 4.6.x (i.e. my Mac platforms) as 
QElapsedTimer requires 4.7.  As it's used for debugging purposes only, the 
attached trivial patched can be used to hide it.

Best, Albrecht.
Index: src/CMapTDB.cpp
===================================================================
--- src/CMapTDB.cpp	(Revision 3056)
+++ src/CMapTDB.cpp	(Arbeitskopie)
@@ -37,7 +37,11 @@
 #include <QSqlDatabase>
 #include <algorithm>
 
+// define DEBUG_DRAW to get drawing performance (needs Qt >= 4.7)
+#undef DEBUG_DRAW
+#ifdef DEBUG_DRAW
 #include <QElapsedTimer>
+#endif
 
 #ifdef WIN32
 #define CMAPTDB_MIN(x,y) _cpp_min(x,y)
@@ -2102,20 +2106,34 @@
 
     if(!doFastDraw)
     {
+#ifdef DEBUG_DRAW
         QElapsedTimer et;
+#endif
         QVector<QRect> rectPois;
 
+#ifdef DEBUG_DRAW
         et.start();
+#endif
         drawPolylines(p, polylines);
-//        qDebug() << "drawPolylines: " << et.restart() << "ms";
+#ifdef DEBUG_DRAW
+        qDebug() << "drawPolylines: " << et.restart() << "ms";
+#endif
         drawPoints(p, points, rectPois);
-//        qDebug() << "drawPoints: " << et.restart() << "ms";
+#ifdef DEBUG_DRAW
+        qDebug() << "drawPoints: " << et.restart() << "ms";
+#endif
         drawPois(p, pois, rectPois);
-//        qDebug() << "drawPois: " << et.restart() << "ms";
+#ifdef DEBUG_DRAW
+        qDebug() << "drawPois: " << et.restart() << "ms";
+#endif
         drawText(p);
-//        qDebug() << "drawText: " << et.restart() << "ms";
+#ifdef DEBUG_DRAW
+        qDebug() << "drawText: " << et.restart() << "ms";
+#endif
         drawLabels(p, labels);
-//        qDebug() << "drawLabels: " << et.restart() << "ms";
+#ifdef DEBUG_DRAW
+        qDebug() << "drawLabels: " << et.restart() << "ms";
+#endif
 
     }
 }

Attachment: pgpfXQkIZLVDJ.pgp
Description: PGP signature

------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Qlandkartegt-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qlandkartegt-users

Reply via email to