EntryProvider: Introduce readEntryFromPath()

Inheritance: Use readEntryFromPath instead of assuming always .desktop
files

Switch project to C++17
此提交包含在:
2020-09-06 22:23:36 +02:00
父節點 36b6390292
當前提交 edb781580e
共有 3 個檔案被更改,包括 33 行新增19 行删除

查看文件

@ -2,6 +2,7 @@
#define ENTRYPROVIDER_H
#include <QIcon>
#include <QSettings>
#include <optional>
class ConfigFormatException : public std::runtime_error
{
@ -35,8 +36,9 @@ class EntryProvider
QStringList _desktopIgnoreArgs;
QStringList userEntriesDirsPaths;
QStringList systemEntriesDirsPaths;
EntryConfig readFromFile(const QString &path);
EntryConfig readqsrunFile(const QString &path);
EntryConfig readFromDesktopFile(const QString &path);
std::optional<EntryConfig> readEntryFromPath(const QString &path);
QVector<EntryConfig> readConfig(QStringList paths);
QString resolveEntryPath(QString path);