Opened 8 years ago

Closed 7 years ago

#961 closed defect/bug (fixed)

Missing v-table symbol in qt_qpainter plugin

Reported by: e8johan Owned by: KaZeR
Priority: minor Milestone: want patch / contribution
Component: core Version: git master
Severity: Keywords: qt_qpainter
Cc:

Description

The qt_qpainter plugin complains about the _ZTV14EmbeddedWidget symbol. This can be avoided by removing the Q_OBJECT macro from the EmbeddedWidget? class. It is not needed as no up-casting is made to the class, and no other Qt specific features (such as signals, slots, properties, etc) are added.

The following patch solves the issue:

--- 8<---

Index: navit/graphics/qt_qpainter/RenderArea.h
===================================================================
--- navit/graphics/qt_qpainter/RenderArea.h     (revision 4845)
+++ navit/graphics/qt_qpainter/RenderArea.h     (working copy)
@@ -21,7 +21,6 @@
 
 #ifdef QT_QPAINTER_USE_EMBEDDING
 class EmbeddedWidget : public QX11EmbedWidget {
-    Q_OBJECT
 
         struct graphics_priv *gra;
 public:

--- 8< ---

Change History (2)

comment:1 Changed 8 years ago by pini

Hi,

In case you want to keep the Q_OBJECT macro, QT_QPAINTER_USE_EMBEDDING should be defined at moc time as well:

--- 8<---

Index: navit/navit/graphics/qt_qpainter/RenderArea.h
===================================================================
--- navit.orig/navit/graphics/qt_qpainter/RenderArea.h  2012-02-10 19:43:47.000000000 +0100
+++ navit/navit/graphics/qt_qpainter/RenderArea.h       2012-02-11 15:14:56.000000000 +0100
@@ -19,6 +19,15 @@
 #ifndef __RENDERAREA_H
 #define __RENDERAREA_H

+// This snippet is required for the .moc file to ship the
+// EmbeddedWidget class
+#include <qglobal.h>
+#ifdef Q_WS_X11
+#ifndef QT_QPAINTER_USE_EMBEDDING
+#define QT_QPAINTER_USE_EMBEDDING 1
+#endif
+#endif
+
 #ifdef QT_QPAINTER_USE_EMBEDDING
 class EmbeddedWidget : public QX11EmbedWidget {
     Q_OBJECT

--- 8<---

See also http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=658899

comment:2 Changed 7 years ago by sleske

  • Resolution set to fixed
  • Status changed from new to closed

The patch provided by the reporter was applied in rev.5235.

Note: See TracTickets for help on using tickets.