Skip to content

Commit

Permalink
update web engine config
Browse files Browse the repository at this point in the history
  • Loading branch information
EndrII committed Dec 21, 2024
1 parent 3f2b3cc commit c53f981
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ else()
endif()

if (CQT_DEPLOYER_TESTS)
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS WebEngineQuick)


add_subdirectory(testcases)
add_subdirectory(tests)
else()
Expand Down
4 changes: 1 addition & 3 deletions testcases/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ if (NOT WIN32)
add_subdirectory(QMLFileDialog)
add_subdirectory(virtualkeyboard)

# this tests is not actual for the qt 6.8 and later. Use WebView.
if (QT_VERSION_MAJOR LESS_EQUAL 6 AND QT_VERSION_MINOR LESS_EQUAL 7)
if (Qt${QT_VERSION_MAJOR}WebEngineQuick_FOUND)
add_subdirectory(quicknanobrowser)
add_subdirectory(webui)

endif()
endif()
4 changes: 4 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ set(PUBLIC_INCUDE_DIR ${PUBLIC_INCUDE_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/modules"
add_definitions(-DQT_BASE_DIR="${QT_QT_ROOT}/")
add_definitions(-DTEST_BIN_DIR="${CMAKE_CURRENT_LIST_DIR}/../testcases/bin/")

if (Qt${QT_VERSION_MAJOR}WebEngineQuick_FOUND)
add_definitions(-DUSE_WEBENGINE)
endif()

add_executable(${CURRENT_PROJECT} ${SOURCE_CPP})
target_link_libraries(${CURRENT_PROJECT} PRIVATE Qt${QT_VERSION_MAJOR}::Test Deploy)

Expand Down
7 changes: 2 additions & 5 deletions tests/units/linux/webenginetest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include "webenginetest.h"

#if QT_VERSION < QT_VERSION_CHECK(6, 8, 0)
#ifdef USE_WEBENGINE
#include "modules.h"
#endif

Expand All @@ -20,8 +20,7 @@


void WebEngineTest::test() {
#ifdef Q_OS_UNIX
#if QT_VERSION < QT_VERSION_CHECK(6, 8, 0)
#ifdef USE_WEBENGINE
TestUtils utils;

QString bin = TestBinDir + "quicknanobrowser";
Expand All @@ -41,7 +40,5 @@ void WebEngineTest::test() {

runTestParams({"-bin", bin, "clear" ,
"-qmake", qmake}, &comapareTree);

#endif
#endif
}

0 comments on commit c53f981

Please sign in to comment.