Skip to content

Commit

Permalink
Also use the pyQgisVersion approach in QgsPluginRegistry
Browse files Browse the repository at this point in the history
  • Loading branch information
borysiasty committed Dec 18, 2017
1 parent c4c5cba commit 51bb631
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/app/qgspluginregistry.cpp
Expand Up @@ -253,6 +253,14 @@ bool QgsPluginRegistry::checkQgisVersion( const QString &minVersion, const QStri
int qgisMinor = qgisVersionParts.at( 1 ).toInt();
int qgisBugfix = qgisVersionParts.at( 2 ).toInt();

if ( qgisMinor == 99 )
{
// we want the API version, so for x.99 bump it up to the next major release: e.g. 2.99 to 3.0.0
qgisMajor ++;
qgisMinor = 0;
qgisBugfix = 0;
};

// build XxYyZz strings with trailing zeroes if needed
QString minVer = QStringLiteral( "%1%2%3" ).arg( minVerMajor, 2, 10, QChar( '0' ) )
.arg( minVerMinor, 2, 10, QChar( '0' ) )
Expand Down

0 comments on commit 51bb631

Please sign in to comment.