Added copy constructors and operator= to folder and comicdb, LibraryItem has to be a QObject, and QObject disables copy.

This commit is contained in:
Luis Ángel San Martín
2016-04-11 19:25:33 +02:00
parent 7ed4c27c01
commit 2149af25b1
6 changed files with 70 additions and 16 deletions

View File

@ -11,6 +11,11 @@ ComicDB::ComicDB()
}
ComicDB::ComicDB(const ComicDB &comicDB)
{
operator=(comicDB);
}
bool ComicDB::isDir()
{
return false;
@ -105,7 +110,18 @@ QString ComicDB::toTXT()
if(!info.notes.isNull())
txt.append(QString("notes:%1\r\n").arg(info.notes.toString()));
return txt;
return txt;
}
ComicDB &ComicDB::operator=(const ComicDB &other)
{
LibraryItem::operator =(other);
this->_hasCover = other._hasCover;
this->info = other.info;
return *this;
}
QString ComicDB::getFileName() const