Skip to content

Commit

Permalink
Move GeoNode data items from OWS provider to app
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Sep 12, 2017
1 parent 973ba7b commit b657c1a
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 13 deletions.
2 changes: 2 additions & 0 deletions src/app/CMakeLists.txt
Expand Up @@ -154,6 +154,7 @@ SET(QGIS_APP_SRCS
composer/qgsatlascompositionwidget.cpp

geocms/qgsgeocmsproviderregistry.cpp
geocms/geonode/qgsgeonodedataitems.cpp
geocms/geonode/qgsgeonodesourceselect.cpp

layout/qgslayoutaddpagesdialog.cpp
Expand Down Expand Up @@ -336,6 +337,7 @@ SET (QGIS_APP_MOC_HDRS
composer/qgscompositionwidget.h
composer/qgsatlascompositionwidget.h

geocms/geonode/qgsgeonodedataitems.h
geocms/geonode/qgsgeonodesourceselect.h

layout/qgslayoutaddpagesdialog.h
Expand Down
Expand Up @@ -13,7 +13,6 @@
* *
***************************************************************************/

#include "qgsowsdataitems.h"
#include "qgslogger.h"
#include "qgsgeonodedataitems.h"
#include "qgsproviderregistry.h"
Expand Down
File renamed without changes.
6 changes: 6 additions & 0 deletions src/app/geocms/qgsgeocmsproviderregistry.cpp
Expand Up @@ -14,9 +14,11 @@
***************************************************************************/

#include "qgsgeocmsproviderregistry.h"
#include "qgsdataitemproviderregistry.h"
#include "qgsgui.h"
#include "qgssourceselectproviderregistry.h"
#include "geocms/geonode/qgsgeonodesourceselect.h"
#include "geocms/geonode/qgsgeonodedataitems.h"

QgsGeoCmsProviderRegistry::QgsGeoCmsProviderRegistry()
{
Expand All @@ -25,5 +27,9 @@ QgsGeoCmsProviderRegistry::QgsGeoCmsProviderRegistry()

void QgsGeoCmsProviderRegistry::init()
{
// source select providers
QgsGui::sourceSelectProviderRegistry()->addProvider( new QgsGeoNodeSourceSelectProvider() );

// data item providers
QgsApplication::dataItemProviderRegistry()->addProvider( new QgsGeoNodeDataItemProvider() );
}
6 changes: 4 additions & 2 deletions src/app/qgisapp.cpp
Expand Up @@ -1081,6 +1081,10 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
QgsStyle::defaultStyle();
endProfile();

startProfile( QStringLiteral( "Loading GeoCMS providers" ) );
mGeoCmsProviderRegistry.reset( new QgsGeoCmsProviderRegistry() );
endProfile();

mSplash->showMessage( tr( "QGIS Ready!" ), Qt::AlignHCenter | Qt::AlignBottom );

QgsMessageLog::logMessage( QgsApplication::showSettings(), QString(), QgsMessageLog::INFO );
Expand Down Expand Up @@ -1166,8 +1170,6 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
connect( QgsApplication::taskManager(), &QgsTaskManager::allTasksFinished, taskProgress, &QWinTaskbarProgress::hide );
#endif

mGeoCmsProviderRegistry.reset( new QgsGeoCmsProviderRegistry() );

// supposedly all actions have been added, now register them to the shortcut manager
QgsGui::shortcutsManager()->registerAllChildren( this );

Expand Down
5 changes: 1 addition & 4 deletions src/providers/ows/CMakeLists.txt
@@ -1,19 +1,16 @@
SET(OWS_SRCS
qgsowsprovider.cpp
qgsowsdataitems.cpp
qgsgeonodedataitems.cpp)
)
SET(OWS_MOC_HDRS
qgsowsprovider.h
qgsowsdataitems.h
qgsgeonodedataitems.h
)

INCLUDE_DIRECTORIES (
${CMAKE_SOURCE_DIR}/src/gui/geonode
${CMAKE_SOURCE_DIR}/src/core
${CMAKE_SOURCE_DIR}/src/core/expression
${CMAKE_SOURCE_DIR}/src/core/geometry
${CMAKE_SOURCE_DIR}/src/core/geocms/geonode
${CMAKE_SOURCE_DIR}/src/core/auth
${CMAKE_SOURCE_DIR}/src/core/metadata
${CMAKE_SOURCE_DIR}/src/gui
Expand Down
6 changes: 1 addition & 5 deletions src/providers/ows/qgsowsdataitems.cpp
Expand Up @@ -23,9 +23,6 @@
#include "qgsnewhttpconnection.h"
#include "qgsowssourceselect.h"
#endif
#include "qgsgeonodeconnection.h"
#include "qgsgeonodenewconnection.h"
#include "qgsgeonodedataitems.h"

#include "qgsapplication.h"

Expand Down Expand Up @@ -267,8 +264,7 @@ QGISEXTERN QList<QgsDataItemProvider *> *dataItemProviders()
QList<QgsDataItemProvider *> *providers = new QList<QgsDataItemProvider *>();

*providers
<< new QgsOwsDataItemProvider
<< new QgsGeoNodeDataItemProvider;
<< new QgsOwsDataItemProvider;

return providers;
}
Expand Down
1 change: 0 additions & 1 deletion src/providers/ows/qgsowsdataitems.h
Expand Up @@ -19,7 +19,6 @@
#include "qgsdataitemprovider.h"
#include "qgsdataprovider.h"
#include "qgsdatasourceuri.h"
#include "qgsgeonodeconnection.h"

class QgsOWSConnectionItem : public QgsDataCollectionItem
{
Expand Down

0 comments on commit b657c1a

Please sign in to comment.