Skip to content
Permalink
Browse files

support utf-8 encoded release names

(cherry picked from commit c9838cc)
  • Loading branch information
jef-n committed Jul 10, 2016
1 parent 9e70e2f commit daea10c126719758cb5799b0d26debc0687e5776
@@ -50,7 +50,7 @@ MACRO(ADD_TXT2TAGS_FILES _sources)
ADD_CUSTOM_COMMAND(
OUTPUT ${_out}.html
COMMAND ${TXT2TAGS_EXECUTABLE}
ARGS -o${_out}.html -t html ${_in}
ARGS --encoding=utf-8 -o${_out}.html -t html ${_in}
DEPENDS ${_in}
COMMENT "Building ${_out}.html from ${_in}"
)
@@ -2,7 +2,7 @@
<HTML>
<HEAD>
<META NAME="generator" CONTENT="http://txt2tags.org">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<TITLE>QGIS</TITLE>

<!-- Included /home/fischer/src/qgis/doc/style.css -->
@@ -3016,5 +3016,5 @@ <H1>9. Authors and Acknowledgments</H1>

</DIV>
<!-- html code generated by txt2tags 2.6 (http://txt2tags.org) -->
<!-- cmdline: txt2tags -o/home/fischer/src/qgis/debian/build-master-pyqtwrapper-qt4/doc/INSTALL.html -t html /home/fischer/src/qgis/doc/INSTALL.t2t -->
<!-- cmdline: txt2tags -\-encoding=utf-8 -o/home/fischer/src/qgis/debian/build-master-pyqtwrapper-qt4/doc/INSTALL.html -t html /home/fischer/src/qgis/doc/INSTALL.t2t -->
</BODY></HTML>
@@ -2,7 +2,7 @@
<HTML>
<HEAD>
<META NAME="generator" CONTENT="http://txt2tags.org">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<TITLE>QGIS News</TITLE>

<!-- Included doc/style.css -->
@@ -3091,5 +3091,5 @@ <H1>28. 0.5</H1>
</DIV>

<!-- html code generated by txt2tags 2.6 (http://txt2tags.org) -->
<!-- cmdline: txt2tags -odoc/news.html -t html doc/news.t2t -->
<!-- cmdline: txt2tags -\-encoding=utf-8 -o/home/fischer/src/qgis/debian/build-master-pyqtwrapper-qt4/doc/news.html -t html /home/fischer/src/qgis/doc/news.t2t -->
</BODY></HTML>
@@ -31,11 +31,11 @@ class QGis
// Version constants
//
// Version string
static const char* QGIS_VERSION;
static QString QGIS_VERSION;
// Version number used for comparing versions using the "Check QGIS Version" function
static const int QGIS_VERSION_INT;
// Release name
static const char* QGIS_RELEASE_NAME;
static QString QGIS_RELEASE_NAME;
// The development version
static const char* QGIS_DEV_VERSION;

@@ -93,7 +93,7 @@ class QGis
static int wkbDimensions( WkbType type );

//! Converts from old (pre 2.10) WKB type (OGR) to new WKB type
static QgsWKBTypes::Type fromOldWkbType(QGis::WkbType type);
static QgsWKBTypes::Type fromOldWkbType( QGis::WkbType type );

//! Converts from new (post 2.10) WKB type (OGC) to old WKB type
static QGis::WkbType fromNewWkbType( QgsWKBTypes::Type type );
@@ -376,7 +376,7 @@ static void setTitleBarText_( QWidget & qgisApp )
{
QString caption = QgisApp::tr( "QGIS " );

if ( QString( QGis::QGIS_VERSION ).endsWith( "Master" ) )
if ( QGis::QGIS_VERSION.endsWith( "Master" ) )
{
caption += QString( "%1" ).arg( QGis::QGIS_DEV_VERSION );
}
@@ -8114,7 +8114,7 @@ void QgisApp::duplicateVectorStyle( QgsVectorLayer* srcLayer, QgsVectorLayer* de
"qgis", "http://mrcc.com/qgis.dtd", "SYSTEM" );
QDomDocument doc( documentType );
QDomElement rootNode = doc.createElement( "qgis" );
rootNode.setAttribute( "version", QString( "%1" ).arg( QGis::QGIS_VERSION ) );
rootNode.setAttribute( "version", QGis::QGIS_VERSION );
doc.appendChild( rootNode );
QString errorMsg;
srcLayer->writeSymbology( rootNode, doc, errorMsg );
@@ -237,7 +237,7 @@ bool QgsPluginRegistry::checkQgisVersion( const QString& minVersion, const QStri
}

// our qgis version - cut release name after version number
QString qgisVersion = QString( QGis::QGIS_VERSION ).section( '-', 0, 0 );
QString qgisVersion = QGis::QGIS_VERSION.section( '-', 0, 0 );

QStringList qgisVersionParts = qgisVersion.split( '.' );

@@ -36,7 +36,7 @@
//

// Version string
const char* QGis::QGIS_VERSION = VERSION;
QString QGis::QGIS_VERSION( QString::fromUtf8( VERSION ) );

// development version
const char* QGis::QGIS_DEV_VERSION = QGSVERSION;
@@ -46,7 +46,7 @@ const char* QGis::QGIS_DEV_VERSION = QGSVERSION;
const int QGis::QGIS_VERSION_INT = VERSION_INT;

// Release name
const char* QGis::QGIS_RELEASE_NAME = RELEASE_NAME;
QString QGis::QGIS_RELEASE_NAME( QString::fromUtf8( RELEASE_NAME ) );

#if GDAL_VERSION_NUM >= 1800
const QString GEOPROJ4 = "+proj=longlat +datum=WGS84 +no_defs";
@@ -43,11 +43,11 @@ class CORE_EXPORT QGis
// Version constants
//
// Version string
static const char* QGIS_VERSION;
static QString QGIS_VERSION;
// Version number used for comparing versions using the "Check QGIS Version" function
static const int QGIS_VERSION_INT;
// Release name
static const char* QGIS_RELEASE_NAME;
static QString QGIS_RELEASE_NAME;
// The development version
static const char* QGIS_DEV_VERSION;

@@ -1258,7 +1258,7 @@ void QgsMapLayer::exportNamedStyle( QDomDocument &doc, QString &errorMsg )
QDomDocument myDocument( documentType );

QDomElement myRootNode = myDocument.createElement( "qgis" );
myRootNode.setAttribute( "version", QString( "%1" ).arg( QGis::QGIS_VERSION ) );
myRootNode.setAttribute( "version", QGis::QGIS_VERSION );
myDocument.appendChild( myRootNode );

myRootNode.setAttribute( "hasScaleBasedVisibilityFlag", hasScaleBasedVisibility() ? 1 : 0 );
@@ -495,9 +495,9 @@ void TestQgsExpressionContext::globalScope()
QgsExpression expOsName( "var('qgis_os_name')" );
QgsExpression expPlatform( "var('qgis_platform')" );

QCOMPARE( expVersion.evaluate( &context ).toString(), QString( QGis::QGIS_VERSION ) );
QCOMPARE( expVersion.evaluate( &context ).toString(), QGis::QGIS_VERSION );
QCOMPARE( expVersionNo.evaluate( &context ).toInt(), QGis::QGIS_VERSION_INT );
QCOMPARE( expReleaseName.evaluate( &context ).toString(), QString( QGis::QGIS_RELEASE_NAME ) );
QCOMPARE( expReleaseName.evaluate( &context ).toString(), QGis::QGIS_RELEASE_NAME );
QCOMPARE( expAccountName.evaluate( &context ).toString(), QgsApplication::userLoginName() );
QCOMPARE( expUserFullName.evaluate( &context ).toString(), QgsApplication::userFullName() );
QCOMPARE( expOsName.evaluate( &context ).toString(), QgsApplication::osName() );

0 comments on commit daea10c

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