41 QString pythonlibName( QStringLiteral(
"qgispython" ) );
46 pythonlibName.prepend(
"lib" );
50 QLibrary pythonlib( pythonlibName, version );
53 pythonlib.setLoadHints( QLibrary::ResolveAllSymbolsHint | QLibrary::ExportExternalSymbolsHint );
54 if ( !pythonlib.load() )
56 pythonlib.setFileName( pythonlibName );
57 if ( !pythonlib.load() )
65 typedef QgsPythonUtils*( *inst )();
66 inst pythonlib_inst = ( inst )
cast_to_fptr( pythonlib.resolve(
"instance" ) );
67 if ( !pythonlib_inst )
70 QgsDebugError( QStringLiteral(
"Couldn't resolve python support library's instance() symbol." ) );
74 QgsDebugMsgLevel( QStringLiteral(
"Python support library's instance() symbol resolved." ), 2 );
87 QgsDebugError( QStringLiteral(
"Python support FAILED :-(" ) );
93 bool atLeastOneEnabled =
false;
95 const auto constPluginList(
sPythonUtils->pluginList() );
96 for (
const QString &pluginName : constPluginList )
98 const QString pluginService =
sPythonUtils->getPluginMetadata( pluginName, QStringLiteral(
"server" ) );
99 if ( pluginService == QLatin1String(
"True" ) )
105 atLeastOneEnabled =
true;
static void logMessage(const QString &message, const QString &tag=QString(), Qgis::MessageLevel level=Qgis::MessageLevel::Warning, bool notifyUser=true)
Adds a message to the log instance (and creates it if necessary).