Compare commits

...

9 Commits
1.2.5 ... 1.2.6

Author SHA1 Message Date
Jonas Kvinge
b832675893 Release 1.2.6 2025-01-17 10:27:48 +01:00
Jonas Kvinge
b4cfe636c9 TranscodeDialog: Fix mismatched definition 2025-01-17 09:15:55 +01:00
Jonas Kvinge
e6a0945dfa Call QObject::metaObject 2025-01-17 09:08:59 +01:00
Jonas Kvinge
726c105ed6 MoodbarItemDelegate: Remove delete of data
Memory is deleted in QCache::insert
2025-01-17 08:29:17 +01:00
Jonas Kvinge
d73cbc3a1d EngineBase: Fix mismatched definition 2025-01-17 08:26:11 +01:00
Jonas Kvinge
121f45d3b6 Playlist: Use sizeof playlist pointer to pointer 2025-01-17 07:22:49 +01:00
Jonas Kvinge
3a9ea81929 Queue: Fix sizeof, should be the pointer not the class 2025-01-17 07:12:25 +01:00
Jonas Kvinge
b919472241 Playlist: Correct sizeof 2025-01-17 06:56:08 +01:00
Jonas Kvinge
e8c8b39410 Turn on git revision 2025-01-17 04:29:05 +01:00
28 changed files with 32 additions and 27 deletions

View File

@@ -2,6 +2,11 @@ Strawberry Music Player
=======================
ChangeLog
Version 1.2.6 (2025.01.17):
Bugfixes:
* Fixed dragging songs from playlist to queue.
Version 1.2.5 (2025.01.17):
Bugfixes:

View File

@@ -1,6 +1,6 @@
set(STRAWBERRY_VERSION_MAJOR 1)
set(STRAWBERRY_VERSION_MINOR 2)
set(STRAWBERRY_VERSION_PATCH 5)
set(STRAWBERRY_VERSION_PATCH 6)
#set(STRAWBERRY_VERSION_PRERELEASE rc1)
set(INCLUDE_GIT_REVISION OFF)

View File

@@ -51,6 +51,7 @@
</screenshots>
<update_contact>eclipseo@fedoraproject.org</update_contact>
<releases>
<release version="1.2.6" date="2025-01-17"/>
<release version="1.2.5" date="2025-01-17"/>
<release version="1.2.4" date="2025-01-10"/>
<release version="1.2.3" date="2024-12-08"/>

View File

@@ -78,7 +78,7 @@ CollectionBackend::~CollectionBackend() {
void CollectionBackend::Init(SharedPtr<Database> db, SharedPtr<TaskManager> task_manager, const Song::Source source, const QString &songs_table, const QString &dirs_table, const QString &subdirs_table) {
setObjectName(source == Song::Source::Collection ? QLatin1String(metaObject()->className()) : QStringLiteral("%1%2").arg(Song::DescriptionForSource(source), QLatin1String(metaObject()->className())));
setObjectName(source == Song::Source::Collection ? QLatin1String(QObject::metaObject()->className()) : QStringLiteral("%1%2").arg(Song::DescriptionForSource(source), QLatin1String(QObject::metaObject()->className())));
db_ = db;
task_manager_ = task_manager;

View File

@@ -66,7 +66,7 @@ CollectionLibrary::CollectionLibrary(const SharedPtr<Database> database,
save_playcounts_to_files_(false),
save_ratings_to_files_(false) {
setObjectName(QLatin1String(metaObject()->className()));
setObjectName(QLatin1String(QObject::metaObject()->className()));
original_thread_ = thread();

View File

@@ -98,7 +98,7 @@ CollectionModel::CollectionModel(const SharedPtr<CollectionBackend> backend, con
loading_(false),
icon_disk_cache_(new QNetworkDiskCache(this)) {
setObjectName(backend_->source() == Song::Source::Collection ? QLatin1String(metaObject()->className()) : QStringLiteral("%1%2").arg(Song::DescriptionForSource(backend_->source()), QLatin1String(metaObject()->className())));
setObjectName(backend_->source() == Song::Source::Collection ? QLatin1String(QObject::metaObject()->className()) : QStringLiteral("%1%2").arg(Song::DescriptionForSource(backend_->source()), QLatin1String(QObject::metaObject()->className())));
filter_->setSourceModel(this);
filter_->setSortRole(Role_SortText);

View File

@@ -108,7 +108,7 @@ CollectionView::CollectionView(QWidget *parent)
is_in_keyboard_search_(false),
delete_files_(false) {
setObjectName(QLatin1String(metaObject()->className()));
setObjectName(QLatin1String(QObject::metaObject()->className()));
setItemDelegate(new CollectionItemDelegate(this));
setAttribute(Qt::WA_MacShowFocusRect, false);

View File

@@ -106,7 +106,7 @@ CollectionWatcher::CollectionWatcher(const Song::Source source,
cue_parser_(new CueParser(tagreader_client, backend, this)),
last_scan_time_(0) {
setObjectName(source_ == Song::Source::Collection ? QLatin1String(metaObject()->className()) : QStringLiteral("%1%2").arg(Song::DescriptionForSource(source_), QLatin1String(metaObject()->className())));
setObjectName(source_ == Song::Source::Collection ? QLatin1String(QObject::metaObject()->className()) : QStringLiteral("%1%2").arg(Song::DescriptionForSource(source_), QLatin1String(QObject::metaObject()->className())));
original_thread_ = thread();

View File

@@ -250,7 +250,7 @@ Application::Application(QObject *parent)
p_(new ApplicationImpl(this)),
g_thread_(nullptr) {
setObjectName(QLatin1String(metaObject()->className()));
setObjectName(QLatin1String(QObject::metaObject()->className()));
const QMetaObject *mo = QAbstractEventDispatcher::instance(QCoreApplication::instance()->thread())->metaObject();
if (mo && strcmp(mo->className(), "QEventDispatcherGlib") != 0 && strcmp(mo->superClass()->className(), "QEventDispatcherGlib") != 0) {

View File

@@ -69,7 +69,7 @@ Database::Database(SharedPtr<TaskManager> task_manager, QObject *parent, const Q
startup_schema_version_(-1),
original_thread_(nullptr) {
setObjectName(QLatin1String(metaObject()->className()));
setObjectName(QLatin1String(QObject::metaObject()->className()));
original_thread_ = thread();

View File

@@ -99,7 +99,7 @@ Player::Player(const SharedPtr<TaskManager> task_manager, const SharedPtr<UrlHan
volume_increment_(5),
play_offset_nanosec_(0) {
setObjectName(QLatin1String(metaObject()->className()));
setObjectName(QLatin1String(QObject::metaObject()->className()));
timer_save_volume_->setSingleShot(true);
timer_save_volume_->setInterval(5s);

View File

@@ -34,7 +34,7 @@ using namespace Qt::Literals::StringLiterals;
TaskManager::TaskManager(QObject *parent) : QObject(parent), next_task_id_(1) {
setObjectName(QLatin1String(metaObject()->className()));
setObjectName(QLatin1String(QObject::metaObject()->className()));
}

View File

@@ -64,7 +64,7 @@ AlbumCoverLoader::AlbumCoverLoader(const SharedPtr<TagReaderClient> tagreader_cl
load_image_async_id_(1),
original_thread_(nullptr) {
setObjectName(QLatin1String(metaObject()->className()));
setObjectName(QLatin1String(QObject::metaObject()->className()));
original_thread_ = thread();

View File

@@ -45,7 +45,7 @@ CurrentAlbumCoverLoader::CurrentAlbumCoverLoader(const SharedPtr<AlbumCoverLoade
temp_file_pattern_(StandardPaths::WritableLocation(StandardPaths::StandardLocation::TempLocation) + u"/strawberry-cover-XXXXXX.jpg"_s),
id_(0) {
setObjectName(QLatin1String(metaObject()->className()));
setObjectName(QLatin1String(QObject::metaObject()->className()));
options_.options = AlbumCoverLoaderOptions::Option::RawImageData | AlbumCoverLoaderOptions::Option::OriginalImage | AlbumCoverLoaderOptions::Option::ScaledImage;
options_.desired_scaled_size = QSize(120, 120);

View File

@@ -49,7 +49,7 @@ DeviceDatabaseBackend::DeviceDatabaseBackend(QObject *parent)
db_(nullptr),
original_thread_(nullptr) {
setObjectName(QLatin1String(metaObject()->className()));
setObjectName(QLatin1String(QObject::metaObject()->className()));
original_thread_ = thread();

View File

@@ -45,7 +45,7 @@ DeviceLister::DeviceLister(QObject *parent)
original_thread_(nullptr),
next_mount_request_id_(0) {
setObjectName(QLatin1String(metaObject()->className()));
setObjectName(QLatin1String(QObject::metaObject()->className()));
original_thread_ = thread();

View File

@@ -99,7 +99,7 @@ DeviceManager::DeviceManager(const SharedPtr<TaskManager> task_manager,
albumcover_loader_(albumcover_loader),
not_connected_overlay_(IconLoader::Load(u"edit-delete"_s)) {
setObjectName(QLatin1String(metaObject()->className()));
setObjectName(QLatin1String(QObject::metaObject()->className()));
thread_pool_.setMaxThreadCount(1);
QObject::connect(&*task_manager, &TaskManager::TasksChanged, this, &DeviceManager::TasksChanged);

View File

@@ -53,7 +53,7 @@ using namespace Qt::Literals::StringLiterals;
DeviceFinders::DeviceFinders(QObject *parent) : QObject(parent) {
setObjectName(QLatin1String(metaObject()->className()));
setObjectName(QLatin1String(QObject::metaObject()->className()));
}

View File

@@ -120,7 +120,7 @@ class EngineBase : public QObject {
// Plays a media stream represented with the URL 'u' from the given 'beginning' to the given 'end' (usually from 0 to a song's length).
// Both markers should be passed in nanoseconds. 'end' can be negative, indicating that the real length of 'u' stream is unknown.
bool Play(const QUrl &media_url, const QUrl &stream_url, const bool pause, const TrackChangeFlags flags, const bool force_stop_at_end, const quint64 beginning_nanosec, const qint64 end_nanosec, const quint64 offset_nanosec, const std::optional<double> ebur128_integrated_loudness_lufs);
bool Play(const QUrl &media_url, const QUrl &stream_url, const bool pause, const TrackChangeFlags flags, const bool force_stop_at_end, const quint64 beginning_offset_nanosec, const qint64 end_offset_nanosec, const quint64 offset_nanosec, const std::optional<double> ebur128_integrated_loudness_lufs);
void SetVolume(const uint volume);
public Q_SLOTS:

View File

@@ -44,7 +44,7 @@ using std::make_shared;
LyricsProviders::LyricsProviders(QObject *parent) : QObject(parent), thread_(new QThread(this)), network_(make_shared<NetworkAccessManager>()) {
setObjectName(QLatin1String(metaObject()->className()));
setObjectName(QLatin1String(QObject::metaObject()->className()));
thread_->setObjectName(objectName());
network_->moveToThread(thread_);
thread_->start();

View File

@@ -119,7 +119,6 @@ QPixmap MoodbarItemDelegate::PixmapForIndex(const QModelIndex &idx, const QSize
data = new Data;
if (!data_.insert(url, data)) {
qLog(Error) << "Could not insert moodbar data for URL" << url << "into cache";
delete data;
return QPixmap();
}
}

View File

@@ -64,7 +64,7 @@ MoodbarLoader::MoodbarLoader(QObject *parent)
kMaxActiveRequests(qMax(1, QThread::idealThreadCount() / 2)),
save_(false) {
setObjectName(QLatin1String(metaObject()->className()));
setObjectName(QLatin1String(QObject::metaObject()->className()));
thread_->setObjectName(objectName());
cache_->setCacheDirectory(StandardPaths::WritableLocation(StandardPaths::StandardLocation::CacheLocation) + u"/moodbar"_s);

View File

@@ -859,7 +859,7 @@ bool Playlist::dropMimeData(const QMimeData *data, Qt::DropAction action, const
qint64 own_pid = QCoreApplication::applicationPid();
QDataStream stream(data->data(QLatin1String(kRowsMimetype)));
stream.readRawData(reinterpret_cast<char*>(&source_playlist), sizeof(source_playlist)); // NOLINT(bugprone-sizeof-expression)
stream.readRawData(reinterpret_cast<char*>(&source_playlist), sizeof(&source_playlist));
stream >> source_rows;
if (!stream.atEnd()) {
stream.readRawData(reinterpret_cast<char*>(&pid), sizeof(pid));
@@ -1318,7 +1318,7 @@ QMimeData *Playlist::mimeData(const QModelIndexList &indexes) const {
const Playlist *self = this;
const qint64 pid = QCoreApplication::applicationPid();
stream.writeRawData(reinterpret_cast<char*>(&self), sizeof(self)); // NOLINT(bugprone-sizeof-expression)
stream.writeRawData(reinterpret_cast<char*>(&self), sizeof(&self));
stream << rows;
stream.writeRawData(reinterpret_cast<const char*>(&pid), sizeof(pid));
buffer.close();

View File

@@ -69,7 +69,7 @@ PlaylistBackend::PlaylistBackend(const SharedPtr<Database> database,
collection_backend_(collection_backend),
original_thread_(nullptr) {
setObjectName(QLatin1String(metaObject()->className()));
setObjectName(QLatin1String(QObject::metaObject()->className()));
original_thread_ = thread();

View File

@@ -84,7 +84,7 @@ PlaylistManager::PlaylistManager(const SharedPtr<TaskManager> task_manager,
active_(-1),
playlists_loading_(0) {
setObjectName(QLatin1String(metaObject()->className()));
setObjectName(QLatin1String(QObject::metaObject()->className()));
}

View File

@@ -385,7 +385,7 @@ bool Queue::dropMimeData(const QMimeData *data, Qt::DropAction action, const int
Playlist *playlist = nullptr;
QList<int> source_rows;
QDataStream stream(data->data(QLatin1String(Playlist::kRowsMimetype)));
stream.readRawData(reinterpret_cast<char*>(&playlist), sizeof(Playlist));
stream.readRawData(reinterpret_cast<char*>(&playlist), sizeof(&playlist));
stream >> source_rows;
QModelIndexList source_indexes;

View File

@@ -59,7 +59,7 @@ TagReaderClient::TagReaderClient(QObject *parent)
abort_(false),
processing_(false) {
setObjectName(QLatin1String(metaObject()->className()));
setObjectName(QLatin1String(QObject::metaObject()->className()));
if (!sInstance) {
sInstance = this;

View File

@@ -49,7 +49,7 @@ class TranscodeDialog : public QDialog {
~TranscodeDialog() override;
void SetFilenames(const QStringList &filenames);
void SetImportFilenames(const QStringList &filenames, const QString &path);
void SetImportFilenames(const QStringList &filenames, const QString &import_dir);
protected:
void showEvent(QShowEvent *e) override;