Skip to content

Commit c9838cc

Browse files
committedJul 10, 2016
support utf-8 encoded release names
1 parent 3d72837 commit c9838cc

File tree

10 files changed

+18
-18
lines changed

10 files changed

+18
-18
lines changed
 

‎cmake/Txt2Tags.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ MACRO(ADD_TXT2TAGS_FILES _sources)
5050
ADD_CUSTOM_COMMAND(
5151
OUTPUT ${_out}.html
5252
COMMAND ${TXT2TAGS_EXECUTABLE}
53-
ARGS -o${_out}.html -t html ${_in}
53+
ARGS --encoding=utf-8 -o${_out}.html -t html ${_in}
5454
DEPENDS ${_in}
5555
COMMENT "Building ${_out}.html from ${_in}"
5656
)

‎doc/INSTALL.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<HTML>
33
<HEAD>
44
<META NAME="generator" CONTENT="http://txt2tags.org">
5-
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
5+
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
66
<TITLE>QGIS</TITLE>
77

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

30173017
</DIV>
30183018
<!-- html code generated by txt2tags 2.6 (http://txt2tags.org) -->
3019-
<!-- cmdline: txt2tags -o/home/fischer/src/qgis/debian/build-master-pyqtwrapper-qt4/doc/INSTALL.html -t html /home/fischer/src/qgis/doc/INSTALL.t2t -->
3019+
<!-- 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 -->
30203020
</BODY></HTML>

‎doc/news.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<HTML>
33
<HEAD>
44
<META NAME="generator" CONTENT="http://txt2tags.org">
5-
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
5+
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
66
<TITLE>QGIS News</TITLE>
77

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

30933093
<!-- html code generated by txt2tags 2.6 (http://txt2tags.org) -->
3094-
<!-- cmdline: txt2tags -odoc/news.html -t html doc/news.t2t -->
3094+
<!-- 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 -->
30953095
</BODY></HTML>

‎python/core/qgis.sip

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ class QGis
3131
// Version constants
3232
//
3333
// Version string
34-
static const char* QGIS_VERSION;
34+
static QString QGIS_VERSION;
3535
// Version number used for comparing versions using the "Check QGIS Version" function
3636
static const int QGIS_VERSION_INT;
3737
// Release name
38-
static const char* QGIS_RELEASE_NAME;
38+
static QString QGIS_RELEASE_NAME;
3939
// The development version
4040
static const char* QGIS_DEV_VERSION;
4141

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

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

9898
//! Converts from new (post 2.10) WKB type (OGC) to old WKB type
9999
static QGis::WkbType fromNewWkbType( QgsWKBTypes::Type type );

‎src/app/qgisapp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ static void setTitleBarText_( QWidget & qgisApp )
376376
{
377377
QString caption = QgisApp::tr( "QGIS " );
378378

379-
if ( QString( QGis::QGIS_VERSION ).endsWith( "Master" ) )
379+
if ( QGis::QGIS_VERSION.endsWith( "Master" ) )
380380
{
381381
caption += QString( "%1" ).arg( QGis::QGIS_DEV_VERSION );
382382
}
@@ -8114,7 +8114,7 @@ void QgisApp::duplicateVectorStyle( QgsVectorLayer* srcLayer, QgsVectorLayer* de
81148114
"qgis", "http://mrcc.com/qgis.dtd", "SYSTEM" );
81158115
QDomDocument doc( documentType );
81168116
QDomElement rootNode = doc.createElement( "qgis" );
8117-
rootNode.setAttribute( "version", QString( "%1" ).arg( QGis::QGIS_VERSION ) );
8117+
rootNode.setAttribute( "version", QGis::QGIS_VERSION );
81188118
doc.appendChild( rootNode );
81198119
QString errorMsg;
81208120
srcLayer->writeSymbology( rootNode, doc, errorMsg );

‎src/app/qgspluginregistry.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ bool QgsPluginRegistry::checkQgisVersion( const QString& minVersion, const QStri
237237
}
238238

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

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

‎src/core/qgis.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
//
3737

3838
// Version string
39-
const char* QGis::QGIS_VERSION = VERSION;
39+
QString QGis::QGIS_VERSION( QString::fromUtf8( VERSION ) );
4040

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

4848
// Release name
49-
const char* QGis::QGIS_RELEASE_NAME = RELEASE_NAME;
49+
QString QGis::QGIS_RELEASE_NAME( QString::fromUtf8( RELEASE_NAME ) );
5050

5151
#if GDAL_VERSION_NUM >= 1800
5252
const QString GEOPROJ4 = "+proj=longlat +datum=WGS84 +no_defs";

‎src/core/qgis.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ class CORE_EXPORT QGis
4343
// Version constants
4444
//
4545
// Version string
46-
static const char* QGIS_VERSION;
46+
static QString QGIS_VERSION;
4747
// Version number used for comparing versions using the "Check QGIS Version" function
4848
static const int QGIS_VERSION_INT;
4949
// Release name
50-
static const char* QGIS_RELEASE_NAME;
50+
static QString QGIS_RELEASE_NAME;
5151
// The development version
5252
static const char* QGIS_DEV_VERSION;
5353

‎src/core/qgsmaplayer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1258,7 +1258,7 @@ void QgsMapLayer::exportNamedStyle( QDomDocument &doc, QString &errorMsg )
12581258
QDomDocument myDocument( documentType );
12591259

12601260
QDomElement myRootNode = myDocument.createElement( "qgis" );
1261-
myRootNode.setAttribute( "version", QString( "%1" ).arg( QGis::QGIS_VERSION ) );
1261+
myRootNode.setAttribute( "version", QGis::QGIS_VERSION );
12621262
myDocument.appendChild( myRootNode );
12631263

12641264
myRootNode.setAttribute( "hasScaleBasedVisibilityFlag", hasScaleBasedVisibility() ? 1 : 0 );

‎tests/src/core/testqgsexpressioncontext.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -495,9 +495,9 @@ void TestQgsExpressionContext::globalScope()
495495
QgsExpression expOsName( "var('qgis_os_name')" );
496496
QgsExpression expPlatform( "var('qgis_platform')" );
497497

498-
QCOMPARE( expVersion.evaluate( &context ).toString(), QString( QGis::QGIS_VERSION ) );
498+
QCOMPARE( expVersion.evaluate( &context ).toString(), QGis::QGIS_VERSION );
499499
QCOMPARE( expVersionNo.evaluate( &context ).toInt(), QGis::QGIS_VERSION_INT );
500-
QCOMPARE( expReleaseName.evaluate( &context ).toString(), QString( QGis::QGIS_RELEASE_NAME ) );
500+
QCOMPARE( expReleaseName.evaluate( &context ).toString(), QGis::QGIS_RELEASE_NAME );
501501
QCOMPARE( expAccountName.evaluate( &context ).toString(), QgsApplication::userLoginName() );
502502
QCOMPARE( expUserFullName.evaluate( &context ).toString(), QgsApplication::userFullName() );
503503
QCOMPARE( expOsName.evaluate( &context ).toString(), QgsApplication::osName() );

0 commit comments

Comments
 (0)
Please sign in to comment.