Skip to content

Commit

Permalink
Merge pull request #42517 from m-kuhn/forward_declaration
Browse files Browse the repository at this point in the history
[qt6] Code shuffling
  • Loading branch information
m-kuhn committed Mar 27, 2021
2 parents 90a4902 + 14a20da commit 5be4bcf
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/core/layertree/qgslayertreeutils.h
Expand Up @@ -24,7 +24,6 @@

class QDomElement;
class QDomDocument;
class QStringList;

class QgsLayerTreeNode;
class QgsLayerTreeGroup;
Expand Down
4 changes: 2 additions & 2 deletions src/core/project/qgsproject.h
Expand Up @@ -50,6 +50,8 @@
#include "qgssettings.h"
#include "qgspropertycollection.h"

#include "qgsrelationmanager.h"
#include "qgsmapthemecollection.h"

class QFileInfo;
class QDomDocument;
Expand All @@ -59,11 +61,9 @@ class QDomNode;
class QgsLayerTreeGroup;
class QgsLayerTreeRegistryBridge;
class QgsMapLayer;
class QgsMapThemeCollection;
class QgsPathResolver;
class QgsProjectBadLayerHandler;
class QgsProjectStorage;
class QgsRelationManager;
class QgsTolerance;
class QgsTransactionGroup;
class QgsVectorLayer;
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsactionmanager.cpp
Expand Up @@ -262,7 +262,7 @@ bool QgsActionManager::readXml( const QDomNode &layer_node )
for ( int i = 0; i < defaultActionNodes.size(); ++i )
{
QDomElement defaultValueElem = defaultActionNodes.at( i ).toElement();
mDefaultActions.insert( defaultValueElem.attribute( QStringLiteral( "key" ) ), defaultValueElem.attribute( QStringLiteral( "value" ) ) );
mDefaultActions.insert( defaultValueElem.attribute( QStringLiteral( "key" ) ), QUuid( defaultValueElem.attribute( QStringLiteral( "value" ) ) ) );
}
}
return true;
Expand Down
12 changes: 12 additions & 0 deletions src/core/qgstilecache.cpp
Expand Up @@ -60,3 +60,15 @@ bool QgsTileCache::tile( const QUrl &url, QImage &image )
}
return success;
}

int QgsTileCache::totalCost()
{
QMutexLocker locker( &sTileCacheMutex );
return sTileCache.totalCost();
}

int QgsTileCache::maxCost()
{
QMutexLocker locker( &sTileCacheMutex );
return sTileCache.maxCost();
}
4 changes: 2 additions & 2 deletions src/core/qgstilecache.h
Expand Up @@ -51,9 +51,9 @@ class CORE_EXPORT QgsTileCache
static bool tile( const QUrl &url, QImage &image );

//! how many tiles are stored in the in-memory cache
static int totalCost() { QMutexLocker locker( &sTileCacheMutex ); return sTileCache.totalCost(); }
static int totalCost();
//! how many tiles can be stored in the in-memory cache
static int maxCost() { QMutexLocker locker( &sTileCacheMutex ); return sTileCache.maxCost(); }
static int maxCost();

private:
//! in-memory cache
Expand Down

0 comments on commit 5be4bcf

Please sign in to comment.