removed some duplicate code
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
@@ -20,14 +20,13 @@ class ResourcePackResourceModel : public ResourceModel {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ResourcePackResourceModel(BaseInstance const&, ResourceAPI*);
|
||||
ResourcePackResourceModel(BaseInstance const&, ResourceAPI*, QString debugName, QString metaEntryBase);
|
||||
|
||||
/* Ask the API for more information */
|
||||
void searchWithTerm(const QString& term, unsigned int sort);
|
||||
|
||||
void loadIndexedPack(ModPlatform::IndexedPack&, QJsonObject&) override = 0;
|
||||
void loadExtraPackInfo(ModPlatform::IndexedPack&, QJsonObject&) override = 0;
|
||||
void loadIndexedPackVersions(ModPlatform::IndexedPack&, QJsonArray&) override = 0;
|
||||
[[nodiscard]] QString debugName() const override { return m_debugName; }
|
||||
[[nodiscard]] QString metaEntryBase() const override { return m_metaEntryBase; }
|
||||
|
||||
public slots:
|
||||
ResourceAPI::SearchArgs createSearchArguments() override;
|
||||
@@ -37,7 +36,9 @@ class ResourcePackResourceModel : public ResourceModel {
|
||||
protected:
|
||||
const BaseInstance& m_base_instance;
|
||||
|
||||
auto documentToArray(QJsonDocument& obj) const -> QJsonArray override = 0;
|
||||
private:
|
||||
QString m_debugName;
|
||||
QString m_metaEntryBase;
|
||||
};
|
||||
|
||||
} // namespace ResourceDownload
|
||||
|
||||
Reference in New Issue
Block a user