Add full constructor

This commit is contained in:
Luis Ángel San Martín 2022-10-09 11:20:39 +02:00
parent 1a420c9679
commit 41767958d0
2 changed files with 17 additions and 2 deletions

View File

@ -20,6 +20,20 @@ Folder::Folder(qulonglong folderId, qulonglong parentId, const QString &folderNa
this->path = folderPath; this->path = folderPath;
} }
Folder::Folder(qulonglong folderId, qulonglong parentId, const QString &folderName, const QString &folderPath, bool completed, bool finished, bool manga)
: knownParent(true),
knownId(true),
numChildren(-1)
{
this->id = folderId;
this->parentId = parentId;
this->name = folderName;
this->path = folderPath;
this->completed = completed;
this->finished = finished;
this->manga = manga;
}
Folder::Folder(const Folder &folder) Folder::Folder(const Folder &folder)
{ {
operator=(folder); operator=(folder);

View File

@ -13,6 +13,7 @@ public:
Folder(); Folder();
Folder(qulonglong folderId, qulonglong parentId, const QString &folderName, const QString &folderPath); Folder(qulonglong folderId, qulonglong parentId, const QString &folderName, const QString &folderPath);
Folder(qulonglong folderId, qulonglong parentId, const QString &folderName, const QString &folderPath, bool completed, bool finished, bool manga);
Folder(const QString &folderName, const QString &folderPath); Folder(const QString &folderName, const QString &folderPath);
Folder(const Folder &folder); Folder(const Folder &folder);
Folder &operator=(const Folder &other); Folder &operator=(const Folder &other);
@ -94,8 +95,8 @@ public:
} }
private: private:
bool finished; bool finished; // finished means read, the user has read all the content in this folder
bool completed; bool completed; // completed means the folder has all the content, e.g. a series got its final issue and the user has collected all of them
bool manga; bool manga;
qint32 numChildren; //-1 for unknown number of children qint32 numChildren; //-1 for unknown number of children