2023-04-06 10:39:10 +08:00
|
|
|
#include "search-dir.h"
|
|
|
|
|
|
|
|
SearchDir::SearchDir(const QString &path, bool generateBlackList)
|
|
|
|
{
|
|
|
|
m_path = path;
|
|
|
|
if(generateBlackList) {
|
|
|
|
//根据VulumeManager和Congig的数据计算黑名单here
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-08 11:45:59 +08:00
|
|
|
bool SearchDir::operator ==(const SearchDir &rhs) const
|
|
|
|
{
|
|
|
|
return (m_path == rhs.m_path);
|
|
|
|
}
|
|
|
|
|
2023-04-06 10:39:10 +08:00
|
|
|
SearchDir::ErrorInfo SearchDir::error()
|
|
|
|
{
|
|
|
|
return m_error;
|
|
|
|
}
|
|
|
|
|
|
|
|
QString SearchDir::errorString()
|
|
|
|
{
|
|
|
|
switch (m_error) {
|
|
|
|
case ErrorInfo::Successful:
|
|
|
|
return "";
|
|
|
|
case ErrorInfo::Duplicated:
|
|
|
|
return "";
|
|
|
|
case ErrorInfo::UnderBlackList:
|
|
|
|
return "";
|
|
|
|
case ErrorInfo::RepeatMount1:
|
|
|
|
return "";
|
|
|
|
case ErrorInfo::RepeatMount2:
|
|
|
|
return "";
|
|
|
|
case ErrorInfo::NotExists:
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
QString SearchDir::getPath() const
|
|
|
|
{
|
|
|
|
return m_path;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SearchDir::setBlackList(const QStringList &blackList)
|
|
|
|
{
|
|
|
|
m_blackList = blackList;
|
|
|
|
}
|
|
|
|
|
|
|
|
QStringList SearchDir::getBlackList() const
|
|
|
|
{
|
|
|
|
return m_blackList;
|
|
|
|
}
|
2023-04-08 11:45:59 +08:00
|
|
|
|
|
|
|
void SearchDir::generateBlackList()
|
|
|
|
{
|
|
|
|
//生成黑名单
|
|
|
|
}
|