Skip to content
Permalink
Browse files
Fix a couple of include issues when compiling against qt6
  • Loading branch information
nirvn committed Jul 18, 2021
1 parent 744ef3f commit 2cab558e40aca55bc1106f7fb4e7b100d7387827
@@ -18,6 +18,8 @@
#include <QtConcurrentMap>
#include <QUrl>
#include <QStorageInfo>
#include <QFuture>
#include <QFutureWatcher>

#include "qgis.h"
#include "qgsapplication.h"
@@ -38,11 +40,27 @@
#define PROJECT_HOME_PREFIX "project:"
#define HOME_PREFIX "home:"

QgsBrowserWatcher::QgsBrowserWatcher( QgsDataItem *item )
: QFutureWatcher( nullptr )
, mItem( item )
/// @cond PRIVATE
class QgsBrowserWatcher : public QFutureWatcher<QVector <QgsDataItem *> >
{
}
Q_OBJECT

public:
QgsBrowserWatcher( QgsDataItem *item )
: QFutureWatcher( nullptr )
, mItem( item )
{
}

QgsDataItem *item() const { return mItem; }

signals:
void finished( QgsDataItem *item, const QVector <QgsDataItem *> &items );

private:
QgsDataItem *mItem = nullptr;
};
///@endcond

// sort function for QList<QgsDataItem*>, e.g. sorted/grouped provider listings
static bool cmpByDataItemName_( QgsDataItem *a, QgsDataItem *b )
@@ -799,3 +817,6 @@ QgsDataItem *QgsBrowserModel::addProviderRootItem( QgsDataItemProvider *pr )
}
return item;
}

// For QgsBrowserWatcher
#include "qgsbrowsermodel.moc"
@@ -17,42 +17,18 @@

#include "qgis_core.h"
#include "qgis.h"

#include <QAbstractItemModel>
#include <QIcon>
#include <QMimeData>
#include <QMovie>
#include <QFuture>
#include <QFutureWatcher>

class QgsDataItemProvider;
class QgsDataItem;
class QgsDataItemProvider;
class QgsDirectoryItem;
class QgsFavoriteItem;
class QgsFavoritesItem;

/**
* \ingroup core
* \class QgsBrowserWatcher
* \note not available in Python bindings
*/
#ifndef SIP_RUN
class CORE_EXPORT QgsBrowserWatcher : public QFutureWatcher<QVector <QgsDataItem *> >
{
Q_OBJECT

public:
QgsBrowserWatcher( QgsDataItem *item );

QgsDataItem *item() const { return mItem; }

signals:
void finished( QgsDataItem *item, const QVector <QgsDataItem *> &items );

private:
QgsDataItem *mItem = nullptr;
};
#endif

/**
* \ingroup core
* \class QgsBrowserModel
@@ -29,6 +29,11 @@ QgsMaskMarkerSymbolLayer::QgsMaskMarkerSymbolLayer()

QgsMaskMarkerSymbolLayer::~QgsMaskMarkerSymbolLayer() = default;

bool QgsMaskMarkerSymbolLayer::enabled() const
{
return !mMaskedSymbolLayers.isEmpty();
}

bool QgsMaskMarkerSymbolLayer::setSubSymbol( QgsSymbol *symbol )
{
if ( symbol && symbol->type() == Qgis::SymbolType::Marker )
@@ -66,7 +66,7 @@ class CORE_EXPORT QgsMaskMarkerSymbolLayer : public QgsMarkerSymbolLayer
virtual void drawPreviewIcon( QgsSymbolRenderContext &context, QSize size ) override;

//! Whether some masked symbol layers are defined
bool enabled() const { return ! mMaskedSymbolLayers.isEmpty(); }
bool enabled() const;

/**
* Returns a list of references to symbol layers that are masked by the sub symbol's shape.
@@ -20,6 +20,10 @@

#include "qgis_core.h"
#include "qgis.h"
#include "qgsfields.h"
#include "qgspropertycollection.h"
#include "qgssymbolrendercontext.h"

#include <QColor>
#include <QMap>
#include <QPointF>
@@ -28,10 +32,6 @@
#include <QDomElement>
#include <QPainterPath>

#include "qgsfields.h"
#include "qgspropertycollection.h"
#include "qgssymbolrendercontext.h"

class QPainter;
class QSize;
class QPolygonF;

0 comments on commit 2cab558

Please sign in to comment.