From 9f3ae15933f397b594e3168256d33dd3686738a7 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Mon, 20 Nov 2023 12:13:28 +0100 Subject: [PATCH] Add a comment to tst_qtimer.cpp to point out its reuse by QtGui The same test code is compiled by two different modules' tests, which won't be obvious to the reader of the code unless it's pointed out explicitly. Change-Id: I99dba6eb186939c372636c5c1fc29799003d32a7 Reviewed-by: Ivan Solovev Reviewed-by: Thiago Macieira --- tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp b/tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp index 7affa0ae207..e0feca952b5 100644 --- a/tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp +++ b/tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp @@ -2,9 +2,19 @@ // Copyright (C) 2016 Intel Corporation. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +/* WARNING: this source-code is reused by another test. + + As Qt built with GUI support may use a different backend for its event loops + and other timer-related matters, it is important to test it in that form, as + well as in its GUI-less form. So this source file is reused by a build config + in the GUI module. Similarly, testing with and without glib is supported, + where relevant (see DISABLE_GLIB below). +*/ #ifdef QT_GUI_LIB +// When compiled as tests/auto/gui/kernel/qguitimer/'s source-code: # include #else +// When compiled as tests/auto/corelib/kernel/qtimer/'s source-code: # include #endif