Use std::shared_ptrfor AlbumCoverLoaderResult

Reduces memory fragmentation with Qt 6
This commit is contained in:
Jonas Kvinge
2023-04-06 23:18:10 +02:00
parent 962536bc83
commit b660287779
38 changed files with 363 additions and 294 deletions

View File

@@ -83,12 +83,12 @@ class AlbumCoverSearcher : public QDialog {
Role_ImageData,
Role_Image,
Role_ImageDimensions,
Role_ImageSize,
Role_ImageSize
};
void Init(AlbumCoverFetcher *fetcher);
AlbumCoverImageResult Exec(const QString &artist, const QString &album);
AlbumCoverImageResultPtr Exec(const QString &artist, const QString &album);
protected:
void keyPressEvent(QKeyEvent*) override;
@@ -96,7 +96,7 @@ class AlbumCoverSearcher : public QDialog {
private slots:
void Search();
void SearchFinished(const quint64 id, const CoverProviderSearchResults &results);
void AlbumCoverLoaded(const quint64 id, const AlbumCoverLoaderResult &result);
void AlbumCoverLoaded(const quint64 id, AlbumCoverLoaderResultPtr result);
void CoverDoubleClicked(const QModelIndex &idx);