[SCM] eclipse-cdt-qt packaging branch, master, updated. upstream/1.6.1-9-ga20afb4

Jakub Adam jakub.adam at ktknet.cz
Tue Jan 17 21:02:00 UTC 2012


The following commit has been merged in the master branch:
commit 9570bf2250ba2f2f45349d503e7521b724288a3b
Author: Jakub Adam <jakub.adam at ktknet.cz>
Date:   Mon Jan 16 23:28:27 2012 +0100

    Split custom-build.patch into smaller parts and describe changes made

diff --git a/debian/patches/custom-build.patch b/debian/patches/custom-build.patch
index 569e46b..fadbbee 100644
--- a/debian/patches/custom-build.patch
+++ b/debian/patches/custom-build.patch
@@ -1,42 +1,36 @@
 From: Jakub Adam <jakub.adam at ktknet.cz>
-Date: Tue, 3 Jan 2012 01:54:27 +0100
+Date: Tue, 17 Jan 2012 19:37:34 +0100
 Subject: custom-build
 
+Changes made:
+
+* be verbose during build
+* do not require one specific Qt version (4.6.1)
+* support more architectures than x86 and amd64 (do not hardcode ECLIPSEARCH
+  variable but check before build)
+* do not create platform specific com.trolltech.qtcppdesigner.linux.x86 and
+  com.trolltech.qtcppproject.linux.x86 bundles, move JNI libs contained there
+  to /usr/lib/<arch>/jni and java sources to com.trolltech.qtcppdesigner +
+  com.trolltech.qtcppproject; this should make build on additional platforms
+  straightforward.
 ---
- build.sh                                           |   32 ++---
- com.trolltech.qtcpp.feature/feature.xml            |   67 +--------
- com.trolltech.qtcpp/META-INF/MANIFEST.MF           |    1 -
- com.trolltech.qtcpp/build.xml                      |   13 +-
- com.trolltech.qtcppdesigner.qtcpp/build.xml        |   13 +-
- com.trolltech.qtcppdesigner/META-INF/MANIFEST.MF   |    2 -
- com.trolltech.qtcppdesigner/build.xml              |   15 ++-
- com.trolltech.qtcppintegrationhelp/build.xml       |   13 +-
- com.trolltech.qtcppproject/META-INF/MANIFEST.MF    |    2 -
- com.trolltech.qtcppproject/build.xml               |   15 ++-
- qswt/designer/formeditorw.cpp                      |  161 +-------------------
- .../designer/qtcppdesigner/java/ActionEditorW.java |   14 +--
- .../qtcppdesigner/java/DesignerBridgeW.java        |   14 +--
- qswt/designer/qtcppdesigner/java/FormWindowW.java  |   14 +--
- .../qtcppdesigner/java/ObjectInspectorW.java       |   14 +--
- .../qtcppdesigner/java/PropertyEditorW.java        |   14 +--
- .../qtcppdesigner/java/ResourceEditorW.java        |   14 +--
- .../qtcppdesigner/java/SignalSlotEditorW.java      |   14 +--
- qswt/designer/qtcppdesigner/java/WidgetBoxW.java   |   14 +--
- qswt/designer/qtcppdesigner/qtcppdesigner.cpp      |    8 +
- qswt/designer/qtcppdesigner/qtcppdesigner.pro      |    3 +-
- qswt/designer/qtcppdesigner/qtcppdesigner_inc.pri  |    1 -
- qswt/designer/widgetboxw.cpp                       |   16 +--
- qswt/proparser/qtcppproparser/qtcppproparser.cpp   |    8 +
- qswt/proparser/qtcppproparser/qtcppproparser.pro   |    3 +-
- .../qtcppproparser/qtcppproparser_inc.pri          |    1 -
- qswt/qrceditor/qtcppqrceditor/qtcppqrceditor.cpp   |    8 +
- qswt/qrceditor/qtcppqrceditor/qtcppqrceditor.pro   |    3 +-
- .../qtcppqrceditor/qtcppqrceditor_inc.pri          |    1 -
- qswt/shared/common.pri                             |   15 +--
- 30 files changed, 133 insertions(+), 380 deletions(-)
+ build.sh                                         |   27 ++------
+ com.trolltech.qtcpp.feature/feature.xml          |   68 +---------------------
+ com.trolltech.qtcpp/META-INF/MANIFEST.MF         |    1 -
+ com.trolltech.qtcpp/build.xml                    |   13 +++--
+ com.trolltech.qtcppdesigner.qtcpp/build.xml      |   13 +++--
+ com.trolltech.qtcppdesigner/META-INF/MANIFEST.MF |    2 -
+ com.trolltech.qtcppdesigner/build.xml            |   15 +++--
+ com.trolltech.qtcppintegrationhelp/build.xml     |   13 +++--
+ com.trolltech.qtcppproject/META-INF/MANIFEST.MF  |    2 -
+ com.trolltech.qtcppproject/build.xml             |   15 +++--
+ qswt/designer/qtcppdesigner/qtcppdesigner.pro    |    3 +-
+ qswt/proparser/qtcppproparser/qtcppproparser.pro |    3 +-
+ qswt/qrceditor/qtcppqrceditor/qtcppqrceditor.pro |    3 +-
+ 13 files changed, 58 insertions(+), 120 deletions(-)
 
 diff --git a/build.sh b/build.sh
-index e990bee..54494e3 100755
+index e990bee..f2029c0 100755
 --- a/build.sh
 +++ b/build.sh
 @@ -1,12 +1,10 @@
@@ -52,7 +46,7 @@ index e990bee..54494e3 100755
  grep glib ${QTDIR}/lib/pkgconfig/QtGui*.pc > /dev/null || { echo Qt seems to be configured without glib support, but glib is needed for the Eclipse Integration ; exit ; }
  test -r ${JAVADIR}/include/jni.h || { echo Couldn\'t find \$\{JAVADIR\}/include/jni.h - wrong JAVADIR variable? ; exit ; }
  test -r ${JAVADIR}/lib/tools.jar || { echo Couldn\'t find \$\{JAVADIR\}/lib/tools.jar - wrong JAVADIR variable? ; exit ; }
-@@ -14,35 +12,33 @@ ls -1 ${ECLIPSEDIR}/plugins/ |grep "org[.]eclipse[.]cdt.*[.]jar" > /dev/null ||
+@@ -14,35 +12,24 @@ ls -1 ${ECLIPSEDIR}/plugins/ |grep "org[.]eclipse[.]cdt.*[.]jar" > /dev/null ||
  
  echo Building native components...
  cd qswt/
@@ -84,39 +78,33 @@ index e990bee..54494e3 100755
  cp com.trolltech.qtcppdesigner/*.jar eclipse/plugins || exit
 -unzip -q -o com.trolltech.qtcppdesigner.linux.x86/*.zip -d eclipse/plugins || exit
 -cp -r com.trolltech.qtcppdesignerplugins.linux.x86 eclipse/plugins || exit
-+#unzip -q -o com.trolltech.qtcppdesigner.linux.x86/*.zip -d eclipse/plugins || exit
-+#cp -r com.trolltech.qtcppdesignerplugins.linux.x86 eclipse/plugins || exit
  cp com.trolltech.qtcppdesigner.qtcpp/*.jar eclipse/plugins || exit
  cp -r com.trolltech.qtcpp.feature eclipse/features/com.trolltech.qtcpp.feature_1.6.1 || exit
  cp com.trolltech.qtcppintegrationhelp/*.jar eclipse/plugins || exit
 -cp -r com.trolltech.qtcppintegrationhelp.examples eclipse/plugins/com.trolltech.qtcppintegrationhelp.examples_1.6.1 || exit
 -cp -r com.trolltech.qtcpp.linux.x86 eclipse/plugins/com.trolltech.qtcpp.linux.x86_4.6.1 || exit
-+#cp -r com.trolltech.qtcppintegrationhelp.examples eclipse/plugins/com.trolltech.qtcppintegrationhelp.examples_1.6.1 || exit
-+#cp -r com.trolltech.qtcpp.linux.x86 eclipse/plugins/com.trolltech.qtcpp.linux.x86_4.6.1 || exit
  cp com.trolltech.qtcppproject/*.jar eclipse/plugins || exit
 -unzip -q -o com.trolltech.qtcppproject.linux.x86/*.zip -d eclipse/plugins || exit
-+#unzip -q -o com.trolltech.qtcppproject.linux.x86/*.zip -d eclipse/plugins || exit
- 
+-
 -mkdir -p eclipse/plugins/com.trolltech.qtcpp.linux.x86_4.6.1/lib || exit
 -ln -sf $QTDIR/lib/*.so* eclipse/plugins/com.trolltech.qtcpp.linux.x86_4.6.1/lib || exit
-+#mkdir -p eclipse/plugins/com.trolltech.qtcpp.linux.x86_4.6.1/lib || exit
-+#ln -sf $QTDIR/lib/*.so* eclipse/plugins/com.trolltech.qtcpp.linux.x86_4.6.1/lib || exit
- 
+-
 diff --git a/com.trolltech.qtcpp.feature/feature.xml b/com.trolltech.qtcpp.feature/feature.xml
-index a5baba0..0831947 100644
+index a5baba0..f9fc885 100644
 --- a/com.trolltech.qtcpp.feature/feature.xml
 +++ b/com.trolltech.qtcpp.feature/feature.xml
-@@ -5,8 +5,7 @@
+@@ -4,9 +4,7 @@
+       label="Qt Eclipse integration"
        version="1.6.1"
        provider-name="Nokia Corporation"
-       plugin="com.trolltech.qtcpp"
+-      plugin="com.trolltech.qtcpp"
 -      os="linux,win32"
 -      arch="x86,x86_64">
-+      os="linux,win32">
++      plugin="com.trolltech.qtcpp">
  
     <description url="http://www.qtsoftware.com/developer/eclipse-integration">
        The Qt integration is built on top of the CDT plugin which introduces C/C++ development functionality to Eclipse. The CDT offers a complete C++ code editor with syntax highlighting and code completion as well as a very sophisticated debugger integration based on gdb. With its general makefile generator it supports virtually all compilers to build C/C++ applications. On top of those basic C++ development features, the Qt Eclipse integration adds special functionality for handling Qt projects and ensuring a successful build process.
-@@ -561,50 +560,6 @@ That's all there is to it!
+@@ -561,50 +559,6 @@ That's all there is to it!
           version="1.6.1"/>
  
     <plugin
@@ -167,7 +155,7 @@ index a5baba0..0831947 100644
           id="com.trolltech.qtcppdesigner.qtcpp"
           download-size="0"
           install-size="0"
-@@ -617,24 +572,4 @@ That's all there is to it!
+@@ -617,24 +571,4 @@ That's all there is to it!
           install-size="0"
           version="1.6.1"/>
  
@@ -477,425 +465,6 @@ index f17443d..bc095e1 100644
  		<delete file="${plugin.destination}/${plugin.name}_${plugin.version}.jar"/>
  		<delete file="${plugin.destination}/${plugin.name}_${plugin.version}.zip"/>
  		<delete dir="${temp.folder}"/>
-diff --git a/qswt/designer/formeditorw.cpp b/qswt/designer/formeditorw.cpp
-index eaea13f..dd50ea6 100644
---- a/qswt/designer/formeditorw.cpp
-+++ b/qswt/designer/formeditorw.cpp
-@@ -28,9 +28,7 @@
- 
- #include <QtDesigner/QDesignerCustomWidgetInterface>
- #include <QtDesigner/abstractformwindowcursor.h>
--#include <QtDesigner/private/qdesigner_integration_p.h>
- #include <QtDesigner/private/qdesigner_formbuilder_p.h>
--#include <QtDesigner/private/pluginmanager_p.h>
- #include "abstractformeditorplugin.h"
- 
- #include "propertyeditorw.h"
-@@ -99,12 +97,6 @@ void FormEditorW::initPlugins()
-     QDesignerComponents::initializePlugins(formEditor());
-     initializeCorePlugins();
-     emit updateCustomWidgetPlugins();
--    QDesignerPluginManager *pluginManager = m_formeditor->pluginManager();
--    QStringList failedPlugins = pluginManager->failedPlugins();
--    if (!failedPlugins.isEmpty())
--        m_pluginFailureString = "";
--    foreach (QString plugin, failedPlugins)
--        m_pluginFailureString += plugin + ": " + pluginManager->failureReason(plugin) + "\n";
- }
- 
- QString FormEditorW::pluginFailureString() const
-@@ -114,159 +106,22 @@ QString FormEditorW::pluginFailureString() const
- 
- void FormEditorW::setPluginPath(const QString &pluginPath)
- {
--    QDesignerPluginManager *pluginManager = m_formeditor->pluginManager();
--    QStringList pluginPaths = pluginManager->pluginPaths();
--    pluginPaths.append(pluginPath);
--    pluginManager->setPluginPaths(pluginPaths);
--    pluginManager->ensureInitialized();
-+	Q_UNUSED(pluginPath)
-     initPlugins();
- }
- 
- bool FormEditorW::initializeJambiPlugins(const QString &pluginPath, const QString &jambiPluginPath,
-                                          const QString &customWidgetClassPath, const QString &resourcePath, const QString &jvm) {
--    QDesignerPluginManager *pluginManager = m_formeditor->pluginManager();
-+	Q_UNUSED(pluginPath)
-+	Q_UNUSED(customWidgetClassPath)
-+	Q_UNUSED(resourcePath)
-+	Q_UNUSED(jvm)
-+	
-+	m_jambiPluginPath = jambiPluginPath;
- 
--    QStringList pluginPaths = pluginManager->pluginPaths();
--    if (!m_jambiPluginPath.isEmpty())
--        pluginPaths.removeAll(m_jambiPluginPath);
--
--    {
--        QStringList dllsToLoad;
--
--        QStringList qtDlls;
--        /*qtDlls << QString::fromLatin1("QtCore")
--               << QString::fromLatin1("QtGui")
--               << QString::fromLatin1("QtXml")
--               << QString::fromLatin1("QtDesigner")
--               << QString::fromLatin1("QtDesignerComponents");*/
--
--#if defined(QT_DEBUG)
--
--#  if defined(Q_OS_WIN)
--        foreach (QString dll, qtDlls)
--            dllsToLoad << (dll + QString::fromLatin1("d4"));
--
--        QString qtjambi_lib = QString::fromLatin1("qtjambi_debuglib");
--        dllsToLoad << qtjambi_lib;
--#  elif defined(Q_WS_MAC) // Q_OS_WIN
--        foreach (QString dll, qtDlls)
--            dllsToLoad << (QString::fromLatin1("lib") + dll + QString::fromLatin1("_debug"));
--
--        QString qtjambi_lib = QString::fromLatin1("libqtjambi_debuglib");
--        dllsToLoad << qtjambi_lib;
--#  elif defined(Q_OS_LINUX) // Q_WS_MAC
--        foreach (QString dll, qtDlls)
--            dllsToLoad << (QString::fromLatin1("lib") + dll);
--
--        QString qtjambi_lib = QString::fromLatin1("libqtjambi_debuglib");
--        dllsToLoad << qtjambi_lib;
--#  endif // Q_OS_LINUX
--
--#else // QT_DEBUG
--
--#  if defined(Q_OS_WIN)
--        foreach (QString dll, qtDlls)
--            dllsToLoad << (dll + QString::fromLatin1("4"));
--
--        QString qtjambi_lib = QString::fromLatin1("qtjambi");
--        dllsToLoad << qtjambi_lib;
--#  elif defined(Q_WS_MAC) // Q_OS_WIN
--        foreach (QString dll, qtDlls)
--            dllsToLoad << (QString::fromLatin1("lib") + dll);
--
--        QString qtjambi_lib = QString::fromLatin1("libqtjambi");
--        dllsToLoad << qtjambi_lib;
--#  elif defined(Q_OS_LINUX) // Q_WS_MAC
--        foreach (QString dll, qtDlls)
--            dllsToLoad << (QString::fromLatin1("lib") + dll);
--
--        QString qtjambi_lib = QString::fromLatin1("libqtjambi");
--        dllsToLoad << qtjambi_lib;
--#  endif // Q_OS_LINUX
--
--#endif // QT_DEBUG
--
--
--#if defined(Q_WS_MAC)
--        QString dllPath = QFileInfo(QString(pluginPath).replace('\\', '/')).absoluteFilePath() + QLatin1String("/lib/");
--#elif defined(Q_OS_LINUX)
--        QString dllPath = QFileInfo(QString(pluginPath).replace('\\', '/')).absoluteFilePath() + QLatin1String("/lib/");
--#else
--        QString dllPath = QFileInfo(QString(pluginPath).replace('\\', '/')).absoluteFilePath() + QLatin1String("/bin/");
--#endif
--
--        foreach (QString dll, dllsToLoad) {
--
--            if (!QLibrary(dll).isLoaded()) {
--                QLibrary *lib = new QLibrary(dllPath + dll, this);
--                lib->setLoadHints(QLibrary::ResolveAllSymbolsHint);
--                lib->load();
--
--                if (!lib->isLoaded()) {
--                    qWarning("QtJambi plugin failed to load required library '%s'", qPrintable(dllPath + dll));
--                } else if (dll == qtjambi_lib) {
--                    typedef void (*SetJVMHintFunction)(const QString&);
--
--                    SetJVMHintFunction func = (SetJVMHintFunction) lib->resolve("qtjambi_set_vm_location_override");
--                    Q_ASSERT_X(func,
--                        "FormEditorW::initializeJambiPlugins",
--                        "no set vm location override function.");
--                    func(jvm);
--                }
--            }
--        }
--    }
--
--    m_jambiPluginPath = jambiPluginPath;
--    pluginPaths.append(m_jambiPluginPath);
--    pluginManager->setPluginPaths(pluginPaths);
--
--    QStringList registeredPlugins = pluginManager->registeredPlugins();
--
--    int plugins_found = 0;
--    foreach (QString registeredPlugin, registeredPlugins) {
--        QObject *plugin = pluginManager->instance(registeredPlugin);
--
--
--        if (QDesignerFormEditorPluginInterface *formEditorPlugin = qobject_cast<QDesignerFormEditorPluginInterface*>(plugin)) {
--            plugins_found++;
--            if (!formEditorPlugin->isInitialized())
--                formEditorPlugin->initialize(formEditor());
--        }
--    }
--
--    pluginManager->ensureInitialized();
-     initPlugins();
- 
--    if (plugins_found >= 1) {
--        plugins_found = 0;
--
--        {
--            ResourceEditorW *resourceEditor = ResourceEditorW::instance();
--            if (resourceEditor != 0) {
--                resourceEditor->updateResources(resourcePath);
--                plugins_found++;
--            }
--        }
--
--        {
--            WidgetBoxW *widgetBox = WidgetBoxW::instance();
--            if (widgetBox != 0) {
--                widgetBox->updateCustomWidgetLocation(customWidgetClassPath);
--                plugins_found++;
--            }
--        }
--    } else {
--        qWarning("Couldn't find all classes for Jambi plugins");
--    }
--
--    // Return false if both plugins were not found/not initialized
--    if (plugins_found < 2) {
--        qWarning("Couldn't update resource browser and widget box");
--        return false;
--    } else {
--        return true;
--    }
-+    return true;
- }
- 
- void FormEditorW::setupPreviewActions()
-diff --git a/qswt/designer/qtcppdesigner/java/ActionEditorW.java b/qswt/designer/qtcppdesigner/java/ActionEditorW.java
-index fe79f58..b098516 100644
---- a/qswt/designer/qtcppdesigner/java/ActionEditorW.java
-+++ b/qswt/designer/qtcppdesigner/java/ActionEditorW.java
-@@ -43,16 +43,10 @@ public class ActionEditorW extends Composite
-                 m.invoke(null, new Object[] { this });
-             }
-         } catch (Throwable t) {
--            Bundle pluginBundle = Platform.getBundle("com.trolltech.qtcppdesigner."+Platform.getOS()+"."+Platform.getOSArch());
--            if (pluginBundle != null) {
--                try {
--                    String path = FileLocator.toFileURL(FileLocator.find(pluginBundle, new org.eclipse.core.runtime.Path("lib/libqtcppdesigner.so"), null)).getPath();
--                    System.load(path);
--                } catch (IOException ex) {
--                    ex.printStackTrace();
--                } catch (UnsatisfiedLinkError ex) {
--                    ex.printStackTrace();
--                }
-+            try {
-+                System.loadLibrary("qtcppdesigner");
-+            } catch (UnsatisfiedLinkError ex) {
-+                ex.printStackTrace();
-             }
-         }
- 
-diff --git a/qswt/designer/qtcppdesigner/java/DesignerBridgeW.java b/qswt/designer/qtcppdesigner/java/DesignerBridgeW.java
-index 4483f99..41222dd 100644
---- a/qswt/designer/qtcppdesigner/java/DesignerBridgeW.java
-+++ b/qswt/designer/qtcppdesigner/java/DesignerBridgeW.java
-@@ -43,16 +43,10 @@ public class DesignerBridgeW extends Composite
-                 m.invoke(null, new Object[] { this });
-             }
-         } catch (Throwable t) {
--            Bundle pluginBundle = Platform.getBundle("com.trolltech.qtcppdesigner."+Platform.getOS()+"."+Platform.getOSArch());
--            if (pluginBundle != null) {
--                try {
--                    String path = FileLocator.toFileURL(FileLocator.find(pluginBundle, new org.eclipse.core.runtime.Path("lib/libqtcppdesigner.so"), null)).getPath();
--                    System.load(path);
--                } catch (IOException ex) {
--                    ex.printStackTrace();
--                } catch (UnsatisfiedLinkError ex) {
--                    ex.printStackTrace();
--                }
-+            try {
-+                System.loadLibrary("qtcppdesigner");
-+            } catch (UnsatisfiedLinkError ex) {
-+                ex.printStackTrace();
-             }
-         }
- 
-diff --git a/qswt/designer/qtcppdesigner/java/FormWindowW.java b/qswt/designer/qtcppdesigner/java/FormWindowW.java
-index d24629f..69971e7 100644
---- a/qswt/designer/qtcppdesigner/java/FormWindowW.java
-+++ b/qswt/designer/qtcppdesigner/java/FormWindowW.java
-@@ -44,16 +44,10 @@ public class FormWindowW extends Composite
-                 m.invoke(null, new Object[] { this });
-             }
-         } catch (Throwable t) {
--            Bundle pluginBundle = Platform.getBundle("com.trolltech.qtcppdesigner."+Platform.getOS()+"."+Platform.getOSArch());
--            if (pluginBundle != null) {
--                try {
--                    String path = FileLocator.toFileURL(FileLocator.find(pluginBundle, new org.eclipse.core.runtime.Path("lib/libqtcppdesigner.so"), null)).getPath();
--                    System.load(path);
--                } catch (IOException ex) {
--                    ex.printStackTrace();
--                } catch (UnsatisfiedLinkError ex) {
--                    ex.printStackTrace();
--                }
-+            try {
-+                System.loadLibrary("qtcppdesigner");
-+            } catch (UnsatisfiedLinkError ex) {
-+                ex.printStackTrace();
-             }
-         }
- 
-diff --git a/qswt/designer/qtcppdesigner/java/ObjectInspectorW.java b/qswt/designer/qtcppdesigner/java/ObjectInspectorW.java
-index af6f254..11d2d21 100644
---- a/qswt/designer/qtcppdesigner/java/ObjectInspectorW.java
-+++ b/qswt/designer/qtcppdesigner/java/ObjectInspectorW.java
-@@ -43,16 +43,10 @@ public class ObjectInspectorW extends Composite
-                 m.invoke(null, new Object[] { this });
-             }
-         } catch (Throwable t) {
--            Bundle pluginBundle = Platform.getBundle("com.trolltech.qtcppdesigner."+Platform.getOS()+"."+Platform.getOSArch());
--            if (pluginBundle != null) {
--                try {
--                    String path = FileLocator.toFileURL(FileLocator.find(pluginBundle, new org.eclipse.core.runtime.Path("lib/libqtcppdesigner.so"), null)).getPath();
--                    System.load(path);
--                } catch (IOException ex) {
--                    ex.printStackTrace();
--                } catch (UnsatisfiedLinkError ex) {
--                    ex.printStackTrace();
--                }
-+            try {
-+                System.loadLibrary("qtcppdesigner");
-+            } catch (UnsatisfiedLinkError ex) {
-+                ex.printStackTrace();
-             }
-         }
- 
-diff --git a/qswt/designer/qtcppdesigner/java/PropertyEditorW.java b/qswt/designer/qtcppdesigner/java/PropertyEditorW.java
-index 80b81aa..c4c9813 100644
---- a/qswt/designer/qtcppdesigner/java/PropertyEditorW.java
-+++ b/qswt/designer/qtcppdesigner/java/PropertyEditorW.java
-@@ -43,16 +43,10 @@ public class PropertyEditorW extends Composite
-                 m.invoke(null, new Object[] { this });
-             }
-         } catch (Throwable t) {
--            Bundle pluginBundle = Platform.getBundle("com.trolltech.qtcppdesigner."+Platform.getOS()+"."+Platform.getOSArch());
--            if (pluginBundle != null) {
--                try {
--                    String path = FileLocator.toFileURL(FileLocator.find(pluginBundle, new org.eclipse.core.runtime.Path("lib/libqtcppdesigner.so"), null)).getPath();
--                    System.load(path);
--                } catch (IOException ex) {
--                    ex.printStackTrace();
--                } catch (UnsatisfiedLinkError ex) {
--                    ex.printStackTrace();
--                }
-+            try {
-+                System.loadLibrary("qtcppdesigner");
-+            } catch (UnsatisfiedLinkError ex) {
-+                ex.printStackTrace();
-             }
-         }
- 
-diff --git a/qswt/designer/qtcppdesigner/java/ResourceEditorW.java b/qswt/designer/qtcppdesigner/java/ResourceEditorW.java
-index 37ab8b9..ebb504c 100644
---- a/qswt/designer/qtcppdesigner/java/ResourceEditorW.java
-+++ b/qswt/designer/qtcppdesigner/java/ResourceEditorW.java
-@@ -43,16 +43,10 @@ public class ResourceEditorW extends Composite
-                 m.invoke(null, new Object[] { this });
-             }
-         } catch (Throwable t) {
--            Bundle pluginBundle = Platform.getBundle("com.trolltech.qtcppdesigner."+Platform.getOS()+"."+Platform.getOSArch());
--            if (pluginBundle != null) {
--                try {
--                    String path = FileLocator.toFileURL(FileLocator.find(pluginBundle, new org.eclipse.core.runtime.Path("lib/libqtcppdesigner.so"), null)).getPath();
--                    System.load(path);
--                } catch (IOException ex) {
--                    ex.printStackTrace();
--                } catch (UnsatisfiedLinkError ex) {
--                    ex.printStackTrace();
--                }
-+            try {
-+                System.loadLibrary("qtcppdesigner");
-+            } catch (UnsatisfiedLinkError ex) {
-+                ex.printStackTrace();
-             }
-         }
- 
-diff --git a/qswt/designer/qtcppdesigner/java/SignalSlotEditorW.java b/qswt/designer/qtcppdesigner/java/SignalSlotEditorW.java
-index 3ae7876..972aa60 100644
---- a/qswt/designer/qtcppdesigner/java/SignalSlotEditorW.java
-+++ b/qswt/designer/qtcppdesigner/java/SignalSlotEditorW.java
-@@ -43,16 +43,10 @@ public class SignalSlotEditorW extends Composite
-                 m.invoke(null, new Object[] { this });
-             }
-         } catch (Throwable t) {
--            Bundle pluginBundle = Platform.getBundle("com.trolltech.qtcppdesigner."+Platform.getOS()+"."+Platform.getOSArch());
--            if (pluginBundle != null) {
--                try {
--                    String path = FileLocator.toFileURL(FileLocator.find(pluginBundle, new org.eclipse.core.runtime.Path("lib/libqtcppdesigner.so"), null)).getPath();
--                    System.load(path);
--                } catch (IOException ex) {
--                    ex.printStackTrace();
--                } catch (UnsatisfiedLinkError ex) {
--                    ex.printStackTrace();
--                }
-+            try {
-+                System.loadLibrary("qtcppdesigner");
-+            } catch (UnsatisfiedLinkError ex) {
-+                ex.printStackTrace();
-             }
-         }
- 
-diff --git a/qswt/designer/qtcppdesigner/java/WidgetBoxW.java b/qswt/designer/qtcppdesigner/java/WidgetBoxW.java
-index cdbf531..1d27091 100644
---- a/qswt/designer/qtcppdesigner/java/WidgetBoxW.java
-+++ b/qswt/designer/qtcppdesigner/java/WidgetBoxW.java
-@@ -43,16 +43,10 @@ public class WidgetBoxW extends Composite
-                 m.invoke(null, new Object[] { this });
-             }
-         } catch (Throwable t) {
--            Bundle pluginBundle = Platform.getBundle("com.trolltech.qtcppdesigner."+Platform.getOS()+"."+Platform.getOSArch());
--            if (pluginBundle != null) {
--                try {
--                    String path = FileLocator.toFileURL(FileLocator.find(pluginBundle, new org.eclipse.core.runtime.Path("lib/libqtcppdesigner.so"), null)).getPath();
--                    System.load(path);
--                } catch (IOException ex) {
--                    ex.printStackTrace();
--                } catch (UnsatisfiedLinkError ex) {
--                    ex.printStackTrace();
--                }
-+            try {
-+                System.loadLibrary("qtcppdesigner");
-+            } catch (UnsatisfiedLinkError ex) {
-+                ex.printStackTrace();
-             }
-         }
- 
-diff --git a/qswt/designer/qtcppdesigner/qtcppdesigner.cpp b/qswt/designer/qtcppdesigner/qtcppdesigner.cpp
-index 2c83e16..f6f1e49 100644
---- a/qswt/designer/qtcppdesigner/qtcppdesigner.cpp
-+++ b/qswt/designer/qtcppdesigner/qtcppdesigner.cpp
-@@ -33,11 +33,19 @@
- #include <QPalette>
- #include <QColor>
- #include <QFont>
-+
-+/* Prevent "signals" macro expansion inside gdk. */
-+#define signals_tmp signals
-+#undef signals
-+
- #include <gdk/gdkx.h>
- #include <gtk/gtkstyle.h>
- #include <gtk/gtkwidget.h>
- #include <gtk/gtkmain.h>
- 
-+#define signals signals_tmp
-+#undef signals_tmp
-+
- #include "qtcppdesigner.h"
- 
- static pthread_key_t *envKey = 0;
 diff --git a/qswt/designer/qtcppdesigner/qtcppdesigner.pro b/qswt/designer/qtcppdesigner/qtcppdesigner.pro
 index 8b33dc6..b84dc95 100644
 --- a/qswt/designer/qtcppdesigner/qtcppdesigner.pro
@@ -917,76 +486,6 @@ index 8b33dc6..b84dc95 100644
  QMAKE_POST_LINK += $${QMAKE_COPY} $${JAVAFILES_SRC} $${JAVAFILES_DEST}
  
  include(../../shared/designerintegrationv2/designerintegration.pri)|error("designerintegration.pri not found! check out //depot/ide/...")
-diff --git a/qswt/designer/qtcppdesigner/qtcppdesigner_inc.pri b/qswt/designer/qtcppdesigner/qtcppdesigner_inc.pri
-index 0e0527c..bc97d5c 100644
---- a/qswt/designer/qtcppdesigner/qtcppdesigner_inc.pri
-+++ b/qswt/designer/qtcppdesigner/qtcppdesigner_inc.pri
-@@ -22,7 +22,6 @@ INCLUDEPATH += ./ \
- LIBS += -L/usr/X11R6/lib \
-     -L/usr/lib \
-     -lX11 \
--    -lXt \
-     -lgdk-x11-2.0 \
-     -lgtk-x11-2.0
- 
-diff --git a/qswt/designer/widgetboxw.cpp b/qswt/designer/widgetboxw.cpp
-index e366df3..11c46ee 100644
---- a/qswt/designer/widgetboxw.cpp
-+++ b/qswt/designer/widgetboxw.cpp
-@@ -29,8 +29,6 @@
- #include <QtCore/QThread>
- 
- #include <QtDesigner/QDesignerWidgetFactoryInterface>
--#include <QtDesigner/private/pluginmanager_p.h>
--#include <QtDesigner/private/qdesigner_integration_p.h>
- 
- class WidgetBoxUpdateEvent: public QEvent
- {
-@@ -127,19 +125,7 @@ void WidgetBoxW::updateCustomWidgetLocation(const QString &path)
- 
- bool WidgetBoxW::event(QEvent *e)
- {
--    if (e->type() == QEvent::User + 1) {
--        QString path = ((WidgetBoxUpdateEvent *)e)->path();
--        QDesignerPluginManager *pluginManager = FormEditorW::instance()->formEditor()->pluginManager();
--        QStringList registeredPlugins = pluginManager->registeredPlugins();
--        foreach (QString registeredPlugin, registeredPlugins) {
--            QObject *plugin = pluginManager->instance(registeredPlugin);
--            if (QByteArray(plugin->metaObject()->className()) == QByteArray("JambiCustomWidgetCollection")) {
--                QMetaObject::invokeMethod(plugin, "loadPlugins", Q_ARG(QString, path), Q_ARG(QObject *, FormEditorW::instance()->formEditor()->widgetFactory()));
--            }
--        }
--
--        return true;
--    } else if (e->type() == QEvent::User + 2) {
-+    if (e->type() == QEvent::User + 2) {
-         if (qdesigner_internal::QDesignerIntegration *integration =
-                 qobject_cast<qdesigner_internal::QDesignerIntegration *>(FormEditorW::instance()->formEditor()->integration())) {
-             integration->updateCustomWidgetPlugins();
-diff --git a/qswt/proparser/qtcppproparser/qtcppproparser.cpp b/qswt/proparser/qtcppproparser/qtcppproparser.cpp
-index 44336d1..9d46887 100644
---- a/qswt/proparser/qtcppproparser/qtcppproparser.cpp
-+++ b/qswt/proparser/qtcppproparser/qtcppproparser.cpp
-@@ -26,11 +26,19 @@
- #include <QPalette>
- #include <QColor>
- #include <QFont>
-+
-+/* Prevent "signals" macro expansion inside gdk. */
-+#define signals_tmp signals
-+#undef signals
-+
- #include <gdk/gdkx.h>
- #include <gtk/gtkstyle.h>
- #include <gtk/gtkwidget.h>
- #include <gtk/gtkmain.h>
- 
-+#define signals signals_tmp
-+#undef signals_tmp
-+
- #include "qtcppproparser.h"
- 
- static pthread_key_t *envKey = 0;
 diff --git a/qswt/proparser/qtcppproparser/qtcppproparser.pro b/qswt/proparser/qtcppproparser/qtcppproparser.pro
 index 57c5c3d..e017272 100644
 --- a/qswt/proparser/qtcppproparser/qtcppproparser.pro
@@ -1006,42 +505,6 @@ index 57c5c3d..e017272 100644
  
 +QMAKE_POST_LINK += $${QMAKE_MKDIR} $${JAVAFILES_DEST};
  QMAKE_POST_LINK += $${QMAKE_COPY} $${JAVAFILES_SRC} $${JAVAFILES_DEST}
-diff --git a/qswt/proparser/qtcppproparser/qtcppproparser_inc.pri b/qswt/proparser/qtcppproparser/qtcppproparser_inc.pri
-index f0c8cfe..e7a0454 100644
---- a/qswt/proparser/qtcppproparser/qtcppproparser_inc.pri
-+++ b/qswt/proparser/qtcppproparser/qtcppproparser_inc.pri
-@@ -22,7 +22,6 @@ INCLUDEPATH += ./ \
- LIBS += -L/usr/X11R6/lib \
-     -L/usr/lib \
-     -lX11 \
--    -lXt \
-     -lgdk-x11-2.0 \
-     -lgtk-x11-2.0
- 
-diff --git a/qswt/qrceditor/qtcppqrceditor/qtcppqrceditor.cpp b/qswt/qrceditor/qtcppqrceditor/qtcppqrceditor.cpp
-index 5541029..2730773 100644
---- a/qswt/qrceditor/qtcppqrceditor/qtcppqrceditor.cpp
-+++ b/qswt/qrceditor/qtcppqrceditor/qtcppqrceditor.cpp
-@@ -26,11 +26,19 @@
- #include <QPalette>
- #include <QColor>
- #include <QFont>
-+
-+/* Prevent "signals" macro expansion inside gdk. */
-+#define signals_tmp signals
-+#undef signals
-+
- #include <gdk/gdkx.h>
- #include <gtk/gtkstyle.h>
- #include <gtk/gtkwidget.h>
- #include <gtk/gtkmain.h>
- 
-+#define signals signals_tmp
-+#undef signals_tmp
-+
- #include "qtcppqrceditor.h"
- 
- static pthread_key_t *envKey = 0;
 diff --git a/qswt/qrceditor/qtcppqrceditor/qtcppqrceditor.pro b/qswt/qrceditor/qtcppqrceditor/qtcppqrceditor.pro
 index d3a83b1..c86a54b 100644
 --- a/qswt/qrceditor/qtcppqrceditor/qtcppqrceditor.pro
@@ -1062,40 +525,4 @@ index d3a83b1..c86a54b 100644
 +QMAKE_POST_LINK += $${QMAKE_MKDIR} $${JAVAFILES_DEST};
  QMAKE_POST_LINK += $${QMAKE_COPY} $${JAVAFILES_SRC} $${JAVAFILES_DEST}
  
-diff --git a/qswt/qrceditor/qtcppqrceditor/qtcppqrceditor_inc.pri b/qswt/qrceditor/qtcppqrceditor/qtcppqrceditor_inc.pri
-index dffccce..6c4855f 100644
---- a/qswt/qrceditor/qtcppqrceditor/qtcppqrceditor_inc.pri
-+++ b/qswt/qrceditor/qtcppqrceditor/qtcppqrceditor_inc.pri
-@@ -22,7 +22,6 @@ INCLUDEPATH += ./ \
- LIBS += -L/usr/X11R6/lib \
-     -L/usr/lib \
-     -lX11 \
--    -lXt \
-     -lgdk-x11-2.0 \
-     -lgtk-x11-2.0
- 
-diff --git a/qswt/shared/common.pri b/qswt/shared/common.pri
-index 35598df..d52c9d2 100644
---- a/qswt/shared/common.pri
-+++ b/qswt/shared/common.pri
-@@ -11,16 +11,7 @@ macx {
-         	     \'-Wl,-rpath,\$\$ORIGIN/../../com.trolltech.qtcpp.linux.$$(ECLIPSEARCH)_$${VERSION}/lib:\$\$ORIGIN/../../com.trolltech.qtcpp.linux.$$(ECLIPSEARCH)/lib\'
-         QMAKE_RPATHDIR =
-     }
--}
--
--# compile on suse 9.3
--INCLUDEPATH += /opt/gnome/lib/glib-2.0/include \
--    /opt/gnome/lib/gtk-2.0/include \
--    /opt/gnome/include/atk-1.0 \
--    /opt/gnome/include/glib-2.0 \
--    /opt/gnome/include/gail-1.0 \
--    /opt/gnome/include/gtk-2.0 \
--    /opt/gnome/include/orbit-2.0 \
--    /opt/gnome/include/pango-1.0 \
--    $$PWD
- 
-+    CONFIG += link_pkgconfig
-+    PKGCONFIG += gdk-2.0
-+}
 -- 
diff --git a/debian/patches/dont-link-with-xt.patch b/debian/patches/dont-link-with-xt.patch
new file mode 100644
index 0000000..10d817f
--- /dev/null
+++ b/debian/patches/dont-link-with-xt.patch
@@ -0,0 +1,48 @@
+From: Jakub Adam <jakub.adam at ktknet.cz>
+Date: Mon, 16 Jan 2012 23:01:52 +0100
+Subject: dont-link-with-xt
+
+Linking and dependency on Xt library is not necessary.
+---
+ qswt/designer/qtcppdesigner/qtcppdesigner_inc.pri  |    1 -
+ .../qtcppproparser/qtcppproparser_inc.pri          |    1 -
+ .../qtcppqrceditor/qtcppqrceditor_inc.pri          |    1 -
+ 3 files changed, 0 insertions(+), 3 deletions(-)
+
+diff --git a/qswt/designer/qtcppdesigner/qtcppdesigner_inc.pri b/qswt/designer/qtcppdesigner/qtcppdesigner_inc.pri
+index 0e0527c..bc97d5c 100644
+--- a/qswt/designer/qtcppdesigner/qtcppdesigner_inc.pri
++++ b/qswt/designer/qtcppdesigner/qtcppdesigner_inc.pri
+@@ -22,7 +22,6 @@ INCLUDEPATH += ./ \
+ LIBS += -L/usr/X11R6/lib \
+     -L/usr/lib \
+     -lX11 \
+-    -lXt \
+     -lgdk-x11-2.0 \
+     -lgtk-x11-2.0
+ 
+diff --git a/qswt/proparser/qtcppproparser/qtcppproparser_inc.pri b/qswt/proparser/qtcppproparser/qtcppproparser_inc.pri
+index f0c8cfe..e7a0454 100644
+--- a/qswt/proparser/qtcppproparser/qtcppproparser_inc.pri
++++ b/qswt/proparser/qtcppproparser/qtcppproparser_inc.pri
+@@ -22,7 +22,6 @@ INCLUDEPATH += ./ \
+ LIBS += -L/usr/X11R6/lib \
+     -L/usr/lib \
+     -lX11 \
+-    -lXt \
+     -lgdk-x11-2.0 \
+     -lgtk-x11-2.0
+ 
+diff --git a/qswt/qrceditor/qtcppqrceditor/qtcppqrceditor_inc.pri b/qswt/qrceditor/qtcppqrceditor/qtcppqrceditor_inc.pri
+index dffccce..6c4855f 100644
+--- a/qswt/qrceditor/qtcppqrceditor/qtcppqrceditor_inc.pri
++++ b/qswt/qrceditor/qtcppqrceditor/qtcppqrceditor_inc.pri
+@@ -22,7 +22,6 @@ INCLUDEPATH += ./ \
+ LIBS += -L/usr/X11R6/lib \
+     -L/usr/lib \
+     -lX11 \
+-    -lXt \
+     -lgdk-x11-2.0 \
+     -lgtk-x11-2.0
+ 
+-- 
diff --git a/debian/patches/dont-use-private-designer-headers.patch b/debian/patches/dont-use-private-designer-headers.patch
new file mode 100644
index 0000000..20e83f7
--- /dev/null
+++ b/debian/patches/dont-use-private-designer-headers.patch
@@ -0,0 +1,243 @@
+From: Jakub Adam <jakub.adam at ktknet.cz>
+Date: Tue, 17 Jan 2012 19:32:05 +0100
+Subject: dont-use-private-designer-headers
+
+From source remove usages of private Qt Designer headers that fail to compile
+with current version. These are qdesigner_integration_p.h and pluginmanager_p.h.
+Fortunatelly functionality we have to remove because of this is only required
+when interacting with abandoned QtJambi plugin which we do not intend to package.
+---
+ qswt/designer/formeditorw.cpp |  161 ++---------------------------------------
+ qswt/designer/widgetboxw.cpp  |   16 +----
+ 2 files changed, 9 insertions(+), 168 deletions(-)
+
+diff --git a/qswt/designer/formeditorw.cpp b/qswt/designer/formeditorw.cpp
+index eaea13f..dd50ea6 100644
+--- a/qswt/designer/formeditorw.cpp
++++ b/qswt/designer/formeditorw.cpp
+@@ -28,9 +28,7 @@
+ 
+ #include <QtDesigner/QDesignerCustomWidgetInterface>
+ #include <QtDesigner/abstractformwindowcursor.h>
+-#include <QtDesigner/private/qdesigner_integration_p.h>
+ #include <QtDesigner/private/qdesigner_formbuilder_p.h>
+-#include <QtDesigner/private/pluginmanager_p.h>
+ #include "abstractformeditorplugin.h"
+ 
+ #include "propertyeditorw.h"
+@@ -99,12 +97,6 @@ void FormEditorW::initPlugins()
+     QDesignerComponents::initializePlugins(formEditor());
+     initializeCorePlugins();
+     emit updateCustomWidgetPlugins();
+-    QDesignerPluginManager *pluginManager = m_formeditor->pluginManager();
+-    QStringList failedPlugins = pluginManager->failedPlugins();
+-    if (!failedPlugins.isEmpty())
+-        m_pluginFailureString = "";
+-    foreach (QString plugin, failedPlugins)
+-        m_pluginFailureString += plugin + ": " + pluginManager->failureReason(plugin) + "\n";
+ }
+ 
+ QString FormEditorW::pluginFailureString() const
+@@ -114,159 +106,22 @@ QString FormEditorW::pluginFailureString() const
+ 
+ void FormEditorW::setPluginPath(const QString &pluginPath)
+ {
+-    QDesignerPluginManager *pluginManager = m_formeditor->pluginManager();
+-    QStringList pluginPaths = pluginManager->pluginPaths();
+-    pluginPaths.append(pluginPath);
+-    pluginManager->setPluginPaths(pluginPaths);
+-    pluginManager->ensureInitialized();
++	Q_UNUSED(pluginPath)
+     initPlugins();
+ }
+ 
+ bool FormEditorW::initializeJambiPlugins(const QString &pluginPath, const QString &jambiPluginPath,
+                                          const QString &customWidgetClassPath, const QString &resourcePath, const QString &jvm) {
+-    QDesignerPluginManager *pluginManager = m_formeditor->pluginManager();
++	Q_UNUSED(pluginPath)
++	Q_UNUSED(customWidgetClassPath)
++	Q_UNUSED(resourcePath)
++	Q_UNUSED(jvm)
++	
++	m_jambiPluginPath = jambiPluginPath;
+ 
+-    QStringList pluginPaths = pluginManager->pluginPaths();
+-    if (!m_jambiPluginPath.isEmpty())
+-        pluginPaths.removeAll(m_jambiPluginPath);
+-
+-    {
+-        QStringList dllsToLoad;
+-
+-        QStringList qtDlls;
+-        /*qtDlls << QString::fromLatin1("QtCore")
+-               << QString::fromLatin1("QtGui")
+-               << QString::fromLatin1("QtXml")
+-               << QString::fromLatin1("QtDesigner")
+-               << QString::fromLatin1("QtDesignerComponents");*/
+-
+-#if defined(QT_DEBUG)
+-
+-#  if defined(Q_OS_WIN)
+-        foreach (QString dll, qtDlls)
+-            dllsToLoad << (dll + QString::fromLatin1("d4"));
+-
+-        QString qtjambi_lib = QString::fromLatin1("qtjambi_debuglib");
+-        dllsToLoad << qtjambi_lib;
+-#  elif defined(Q_WS_MAC) // Q_OS_WIN
+-        foreach (QString dll, qtDlls)
+-            dllsToLoad << (QString::fromLatin1("lib") + dll + QString::fromLatin1("_debug"));
+-
+-        QString qtjambi_lib = QString::fromLatin1("libqtjambi_debuglib");
+-        dllsToLoad << qtjambi_lib;
+-#  elif defined(Q_OS_LINUX) // Q_WS_MAC
+-        foreach (QString dll, qtDlls)
+-            dllsToLoad << (QString::fromLatin1("lib") + dll);
+-
+-        QString qtjambi_lib = QString::fromLatin1("libqtjambi_debuglib");
+-        dllsToLoad << qtjambi_lib;
+-#  endif // Q_OS_LINUX
+-
+-#else // QT_DEBUG
+-
+-#  if defined(Q_OS_WIN)
+-        foreach (QString dll, qtDlls)
+-            dllsToLoad << (dll + QString::fromLatin1("4"));
+-
+-        QString qtjambi_lib = QString::fromLatin1("qtjambi");
+-        dllsToLoad << qtjambi_lib;
+-#  elif defined(Q_WS_MAC) // Q_OS_WIN
+-        foreach (QString dll, qtDlls)
+-            dllsToLoad << (QString::fromLatin1("lib") + dll);
+-
+-        QString qtjambi_lib = QString::fromLatin1("libqtjambi");
+-        dllsToLoad << qtjambi_lib;
+-#  elif defined(Q_OS_LINUX) // Q_WS_MAC
+-        foreach (QString dll, qtDlls)
+-            dllsToLoad << (QString::fromLatin1("lib") + dll);
+-
+-        QString qtjambi_lib = QString::fromLatin1("libqtjambi");
+-        dllsToLoad << qtjambi_lib;
+-#  endif // Q_OS_LINUX
+-
+-#endif // QT_DEBUG
+-
+-
+-#if defined(Q_WS_MAC)
+-        QString dllPath = QFileInfo(QString(pluginPath).replace('\\', '/')).absoluteFilePath() + QLatin1String("/lib/");
+-#elif defined(Q_OS_LINUX)
+-        QString dllPath = QFileInfo(QString(pluginPath).replace('\\', '/')).absoluteFilePath() + QLatin1String("/lib/");
+-#else
+-        QString dllPath = QFileInfo(QString(pluginPath).replace('\\', '/')).absoluteFilePath() + QLatin1String("/bin/");
+-#endif
+-
+-        foreach (QString dll, dllsToLoad) {
+-
+-            if (!QLibrary(dll).isLoaded()) {
+-                QLibrary *lib = new QLibrary(dllPath + dll, this);
+-                lib->setLoadHints(QLibrary::ResolveAllSymbolsHint);
+-                lib->load();
+-
+-                if (!lib->isLoaded()) {
+-                    qWarning("QtJambi plugin failed to load required library '%s'", qPrintable(dllPath + dll));
+-                } else if (dll == qtjambi_lib) {
+-                    typedef void (*SetJVMHintFunction)(const QString&);
+-
+-                    SetJVMHintFunction func = (SetJVMHintFunction) lib->resolve("qtjambi_set_vm_location_override");
+-                    Q_ASSERT_X(func,
+-                        "FormEditorW::initializeJambiPlugins",
+-                        "no set vm location override function.");
+-                    func(jvm);
+-                }
+-            }
+-        }
+-    }
+-
+-    m_jambiPluginPath = jambiPluginPath;
+-    pluginPaths.append(m_jambiPluginPath);
+-    pluginManager->setPluginPaths(pluginPaths);
+-
+-    QStringList registeredPlugins = pluginManager->registeredPlugins();
+-
+-    int plugins_found = 0;
+-    foreach (QString registeredPlugin, registeredPlugins) {
+-        QObject *plugin = pluginManager->instance(registeredPlugin);
+-
+-
+-        if (QDesignerFormEditorPluginInterface *formEditorPlugin = qobject_cast<QDesignerFormEditorPluginInterface*>(plugin)) {
+-            plugins_found++;
+-            if (!formEditorPlugin->isInitialized())
+-                formEditorPlugin->initialize(formEditor());
+-        }
+-    }
+-
+-    pluginManager->ensureInitialized();
+     initPlugins();
+ 
+-    if (plugins_found >= 1) {
+-        plugins_found = 0;
+-
+-        {
+-            ResourceEditorW *resourceEditor = ResourceEditorW::instance();
+-            if (resourceEditor != 0) {
+-                resourceEditor->updateResources(resourcePath);
+-                plugins_found++;
+-            }
+-        }
+-
+-        {
+-            WidgetBoxW *widgetBox = WidgetBoxW::instance();
+-            if (widgetBox != 0) {
+-                widgetBox->updateCustomWidgetLocation(customWidgetClassPath);
+-                plugins_found++;
+-            }
+-        }
+-    } else {
+-        qWarning("Couldn't find all classes for Jambi plugins");
+-    }
+-
+-    // Return false if both plugins were not found/not initialized
+-    if (plugins_found < 2) {
+-        qWarning("Couldn't update resource browser and widget box");
+-        return false;
+-    } else {
+-        return true;
+-    }
++    return true;
+ }
+ 
+ void FormEditorW::setupPreviewActions()
+diff --git a/qswt/designer/widgetboxw.cpp b/qswt/designer/widgetboxw.cpp
+index e366df3..11c46ee 100644
+--- a/qswt/designer/widgetboxw.cpp
++++ b/qswt/designer/widgetboxw.cpp
+@@ -29,8 +29,6 @@
+ #include <QtCore/QThread>
+ 
+ #include <QtDesigner/QDesignerWidgetFactoryInterface>
+-#include <QtDesigner/private/pluginmanager_p.h>
+-#include <QtDesigner/private/qdesigner_integration_p.h>
+ 
+ class WidgetBoxUpdateEvent: public QEvent
+ {
+@@ -127,19 +125,7 @@ void WidgetBoxW::updateCustomWidgetLocation(const QString &path)
+ 
+ bool WidgetBoxW::event(QEvent *e)
+ {
+-    if (e->type() == QEvent::User + 1) {
+-        QString path = ((WidgetBoxUpdateEvent *)e)->path();
+-        QDesignerPluginManager *pluginManager = FormEditorW::instance()->formEditor()->pluginManager();
+-        QStringList registeredPlugins = pluginManager->registeredPlugins();
+-        foreach (QString registeredPlugin, registeredPlugins) {
+-            QObject *plugin = pluginManager->instance(registeredPlugin);
+-            if (QByteArray(plugin->metaObject()->className()) == QByteArray("JambiCustomWidgetCollection")) {
+-                QMetaObject::invokeMethod(plugin, "loadPlugins", Q_ARG(QString, path), Q_ARG(QObject *, FormEditorW::instance()->formEditor()->widgetFactory()));
+-            }
+-        }
+-
+-        return true;
+-    } else if (e->type() == QEvent::User + 2) {
++    if (e->type() == QEvent::User + 2) {
+         if (qdesigner_internal::QDesignerIntegration *integration =
+                 qobject_cast<qdesigner_internal::QDesignerIntegration *>(FormEditorW::instance()->formEditor()->integration())) {
+             integration->updateCustomWidgetPlugins();
+-- 
diff --git a/debian/patches/gdk-signals-macro-collision.patch b/debian/patches/gdk-signals-macro-collision.patch
new file mode 100644
index 0000000..e49960f
--- /dev/null
+++ b/debian/patches/gdk-signals-macro-collision.patch
@@ -0,0 +1,86 @@
+From: Jakub Adam <jakub.adam at ktknet.cz>
+Date: Mon, 16 Jan 2012 22:58:24 +0100
+Subject: gdk-signals-macro-collision
+
+In gdk headers there is defined a variable named "signals" which collides
+with Qt's signals macro. Make sure it is not defined when including gdk and
+gtk headers.
+---
+ qswt/designer/qtcppdesigner/qtcppdesigner.cpp    |    8 ++++++++
+ qswt/proparser/qtcppproparser/qtcppproparser.cpp |    8 ++++++++
+ qswt/qrceditor/qtcppqrceditor/qtcppqrceditor.cpp |    8 ++++++++
+ 3 files changed, 24 insertions(+), 0 deletions(-)
+
+diff --git a/qswt/designer/qtcppdesigner/qtcppdesigner.cpp b/qswt/designer/qtcppdesigner/qtcppdesigner.cpp
+index 2c83e16..f6f1e49 100644
+--- a/qswt/designer/qtcppdesigner/qtcppdesigner.cpp
++++ b/qswt/designer/qtcppdesigner/qtcppdesigner.cpp
+@@ -33,11 +33,19 @@
+ #include <QPalette>
+ #include <QColor>
+ #include <QFont>
++
++/* Prevent "signals" macro expansion inside gdk. */
++#define signals_tmp signals
++#undef signals
++
+ #include <gdk/gdkx.h>
+ #include <gtk/gtkstyle.h>
+ #include <gtk/gtkwidget.h>
+ #include <gtk/gtkmain.h>
+ 
++#define signals signals_tmp
++#undef signals_tmp
++
+ #include "qtcppdesigner.h"
+ 
+ static pthread_key_t *envKey = 0;
+diff --git a/qswt/proparser/qtcppproparser/qtcppproparser.cpp b/qswt/proparser/qtcppproparser/qtcppproparser.cpp
+index 44336d1..9d46887 100644
+--- a/qswt/proparser/qtcppproparser/qtcppproparser.cpp
++++ b/qswt/proparser/qtcppproparser/qtcppproparser.cpp
+@@ -26,11 +26,19 @@
+ #include <QPalette>
+ #include <QColor>
+ #include <QFont>
++
++/* Prevent "signals" macro expansion inside gdk. */
++#define signals_tmp signals
++#undef signals
++
+ #include <gdk/gdkx.h>
+ #include <gtk/gtkstyle.h>
+ #include <gtk/gtkwidget.h>
+ #include <gtk/gtkmain.h>
+ 
++#define signals signals_tmp
++#undef signals_tmp
++
+ #include "qtcppproparser.h"
+ 
+ static pthread_key_t *envKey = 0;
+diff --git a/qswt/qrceditor/qtcppqrceditor/qtcppqrceditor.cpp b/qswt/qrceditor/qtcppqrceditor/qtcppqrceditor.cpp
+index 5541029..2730773 100644
+--- a/qswt/qrceditor/qtcppqrceditor/qtcppqrceditor.cpp
++++ b/qswt/qrceditor/qtcppqrceditor/qtcppqrceditor.cpp
+@@ -26,11 +26,19 @@
+ #include <QPalette>
+ #include <QColor>
+ #include <QFont>
++
++/* Prevent "signals" macro expansion inside gdk. */
++#define signals_tmp signals
++#undef signals
++
+ #include <gdk/gdkx.h>
+ #include <gtk/gtkstyle.h>
+ #include <gtk/gtkwidget.h>
+ #include <gtk/gtkmain.h>
+ 
++#define signals signals_tmp
++#undef signals_tmp
++
+ #include "qtcppqrceditor.h"
+ 
+ static pthread_key_t *envKey = 0;
+-- 
diff --git a/debian/patches/gdk-use-pkgconfig.patch b/debian/patches/gdk-use-pkgconfig.patch
new file mode 100644
index 0000000..696bbd4
--- /dev/null
+++ b/debian/patches/gdk-use-pkgconfig.patch
@@ -0,0 +1,35 @@
+From: Jakub Adam <jakub.adam at ktknet.cz>
+Date: Mon, 16 Jan 2012 23:05:53 +0100
+Subject: gdk-use-pkgconfig
+
+Use pkg-config to determine location of gdk headers. Also remove
+hardcoded include paths that are not valid on Debian.
+---
+ qswt/shared/common.pri |   15 +++------------
+ 1 files changed, 3 insertions(+), 12 deletions(-)
+
+diff --git a/qswt/shared/common.pri b/qswt/shared/common.pri
+index 35598df..d52c9d2 100644
+--- a/qswt/shared/common.pri
++++ b/qswt/shared/common.pri
+@@ -11,16 +11,7 @@ macx {
+         	     \'-Wl,-rpath,\$\$ORIGIN/../../com.trolltech.qtcpp.linux.$$(ECLIPSEARCH)_$${VERSION}/lib:\$\$ORIGIN/../../com.trolltech.qtcpp.linux.$$(ECLIPSEARCH)/lib\'
+         QMAKE_RPATHDIR =
+     }
+-}
+-
+-# compile on suse 9.3
+-INCLUDEPATH += /opt/gnome/lib/glib-2.0/include \
+-    /opt/gnome/lib/gtk-2.0/include \
+-    /opt/gnome/include/atk-1.0 \
+-    /opt/gnome/include/glib-2.0 \
+-    /opt/gnome/include/gail-1.0 \
+-    /opt/gnome/include/gtk-2.0 \
+-    /opt/gnome/include/orbit-2.0 \
+-    /opt/gnome/include/pango-1.0 \
+-    $$PWD
+ 
++    CONFIG += link_pkgconfig
++    PKGCONFIG += gdk-2.0
++}
+-- 
diff --git a/debian/patches/load-jni-from-standard-location.patch b/debian/patches/load-jni-from-standard-location.patch
new file mode 100644
index 0000000..0103d4d
--- /dev/null
+++ b/debian/patches/load-jni-from-standard-location.patch
@@ -0,0 +1,220 @@
+From: Jakub Adam <jakub.adam at ktknet.cz>
+Date: Mon, 16 Jan 2012 23:22:36 +0100
+Subject: load-jni-from-standard-location
+
+Replace awkward loading of JNI libraries from platform specific eclipse bundles
+(that we removed in one of previous steps) by simple System.loadLibrary().
+Allows to have simpler layout of installed plugin (only architecture independent
+bundles + native libs in /usr/lib/jni) that remains the same on all architectures.
+---
+ .../designer/qtcppdesigner/java/ActionEditorW.java |   14 ++++----------
+ .../qtcppdesigner/java/DesignerBridgeW.java        |   14 ++++----------
+ qswt/designer/qtcppdesigner/java/FormWindowW.java  |   14 ++++----------
+ .../qtcppdesigner/java/ObjectInspectorW.java       |   14 ++++----------
+ .../qtcppdesigner/java/PropertyEditorW.java        |   14 ++++----------
+ .../qtcppdesigner/java/ResourceEditorW.java        |   14 ++++----------
+ .../qtcppdesigner/java/SignalSlotEditorW.java      |   14 ++++----------
+ qswt/designer/qtcppdesigner/java/WidgetBoxW.java   |   14 ++++----------
+ 8 files changed, 32 insertions(+), 80 deletions(-)
+
+diff --git a/qswt/designer/qtcppdesigner/java/ActionEditorW.java b/qswt/designer/qtcppdesigner/java/ActionEditorW.java
+index fe79f58..b098516 100644
+--- a/qswt/designer/qtcppdesigner/java/ActionEditorW.java
++++ b/qswt/designer/qtcppdesigner/java/ActionEditorW.java
+@@ -43,16 +43,10 @@ public class ActionEditorW extends Composite
+                 m.invoke(null, new Object[] { this });
+             }
+         } catch (Throwable t) {
+-            Bundle pluginBundle = Platform.getBundle("com.trolltech.qtcppdesigner."+Platform.getOS()+"."+Platform.getOSArch());
+-            if (pluginBundle != null) {
+-                try {
+-                    String path = FileLocator.toFileURL(FileLocator.find(pluginBundle, new org.eclipse.core.runtime.Path("lib/libqtcppdesigner.so"), null)).getPath();
+-                    System.load(path);
+-                } catch (IOException ex) {
+-                    ex.printStackTrace();
+-                } catch (UnsatisfiedLinkError ex) {
+-                    ex.printStackTrace();
+-                }
++            try {
++                System.loadLibrary("qtcppdesigner");
++            } catch (UnsatisfiedLinkError ex) {
++                ex.printStackTrace();
+             }
+         }
+ 
+diff --git a/qswt/designer/qtcppdesigner/java/DesignerBridgeW.java b/qswt/designer/qtcppdesigner/java/DesignerBridgeW.java
+index 4483f99..41222dd 100644
+--- a/qswt/designer/qtcppdesigner/java/DesignerBridgeW.java
++++ b/qswt/designer/qtcppdesigner/java/DesignerBridgeW.java
+@@ -43,16 +43,10 @@ public class DesignerBridgeW extends Composite
+                 m.invoke(null, new Object[] { this });
+             }
+         } catch (Throwable t) {
+-            Bundle pluginBundle = Platform.getBundle("com.trolltech.qtcppdesigner."+Platform.getOS()+"."+Platform.getOSArch());
+-            if (pluginBundle != null) {
+-                try {
+-                    String path = FileLocator.toFileURL(FileLocator.find(pluginBundle, new org.eclipse.core.runtime.Path("lib/libqtcppdesigner.so"), null)).getPath();
+-                    System.load(path);
+-                } catch (IOException ex) {
+-                    ex.printStackTrace();
+-                } catch (UnsatisfiedLinkError ex) {
+-                    ex.printStackTrace();
+-                }
++            try {
++                System.loadLibrary("qtcppdesigner");
++            } catch (UnsatisfiedLinkError ex) {
++                ex.printStackTrace();
+             }
+         }
+ 
+diff --git a/qswt/designer/qtcppdesigner/java/FormWindowW.java b/qswt/designer/qtcppdesigner/java/FormWindowW.java
+index d24629f..69971e7 100644
+--- a/qswt/designer/qtcppdesigner/java/FormWindowW.java
++++ b/qswt/designer/qtcppdesigner/java/FormWindowW.java
+@@ -44,16 +44,10 @@ public class FormWindowW extends Composite
+                 m.invoke(null, new Object[] { this });
+             }
+         } catch (Throwable t) {
+-            Bundle pluginBundle = Platform.getBundle("com.trolltech.qtcppdesigner."+Platform.getOS()+"."+Platform.getOSArch());
+-            if (pluginBundle != null) {
+-                try {
+-                    String path = FileLocator.toFileURL(FileLocator.find(pluginBundle, new org.eclipse.core.runtime.Path("lib/libqtcppdesigner.so"), null)).getPath();
+-                    System.load(path);
+-                } catch (IOException ex) {
+-                    ex.printStackTrace();
+-                } catch (UnsatisfiedLinkError ex) {
+-                    ex.printStackTrace();
+-                }
++            try {
++                System.loadLibrary("qtcppdesigner");
++            } catch (UnsatisfiedLinkError ex) {
++                ex.printStackTrace();
+             }
+         }
+ 
+diff --git a/qswt/designer/qtcppdesigner/java/ObjectInspectorW.java b/qswt/designer/qtcppdesigner/java/ObjectInspectorW.java
+index af6f254..11d2d21 100644
+--- a/qswt/designer/qtcppdesigner/java/ObjectInspectorW.java
++++ b/qswt/designer/qtcppdesigner/java/ObjectInspectorW.java
+@@ -43,16 +43,10 @@ public class ObjectInspectorW extends Composite
+                 m.invoke(null, new Object[] { this });
+             }
+         } catch (Throwable t) {
+-            Bundle pluginBundle = Platform.getBundle("com.trolltech.qtcppdesigner."+Platform.getOS()+"."+Platform.getOSArch());
+-            if (pluginBundle != null) {
+-                try {
+-                    String path = FileLocator.toFileURL(FileLocator.find(pluginBundle, new org.eclipse.core.runtime.Path("lib/libqtcppdesigner.so"), null)).getPath();
+-                    System.load(path);
+-                } catch (IOException ex) {
+-                    ex.printStackTrace();
+-                } catch (UnsatisfiedLinkError ex) {
+-                    ex.printStackTrace();
+-                }
++            try {
++                System.loadLibrary("qtcppdesigner");
++            } catch (UnsatisfiedLinkError ex) {
++                ex.printStackTrace();
+             }
+         }
+ 
+diff --git a/qswt/designer/qtcppdesigner/java/PropertyEditorW.java b/qswt/designer/qtcppdesigner/java/PropertyEditorW.java
+index 80b81aa..c4c9813 100644
+--- a/qswt/designer/qtcppdesigner/java/PropertyEditorW.java
++++ b/qswt/designer/qtcppdesigner/java/PropertyEditorW.java
+@@ -43,16 +43,10 @@ public class PropertyEditorW extends Composite
+                 m.invoke(null, new Object[] { this });
+             }
+         } catch (Throwable t) {
+-            Bundle pluginBundle = Platform.getBundle("com.trolltech.qtcppdesigner."+Platform.getOS()+"."+Platform.getOSArch());
+-            if (pluginBundle != null) {
+-                try {
+-                    String path = FileLocator.toFileURL(FileLocator.find(pluginBundle, new org.eclipse.core.runtime.Path("lib/libqtcppdesigner.so"), null)).getPath();
+-                    System.load(path);
+-                } catch (IOException ex) {
+-                    ex.printStackTrace();
+-                } catch (UnsatisfiedLinkError ex) {
+-                    ex.printStackTrace();
+-                }
++            try {
++                System.loadLibrary("qtcppdesigner");
++            } catch (UnsatisfiedLinkError ex) {
++                ex.printStackTrace();
+             }
+         }
+ 
+diff --git a/qswt/designer/qtcppdesigner/java/ResourceEditorW.java b/qswt/designer/qtcppdesigner/java/ResourceEditorW.java
+index 37ab8b9..ebb504c 100644
+--- a/qswt/designer/qtcppdesigner/java/ResourceEditorW.java
++++ b/qswt/designer/qtcppdesigner/java/ResourceEditorW.java
+@@ -43,16 +43,10 @@ public class ResourceEditorW extends Composite
+                 m.invoke(null, new Object[] { this });
+             }
+         } catch (Throwable t) {
+-            Bundle pluginBundle = Platform.getBundle("com.trolltech.qtcppdesigner."+Platform.getOS()+"."+Platform.getOSArch());
+-            if (pluginBundle != null) {
+-                try {
+-                    String path = FileLocator.toFileURL(FileLocator.find(pluginBundle, new org.eclipse.core.runtime.Path("lib/libqtcppdesigner.so"), null)).getPath();
+-                    System.load(path);
+-                } catch (IOException ex) {
+-                    ex.printStackTrace();
+-                } catch (UnsatisfiedLinkError ex) {
+-                    ex.printStackTrace();
+-                }
++            try {
++                System.loadLibrary("qtcppdesigner");
++            } catch (UnsatisfiedLinkError ex) {
++                ex.printStackTrace();
+             }
+         }
+ 
+diff --git a/qswt/designer/qtcppdesigner/java/SignalSlotEditorW.java b/qswt/designer/qtcppdesigner/java/SignalSlotEditorW.java
+index 3ae7876..972aa60 100644
+--- a/qswt/designer/qtcppdesigner/java/SignalSlotEditorW.java
++++ b/qswt/designer/qtcppdesigner/java/SignalSlotEditorW.java
+@@ -43,16 +43,10 @@ public class SignalSlotEditorW extends Composite
+                 m.invoke(null, new Object[] { this });
+             }
+         } catch (Throwable t) {
+-            Bundle pluginBundle = Platform.getBundle("com.trolltech.qtcppdesigner."+Platform.getOS()+"."+Platform.getOSArch());
+-            if (pluginBundle != null) {
+-                try {
+-                    String path = FileLocator.toFileURL(FileLocator.find(pluginBundle, new org.eclipse.core.runtime.Path("lib/libqtcppdesigner.so"), null)).getPath();
+-                    System.load(path);
+-                } catch (IOException ex) {
+-                    ex.printStackTrace();
+-                } catch (UnsatisfiedLinkError ex) {
+-                    ex.printStackTrace();
+-                }
++            try {
++                System.loadLibrary("qtcppdesigner");
++            } catch (UnsatisfiedLinkError ex) {
++                ex.printStackTrace();
+             }
+         }
+ 
+diff --git a/qswt/designer/qtcppdesigner/java/WidgetBoxW.java b/qswt/designer/qtcppdesigner/java/WidgetBoxW.java
+index cdbf531..1d27091 100644
+--- a/qswt/designer/qtcppdesigner/java/WidgetBoxW.java
++++ b/qswt/designer/qtcppdesigner/java/WidgetBoxW.java
+@@ -43,16 +43,10 @@ public class WidgetBoxW extends Composite
+                 m.invoke(null, new Object[] { this });
+             }
+         } catch (Throwable t) {
+-            Bundle pluginBundle = Platform.getBundle("com.trolltech.qtcppdesigner."+Platform.getOS()+"."+Platform.getOSArch());
+-            if (pluginBundle != null) {
+-                try {
+-                    String path = FileLocator.toFileURL(FileLocator.find(pluginBundle, new org.eclipse.core.runtime.Path("lib/libqtcppdesigner.so"), null)).getPath();
+-                    System.load(path);
+-                } catch (IOException ex) {
+-                    ex.printStackTrace();
+-                } catch (UnsatisfiedLinkError ex) {
+-                    ex.printStackTrace();
+-                }
++            try {
++                System.loadLibrary("qtcppdesigner");
++            } catch (UnsatisfiedLinkError ex) {
++                ex.printStackTrace();
+             }
+         }
+ 
+-- 
diff --git a/debian/patches/series b/debian/patches/series
index b6983fb..bcbe64b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,7 @@
 custom-build.patch
+gdk-signals-macro-collision.patch
+dont-link-with-xt.patch
+gdk-use-pkgconfig.patch
+load-jni-from-standard-location.patch
+dont-use-private-designer-headers.patch
 disable-preview.patch

-- 
eclipse-cdt-qt packaging



More information about the pkg-java-commits mailing list