2019-12-08 13:57:20 +03:00
|
|
|
//#
|
2022-03-09 17:56:42 +03:00
|
|
|
//# Copyright (C) 2018-2022 QuasarApp.
|
2019-12-08 13:57:20 +03:00
|
|
|
//# 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 "dependencymap.h"
|
2019-12-15 18:30:24 +03:00
|
|
|
#include "deploycore.h"
|
2019-12-08 13:57:20 +03:00
|
|
|
#include "quasarapp.h"
|
|
|
|
|
|
|
|
DependencyMap::DependencyMap() {
|
|
|
|
_qtModules = DeployCore::QtModule::NONE;
|
|
|
|
}
|
|
|
|
|
|
|
|
DependencyMap &DependencyMap::operator +=(const DependencyMap &other) {
|
|
|
|
this->_qtModules = this->_qtModules | other._qtModules;
|
|
|
|
this->_neadedLibs = this->_neadedLibs + other._neadedLibs;
|
|
|
|
this->_systemLibs = this->_systemLibs + other._systemLibs;
|
2020-12-04 17:13:12 +03:00
|
|
|
this->_extraData = this->_extraData + other._extraData;
|
2019-12-08 13:57:20 +03:00
|
|
|
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
DependencyMap &DependencyMap::operator -=(const DependencyMap &other) {
|
|
|
|
this->_qtModules = this->_qtModules & (~other._qtModules);
|
|
|
|
this->_neadedLibs = this->_neadedLibs - other._neadedLibs;
|
|
|
|
this->_systemLibs = this->_systemLibs - other._systemLibs;
|
2020-12-04 17:13:12 +03:00
|
|
|
this->_extraData = this->_extraData - other._extraData;
|
2019-12-08 13:57:20 +03:00
|
|
|
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
DeployCore::QtModule DependencyMap::qtModules() const {
|
|
|
|
return _qtModules;
|
|
|
|
}
|
|
|
|
|
|
|
|
const QSet<QString>& DependencyMap::neadedLibs() const {
|
|
|
|
return _neadedLibs;
|
|
|
|
}
|
|
|
|
|
|
|
|
const QSet<QString> &DependencyMap::systemLibs() const {
|
|
|
|
return _systemLibs;
|
|
|
|
}
|
|
|
|
|
|
|
|
void DependencyMap::addModule(DeployCore::QtModule module) {
|
|
|
|
this->_qtModules = this->_qtModules | module;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void DependencyMap::addSystemLib(const QString &lib) {
|
|
|
|
_systemLibs.insert(lib);
|
|
|
|
}
|
|
|
|
|
|
|
|
void DependencyMap::addNeadedLib(const QString &lib) {
|
|
|
|
_neadedLibs.insert(lib);
|
2019-12-15 18:30:24 +03:00
|
|
|
DeployCore::addQtModule(_qtModules, lib);
|
2019-12-08 13:57:20 +03:00
|
|
|
}
|
|
|
|
|
2020-12-04 17:13:12 +03:00
|
|
|
void DependencyMap::addExtraData(const QString &data) {
|
|
|
|
_extraData += data;
|
|
|
|
}
|
|
|
|
|
2019-12-08 13:57:20 +03:00
|
|
|
void DependencyMap::removeModule(DeployCore::QtModule module) {
|
|
|
|
_qtModules = _qtModules & (~module);
|
|
|
|
}
|
|
|
|
|
|
|
|
void DependencyMap::removeSystemLib(const QString &lib) {
|
|
|
|
_systemLibs.remove(lib);
|
|
|
|
}
|
|
|
|
|
|
|
|
void DependencyMap::removeNeadedLib(const QString &lib) {
|
|
|
|
_neadedLibs.remove(lib);
|
|
|
|
}
|
|
|
|
|
2020-12-04 17:13:12 +03:00
|
|
|
void DependencyMap::removeExtraData(const QString &data) {
|
|
|
|
_extraData -= data;
|
|
|
|
}
|
|
|
|
|
2019-12-08 13:57:20 +03:00
|
|
|
bool DependencyMap::containsSysLib(const QString &lib) const {
|
|
|
|
return _systemLibs.contains(lib);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool DependencyMap::containsModule(DeployCore::QtModule module) const {
|
|
|
|
return _qtModules & module;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool DependencyMap::containsNeadedLib(const QString &lib) const {
|
|
|
|
return _neadedLibs.contains(lib);
|
|
|
|
}
|
|
|
|
|
2020-12-04 17:13:12 +03:00
|
|
|
bool DependencyMap::containsExtraData(const QString &data) const {
|
|
|
|
return _extraData.contains(data);
|
|
|
|
}
|
|
|
|
|
|
|
|
const QSet<QString> DependencyMap::targets() const {
|
2019-12-13 23:05:07 +03:00
|
|
|
return _targets;
|
|
|
|
}
|
|
|
|
|
2020-12-04 17:13:12 +03:00
|
|
|
|
|
|
|
const QSet<QString> DependencyMap::extraData() const {
|
|
|
|
return _extraData;
|
2019-12-13 23:05:07 +03:00
|
|
|
}
|
|
|
|
|
2020-12-04 17:13:12 +03:00
|
|
|
|