From 1826fa978a19ab037c180314e8b585343c6da6f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Fri, 21 Feb 2020 14:19:53 +0100 Subject: Move function declaration to global scope so namespace is applied The function-local declaration ignores the current namespace and when linking it will look for a global exported function named qt_writing_system_for_script instead of the one found in our namespace. Move the declaration outside of the function to work around it. Change-Id: I161bf1760e2e4e37d0f548b01bb3bea5ebb9ecdd Reviewed-by: Eskil Abrahamsen Blomfeldt --- .../fontdatabases/windows/qwindowsdirectwritefontdatabase.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/platformsupport') diff --git a/src/platformsupport/fontdatabases/windows/qwindowsdirectwritefontdatabase.cpp b/src/platformsupport/fontdatabases/windows/qwindowsdirectwritefontdatabase.cpp index e2a9dbdedd..16db2216ee 100644 --- a/src/platformsupport/fontdatabases/windows/qwindowsdirectwritefontdatabase.cpp +++ b/src/platformsupport/fontdatabases/windows/qwindowsdirectwritefontdatabase.cpp @@ -52,6 +52,9 @@ QT_BEGIN_NAMESPACE #ifdef QT_USE_DIRECTWRITE3 +// Defined in gui/text/qfontdatabase.cpp +Q_GUI_EXPORT QFontDatabase::WritingSystem qt_writing_system_for_script(int script); + QWindowsDirectWriteFontDatabase::QWindowsDirectWriteFontDatabase() { qCDebug(lcQpaFonts) << "Creating DirectWrite database"; @@ -216,7 +219,6 @@ void QWindowsDirectWriteFontDatabase::populateFamily(const QString &familyName) for (uint i = 0; i < rangeCount; ++i) { QChar::Script script = QChar::script(ranges.at(i).first); - Q_GUI_EXPORT QFontDatabase::WritingSystem qt_writing_system_for_script(int script); QFontDatabase::WritingSystem writingSystem = qt_writing_system_for_script(script); if (writingSystem > QFontDatabase::Any && writingSystem < QFontDatabase::WritingSystemsCount) -- cgit v1.2.3