mirror of
				https://github.com/YACReader/yacreader
				synced 2025-10-31 08:14:29 -04:00 
			
		
		
		
	comic vine search query working
This commit is contained in:
		| @ -1,6 +1,7 @@ | ||||
| #include "comic_db.h" | ||||
|  | ||||
| #include <QVariant> | ||||
| #include <QFileInfo> | ||||
|  | ||||
| //----------------------------------------------------------------------------- | ||||
| //COMIC------------------------------------------------------------------------ | ||||
| @ -106,6 +107,15 @@ QString ComicDB::toTXT() | ||||
|  | ||||
| 	return txt; | ||||
| } | ||||
|  | ||||
| QString ComicDB::getTitleOrPath() | ||||
| { | ||||
| 	if(info.title && info.title->isEmpty()) | ||||
| 		return *(info.title); | ||||
| 	else | ||||
| 		return QFileInfo(path).fileName(); | ||||
| } | ||||
|  | ||||
| //----------------------------------------------------------------------------- | ||||
| //COMIC_INFO------------------------------------------------------------------- | ||||
| //----------------------------------------------------------------------------- | ||||
| @ -618,4 +628,4 @@ QDataStream &operator>>(QDataStream & stream, ComicInfo & comicInfo) | ||||
| 	deserializeField(stream,comicInfo.characters); | ||||
| 	deserializeField(stream,comicInfo.notes); | ||||
| 	return stream; | ||||
| } | ||||
| } | ||||
|  | ||||
| @ -132,6 +132,9 @@ public: | ||||
|  | ||||
| 	bool hasCover() {return _hasCover;}; | ||||
|  | ||||
| 	//returns comic title if it isn't null or empty, in other case returns fileName | ||||
| 	QString getTitleOrPath(); | ||||
|  | ||||
| 	QString toTXT(); | ||||
| 	 | ||||
| 	ComicInfo info; | ||||
| @ -144,4 +147,4 @@ public: | ||||
|  | ||||
| Q_DECLARE_METATYPE(ComicDB); | ||||
|  | ||||
| #endif | ||||
| #endif | ||||
|  | ||||
		Reference in New Issue
	
	Block a user