aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2023-01-20 07:12:50 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-01-21 00:48:56 +0000
commit7b40a86b5e1a41080b4a3359d690bb183047e995 (patch)
tree277017f18697a4c24fd012b3a3c4d5d3543a7d45
parentc62113f7b96d1ef40b8526c0b968c4eea5038dfb (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>
-rw-r--r--src/quickcontrolstestutils/qtest_quickcontrols_p.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/quickcontrolstestutils/qtest_quickcontrols_p.h b/src/quickcontrolstestutils/qtest_quickcontrols_p.h
index bd86e4a18b..1294781114 100644
--- a/src/quickcontrolstestutils/qtest_quickcontrols_p.h
+++ b/src/quickcontrolstestutils/qtest_quickcontrols_p.h
@@ -22,7 +22,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.
@@ -33,7 +33,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);