mirror of
https://github.com/QuasarApp/CQtDeployer.git
synced 2025-04-27 10:14:32 +00:00
commit
dd027b2959
@ -116,7 +116,7 @@ QProcessEnvironment Deb::processEnvirement() const {
|
|||||||
|
|
||||||
QList<SystemCommandData> Deb::runCmd() {
|
QList<SystemCommandData> Deb::runCmd() {
|
||||||
QList<SystemCommandData> res;
|
QList<SystemCommandData> res;
|
||||||
for (const auto& inout: qAsConst(inouts)) {
|
for (const auto& inout: std::as_const(inouts)) {
|
||||||
res.push_back({"dpkg-deb", QStringList{"--build", "--verbose"} << inout.input << inout.output});
|
res.push_back({"dpkg-deb", QStringList{"--build", "--verbose"} << inout.input << inout.output});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -125,7 +125,7 @@ QList<SystemCommandData> Deb::runCmd() {
|
|||||||
|
|
||||||
QStringList Deb::outPutFiles() const {
|
QStringList Deb::outPutFiles() const {
|
||||||
QStringList result;
|
QStringList result;
|
||||||
for (const auto& inout: qAsConst(inouts)) {
|
for (const auto& inout: std::as_const(inouts)) {
|
||||||
result.push_back(inout.output);
|
result.push_back(inout.output);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
@ -966,7 +966,7 @@ bool ConfigParser::setTargetsInDir(const QString &dir, bool recursive) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool result = false;
|
bool result = false;
|
||||||
for (const auto &file : qAsConst(list)) {
|
for (const auto &file : std::as_const(list)) {
|
||||||
|
|
||||||
if (file.isDir()) {
|
if (file.isDir()) {
|
||||||
result |= setTargetsInDir(file.absoluteFilePath(), recursive);
|
result |= setTargetsInDir(file.absoluteFilePath(), recursive);
|
||||||
|
@ -125,7 +125,7 @@ void DependenciesScanner::recursiveDep(LibInfo &lib, QSet<LibInfo> &res, QSet<QS
|
|||||||
|
|
||||||
libStack.insert(lib.fullPath());
|
libStack.insert(lib.fullPath());
|
||||||
|
|
||||||
for (const auto &i : qAsConst(lib._dependncies)) {
|
for (const auto &i : std::as_const(lib._dependncies)) {
|
||||||
|
|
||||||
auto libs = getLibsFromEnvirement(i);
|
auto libs = getLibsFromEnvirement(i);
|
||||||
|
|
||||||
|
@ -1053,7 +1053,7 @@ QFileInfo DeployCore::findItem(const QString &bin) {
|
|||||||
auto prefixes = QuasarAppUtils::Params::getArg("binPrefix").
|
auto prefixes = QuasarAppUtils::Params::getArg("binPrefix").
|
||||||
split(DeployCore::getSeparator(0), splitbehavior);
|
split(DeployCore::getSeparator(0), splitbehavior);
|
||||||
|
|
||||||
for (const QString& prefix :qAsConst(prefixes)) {
|
for (const QString& prefix :std::as_const(prefixes)) {
|
||||||
QFileInfo info(prefix + "/" + bin);
|
QFileInfo info(prefix + "/" + bin);
|
||||||
|
|
||||||
if (info.exists()) {
|
if (info.exists()) {
|
||||||
|
@ -18,7 +18,7 @@ ELF::ELF()
|
|||||||
QByteArrayList ELF::getDynamicString(ElfReader& reader) const {
|
QByteArrayList ELF::getDynamicString(ElfReader& reader) const {
|
||||||
auto headers = reader.readHeaders();
|
auto headers = reader.readHeaders();
|
||||||
|
|
||||||
for (const auto §ionHeader : qAsConst(headers.sectionHeaders)) {
|
for (const auto §ionHeader : std::as_const(headers.sectionHeaders)) {
|
||||||
if (sectionHeader.name == ".dynstr") {
|
if (sectionHeader.name == ".dynstr") {
|
||||||
auto arr = reader.readSection(sectionHeader.name).split(0);
|
auto arr = reader.readSection(sectionHeader.name).split(0);
|
||||||
return arr;
|
return arr;
|
||||||
|
@ -174,7 +174,7 @@ void Extracter::copyExtraPlugins(const QString& package) {
|
|||||||
QuasarAppUtils::Warning);
|
QuasarAppUtils::Warning);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const auto& plugin : qAsConst(plugins)) {
|
for (const auto& plugin : std::as_const(plugins)) {
|
||||||
extractPluginLib(plugin, package);
|
extractPluginLib(plugin, package);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -198,7 +198,7 @@ void Extracter::extractPlugins() {
|
|||||||
_fileManager->copyFiles(plugins, targetPath + distro.getPluginsOutDir(), 1,
|
_fileManager->copyFiles(plugins, targetPath + distro.getPluginsOutDir(), 1,
|
||||||
DeployCore::debugExtensions(), &listItems);
|
DeployCore::debugExtensions(), &listItems);
|
||||||
|
|
||||||
for (const auto &item : qAsConst(listItems)) {
|
for (const auto &item : std::as_const(listItems)) {
|
||||||
extractPluginLib(item, i.key());
|
extractPluginLib(item, i.key());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -281,7 +281,7 @@ bool Extracter::copyTr() {
|
|||||||
if (info.isDir()) {
|
if (info.isDir()) {
|
||||||
QDir dir(info.absoluteFilePath());
|
QDir dir(info.absoluteFilePath());
|
||||||
auto availableQm = dir.entryInfoList({"*.qm"}, QDir::Files);
|
auto availableQm = dir.entryInfoList({"*.qm"}, QDir::Files);
|
||||||
for (const auto & trFile : qAsConst(availableQm)) {
|
for (const auto & trFile : std::as_const(availableQm)) {
|
||||||
if (!_fileManager->copyFile(trFile.absoluteFilePath(),
|
if (!_fileManager->copyFile(trFile.absoluteFilePath(),
|
||||||
cnf->getPackageTargetDir(i.key()) + i->getTrOutDir())) {
|
cnf->getPackageTargetDir(i.key()) + i->getTrOutDir())) {
|
||||||
return false;
|
return false;
|
||||||
@ -415,7 +415,7 @@ void Extracter::extractLib(const QString &file,
|
|||||||
allDependencies = _scaner->scan(file).getAllDep();
|
allDependencies = _scaner->scan(file).getAllDep();
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const auto &line : qAsConst(allDependencies)) {
|
for (const auto &line : std::as_const(allDependencies)) {
|
||||||
|
|
||||||
if (mask.size() && !line.getName().contains(mask, DeployCore::getCaseSensitivity())) {
|
if (mask.size() && !line.getName().contains(mask, DeployCore::getCaseSensitivity())) {
|
||||||
continue;
|
continue;
|
||||||
@ -500,7 +500,7 @@ bool Extracter::extractQml() {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (const auto& plugin: qAsConst(plugins)) {
|
for (const auto& plugin: std::as_const(plugins)) {
|
||||||
const auto qmlFiles = QDir(plugin).entryInfoList(QDir::Files);
|
const auto qmlFiles = QDir(plugin).entryInfoList(QDir::Files);
|
||||||
for (const auto& qmlFile: qmlFiles) {
|
for (const auto& qmlFile: qmlFiles) {
|
||||||
toCopyQmlFiles.push_back(qmlFile.absoluteFilePath());
|
toCopyQmlFiles.push_back(qmlFile.absoluteFilePath());
|
||||||
@ -520,7 +520,7 @@ bool Extracter::extractQml() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
for (const auto &item : qAsConst(listItems)) {
|
for (const auto &item : std::as_const(listItems)) {
|
||||||
extractPluginLib(item, i.key());
|
extractPluginLib(item, i.key());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -180,7 +180,7 @@ bool FileManager::fileActionPrivate(const QString &file, const QString &target,
|
|||||||
|
|
||||||
bool copy = !masks;
|
bool copy = !masks;
|
||||||
if (masks) {
|
if (masks) {
|
||||||
for (const auto &mask : qAsConst(*masks)) {
|
for (const auto &mask : std::as_const(*masks)) {
|
||||||
if (info.absoluteFilePath().contains(mask, DeployCore::getCaseSensitivity())) {
|
if (info.absoluteFilePath().contains(mask, DeployCore::getCaseSensitivity())) {
|
||||||
copy = true;
|
copy = true;
|
||||||
break;
|
break;
|
||||||
@ -432,7 +432,7 @@ void FileManager::clear(const QString& targetDir, bool force) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QMultiMap<int, QFileInfo> sortedOldData;
|
QMultiMap<int, QFileInfo> sortedOldData;
|
||||||
for (const auto& i : qAsConst(_deployedFiles)) {
|
for (const auto& i : std::as_const(_deployedFiles)) {
|
||||||
sortedOldData.insert(i.size(), QFileInfo(i));
|
sortedOldData.insert(i.size(), QFileInfo(i));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
#include <quasarapp.h>
|
#include <quasarapp.h>
|
||||||
|
|
||||||
bool IgnoreRule::checkOnlytext(const QString &lib) {
|
bool IgnoreRule::checkOnlytext(const QString &lib) {
|
||||||
for (const auto &ignore : qAsConst(_data)) {
|
for (const auto &ignore : std::as_const(_data)) {
|
||||||
if (lib.contains(ignore.label)) {
|
if (lib.contains(ignore.label)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,7 @@ bool Packing::create() {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto package : qAsConst(_pakages)) {
|
for (auto package : std::as_const(_pakages)) {
|
||||||
|
|
||||||
if (!package) {
|
if (!package) {
|
||||||
internalError();
|
internalError();
|
||||||
@ -207,7 +207,7 @@ bool Packing::extractTemplates() {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto package : qAsConst(_pakages)) {
|
for (auto package : std::as_const(_pakages)) {
|
||||||
|
|
||||||
if (!package)
|
if (!package)
|
||||||
return false;
|
return false;
|
||||||
|
@ -163,7 +163,7 @@ void PluginsParser::addPlugins(const QStringList& list, const QString& package,
|
|||||||
QHash<QString, QSet<QString>>& container) {
|
QHash<QString, QSet<QString>>& container) {
|
||||||
const DeployConfig* cnf = DeployCore::_config;
|
const DeployConfig* cnf = DeployCore::_config;
|
||||||
|
|
||||||
for (const auto &plugin: qAsConst(list)) {
|
for (const auto &plugin: std::as_const(list)) {
|
||||||
if (QFileInfo(cnf->qtDir.getPlugins() + "/" + plugin).isDir()) {
|
if (QFileInfo(cnf->qtDir.getPlugins() + "/" + plugin).isDir()) {
|
||||||
auto listPlugins = QDir(cnf->qtDir.getPlugins() + "/" + plugin).entryInfoList(QDir::Files | QDir::NoDotAndDotDot);
|
auto listPlugins = QDir(cnf->qtDir.getPlugins() + "/" + plugin).entryInfoList(QDir::Files | QDir::NoDotAndDotDot);
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ bool QMLQt5::extractImportsFromDir(const QString &path, bool recursive) {
|
|||||||
|
|
||||||
for (const auto &info: files) {
|
for (const auto &info: files) {
|
||||||
auto imports = extractImportsFromFile(info.absoluteFilePath());
|
auto imports = extractImportsFromFile(info.absoluteFilePath());
|
||||||
for (const auto &import : qAsConst(imports)) {
|
for (const auto &import : std::as_const(imports)) {
|
||||||
if (!_imports.contains(import)) {
|
if (!_imports.contains(import)) {
|
||||||
_imports.insert(import);
|
_imports.insert(import);
|
||||||
extractImportsFromDir(getPathFromImport(import), recursive);
|
extractImportsFromDir(getPathFromImport(import), recursive);
|
||||||
@ -87,10 +87,10 @@ bool QMLQt5::extractImportsFromDir(const QString &path, bool recursive) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const auto& module: qAsConst(qmlmodule)) {
|
for (const auto& module: std::as_const(qmlmodule)) {
|
||||||
QStringList imports = extractImportsFromQmlModule(module.absoluteFilePath());
|
QStringList imports = extractImportsFromQmlModule(module.absoluteFilePath());
|
||||||
|
|
||||||
for (const auto &import : qAsConst(imports)) {
|
for (const auto &import : std::as_const(imports)) {
|
||||||
if (!_imports.contains(import)) {
|
if (!_imports.contains(import)) {
|
||||||
_imports.insert(import);
|
_imports.insert(import);
|
||||||
extractImportsFromDir(getPathFromImport(import), recursive);
|
extractImportsFromDir(getPathFromImport(import), recursive);
|
||||||
@ -155,7 +155,7 @@ bool QMLQt5::deployPath(const QString &path, QStringList &res) {
|
|||||||
QDir dir(path);
|
QDir dir(path);
|
||||||
auto infoList = dir.entryInfoList(QDir::NoDotAndDotDot | QDir::Files | QDir::Dirs);
|
auto infoList = dir.entryInfoList(QDir::NoDotAndDotDot | QDir::Files | QDir::Dirs);
|
||||||
|
|
||||||
for (const auto &info : qAsConst(infoList)) {
|
for (const auto &info : std::as_const(infoList)) {
|
||||||
if (DeployCore::isDebugFile(info.fileName())) {
|
if (DeployCore::isDebugFile(info.fileName())) {
|
||||||
QuasarAppUtils::Params::log("Skip debug library " +
|
QuasarAppUtils::Params::log("Skip debug library " +
|
||||||
info.absoluteFilePath());
|
info.absoluteFilePath());
|
||||||
@ -222,7 +222,7 @@ bool QMLQt5::scan(QStringList &res, const QString& _qmlProjectDir) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const auto &import : qAsConst(_imports)) {
|
for (const auto &import : std::as_const(_imports)) {
|
||||||
res.push_back(getPathFromImport(import));
|
res.push_back(getPathFromImport(import));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ bool QMLQt6::extractImportsFromDir(const QString &path, bool recursive) {
|
|||||||
|
|
||||||
for (const auto &info: files) {
|
for (const auto &info: files) {
|
||||||
auto imports = extractImportsFromFile(info.absoluteFilePath());
|
auto imports = extractImportsFromFile(info.absoluteFilePath());
|
||||||
for (const auto &import : qAsConst(imports)) {
|
for (const auto &import : std::as_const(imports)) {
|
||||||
if (!_imports.contains(import)) {
|
if (!_imports.contains(import)) {
|
||||||
_imports.insert(import);
|
_imports.insert(import);
|
||||||
extractImportsFromDir(getPathFromImport(import), false);
|
extractImportsFromDir(getPathFromImport(import), false);
|
||||||
@ -77,11 +77,11 @@ bool QMLQt6::extractImportsFromDir(const QString &path, bool recursive) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const auto& module: qAsConst(qmlmodule)) {
|
for (const auto& module: std::as_const(qmlmodule)) {
|
||||||
QStringList imports = extractImportsFromQmlModule(module.absoluteFilePath());
|
QStringList imports = extractImportsFromQmlModule(module.absoluteFilePath());
|
||||||
imports += extractImportsFromFile(module.absoluteFilePath());
|
imports += extractImportsFromFile(module.absoluteFilePath());
|
||||||
|
|
||||||
for (const auto &import : qAsConst(imports)) {
|
for (const auto &import : std::as_const(imports)) {
|
||||||
if (!_imports.contains(import)) {
|
if (!_imports.contains(import)) {
|
||||||
_imports.insert(import);
|
_imports.insert(import);
|
||||||
extractImportsFromDir(getPathFromImport(import), false);
|
extractImportsFromDir(getPathFromImport(import), false);
|
||||||
@ -153,7 +153,7 @@ bool QMLQt6::deployPath(const QString &path, QStringList &res) {
|
|||||||
QDir dir(path);
|
QDir dir(path);
|
||||||
auto infoList = dir.entryInfoList(QDir::NoDotAndDotDot | QDir::Files | QDir::Dirs);
|
auto infoList = dir.entryInfoList(QDir::NoDotAndDotDot | QDir::Files | QDir::Dirs);
|
||||||
|
|
||||||
for (const auto &info : qAsConst(infoList)) {
|
for (const auto &info : std::as_const(infoList)) {
|
||||||
if (DeployCore::isDebugFile(info.fileName())) {
|
if (DeployCore::isDebugFile(info.fileName())) {
|
||||||
QuasarAppUtils::Params::log("Skip debug library " +
|
QuasarAppUtils::Params::log("Skip debug library " +
|
||||||
info.absoluteFilePath());
|
info.absoluteFilePath());
|
||||||
@ -218,7 +218,7 @@ bool QMLQt6::scan(QStringList &res, const QString& _qmlProjectDir) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const auto &import : qAsConst(_imports)) {
|
for (const auto &import : std::as_const(_imports)) {
|
||||||
res.push_back(getPathFromImport(import));
|
res.push_back(getPathFromImport(import));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit a23bbe92689b472c69b73d0e49646de991a0390f
|
Subproject commit 3b797f9a7883bec4083dc8abf6159b0146f313d3
|
@ -60,7 +60,7 @@ static QUrl startupUrl()
|
|||||||
QUrl ret;
|
QUrl ret;
|
||||||
QStringList args(qApp->arguments());
|
QStringList args(qApp->arguments());
|
||||||
args.takeFirst();
|
args.takeFirst();
|
||||||
for (const QString &arg : qAsConst(args)) {
|
for (const QString &arg : std::as_const(args)) {
|
||||||
if (arg.startsWith(QLatin1Char('-')))
|
if (arg.startsWith(QLatin1Char('-')))
|
||||||
continue;
|
continue;
|
||||||
ret = Utils::fromUserInput(arg);
|
ret = Utils::fromUserInput(arg);
|
||||||
|
92
tests/modules/modulesqt6_6.cpp
Normal file
92
tests/modules/modulesqt6_6.cpp
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2023-2023 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_6.h"
|
||||||
|
|
||||||
|
ModulesQt6_6::ModulesQt6_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;
|
||||||
|
}
|
||||||
|
|
||||||
|
QSet<QString> ModulesQt6_6::qmlVirtualKeyBoadrLibs(const QString &distDir) const {
|
||||||
|
|
||||||
|
TestUtils utils;
|
||||||
|
|
||||||
|
auto Tree = ModulesQt6_5::qmlVirtualKeyBoadrLibs(distDir);
|
||||||
|
return Tree;
|
||||||
|
}
|
||||||
|
|
||||||
|
QSet<QString> ModulesQt6_6::qtWebEngine(const QString &distDir) const
|
||||||
|
{
|
||||||
|
TestUtils utils;
|
||||||
|
|
||||||
|
auto Tree = ModulesQt6_5::qtWebEngine(distDir);
|
||||||
|
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
Tree += utils.createTree(
|
||||||
|
{
|
||||||
|
"./" + distDir + "/resources/v8_context_snapshot.bin"
|
||||||
|
|
||||||
|
}
|
||||||
|
);
|
||||||
|
#else
|
||||||
|
Tree += utils.createTree(
|
||||||
|
{
|
||||||
|
"./" + distDir + "/resources/v8_context_snapshot.bin",
|
||||||
|
"./" + distDir + "/lib/libQt6WebChannelQuick.so",
|
||||||
|
"./" + distDir + "/qml/QtWebChannel/libwebchannelplugin.so",
|
||||||
|
"./" + distDir + "/qml/QtWebChannel/libwebchannelquickplugin.so",
|
||||||
|
|
||||||
|
}
|
||||||
|
);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return Tree;
|
||||||
|
}
|
||||||
|
|
||||||
|
QSet<QString> ModulesQt6_6::qtLibs(const QString &distDir) const {
|
||||||
|
auto Tree = ModulesQt6_5::qtLibs(distDir);
|
||||||
|
TestUtils utils;
|
||||||
|
|
||||||
|
|
||||||
|
return Tree;
|
||||||
|
}
|
||||||
|
|
||||||
|
QSet<QString> ModulesQt6_6::qtWebEngineWidgets(const QString &distDir) const
|
||||||
|
{
|
||||||
|
TestUtils utils;
|
||||||
|
|
||||||
|
auto Tree = ModulesQt6_5::qtWebEngineWidgets(distDir);
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
Tree += utils.createTree(
|
||||||
|
{
|
||||||
|
"./" + distDir + "/resources/v8_context_snapshot.bin"
|
||||||
|
|
||||||
|
}
|
||||||
|
);
|
||||||
|
#else
|
||||||
|
Tree += utils.createTree(
|
||||||
|
{
|
||||||
|
"./" + distDir + "/resources/v8_context_snapshot.bin"
|
||||||
|
}
|
||||||
|
);
|
||||||
|
#endif
|
||||||
|
return Tree;
|
||||||
|
}
|
24
tests/modules/modulesqt6_6.h
Normal file
24
tests/modules/modulesqt6_6.h
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2023-2023 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_6_H
|
||||||
|
#define MODULESQT6_6_H
|
||||||
|
|
||||||
|
#include "modulesqt6_5.h"
|
||||||
|
|
||||||
|
class ModulesQt6_6: public ModulesQt6_5
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ModulesQt6_6();
|
||||||
|
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_5_H
|
@ -78,7 +78,7 @@
|
|||||||
// Check exampletests
|
// Check exampletests
|
||||||
#define TestCase(name, testClass) \
|
#define TestCase(name, testClass) \
|
||||||
void name() { \
|
void name() { \
|
||||||
initTest(new testClass()); \
|
initTest(new testClass); \
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -159,8 +159,8 @@ private slots:
|
|||||||
TestCase(ziparrchivetest, ZIPArchiveTest )
|
TestCase(ziparrchivetest, ZIPArchiveTest )
|
||||||
TestCase(zipmultitest, ZIPMultiTest )
|
TestCase(zipmultitest, ZIPMultiTest )
|
||||||
TestCase(ziptest, ZIPTest )
|
TestCase(ziptest, ZIPTest )
|
||||||
TestCase(systemLibTest, SystemLibTest)
|
|
||||||
TestCase(qmlfiledialogtest, QmlFileDialogTest)
|
TestCase(qmlfiledialogtest, QmlFileDialogTest)
|
||||||
|
TestCase(systemLibTest, SystemLibTest)
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@ -314,11 +314,12 @@ void tstMain::initTest(Test *test) {
|
|||||||
delete e;
|
delete e;
|
||||||
}
|
}
|
||||||
|
|
||||||
delete test;
|
|
||||||
_app->exit(0);
|
_app->exit(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
_app->exec();
|
_app->exec();
|
||||||
|
|
||||||
|
delete test;
|
||||||
}
|
}
|
||||||
|
|
||||||
QTEST_APPLESS_MAIN(tstMain)
|
QTEST_APPLESS_MAIN(tstMain)
|
||||||
|
@ -47,7 +47,7 @@ void CheckQtTest::test() {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
for (const auto &i: qAsConst(cases)) {
|
for (const auto &i: std::as_const(cases)) {
|
||||||
QVERIFY(DeployCore::isQtLib(i.first) == i.second);
|
QVERIFY(DeployCore::isQtLib(i.first) == i.second);
|
||||||
}
|
}
|
||||||
delete deployer;
|
delete deployer;
|
||||||
@ -109,7 +109,7 @@ void CheckQtTest::test() {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
for (const auto &i: qAsConst(cases)) {
|
for (const auto &i: std::as_const(cases)) {
|
||||||
auto dexription = QString("The isQtLib(%0) function should be return %1").arg(
|
auto dexription = QString("The isQtLib(%0) function should be return %1").arg(
|
||||||
i.first).arg(i.second);
|
i.first).arg(i.second);
|
||||||
QVERIFY2(DeployCore::isQtLib(i.first) == i.second, dexription.toLatin1().data());
|
QVERIFY2(DeployCore::isQtLib(i.first) == i.second, dexription.toLatin1().data());
|
||||||
|
@ -41,7 +41,7 @@ void DistroStructTest::test() {
|
|||||||
{"\\\\res\\\\\\type\\\\\\\\\\","/../../"},
|
{"\\\\res\\\\\\type\\\\\\\\\\","/../../"},
|
||||||
};
|
};
|
||||||
|
|
||||||
for (const auto &i: qAsConst(cases)) {
|
for (const auto &i: std::as_const(cases)) {
|
||||||
if (distro.getRelativePath(i.first) != i.second)
|
if (distro.getRelativePath(i.first) != i.second)
|
||||||
QVERIFY(false);
|
QVERIFY(false);
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,11 @@ void ExtraPluginTest::test() {
|
|||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 6, 0)
|
||||||
|
pluginTree += utils.createTree({"./" + DISTRO_DIR + "/plugins/sqldrivers/libqsqlmimer.so"});
|
||||||
|
#endif
|
||||||
|
|
||||||
#else
|
#else
|
||||||
QString bin = TestBinDir + "QtWidgetsProject.exe";
|
QString bin = TestBinDir + "QtWidgetsProject.exe";
|
||||||
QString qmake = TestQtDir + "bin/qmake.exe";
|
QString qmake = TestQtDir + "bin/qmake.exe";
|
||||||
@ -50,6 +55,10 @@ void ExtraPluginTest::test() {
|
|||||||
"./" + DISTRO_DIR + "/libpq.dll",
|
"./" + DISTRO_DIR + "/libpq.dll",
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 6, 0)
|
||||||
|
pluginTree.insert("./" + DISTRO_DIR + "/plugins/sqldrivers/qsqlmimer.dll");
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
auto comapareTree = TestModule.qtLibs();
|
auto comapareTree = TestModule.qtLibs();
|
||||||
|
@ -76,7 +76,7 @@ void IconsTest::test() {
|
|||||||
"-icon", ":/testResurces/testRes/TestIcon.png",
|
"-icon", ":/testResurces/testRes/TestIcon.png",
|
||||||
});
|
});
|
||||||
|
|
||||||
for (const auto &target : qAsConst(binMulti)) {
|
for (const auto &target : std::as_const(binMulti)) {
|
||||||
QFileInfo tarInfo(target);
|
QFileInfo tarInfo(target);
|
||||||
|
|
||||||
targetsMap = deploy->_config.getTargetsListByFilter(tarInfo.baseName());
|
targetsMap = deploy->_config.getTargetsListByFilter(tarInfo.baseName());
|
||||||
|
@ -26,7 +26,7 @@ void QMLExtractTest::test() {
|
|||||||
QMLQt5 scaner("./");
|
QMLQt5 scaner("./");
|
||||||
|
|
||||||
|
|
||||||
for (const auto &file : qAsConst(qmlFiles)) {
|
for (const auto &file : std::as_const(qmlFiles)) {
|
||||||
|
|
||||||
|
|
||||||
auto fileImports = scaner.extractImportsFromFile(file);
|
auto fileImports = scaner.extractImportsFromFile(file);
|
||||||
|
@ -36,10 +36,25 @@ void QmlFileDialogTest::test() {
|
|||||||
"./" + DISTRO_DIR + "/qml/QtCore/qmldir",
|
"./" + DISTRO_DIR + "/qml/QtCore/qmldir",
|
||||||
"./" + DISTRO_DIR + "/qml/QtQuick/Dialogs/libqtquickdialogsplugin.so",
|
"./" + DISTRO_DIR + "/qml/QtQuick/Dialogs/libqtquickdialogsplugin.so",
|
||||||
"./" + DISTRO_DIR + "/qml/QtQuick/Dialogs/plugins.qmltypes",
|
"./" + DISTRO_DIR + "/qml/QtQuick/Dialogs/plugins.qmltypes",
|
||||||
"./" + DISTRO_DIR + "/qml/QtQuick/Dialogs/qmldir"
|
"./" + DISTRO_DIR + "/qml/QtQuick/Dialogs/qmldir",
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 6, 0)
|
||||||
|
compareTree += utils.createTree(
|
||||||
|
{
|
||||||
|
"./" + DISTRO_DIR + "/lib/libQt6QuickLayouts.so",
|
||||||
|
"./" + DISTRO_DIR + "/qml/QtQuick/Dialogs/quickimpl/libqtquickdialogs2quickimplplugin.so",
|
||||||
|
"./" + DISTRO_DIR + "/qml/QtQuick/Dialogs/quickimpl/plugins.qmltypes",
|
||||||
|
"./" + DISTRO_DIR + "/qml/QtQuick/Dialogs/quickimpl/qmldir",
|
||||||
|
"./" + DISTRO_DIR + "/qml/QtQuick/Layouts/libqquicklayoutsplugin.so",
|
||||||
|
"./" + DISTRO_DIR + "/qml/QtQuick/Layouts/plugins.qmltypes",
|
||||||
|
"./" + DISTRO_DIR + "/qml/QtQuick/Layouts/qmldir"
|
||||||
|
|
||||||
|
}
|
||||||
|
);
|
||||||
|
#endif
|
||||||
|
|
||||||
auto bin = TestBinDir + "QMLFileDialog";
|
auto bin = TestBinDir + "QMLFileDialog";
|
||||||
|
|
||||||
runTestParams({"-bin", bin, "clear" ,
|
runTestParams({"-bin", bin, "clear" ,
|
||||||
|
@ -33,7 +33,7 @@ void QmlScanerTest::test() {
|
|||||||
|
|
||||||
QVERIFY(results.size() == imports.size());
|
QVERIFY(results.size() == imports.size());
|
||||||
|
|
||||||
for (const auto &import: qAsConst(imports)) {
|
for (const auto &import: std::as_const(imports)) {
|
||||||
auto path = scaner6.getPathFromImport(import);
|
auto path = scaner6.getPathFromImport(import);
|
||||||
QVERIFY(results.contains(path));
|
QVERIFY(results.contains(path));
|
||||||
}
|
}
|
||||||
@ -42,7 +42,7 @@ void QmlScanerTest::test() {
|
|||||||
|
|
||||||
QVERIFY(results.size() == imports.size());
|
QVERIFY(results.size() == imports.size());
|
||||||
|
|
||||||
for (const auto & import: qAsConst(imports)) {
|
for (const auto & import: std::as_const(imports)) {
|
||||||
auto path = scaner6.getPathFromImport(import);
|
auto path = scaner6.getPathFromImport(import);
|
||||||
QVERIFY(results.contains(path));
|
QVERIFY(results.contains(path));
|
||||||
}
|
}
|
||||||
@ -62,7 +62,7 @@ void QmlScanerTest::test() {
|
|||||||
|
|
||||||
QVERIFY(results.size() == imports.size());
|
QVERIFY(results.size() == imports.size());
|
||||||
|
|
||||||
for (const auto &import: qAsConst(imports)) {
|
for (const auto &import: std::as_const(imports)) {
|
||||||
auto path = scaner6.getPathFromImport(import);
|
auto path = scaner6.getPathFromImport(import);
|
||||||
QVERIFY(results.contains(path));
|
QVERIFY(results.contains(path));
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ void ReleativeLinkTest::test() {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
for (const auto &i: qAsConst(cases)) {
|
for (const auto &i: std::as_const(cases)) {
|
||||||
if (PathUtils::getRelativeLink(i[0], i[1]) != i[2])
|
if (PathUtils::getRelativeLink(i[0], i[1]) != i[2])
|
||||||
QVERIFY(false);
|
QVERIFY(false);
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,10 @@
|
|||||||
#include <configparser.h>
|
#include <configparser.h>
|
||||||
#include <QSet>
|
#include <QSet>
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
|
#if 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)
|
||||||
#include "modulesqt6_5.h"
|
#include "modulesqt6_5.h"
|
||||||
class Modules: public ModulesQt6_5
|
class Modules: public ModulesQt6_5
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ void TestBase::checkResults(const QSet<QString> &tree, bool noWarnings, bool onl
|
|||||||
}
|
}
|
||||||
|
|
||||||
QJsonObject obj;
|
QJsonObject obj;
|
||||||
for (const auto &i : qAsConst(resultTree)) {
|
for (const auto &i : std::as_const(resultTree)) {
|
||||||
obj[i];
|
obj[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ QSet<QString> TestUtils::getTree(const QString &path, int limit, int depch) {
|
|||||||
|
|
||||||
QDir dir(info.absoluteFilePath());
|
QDir dir(info.absoluteFilePath());
|
||||||
auto list = dir.entryInfoList(QDir::AllEntries | QDir::NoDotAndDotDot);
|
auto list = dir.entryInfoList(QDir::AllEntries | QDir::NoDotAndDotDot);
|
||||||
for (const auto &i: qAsConst(list)) {
|
for (const auto &i: std::as_const(list)) {
|
||||||
result.unite(getTree(i.absoluteFilePath(), limit, depch + 1));
|
result.unite(getTree(i.absoluteFilePath(), limit, depch + 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ QSet<QString> TestUtils::getFilesSet(const QString &path, int limit, int depch)
|
|||||||
|
|
||||||
QDir dir(info.absoluteFilePath());
|
QDir dir(info.absoluteFilePath());
|
||||||
auto list = dir.entryInfoList(QDir::AllEntries | QDir::NoDotAndDotDot);
|
auto list = dir.entryInfoList(QDir::AllEntries | QDir::NoDotAndDotDot);
|
||||||
for (const auto &i: qAsConst(list)) {
|
for (const auto &i: std::as_const(list)) {
|
||||||
result.unite(getFilesSet(i.absoluteFilePath(), limit, depch + 1));
|
result.unite(getFilesSet(i.absoluteFilePath(), limit, depch + 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -109,11 +109,11 @@ QHash<QString, int> TestUtils::compareTree(const QSet<QString> &leftTree, const
|
|||||||
auto valuel = leftTree - rightTree;
|
auto valuel = leftTree - rightTree;
|
||||||
auto valuer = rightTree - leftTree;
|
auto valuer = rightTree - leftTree;
|
||||||
|
|
||||||
for(auto &i :qAsConst(valuel)) {
|
for(auto &i :std::as_const(valuel)) {
|
||||||
result.insert(i, 1);
|
result.insert(i, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(auto &i :qAsConst(valuer)) {
|
for(auto &i :std::as_const(valuer)) {
|
||||||
result.insert(i, -1);
|
result.insert(i, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user