Skip to content
Permalink
Browse files
Fixes for WITH_GUI=ON static builds
  • Loading branch information
nirvn authored and github-actions committed Oct 31, 2021
1 parent 6c59725 commit 526e54ab4a7438f96c9efd6ecfa7b3afdb2991a1
@@ -44,7 +44,13 @@ if (WITH_GUI)
endif()

add_library(provider_arcgisfeatureserver_gui_a STATIC ${AFS_GUI_SRCS} ${AFS_UIS_H})

# require c++17
target_compile_features(provider_arcgisfeatureserver_gui_a PRIVATE cxx_std_17)

target_link_libraries(provider_arcgisfeatureserver_a
qgis_gui
)
target_link_libraries(provider_arcgisfeatureserver_gui_a
qgis_gui
)
@@ -71,21 +71,21 @@ QgsArcGisRestProviderGuiMetadata::QgsArcGisRestProviderGuiMetadata()
{
}

QList<QgsDataItemGuiProvider *> QgsArcGisRestProviderGuiMetadata::dataItemGuiProviders() override
QList<QgsDataItemGuiProvider *> QgsArcGisRestProviderGuiMetadata::dataItemGuiProviders()
{
QList<QgsDataItemGuiProvider *> providers;
providers << new QgsArcGisRestDataItemGuiProvider();
return providers;
}

QList<QgsSourceSelectProvider *> QgsArcGisRestProviderGuiMetadata::sourceSelectProviders() override
QList<QgsSourceSelectProvider *> QgsArcGisRestProviderGuiMetadata::sourceSelectProviders()
{
QList<QgsSourceSelectProvider *> providers;
providers << new QgsArcGisRestSourceSelectProvider;
return providers;
}

QList<QgsProviderSourceWidgetProvider *> QgsArcGisRestProviderGuiMetadata::sourceWidgetProviders() override
QList<QgsProviderSourceWidgetProvider *> QgsArcGisRestProviderGuiMetadata::sourceWidgetProviders()
{
QList<QgsProviderSourceWidgetProvider *> providers;
providers << new QgsArcGisRestSourceWidgetProvider();
@@ -58,6 +58,9 @@ if (WITH_GUI)
${CMAKE_BINARY_DIR}/src/providers/spatialite
)

target_link_libraries(provider_spatialite_a
qgis_gui
)
target_link_libraries(provider_spatialite_gui_a
qgis_gui
)
@@ -82,7 +85,7 @@ if (FORCE_STATIC_LIBS)
install (TARGETS provider_spatialite_gui_a ARCHIVE DESTINATION ${QGIS_PLUGIN_DIR})
endif()
else()
add_library(provider_spatialite MODULE ${SPATIALITE_SRCS} ${SPATIALITE_GUI_SRCS})
add_library(provider_spatialite MODULE ${SPATIALITE_SRCS} ${SPATIALITE_GUI_SRCS} ${SPATIALITE_UIS_H})

# require c++17
target_compile_features(provider_spatialite PRIVATE cxx_std_17)
@@ -95,7 +98,7 @@ else()
)

if (WITH_GUI)
target_link_libraries (provider_spatialite
target_link_libraries(provider_spatialite
qgis_gui
)
add_dependencies(provider_spatialite ui)
@@ -13,6 +13,8 @@
* *
***************************************************************************/

#include "qgsspatialiteprovidergui.h"

#include "qgsapplication.h"
#include "qgsproviderguimetadata.h"
#include "qgssourceselectprovider.h"
@@ -44,14 +46,14 @@ QgsSpatiaLiteProviderGuiMetadata::QgsSpatiaLiteProviderGuiMetadata()
{
}

QList<QgsSourceSelectProvider *> QgsSpatiaLiteProviderGuiMetadata::sourceSelectProviders() override
QList<QgsSourceSelectProvider *> QgsSpatiaLiteProviderGuiMetadata::sourceSelectProviders()
{
QList<QgsSourceSelectProvider *> providers;
providers << new QgsSpatialiteSourceSelectProvider;
return providers;
}

QList<QgsDataItemGuiProvider *> QgsSpatiaLiteProviderGuiMetadata::dataItemGuiProviders() override
QList<QgsDataItemGuiProvider *> QgsSpatiaLiteProviderGuiMetadata::dataItemGuiProviders()
{
return QList<QgsDataItemGuiProvider *>()
<< new QgsSpatiaLiteDataItemGuiProvider;
@@ -16,7 +16,9 @@
***************************************************************************/
#ifndef QGSSPATIALITESOURCESELECT_H
#define QGSSPATIALITESOURCESELECT_H

#include "ui_qgsdbsourceselectbase.h"

#include "qgsguiutils.h"
#include "qgsdbfilterproxymodel.h"
#include "qgsspatialitetablemodel.h"
@@ -20,8 +20,6 @@ extern "C"
#include <spatialite.h>
}

#include <QUrl>

#include <stdexcept>

#include "qgsvirtuallayerprovider.h"
@@ -30,23 +28,23 @@ extern "C"
#include "qgsvectorlayer.h"
#include "qgsproject.h"
#include "qgslogger.h"
#include "qgsapplication.h"

#include "qgsvirtuallayerprovider.h"
#include "qgsvirtuallayersqlitemodule.h"
#include "qgsvirtuallayerqueryparser.h"

const QString VIRTUAL_LAYER_KEY = QStringLiteral( "virtual" );
const QString VIRTUAL_LAYER_DESCRIPTION = QStringLiteral( "Virtual layer data provider" );
#include <QUrl>

const QString VIRTUAL_LAYER_QUERY_VIEW = QStringLiteral( "_query" );
const QString QgsVirtualLayerProvider::VIRTUAL_LAYER_KEY = QStringLiteral( "virtual" );
const QString QgsVirtualLayerProvider::VIRTUAL_LAYER_DESCRIPTION = QStringLiteral( "Virtual layer data provider" );
const QString QgsVirtualLayerProvider::VIRTUAL_LAYER_QUERY_VIEW = QStringLiteral( "_query" );

static QString quotedColumn( QString name )
{
return "\"" + name.replace( QLatin1String( "\"" ), QLatin1String( "\"\"" ) ) + "\"";
}

#define PROVIDER_ERROR( msg ) do { mError = QgsError( msg, VIRTUAL_LAYER_KEY ); QgsDebugMsg( msg ); } while(0)
#define PROVIDER_ERROR( msg ) do { mError = QgsError( msg, QgsVirtualLayerProvider::VIRTUAL_LAYER_KEY ); QgsDebugMsg( msg ); } while(0)


QgsVirtualLayerProvider::QgsVirtualLayerProvider( QString const &uri,
@@ -673,7 +671,7 @@ QgsVirtualLayerProvider *QgsVirtualLayerProviderMetadata::createProvider(
}

QgsVirtualLayerProviderMetadata::QgsVirtualLayerProviderMetadata():
QgsProviderMetadata( VIRTUAL_LAYER_KEY, VIRTUAL_LAYER_DESCRIPTION )
QgsProviderMetadata( QgsVirtualLayerProvider::VIRTUAL_LAYER_KEY, QgsVirtualLayerProvider::VIRTUAL_LAYER_DESCRIPTION )
{
}

@@ -33,6 +33,10 @@ class QgsVirtualLayerProvider final: public QgsVectorDataProvider
Q_OBJECT
public:

static const QString VIRTUAL_LAYER_KEY;
static const QString VIRTUAL_LAYER_DESCRIPTION;
static const QString VIRTUAL_LAYER_QUERY_VIEW;

/**
* Constructor of the vector provider
* \param uri uniform resource locator (URI) for a dataset
@@ -14,7 +14,10 @@
***************************************************************************/

#include "qgsvirtuallayerprovidergui.h"

#include "qgsapplication.h"
#include "qgssourceselectprovider.h"
#include "qgsvirtuallayerprovider.h"
#include "qgsvirtuallayersourceselect.h"

//! Provider for virtual layers source select
@@ -35,7 +38,7 @@ class QgsVirtualSourceSelectProvider : public QgsSourceSelectProvider


QgsVirtualLayerProviderGuiMetadata::QgsVirtualLayerProviderGuiMetadata()
: QgsProviderGuiMetadata( VIRTUAL_LAYER_KEY )
: QgsProviderGuiMetadata( QgsVirtualLayerProvider::VIRTUAL_LAYER_KEY )
{
}

@@ -72,6 +72,9 @@ if (WITH_GUI)
${CMAKE_BINARY_DIR}/src/providers/wfs
)

target_link_libraries(provider_wfs_a
qgis_gui
)
target_link_libraries(provider_wfs_gui_a
qgis_gui
)
@@ -13,6 +13,8 @@
* *
***************************************************************************/

#include "qgswfsprovidergui.h"

#include "qgswfsprovider.h"
#include "qgswfsdataitemguiprovider.h"
#include "qgswfssourceselect.h"
@@ -65,20 +67,20 @@ QgsWfsProviderGuiMetadata::QgsWfsProviderGuiMetadata()
{
}

QList<QgsSourceSelectProvider *> QgsWfsProviderGuiMetadata::sourceSelectProviders() override
QList<QgsSourceSelectProvider *> QgsWfsProviderGuiMetadata::sourceSelectProviders()
{
QList<QgsSourceSelectProvider *> providers;
providers << new QgsWfsSourceSelectProvider;
return providers;
}

QList<QgsDataItemGuiProvider *> QgsWfsProviderGuiMetadata::dataItemGuiProviders() override
QList<QgsDataItemGuiProvider *> QgsWfsProviderGuiMetadata::dataItemGuiProviders()
{
return QList<QgsDataItemGuiProvider *>()
<< new QgsWfsDataItemGuiProvider;
}

QList<QgsSubsetStringEditorProvider *> QgsWfsProviderGuiMetadata::subsetStringEditorProviders() override
QList<QgsSubsetStringEditorProvider *> QgsWfsProviderGuiMetadata::subsetStringEditorProviders()
{
return QList<QgsSubsetStringEditorProvider *>()
<< new QgsWfsSubsetStringEditorProvider;

0 comments on commit 526e54a

Please sign in to comment.