Skip to content

Commit

Permalink
Fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Nov 2, 2019
1 parent fd40748 commit 81b49ce
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions src/app/qgisapp.cpp
Expand Up @@ -523,7 +523,7 @@ static void setTitleBarText_( QWidget &qgisApp )

if ( Qgis::version().endsWith( QLatin1String( "Master" ) ) )
{
caption += QStringLiteral( " %1" ).arg( Qgis::QGIS_DEV_VERSION );
caption += QStringLiteral( " %1" ).arg( Qgis::devVersion() );
}

if ( QgisApp::instance()->userProfileManager()->allProfiles().count() > 1 )
Expand Down Expand Up @@ -4700,14 +4700,14 @@ void QgisApp::about()

versionString += QStringLiteral( "<tr><td>%1</td><td>%2</td><td>" ).arg( tr( "QGIS version" ), Qgis::version() );

if ( QString( Qgis::QGIS_DEV_VERSION ) == QLatin1String( "exported" ) )
if ( QString( Qgis::devVersion() ) == QLatin1String( "exported" ) )
{
versionString += QStringLiteral( "%1</td><td><a href=\"https://github.com/qgis/QGIS/tree/release-%1_%2\">Release %1.%2</a></td>" )
.arg( tr( "QGIS code branch" ) ).arg( Qgis::versionInt() / 10000 ).arg( Qgis::versionInt() / 100 % 100 );
}
else
{
versionString += QStringLiteral( "%1</td><td><a href=\"https://github.com/qgis/QGIS/commit/%2\">%2</a></td>" ).arg( tr( "QGIS code revision" ) ).arg( Qgis::QGIS_DEV_VERSION );
versionString += QStringLiteral( "%1</td><td><a href=\"https://github.com/qgis/QGIS/commit/%2\">%2</a></td>" ).arg( tr( "QGIS code revision" ) ).arg( Qgis::devVersion() );
}

versionString += QLatin1String( "</tr><tr>" );
Expand Down
4 changes: 2 additions & 2 deletions src/app/qgscrashhandler.cpp
Expand Up @@ -64,14 +64,14 @@ LONG WINAPI QgsCrashHandler::handle( LPEXCEPTION_POINTERS exception )
QStringList reportData;
reportData.append( QStringLiteral( "QGIS Version: %1" ).arg( Qgis::version() ) );

if ( QString( Qgis::QGIS_DEV_VERSION ) == QLatin1String( "exported" ) )
if ( QString( Qgis::devVersion() ) == QLatin1String( "exported" ) )
{
reportData.append( QStringLiteral( "QGIS code branch: Release %1.%2" )
.arg( Qgis::versionInt() / 10000 ).arg( Qgis::versionInt() / 100 % 100 ) );
}
else
{
reportData.append( QStringLiteral( "QGIS code revision: %1" ).arg( Qgis::QGIS_DEV_VERSION ) );
reportData.append( QStringLiteral( "QGIS code revision: %1" ).arg( Qgis::devVersion() ) );
}

reportData.append( QStringLiteral( "Compiled against Qt: %1" ).arg( QT_VERSION_STR ) );
Expand Down
4 changes: 2 additions & 2 deletions src/core/processing/qgsprocessingfeedback.cpp
Expand Up @@ -58,9 +58,9 @@ void QgsProcessingFeedback::pushConsoleInfo( const QString &info )
void QgsProcessingFeedback::pushVersionInfo( const QgsProcessingProvider *provider )
{
pushDebugInfo( tr( "QGIS version: %1" ).arg( Qgis::version() ) );
if ( QString( Qgis::QGIS_DEV_VERSION ) != QLatin1String( "exported" ) )
if ( QString( Qgis::devVersion() ) != QLatin1String( "exported" ) )
{
pushDebugInfo( tr( "QGIS code revision: %1" ).arg( Qgis::QGIS_DEV_VERSION ) );
pushDebugInfo( tr( "QGIS code revision: %1" ).arg( Qgis::devVersion() ) );
}
pushDebugInfo( tr( "Qt version: %1" ).arg( qVersion() ) );
pushDebugInfo( tr( "GDAL version: %1" ).arg( GDALVersionInfo( "RELEASE_NAME" ) ) );
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgserror.cpp
Expand Up @@ -57,7 +57,7 @@ QString QgsError::message( QgsErrorMessage::Format format ) const
#if defined(QGISDEBUG) && defined(QGS_GIT_REMOTE_URL)
// TODO: verify if we are not ahead to origin (remote hash does not exist)
// and there are no local not committed changes
QString hash = QString( Qgis::QGIS_DEV_VERSION );
QString hash = QString( Qgis::devVersion() );
QString remote = QStringLiteral( QGS_GIT_REMOTE_URL );
if ( !hash.isEmpty() && !remote.isEmpty() && remote.contains( QLatin1String( "github.com" ) ) )
{
Expand Down
2 changes: 1 addition & 1 deletion src/python/qgspythonutilsimpl.cpp
Expand Up @@ -334,7 +334,7 @@ bool QgsPythonUtilsImpl::runString( const QString &command, QString msgOnError,

QString str = "<font color=\"red\">" + msgOnError + "</font><br><pre>\n" + traceback + "\n</pre>"
+ QObject::tr( "Python version:" ) + "<br>" + version + "<br><br>"
+ QObject::tr( "QGIS version:" ) + "<br>" + QStringLiteral( "%1 '%2', %3" ).arg( Qgis::version(), Qgis::releaseName(), Qgis::QGIS_DEV_VERSION ) + "<br><br>"
+ QObject::tr( "QGIS version:" ) + "<br>" + QStringLiteral( "%1 '%2', %3" ).arg( Qgis::version(), Qgis::releaseName(), Qgis::devVersion() ) + "<br><br>"
+ QObject::tr( "Python path:" ) + "<br>" + path;
str.replace( '\n', QLatin1String( "<br>" ) ).replace( QLatin1String( " " ), QLatin1String( "&nbsp; " ) );

Expand Down
6 changes: 3 additions & 3 deletions tests/src/core/testqgsexpressioncontext.cpp
Expand Up @@ -593,9 +593,9 @@ void TestQgsExpressionContext::globalScope()
QgsExpression expOsName( QStringLiteral( "var('qgis_os_name')" ) );
QgsExpression expPlatform( QStringLiteral( "var('qgis_platform')" ) );

QCOMPARE( expVersion.evaluate( &context ).toString(), Qgis::QGIS_VERSION );
QCOMPARE( expVersionNo.evaluate( &context ).toInt(), Qgis::QGIS_VERSION_INT );
QCOMPARE( expReleaseName.evaluate( &context ).toString(), Qgis::QGIS_RELEASE_NAME );
QCOMPARE( expVersion.evaluate( &context ).toString(), Qgis::version() );
QCOMPARE( expVersionNo.evaluate( &context ).toInt(), Qgis::versionInt() );
QCOMPARE( expReleaseName.evaluate( &context ).toString(), Qgis::releaseName() );
QCOMPARE( expAccountName.evaluate( &context ).toString(), QgsApplication::userLoginName() );
QCOMPARE( expUserFullName.evaluate( &context ).toString(), QgsApplication::userFullName() );
QCOMPARE( expOsName.evaluate( &context ).toString(), QgsApplication::osName() );
Expand Down
2 changes: 1 addition & 1 deletion tests/src/quickgui/app/main.cpp
Expand Up @@ -36,7 +36,7 @@ int main( int argc, char *argv[] )
QCoreApplication::setOrganizationName( "QGIS" );
QCoreApplication::setOrganizationDomain( "qgis.org" );
QCoreApplication::setApplicationName( "QgsQuick Test App" );
QCoreApplication::setApplicationVersion( Qgis::QGIS_VERSION );
QCoreApplication::setApplicationVersion( Qgis::version() );

QCommandLineParser parser;
parser.addVersionOption();
Expand Down

0 comments on commit 81b49ce

Please sign in to comment.