Skip to content

Commit 35cd258

Browse files
committed
translationhandler.cpp: avoid -Wunused-function warning
1 parent ebc792e commit 35cd258

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

gui/test/translationhandler/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ add_executable(test-translationhandler
77
${CMAKE_SOURCE_DIR}/gui/common.cpp
88
${CMAKE_SOURCE_DIR}/gui/translationhandler.cpp
99
)
10-
target_include_directories(test-translationhandler PRIVATE ${CMAKE_SOURCE_DIR}/gui)
10+
target_include_directories(test-translationhandler PRIVATE ${CMAKE_SOURCE_DIR}/gui ${CMAKE_SOURCE_DIR}/lib)
1111
target_link_libraries(test-translationhandler ${QT_CORE_LIB} ${QT_WIDGETS_LIB} ${QT_TEST_LIB})
1212

1313
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")

gui/translationhandler.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
#include "translationhandler.h"
2020

21+
#include "config.h"
2122
#include "common.h"
2223

2324
#include <QApplication>
@@ -29,7 +30,7 @@
2930

3031

3132
// Provide own translations for standard buttons. This (garbage) code is needed to enforce them to appear in .ts files even after "lupdate gui.pro"
32-
static void unused()
33+
static UNUSED void unused()
3334
{
3435
Q_UNUSED(QT_TRANSLATE_NOOP("QPlatformTheme", "OK"))
3536
Q_UNUSED(QT_TRANSLATE_NOOP("QPlatformTheme", "Cancel"))

0 commit comments

Comments
 (0)