Skip to content

Commit 51bb631

Browse files
committed
Also use the pyQgisVersion approach in QgsPluginRegistry
1 parent c4c5cba commit 51bb631

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/app/qgspluginregistry.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,14 @@ bool QgsPluginRegistry::checkQgisVersion( const QString &minVersion, const QStri
253253
int qgisMinor = qgisVersionParts.at( 1 ).toInt();
254254
int qgisBugfix = qgisVersionParts.at( 2 ).toInt();
255255

256+
if ( qgisMinor == 99 )
257+
{
258+
// 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
259+
qgisMajor ++;
260+
qgisMinor = 0;
261+
qgisBugfix = 0;
262+
};
263+
256264
// build XxYyZz strings with trailing zeroes if needed
257265
QString minVer = QStringLiteral( "%1%2%3" ).arg( minVerMajor, 2, 10, QChar( '0' ) )
258266
.arg( minVerMinor, 2, 10, QChar( '0' ) )

0 commit comments

Comments
 (0)