Permalink
Browse files

load plugs for mac - cast

  • Loading branch information...
1 parent 283ac07 commit 3d81d520a7d59329a8783fa72d941373a6d5d0dd subik committed Nov 28, 2010
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/app/PluginManager.cpp
@@ -94,6 +94,7 @@ Juff::ToolBarList PluginManager::toolbars() const {
#include "EditorSettings.h"
void PluginManager::loadPlugin(const QString& path, SettingsDlg* dlg) {
+ Log::warning(path);
QPluginLoader loader(path);
if ( !loader.load() ) {
Log::warning(QString("Plugin '%1' was NOT loaded: %2").arg(path).arg(loader.errorString()));
@@ -102,7 +103,12 @@ void PluginManager::loadPlugin(const QString& path, SettingsDlg* dlg) {
QObject *obj = loader.instance();
if ( obj ) {
+#ifdef Q_WS_MAC
+ // qobject_cast dows not work on mac
+ JuffPlugin* plugin = dynamic_cast<JuffPlugin*>(obj);
+#else
JuffPlugin* plugin = qobject_cast<JuffPlugin*>(obj);
+#endif
if ( plugin ) {
// Check if we need to load it

0 comments on commit 3d81d52

Please sign in to comment.