Skip to content
Permalink
Browse files

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


git-svn-id: http://svn.osgeo.org/qgis/branches/Version-1_0@10136 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Feb 8, 2009
1 parent 126bb08 commit c2e6c354bccc573b9dd5552ef4db421003642b57
Showing with 202 additions and 138 deletions.
  1. +1 −1 CMakeLists.txt
  2. +8 −1 cmake/FindPostgres.cmake
  3. +11 −0 debian/changelog
  4. +5 −0 debian/qgis-plugin-grass.postrm
  5. +4 −0 debian/qgis-plugin-grass.preinst
  6. +26 −0 debian/qgis.desktop
  7. +11 −0 debian/qgis.install
  8. +9 −7 debian/qgis.mime
  9. +4 −0 src/app/CMakeLists.txt
  10. +1 −1 src/app/composer/qgscomposer.cpp
  11. +1 −1 src/app/qgisapp.cpp
  12. +4 −4 src/app/qgsabout.cpp
  13. +1 −1 src/app/qgsattributetable.cpp
  14. +3 −0 src/app/qgsattributetabledisplay.cpp
  15. +4 −3 src/app/qgsdbsourceselect.cpp
  16. +1 −1 src/app/qgsgeomtypedialog.cpp
  17. +1 −1 src/app/qgsgraduatedsymboldialog.cpp
  18. +3 −3 src/app/qgsuniquevaluedialog.cpp
  19. +4 −4 src/core/composer/qgscomposition.cpp
  20. +5 −5 src/core/qgslabel.cpp
  21. +18 −18 src/core/qgslogger.cpp
  22. +1 −1 src/core/qgsproject.cpp
  23. +0 −1 src/core/renderer/qgssinglesymbolrenderer.cpp
  24. +5 −5 src/core/symbology/qgssymbol.cpp
  25. +1 −1 src/core/symbology/qgssymbologyutils.cpp
  26. +1 −2 src/gui/qgsprojectionselector.cpp
  27. +5 −8 src/gui/qgsquickprint.cpp
  28. +18 −18 src/gui/qgsrubberband.cpp
  29. +1 −1 src/plugins/quick_print/quickprintgui.cpp
  30. +10 −4 src/plugins/spit/qgsdbfbase.h
  31. +2 −1 src/plugins/spit/qgsshapefile.cpp
  32. +4 −4 src/plugins/wfs/qgswfssourceselect.cpp
  33. +1 −4 src/providers/postgres/qgspostgresextentthread.cpp
  34. +1 −2 src/providers/wfs/qgswfsdata.cpp
  35. +2 −4 src/providers/wfs/qgswfsprovider.cpp
  36. +4 −8 tests/src/core/qgsrenderchecker.cpp
  37. +1 −2 tests/src/core/regression1141.cpp
  38. +8 −8 tests/src/core/testqgsapplication.cpp
  39. +9 −9 tests/src/core/testqgsgeometry.cpp
  40. +1 −2 tests/src/core/testqgsmaprenderer.cpp
  41. +2 −2 tests/src/core/testqgsrasterlayer.cpp
@@ -179,7 +179,7 @@ IF (PEDANTIC)
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)
@@ -61,6 +61,13 @@ ENDIF(WIN32)

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_FOUND)
ELSE (POSTGRES_FIND_REQUIRED)
MESSAGE(STATUS "Could not find PostgreSQL")
ENDIF (POSTGRES_FIND_REQUIRED)

ENDIF (POSTGRES_FOUND)
@@ -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@norbit.de> Tue, 23 Dec 2008 20:42:21 +0100

qgis (1.0preview18) experimental; urgency=low

* add suggestion for gpsbabel
@@ -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
@@ -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
@@ -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;
@@ -34,3 +34,14 @@ usr/lib/qgis/libdxf2shpconverterplugin.so
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
@@ -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
@@ -133,6 +133,10 @@ SET (QGIS_APP_MOC_HDRS
)

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
@@ -550,7 +550,7 @@ void QgsComposer::on_mActionExportAsImage_activated( void )
}

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] ) );
@@ -5500,7 +5500,7 @@ void QgisApp::oldProjectVersionWarning( QString oldVersion )
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" ) )
);
@@ -56,8 +56,8 @@ void QgsAbout::init()

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 @@ void QgsAbout::init()
// 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 ) )
{
@@ -264,7 +264,7 @@ int QgsAttributeTable::compareItems( QString s1, QString s2, bool ascending, boo
return 1;
}
}
else if ( compareValue = 0 )
else if ( compareValue == 0 )
{
return 0;
}
@@ -296,6 +296,9 @@ void QgsAttributeTableDisplay::zoomMapToSelectedRows()

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 );

@@ -38,7 +38,9 @@ email : sherman at mrcc.com
#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 @@ void QgsDbSourceSelect::on_btnConnect_clicked()
}
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 @@ void QgsDbSourceSelect::setSql( const QModelIndex& index )
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 );
@@ -96,7 +96,7 @@ void QgsGeomTypeDialog::attributes( std::list<std::pair<QString, QString> >& at
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;
}
@@ -332,7 +332,7 @@ void QgsGraduatedSymbolDialog::adjustClassification()
pen.setColor( Qt::black );
}

pen.setWidth( 0.1 );
pen.setWidthF( symbol->lineWidth() );
brush.setStyle( Qt::SolidPattern );
symbol->setPen( pen );
symbol->setBrush( brush );
@@ -183,15 +183,15 @@ void QgsUniqueValueDialog::setSymbolColor( QgsSymbol *symbol, QColor thecolor )
{
pen.setColor( thecolor );
pen.setStyle( Qt::SolidLine );
pen.setWidthF( 0.1 );
pen.setWidthF( symbol->lineWidth() );
}
else
{
brush.setColor( thecolor );
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::randomizeColors()
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 )
@@ -197,7 +197,7 @@ void QgsComposition::addItemToZList( QgsComposerItem* item )
return;
}
mItemZList.push_back( item );
qWarning( QString::number( mItemZList.size() ).toLocal8Bit().data() );
qWarning( "%d", mItemZList.size() );
item->setZValue( mItemZList.size() );
}

@@ -330,7 +330,7 @@ void QgsComposition::updateZValues()
currentItem = *it;
if ( currentItem )
{
qWarning( QString::number( counter ).toLocal8Bit().data() );
qWarning( "%d", counter );
currentItem->setZValue( counter );
}
++counter;
@@ -344,7 +344,7 @@ void QgsComposition::sortZList()
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 @@ void QgsComposition::sortZList()
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() );
}
}
@@ -91,7 +91,6 @@ void QgsLabel::renderLabel( QPainter * painter, const QgsRectangle& viewExtent,
QgsFeature &feature, bool selected, QgsLabelAttributes *classAttributes,
double sizeScale, double rasterScaleFactor )
{

QPen pen;
QFont font;
QString value;
@@ -163,10 +162,11 @@ void QgsLabel::renderLabel( QPainter * painter, const QgsRectangle& viewExtent,
//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() )

0 comments on commit c2e6c35

Please sign in to comment.