Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Add QgsStyle::cleanDefaultStyle() and use it in QgsApplication::exitQ…
- Loading branch information
|
@@ -134,6 +134,7 @@ returns 0 if not found |
|
|
Returns default application-wide style |
|
|
%End |
|
|
|
|
|
|
|
|
bool tagSymbol( StyleEntity type, const QString &symbol, const QStringList &tags ); |
|
|
%Docstring |
|
|
Tags the symbol with the tags in the list |
|
|
|
@@ -47,6 +47,7 @@ |
|
|
#include "qgs3drendererregistry.h" |
|
|
#include "qgslayoutrendercontext.h" |
|
|
#include "qgssqliteutils.h" |
|
|
#include "qgsstyle.h" |
|
|
|
|
|
#include "gps/qgsgpsconnectionregistry.h" |
|
|
#include "processing/qgsprocessingregistry.h" |
|
@@ -1084,6 +1085,8 @@ void QgsApplication::exitQgis() |
|
|
|
|
|
delete QgsProviderRegistry::instance(); |
|
|
|
|
|
QgsStyle::cleanDefaultStyle(); |
|
|
|
|
|
// tear-down GDAL/OGR |
|
|
OGRCleanupAll(); |
|
|
GDALDestroyDriverManager(); |
|
|
|
@@ -68,6 +68,11 @@ QgsStyle *QgsStyle::defaultStyle() // static |
|
|
return sDefaultStyle; |
|
|
} |
|
|
|
|
|
void QgsStyle::cleanDefaultStyle() // static |
|
|
{ |
|
|
delete sDefaultStyle; |
|
|
sDefaultStyle = nullptr; |
|
|
} |
|
|
|
|
|
void QgsStyle::clear() |
|
|
{ |
|
|
|
@@ -167,6 +167,9 @@ class CORE_EXPORT QgsStyle : public QObject |
|
|
//! Returns default application-wide style |
|
|
static QgsStyle *defaultStyle(); |
|
|
|
|
|
//! Deletes the default style. Only to be used by QgsApplication::exitQgis() |
|
|
static void cleanDefaultStyle() SIP_SKIP; |
|
|
|
|
|
/** |
|
|
* Tags the symbol with the tags in the list |
|
|
* |
|
|