Skip to content

Commit 8e75d4b

Browse files
committedApr 21, 2012
test fixes:
- run xvfb in 96 dpi mode - indentation update (including tests) - fix running tests from build directory
1 parent d9bc7f3 commit 8e75d4b

26 files changed

+1058
-1031
lines changed
 

‎debian/rules

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ endif
1919

2020
DEB_BUILD_NAME ?= $(DISTRIBUTION)-$(DEB_BUILD_ARCH)
2121

22+
ifeq (,$(DISPLAY))
23+
TESTMAKE=xvfb-run -a -n 1 -s "-screen 0 1280x1024x24 -dpi 96" $(MAKE)
24+
else
25+
TESTMAKE=$(MAKE)
26+
endif
27+
2228
QGIS_MAJOR=$(shell sed -ne 's/SET(CPACK_PACKAGE_VERSION_MAJOR "\([0-9]*\)")/\1/p' CMakeLists.txt)
2329
QGIS_MINOR=$(shell sed -ne 's/SET(CPACK_PACKAGE_VERSION_MINOR "\([0-9]*\)")/\1/p' CMakeLists.txt)
2430
QGIS_PATCH=$(shell sed -ne 's/SET(CPACK_PACKAGE_VERSION_PATCH "\([0-9]*\)")/\1/p' CMakeLists.txt)
@@ -113,7 +119,7 @@ build-stamp: debian/build/CMakeCache.txt
113119

114120
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
115121
# Code to run the package test suite - and ignore the outcome for now
116-
LD_LIBRARY_PATH=$(PWD)/debian/build/output/lib:$(LD_LIBRARY_PATH) xvfb-run -a -n 1 -s "-screen 0 1280x1024x24" $(MAKE) -C debian/build $(DEB_TEST_TARGET) || true
122+
LD_LIBRARY_PATH=$(PWD)/debian/build/output/lib:$(LD_LIBRARY_PATH) $(TESTMAKE) -C debian/build $(DEB_TEST_TARGET) || true
117123
else
118124
echo Skipping tests.
119125
endif

‎scripts/astyle-all.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set -e
66

77
export elcr="$(tput el)$(tput cr)"
88

9-
find src -type f -print | while read f; do
9+
find src tests -type f -print | while read f; do
1010
case "$f" in
1111
src/app/gps/qwtpolar-*|src/app/qtmain_android.cpp|src/core/spatialite/*|src/core/spatialindex/src/*|src/core/gps/qextserialport/*|src/plugins/grass/qtermwidget/*|src/astyle/*|python/pyspatialite/*|src/providers/sqlanywhere/sqlanyconnection/*)
1212
echo $f skipped

‎src/app/qgisapp.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,8 +1201,8 @@ class QgisApp : public QMainWindow, private Ui::MainWindow
12011201
QString mOldScale;
12021202

12031203
#ifdef HAVE_TOUCH
1204-
bool gestureEvent(QGestureEvent *event);
1205-
void tapAndHoldTriggered(QTapAndHoldGesture *gesture);
1204+
bool gestureEvent( QGestureEvent *event );
1205+
void tapAndHoldTriggered( QTapAndHoldGesture *gesture );
12061206
#endif
12071207
};
12081208

‎src/core/qgis.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222

2323
#include "qgsconfig.h"
2424

25+
#include <ogr_api.h>
26+
2527
// Version constants
2628
//
2729

@@ -38,6 +40,12 @@ const int QGis::QGIS_VERSION_INT = VERSION_INT;
3840
// Release name
3941
const char* QGis::QGIS_RELEASE_NAME = RELEASE_NAME;
4042

43+
#if GDAL_VERSION_NUM > 1800
44+
const QString GEOPROJ4 = "+proj=longlat +datum=WGS84 +no_defs";
45+
#else
46+
const QString GEOPROJ4 = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs";
47+
#endif
48+
4149
const char* QGis::qgisVectorGeometryType[] =
4250
{
4351
"Point",

‎src/core/qgis.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ inline bool doubleNear( double a, double b, double epsilon = 4 * DBL_EPSILON )
136136
/** Wkt string that represents a geographic coord sys
137137
* @note added in 1.8 to replace GEOWkt
138138
*/
139-
const QString GEOWKT =
139+
const QString GEOWKT =
140140
"GEOGCS[\"WGS 84\", "
141141
" DATUM[\"WGS_1984\", "
142142
" SPHEROID[\"WGS 84\",6378137,298.257223563, "
@@ -157,7 +157,7 @@ Q_DECL_DEPRECATED
157157
#endif
158158
const QString GEOWkt = GEOWKT;
159159
/** PROJ4 string that represents a geographic coord sys */
160-
const QString GEOPROJ4 = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs";
160+
extern const QString GEOPROJ4;
161161
/** Magic number for a geographic coord sys in POSTGIS SRID */
162162
const long GEOSRID = 4326;
163163
/** Magic number for a geographic coord sys in QGIS srs.db tbl_srs.srs_id */

‎src/core/qgsdatasourceuri.cpp

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -530,47 +530,47 @@ QString QgsDataSourceURI::uri() const
530530
{
531531
theUri += " type=";
532532

533-
switch( mWkbType )
533+
switch ( mWkbType )
534534
{
535-
case QGis::WKBPoint:
536-
theUri += "POINT";
537-
break;
538-
case QGis::WKBLineString:
539-
theUri += "LINESTRING";
540-
break;
541-
case QGis::WKBPolygon:
542-
theUri += "POLYGON";
543-
break;
544-
case QGis::WKBMultiPoint:
545-
theUri += "MULTIPOINT";
546-
break;
547-
case QGis::WKBMultiLineString:
548-
theUri += "MULTILINESTRING";
549-
break;
550-
case QGis::WKBMultiPolygon:
551-
theUri += "MULTIPOLYGON";
552-
break;
553-
case QGis::WKBPoint25D:
554-
theUri += "POINTM";
555-
break;
556-
case QGis::WKBLineString25D:
557-
theUri += "LINESTRINGM";
558-
break;
559-
case QGis::WKBPolygon25D:
560-
theUri += "POLYGONM";
561-
break;
562-
case QGis::WKBMultiPoint25D:
563-
theUri += "MULTIPOINTM";
564-
break;
565-
case QGis::WKBMultiLineString25D:
566-
theUri += "MULTILINESTRINGM";
567-
break;
568-
case QGis::WKBMultiPolygon25D:
569-
theUri += "MULTIPOLYGONM";
570-
break;
571-
case QGis::WKBUnknown:
572-
case QGis::WKBNoGeometry:
573-
break;
535+
case QGis::WKBPoint:
536+
theUri += "POINT";
537+
break;
538+
case QGis::WKBLineString:
539+
theUri += "LINESTRING";
540+
break;
541+
case QGis::WKBPolygon:
542+
theUri += "POLYGON";
543+
break;
544+
case QGis::WKBMultiPoint:
545+
theUri += "MULTIPOINT";
546+
break;
547+
case QGis::WKBMultiLineString:
548+
theUri += "MULTILINESTRING";
549+
break;
550+
case QGis::WKBMultiPolygon:
551+
theUri += "MULTIPOLYGON";
552+
break;
553+
case QGis::WKBPoint25D:
554+
theUri += "POINTM";
555+
break;
556+
case QGis::WKBLineString25D:
557+
theUri += "LINESTRINGM";
558+
break;
559+
case QGis::WKBPolygon25D:
560+
theUri += "POLYGONM";
561+
break;
562+
case QGis::WKBMultiPoint25D:
563+
theUri += "MULTIPOINTM";
564+
break;
565+
case QGis::WKBMultiLineString25D:
566+
theUri += "MULTILINESTRINGM";
567+
break;
568+
case QGis::WKBMultiPolygon25D:
569+
theUri += "MULTIPOLYGONM";
570+
break;
571+
case QGis::WKBUnknown:
572+
case QGis::WKBNoGeometry:
573+
break;
574574
}
575575
}
576576

0 commit comments

Comments
 (0)
Please sign in to comment.