Skip to content

Commit 4a16b3a

Browse files
committedJul 7, 2017
Drop gui dependency from server
1 parent 59d1f6d commit 4a16b3a

File tree

4 files changed

+1
-19
lines changed

4 files changed

+1
-19
lines changed
 

‎src/server/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,11 @@ INCLUDE_DIRECTORIES(
123123
${CMAKE_SOURCE_DIR}/src/core/symbology-ng
124124
${CMAKE_SOURCE_DIR}/src/core/composer
125125
${CMAKE_SOURCE_DIR}/src/core/layertree
126-
${CMAKE_SOURCE_DIR}/src/gui
127-
${CMAKE_SOURCE_DIR}/src/gui/editorwidgets
128-
${CMAKE_SOURCE_DIR}/src/gui/editorwidgets/core
129126
${CMAKE_SOURCE_DIR}/src/analysis/interpolation
130127
${CMAKE_SOURCE_DIR}/src/plugins/diagram_overlay
131128
${CMAKE_SOURCE_DIR}/src/python
132129

133130
${CMAKE_BINARY_DIR}/src/core
134-
${CMAKE_BINARY_DIR}/src/gui
135131
${CMAKE_BINARY_DIR}/src/python
136132
${CMAKE_BINARY_DIR}/src/analysis
137133
${CMAKE_BINARY_DIR}/src/server
@@ -155,7 +151,6 @@ ENDIF (NOT ANDROID)
155151

156152
TARGET_LINK_LIBRARIES(qgis_server
157153
qgis_core
158-
qgis_gui
159154
qgis_analysis
160155
${PROJ_LIBRARY}
161156
${FCGI_LIBRARY}

‎src/server/qgsserver.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,12 @@
3333
#include "qgsmapserviceexception.h"
3434
#include "qgsnetworkaccessmanager.h"
3535
#include "qgsserverlogger.h"
36-
#include "qgseditorwidgetregistry.h"
3736
#include "qgsserverrequest.h"
3837
#include "qgsbufferserverresponse.h"
3938
#include "qgsbufferserverrequest.h"
4039
#include "qgsfilterresponsedecorator.h"
4140
#include "qgsservice.h"
4241
#include "qgsserverprojectutils.h"
43-
#include "qgsgui.h"
4442

4543
#include <QDomDocument>
4644
#include <QNetworkDiskCache>
@@ -273,8 +271,6 @@ bool QgsServer::init( )
273271
QgsFontUtils::loadStandardTestFonts( QStringList() << QStringLiteral( "Roman" ) << QStringLiteral( "Bold" ) );
274272
#endif
275273

276-
QgsGui::editorWidgetRegistry()->initEditors();
277-
278274
sServerInterface = new QgsServerInterfaceImpl( sCapabilitiesCache, &sServiceRegistry, &sSettings );
279275

280276
// Load service module

‎src/server/qgsserverprojectparser.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,11 @@
2727
#include "qgsrasterlayer.h"
2828
#include "qgsreadwritecontext.h"
2929
#include "qgsvectorlayerjoinbuffer.h"
30-
#include "qgseditorwidgetregistry.h"
3130
#include "qgslayertreegroup.h"
3231
#include "qgslayertreelayer.h"
3332
#include "qgslayertree.h"
3433
#include "qgslogger.h"
3534
#include "qgseditorwidgetsetup.h"
36-
#include "qgsgui.h"
3735
#include "qgsexpressionnodeimpl.h"
3836
#include "qgsserverprojectutils.h"
3937

@@ -299,12 +297,6 @@ QgsMapLayer *QgsServerProjectParser::createLayerFromElement( const QDomElement &
299297

300298
if ( layer )
301299
{
302-
if ( layer->type() == QgsMapLayer::VectorLayer )
303-
{
304-
// see QgsEditorWidgetRegistry::mapLayerAdded()
305-
QObject::connect( layer, SIGNAL( readCustomSymbology( const QDomElement &, QString & ) ), QgsGui::editorWidgetRegistry(), SLOT( readSymbology( const QDomElement &, QString & ) ) );
306-
}
307-
308300
QgsReadWriteContext context;
309301
context.setPathResolver( QgsProject::instance()->pathResolver() );
310302

‎src/server/services/wms/qgswmsrenderer.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
#include "qgspaintenginehack.h"
5353
#include "qgsogcutils.h"
5454
#include "qgsfeature.h"
55-
#include "qgseditorwidgetregistry.h"
5655
#include "qgsaccesscontrol.h"
5756
#include "qgsfeaturerequest.h"
5857
#include "qgsmaprendererjobproxy.h"
@@ -2359,7 +2358,7 @@ namespace QgsWms
23592358
QString QgsRenderer::replaceValueMapAndRelation( QgsVectorLayer *vl, int idx, const QString &attributeVal )
23602359
{
23612360
// TODO Could we get rid of QgsEditorWidgetRegistry dependency ?
2362-
const QgsEditorWidgetSetup setup = QgsGui::editorWidgetRegistry()->findBest( vl, vl->fields().field( idx ).name() );
2361+
const QgsEditorWidgetSetup setup = vl->editorWidgetSetup( idx );
23632362
QgsFieldFormatter *fieldFormatter = QgsApplication::fieldFormatterRegistry()->fieldFormatter( setup.type() );
23642363
QString value( fieldFormatter->representValue( vl, idx, setup.config(), QVariant(), attributeVal ) );
23652364

0 commit comments

Comments
 (0)
Please sign in to comment.