File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -310,6 +310,7 @@ void QgsPluginManager::getCppPluginDescriptions()
310310 category_t *pCat = ( category_t * ) cast_to_fptr ( myLib->resolve ( " category" ) );
311311 version_t *pVersion = ( version_t * ) cast_to_fptr ( myLib->resolve ( " version" ) );
312312 icon_t * pIcon = ( icon_t * ) cast_to_fptr ( myLib->resolve ( " icon" ) );
313+ experimental_t *pExperimental = ( experimental_t * ) cast_to_fptr ( myLib->resolve ( " experimental" ) );
313314
314315 // show the values (or lack of) for each function
315316 if ( pName )
@@ -370,6 +371,7 @@ void QgsPluginManager::getCppPluginDescriptions()
370371 metadata[" pythonic" ] = " false" ;
371372 metadata[" installed" ] = " true" ;
372373 metadata[" readonly" ] = " true" ;
374+ metadata[" experimental" ] = ( pExperimental ? pExperimental () : QString () );
373375 mPlugins .insert ( baseName, metadata );
374376
375377 delete myLib;
Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ static const QString sDescription = QObject::tr( "Overlay data on a 3D globe" );
7171static const QString sCategory = QObject::tr( " Plugins" );
7272static const QString sPluginVersion = QObject::tr( " Version 0.1" );
7373static const QgisPlugin::PLUGINTYPE sPluginType = QgisPlugin::UI;
74+ static const QString sExperimental = QString( " true" );
7475
7576
7677// constructor
@@ -1198,6 +1199,12 @@ QGISEXTERN QString version()
11981199 return sPluginVersion ;
11991200}
12001201
1202+ // Return the experimental status for the plugin
1203+ QGISEXTERN QString experimental ()
1204+ {
1205+ return sExperimental ;
1206+ }
1207+
12011208// Delete ourself
12021209QGISEXTERN void unload ( QgisPlugin * thePluginPointer )
12031210{
Original file line number Diff line number Diff line change @@ -201,5 +201,7 @@ typedef QString version_t();
201201// ! Typedef for getting the plugin icon file name without instantiating the plugin
202202typedef QString icon_t ();
203203
204+ // ! Typedef for getting the experimental status without instantiating the plugin
205+ typedef QString experimental_t ();
204206
205207#endif // qgisplugin_h
You can’t perform that action at this time.
0 commit comments