We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d3c72f commit 6210636Copy full SHA for 6210636
src/core/qgsprojectversion.cpp
@@ -35,9 +35,19 @@ QgsProjectVersion::QgsProjectVersion( QString string )
35
36
QStringList fileVersionParts = pre.section( "-", 0 ).split( "." );
37
38
+ mMinor = 0;
39
+ mSub = 0;
40
+ mName = "";
41
mMajor = fileVersionParts.at( 0 ).toInt();
- mMinor = fileVersionParts.at( 1 ).toInt();
- mSub = fileVersionParts.at( 2 ).toInt();
42
+
43
+ if ( fileVersionParts.size() > 1 )
44
+ {
45
+ mMinor = fileVersionParts.at( 1 ).toInt();
46
+ }
47
+ if ( fileVersionParts.size() > 2 )
48
49
+ mSub = fileVersionParts.at( 2 ).toInt();
50
51
mName = string.section( '-', 1 );
52
53
QgsDebugMsg( QString( "Version is set to " ) + text() );
0 commit comments