summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2022-06-17 16:44:21 +0200
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2022-06-27 00:12:56 +0200
commit7466422e9ce964553dd09fce9f48437af7ec76c8 (patch)
treef727125120f9ff25fb72633be5645c6742b6f6c5 /src/plugins/platforms/xcb
parent821aa1ff095ae66a89eb8725650dccac363f06ad (diff)
Add a way to declare _exported_ logging categories
If a library declares a logging category that needs to be used by clients (e.g. via inline methods, macros, etc.), then the logging category function generated by Q_DECLARE_LOGGING_CATEGORY has to be exported. We've seen this problem with Q_NAMESPACE, Q_GADGET, etc.: these macros also declare functions or objects that in some cases need to be exported. And precisely like Q_NAMESPACE, Q_GADGET, etc., people end up relying on the implementation details of Q_DECLARE_LOGGING_CATEGORY (specifically, what does it expand to) in order to place the export directives in the right place. Introduce a more robust solution and apply it around qtbase. Cleanup some minor code as a drive-by (remove `extern` and useless semicolons). [ChangeLog][QtCore][QLoggingCategory] Added the Q_DECLARE_EXPORTED_LOGGING_CATEGORY macro, in order to allow dynamic libraries to declare a logging category that can be then used by client code. Change-Id: I18f40cc937cfe8277b8d62ebc824c27a0773de04 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb')
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/qxcbglintegration.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/gl_integrations/qxcbglintegration.h b/src/plugins/platforms/xcb/gl_integrations/qxcbglintegration.h
index 6e841370d8..c6492f02ae 100644
--- a/src/plugins/platforms/xcb/gl_integrations/qxcbglintegration.h
+++ b/src/plugins/platforms/xcb/gl_integrations/qxcbglintegration.h
@@ -14,7 +14,7 @@ class QPlatformOffscreenSurface;
class QOffscreenSurface;
class QXcbNativeInterfaceHandler;
-Q_XCB_EXPORT Q_DECLARE_LOGGING_CATEGORY(lcQpaGl)
+Q_DECLARE_EXPORTED_LOGGING_CATEGORY(lcQpaGl, Q_XCB_EXPORT)
class Q_XCB_EXPORT QXcbGlIntegration
{