diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2021-11-16 16:37:35 +0100 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2021-11-19 18:48:07 +0100 |
commit | 68600869cd3a1b5f118d9a69200f1a6453e0c8ec (patch) | |
tree | b193f1b907af9c0b9ac65f4630584a1a976cf9ec /src/printsupport/kernel | |
parent | a41d9bcac90af5d8f528d6198ea91f25e5189082 (diff) |
Link printer plugins into user projects when using a static Qt
When building a user project against a static Qt on Windows or macOS the
static printer support plugins were not linked. Move the
Q_IMPORT_PLUGIN statements to qplatformprintplugin.cpp, which is a
translation unit that is guaranteed to be linked into the user project.
Pick-to: 6.2
Fixes: QTBUG-97490
Change-Id: Ic35c6483a664a06461304c7e8a2b7b06ce651ed6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/printsupport/kernel')
-rw-r--r-- | src/printsupport/kernel/qplatformprintplugin.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/printsupport/kernel/qplatformprintplugin.cpp b/src/printsupport/kernel/qplatformprintplugin.cpp index 9a7656f7d6..6f470b835c 100644 --- a/src/printsupport/kernel/qplatformprintplugin.cpp +++ b/src/printsupport/kernel/qplatformprintplugin.cpp @@ -48,6 +48,12 @@ QT_BEGIN_NAMESPACE +#if defined(Q_OS_MACOS) +Q_IMPORT_PLUGIN(QCocoaPrinterSupportPlugin) +#elif defined(Q_OS_WIN) +Q_IMPORT_PLUGIN(QWindowsPrinterSupportPlugin) +#endif + Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, (QPlatformPrinterSupportFactoryInterface_iid, QLatin1String("/printsupport"), Qt::CaseInsensitive)) |