Skip to content

Commit

Permalink
Merge pull request #830 from QuasarApp/qt6.8
Browse files Browse the repository at this point in the history
Qt6.8
  • Loading branch information
EndrII authored Dec 25, 2024
2 parents 7cce7f3 + 92492bf commit 2018b77
Show file tree
Hide file tree
Showing 12 changed files with 262 additions and 19 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
7 changes: 5 additions & 2 deletions testcases/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ add_subdirectory(TestQtWidgets)
if (NOT WIN32)
add_subdirectory(QMLFileDialog)
add_subdirectory(virtualkeyboard)
add_subdirectory(quicknanobrowser)
add_subdirectory(webui)

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
6 changes: 0 additions & 6 deletions tests/modules/modulesqt6_6.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ QSet<QString> ModulesQt6_6::qmlLibs(const QString &distDir) const {
TestUtils utils;
auto Tree = ModulesQt6_5::qmlLibs(distDir);

#ifdef Q_OS_WIN

#else

#endif

return Tree;
}

Expand Down
195 changes: 195 additions & 0 deletions tests/modules/modulesqt6_8.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
/*
* Copyright (C) 2023-2024 QuasarApp.
* Distributed under the lgplv3 software license, see the accompanying
* Everyone is permitted to copy and distribute verbatim copies
* of this license document, but changing it is not allowed.
*/


#include "modulesqt6_8.h"

ModulesQt6_8::ModulesQt6_8() {}

QSet<QString> ModulesQt6_8::qmlLibs(const QString &distDir) const {
TestUtils utils;
auto Tree = ModulesQt6_6::qmlLibs(distDir);

#ifdef Q_OS_LINUX
Tree -= utils.createTree(
{
"./" + distDir + "/qml/QtQml/Base/libqmlplugin.so" ,
"./" + distDir + "/qml/QtQml/Base/plugins.qmltypes" ,
"./" + distDir + "/qml/QtQml/Base/qmldir",
"./" + distDir + "/qml/QtQml/libqmlmetaplugin.so",
"./" + distDir + "/qml/QtQuick/Controls/Imagine/impl/qtquickcontrols2imaginestyleimplplugin.qmltypes" ,
}
);

Tree += utils.createTree(
{
"./" + distDir + "//lib/libQt6Network.so",
"./" + distDir + "//lib/libQt6QmlMeta.so",
"./" + distDir + "//lib/libQt6QuickControls2Basic.so",
"./" + distDir + "//lib/libQt6QuickControls2BasicStyleImpl.so",
"./" + distDir + "//lib/libQt6QuickControls2FluentWinUI3StyleImpl.so",
"./" + distDir + "//lib/libQt6QuickControls2Fusion.so",
"./" + distDir + "//lib/libQt6QuickControls2FusionStyleImpl.so",
"./" + distDir + "//lib/libQt6QuickControls2Imagine.so",
"./" + distDir + "//lib/libQt6QuickControls2ImagineStyleImpl.so",
"./" + distDir + "//lib/libQt6QuickControls2Material.so",
"./" + distDir + "//lib/libQt6QuickControls2MaterialStyleImpl.so",
"./" + distDir + "//lib/libQt6QuickControls2Universal.so",
"./" + distDir + "//lib/libQt6QuickControls2UniversalStyleImpl.so",
"./" + distDir + "//lib/libQt6QuickEffects.so",
"./" + distDir + "//lib/libQt6QuickLayouts.so",
"./" + distDir + "//qml/QML/plugins.qmltypes",
"./" + distDir + "//qml/QML/qmldir",
"./" + distDir + "//qml/QtQml/libqmlplugin.so",
"./" + distDir + "//qml/QtQml/plugins.qmltypes",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/ApplicationWindow.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/BusyIndicator.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/Button.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/CheckBox.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/CheckDelegate.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/ComboBox.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/Config.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/DelayButton.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/Dialog.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/DialogButtonBox.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/FocusFrame.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/Frame.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/GroupBox.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/ItemDelegate.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/Menu.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/MenuBar.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/MenuBarItem.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/MenuItem.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/MenuSeparator.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/PageIndicator.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/Popup.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/ProgressBar.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/RadioButton.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/RadioDelegate.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/RangeSlider.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/RoundButton.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/Slider.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/SpinBox.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/StyleImage.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/SwipeDelegate.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/Switch.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/SwitchDelegate.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/TabBar.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/TabButton.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/TextArea.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/TextField.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/ToolBar.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/ToolButton.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/ToolSeparator.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/ToolTip.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/impl/ButtonBackground.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/impl/CheckIndicator.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/impl/RadioIndicator.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/impl/SwitchIndicator.qml",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/impl/libqtquickcontrols2fluentwinui3styleimplplugin.so",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/impl/plugins.qmltypes",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/impl/qmldir",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/libqtquickcontrols2fluentwinui3styleplugin.so",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/plugins.qmltypes",
"./" + distDir + "//qml/QtQuick/Controls/FluentWinUI3/qmldir",
"./" + distDir + "//qml/QtQuick/Controls/Imagine/impl/QuickControls2ImagineStyleImpl.qmltypes",
"./" + distDir + "//qml/QtQuick/Effects/libeffectsplugin.so",
"./" + distDir + "//qml/QtQuick/Effects/plugins.qmltypes",
"./" + distDir + "//qml/QtQuick/Effects/qmldir",
"./" + distDir + "//qml/QtQuick/Layouts/libqquicklayoutsplugin.so",
"./" + distDir + "//qml/QtQuick/Layouts/plugins.qmltypes",
"./" + distDir + "//qml/QtQuick/Layouts/qmldir",
"./" + distDir + "//translations/qtdeclarative_ka.qm"
}
);
#endif

return Tree;
}

QSet<QString> ModulesQt6_8::qmlVirtualKeyBoadrLibs(const QString &distDir) const{
TestUtils utils;

auto Tree = ModulesQt6_6::qmlVirtualKeyBoadrLibs(distDir);
#ifdef Q_OS_LINUX
Tree -= utils.createTree(
{
"./" + distDir + "plugins/multimedia/libgstreamermediaplugin.so"
}
);

Tree += utils.createTree(
{
"./" + distDir + "/translations/qtmultimedia_ka.qm",
"./" + distDir + "/lib/libQt6VirtualKeyboardSettings.so"
}
);
#endif
return Tree;
}

QSet<QString> ModulesQt6_8::qtWebEngine(const QString &distDir) const{
TestUtils utils;

auto Tree = ModulesQt6_6::qtWebEngine(distDir);

#ifdef Q_OS_LINUX


Tree += utils.createTree(
{
"./" + distDir + "/lib/libQt6Network.so",
"./" + distDir + "/lib/libQt6QmlMeta.so",
"./" + distDir + "/lib/libQt6QmlWorkerScript.so",
"./" + distDir + "/translations/qtdeclarative_ka.qm",
"./" + distDir + "/translations/qtserialport_ka.qm",
"./" + distDir + "/translations/qtwebengine_ka.qm"
}
);
#endif
return Tree;
}

QSet<QString> ModulesQt6_8::qtWebEngineWidgets(const QString &distDir) const{
TestUtils utils;

auto Tree = ModulesQt6_6::qtWebEngineWidgets(distDir);

#ifdef Q_OS_LINUX


Tree += utils.createTree(
{
"./" + distDir + "/lib/libQt6Network.so",
"./" + distDir + "/lib/libQt6QmlMeta.so",
"./" + distDir + "/lib/libQt6QmlWorkerScript.so",
"./" + distDir + "/translations/qtdeclarative_ka.qm",
"./" + distDir + "/translations/qtserialport_ka.qm",
"./" + distDir + "/translations/qtwebengine_ka.qm"
}
);

#endif
return Tree;
}

QSet<QString> ModulesQt6_8::qtLibs(const QString &distDir) const {
auto Tree = ModulesQt6_6::qtLibs(distDir);
TestUtils utils;

#ifdef Q_OS_LINUX

Tree += utils.createTree(
{
"./" + distDir + "/translations/qtbase_ka.qm",
"./" + distDir + "/plugins/wayland-decoration-client/libadwaita.so",
}
);
#endif

return Tree;
}
26 changes: 26 additions & 0 deletions tests/modules/modulesqt6_8.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright (C) 2023-2024 QuasarApp.
* Distributed under the lgplv3 software license, see the accompanying
* Everyone is permitted to copy and distribute verbatim copies
* of this license document, but changing it is not allowed.
*/


#ifndef MODULESQT6_8_H
#define MODULESQT6_8_H

#include "modulesqt6_6.h"


class ModulesQt6_8: public ModulesQt6_6
{
public:
ModulesQt6_8();
QSet<QString> qmlLibs(const QString &distDir = DISTRO_DIR) const override;
QSet<QString> qmlVirtualKeyBoadrLibs(const QString &distDir = DISTRO_DIR) const override;
QSet<QString> qtWebEngine(const QString &distDir = DISTRO_DIR) const override;
QSet<QString> qtWebEngineWidgets(const QString &distDir = DISTRO_DIR) const override;
QSet<QString> qtLibs(const QString &distDir = DISTRO_DIR) const override;
};

#endif // MODULESQT6_8_H
6 changes: 6 additions & 0 deletions tests/tstMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,12 @@ tstMain::tstMain() {
cqtTestPath = cqtTestPath +
DeployCore::getEnvSeparator() +
QT_BASE_DIR + "/../../Tools/QtInstallerFramework/4.7/bin/";
cqtTestPath = cqtTestPath +
DeployCore::getEnvSeparator() +
QT_BASE_DIR + "/../../Tools/QtInstallerFramework/4.8/bin/";
cqtTestPath = cqtTestPath +
DeployCore::getEnvSeparator() +
QT_BASE_DIR + "/../../Tools/QtInstallerFramework/4.9/bin/";
qputenv("PATH", cqtTestPath.toLatin1().data());
TestUtils utils;

Expand Down
18 changes: 12 additions & 6 deletions tests/units/linux/extradependstest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,29 @@ void ExtraDependsTest::test() {

comapareTree += utils.createTree(
{
"./" + DISTRO_DIR + "/lib/libicutu.so.56.1",
"./" + DISTRO_DIR + "/lib/libicuuc.so",
"./" + DISTRO_DIR + "/lib/libicui18n.so",
"./" + DISTRO_DIR + "/lib/libicuio.so",
"./" + DISTRO_DIR + "/lib/libicudata.so",

"./" + DISTRO_DIR + "/lib/libicui18n.so",
"./" + DISTRO_DIR + "/lib/libicuuc.so",
});
#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)
QString extraLibName = "libicuio.so.73";

#else
QString extraLibName = "libicuio.so.56.1";

#endif

// this cases should contains all icu libs.
runTestParams({"-bin", bin, "clear",
"-libDir", QT_BASE_DIR,
"-recursiveDepth", "4",
"-extraDepends", "libicutu.so.56.1"}, &comapareTree);
"-extraDepends", extraLibName}, &comapareTree);


runTestParams({"-bin", bin, "clear" ,
"-libDir", QT_BASE_DIR,
"-recursiveDepth", "4",
"-extraDepends", "TestOnlyC;libicutu.so.56.1"}, &comapareTree);
"-extraDepends", "TestOnlyC;" + extraLibName}, &comapareTree);

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


#include "webenginetest.h"

#ifdef USE_WEBENGINE
#include "modules.h"
#endif

#include <configparser.h>
#include <dependenciesscanner.h>
#include <filemanager.h>
Expand All @@ -16,7 +20,7 @@


void WebEngineTest::test() {
#ifdef Q_OS_UNIX
#ifdef USE_WEBENGINE
TestUtils utils;

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

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


#endif
}
1 change: 1 addition & 0 deletions tests/units/linux/webenginetest.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

#include <QtTest>

// webenginetest
class WebEngineTest: public TestBase, protected TestUtils
{
public:
Expand Down
5 changes: 4 additions & 1 deletion tests/units/modules.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
#include <configparser.h>
#include <QSet>

#if QT_VERSION >= QT_VERSION_CHECK(6, 6, 0)
#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)
#include "modulesqt6_8.h"
class Modules: public ModulesQt6_8
#elif QT_VERSION >= QT_VERSION_CHECK(6, 6, 0)
#include "modulesqt6_6.h"
class Modules: public ModulesQt6_6
#elif QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
Expand Down

0 comments on commit 2018b77

Please sign in to comment.