Skip to content

Commit 0a971c3

Browse files
committed
Automatically update project files in qgis server
1 parent 90eac0f commit 0a971c3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/mapserver/qgsconfigcache.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include "qgsconfigcache.h"
1919
#include "qgslogger.h"
2020
#include "qgsmslayercache.h"
21+
#include "qgsprojectfiletransform.h"
2122
#include "qgsprojectparser.h"
2223
#include "qgssldparser.h"
2324
#include <QCoreApplication>
@@ -115,6 +116,9 @@ QgsConfigParser* QgsConfigCache::insertConfiguration( const QString& filePath )
115116
}
116117
else if ( documentElem.tagName() == "qgis" )
117118
{
119+
//convert project file to current version first
120+
QgsProjectFileTransform pt( *configDoc, QgsProjectVersion( documentElem.attribute( "version" ) ) );
121+
pt.updateRevision( QgsProjectVersion( QGis::QGIS_VERSION ) );
118122
configParser = new QgsProjectParser( configDoc, filePath );
119123
}
120124
else

0 commit comments

Comments
 (0)