Skip to content

Commit dcc723c

Browse files
committed
some more svn to git migration updates/fixes
1 parent 22c7246 commit dcc723c

12 files changed

+45
-51
lines changed

CMakeLists.txt

+18-6
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ SET (WITH_MAPSERVER FALSE CACHE BOOL "Determines whether QGIS mapserver should b
6060
# include doxygen documentation
6161
SET (WITH_APIDOC FALSE CACHE BOOL "Determines whether the QGIS API doxygen documentation should be built")
6262

63+
# build our version of astyle
64+
SET (WITH_ASTYLE FALSE CACHE BOOL "If you plan to contribute you should reindent with scripts/prepare-commit.sh (using 'our' astyle)")
65+
6366
# try to configure and build POSTGRESQL support
6467
SET (WITH_POSTGRESQL TRUE CACHE BOOL "Determines whether POSTGRESQL support should be built")
6568
IF (WITH_POSTGRESQL)
@@ -446,12 +449,21 @@ FIND_FILE(GIT_MARKER index PATHS ${CMAKE_SOURCE_DIR}/.git)
446449
IF (GIT_MARKER)
447450
FIND_PROGRAM(GIT git PATHS c:/cygwin/bin)
448451
IF(GIT)
449-
ADD_CUSTOM_COMMAND(
450-
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h
451-
COMMAND echo \\\#define QGSVERSION \\\"$$\( ${GIT} log -n1 --pretty=%h \)\\\" >${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h
452-
MAIN_DEPENDENCY ${GIT_MARKER}
453-
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
454-
)
452+
IF(MSVC)
453+
ADD_CUSTOM_COMMAND(
454+
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h
455+
COMMAND for /f \"usebackq tokens=1\" %%a in (`\"${GIT}\" log -n1 --oneline`) do echo \#define QGSVERSION \"%%a\" >${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h
456+
MAIN_DEPENDENCY ${GIT_MARKER}
457+
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
458+
)
459+
ELSE(MSVC)
460+
ADD_CUSTOM_COMMAND(
461+
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h
462+
COMMAND echo \\\#define QGSVERSION \\\"$$\( ${GIT} log -n1 --pretty=%h \)\\\" >${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h
463+
MAIN_DEPENDENCY ${GIT_MARKER}
464+
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
465+
)
466+
ENDIF(MSVC)
455467
ELSE(GIT)
456468
MESSAGE(STATUS "git marker, but no git found - version will be unknown")
457469
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h "#define QGSVERSION \"unknown\"")

ms-windows/osgeo4w/package-nightly.cmd

+1
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ cmake -G "Visual Studio 9 2008" ^
9090
-D PEDANTIC=TRUE ^
9191
-D WITH_SPATIALITE=TRUE ^
9292
-D WITH_MAPSERVER=TRUE ^
93+
-D WITH_ASTYLE=TRUE ^
9394
-D WITH_INTERNAL_SPATIALITE=TRUE ^
9495
-D CMAKE_BUILD_TYPE=%BUILDCONF% ^
9596
-D CMAKE_CONFIGURATION_TYPES=%BUILDCONF% ^

python/core/qgsgeometry.sip

+2-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,8 @@ class QgsGeometry
214214
/**Adds a new island polygon to a multipolygon feature
215215
@return 0 in case of success, 1 if not a multipolygon, 2 if ring is not a valid geometry, 3 if new polygon ring \
216216
not disjoint with existing polygons of the feature*/
217-
int addIsland(const QList<QgsPoint>& ring);
217+
int addPart(const QList<QgsPoint>& ring);
218+
int addIsland( const QList<QgsPoint> &ring ) /Deprecated/;
218219

219220
/**Translate this geometry by dx, dy
220221
@return 0 in case of success*/

python/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def showException(type, value, tb, msg):
2424
for s in lst:
2525
txt += s.decode('utf-8', 'replace')
2626
txt += '<br>%s<br>%s<br><br>' % (QCoreApplication.translate('Python','Python version:'), sys.version)
27-
txt += '<br>%s<br>%s %s, %s<br><br>' % (QCoreApplication.translate('Python','QGIS version:'), QGis.QGIS_VERSION, QGis.QGIS_RELEASE_NAME, QGis.QGIS_SVN_VERSION)
27+
txt += '<br>%s<br>%s %s, %s<br><br>' % (QCoreApplication.translate('Python','QGIS version:'), QGis.QGIS_VERSION, QGis.QGIS_RELEASE_NAME, QGis.QGIS_DEV_VERSION)
2828
txt += '%s %s' % (QCoreApplication.translate('Python','Python path:'), str(sys.path))
2929
txt = txt.replace('\n', '<br>')
3030
txt = txt.replace(' ', '&nbsp; ') # preserve whitespaces for nicer output

src/CMakeLists.txt

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
SUBDIRS(astyle core analysis ui gui app providers plugins helpviewer crssync)
1+
SUBDIRS(core analysis ui gui app providers plugins helpviewer crssync)
22

33
IF (WITH_BINDINGS)
44
SUBDIRS(python)
@@ -8,6 +8,10 @@ IF (WITH_MAPSERVER)
88
SUBDIRS(mapserver)
99
ENDIF (WITH_MAPSERVER)
1010

11+
IF (WITH_ASTYLE)
12+
SUBDIRS(astyle)
13+
ENDIF(WITH_ASTYLE)
14+
1115
IF (APPLE)
1216
SUBDIRS(mac)
1317
ENDIF(APPLE)

src/app/attributetable/qgsattributetabledialog.cpp

+11-33
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,17 @@ QgsAttributeTableDialog::QgsAttributeTableDialog( QgsVectorLayer *theLayer, QWid
8484

8585
updateTitle();
8686

87-
mRemoveSelectionButton->setIcon( getThemeIcon( "/mActionUnselectAttributes.png" ) );
88-
mSelectedToTopButton->setIcon( getThemeIcon( "/mActionSelectedToTop.png" ) );
89-
mCopySelectedRowsButton->setIcon( getThemeIcon( "/mActionCopySelected.png" ) );
90-
mZoomMapToSelectedRowsButton->setIcon( getThemeIcon( "/mActionZoomToSelected.png" ) );
91-
mInvertSelectionButton->setIcon( getThemeIcon( "/mActionInvertSelection.png" ) );
92-
mToggleEditingButton->setIcon( getThemeIcon( "/mActionToggleEditing.png" ) );
93-
mSaveEditsButton->setIcon( getThemeIcon( "/mActionSaveEdits.png" ) );
94-
mDeleteSelectedButton->setIcon( getThemeIcon( "/mActionDeleteSelected.png" ) );
95-
mOpenFieldCalculator->setIcon( getThemeIcon( "/mActionCalculateField.png" ) );
96-
mAddAttribute->setIcon( getThemeIcon( "/mActionNewAttribute.png" ) );
97-
mRemoveAttribute->setIcon( getThemeIcon( "/mActionDeleteAttribute.png" ) );
87+
mRemoveSelectionButton->setIcon( QgisApp::getThemeIcon( "/mActionUnselectAttributes.png" ) );
88+
mSelectedToTopButton->setIcon( QgisApp::getThemeIcon( "/mActionSelectedToTop.png" ) );
89+
mCopySelectedRowsButton->setIcon( QgisApp::getThemeIcon( "/mActionCopySelected.png" ) );
90+
mZoomMapToSelectedRowsButton->setIcon( QgisApp::getThemeIcon( "/mActionZoomToSelected.png" ) );
91+
mInvertSelectionButton->setIcon( QgisApp::getThemeIcon( "/mActionInvertSelection.png" ) );
92+
mToggleEditingButton->setIcon( QgisApp::getThemeIcon( "/mActionToggleEditing.png" ) );
93+
mSaveEditsButton->setIcon( QgisApp::getThemeIcon( "/mActionSaveEdits.png" ) );
94+
mDeleteSelectedButton->setIcon( QgisApp::getThemeIcon( "/mActionDeleteSelected.png" ) );
95+
mOpenFieldCalculator->setIcon( QgisApp::getThemeIcon( "/mActionCalculateField.png" ) );
96+
mAddAttribute->setIcon( QgisApp::getThemeIcon( "/mActionNewAttribute.png" ) );
97+
mRemoveAttribute->setIcon( QgisApp::getThemeIcon( "/mActionDeleteAttribute.png" ) );
9898

9999
// toggle editing
100100
bool canChangeAttributes = mLayer->dataProvider()->capabilities() & QgsVectorDataProvider::ChangeAttributeValues;
@@ -173,28 +173,6 @@ void QgsAttributeTableDialog::closeEvent( QCloseEvent* event )
173173
}
174174

175175

176-
QIcon QgsAttributeTableDialog::getThemeIcon( const QString theName )
177-
{
178-
// copied from QgisApp::getThemeIcon. To be removed when merged to SVN
179-
180-
QString myPreferredPath = QgsApplication::activeThemePath() + QDir::separator() + theName;
181-
QString myDefaultPath = QgsApplication::defaultThemePath() + QDir::separator() + theName;
182-
if ( QFile::exists( myPreferredPath ) )
183-
{
184-
return QIcon( myPreferredPath );
185-
}
186-
else if ( QFile::exists( myDefaultPath ) )
187-
{
188-
//could still return an empty icon if it
189-
//doesnt exist in the default theme either!
190-
return QIcon( myDefaultPath );
191-
}
192-
else
193-
{
194-
return QIcon();
195-
}
196-
}
197-
198176
void QgsAttributeTableDialog::showAdvanced()
199177
{
200178
mMenuActions->exec( QCursor::pos() );

src/app/attributetable/qgsattributetabledialog.h

-2
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,6 @@ class QgsAttributeTableDialog : public QDialog, private Ui::QgsAttributeTableDia
202202
*/
203203
void updateTitle();
204204

205-
QIcon getThemeIcon( const QString theName );
206-
207205
QLineEdit *mQuery;
208206
QComboBox *mColumnBox;
209207
QComboBox *mShowBox;

src/app/qgisapp.cpp

100644100755
+2-2
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ static void setTitleBarText_( QWidget & qgisApp )
274274

275275
if ( QString( QGis::QGIS_VERSION ).endsWith( "Trunk" ) )
276276
{
277-
caption += QString( "r%1" ).arg( QGis::QGIS_DEV_VERSION );
277+
caption += QString( "%1" ).arg( QGis::QGIS_DEV_VERSION );
278278
}
279279
else
280280
{
@@ -4724,7 +4724,7 @@ void QgisApp::socketConnectionClosed()
47244724
{
47254725
// show more info
47264726
QgsMessageViewer *mv = new QgsMessageViewer( this );
4727-
mv->setWindowTitle( tr( "QGIS - Changes in SVN since last release" ) );
4727+
mv->setWindowTitle( tr( "QGIS - Changes since last release" ) );
47284728
mv->setMessageAsHtml( parts[2] );
47294729
mv->exec();
47304730
}

src/app/qgsmaptooladdfeature.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ void QgsMapToolAddFeature::canvasReleaseEvent( QMouseEvent * e )
119119
{
120120
QgsFeature* f = new QgsFeature( 0, "WKBPoint" );
121121

122-
QgsGeometry *g;
122+
QgsGeometry *g = 0;
123123
if ( layerWKBType == QGis::WKBPoint || layerWKBType == QGis::WKBPoint25D )
124124
{
125125
g = QgsGeometry::fromPoint( savePoint );

src/core/qgis.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* *
1717
***************************************************************************/
1818
#include "qgis.h"
19-
#ifndef QGSSVNVERSION
19+
#ifndef QGSVERSION
2020
#include "qgsversion.h"
2121
#endif
2222

@@ -28,7 +28,7 @@
2828
// Version string
2929
const char* QGis::QGIS_VERSION = VERSION;
3030

31-
// SVN version
31+
// development version
3232
const char* QGis::QGIS_DEV_VERSION = QGSVERSION;
3333

3434
// Version number used for comparing versions using the

src/core/qgscoordinatereferencesystem.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1411,7 +1411,7 @@ int QgsCoordinateReferenceSystem::syncDb()
14111411
// 4.7.0 has a bug that crashes after 16 consecutive pj_init_plus with different strings
14121412
else
14131413
{
1414-
input = QString( "+init=%1:%2" ).arg( QString( auth_name ).toLower() ).arg( auth_id );
1414+
QString input = QString( "+init=%1:%2" ).arg( QString( auth_name ).toLower() ).arg( auth_id );
14151415
projPJ pj = pj_init_plus( input.toAscii() );
14161416
if ( !pj )
14171417
{

src/core/qgsgeometry.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ class CORE_EXPORT QgsGeometry
255255
@return 0 in case of success, 1 if not a multipolygon, 2 if ring is not a valid geometry, 3 if new polygon ring
256256
not disjoint with existing polygons of the feature*/
257257
int addPart( const QList<QgsPoint> &points );
258-
Q_DECL_DEPRECATED int addIsland( const QList<QgsPoint> &points );
258+
Q_DECL_DEPRECATED int addIsland( const QList<QgsPoint> &points ) { return addPart( points ); }
259259

260260
/**Translate this geometry by dx, dy
261261
@return 0 in case of success*/

0 commit comments

Comments
 (0)