Compare commits
3 Commits
0.9.1
...
a33381557b
Author | SHA1 | Date | |
---|---|---|---|
a33381557b | |||
6d8ec6a54a | |||
dd3209e3ff |
8
.github/workflows/reuse-check.yml
vendored
8
.github/workflows/reuse-check.yml
vendored
@ -7,9 +7,11 @@ name: REUSE Compliance Check
|
|||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
reuse-compliance-check:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: REUSE Compliance Check
|
- name: REUSE Compliance Check
|
||||||
uses: fsfe/reuse-action@v2
|
uses: fsfe/reuse-action@v5
|
||||||
|
4
.github/workflows/windows.yml
vendored
4
.github/workflows/windows.yml
vendored
@ -8,7 +8,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- qt_ver: '6.8.1'
|
- qt_ver: '6.8.2'
|
||||||
vs: '2022'
|
vs: '2022'
|
||||||
aqt_arch: 'win64_msvc2022_64'
|
aqt_arch: 'win64_msvc2022_64'
|
||||||
msvc_arch: 'x64'
|
msvc_arch: 'x64'
|
||||||
@ -44,7 +44,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- qt_ver: '6.8.1'
|
- qt_ver: '6.8.2'
|
||||||
vs: '2022'
|
vs: '2022'
|
||||||
aqt_arch: 'win64_msvc2022_64'
|
aqt_arch: 'win64_msvc2022_64'
|
||||||
msvc_arch: 'x64'
|
msvc_arch: 'x64'
|
||||||
|
28
.reuse/dep5
28
.reuse/dep5
@ -1,28 +0,0 @@
|
|||||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
|
||||||
Upstream-Name: Pineapple Pictures
|
|
||||||
Source: https://github.com/BLumia/pineapple-pictures
|
|
||||||
|
|
||||||
# Config files
|
|
||||||
Files: .gitignore appveyor.yml .github/*
|
|
||||||
Copyright: None
|
|
||||||
License: CC0-1.0
|
|
||||||
|
|
||||||
# README, resource files and Metadata files
|
|
||||||
Files: README*.md NEWS assets/*.rc assets/*.qrc dist/*
|
|
||||||
Copyright: None
|
|
||||||
License: CC0-1.0
|
|
||||||
|
|
||||||
# Translation files
|
|
||||||
# See assets/plain/translators.html for a list of translators
|
|
||||||
Files: app/translations/*.ts assets/plain/translators.html
|
|
||||||
Copyright: Translators from hosted.weblate.org
|
|
||||||
License: MIT
|
|
||||||
|
|
||||||
# Assets
|
|
||||||
Files: assets/icons/*.svg
|
|
||||||
Copyright: 2022 Gary Wang
|
|
||||||
License: MIT
|
|
||||||
|
|
||||||
Files: assets/icons/app-icon.*
|
|
||||||
Copyright: 2020 Lovelyblack
|
|
||||||
License: MIT
|
|
33
REUSE.toml
Normal file
33
REUSE.toml
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
version = 1
|
||||||
|
SPDX-PackageName = "Pineapple Pictures"
|
||||||
|
SPDX-PackageDownloadLocation = "https://github.com/BLumia/pineapple-pictures"
|
||||||
|
|
||||||
|
[[annotations]]
|
||||||
|
path = [".gitignore", "appveyor.yml", ".github/**"]
|
||||||
|
precedence = "aggregate"
|
||||||
|
SPDX-FileCopyrightText = "None"
|
||||||
|
SPDX-License-Identifier = "CC0-1.0"
|
||||||
|
|
||||||
|
[[annotations]]
|
||||||
|
path = ["README**.md", "NEWS", "assets/**.rc", "assets/**.qrc", "dist/**"]
|
||||||
|
precedence = "aggregate"
|
||||||
|
SPDX-FileCopyrightText = "None"
|
||||||
|
SPDX-License-Identifier = "CC0-1.0"
|
||||||
|
|
||||||
|
[[annotations]]
|
||||||
|
path = ["app/translations/**.ts", "assets/plain/translators.html"]
|
||||||
|
precedence = "aggregate"
|
||||||
|
SPDX-FileCopyrightText = "Translators from hosted.weblate.org"
|
||||||
|
SPDX-License-Identifier = "MIT"
|
||||||
|
|
||||||
|
[[annotations]]
|
||||||
|
path = "assets/icons/**.svg"
|
||||||
|
precedence = "aggregate"
|
||||||
|
SPDX-FileCopyrightText = "2022 Gary Wang"
|
||||||
|
SPDX-License-Identifier = "MIT"
|
||||||
|
|
||||||
|
[[annotations]]
|
||||||
|
path = "assets/icons/app-icon.**"
|
||||||
|
precedence = "aggregate"
|
||||||
|
SPDX-FileCopyrightText = "2020 Lovelyblack"
|
||||||
|
SPDX-License-Identifier = "MIT"
|
@ -1,4 +1,4 @@
|
|||||||
// SPDX-FileCopyrightText: 2024 Gary Wang <git@blumia.net>
|
// SPDX-FileCopyrightText: 2025 Gary Wang <git@blumia.net>
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
@ -16,9 +16,7 @@ PlaylistModel::PlaylistModel(QObject *parent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PlaylistModel::~PlaylistModel()
|
PlaylistModel::~PlaylistModel()
|
||||||
{
|
= default;
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void PlaylistModel::setPlaylist(const QList<QUrl> &urls)
|
void PlaylistModel::setPlaylist(const QList<QUrl> &urls)
|
||||||
{
|
{
|
||||||
@ -29,7 +27,7 @@ void PlaylistModel::setPlaylist(const QList<QUrl> &urls)
|
|||||||
|
|
||||||
QModelIndex PlaylistModel::loadPlaylist(const QList<QUrl> & urls)
|
QModelIndex PlaylistModel::loadPlaylist(const QList<QUrl> & urls)
|
||||||
{
|
{
|
||||||
if (urls.isEmpty()) return QModelIndex();
|
if (urls.isEmpty()) return {};
|
||||||
if (urls.count() == 1) {
|
if (urls.count() == 1) {
|
||||||
return loadPlaylist(urls.constFirst());
|
return loadPlaylist(urls.constFirst());
|
||||||
} else {
|
} else {
|
||||||
@ -128,7 +126,7 @@ int PlaylistModel::rowCount(const QModelIndex &parent) const
|
|||||||
|
|
||||||
QVariant PlaylistModel::data(const QModelIndex &index, int role) const
|
QVariant PlaylistModel::data(const QModelIndex &index, int role) const
|
||||||
{
|
{
|
||||||
if (!index.isValid()) return QVariant();
|
if (!index.isValid()) return {};
|
||||||
|
|
||||||
switch (role) {
|
switch (role) {
|
||||||
case Qt::DisplayRole:
|
case Qt::DisplayRole:
|
||||||
@ -137,7 +135,7 @@ QVariant PlaylistModel::data(const QModelIndex &index, int role) const
|
|||||||
return m_playlist.at(index.row());
|
return m_playlist.at(index.row());
|
||||||
}
|
}
|
||||||
|
|
||||||
return QVariant();
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
PlaylistManager::PlaylistManager(QObject *parent)
|
PlaylistManager::PlaylistManager(QObject *parent)
|
||||||
@ -196,7 +194,7 @@ int PlaylistManager::totalCount() const
|
|||||||
QModelIndex PlaylistManager::previousIndex() const
|
QModelIndex PlaylistManager::previousIndex() const
|
||||||
{
|
{
|
||||||
int count = totalCount();
|
int count = totalCount();
|
||||||
if (count == 0) return QModelIndex();
|
if (count == 0) return {};
|
||||||
|
|
||||||
return m_model.index(m_currentIndex - 1 < 0 ? count - 1 : m_currentIndex - 1);
|
return m_model.index(m_currentIndex - 1 < 0 ? count - 1 : m_currentIndex - 1);
|
||||||
}
|
}
|
||||||
@ -204,7 +202,7 @@ QModelIndex PlaylistManager::previousIndex() const
|
|||||||
QModelIndex PlaylistManager::nextIndex() const
|
QModelIndex PlaylistManager::nextIndex() const
|
||||||
{
|
{
|
||||||
int count = totalCount();
|
int count = totalCount();
|
||||||
if (count == 0) return QModelIndex();
|
if (count == 0) return {};
|
||||||
|
|
||||||
return m_model.index(m_currentIndex + 1 == count ? 0 : m_currentIndex + 1);
|
return m_model.index(m_currentIndex + 1 == count ? 0 : m_currentIndex + 1);
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// SPDX-FileCopyrightText: 2024 Gary Wang <git@blumia.net>
|
// SPDX-FileCopyrightText: 2025 Gary Wang <git@blumia.net>
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
@ -18,7 +18,7 @@ public:
|
|||||||
Q_PROPERTY(QStringList autoLoadFilterSuffixes MEMBER m_autoLoadSuffixes NOTIFY autoLoadFilterSuffixesChanged)
|
Q_PROPERTY(QStringList autoLoadFilterSuffixes MEMBER m_autoLoadSuffixes NOTIFY autoLoadFilterSuffixesChanged)
|
||||||
|
|
||||||
explicit PlaylistModel(QObject *parent = nullptr);
|
explicit PlaylistModel(QObject *parent = nullptr);
|
||||||
~PlaylistModel();
|
~PlaylistModel() override;
|
||||||
|
|
||||||
void setPlaylist(const QList<QUrl> & urls);
|
void setPlaylist(const QList<QUrl> & urls);
|
||||||
QModelIndex loadPlaylist(const QList<QUrl> & urls);
|
QModelIndex loadPlaylist(const QList<QUrl> & urls);
|
||||||
|
Reference in New Issue
Block a user