Skip to content
Permalink
Browse files

Allow "Experimental" status also for c++ plugins. Mark Globe plugin e…

…xperimental.
  • Loading branch information
borysiasty committed Jun 5, 2013
1 parent 6bbc149 commit 3ce742d70c9319dcb62068152cabe6253294315a
Showing with 11 additions and 0 deletions.
  1. +2 −0 src/app/pluginmanager/qgspluginmanager.cpp
  2. +7 −0 src/plugins/globe/globe_plugin.cpp
  3. +2 −0 src/plugins/qgisplugin.h
@@ -310,6 +310,7 @@ void QgsPluginManager::getCppPluginDescriptions()
category_t *pCat = ( category_t * ) cast_to_fptr( myLib->resolve( "category" ) );
version_t *pVersion = ( version_t * ) cast_to_fptr( myLib->resolve( "version" ) );
icon_t* pIcon = ( icon_t * ) cast_to_fptr( myLib->resolve( "icon" ) );
experimental_t *pExperimental = ( experimental_t * ) cast_to_fptr( myLib->resolve( "experimental" ) );

// show the values (or lack of) for each function
if ( pName )
@@ -370,6 +371,7 @@ void QgsPluginManager::getCppPluginDescriptions()
metadata["pythonic"] = "false";
metadata["installed"] = "true";
metadata["readonly"] = "true";
metadata["experimental"] = ( pExperimental ? pExperimental() : QString() );
mPlugins.insert( baseName, metadata );

delete myLib;
@@ -71,6 +71,7 @@ static const QString sDescription = QObject::tr( "Overlay data on a 3D globe" );
static const QString sCategory = QObject::tr( "Plugins" );
static const QString sPluginVersion = QObject::tr( "Version 0.1" );
static const QgisPlugin::PLUGINTYPE sPluginType = QgisPlugin::UI;
static const QString sExperimental = QString( "true" );


//constructor
@@ -1198,6 +1199,12 @@ QGISEXTERN QString version()
return sPluginVersion;
}

// Return the experimental status for the plugin
QGISEXTERN QString experimental()
{
return sExperimental;
}

// Delete ourself
QGISEXTERN void unload( QgisPlugin * thePluginPointer )
{
@@ -201,5 +201,7 @@ typedef QString version_t();
//! Typedef for getting the plugin icon file name without instantiating the plugin
typedef QString icon_t();

//! Typedef for getting the experimental status without instantiating the plugin
typedef QString experimental_t();

#endif //qgisplugin_h

0 comments on commit 3ce742d

Please sign in to comment.
You can’t perform that action at this time.