Skip to content
Permalink
Browse files

Removed crashed when reading VERY early project files

git-svn-id: http://svn.osgeo.org/qgis/trunk@11430 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
homann
homann committed Aug 18, 2009
1 parent da17b5d commit 6ddd6b7808ffa8701ab593df068d8623f3cb5b0a
Showing with 12 additions and 2 deletions.
  1. +12 −2 src/core/qgsprojectversion.cpp
@@ -35,9 +35,19 @@ QgsProjectVersion::QgsProjectVersion( QString string )

QStringList fileVersionParts = pre.section( "-", 0 ).split( "." );

mMinor = 0;
mSub = 0;
mName = "";
mMajor = fileVersionParts.at( 0 ).toInt();
mMinor = fileVersionParts.at( 1 ).toInt();
mSub = fileVersionParts.at( 2 ).toInt();

if ( fileVersionParts.size() > 1 )
{
mMinor = fileVersionParts.at( 1 ).toInt();
}
if ( fileVersionParts.size() > 2 )
{
mSub = fileVersionParts.at( 2 ).toInt();
}
mName = string.section( '-', 1 );

QgsDebugMsg( QString( "Version is set to " ) + text() );

0 comments on commit 6ddd6b7

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