Skip to content
Permalink
Browse files

Merge branch 'release-1_7_0' of github.com:qgis/Quantum-GIS into rele…

…ase-1_7_0
  • Loading branch information
timlinux committed Jul 6, 2011
2 parents 908a494 + 962edbb commit e79366c070b46f9f3c4d1793f4282834473cab01
Showing with 42 additions and 60 deletions.
  1. +25 −46 CMakeLists.txt
  2. +2 −2 python/core/qgis.sip
  3. +1 −1 python/utils.py
  4. +2 −2 src/app/main.cpp
  5. +2 −2 src/app/qgisapp.cpp
  6. +4 −0 src/core/composer/qgscomposerlegenditem.h
  7. +4 −4 src/core/qgis.cpp
  8. +2 −3 src/core/qgis.h
@@ -439,64 +439,43 @@ INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR})
LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/src/core ${CMAKE_BINARY_DIR}/src/gui)

#############################################################
# create qgssvnversion.h
# create qgsversion.h

FIND_FILE(SVN_MARKER entries PATHS ${CMAKE_SOURCE_DIR}/.svn)
FIND_FILE(GIT_MARKER index PATHS ${CMAKE_SOURCE_DIR}/.git)

IF (SVN_MARKER)
# See if we have svn installed
FIND_PROGRAM(SVNVERSION svnversion PATHS c:/cygwin/bin)
FIND_FILE(GIT_MARKER index PATHS ${CMAKE_SOURCE_DIR}/.git)

IF(SVNVERSION)
IF (GIT_MARKER)
FIND_PROGRAM(GIT git PATHS c:/cygwin/bin)
IF(GIT)
IF(MSVC)
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/qgssvnversion.h
COMMAND for /f usebackq %%a in "(`\"${SVNVERSION}\"`)" do echo \#define QGSSVNVERSION \"%%a\" >${CMAKE_CURRENT_BINARY_DIR}/qgssvnversion.h
MAIN_DEPENDENCY ${SVN_MARKER}
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)
MESSAGE(STATUS "writing ${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h")
EXECUTE_PROCESS(COMMAND ${GIT} log -n1 --pretty=%h OUTPUT_VARIABLE REVISION)
STRING(STRIP "${REVISION}" REVISION)
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/qgssvnversion.h
COMMAND echo \\\#define QGSSVNVERSION \\\"`${SVNVERSION}`\\\" >${CMAKE_CURRENT_BINARY_DIR}/qgssvnversion.h
MAIN_DEPENDENCY ${SVN_MARKER}
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h
COMMAND echo \\\#define QGSVERSION \\\"${REVISION}\\\" >${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h
MAIN_DEPENDENCY ${GIT_MARKER}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
ENDIF(MSVC)
ELSE(SVNVERSION)
MESSAGE(STATUS "svnversion not found - version will be unknown")
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/qgssvnversion.h "#define QGSSVNVERSION \"unknown\"")
ENDIF (SVNVERSION)
ELSE (SVN_MARKER)
IF (GIT_MARKER)
FIND_PROGRAM(GIT git PATHS c:/cygwin/bin)
IF(GIT)
IF(MSVC)
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/qgssvnversion.h
COMMAND for /f \"usebackq tokens=1\" %%a in "(`\"${GIT}\" log -n1 --oneline`)" do echo \#define QGSSVNVERSION \"%%a\" >${CMAKE_CURRENT_BINARY_DIR}/qgssvnversion.h
MAIN_DEPENDENCY ${GIT_MARKER}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
ELSE(MSVC)
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/qgssvnversion.h
COMMAND echo \\#define QGSSVNVERSION \\\"$$\( ${GIT} log -n1 --pretty=%h \)\\\" >${CMAKE_CURRENT_BINARY_DIR}/qgssvnversion.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}/qgssvnversion.h "#define QGSSVNVERSION \"unknown\"")
ENDIF(GIT)
ELSE (GIT_MARKER)
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/qgssvnversion.h "#define QGSSVNVERSION \"exported\"")
ENDIF (GIT_MARKER)
ENDIF (SVN_MARKER)

ADD_CUSTOM_TARGET(svnversion ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/qgssvnversion.h)
ELSE(GIT)
MESSAGE(STATUS "git marker, but no git found - version will be unknown")
SET(REVISION "unknown")
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h "#define QGSVERSION \"unknown\"")
ENDIF(GIT)
ELSE (GIT_MARKER)
SET(REVISION "exported")
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h "#define QGSVERSION \"exported\"")
ENDIF (GIT_MARKER)

ADD_CUSTOM_TARGET(version ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h)

#############################################################
# process subdirs
@@ -33,8 +33,8 @@ public:
static const int QGIS_VERSION_INT;
// Release name
static const char* QGIS_RELEASE_NAME;
// The subversion version
static const char* QGIS_SVN_VERSION;
// The development (GIT) version
static const char* QGIS_DEV_VERSION;

// Enumerations
//
@@ -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
@@ -67,7 +67,7 @@ typedef SInt32 SRefCon;
#include "qgsmapcanvas.h"
#include "qgsapplication.h"
#include <qgsconfig.h>
#include <qgssvnversion.h>
#include <qgsversion.h>
#include "qgsexception.h"
#include "qgsproject.h"
#include "qgsrectangle.h"
@@ -86,7 +86,7 @@ static const char * const ident_ = "$Id$";
void usage( std::string const & appName )
{
std::cerr << "Quantum GIS - " << VERSION << " '" << RELEASE_NAME << "' ("
<< QGSSVNVERSION << ")\n"
<< QGis::QGIS_DEV_VERSION << ")\n"
<< "Quantum GIS (QGIS) is a viewer for spatial data sets, including\n"
<< "raster and vector data.\n"
<< "Usage: " << appName << " [options] [FILES]\n"
@@ -274,7 +274,7 @@ static void setTitleBarText_( QWidget & qgisApp )

if ( QString( QGis::QGIS_VERSION ).endsWith( "Trunk" ) )
{
caption += QString( "r%1" ).arg( QGis::QGIS_SVN_VERSION );
caption += QString( "%1" ).arg( QGis::QGIS_DEV_VERSION );
}
else
{
@@ -1916,7 +1916,7 @@ void QgisApp::about()
abt = new QgsAbout();
QString versionString = tr( "You are using QGIS version %1 built against code revision %2." )
.arg( QGis::QGIS_VERSION )
.arg( QGis::QGIS_SVN_VERSION );
.arg( QGis::QGIS_DEV_VERSION );

versionString += tr( "\nGDAL/OGR Version: %1." ).arg( GDAL_RELEASE_NAME );

@@ -125,8 +125,12 @@ class CORE_EXPORT QgsComposerRasterSymbolItem: public QgsComposerLegendItem
QString layerID() const { return mLayerID; }
ItemType itemType() const { return RasterSymbolItem; }

void setColor( const QColor& c ){ mColor = c; }
QColor color() const { return mColor; }

private:
QString mLayerID;
QColor mColor;
};

class CORE_EXPORT QgsComposerLayerItem: public QgsComposerLegendItem
@@ -16,8 +16,8 @@
* *
***************************************************************************/
#include "qgis.h"
#ifndef QGSSVNVERSION
#include "qgssvnversion.h"
#ifndef QGSVERSION
#include "qgsversion.h"
#endif

#include "qgsconfig.h"
@@ -28,8 +28,8 @@
// Version string
const char* QGis::QGIS_VERSION = VERSION;

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

// Version number used for comparing versions using the
// "Check QGIS Version" function
@@ -14,7 +14,6 @@
* (at your option) any later version. *
* *
***************************************************************************/
/* $Id$ */

#ifndef QGIS_H
#define QGIS_H
@@ -39,8 +38,8 @@ class CORE_EXPORT QGis
static const int QGIS_VERSION_INT;
// Release name
static const char* QGIS_RELEASE_NAME;
// The subversion version
static const char* QGIS_SVN_VERSION;
// The development version
static const char* QGIS_DEV_VERSION;

// Enumerations
//

0 comments on commit e79366c

Please sign in to comment.
You can’t perform that action at this time.