refactor(Mods): make provider() return a std::optional

This makes it easier to check if a mod has a provider or not, without
having to do a string comparison.

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow
2022-12-29 12:39:20 -03:00
parent aa3633d2d7
commit 257970c27d
3 changed files with 18 additions and 10 deletions

View File

@ -39,6 +39,8 @@
#include <QFileInfo>
#include <QList>
#include <optional>
#include "Resource.h"
#include "ModDetails.h"
@ -61,7 +63,7 @@ public:
auto description() const -> QString;
auto authors() const -> QStringList;
auto status() const -> ModStatus;
auto provider() const -> QString;
auto provider() const -> std::optional<QString>;
auto metadata() -> std::shared_ptr<Metadata::ModStruct>;
auto metadata() const -> const std::shared_ptr<Metadata::ModStruct>;