父节点
5076f044a6
当前提交
36b6390292
@ -75,6 +75,10 @@ EntryConfig EntryProvider::readFromDesktopFile(const QString &path)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(key == "nodisplay")
|
||||||
|
{
|
||||||
|
result.hidden = args == "true";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -201,13 +205,18 @@ QVector<EntryConfig> EntryProvider::readConfig(QStringList paths)
|
|||||||
if(info.isFile())
|
if(info.isFile())
|
||||||
{
|
{
|
||||||
QString suffix = info.suffix();
|
QString suffix = info.suffix();
|
||||||
|
EntryConfig entry;
|
||||||
if(suffix == "desktop")
|
if(suffix == "desktop")
|
||||||
{
|
{
|
||||||
result.append(readFromDesktopFile(path));
|
entry = readFromDesktopFile(path);
|
||||||
}
|
}
|
||||||
if(suffix == "qsrun")
|
if(suffix == "qsrun")
|
||||||
{
|
{
|
||||||
result.append(readFromFile(path));
|
entry = readFromFile(path);
|
||||||
|
}
|
||||||
|
if(!entry.hidden && entry.name != "")
|
||||||
|
{
|
||||||
|
result.append(entry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,7 @@ class ConfigFormatException : public std::runtime_error
|
|||||||
class EntryConfig
|
class EntryConfig
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
bool hidden = false;
|
||||||
QString key;
|
QString key;
|
||||||
QString name;
|
QString name;
|
||||||
QString command;
|
QString command;
|
||||||
|
正在加载...
在新工单中引用
屏蔽一个用户