Skip to content
Snippets Groups Projects

qt: set application badge number to playlist count

Closed Fatih Uzunoğlu requested to merge fuzun/vlc:qml/badgenumber into master
1 file
+ 7
0
Compare changes
  • Side-by-side
  • Inline
@@ -28,6 +28,7 @@
#include <algorithm>
#include <QVariant>
#include <QDesktopServices>
#include <QGuiApplication>
namespace vlc {
namespace playlist {
@@ -365,6 +366,12 @@ PlaylistController::PlaylistController(QObject *parent)
connect(this, &PlaylistController::itemsMoved, this, &PlaylistController::resetSortKey);
connect(this, &PlaylistController::itemsAdded, this, &PlaylistController::resetSortKey);
connect(this, &PlaylistController::isEmptyChanged, [this](bool isEmpty) {if (isEmpty) emit resetSortKey();});
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
connect(this, &PlaylistController::countChanged, [](const int count) {
qGuiApp->setBadgeNumber(count);
});
#endif
}
PlaylistController::PlaylistController(vlc_playlist_t *playlist, QObject *parent)
Loading