From 4fec31dcc003ccd107b447b2ee86dab1eedae642 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sat, 22 Nov 2014 17:09:08 -0800 Subject: [PATCH] Fix failure to build QtQuick with LTO The presence of the inline QTestFontEngine's constructor causes a linker failure because QFontEngineBox isn't exported. I'd say this is a compiler bug (GCC 4.9), but it's an easy workaround and a difficult testcase. typeinfo for QTestFontEngine: error: undefined reference to 'typeinfo for QFontEngineBox' vtable for QTestFontEngine: error: undefined reference to 'QFontEngineBox::glyphIndex(unsigned int) const' Change-Id: I84829d111616977d6f3fcbbb48509d1c7d4f5fa6 Reviewed-by: Konstantin Ritt --- src/gui/text/qfontengine.cpp | 4 ++++ src/gui/text/qfontengine_p.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp index 0b517fbf29..b2a7a8e91f 100644 --- a/src/gui/text/qfontengine.cpp +++ b/src/gui/text/qfontengine.cpp @@ -2105,4 +2105,8 @@ QFontEngine* QFontEngineMultiBasicImpl::createMultiFontEngine(QFontEngine *fe, i return engine; } +QTestFontEngine::QTestFontEngine(int size) + : QFontEngineBox(TestFontEngine, size) +{} + QT_END_NAMESPACE diff --git a/src/gui/text/qfontengine_p.h b/src/gui/text/qfontengine_p.h index 50b1bb9e9d..9364b82bed 100644 --- a/src/gui/text/qfontengine_p.h +++ b/src/gui/text/qfontengine_p.h @@ -463,7 +463,7 @@ private: class QTestFontEngine : public QFontEngineBox { public: - inline QTestFontEngine(int size) : QFontEngineBox(TestFontEngine, size) {} + QTestFontEngine(int size); }; QT_END_NAMESPACE