r25525: #16968: Fix build error caused by conversion between void pointer and function pointer https://bugs.scribus.net/view.php?id=16968 --- scribus/pluginmanager.cpp (revision 25524) +++ scribus/pluginmanager.cpp (revision 25525) @@ -77,13 +77,13 @@ return lib; } -void* PluginManager::resolveSym(void* plugin, const char* sym) +QFunctionPointer PluginManager::resolveSym(void* plugin, const char* sym) { - void* symAddr = nullptr; + QFunctionPointer symAddr = nullptr; #ifdef HAVE_DLFCN_H const char* error; dlerror(); - symAddr = dlsym(plugin, sym); + symAddr = (QFunctionPointer) dlsym(plugin, sym); if ((error = dlerror()) != nullptr) { qDebug("%s", tr("Cannot find symbol (%1)", "plugin manager").arg(error).toLocal8Bit().data()); @@ -90,7 +90,7 @@ symAddr = nullptr; } #elif defined(DLL_USE_NATIVE_API) && defined(_WIN32) - symAddr = (void* ) GetProcAddress((HMODULE) plugin, sym); + symAddr = (QFunctionPointer) GetProcAddress((HMODULE) plugin, sym); if (symAddr == nullptr) qDebug("%s", tr("Cannot find symbol (%1)", "plugin manager").arg(sym).toLocal8Bit().data()); #else --- scribus/pluginmanager.h (revision 25524) +++ scribus/pluginmanager.h (revision 25525) @@ -7,6 +7,7 @@ #ifndef _PLUGIN_MANAGER_ #define _PLUGIN_MANAGER_ +#include #include #include #include @@ -44,7 +45,7 @@ These methods are platform independent, but each platform uses a different implementation. */ static void* loadDLL(const QString& plugin); - static void* resolveSym( void* plugin, const char* sym ); + static QFunctionPointer resolveSym(void* plugin, const char* sym); static void unloadDLL( void* plugin ); /*! \brief Initialization of all plugins. It's called at scribus start.