2 changes: 1 addition & 1 deletion debian/compat.sid
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8
9
2 changes: 1 addition & 1 deletion debian/compat.wheezy
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8
9
1 change: 1 addition & 0 deletions debian/libqgis-dev.install
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ usr/include/qgis/*
usr/lib/libqgis_core.so
usr/lib/libqgis_gui.so
usr/lib/libqgis_analysis.so
usr/lib/libqgis_networkanalysis.so
3 changes: 0 additions & 3 deletions debian/libqgis{QGIS_ABI}-dev.install

This file was deleted.

15 changes: 13 additions & 2 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ CMAKE_OPTS := \
-D QGIS_CGIBIN_SUBDIR=/usr/lib/cgi-bin \
-D WITH_APIDOC=TRUE

MAKEFLAGS += VERBOSE=YES

ifneq (,$(findstring $(DISTRIBUTION),"squeeze wheezy lucid maverick natty oneiric precise"))
CMAKE_OPTS += -D WITH_PYSPATIALITE=TRUE
endif
Expand All @@ -57,18 +59,27 @@ else
CMAKE_OPTS += -D WITH_GLOBE=TRUE
endif

ifneq (,$(findstring $(DISTRIBUTION),"wheezy sid"))
CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
CFLAGS := $(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS)
CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS) $(CPPFLAGS)
LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
endif

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
CXXFLAGS += -O0
else
CFLAGS += -O2
CXXFLAGS += -O2
endif

ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif

ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
CMAKE_OPTS += -D CMAKE_BUILD_TYPE=Debug -D ENABLE_TESTS=TRUE
MAKEFLAGS += VERBOSE=YES
endif

ifneq (,$(findstring profile,$(DEB_BUILD_OPTIONS)))
Expand Down Expand Up @@ -99,7 +110,7 @@ debian/build/CMakeCache.txt: $(TEMPLATES) CMakeLists.txt
# Add here commands to configure the package.
[ -d debian/build ] || mkdir debian/build
[ ! -e CMakeCache.txt ] || rm CMakeCache.txt
cd debian/build; cmake $(CMAKE_OPTS) ../..
cd debian/build; CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" cmake $(CMAKE_OPTS) ../..

build: build-stamp

Expand Down
15 changes: 0 additions & 15 deletions src/app/qgshighlight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,6 @@ void QgsHighlight::paintPoint( QPainter *p, QgsPoint point )
{
QPolygonF r( 5 );

if ( mLayer )
{
point = mMapCanvas->mapRenderer()->layerToMapCoordinates( mLayer, point );
}

double d = mMapCanvas->extent().width() * 0.005;
r[0] = toCanvasCoordinates( point + QgsVector( -d, -d ) ) - pos();
r[1] = toCanvasCoordinates( point + QgsVector( d, -d ) ) - pos();
Expand All @@ -90,11 +85,6 @@ void QgsHighlight::paintLine( QPainter *p, QgsPolyline line )

for ( int i = 0; i < line.size(); i++ )
{
if ( mLayer )
{
line[i] = mMapCanvas->mapRenderer()->layerToMapCoordinates( mLayer, line[i] );
}

polygon[i] = toCanvasCoordinates( line[i] ) - pos();
}

Expand All @@ -115,11 +105,6 @@ void QgsHighlight::paintPolygon( QPainter *p, QgsPolygon polygon )

for ( int j = 0; j < polygon[i].size(); j++ )
{
if ( mLayer )
{
polygon[i][j] = mMapCanvas->mapRenderer()->layerToMapCoordinates( mLayer, polygon[i][j] );
}

ring[ j ] = toCanvasCoordinates( polygon[i][j] ) - pos();
}

Expand Down
12 changes: 7 additions & 5 deletions src/core/qgsvectorfilewriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "qgsfeature.h"
#include "qgsgeometry.h"
#include "qgslogger.h"
#include "qgsmessagelog.h"
#include "qgscoordinatereferencesystem.h"
#include "qgsvectorfilewriter.h"

Expand Down Expand Up @@ -468,7 +469,7 @@ bool QgsVectorFileWriter::addFeature( QgsFeature& feature )
.arg( ogrField )
.arg( QMetaType::typeName( attrValue.type() ) )
.arg( attrValue.toString() );
QgsDebugMsg( mErrorMessage );
QgsMessageLog::logMessage( mErrorMessage, QObject::tr( "OGR" ) );
mError = ErrFeatureWriteFailed;
return false;
}
Expand All @@ -493,21 +494,21 @@ bool QgsVectorFileWriter::addFeature( QgsFeature& feature )

if ( !mGeom2 )
{
QgsDebugMsg( QString( "Failed to create empty geometry for type %1 (OGR error: %2)" ).arg( geom->wkbType() ).arg( CPLGetLastErrorMsg() ) );
mErrorMessage = QObject::tr( "Feature geometry not imported (OGR error: %1)" )
.arg( QString::fromUtf8( CPLGetLastErrorMsg() ) );
mError = ErrFeatureWriteFailed;
QgsMessageLog::logMessage( mErrorMessage, QObject::tr( "OGR" ) );
OGR_F_Destroy( poFeature );
return false;
}

OGRErr err = OGR_G_ImportFromWkb( mGeom2, geom->asWkb(), geom->wkbSize() );
if ( err != OGRERR_NONE )
{
QgsDebugMsg( QString( "Failed to import geometry from WKB: %1 (OGR error: %2)" ).arg( err ).arg( CPLGetLastErrorMsg() ) );
mErrorMessage = QObject::tr( "Feature geometry not imported (OGR error: %1)" )
.arg( QString::fromUtf8( CPLGetLastErrorMsg() ) );
mError = ErrFeatureWriteFailed;
QgsMessageLog::logMessage( mErrorMessage, QObject::tr( "OGR" ) );
OGR_F_Destroy( poFeature );
return false;
}
Expand All @@ -520,10 +521,10 @@ bool QgsVectorFileWriter::addFeature( QgsFeature& feature )
OGRErr err = OGR_G_ImportFromWkb( mGeom, geom->asWkb(), geom->wkbSize() );
if ( err != OGRERR_NONE )
{
QgsDebugMsg( QString( "Failed to import geometry from WKB: %1 (OGR error: %2)" ).arg( err ).arg( CPLGetLastErrorMsg() ) );
mErrorMessage = QObject::tr( "Feature geometry not imported (OGR error: %1)" )
.arg( QString::fromUtf8( CPLGetLastErrorMsg() ) );
mError = ErrFeatureWriteFailed;
QgsMessageLog::logMessage( mErrorMessage, QObject::tr( "OGR" ) );
OGR_F_Destroy( poFeature );
return false;
}
Expand All @@ -539,7 +540,8 @@ bool QgsVectorFileWriter::addFeature( QgsFeature& feature )
mErrorMessage = QObject::tr( "Feature creation error (OGR error: %1)" ).arg( QString::fromUtf8( CPLGetLastErrorMsg() ) );
mError = ErrFeatureWriteFailed;

QgsDebugMsg( mErrorMessage );
QgsMessageLog::logMessage( mErrorMessage, QObject::tr( "OGR" ) );

OGR_F_Destroy( poFeature );
return false;
}
Expand Down
31 changes: 14 additions & 17 deletions src/gui/qgsquerybuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,26 +181,23 @@ void QgsQueryBuilder::test()

void QgsQueryBuilder::accept()
{
// if user hits Ok and there is no query, skip the validation
if ( !txtSQL->toPlainText().trimmed().isEmpty() )
if ( !mLayer->setSubsetString( txtSQL->toPlainText() ) )
{
if ( !mLayer->setSubsetString( txtSQL->toPlainText() ) )
//error in query - show the problem
if ( mLayer->dataProvider()->hasErrors() )
{
//error in query - show the problem
if ( mLayer->dataProvider()->hasErrors() )
{
QMessageBox::warning( this,
tr( "Query Failed" ),
tr( "An error occurred when executing the query." )
+ tr( "\nThe data provider said:\n%1" ).arg( mLayer->dataProvider()->errors().join( "\n" ) ) );
mLayer->dataProvider()->clearErrors();
}
else
{
QMessageBox::warning( this, tr( "Error in Query" ), tr( "The subset string could not be set" ) );
}
return;
QMessageBox::warning( this,
tr( "Query Failed" ),
tr( "An error occurred when executing the query." )
+ tr( "\nThe data provider said:\n%1" ).arg( mLayer->dataProvider()->errors().join( "\n" ) ) );
mLayer->dataProvider()->clearErrors();
}
else
{
QMessageBox::warning( this, tr( "Error in Query" ), tr( "The subset string could not be set" ) );
}

return;
}

QDialog::accept();
Expand Down
3 changes: 0 additions & 3 deletions src/plugins/sqlanywhere/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ SET (sqlanywhere_SRCS
sasourceselect.cpp
sanewconnection.cpp
sadbtablemodel.cpp
sadbfilterproxymodel.cpp
saquerybuilder.cpp
)

SET (sqlanywhere_UIS
Expand All @@ -21,7 +19,6 @@ SET (sqlanywhere_MOC_HDRS
sanewconnection.h
salayer.h
sadbtablemodel.h
saquerybuilder.h
)

SET (sqlanywhere_RCCS sqlanywhere.qrc)
Expand Down
63 changes: 0 additions & 63 deletions src/plugins/sqlanywhere/sadbfilterproxymodel.cpp

This file was deleted.

47 changes: 0 additions & 47 deletions src/plugins/sqlanywhere/sadbfilterproxymodel.h

This file was deleted.

Loading