48 lines
885 B
C++
48 lines
885 B
C++
![]() |
#include "search-dir.h"
|
||
|
|
||
|
SearchDir::SearchDir(const QString &path, bool generateBlackList)
|
||
|
{
|
||
|
m_path = path;
|
||
|
if(generateBlackList) {
|
||
|
//根据VulumeManager和Congig的数据计算黑名单here
|
||
|
}
|
||
|
}
|
||
|
|
||
|
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;
|
||
|
}
|