From 16b95b65a6fea501dade6e3f5f1ad48f7dfaa173 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 14 Apr 2015 09:37:58 +0200 Subject: Q*GlyphCache: de-inline dtor and export vtable The destructor is the first virtual method. By not defining it out-of-line, we provoke multiple copies of vtables, not all of which can be merged by the linker. If the linker fails, RTTI such as dynamic_cast and catch-blocks involving the type will not work. Additionally, QFontEngineGlyphCache was not exported, and therefore also not its vtable, making it impossible for users outside of QtGui to get a unique RTTI for the class. Change-Id: Ib265945934216bb609629431eb4c71996d4fd39d Reported-by: Volker Krause Task-number: QTBUG-45582 Reviewed-by: Konstantin Ritt Reviewed-by: Friedemann Kleint Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/gui/text/qfontengineglyphcache_p.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gui/text/qfontengineglyphcache_p.h') diff --git a/src/gui/text/qfontengineglyphcache_p.h b/src/gui/text/qfontengineglyphcache_p.h index 6cf4d2f1ba..def42c22a3 100644 --- a/src/gui/text/qfontengineglyphcache_p.h +++ b/src/gui/text/qfontengineglyphcache_p.h @@ -56,7 +56,7 @@ QT_BEGIN_NAMESPACE -class QFontEngineGlyphCache: public QSharedData +class Q_GUI_EXPORT QFontEngineGlyphCache: public QSharedData { public: QFontEngineGlyphCache(QFontEngine::GlyphFormat format, const QTransform &matrix) : m_format(format), m_transform(matrix) @@ -64,7 +64,7 @@ public: Q_ASSERT(m_format != QFontEngine::Format_None); } - virtual ~QFontEngineGlyphCache() { } + virtual ~QFontEngineGlyphCache(); QFontEngine::GlyphFormat glyphFormat() const { return m_format; } const QTransform &transform() const { return m_transform; } -- cgit v1.2.3