@@ -62,7 +62,6 @@ QgsWCSProjectParser* QgsConfigCache::wcsConfiguration( const QString& filePath )
62
62
}
63
63
p = new QgsWCSProjectParser ( filePath );
64
64
mWCSConfigCache .insert ( filePath, p );
65
- mFileSystemWatcher .addPath ( filePath );
66
65
}
67
66
68
67
QgsMSLayerCache::instance ()->setProjectMaxLayers ( p->wcsLayers ().size () );
@@ -81,7 +80,6 @@ QgsWFSProjectParser* QgsConfigCache::wfsConfiguration( const QString& filePath )
81
80
}
82
81
p = new QgsWFSProjectParser ( filePath );
83
82
mWFSConfigCache .insert ( filePath, p );
84
- mFileSystemWatcher .addPath ( filePath );
85
83
}
86
84
87
85
QgsMSLayerCache::instance ()->setProjectMaxLayers ( p->wfsLayers ().size () );
@@ -111,7 +109,6 @@ QgsWMSConfigParser* QgsConfigCache::wmsConfiguration( const QString& filePath, c
111
109
p = new QgsWMSProjectParser ( filePath );
112
110
}
113
111
mWMSConfigCache .insert ( filePath, p );
114
- mFileSystemWatcher .addPath ( filePath );
115
112
}
116
113
117
114
QgsMSLayerCache::instance ()->setProjectMaxLayers ( p->nLayers () );
@@ -133,22 +130,22 @@ QDomDocument* QgsConfigCache::xmlDocument( const QString& filePath )
133
130
QgsMessageLog::logMessage ( " Error, cannot open configuration file '" + filePath + " '" , " Server" , QgsMessageLog::CRITICAL );
134
131
return 0 ;
135
132
}
136
-
133
+
137
134
// first get cache
138
135
QDomDocument* xmlDoc = mXmlDocumentCache .object ( filePath );
139
136
if ( !xmlDoc )
140
137
{
141
138
// then create xml document
142
- xmlDoc = new QDomDocument ();
143
- QString errorMsg;
144
- int line, column;
145
- if ( !xmlDoc->setContent ( &configFile, true , &errorMsg, &line, &column ) )
146
- {
147
- QgsMessageLog::logMessage ( " Error parsing file '" + filePath +
148
- QString ( " ': parse error %1 at row %2, column %3" ).arg ( errorMsg ).arg ( line ).arg ( column ), " Server" , QgsMessageLog::CRITICAL );
149
- delete xmlDoc;
150
- return 0 ;
151
- }
139
+ xmlDoc = new QDomDocument ();
140
+ QString errorMsg;
141
+ int line, column;
142
+ if ( !xmlDoc->setContent ( &configFile, true , &errorMsg, &line, &column ) )
143
+ {
144
+ QgsMessageLog::logMessage ( " Error parsing file '" + filePath +
145
+ QString ( " ': parse error %1 at row %2, column %3" ).arg ( errorMsg ).arg ( line ).arg ( column ), " Server" , QgsMessageLog::CRITICAL );
146
+ delete xmlDoc;
147
+ return 0 ;
148
+ }
152
149
mXmlDocumentCache .insert ( filePath, xmlDoc );
153
150
mFileSystemWatcher .addPath ( filePath );
154
151
}
0 commit comments