2019-09-23 16:46:57 +03:00
|
|
|
//#
|
|
|
|
//# Copyright (C) 2018-2019 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.
|
|
|
|
//#
|
|
|
|
|
2019-09-22 17:31:18 +03:00
|
|
|
#ifndef IGNORERULE_H
|
|
|
|
#define IGNORERULE_H
|
|
|
|
|
|
|
|
#include "envirement.h"
|
|
|
|
#include "libinfo.h"
|
|
|
|
|
|
|
|
#include <QString>
|
|
|
|
#include <deploycore.h>
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief The IgnoreData struct
|
|
|
|
* ignore file with label and othe rooles
|
|
|
|
*/
|
|
|
|
struct IgnoreData{
|
2019-09-23 10:06:22 +03:00
|
|
|
IgnoreData(const QString& label = "");
|
|
|
|
|
2019-09-22 17:31:18 +03:00
|
|
|
QString label;
|
|
|
|
Platform platform = UnknownPlatform;
|
|
|
|
LibPriority prority = NotFile;
|
|
|
|
Envirement enfirement;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class IgnoreRule
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
QList<IgnoreData> _data;
|
|
|
|
|
|
|
|
bool checkOnlytext(const QString& lib);
|
|
|
|
|
2019-09-23 10:06:22 +03:00
|
|
|
bool check(const LibInfo &info, const QString &ignoreLabel) const;
|
2019-09-22 17:31:18 +03:00
|
|
|
public:
|
|
|
|
IgnoreRule();
|
|
|
|
void addRule(const IgnoreData& rule);
|
2019-10-15 13:35:50 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief isIgnore
|
|
|
|
* @param info
|
|
|
|
* @return const ptr to ignore data
|
|
|
|
*/
|
|
|
|
const IgnoreData *isIgnore(const LibInfo& info) const;
|
2019-09-22 17:31:18 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // IGNORERULE_H
|