35
35
36
36
#include < ogr_api.h>
37
37
38
- QObject * QgsApplication::mFileOpenEventReceiver ;
39
- QStringList QgsApplication::mFileOpenEventList ;
40
- QString QgsApplication::mPrefixPath ;
41
- QString QgsApplication::mPluginPath ;
42
- QString QgsApplication::mPkgDataPath ;
43
- QString QgsApplication::mThemeName ;
44
- QStringList QgsApplication::mDefaultSvgPaths ;
45
- QString QgsApplication::mConfigPath = QDir::homePath() + QString( " /.qgis/" );
38
+ QObject * ABISYM ( QgsApplication::mFileOpenEventReceiver ) ;
39
+ QStringList ABISYM ( QgsApplication::mFileOpenEventList ) ;
40
+ QString ABISYM ( QgsApplication::mPrefixPath ) ;
41
+ QString ABISYM ( QgsApplication::mPluginPath ) ;
42
+ QString ABISYM ( QgsApplication::mPkgDataPath ) ;
43
+ QString ABISYM ( QgsApplication::mThemeName ) ;
44
+ QStringList ABISYM ( QgsApplication::mDefaultSvgPaths ) ;
45
+ QString ABISYM ( QgsApplication::mConfigPath ) = QDir::homePath() + QString( " /.qgis/" );
46
46
47
47
/* !
48
48
\class QgsApplication
@@ -71,10 +71,10 @@ QgsApplication::QgsApplication( int & argc, char ** argv, bool GUIenabled, QStri
71
71
72
72
if ( !customConfigPath.isEmpty () )
73
73
{
74
- mConfigPath = customConfigPath + " /" ; // make sure trailing slash is included
74
+ ABISYM ( mConfigPath ) = customConfigPath + " /" ; // make sure trailing slash is included
75
75
}
76
76
77
- mDefaultSvgPaths << qgisSettingsDirPath () + QString ( " svg/" );
77
+ ABISYM ( mDefaultSvgPaths ) << qgisSettingsDirPath () + QString ( " svg/" );
78
78
}
79
79
80
80
QgsApplication::~QgsApplication ()
@@ -87,17 +87,17 @@ bool QgsApplication::event( QEvent * event )
87
87
if ( event->type () == QEvent::FileOpen )
88
88
{
89
89
// handle FileOpen event (double clicking a file icon in Mac OS X Finder)
90
- if ( mFileOpenEventReceiver )
90
+ if ( ABISYM ( mFileOpenEventReceiver ) )
91
91
{
92
92
// Forward event to main window.
93
- done = notify ( mFileOpenEventReceiver , event );
93
+ done = notify ( ABISYM ( mFileOpenEventReceiver ) , event );
94
94
}
95
95
else
96
96
{
97
97
// Store filename because receiver has not registered yet.
98
98
// If QGIS has been launched by double clicking a file icon, FileOpen will be
99
99
// the first event; the main window is not yet ready to handle the event.
100
- mFileOpenEventList .append ( static_cast <QFileOpenEvent *>( event )->file () );
100
+ ABISYM ( mFileOpenEventList ) .append ( static_cast <QFileOpenEvent *>( event )->file () );
101
101
done = true ;
102
102
}
103
103
}
@@ -135,74 +135,74 @@ bool QgsApplication::notify( QObject * receiver, QEvent * event )
135
135
void QgsApplication::setFileOpenEventReceiver ( QObject * receiver )
136
136
{
137
137
// Set receiver for FileOpen events
138
- mFileOpenEventReceiver = receiver;
138
+ ABISYM ( mFileOpenEventReceiver ) = receiver;
139
139
// Propagate any events collected before the receiver has registered.
140
- if ( mFileOpenEventList .count () > 0 )
140
+ if ( ABISYM ( mFileOpenEventList ) .count () > 0 )
141
141
{
142
- QStringListIterator i ( mFileOpenEventList );
142
+ QStringListIterator i ( ABISYM ( mFileOpenEventList ) );
143
143
while ( i.hasNext () )
144
144
{
145
145
QFileOpenEvent foe ( i.next () );
146
- QgsApplication::sendEvent ( mFileOpenEventReceiver , &foe );
146
+ QgsApplication::sendEvent ( ABISYM ( mFileOpenEventReceiver ) , &foe );
147
147
}
148
- mFileOpenEventList .clear ();
148
+ ABISYM ( mFileOpenEventList ) .clear ();
149
149
}
150
150
}
151
151
152
152
void QgsApplication::setPrefixPath ( const QString thePrefixPath, bool useDefaultPaths )
153
153
{
154
- mPrefixPath = thePrefixPath;
154
+ ABISYM ( mPrefixPath ) = thePrefixPath;
155
155
#if defined(_MSC_VER)
156
- if ( mPrefixPath .endsWith ( " /bin" ) )
156
+ if ( ABISYM ( mPrefixPath ) .endsWith ( " /bin" ) )
157
157
{
158
- mPrefixPath .chop ( 4 );
158
+ ABISYM ( mPrefixPath ) .chop ( 4 );
159
159
}
160
160
#endif
161
161
if ( useDefaultPaths )
162
162
{
163
- setPluginPath ( mPrefixPath + " /" + QString ( QGIS_PLUGIN_SUBDIR ) );
164
- setPkgDataPath ( mPrefixPath + " /" + QString ( QGIS_DATA_SUBDIR ) );
163
+ setPluginPath ( ABISYM ( mPrefixPath ) + " /" + QString ( QGIS_PLUGIN_SUBDIR ) );
164
+ setPkgDataPath ( ABISYM ( mPrefixPath ) + " /" + QString ( QGIS_DATA_SUBDIR ) );
165
165
}
166
166
}
167
167
168
168
void QgsApplication::setPluginPath ( const QString thePluginPath )
169
169
{
170
- mPluginPath = thePluginPath;
170
+ ABISYM ( mPluginPath ) = thePluginPath;
171
171
}
172
172
173
173
void QgsApplication::setPkgDataPath ( const QString thePkgDataPath )
174
174
{
175
- mPkgDataPath = thePkgDataPath;
176
- QString svgPath = mPkgDataPath + QString ( " /svg/" );
175
+ ABISYM ( mPkgDataPath ) = thePkgDataPath;
176
+ QString svgPath = ABISYM ( mPkgDataPath ) + QString ( " /svg/" );
177
177
// avoid duplicate entries
178
- if ( !mDefaultSvgPaths .contains ( svgPath ) )
179
- mDefaultSvgPaths << svgPath;
178
+ if ( !ABISYM ( mDefaultSvgPaths ) .contains ( svgPath ) )
179
+ ABISYM ( mDefaultSvgPaths ) << svgPath;
180
180
}
181
181
182
182
void QgsApplication::setDefaultSvgPaths ( const QStringList& pathList )
183
183
{
184
- mDefaultSvgPaths = pathList;
184
+ ABISYM ( mDefaultSvgPaths ) = pathList;
185
185
}
186
186
187
187
const QString QgsApplication::prefixPath ()
188
188
{
189
- return mPrefixPath ;
189
+ return ABISYM ( mPrefixPath ) ;
190
190
}
191
191
const QString QgsApplication::pluginPath ()
192
192
{
193
- return mPluginPath ;
193
+ return ABISYM ( mPluginPath ) ;
194
194
}
195
195
const QString QgsApplication::pkgDataPath ()
196
196
{
197
- return mPkgDataPath ;
197
+ return ABISYM ( mPkgDataPath ) ;
198
198
}
199
199
const QString QgsApplication::defaultThemePath ()
200
200
{
201
201
return " :/images/themes/default/" ;
202
202
}
203
203
const QString QgsApplication::activeThemePath ()
204
204
{
205
- return " :/images/themes/" + mThemeName + " /" ;
205
+ return " :/images/themes/" + ABISYM ( mThemeName ) + " /" ;
206
206
}
207
207
208
208
@@ -226,48 +226,48 @@ void QgsApplication::setThemeName( const QString theThemeName )
226
226
// check it exists and if not roll back to default theme
227
227
if ( QFile::exists ( myPath ) )
228
228
{
229
- mThemeName = theThemeName;
229
+ ABISYM ( mThemeName ) = theThemeName;
230
230
}
231
231
else
232
232
{
233
- mThemeName = " default" ;
233
+ ABISYM ( mThemeName ) = " default" ;
234
234
}
235
235
}
236
236
/* !
237
237
* Get the active theme name
238
238
*/
239
239
const QString QgsApplication::themeName ()
240
240
{
241
- return mThemeName ;
241
+ return ABISYM ( mThemeName ) ;
242
242
}
243
243
/* !
244
244
Returns the path to the authors file.
245
245
*/
246
246
const QString QgsApplication::authorsFilePath ()
247
247
{
248
- return mPkgDataPath + QString ( " /doc/AUTHORS" );
248
+ return ABISYM ( mPkgDataPath ) + QString ( " /doc/AUTHORS" );
249
249
}
250
250
/* !
251
251
Returns the path to the contributors file.
252
252
*/
253
253
const QString QgsApplication::contributorsFilePath ()
254
254
{
255
- return mPkgDataPath + QString ( " /doc/CONTRIBUTORS" );
255
+ return ABISYM ( mPkgDataPath ) + QString ( " /doc/CONTRIBUTORS" );
256
256
}
257
257
/* !
258
258
Returns the path to the sponsors file.
259
259
*/
260
260
const QString QgsApplication::sponsorsFilePath ()
261
261
{
262
- return mPkgDataPath + QString ( " /doc/SPONSORS" );
262
+ return ABISYM ( mPkgDataPath ) + QString ( " /doc/SPONSORS" );
263
263
}
264
264
265
265
/* !
266
266
Returns the path to the donors file.
267
267
*/
268
268
const QString QgsApplication::donorsFilePath ()
269
269
{
270
- return mPkgDataPath + QString ( " /doc/DONORS" );
270
+ return ABISYM ( mPkgDataPath ) + QString ( " /doc/DONORS" );
271
271
}
272
272
273
273
/* !
@@ -276,14 +276,14 @@ const QString QgsApplication::donorsFilePath()
276
276
*/
277
277
const QString QgsApplication::translatorsFilePath ()
278
278
{
279
- return mPkgDataPath + QString ( " /doc/TRANSLATORS" );
279
+ return ABISYM ( mPkgDataPath ) + QString ( " /doc/TRANSLATORS" );
280
280
}
281
281
/* !
282
282
Returns the path to the developer image directory.
283
283
*/
284
284
const QString QgsApplication::developerPath ()
285
285
{
286
- return mPkgDataPath + QString ( " /images/developers/" );
286
+ return ABISYM ( mPkgDataPath ) + QString ( " /images/developers/" );
287
287
}
288
288
289
289
/* !
@@ -305,23 +305,23 @@ const QString QgsApplication::helpAppPath()
305
305
*/
306
306
const QString QgsApplication::i18nPath ()
307
307
{
308
- return mPkgDataPath + QString ( " /i18n/" );
308
+ return ABISYM ( mPkgDataPath ) + QString ( " /i18n/" );
309
309
}
310
310
311
311
/* !
312
312
Returns the path to the master qgis.db file.
313
313
*/
314
314
const QString QgsApplication::qgisMasterDbFilePath ()
315
315
{
316
- return mPkgDataPath + QString ( " /resources/qgis.db" );
316
+ return ABISYM ( mPkgDataPath ) + QString ( " /resources/qgis.db" );
317
317
}
318
318
319
319
/* !
320
320
Returns the path to the settings directory in user's home dir
321
321
*/
322
322
const QString QgsApplication::qgisSettingsDirPath ()
323
323
{
324
- return mConfigPath ;
324
+ return ABISYM ( mConfigPath ) ;
325
325
}
326
326
327
327
/* !
@@ -337,22 +337,22 @@ const QString QgsApplication::qgisUserDbFilePath()
337
337
*/
338
338
const QString QgsApplication::splashPath ()
339
339
{
340
- return mPkgDataPath + QString ( " /images/splash/" );
340
+ return ABISYM ( mPkgDataPath ) + QString ( " /images/splash/" );
341
341
}
342
342
343
343
/* !
344
344
Returns the path to the icons image directory.
345
345
*/
346
346
const QString QgsApplication::iconsPath ()
347
347
{
348
- return mPkgDataPath + QString ( " /images/icons/" );
348
+ return ABISYM ( mPkgDataPath ) + QString ( " /images/icons/" );
349
349
}
350
350
/* !
351
351
Returns the path to the srs.db file.
352
352
*/
353
353
const QString QgsApplication::srsDbFilePath ()
354
354
{
355
- return mPkgDataPath + QString ( " /resources/srs.db" );
355
+ return ABISYM ( mPkgDataPath ) + QString ( " /resources/srs.db" );
356
356
}
357
357
358
358
/* !
@@ -370,7 +370,7 @@ const QStringList QgsApplication::svgPaths()
370
370
myPathList = myPaths.split ( " |" );
371
371
}
372
372
373
- myPathList << mDefaultSvgPaths ;
373
+ myPathList << ABISYM ( mDefaultSvgPaths ) ;
374
374
return myPathList;
375
375
}
376
376
@@ -379,7 +379,7 @@ const QStringList QgsApplication::svgPaths()
379
379
*/
380
380
const QString QgsApplication::svgPath ()
381
381
{
382
- return mPkgDataPath + QString ( " /svg/" );
382
+ return ABISYM ( mPkgDataPath ) + QString ( " /svg/" );
383
383
}
384
384
385
385
const QString QgsApplication::userStyleV2Path ()
@@ -389,7 +389,7 @@ const QString QgsApplication::userStyleV2Path()
389
389
390
390
const QString QgsApplication::defaultStyleV2Path ()
391
391
{
392
- return mPkgDataPath + QString ( " /resources/symbology-ng-style.xml" );
392
+ return ABISYM ( mPkgDataPath ) + QString ( " /resources/symbology-ng-style.xml" );
393
393
}
394
394
395
395
QgsApplication::endian_t QgsApplication::endian ()
@@ -423,9 +423,9 @@ QString QgsApplication::showSettings()
423
423
" Default Theme Path : %6\n "
424
424
" SVG Search Paths : %7\n "
425
425
" User DB Path : %8\n " )
426
- .arg ( mPrefixPath )
427
- .arg ( mPluginPath )
428
- .arg ( mPkgDataPath )
426
+ .arg ( ABISYM ( mPrefixPath ) )
427
+ .arg ( ABISYM ( mPluginPath ) )
428
+ .arg ( ABISYM ( mPkgDataPath ) )
429
429
.arg ( themeName () )
430
430
.arg ( activeThemePath () )
431
431
.arg ( defaultThemePath () )
0 commit comments