Skip to content
Permalink
Browse files

Also use the pyQgisVersion approach in QgsPluginRegistry

  • Loading branch information
borysiasty committed Dec 18, 2017
1 parent c4c5cba commit 51bb631b2a14d405934b067f0ba84ff6529e76d1
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/app/qgspluginregistry.cpp
@@ -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' ) )

0 comments on commit 51bb631

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