diff options
author | Marc Mutz <marc.mutz@qt.io> | 2023-01-20 07:12:50 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-01-23 18:11:24 +0000 |
commit | ca25ebabe80967c6711f7f506b984b3eb945ebe8 (patch) | |
tree | b896c8c4f8e0596de939e2b322fee766eec1bb59 /src | |
parent | 42d69588b5a48ebc03e81e1d083316823d79ad5c (diff) |
qtest_quickcontrols_p.h: don't mark functions file-static
It's a header, and at least tst_styleimports.cpp doesn't use all of
the functions, so throws a -Wunused-function warning on Clang 15 for
runTests():
qtest_quickcontrols_p.h:36:12: warning: unused function 'runTests' [-Wunused-function]
static int runTests(QObject *testObject, int argc, char *argv[])
^
Fix by marking the functions as inline instead.
Amends e310dadef779b28845b41fb091634cd001cda9de.
Change-Id: Id6cee7bdc2fe93a5e034d7ed445dc5f2c5d35360
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit e34142e6cda177b601d8e5daba00a2ab84828db1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/quickcontrolstestutils/qtest_quickcontrols_p.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/quickcontrolstestutils/qtest_quickcontrols_p.h b/src/quickcontrolstestutils/qtest_quickcontrols_p.h index dff6643917..bfb1982b0c 100644 --- a/src/quickcontrolstestutils/qtest_quickcontrols_p.h +++ b/src/quickcontrolstestutils/qtest_quickcontrols_p.h @@ -55,7 +55,7 @@ #include <QtQuickControls2/qquickstyle.h> #include <QtQuickControls2/private/qquickstyle_p.h> -static QStringList testStyles() +inline QStringList testStyles() { // It's not enough to check if the name is empty, because since Qt 6 // we set an appropriate style for the platform if no style was specified. @@ -66,7 +66,7 @@ static QStringList testStyles() return QStringList(QQuickStyle::name()); } -static int runTests(QObject *testObject, int argc, char *argv[]) +inline int runTests(QObject *testObject, int argc, char *argv[]) { int res = 0; QTest::qInit(testObject, argc, argv); |