fix: FTBFS, and tidy code

This commit is contained in:
Gary Wang 2025-06-25 21:55:08 +08:00
parent 040e2a7b5f
commit c828f86b74
No known key found for this signature in database
GPG Key ID: 5D30A4F15EA78760
5 changed files with 7 additions and 22 deletions

View File

@ -16,16 +16,6 @@
#define ACTION_NAME(s) QStringLiteral(STRIFY(s)) #define ACTION_NAME(s) QStringLiteral(STRIFY(s))
#define STRIFY(s) #s #define STRIFY(s) #s
ActionManager::ActionManager()
{
}
ActionManager::~ActionManager()
{
}
QIcon ActionManager::loadHidpiIcon(const QString &resp, QSize sz) QIcon ActionManager::loadHidpiIcon(const QString &resp, QSize sz)
{ {
QSvgRenderer r(resp); QSvgRenderer r(resp);

View File

@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com> // SPDX-FileCopyrightText: 2025 Gary Wang <git@blumia.net>
// //
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
@ -12,8 +12,8 @@ class MainWindow;
class ActionManager class ActionManager
{ {
public: public:
ActionManager(); explicit ActionManager() = default;
~ActionManager(); ~ActionManager() = default;
void setupAction(MainWindow * mainWindow); void setupAction(MainWindow * mainWindow);
void retranslateUi(MainWindow *MainWindow); void retranslateUi(MainWindow *MainWindow);

View File

@ -62,12 +62,12 @@ public:
Q_INVOKABLE QModelIndex loadPlaylist(const QList<QUrl> & urls); Q_INVOKABLE QModelIndex loadPlaylist(const QList<QUrl> & urls);
Q_INVOKABLE QModelIndex loadPlaylist(const QUrl & url); Q_INVOKABLE QModelIndex loadPlaylist(const QUrl & url);
inline int totalCount() const; int totalCount() const;
QModelIndex previousIndex() const; QModelIndex previousIndex() const;
QModelIndex nextIndex() const; QModelIndex nextIndex() const;
QModelIndex curIndex() const; QModelIndex curIndex() const;
inline bool isFirstIndex() const; bool isFirstIndex() const;
inline bool isLastIndex() const; bool isLastIndex() const;
void setCurrentIndex(const QModelIndex & index); void setCurrentIndex(const QModelIndex & index);
QUrl urlByIndex(const QModelIndex & index); QUrl urlByIndex(const QModelIndex & index);
QString localFileByIndex(const QModelIndex & index); QString localFileByIndex(const QModelIndex & index);

View File

@ -40,11 +40,6 @@ ShortcutEditor::ShortcutEditor(ShortcutEdit * shortcutEdit, QWidget * parent)
reloadShortcuts(); reloadShortcuts();
} }
ShortcutEditor::~ShortcutEditor()
{
}
void ShortcutEditor::setDescription(const QString &desc) void ShortcutEditor::setDescription(const QString &desc)
{ {
m_descriptionLabel->setText(desc); m_descriptionLabel->setText(desc);

View File

@ -18,7 +18,7 @@ class ShortcutEditor : public QWidget
Q_OBJECT Q_OBJECT
public: public:
explicit ShortcutEditor(ShortcutEdit * shortcutEdit, QWidget * parent = nullptr); explicit ShortcutEditor(ShortcutEdit * shortcutEdit, QWidget * parent = nullptr);
~ShortcutEditor(); ~ShortcutEditor() = default;
void setDescription(const QString & desc); void setDescription(const QString & desc);