Skip to content

Commit

Permalink
some more svn to git migration updates/fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed May 6, 2011
1 parent 22c7246 commit dcc723c
Show file tree
Hide file tree
Showing 12 changed files with 45 additions and 51 deletions.
24 changes: 18 additions & 6 deletions CMakeLists.txt
Expand Up @@ -60,6 +60,9 @@ SET (WITH_MAPSERVER FALSE CACHE BOOL "Determines whether QGIS mapserver should b
# include doxygen documentation
SET (WITH_APIDOC FALSE CACHE BOOL "Determines whether the QGIS API doxygen documentation should be built")

# build our version of astyle
SET (WITH_ASTYLE FALSE CACHE BOOL "If you plan to contribute you should reindent with scripts/prepare-commit.sh (using 'our' astyle)")

# try to configure and build POSTGRESQL support
SET (WITH_POSTGRESQL TRUE CACHE BOOL "Determines whether POSTGRESQL support should be built")
IF (WITH_POSTGRESQL)
Expand Down Expand Up @@ -446,12 +449,21 @@ FIND_FILE(GIT_MARKER index PATHS ${CMAKE_SOURCE_DIR}/.git)
IF (GIT_MARKER)
FIND_PROGRAM(GIT git PATHS c:/cygwin/bin)
IF(GIT)
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h
COMMAND echo \\\#define QGSVERSION \\\"$$\( ${GIT} log -n1 --pretty=%h \)\\\" >${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h
MAIN_DEPENDENCY ${GIT_MARKER}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
IF(MSVC)
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h
COMMAND for /f \"usebackq tokens=1\" %%a in (`\"${GIT}\" log -n1 --oneline`) do echo \#define QGSVERSION \"%%a\" >${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h
MAIN_DEPENDENCY ${GIT_MARKER}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
ELSE(MSVC)
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h
COMMAND echo \\\#define QGSVERSION \\\"$$\( ${GIT} log -n1 --pretty=%h \)\\\" >${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h
MAIN_DEPENDENCY ${GIT_MARKER}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
ENDIF(MSVC)
ELSE(GIT)
MESSAGE(STATUS "git marker, but no git found - version will be unknown")
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h "#define QGSVERSION \"unknown\"")
Expand Down
1 change: 1 addition & 0 deletions ms-windows/osgeo4w/package-nightly.cmd
Expand Up @@ -90,6 +90,7 @@ cmake -G "Visual Studio 9 2008" ^
-D PEDANTIC=TRUE ^
-D WITH_SPATIALITE=TRUE ^
-D WITH_MAPSERVER=TRUE ^
-D WITH_ASTYLE=TRUE ^
-D WITH_INTERNAL_SPATIALITE=TRUE ^
-D CMAKE_BUILD_TYPE=%BUILDCONF% ^
-D CMAKE_CONFIGURATION_TYPES=%BUILDCONF% ^
Expand Down
3 changes: 2 additions & 1 deletion python/core/qgsgeometry.sip
Expand Up @@ -214,7 +214,8 @@ class QgsGeometry
/**Adds a new island polygon to a multipolygon feature
@return 0 in case of success, 1 if not a multipolygon, 2 if ring is not a valid geometry, 3 if new polygon ring \
not disjoint with existing polygons of the feature*/
int addIsland(const QList<QgsPoint>& ring);
int addPart(const QList<QgsPoint>& ring);
int addIsland( const QList<QgsPoint> &ring ) /Deprecated/;

/**Translate this geometry by dx, dy
@return 0 in case of success*/
Expand Down
2 changes: 1 addition & 1 deletion python/utils.py
Expand Up @@ -24,7 +24,7 @@ def showException(type, value, tb, msg):
for s in lst:
txt += s.decode('utf-8', 'replace')
txt += '<br>%s<br>%s<br><br>' % (QCoreApplication.translate('Python','Python version:'), sys.version)
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)
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)
txt += '%s %s' % (QCoreApplication.translate('Python','Python path:'), str(sys.path))
txt = txt.replace('\n', '<br>')
txt = txt.replace(' ', '&nbsp; ') # preserve whitespaces for nicer output
Expand Down
6 changes: 5 additions & 1 deletion src/CMakeLists.txt
@@ -1,4 +1,4 @@
SUBDIRS(astyle core analysis ui gui app providers plugins helpviewer crssync)
SUBDIRS(core analysis ui gui app providers plugins helpviewer crssync)

IF (WITH_BINDINGS)
SUBDIRS(python)
Expand All @@ -8,6 +8,10 @@ IF (WITH_MAPSERVER)
SUBDIRS(mapserver)
ENDIF (WITH_MAPSERVER)

IF (WITH_ASTYLE)
SUBDIRS(astyle)
ENDIF(WITH_ASTYLE)

IF (APPLE)
SUBDIRS(mac)
ENDIF(APPLE)
Expand Down
44 changes: 11 additions & 33 deletions src/app/attributetable/qgsattributetabledialog.cpp
Expand Up @@ -84,17 +84,17 @@ QgsAttributeTableDialog::QgsAttributeTableDialog( QgsVectorLayer *theLayer, QWid

updateTitle();

mRemoveSelectionButton->setIcon( getThemeIcon( "/mActionUnselectAttributes.png" ) );
mSelectedToTopButton->setIcon( getThemeIcon( "/mActionSelectedToTop.png" ) );
mCopySelectedRowsButton->setIcon( getThemeIcon( "/mActionCopySelected.png" ) );
mZoomMapToSelectedRowsButton->setIcon( getThemeIcon( "/mActionZoomToSelected.png" ) );
mInvertSelectionButton->setIcon( getThemeIcon( "/mActionInvertSelection.png" ) );
mToggleEditingButton->setIcon( getThemeIcon( "/mActionToggleEditing.png" ) );
mSaveEditsButton->setIcon( getThemeIcon( "/mActionSaveEdits.png" ) );
mDeleteSelectedButton->setIcon( getThemeIcon( "/mActionDeleteSelected.png" ) );
mOpenFieldCalculator->setIcon( getThemeIcon( "/mActionCalculateField.png" ) );
mAddAttribute->setIcon( getThemeIcon( "/mActionNewAttribute.png" ) );
mRemoveAttribute->setIcon( getThemeIcon( "/mActionDeleteAttribute.png" ) );
mRemoveSelectionButton->setIcon( QgisApp::getThemeIcon( "/mActionUnselectAttributes.png" ) );
mSelectedToTopButton->setIcon( QgisApp::getThemeIcon( "/mActionSelectedToTop.png" ) );
mCopySelectedRowsButton->setIcon( QgisApp::getThemeIcon( "/mActionCopySelected.png" ) );
mZoomMapToSelectedRowsButton->setIcon( QgisApp::getThemeIcon( "/mActionZoomToSelected.png" ) );
mInvertSelectionButton->setIcon( QgisApp::getThemeIcon( "/mActionInvertSelection.png" ) );
mToggleEditingButton->setIcon( QgisApp::getThemeIcon( "/mActionToggleEditing.png" ) );
mSaveEditsButton->setIcon( QgisApp::getThemeIcon( "/mActionSaveEdits.png" ) );
mDeleteSelectedButton->setIcon( QgisApp::getThemeIcon( "/mActionDeleteSelected.png" ) );
mOpenFieldCalculator->setIcon( QgisApp::getThemeIcon( "/mActionCalculateField.png" ) );
mAddAttribute->setIcon( QgisApp::getThemeIcon( "/mActionNewAttribute.png" ) );
mRemoveAttribute->setIcon( QgisApp::getThemeIcon( "/mActionDeleteAttribute.png" ) );

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


QIcon QgsAttributeTableDialog::getThemeIcon( const QString theName )
{
// copied from QgisApp::getThemeIcon. To be removed when merged to SVN

QString myPreferredPath = QgsApplication::activeThemePath() + QDir::separator() + theName;
QString myDefaultPath = QgsApplication::defaultThemePath() + QDir::separator() + theName;
if ( QFile::exists( myPreferredPath ) )
{
return QIcon( myPreferredPath );
}
else if ( QFile::exists( myDefaultPath ) )
{
//could still return an empty icon if it
//doesnt exist in the default theme either!
return QIcon( myDefaultPath );
}
else
{
return QIcon();
}
}

void QgsAttributeTableDialog::showAdvanced()
{
mMenuActions->exec( QCursor::pos() );
Expand Down
2 changes: 0 additions & 2 deletions src/app/attributetable/qgsattributetabledialog.h
Expand Up @@ -202,8 +202,6 @@ class QgsAttributeTableDialog : public QDialog, private Ui::QgsAttributeTableDia
*/
void updateTitle();

QIcon getThemeIcon( const QString theName );

QLineEdit *mQuery;
QComboBox *mColumnBox;
QComboBox *mShowBox;
Expand Down
4 changes: 2 additions & 2 deletions src/app/qgisapp.cpp 100644 → 100755
Expand Up @@ -274,7 +274,7 @@ static void setTitleBarText_( QWidget & qgisApp )

if ( QString( QGis::QGIS_VERSION ).endsWith( "Trunk" ) )
{
caption += QString( "r%1" ).arg( QGis::QGIS_DEV_VERSION );
caption += QString( "%1" ).arg( QGis::QGIS_DEV_VERSION );
}
else
{
Expand Down Expand Up @@ -4724,7 +4724,7 @@ void QgisApp::socketConnectionClosed()
{
// show more info
QgsMessageViewer *mv = new QgsMessageViewer( this );
mv->setWindowTitle( tr( "QGIS - Changes in SVN since last release" ) );
mv->setWindowTitle( tr( "QGIS - Changes since last release" ) );
mv->setMessageAsHtml( parts[2] );
mv->exec();
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsmaptooladdfeature.cpp
Expand Up @@ -119,7 +119,7 @@ void QgsMapToolAddFeature::canvasReleaseEvent( QMouseEvent * e )
{
QgsFeature* f = new QgsFeature( 0, "WKBPoint" );

QgsGeometry *g;
QgsGeometry *g = 0;
if ( layerWKBType == QGis::WKBPoint || layerWKBType == QGis::WKBPoint25D )
{
g = QgsGeometry::fromPoint( savePoint );
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgis.cpp
Expand Up @@ -16,7 +16,7 @@
* *
***************************************************************************/
#include "qgis.h"
#ifndef QGSSVNVERSION
#ifndef QGSVERSION
#include "qgsversion.h"
#endif

Expand All @@ -28,7 +28,7 @@
// Version string
const char* QGis::QGIS_VERSION = VERSION;

// SVN version
// development version
const char* QGis::QGIS_DEV_VERSION = QGSVERSION;

// Version number used for comparing versions using the
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgscoordinatereferencesystem.cpp
Expand Up @@ -1411,7 +1411,7 @@ int QgsCoordinateReferenceSystem::syncDb()
// 4.7.0 has a bug that crashes after 16 consecutive pj_init_plus with different strings
else
{
input = QString( "+init=%1:%2" ).arg( QString( auth_name ).toLower() ).arg( auth_id );
QString input = QString( "+init=%1:%2" ).arg( QString( auth_name ).toLower() ).arg( auth_id );
projPJ pj = pj_init_plus( input.toAscii() );
if ( !pj )
{
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsgeometry.h
Expand Up @@ -255,7 +255,7 @@ class CORE_EXPORT QgsGeometry
@return 0 in case of success, 1 if not a multipolygon, 2 if ring is not a valid geometry, 3 if new polygon ring
not disjoint with existing polygons of the feature*/
int addPart( const QList<QgsPoint> &points );
Q_DECL_DEPRECATED int addIsland( const QList<QgsPoint> &points );
Q_DECL_DEPRECATED int addIsland( const QList<QgsPoint> &points ) { return addPart( points ); }

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

0 comments on commit dcc723c

Please sign in to comment.