summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qeventdispatcher_pepper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qeventdispatcher_pepper.cpp')
-rw-r--r--src/gui/kernel/qeventdispatcher_pepper.cpp25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/gui/kernel/qeventdispatcher_pepper.cpp b/src/gui/kernel/qeventdispatcher_pepper.cpp
index 7fe8a6167d..c1b9b05c26 100644
--- a/src/gui/kernel/qeventdispatcher_pepper.cpp
+++ b/src/gui/kernel/qeventdispatcher_pepper.cpp
@@ -78,9 +78,32 @@ bool QEventDispatcherPepper::hasPepperSupport()
return hasSupport;
}
+extern "C" {
+NPError NP_Initialize(NPNetscapeFuncs* browser_funcs,
+ NPPluginFuncs* plugin_funcs);
+NPError NP_GetEntryPoints(NPPluginFuncs* plugin_funcs);
+NPError NP_Shutdown();
+NPError NP_GetValue(void* instance, NPPVariable variable, void* value);
+char* NP_GetMIMEDescription();
+}
+
QEventDispatcherPepper::QEventDispatcherPepper(QObject *parent)
: QEventDispatcherUNIX(*new QEventDispatcherPepperPrivate, parent)
-{ }
+{
+
+ // Reference the NP entry points without actually calling
+ // them at run-time. This is neccasary to make sure they
+ // are not removed by the optimizer.
+ // ### must be a better way...
+ volatile bool val = false;
+ if (val) {
+ NP_Initialize(0,0);
+ NP_GetEntryPoints(0);
+ NP_Shutdown();
+ NP_GetValue(0, NPPVariable(), 0);
+ NP_GetMIMEDescription();
+ }
+}
QEventDispatcherPepper::~QEventDispatcherPepper()
{ }