Skip to content

Commit

Permalink
tests: Add project files of highdpi both for qmake and cmake
Browse files Browse the repository at this point in the history
Pick-to: 6.4 6.2
Change-Id: I5525536674a64ccd14106dc6727b5578c0ab7f16
Reviewed-by: Tor Arne Vestbø <[email protected]>
  • Loading branch information
liangqi committed Nov 25, 2022
1 parent a528b1e commit 5da38b4
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 64 deletions.
2 changes: 1 addition & 1 deletion tests/manual/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ add_subdirectory(filetest)
# add_subdirectory(foreignwindows)
# special case end
add_subdirectory(gestures)
# add_subdirectory(highdpi) special case broken in dev
add_subdirectory(highdpi)
add_subdirectory(inputmethodhints)
add_subdirectory(keypadnavigation)
#add_subdirectory(lance) # special case qgl.h missing
Expand Down
6 changes: 6 additions & 0 deletions tests/manual/highdpi/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Generated from highdpi.pro.

add_subdirectory(dprgadget)
add_subdirectory(kitchensink)
add_subdirectory(pixelgadget)
add_subdirectory(screengadget)
33 changes: 13 additions & 20 deletions tests/manual/highdpi/dprgadget/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause

# special case skip regeneration
cmake_minimum_required(VERSION 3.16)
project(dprgadget LANGUAGES CXX)
set(CMAKE_AUTOMOC ON)

find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets)

qt_add_executable(dprgadget
main.cpp
# Generated from dprgadget.pro.

#####################################################################
## dprgadget Binary:
#####################################################################

qt_internal_add_manual_test(dprgadget
SOURCES
main.cpp
PUBLIC_LIBRARIES
Qt::Gui
Qt::Widgets
Qt::GuiPrivate
)

target_link_libraries(dprgadget PUBLIC
Qt::Core
Qt::Gui
Qt::GuiPrivate
Qt::Widgets
)

3 changes: 3 additions & 0 deletions tests/manual/highdpi/highdpi.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
TEMPLATE = subdirs

SUBDIRS = dprgadget kitchensink pixelgadget screengadget
5 changes: 1 addition & 4 deletions tests/manual/highdpi/kitchensink/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause

# Generated from kitchensink.pro.

#####################################################################
Expand All @@ -15,7 +12,7 @@ qt_internal_add_manual_test(kitchensink
HAVE_SCREEN_BASE_DPI
INCLUDE_DIRECTORIES
.
LIBRARIES
PUBLIC_LIBRARIES
Qt::Gui
Qt::GuiPrivate
Qt::Widgets
Expand Down
32 changes: 13 additions & 19 deletions tests/manual/highdpi/pixelgadget/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause

# special case skip regeneration
cmake_minimum_required(VERSION 3.16)
project(pixelgadget LANGUAGES CXX)
set(CMAKE_AUTOMOC ON)

find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets)

qt_add_executable(pixelgadget
main.cpp
# Generated from pixelgadget.pro.

#####################################################################
## pixelgadget Binary:
#####################################################################

qt_internal_add_manual_test(pixelgadget
GUI
SOURCES
main.cpp
PUBLIC_LIBRARIES
Qt::Gui
Qt::Widgets
)

target_link_libraries(pixelgadget PUBLIC
Qt::Core
Qt::Gui
Qt::Widgets
)

34 changes: 14 additions & 20 deletions tests/manual/highdpi/screengadget/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause

# special case skip regeneration
cmake_minimum_required(VERSION 3.16)
project(screengadget LANGUAGES CXX)
set(CMAKE_AUTOMOC ON)

find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets)

qt_add_executable(screengadget
main.cpp
# Generated from screengadget.pro.

#####################################################################
## screengadget Binary:
#####################################################################

qt_internal_add_manual_test(screengadget
GUI
SOURCES
main.cpp
PUBLIC_LIBRARIES
Qt::Gui
Qt::Widgets
Qt::GuiPrivate
)

target_link_libraries(screengadget PUBLIC
Qt::Core
Qt::Gui
Qt::GuiPrivate
Qt::Widgets
)

0 comments on commit 5da38b4

Please sign in to comment.