[QGIS Commit] r10136 - in branches/Version-1_0: . cmake debian src/app src/app/composer src/core src/core/composer src/core/renderer src/core/symbology src/gui src/plugins/quick_print src/plugins/spit src/plugins/wfs src/providers/postgres src/providers/wfs tests/src/core

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sun Feb 8 14:18:53 EST 2009


Author: jef
Date: 2009-02-08 14:18:53 -0500 (Sun, 08 Feb 2009)
New Revision: 10136

Added:
   branches/Version-1_0/debian/qgis.desktop
Modified:
   branches/Version-1_0/CMakeLists.txt
   branches/Version-1_0/cmake/FindPostgres.cmake
   branches/Version-1_0/debian/changelog
   branches/Version-1_0/debian/qgis-plugin-grass.postrm
   branches/Version-1_0/debian/qgis-plugin-grass.preinst
   branches/Version-1_0/debian/qgis.install
   branches/Version-1_0/debian/qgis.mime
   branches/Version-1_0/src/app/CMakeLists.txt
   branches/Version-1_0/src/app/composer/qgscomposer.cpp
   branches/Version-1_0/src/app/qgisapp.cpp
   branches/Version-1_0/src/app/qgsabout.cpp
   branches/Version-1_0/src/app/qgsattributetable.cpp
   branches/Version-1_0/src/app/qgsattributetabledisplay.cpp
   branches/Version-1_0/src/app/qgsdbsourceselect.cpp
   branches/Version-1_0/src/app/qgsgeomtypedialog.cpp
   branches/Version-1_0/src/app/qgsgraduatedsymboldialog.cpp
   branches/Version-1_0/src/app/qgsuniquevaluedialog.cpp
   branches/Version-1_0/src/core/composer/qgscomposition.cpp
   branches/Version-1_0/src/core/qgslabel.cpp
   branches/Version-1_0/src/core/qgslogger.cpp
   branches/Version-1_0/src/core/qgsproject.cpp
   branches/Version-1_0/src/core/renderer/qgssinglesymbolrenderer.cpp
   branches/Version-1_0/src/core/symbology/qgssymbol.cpp
   branches/Version-1_0/src/core/symbology/qgssymbologyutils.cpp
   branches/Version-1_0/src/gui/qgsprojectionselector.cpp
   branches/Version-1_0/src/gui/qgsquickprint.cpp
   branches/Version-1_0/src/gui/qgsrubberband.cpp
   branches/Version-1_0/src/plugins/quick_print/quickprintgui.cpp
   branches/Version-1_0/src/plugins/spit/qgsdbfbase.h
   branches/Version-1_0/src/plugins/spit/qgsshapefile.cpp
   branches/Version-1_0/src/plugins/wfs/qgswfssourceselect.cpp
   branches/Version-1_0/src/providers/postgres/qgspostgresextentthread.cpp
   branches/Version-1_0/src/providers/wfs/qgswfsdata.cpp
   branches/Version-1_0/src/providers/wfs/qgswfsprovider.cpp
   branches/Version-1_0/tests/src/core/qgsrenderchecker.cpp
   branches/Version-1_0/tests/src/core/regression1141.cpp
   branches/Version-1_0/tests/src/core/testqgsapplication.cpp
   branches/Version-1_0/tests/src/core/testqgsgeometry.cpp
   branches/Version-1_0/tests/src/core/testqgsmaprenderer.cpp
   branches/Version-1_0/tests/src/core/testqgsrasterlayer.cpp
Log:
merge fixes from trunk:
r10117: fix #1532
r10116: skip labels with size<=0 - otherwise the size is ignored d
r10094: fix #1523
r10084: fix #1516
r10078: add -Wformat-security to PEDANTIC 
r10073: update desktop integration in debian package
r10068: fix comparision 
r9943: fix postgres <8.3 support
r9916: speed up QgsRubberBand::setToGeometry()
r9914: update trac link in about box
r9908: apply patch #1447 from smizuno (thanks!)
r9894+9895: update debian packaging
r9880: update german translation


Modified: branches/Version-1_0/CMakeLists.txt
===================================================================
--- branches/Version-1_0/CMakeLists.txt	2009-02-08 18:30:28 UTC (rev 10135)
+++ branches/Version-1_0/CMakeLists.txt	2009-02-08 19:18:53 UTC (rev 10136)
@@ -179,7 +179,7 @@
     ADD_DEFINITIONS( /wd4512 )  # assignment operator could not be generated (sqlite3_index_info)
     ADD_DEFINITIONS( /wd4610 )  # user defined constructor required (sqlite3_index_info)
   ELSE (MSVC)
-    ADD_DEFINITIONS( -Wall -Wno-long-long )
+    ADD_DEFINITIONS( -Wall -Wno-long-long -Wformat-security )
     # Qt produces lots of warnings with strict aliasing (as of Qt 4.4.0 & GCC 4.3)
     # ADD_DEFINITIONS( -fstrict-aliasing -Wstrict-aliasing=1 )
   ENDIF (MSVC)

Modified: branches/Version-1_0/cmake/FindPostgres.cmake
===================================================================
--- branches/Version-1_0/cmake/FindPostgres.cmake	2009-02-08 18:30:28 UTC (rev 10135)
+++ branches/Version-1_0/cmake/FindPostgres.cmake	2009-02-08 19:18:53 UTC (rev 10136)
@@ -61,6 +61,13 @@
 
 IF (POSTGRES_INCLUDE_DIR AND POSTGRES_LIBRARY)
    SET(POSTGRES_FOUND TRUE)
+
+   IF(EXISTS "${POSTGRES_INCLUDE_DIR}/pg_config.h")
+     SET(HAVE_PGCONFIG TRUE)
+   ELSE(EXISTS "${POSTGRES_INCLUDE_DIR}/pg_config.h")
+     SET(HAVE_PGCONFIG FALSE)
+   ENDIF(EXISTS "${POSTGRES_INCLUDE_DIR}/pg_config.h")
+
 ENDIF (POSTGRES_INCLUDE_DIR AND POSTGRES_LIBRARY)
 
 
@@ -80,5 +87,5 @@
    ELSE (POSTGRES_FIND_REQUIRED)
       MESSAGE(STATUS "Could not find PostgreSQL")
    ENDIF (POSTGRES_FIND_REQUIRED)
-
+   
 ENDIF (POSTGRES_FOUND)

Modified: branches/Version-1_0/debian/changelog
===================================================================
--- branches/Version-1_0/debian/changelog	2009-02-08 18:30:28 UTC (rev 10135)
+++ branches/Version-1_0/debian/changelog	2009-02-08 19:18:53 UTC (rev 10136)
@@ -1,3 +1,14 @@
+qgis (1.0.0) experimental; urgency=low
+ 
+  * new upstream release
+  * update qgis.mime
+  * add qgis.desktop and qgis.xml 
+  * add mime types for KDE
+  * don't ignore errors in preinst and postrm
+  * run ldconfig in postrm
+
+ -- Jürgen E. Fischer <jef at norbit.de>  Tue, 23 Dec 2008 20:42:21 +0100
+
 qgis (1.0preview18) experimental; urgency=low
 
   * add suggestion for gpsbabel

Modified: branches/Version-1_0/debian/qgis-plugin-grass.postrm
===================================================================
--- branches/Version-1_0/debian/qgis-plugin-grass.postrm	2009-02-08 18:30:28 UTC (rev 10135)
+++ branches/Version-1_0/debian/qgis-plugin-grass.postrm	2009-02-08 19:18:53 UTC (rev 10136)
@@ -1,5 +1,10 @@
 #!/bin/sh
 
+set -e
+
 if [ "$1" = "remove" ]; then
 	dpkg-divert --package qgis-plugin-grass --remove --rename --divert /usr/bin/qgis.bin /usr/bin/qgis
+	ldconfig
 fi
+
+exit 0

Modified: branches/Version-1_0/debian/qgis-plugin-grass.preinst
===================================================================
--- branches/Version-1_0/debian/qgis-plugin-grass.preinst	2009-02-08 18:30:28 UTC (rev 10135)
+++ branches/Version-1_0/debian/qgis-plugin-grass.preinst	2009-02-08 19:18:53 UTC (rev 10136)
@@ -1,5 +1,9 @@
 #!/bin/sh
 
+set -e
+
 if [ "$1" = "install" -o "$1" = "upgrade" ]; then
 	dpkg-divert --package qgis-plugin-grass --add --rename --divert /usr/bin/qgis.bin /usr/bin/qgis
 fi
+
+exit 0

Added: branches/Version-1_0/debian/qgis.desktop
===================================================================
--- branches/Version-1_0/debian/qgis.desktop	                        (rev 0)
+++ branches/Version-1_0/debian/qgis.desktop	2009-02-08 19:18:53 UTC (rev 10136)
@@ -0,0 +1,26 @@
+[Desktop Entry]
+Type=Application
+Name=Quantum GIS
+Version=1.0
+GenericName=Geographical Information System
+GenericName[de]=Geographisches Informationssystem
+Icon=qgis-icon
+TryExec=/usr/bin/qgis
+Exec=/usr/bin/qgis %F
+Terminal=false
+StartupNotify=false
+Categories=Qt;Science;GIS;OSGeo;
+MimeType=application/x-qgis-project;image/tiff;image/jpeg;image/jp2;application/x-raster-aig;application/x-raster-ecw;application/x-raster-mrsid;application/x-mapinfo-mif;application/x-esri-shape;
+[Desktop Entry]
+Type=Application
+Name=Quantum GIS
+Version=1.0
+GenericName=Geographical Information System
+GenericName[de]=Geographisches Informationssystem
+Icon=qgis-icon
+TryExec=/usr/bin/qgis
+Exec=/usr/bin/qgis %F
+Terminal=false
+StartupNotify=false
+Categories=Education;Geography;Qt;
+MimeType=application/x-qgis-project;image/tiff;image/jpeg;image/jp2;application/x-raster-aig;application/x-raster-ecw;application/x-raster-mrsid;application/x-mapinfo-mif;application/x-esri-shape;

Modified: branches/Version-1_0/debian/qgis.install
===================================================================
--- branches/Version-1_0/debian/qgis.install	2009-02-08 18:30:28 UTC (rev 10135)
+++ branches/Version-1_0/debian/qgis.install	2009-02-08 19:18:53 UTC (rev 10136)
@@ -34,3 +34,14 @@
 usr/lib/qgis/libinterpolationplugin.so 
 usr/lib/qgis/libogrconverterplugin.so
 usr/lib/qgis/libcoordinatecaptureplugin.so
+../qgis.desktop usr/share/applications
+../qgis.xml usr/share/mime/packages
+../mime/application/x-esri-shape.desktop usr/share/mimelnk/application
+../mime/application/x-mapinfo-mif.desktop usr/share/mimelnk/application
+../mime/application/x-esri-crs.desktop usr/share/mimelnk/application
+../mime/application/x-raster-ecw.desktop usr/share/mimelnk/application
+../mime/application/x-adobe-mif.desktop usr/share/mimelnk/application
+../mime/application/x-raster-aig.desktop usr/share/mimelnk/application
+../mime/application/x-qgis-project.desktop usr/share/mimelnk/application
+../mime/application/x-raster-mrsid.desktop usr/share/mimelnk/application
+../mime/application/x-qgis-layer-settings.desktop usr/share/mimelnk/application

Modified: branches/Version-1_0/debian/qgis.mime
===================================================================
--- branches/Version-1_0/debian/qgis.mime	2009-02-08 18:30:28 UTC (rev 10135)
+++ branches/Version-1_0/debian/qgis.mime	2009-02-08 19:18:53 UTC (rev 10136)
@@ -1,7 +1,9 @@
-application/shp; qgis '%s'; edit=qgis '%s'; test=test "$DISPLAY" != ""; priority=2
-application/mif; qgis '%s'; edit=qgis '%s'; test=test "$DISPLAY" != ""; priority=2
-application/jpg; qgis '%s'; edit=qgis '%s'; test=test "$DISPLAY" != ""; priority=2
-application/tif; qgis '%s'; edit=qgis '%s'; test=test "$DISPLAY" != ""; priority=2
-application/aig; qgis '%s'; edit=qgis '%s'; test=test "$DISPLAY" != ""; priority=2
-application/ecw; qgis '%s'; edit=qgis '%s'; test=test "$DISPLAY" != ""; priority=2
-application/sid; qgis '%s'; edit=qgis '%s'; test=test "$DISPLAY" != ""; priority=2
+image/tif; qgis '%s'; description="TIFF Image"; test=test -n "$DISPLAY"; nametemplate=%s.tif; priority=2
+image/jpg; qgis '%s'; description="JPEG Image"; test=test -n "$DISPLAY"; nametemplate=%s.jpg; priority=2
+image/jp2; qgis '%s'; description="JPEG 2000 Image"; test=test -n "$DISPLAY"; nametempalte=%s.jp2; priority=2
+application/x-raster-aig; qgis '%s'; description="AIG raster data"; test=test -n "$DISPLAY"; nametemplate=%s.aig; priority=2
+application/x-raster-ecw; qgis '%s'; description="ECW raster data"; test=test -n "$DISPLAY"; nametemplate=%s.ecw; priority=2
+application/x-raster-mrsid; qgis '%s'; description="MrSID raster data"; test=test -n "$DISPLAY"; nametemplate=%s.sid; priority=2
+application/x-raster-mif; qgis '%s'; description="MapInfo file"; test=test -n "$DISPLAY"; nametemplate=%s.mif; priority=2
+application/x-esri-shape; qgis '%s'; description="ESRI shape file"; test=test -n "$DISPLAY"; nametemplate=%s.shp; priority=2
+application/x-qgis-project; qgis '%s'; description="Quantum GIS Project"; test=test -n "$DISPLAY"; nametemplate=%s.qgs

Modified: branches/Version-1_0/src/app/CMakeLists.txt
===================================================================
--- branches/Version-1_0/src/app/CMakeLists.txt	2009-02-08 18:30:28 UTC (rev 10135)
+++ branches/Version-1_0/src/app/CMakeLists.txt	2009-02-08 19:18:53 UTC (rev 10136)
@@ -133,6 +133,10 @@
   )
 
 IF (POSTGRES_FOUND)
+  IF(HAVE_PGCONFIG)
+    ADD_DEFINITIONS(-DHAVE_PGCONFIG=1)
+  ENDIF(HAVE_PGCONFIG)
+
   SET (QGIS_APP_SRCS ${QGIS_APP_SRCS}
     qgsdbsourceselect.cpp
     qgsnewconnection.cpp

Modified: branches/Version-1_0/src/app/composer/qgscomposer.cpp
===================================================================
--- branches/Version-1_0/src/app/composer/qgscomposer.cpp	2009-02-08 18:30:28 UTC (rev 10135)
+++ branches/Version-1_0/src/app/composer/qgscomposer.cpp	2009-02-08 19:18:53 UTC (rev 10136)
@@ -550,7 +550,7 @@
   }
 
   myOutputFileNameQString = myQFileDialog->selectedFiles().last();
-  qWarning( myOutputFileNameQString.toLocal8Bit().data() );
+  qWarning( "%s", myOutputFileNameQString.toLocal8Bit().constData() );
   QString myFilterString = myQFileDialog->selectedFilter();
   QgsDebugMsg( QString( "Selected filter: %1" ).arg( myFilterString ) );
   QgsDebugMsg( QString( "Image type: %1" ).arg( myFilterMap[myFilterString] ) );

Modified: branches/Version-1_0/src/app/qgisapp.cpp
===================================================================
--- branches/Version-1_0/src/app/qgisapp.cpp	2009-02-08 18:30:28 UTC (rev 10135)
+++ branches/Version-1_0/src/app/qgisapp.cpp	2009-02-08 19:18:53 UTC (rev 10136)
@@ -5500,7 +5500,7 @@
                             tr( "<p>Version of the project file: %1<br>Current version of QGIS: %2" ) )
                           .arg( oldVersion )
                           .arg( QGis::QGIS_VERSION )
-                          .arg( "<a href=https://svn.qgis.org/trac/wiki>http://svn.qgis.org/trac/wiki</a> " )
+                          .arg( "<a href=\"https://trac.osgeo.org/qgis\">http://trac.osgeo.org/qgis</a> " )
                           .arg( tr( "<tt>Settings:Options:General</tt>", "Menu path to setting options" ) )
                           .arg( tr( "Warn me when opening a project file saved with an older version of QGIS" ) )
                         );

Modified: branches/Version-1_0/src/app/qgsabout.cpp
===================================================================
--- branches/Version-1_0/src/app/qgsabout.cpp	2009-02-08 18:30:28 UTC (rev 10135)
+++ branches/Version-1_0/src/app/qgsabout.cpp	2009-02-08 19:18:53 UTC (rev 10136)
@@ -56,8 +56,8 @@
 
   QFile file( QgsApplication::authorsFilePath() );
 #ifdef QGISDEBUG
-  printf(( "Reading authors file " + file.fileName() +
-           ".............................................\n" ).toLocal8Bit().constData() );
+  printf( "Reading authors file %s.............................................\n",
+          file.fileName().toLocal8Bit().constData() );
 #endif
   if ( file.open( QIODevice::ReadOnly ) )
   {
@@ -103,8 +103,8 @@
   // read the SPONSORS file and populate the text widget
   QFile sponsorFile( QgsApplication::sponsorsFilePath() );
 #ifdef QGISDEBUG
-  printf(( "Reading sponsors file " + sponsorFile.fileName() +
-           ".............................................\n" ).toLocal8Bit().constData() );
+  printf( "Reading sponsors file %s.............................................\n",
+          sponsorFile.fileName().toLocal8Bit().constData() );
 #endif
   if ( sponsorFile.open( QIODevice::ReadOnly ) )
   {

Modified: branches/Version-1_0/src/app/qgsattributetable.cpp
===================================================================
--- branches/Version-1_0/src/app/qgsattributetable.cpp	2009-02-08 18:30:28 UTC (rev 10135)
+++ branches/Version-1_0/src/app/qgsattributetable.cpp	2009-02-08 19:18:53 UTC (rev 10136)
@@ -264,7 +264,7 @@
         return 1;
       }
     }
-    else if ( compareValue = 0 )
+    else if ( compareValue == 0 )
     {
       return 0;
     }

Modified: branches/Version-1_0/src/app/qgsattributetabledisplay.cpp
===================================================================
--- branches/Version-1_0/src/app/qgsattributetabledisplay.cpp	2009-02-08 18:30:28 UTC (rev 10135)
+++ branches/Version-1_0/src/app/qgsattributetabledisplay.cpp	2009-02-08 19:18:53 UTC (rev 10136)
@@ -296,6 +296,9 @@
 
 void QgsAttributeTableDisplay::search()
 {
+  if ( tblAttributes->rowCount() == 0 )
+    return;
+
   int type = tblAttributes->item( 0, mSearchColumns->currentIndex() )->data( QgsAttributeTable::AttributeType ).toInt();
   bool numeric = ( type == QVariant::Int || type == QVariant::Double );
 

Modified: branches/Version-1_0/src/app/qgsdbsourceselect.cpp
===================================================================
--- branches/Version-1_0/src/app/qgsdbsourceselect.cpp	2009-02-08 18:30:28 UTC (rev 10135)
+++ branches/Version-1_0/src/app/qgsdbsourceselect.cpp	2009-02-08 19:18:53 UTC (rev 10136)
@@ -38,7 +38,9 @@
 #include <cassert>
 #include <iostream>
 
+#ifdef HAVE_PGCONFIG
 #include <pg_config.h>
+#endif
 
 QgsDbSourceSelect::QgsDbSourceSelect( QWidget *parent, Qt::WFlags fl )
     : QDialog( parent, fl ), mColumnTypeThread( NULL ), pd( 0 )
@@ -440,8 +442,7 @@
     }
     else
     {
-      qDebug( "Unable to get list of spatially enabled tables from the database" );
-      qDebug( PQerrorMessage( pd ) );
+      qDebug( "Unable to get list of spatially enabled tables from the database\n%s", PQerrorMessage( pd ) );
     }
     // BEGIN CHANGES ECOS
     if ( cmbConnections->count() > 0 )
@@ -509,7 +510,7 @@
   QString schemaName = mTableModel.itemFromIndex( mProxyModel.mapToSource( schemaSibling ) )->text();
   QString tableName = mTableModel.itemFromIndex( mProxyModel.mapToSource( tableSibling ) )->text();
   QString tableString = "\"" + schemaName + "\".\"" + tableName + "\"";
-  qWarning( tableString.toUtf8() );
+  qWarning( "%s", tableString.toUtf8().constData() );
 
   QString currentSql;
   QModelIndex sqlSibling = index.sibling( index.row(), 4 );

Modified: branches/Version-1_0/src/app/qgsgeomtypedialog.cpp
===================================================================
--- branches/Version-1_0/src/app/qgsgeomtypedialog.cpp	2009-02-08 18:30:28 UTC (rev 10135)
+++ branches/Version-1_0/src/app/qgsgeomtypedialog.cpp	2009-02-08 19:18:53 UTC (rev 10136)
@@ -96,7 +96,7 @@
     QTreeWidgetItem *item = *it;
     at.push_back( std::make_pair( item->text( 0 ), item->text( 1 ) ) );
 #ifdef QGISDEBUG
-    qWarning(( "appending " + item->text( 0 ) + "//" + item->text( 1 ) ).toLocal8Bit().data() );
+    qWarning( "appending %s//%s", item->text( 0 ).toLocal8Bit().constData(), item->text( 1 ).toLocal8Bit().constData() );
 #endif
     ++it;
   }

Modified: branches/Version-1_0/src/app/qgsgraduatedsymboldialog.cpp
===================================================================
--- branches/Version-1_0/src/app/qgsgraduatedsymboldialog.cpp	2009-02-08 18:30:28 UTC (rev 10135)
+++ branches/Version-1_0/src/app/qgsgraduatedsymboldialog.cpp	2009-02-08 19:18:53 UTC (rev 10136)
@@ -332,7 +332,7 @@
       pen.setColor( Qt::black );
     }
 
-    pen.setWidth( 0.1 );
+    pen.setWidthF( symbol->lineWidth() );
     brush.setStyle( Qt::SolidPattern );
     symbol->setPen( pen );
     symbol->setBrush( brush );

Modified: branches/Version-1_0/src/app/qgsuniquevaluedialog.cpp
===================================================================
--- branches/Version-1_0/src/app/qgsuniquevaluedialog.cpp	2009-02-08 18:30:28 UTC (rev 10135)
+++ branches/Version-1_0/src/app/qgsuniquevaluedialog.cpp	2009-02-08 19:18:53 UTC (rev 10136)
@@ -183,7 +183,7 @@
   {
     pen.setColor( thecolor );
     pen.setStyle( Qt::SolidLine );
-    pen.setWidthF( 0.1 );
+    pen.setWidthF( symbol->lineWidth() );
   }
   else
   {
@@ -191,7 +191,7 @@
     brush.setStyle( Qt::SolidPattern );
     pen.setColor( Qt::black );
     pen.setStyle( Qt::SolidLine );
-    pen.setWidthF( 0.1 );
+    pen.setWidthF( symbol->lineWidth() );
   }
   symbol->setPen( pen );
   symbol->setBrush( brush );
@@ -247,7 +247,7 @@
 void QgsUniqueValueDialog::resetColors()
 {
   QColor white;
-  white.setRgb( 255.0, 255.0, 255.0 );
+  white.setRgb( 255, 255, 255 );
 
   QList<QListWidgetItem *> selection = mClassListWidget->selectedItems();
   if ( selection.size() == 0 )

Modified: branches/Version-1_0/src/core/composer/qgscomposition.cpp
===================================================================
--- branches/Version-1_0/src/core/composer/qgscomposition.cpp	2009-02-08 18:30:28 UTC (rev 10135)
+++ branches/Version-1_0/src/core/composer/qgscomposition.cpp	2009-02-08 19:18:53 UTC (rev 10136)
@@ -197,7 +197,7 @@
     return;
   }
   mItemZList.push_back( item );
-  qWarning( QString::number( mItemZList.size() ).toLocal8Bit().data() );
+  qWarning( "%d", mItemZList.size() );
   item->setZValue( mItemZList.size() );
 }
 
@@ -330,7 +330,7 @@
     currentItem = *it;
     if ( currentItem )
     {
-      qWarning( QString::number( counter ).toLocal8Bit().data() );
+      qWarning( "%d", counter );
       currentItem->setZValue( counter );
     }
     ++counter;
@@ -344,7 +344,7 @@
   QLinkedList<QgsComposerItem*>::iterator before_it = mItemZList.begin();
   for ( ; before_it != mItemZList.end(); ++before_it )
   {
-    qWarning( QString::number(( *before_it )->zValue() ).toLocal8Bit().data() );
+    qWarning( "%lf", ( *before_it )->zValue() );
   }
 
   QMutableLinkedListIterator<QgsComposerItem*> it( mItemZList );
@@ -398,6 +398,6 @@
   QLinkedList<QgsComposerItem*>::iterator after_it = mItemZList.begin();
   for ( ; after_it != mItemZList.end(); ++after_it )
   {
-    qWarning( QString::number(( *after_it )->zValue() ).toLocal8Bit().data() );
+    qWarning( "%lf", ( *after_it )->zValue() );
   }
 }

Modified: branches/Version-1_0/src/core/qgslabel.cpp
===================================================================
--- branches/Version-1_0/src/core/qgslabel.cpp	2009-02-08 18:30:28 UTC (rev 10135)
+++ branches/Version-1_0/src/core/qgslabel.cpp	2009-02-08 19:18:53 UTC (rev 10136)
@@ -91,7 +91,6 @@
                             QgsFeature &feature, bool selected, QgsLabelAttributes *classAttributes,
                             double sizeScale, double rasterScaleFactor )
 {
-
   QPen pen;
   QFont font;
   QString value;
@@ -163,11 +162,12 @@
   //and scale the painter down by rasterScaleFactor when drawing the label
   size *= rasterScaleFactor;
 
-  if ( size > 0.0 )
-  {
-    font.setPixelSize( size );
-  }
+  if (( int )size <= 0 )
+    // skip too small labels
+    return;
 
+  font.setPixelSize( size );
+
   value = fieldValue( Color, feature );
   if ( value.isEmpty() )
   {

Modified: branches/Version-1_0/src/core/qgslogger.cpp
===================================================================
--- branches/Version-1_0/src/core/qgslogger.cpp	2009-02-08 18:30:28 UTC (rev 10135)
+++ branches/Version-1_0/src/core/qgslogger.cpp	2009-02-08 19:18:53 UTC (rev 10136)
@@ -35,22 +35,22 @@
   {
     if ( file == NULL )
     {
-      qDebug( msg.toLocal8Bit().data() );
+      qDebug( "%s", msg.toLocal8Bit().constData() );
     }
     else if ( function == NULL )
     {
-      qDebug( "%s: %s", file, msg.toLocal8Bit().data() );
+      qDebug( "%s: %s", file, msg.toLocal8Bit().constData() );
     }
     else if ( line == -1 )
     {
-      qDebug( "%s: (%s) %s", file, function, msg.toLocal8Bit().data() );
+      qDebug( "%s: (%s) %s", file, function, msg.toLocal8Bit().constData() );
     }
     else
     {
 #ifndef _MSC_VER
-      qDebug( "%s: %d: (%s) %s", file, line, function, msg.toLocal8Bit().data() );
+      qDebug( "%s: %d: (%s) %s", file, line, function, msg.toLocal8Bit().constData() );
 #else
-      qDebug( "%s(%d) : (%s) %s", file, line, function, msg.toLocal8Bit().data() );
+      qDebug( "%s(%d) : (%s) %s", file, line, function, msg.toLocal8Bit().constData() );
 #endif
     }
   }
@@ -72,22 +72,22 @@
   {
     if ( file == NULL )
     {
-      qDebug( "%s: %d", var.toLocal8Bit().data(), val );
+      qDebug( "%s: %d", var.toLocal8Bit().constData(), val );
     }
     else if ( function == NULL )
     {
-      qDebug( "%s: %s: %d", file, var.toLocal8Bit().data(), val );
+      qDebug( "%s: %s: %d", file, var.toLocal8Bit().constData(), val );
     }
     else if ( line == -1 )
     {
-      qDebug( "%s: (%s): %s: %d", file, function, var.toLocal8Bit().data(), val );
+      qDebug( "%s: (%s): %s: %d", file, function, var.toLocal8Bit().constData(), val );
     }
     else
     {
 #ifdef _MSC_VER
-      qDebug( "%s(%d): (%s), %s: %d", file, line, function, var.toLocal8Bit().data(), val );
+      qDebug( "%s(%d): (%s), %s: %d", file, line, function, var.toLocal8Bit().constData(), val );
 #else
-      qDebug( "%s: %d: (%s), %s: %d", file, line, function, var.toLocal8Bit().data(), val );
+      qDebug( "%s: %d: (%s), %s: %d", file, line, function, var.toLocal8Bit().constData(), val );
 #endif
     }
   }
@@ -109,22 +109,22 @@
   {
     if ( file == NULL )
     {
-      qDebug( "%s: %f", var.toLocal8Bit().data(), val );
+      qDebug( "%s: %f", var.toLocal8Bit().constData(), val );
     }
     else if ( function == NULL )
     {
-      qDebug( "%s: %s: %f", file, var.toLocal8Bit().data(), val );
+      qDebug( "%s: %s: %f", file, var.toLocal8Bit().constData(), val );
     }
     else if ( line == -1 )
     {
-      qDebug( "%s: (%s): %s: %f", file, function, var.toLocal8Bit().data(), val );
+      qDebug( "%s: (%s): %s: %f", file, function, var.toLocal8Bit().constData(), val );
     }
     else
     {
 #ifdef _MSC_VER
-      qDebug( "%s(%d): (%s), %s: %f", file, line, function, var.toLocal8Bit().data(), val );
+      qDebug( "%s(%d): (%s), %s: %f", file, line, function, var.toLocal8Bit().constData(), val );
 #else
-      qDebug( "%s: %d: (%s), %s: %f", file, line, function, var.toLocal8Bit().data(), val );
+      qDebug( "%s: %d: (%s), %s: %f", file, line, function, var.toLocal8Bit().constData(), val );
 #endif
     }
   }
@@ -132,17 +132,17 @@
 
 void QgsLogger::warning( const QString& msg )
 {
-  qWarning( msg.toLocal8Bit().data() );
+  qWarning( "%s", msg.toLocal8Bit().constData() );
 }
 
 void QgsLogger::critical( const QString& msg )
 {
-  qCritical( msg.toLocal8Bit().data() );
+  qCritical( "%s", msg.toLocal8Bit().constData() );
 }
 
 void QgsLogger::fatal( const QString& msg )
 {
-  qFatal( msg.toLocal8Bit().data() );
+  qFatal( "%s", msg.toLocal8Bit().constData() );
 }
 
 int QgsLogger::debugLevel()

Modified: branches/Version-1_0/src/core/qgsproject.cpp
===================================================================
--- branches/Version-1_0/src/core/qgsproject.cpp	2009-02-08 18:30:28 UTC (rev 10135)
+++ branches/Version-1_0/src/core/qgsproject.cpp	2009-02-08 19:18:53 UTC (rev 10136)
@@ -770,7 +770,7 @@
                           errorMsg + QObject::tr( " at line " ) + QString::number( line ) + QObject::tr( " column " ) +
                           QString::number( column );
 
-    qDebug( errorString.toUtf8().constData() );
+    qDebug( "%s", errorString.toUtf8().constData() );
 
     imp_->file.close();
 

Modified: branches/Version-1_0/src/core/renderer/qgssinglesymbolrenderer.cpp
===================================================================
--- branches/Version-1_0/src/core/renderer/qgssinglesymbolrenderer.cpp	2009-02-08 18:30:28 UTC (rev 10135)
+++ branches/Version-1_0/src/core/renderer/qgssinglesymbolrenderer.cpp	2009-02-08 19:18:53 UTC (rev 10136)
@@ -53,7 +53,6 @@
     sy->setFillStyle( Qt::SolidPattern );
     sy->setColor( QColor( 0, 0, 0 ) );
   }
-  sy->setLineWidth( DEFAULT_LINE_WIDTH ); //declared in qgis.h
   mSymbol = sy;
   updateSymbolAttributes();
 }

Modified: branches/Version-1_0/src/core/symbology/qgssymbol.cpp
===================================================================
--- branches/Version-1_0/src/core/symbology/qgssymbol.cpp	2009-02-08 18:30:28 UTC (rev 10135)
+++ branches/Version-1_0/src/core/symbology/qgssymbol.cpp	2009-02-08 19:18:53 UTC (rev 10136)
@@ -50,7 +50,7 @@
     mRotationClassificationField( -1 ),
     mScaleClassificationField( -1 )
 {
-  mPen.setWidth( DEFAULT_LINE_WIDTH );
+  mPen.setWidthF( DEFAULT_LINE_WIDTH );
 }
 
 
@@ -70,7 +70,7 @@
     mRotationClassificationField( -1 ),
     mScaleClassificationField( -1 )
 {
-  mPen.setWidth( DEFAULT_LINE_WIDTH );
+  mPen.setWidthF( DEFAULT_LINE_WIDTH );
 }
 
 QgsSymbol::QgsSymbol()
@@ -83,7 +83,7 @@
     mRotationClassificationField( -1 ),
     mScaleClassificationField( -1 )
 {
-  mPen.setWidth( DEFAULT_LINE_WIDTH );
+  mPen.setWidthF( DEFAULT_LINE_WIDTH );
 }
 
 
@@ -99,7 +99,7 @@
     mRotationClassificationField( -1 ),
     mScaleClassificationField( -1 )
 {
-  mPen.setWidth( DEFAULT_LINE_WIDTH );
+  mPen.setWidthF( DEFAULT_LINE_WIDTH );
 }
 
 QgsSymbol::QgsSymbol( const QgsSymbol& s )
@@ -353,7 +353,7 @@
   QImage preRotateImage;
   QPen pen = mPen;
   double newWidth = mPen.widthF() * widthScale * rasterScaleFactor;
-  pen.setWidth( newWidth );
+  pen.setWidthF( newWidth );
 
   if ( selected )
   {

Modified: branches/Version-1_0/src/core/symbology/qgssymbologyutils.cpp
===================================================================
--- branches/Version-1_0/src/core/symbology/qgssymbologyutils.cpp	2009-02-08 18:30:28 UTC (rev 10135)
+++ branches/Version-1_0/src/core/symbology/qgssymbologyutils.cpp	2009-02-08 19:18:53 UTC (rev 10136)
@@ -873,7 +873,7 @@
   }
   else                        //return a null string
   {
-    qWarning( "Brush style \"" + brushString.toUtf8() + "\" not found in qString2BrushStyle" );
+    qWarning( "Brush style \"%s\" not found in qString2BrushStyle", brushString.toUtf8().constData() );
     return Qt::NoBrush;
   }
 }

Modified: branches/Version-1_0/src/gui/qgsprojectionselector.cpp
===================================================================
--- branches/Version-1_0/src/gui/qgsprojectionselector.cpp	2009-02-08 18:30:28 UTC (rev 10135)
+++ branches/Version-1_0/src/gui/qgsprojectionselector.cpp	2009-02-08 19:18:53 UTC (rev 10136)
@@ -803,8 +803,7 @@
   myFileInfo.setFile( myDatabaseFileName );
   if ( !myFileInfo.exists( ) ) //its not critical if this happens
   {
-    qDebug( myDatabaseFileName.toUtf8() );
-    qDebug( "User db does not exist" );
+    qDebug( "%s\nUser db does not exist", myDatabaseFileName.toUtf8().constData() );
     return ;
   }
   myResult = sqlite3_open( myDatabaseFileName.toUtf8().data(), &myDatabase );

Modified: branches/Version-1_0/src/gui/qgsquickprint.cpp
===================================================================
--- branches/Version-1_0/src/gui/qgsquickprint.cpp	2009-02-08 18:30:28 UTC (rev 10135)
+++ branches/Version-1_0/src/gui/qgsquickprint.cpp	2009-02-08 19:18:53 UTC (rev 10136)
@@ -83,12 +83,12 @@
 void QgsQuickPrint::setLogo1( QString theFileName )
 {
   mLogo1File = theFileName;
-  qDebug( "Logo1 set to: " + mLogo1File.toLocal8Bit() );
+  qDebug( "Logo1 set to: %s", mLogo1File.toLocal8Bit().constData() );
 }
 void QgsQuickPrint::setLogo2( QString theFileName )
 {
   mLogo2File = theFileName;
-  qDebug( "Logo2 set to: " + mLogo2File.toLocal8Bit() );
+  qDebug( "Logo2 set to: %s", mLogo2File.toLocal8Bit().constData() );
 }
 void QgsQuickPrint::setOutputPdf( QString theFileName )
 {
@@ -140,7 +140,7 @@
   int myPrintResolutionDpi = 300;
   myPrinter.setResolution( myPrintResolutionDpi );
   myPrinter.setOutputFormat( QPrinter::PdfFormat );
-  qDebug( "Printing to page size"  +  pageSizeToString( mPageSize ).toLocal8Bit() );
+  qDebug( "Printing to page size %s", pageSizeToString( mPageSize ).toLocal8Bit().constData() );
   myPrinter.setPageSize( mPageSize );
   myPrinter.setOutputFileName( mOutputFileName );
   myPrinter.setOrientation( QPrinter::Landscape );
@@ -588,8 +588,7 @@
   int myLogoXDim = ( myDrawableWidth / 100 ) * myLogoWidthPercent;
   int myLogoYDim = ( myDrawableHeight / 100 ) * myLogoHeightPercent;
   QPixmap myLogo1;
-  qDebug( "Logo1:" );
-  qDebug( mLogo1File.toLocal8Bit() );
+  qDebug( "Logo1: %s", mLogo1File.toLocal8Bit().constData() );
   myLogo1.fill( Qt::white );
   myLogo1.load( mLogo1File );
   myLogo1 = myLogo1.scaled( myLogoXDim, myLogoYDim, Qt::KeepAspectRatio );
@@ -1042,9 +1041,7 @@
     myList << myCumulativeLine.trimmed();
   }
 
-  //qDebug("Wrapped legend entry:");
-  //qDebug(theString);
-  //qDebug(myList.join("\n").toLocal8Bit());
+  //qDebug("Wrapped legend entry: %s\n%s", theString, myList.join("\n").toLocal8Bit().constData() );
   return myList;
 
 }

Modified: branches/Version-1_0/src/gui/qgsrubberband.cpp
===================================================================
--- branches/Version-1_0/src/gui/qgsrubberband.cpp	2009-02-08 18:30:28 UTC (rev 10135)
+++ branches/Version-1_0/src/gui/qgsrubberband.cpp	2009-02-08 19:18:53 UTC (rev 10136)
@@ -186,10 +186,10 @@
       {
         pt = geom->asPoint();
       }
-      addPoint( QgsPoint( pt.x() - d, pt.y() - d ) );
-      addPoint( QgsPoint( pt.x() + d, pt.y() - d ) );
-      addPoint( QgsPoint( pt.x() + d, pt.y() + d ) );
-      addPoint( QgsPoint( pt.x() - d, pt.y() + d ) );
+      addPoint( QgsPoint( pt.x() - d, pt.y() - d ), false );
+      addPoint( QgsPoint( pt.x() + d, pt.y() - d ), false );
+      addPoint( QgsPoint( pt.x() + d, pt.y() + d ), false );
+      addPoint( QgsPoint( pt.x() - d, pt.y() + d ), false );
     }
     break;
 
@@ -204,17 +204,17 @@
         QgsPoint pt = mpt[i];
         if ( layer )
         {
-          addPoint( mr->layerToMapCoordinates( layer, QgsPoint( pt.x() - d, pt.y() - d ) ) );
-          addPoint( mr->layerToMapCoordinates( layer, QgsPoint( pt.x() + d, pt.y() - d ) ) );
-          addPoint( mr->layerToMapCoordinates( layer, QgsPoint( pt.x() + d, pt.y() + d ) ) );
-          addPoint( mr->layerToMapCoordinates( layer, QgsPoint( pt.x() - d, pt.y() + d ) ) );
+          addPoint( mr->layerToMapCoordinates( layer, QgsPoint( pt.x() - d, pt.y() - d ) ), false );
+          addPoint( mr->layerToMapCoordinates( layer, QgsPoint( pt.x() + d, pt.y() - d ) ), false );
+          addPoint( mr->layerToMapCoordinates( layer, QgsPoint( pt.x() + d, pt.y() + d ) ), false );
+          addPoint( mr->layerToMapCoordinates( layer, QgsPoint( pt.x() - d, pt.y() + d ) ), false );
         }
         else
         {
-          addPoint( QgsPoint( pt.x() - d, pt.y() - d ) );
-          addPoint( QgsPoint( pt.x() + d, pt.y() - d ) );
-          addPoint( QgsPoint( pt.x() + d, pt.y() + d ) );
-          addPoint( QgsPoint( pt.x() - d, pt.y() + d ) );
+          addPoint( QgsPoint( pt.x() - d, pt.y() - d ), false );
+          addPoint( QgsPoint( pt.x() + d, pt.y() - d ), false );
+          addPoint( QgsPoint( pt.x() + d, pt.y() + d ), false );
+          addPoint( QgsPoint( pt.x() - d, pt.y() + d ), false );
         }
       }
     }
@@ -229,11 +229,11 @@
       {
         if ( layer )
         {
-          addPoint( mr->layerToMapCoordinates( layer, line[i] ) );
+          addPoint( mr->layerToMapCoordinates( layer, line[i] ), false );
         }
         else
         {
-          addPoint( line[i] );
+          addPoint( line[i], false );
         }
       }
     }
@@ -259,7 +259,7 @@
           }
           else
           {
-            addPoint( line[j] );
+            addPoint( line[j], false, i );
           }
         }
       }
@@ -276,11 +276,11 @@
       {
         if ( layer )
         {
-          addPoint( mr->layerToMapCoordinates( layer, line[i] ) );
+          addPoint( mr->layerToMapCoordinates( layer, line[i] ), false );
         }
         else
         {
-          addPoint( line[i] );
+          addPoint( line[i], false );
         }
       }
     }
@@ -307,7 +307,7 @@
           }
           else
           {
-            addPoint( line[j] );
+            addPoint( line[j], false, i );
           }
         }
       }

Modified: branches/Version-1_0/src/plugins/quick_print/quickprintgui.cpp
===================================================================
--- branches/Version-1_0/src/plugins/quick_print/quickprintgui.cpp	2009-02-08 18:30:28 UTC (rev 10135)
+++ branches/Version-1_0/src/plugins/quick_print/quickprintgui.cpp	2009-02-08 19:18:53 UTC (rev 10136)
@@ -146,7 +146,7 @@
       myQuickPrint.setOutputPdf( myOutputFileName );
       QString myPageSizeString = cboPageSize->itemData( cboPageSize->currentIndex() ).toString();
       myQuickPrint.setPageSize( QgsQuickPrint::stringToPageSize( myPageSizeString ) );
-      qDebug( "Page size : " + myPageSizeString.toLocal8Bit() );
+      qDebug( "Page size : %s", myPageSizeString.toLocal8Bit().constData() );
       myQuickPrint.printMap();
     }
     else

Modified: branches/Version-1_0/src/plugins/spit/qgsdbfbase.h
===================================================================
--- branches/Version-1_0/src/plugins/spit/qgsdbfbase.h	2009-02-08 18:30:28 UTC (rev 10135)
+++ branches/Version-1_0/src/plugins/spit/qgsdbfbase.h	2009-02-08 19:18:53 UTC (rev 10136)
@@ -15,6 +15,12 @@
 /* $Id$ */
 
 // Dbase header structure
+#ifndef _MSC_VER
+#include <stdint.h>
+#else
+typedef __int32 int32_t;
+typedef __int16 int16_t;
+#endif
 
 struct DbaseHeader
 {
@@ -22,9 +28,9 @@
   char year;
   char month;
   char day;
-  long num_recs;
-  short size_hdr;
-  short size_rec;
+  int32_t num_recs;
+  int16_t size_hdr;
+  int16_t size_rec;
   char reserved[3];
   char lan[13];
   char reserved2[4];
@@ -35,7 +41,7 @@
 {
   char field_name[11];
   char field_type;
-  long field_addr;  /* used only in memory */
+  int32_t field_addr;  /* used only in memory */
   unsigned char field_length;
   unsigned char field_decimal;
   char reserved[2];

Modified: branches/Version-1_0/src/plugins/spit/qgsshapefile.cpp
===================================================================
--- branches/Version-1_0/src/plugins/spit/qgsshapefile.cpp	2009-02-08 18:30:28 UTC (rev 10135)
+++ branches/Version-1_0/src/plugins/spit/qgsshapefile.cpp	2009-02-08 19:18:53 UTC (rev 10136)
@@ -207,7 +207,8 @@
         dbf.read(( char * )&fda, sizeof( fda ) );
         switch ( fda.field_type )
         {
-          case 'N': if (( int )fda.field_decimal > 0 )
+          case 'N':
+            if (( int )fda.field_decimal > 0 )
               column_types.push_back( "float" );
             else
               column_types.push_back( "int" );

Modified: branches/Version-1_0/src/plugins/wfs/qgswfssourceselect.cpp
===================================================================
--- branches/Version-1_0/src/plugins/wfs/qgswfssourceselect.cpp	2009-02-08 18:30:28 UTC (rev 10135)
+++ branches/Version-1_0/src/plugins/wfs/qgswfssourceselect.cpp	2009-02-08 19:18:53 UTC (rev 10136)
@@ -214,7 +214,7 @@
 
   //print out result for a test
   QString resultString( result );
-  qWarning( resultString.toUtf8() );
+  qWarning( "%s", resultString.toUtf8().constData() );
 
   return 0;
 }
@@ -269,7 +269,7 @@
   QSettings settings;
   QString key = "/Qgis/connections-wfs/" + cmbConnections->currentText() + "/url";
   mUri = settings.value( key ).toString();
-  qWarning( "url is: " + mUri.toUtf8() );
+  qWarning( "url is: %s", mUri.toUtf8().constData() );
 
   //make a GetCapabilities request
   std::list<QString> typenames;
@@ -349,7 +349,7 @@
   {
     uri.append( "?" );
   }
-  qWarning( uri.toUtf8() + "SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=" + typeName.toUtf8() );
+  qWarning( "%sSERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=%s", uri.toUtf8().constData(), typeName.toUtf8().constData() );
 
   //get CRS
   QString crsString;
@@ -385,7 +385,7 @@
   if ( currentTreeItem )
   {
     QString currentTypename = currentTreeItem->text( 1 );
-    qWarning( "the current typename is: " + currentTypename.toUtf8() );
+    qWarning( "the current typename is: %s", currentTypename.toUtf8().constData() );
 
     std::map<QString, std::list<QString> >::const_iterator crsIterator = mAvailableCRS.find( currentTypename );
     if ( crsIterator != mAvailableCRS.end() )

Modified: branches/Version-1_0/src/providers/postgres/qgspostgresextentthread.cpp
===================================================================
--- branches/Version-1_0/src/providers/postgres/qgspostgresextentthread.cpp	2009-02-08 18:30:28 UTC (rev 10135)
+++ branches/Version-1_0/src/providers/postgres/qgspostgresextentthread.cpp	2009-02-08 19:18:53 UTC (rev 10136)
@@ -98,11 +98,8 @@
         "ymax(extent(" + geometryColumn + ")) as ymax," "ymin(extent(" + geometryColumn + ")) as ymin" " from " + tableName;
 #endif
 
-#ifdef QGISDEBUG
-  qDebug( "+++++++++QgsPostgresExtentThread::run -  Getting extents using schema.table: " + sql.toUtf8() );
-#endif
+  QgsDebugMsg( QString( "Getting extents using schema.table: %1" ).arg( sql ) );
 
-
   QgsDebugMsg( "About to issue query." );
 
   PGresult *result = PQexec( connection, sql.toUtf8() );

Modified: branches/Version-1_0/src/providers/wfs/qgswfsdata.cpp
===================================================================
--- branches/Version-1_0/src/providers/wfs/qgswfsdata.cpp	2009-02-08 18:30:28 UTC (rev 10135)
+++ branches/Version-1_0/src/providers/wfs/qgswfsdata.cpp	2009-02-08 19:18:53 UTC (rev 10136)
@@ -56,8 +56,7 @@
     if ( it->startsWith( "TYPENAME", Qt::CaseInsensitive ) )
     {
       mTypeName = it->section( "=", 1, 1 );
-      qWarning( "mTypeName is:" );
-      qWarning( mTypeName.toLocal8Bit().data() );
+      qWarning( "mTypeName is: %s", mTypeName.toLocal8Bit().constData() );
     }
   }
 

Modified: branches/Version-1_0/src/providers/wfs/qgswfsprovider.cpp
===================================================================
--- branches/Version-1_0/src/providers/wfs/qgswfsprovider.cpp	2009-02-08 18:30:28 UTC (rev 10135)
+++ branches/Version-1_0/src/providers/wfs/qgswfsprovider.cpp	2009-02-08 19:18:53 UTC (rev 10136)
@@ -296,10 +296,8 @@
     return 1;
   }
 
-  qWarning( "feature count after request is:" );
-  qWarning( QString::number( mFeatures.size() ).toLocal8Bit().data() );
-  qWarning( "mExtent after request is:" );
-  qWarning( mExtent.toString().toLocal8Bit().data() );
+  qWarning( "feature count after request is: %d", mFeatures.size() );
+  qWarning( "mExtent after request is: %s",  mExtent.toString().toLocal8Bit().data() );
 
   for ( QList<QgsFeature*>::iterator it = mFeatures.begin(); it != mFeatures.end(); ++it )
   {

Modified: branches/Version-1_0/tests/src/core/qgsrenderchecker.cpp
===================================================================
--- branches/Version-1_0/tests/src/core/qgsrenderchecker.cpp	2009-02-08 18:30:28 UTC (rev 10135)
+++ branches/Version-1_0/tests/src/core/qgsrenderchecker.cpp	2009-02-08 19:18:53 UTC (rev 10136)
@@ -138,14 +138,12 @@
   // Put the same info to debug too
   //
 
-  qDebug( "Expected size: " + QString::number( myExpectedImage.width() ).toLocal8Bit() + "w x " +
-          QString::number( myExpectedImage.width() ).toLocal8Bit() + "h" );
-  qDebug( "Actual   size: " + QString::number( myResultImage.width() ).toLocal8Bit() + "w x " +
-          QString::number( myResultImage.width() ).toLocal8Bit() + "h" );
+  qDebug( "Expected size: %dw x %dh", myExpectedImage.width(), myExpectedImage.height() );
+  qDebug( "Actual   size: %dw x %dh", myResultImage.width(), myResultImage.height() );
 
   if ( mMatchTarget != myPixelCount )
   {
-    qDebug( QString( "Test image and result image for %1 are different - FAILING!" ).arg( theTestName ).toLocal8Bit() );
+    qDebug( "Test image and result image for %s are different - FAILING!", theTestName.toLocal8Bit().constData() );
     mReport += "<tr><td colspan=3>";
     mReport += "<font color=red>Expected image and result image for " + theTestName + " are different dimensions - FAILING!</font>";
     mReport += "</td></tr>";
@@ -180,9 +178,7 @@
   //
   // Send match result to debug
   //
-  qDebug( QString::number( mMismatchCount ).toLocal8Bit() + "/" +
-          QString::number( mMatchTarget ).toLocal8Bit() +
-          " pixels mismatched" );;
+  qDebug( "%d/%d pixels mismatched", mMismatchCount, mMatchTarget );
 
   //
   // Send match result to report

Modified: branches/Version-1_0/tests/src/core/regression1141.cpp
===================================================================
--- branches/Version-1_0/tests/src/core/regression1141.cpp	2009-02-08 18:30:28 UTC (rev 10135)
+++ branches/Version-1_0/tests/src/core/regression1141.cpp	2009-02-08 19:18:53 UTC (rev 10136)
@@ -99,8 +99,7 @@
   mFields.insert( 0, myField );
   mCRS = QgsCoordinateReferenceSystem( GEOWkt );
 
-  qDebug( "Checking test dataset exists..." );
-  qDebug( mFileName.toLocal8Bit() );
+  qDebug( "Checking test dataset exists...\n%s", mFileName.toLocal8Bit().constData() );
 
   if ( !QFile::exists( mFileName ) )
   {

Modified: branches/Version-1_0/tests/src/core/testqgsapplication.cpp
===================================================================
--- branches/Version-1_0/tests/src/core/testqgsapplication.cpp	2009-02-08 18:30:28 UTC (rev 10135)
+++ branches/Version-1_0/tests/src/core/testqgsapplication.cpp	2009-02-08 19:18:53 UTC (rev 10136)
@@ -24,7 +24,7 @@
 
 class TestQgsApplication: public QObject
 {
-  Q_OBJECT;
+    Q_OBJECT;
   private slots:
     void checkTheme();
     void initTestCase();
@@ -39,8 +39,8 @@
   // Runs once before any tests are run
   //
   // init QGIS's paths - true means that all path will be inited from prefix
-  QString qgisPath = QCoreApplication::applicationDirPath ();
-  QgsApplication::setPrefixPath(INSTALL_PREFIX, true);
+  QString qgisPath = QCoreApplication::applicationDirPath();
+  QgsApplication::setPrefixPath( INSTALL_PREFIX, true );
   QgsApplication::showSettings();
 };
 
@@ -48,14 +48,14 @@
 {
   QString myIconPath = QgsApplication::defaultThemePath();
   QPixmap myPixmap;
-  myPixmap.load(myIconPath+"/mIconProjectionDisabled.png");
-  qDebug("Checking if a theme icon exists:");
-  qDebug(myIconPath.toLocal8Bit()+"/mIconProjectionDisabled.png");
-  QVERIFY(!myPixmap.isNull());
+  myPixmap.load( myIconPath + "/mIconProjectionDisabled.png" );
+  qDebug( "Checking if a theme icon exists:" );
+  qDebug( "%s/mIconProjectionDisabled.png", myIconPath.toLocal8Bit().constData() );
+  QVERIFY( !myPixmap.isNull() );
 
 };
 
 
-QTEST_MAIN(TestQgsApplication)
+QTEST_MAIN( TestQgsApplication )
 #include "moc_testqgsapplication.cxx"
 

Modified: branches/Version-1_0/tests/src/core/testqgsgeometry.cpp
===================================================================
--- branches/Version-1_0/tests/src/core/testqgsgeometry.cpp	2009-02-08 18:30:28 UTC (rev 10135)
+++ branches/Version-1_0/tests/src/core/testqgsgeometry.cpp	2009-02-08 19:18:53 UTC (rev 10136)
@@ -211,7 +211,7 @@
   QVERIFY( mpPolygonGeometryA->intersects( mpPolygonGeometryB ) );
   // should be a single polygon as A intersect B
   QgsGeometry * mypIntersectionGeometry  =  mpPolygonGeometryA->intersection( mpPolygonGeometryB );
-  qDebug( "Geometry Type: " + wkbTypeAsString( mypIntersectionGeometry->wkbType() ).toLocal8Bit() );
+  qDebug( "Geometry Type: %s", wkbTypeAsString( mypIntersectionGeometry->wkbType() ).toLocal8Bit().constData() );
   QVERIFY( mypIntersectionGeometry->wkbType() == QGis::WKBPolygon );
   QgsPolygon myPolygon = mypIntersectionGeometry->asPolygon();
   QVERIFY( myPolygon.size() > 0 ); //check that the union created a feature
@@ -228,7 +228,7 @@
 {
   // should be a multipolygon with 2 parts as A does not intersect C
   QgsGeometry * mypUnionGeometry  =  mpPolygonGeometryA->combine( mpPolygonGeometryC );
-  qDebug( "Geometry Type: " + wkbTypeAsString( mypUnionGeometry->wkbType() ).toLocal8Bit() );
+  qDebug( "Geometry Type: %s", wkbTypeAsString( mypUnionGeometry->wkbType() ).toLocal8Bit().constData() );
   QVERIFY( mypUnionGeometry->wkbType() == QGis::WKBMultiPolygon );
   QgsMultiPolygon myMultiPolygon = mypUnionGeometry->asMultiPolygon();
   QVERIFY( myMultiPolygon.size() > 0 ); //check that the union did not fail
@@ -241,7 +241,7 @@
 {
   // should be a single polygon as A intersect B
   QgsGeometry * mypUnionGeometry  =  mpPolygonGeometryA->combine( mpPolygonGeometryB );
-  qDebug( "Geometry Type: " + wkbTypeAsString( mypUnionGeometry->wkbType() ).toLocal8Bit() );
+  qDebug( "Geometry Type: %s", wkbTypeAsString( mypUnionGeometry->wkbType() ).toLocal8Bit().constData() );
   QVERIFY( mypUnionGeometry->wkbType() == QGis::WKBPolygon );
   QgsPolygon myPolygon = mypUnionGeometry->asPolygon();
   QVERIFY( myPolygon.size() > 0 ); //check that the union created a feature
@@ -254,7 +254,7 @@
 {
   // should be same as A since A does not intersect C so diff is 100% of A
   QgsGeometry * mypDifferenceGeometry  =  mpPolygonGeometryA->difference( mpPolygonGeometryC );
-  qDebug( "Geometry Type: " + wkbTypeAsString( mypDifferenceGeometry->wkbType() ).toLocal8Bit() );
+  qDebug( "Geometry Type: %s", wkbTypeAsString( mypDifferenceGeometry->wkbType() ).toLocal8Bit().constData() );
   QVERIFY( mypDifferenceGeometry->wkbType() == QGis::WKBPolygon );
   QgsPolygon myPolygon = mypDifferenceGeometry->asPolygon();
   QVERIFY( myPolygon.size() > 0 ); //check that the union did not fail
@@ -267,7 +267,7 @@
 {
   // should be a single polygon as (A - B) = subset of A
   QgsGeometry * mypDifferenceGeometry  =  mpPolygonGeometryA->difference( mpPolygonGeometryB );
-  qDebug( "Geometry Type: " + wkbTypeAsString( mypDifferenceGeometry->wkbType() ).toLocal8Bit() );
+  qDebug( "Geometry Type: %s", wkbTypeAsString( mypDifferenceGeometry->wkbType() ).toLocal8Bit().constData() );
   QVERIFY( mypDifferenceGeometry->wkbType() == QGis::WKBPolygon );
   QgsPolygon myPolygon = mypDifferenceGeometry->asPolygon();
   QVERIFY( myPolygon.size() > 0 ); //check that the union created a feature
@@ -279,7 +279,7 @@
 {
   // should be a single polygon
   QgsGeometry * mypBufferGeometry  =  mpPolygonGeometryB->buffer( 10, 10 );
-  qDebug( "Geometry Type: " + wkbTypeAsString( mypBufferGeometry->wkbType() ).toLocal8Bit() );
+  qDebug( "Geometry Type: %s", wkbTypeAsString( mypBufferGeometry->wkbType() ).toLocal8Bit().constData() );
   QVERIFY( mypBufferGeometry->wkbType() == QGis::WKBPolygon );
   QgsPolygon myPolygon = mypBufferGeometry->asPolygon();
   QVERIFY( myPolygon.size() > 0 ); //check that the buffer created a feature
@@ -310,7 +310,7 @@
   for ( int i = 0; i < theMultiPolygon.size(); i++ )
   {
     QgsPolygon myPolygon = theMultiPolygon.at( i );
-    qDebug( "\tPolygon in multipolygon: " + QString::number( i ).toLocal8Bit() );
+    qDebug( "\tPolygon in multipolygon: %d", i );
     dumpPolygon( myPolygon );
   }
 }
@@ -321,12 +321,12 @@
   for ( int j = 0; j < thePolygon.size(); j++ )
   {
     QgsPolyline myPolyline = thePolygon.at( j ); //rings of polygon
-    qDebug( "\t\tRing  in polygon: " + QString::number( j ).toLocal8Bit() );
+    qDebug( "\t\tRing in polygon: %d", j );
 
     for ( int k = 0; k < myPolyline.size(); k++ )
     {
       QgsPoint myPoint = myPolyline.at( k );
-      qDebug( "\t\t\tPoint in ring " + QString::number( k ).toLocal8Bit() + " :" + myPoint.toString().toLocal8Bit() );
+      qDebug( "\t\t\tPoint in ring %d : %s", k, myPoint.toString().toLocal8Bit().constData() );
       myPoints << QPointF( myPoint.x(), myPoint.y() );
     }
   }

Modified: branches/Version-1_0/tests/src/core/testqgsmaprenderer.cpp
===================================================================
--- branches/Version-1_0/tests/src/core/testqgsmaprenderer.cpp	2009-02-08 18:30:28 UTC (rev 10135)
+++ branches/Version-1_0/tests/src/core/testqgsmaprenderer.cpp	2009-02-08 19:18:53 UTC (rev 10136)
@@ -100,8 +100,7 @@
   //copy over the default qml for our generated layer
   QString myQmlFileName = myTestDataDir +  "maprender_testdata.qml";
   QFile::copy( myQmlFileName, myTmpDir + "maprender_testdata.qml" );
-  qDebug( "Checking test dataset exists..." );
-  qDebug( myFileName.toLocal8Bit() );
+  qDebug( "Checking test dataset exists...\n%s", myFileName.toLocal8Bit().constData() );
   if ( !QFile::exists( myFileName ) )
   {
     qDebug( "Creating test dataset: " );

Modified: branches/Version-1_0/tests/src/core/testqgsrasterlayer.cpp
===================================================================
--- branches/Version-1_0/tests/src/core/testqgsrasterlayer.cpp	2009-02-08 18:30:28 UTC (rev 10135)
+++ branches/Version-1_0/tests/src/core/testqgsrasterlayer.cpp	2009-02-08 19:18:53 UTC (rev 10136)
@@ -186,7 +186,7 @@
                        "NEAREST",
                        myInternalFlag
                      );
-  qDebug( myResult.toLocal8Bit() );
+  qDebug( "%s", myResult.toLocal8Bit().constData() );
   //
   // Lets verify we have pyramids now...
   //
@@ -232,7 +232,7 @@
   if ( !myStyleFlag )
   {
     qDebug( " **** setQml -> mpLandsatRasterLayer is invalid" );
-    qDebug( "Qml File :" +  myFileName.toLocal8Bit() );
+    qDebug( "Qml File :%s", myFileName.toLocal8Bit().constData() );
   }
   return myStyleFlag;
 }



More information about the QGIS-commit mailing list