mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2025-01-31 17:54:55 +01:00
Make const
This commit is contained in:
parent
8c2b907ff5
commit
58a5367015
12
3rdparty/singleapplication/singleapplication.cpp
vendored
12
3rdparty/singleapplication/singleapplication.cpp
vendored
@ -178,7 +178,7 @@ SingleApplication::~SingleApplication() {
|
||||
* Checks if the current application instance is primary.
|
||||
* @return Returns true if the instance is primary, false otherwise.
|
||||
*/
|
||||
bool SingleApplication::isPrimary() {
|
||||
bool SingleApplication::isPrimary() const {
|
||||
Q_D(SingleApplication);
|
||||
return d->server_ != nullptr;
|
||||
}
|
||||
@ -187,7 +187,7 @@ bool SingleApplication::isPrimary() {
|
||||
* Checks if the current application instance is secondary.
|
||||
* @return Returns true if the instance is secondary, false otherwise.
|
||||
*/
|
||||
bool SingleApplication::isSecondary() {
|
||||
bool SingleApplication::isSecondary() const {
|
||||
Q_D(SingleApplication);
|
||||
return d->server_ == nullptr;
|
||||
}
|
||||
@ -197,7 +197,7 @@ bool SingleApplication::isSecondary() {
|
||||
* It is reset when the first (primary) instance of your app starts and only incremented afterwards.
|
||||
* @return Returns a unique instance id.
|
||||
*/
|
||||
quint32 SingleApplication::instanceId() {
|
||||
quint32 SingleApplication::instanceId() const {
|
||||
Q_D(SingleApplication);
|
||||
return d->instanceNumber_;
|
||||
}
|
||||
@ -207,7 +207,7 @@ quint32 SingleApplication::instanceId() {
|
||||
* Especially useful when SingleApplication is coupled with OS. specific APIs.
|
||||
* @return Returns the primary instance PID.
|
||||
*/
|
||||
qint64 SingleApplication::primaryPid() {
|
||||
qint64 SingleApplication::primaryPid() const {
|
||||
Q_D(SingleApplication);
|
||||
return d->primaryPid();
|
||||
}
|
||||
@ -216,7 +216,7 @@ qint64 SingleApplication::primaryPid() {
|
||||
* Returns the username the primary instance is running as.
|
||||
* @return Returns the username the primary instance is running as.
|
||||
*/
|
||||
QString SingleApplication::primaryUser() {
|
||||
QString SingleApplication::primaryUser() const {
|
||||
Q_D(SingleApplication);
|
||||
return d->primaryUser();
|
||||
}
|
||||
@ -225,7 +225,7 @@ QString SingleApplication::primaryUser() {
|
||||
* Returns the username the current instance is running as.
|
||||
* @return Returns the username the current instance is running as.
|
||||
*/
|
||||
QString SingleApplication::currentUser() {
|
||||
QString SingleApplication::currentUser() const {
|
||||
Q_D(SingleApplication);
|
||||
return d->getUsername();
|
||||
}
|
||||
|
12
3rdparty/singleapplication/singleapplication.h
vendored
12
3rdparty/singleapplication/singleapplication.h
vendored
@ -97,37 +97,37 @@ class SingleApplication : public QApplication { // clazy:exclude=ctor-missing-p
|
||||
* @brief Returns if the instance is the primary instance
|
||||
* @returns {bool}
|
||||
*/
|
||||
bool isPrimary();
|
||||
bool isPrimary() const;
|
||||
|
||||
/**
|
||||
* @brief Returns if the instance is a secondary instance
|
||||
* @returns {bool}
|
||||
*/
|
||||
bool isSecondary();
|
||||
bool isSecondary() const;
|
||||
|
||||
/**
|
||||
* @brief Returns a unique identifier for the current instance
|
||||
* @returns {qint32}
|
||||
*/
|
||||
quint32 instanceId();
|
||||
quint32 instanceId() const;
|
||||
|
||||
/**
|
||||
* @brief Returns the process ID (PID) of the primary instance
|
||||
* @returns {qint64}
|
||||
*/
|
||||
qint64 primaryPid();
|
||||
qint64 primaryPid() const;
|
||||
|
||||
/**
|
||||
* @brief Returns the username of the user running the primary instance
|
||||
* @returns {QString}
|
||||
*/
|
||||
QString primaryUser();
|
||||
QString primaryUser() const;
|
||||
|
||||
/**
|
||||
* @brief Returns the username of the current user
|
||||
* @returns {QString}
|
||||
*/
|
||||
QString currentUser();
|
||||
QString currentUser() const;
|
||||
|
||||
/**
|
||||
* @brief Sends a message to the primary instance. Returns true on success.
|
||||
|
@ -284,7 +284,7 @@ bool SingleApplicationPrivate::connectToPrimary(const int timeout, const Connect
|
||||
|
||||
}
|
||||
|
||||
quint16 SingleApplicationPrivate::blockChecksum() {
|
||||
quint16 SingleApplicationPrivate::blockChecksum() const {
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
quint16 checksum = qChecksum(QByteArray(static_cast<const char*>(memory_->constData()), offsetof(InstancesInfo, checksum)));
|
||||
@ -296,7 +296,7 @@ quint16 SingleApplicationPrivate::blockChecksum() {
|
||||
|
||||
}
|
||||
|
||||
qint64 SingleApplicationPrivate::primaryPid() {
|
||||
qint64 SingleApplicationPrivate::primaryPid() const {
|
||||
|
||||
memory_->lock();
|
||||
InstancesInfo *inst = static_cast<InstancesInfo*>(memory_->data());
|
||||
@ -307,7 +307,7 @@ qint64 SingleApplicationPrivate::primaryPid() {
|
||||
|
||||
}
|
||||
|
||||
QString SingleApplicationPrivate::primaryUser() {
|
||||
QString SingleApplicationPrivate::primaryUser() const {
|
||||
|
||||
memory_->lock();
|
||||
InstancesInfo *inst = static_cast<InstancesInfo*>(memory_->data());
|
||||
|
@ -86,9 +86,9 @@ class SingleApplicationPrivate : public QObject {
|
||||
void startPrimary();
|
||||
void startSecondary();
|
||||
bool connectToPrimary(const int timeout, const ConnectionType connectionType);
|
||||
quint16 blockChecksum();
|
||||
qint64 primaryPid();
|
||||
QString primaryUser();
|
||||
quint16 blockChecksum() const;
|
||||
qint64 primaryPid() const;
|
||||
QString primaryUser() const;
|
||||
void readInitMessageHeader(QLocalSocket *socket);
|
||||
void readInitMessageBody(QLocalSocket *socket);
|
||||
static void randomSleep();
|
||||
|
@ -178,7 +178,7 @@ SingleCoreApplication::~SingleCoreApplication() {
|
||||
* Checks if the current application instance is primary.
|
||||
* @return Returns true if the instance is primary, false otherwise.
|
||||
*/
|
||||
bool SingleCoreApplication::isPrimary() {
|
||||
bool SingleCoreApplication::isPrimary() const {
|
||||
Q_D(SingleCoreApplication);
|
||||
return d->server_ != nullptr;
|
||||
}
|
||||
@ -187,7 +187,7 @@ bool SingleCoreApplication::isPrimary() {
|
||||
* Checks if the current application instance is secondary.
|
||||
* @return Returns true if the instance is secondary, false otherwise.
|
||||
*/
|
||||
bool SingleCoreApplication::isSecondary() {
|
||||
bool SingleCoreApplication::isSecondary() const {
|
||||
Q_D(SingleCoreApplication);
|
||||
return d->server_ == nullptr;
|
||||
}
|
||||
@ -197,7 +197,7 @@ bool SingleCoreApplication::isSecondary() {
|
||||
* It is reset when the first (primary) instance of your app starts and only incremented afterwards.
|
||||
* @return Returns a unique instance id.
|
||||
*/
|
||||
quint32 SingleCoreApplication::instanceId() {
|
||||
quint32 SingleCoreApplication::instanceId() const {
|
||||
Q_D(SingleCoreApplication);
|
||||
return d->instanceNumber_;
|
||||
}
|
||||
@ -207,7 +207,7 @@ quint32 SingleCoreApplication::instanceId() {
|
||||
* Especially useful when SingleCoreApplication is coupled with OS. specific APIs.
|
||||
* @return Returns the primary instance PID.
|
||||
*/
|
||||
qint64 SingleCoreApplication::primaryPid() {
|
||||
qint64 SingleCoreApplication::primaryPid() const {
|
||||
Q_D(SingleCoreApplication);
|
||||
return d->primaryPid();
|
||||
}
|
||||
@ -216,7 +216,7 @@ qint64 SingleCoreApplication::primaryPid() {
|
||||
* Returns the username the primary instance is running as.
|
||||
* @return Returns the username the primary instance is running as.
|
||||
*/
|
||||
QString SingleCoreApplication::primaryUser() {
|
||||
QString SingleCoreApplication::primaryUser() const {
|
||||
Q_D(SingleCoreApplication);
|
||||
return d->primaryUser();
|
||||
}
|
||||
@ -225,7 +225,7 @@ QString SingleCoreApplication::primaryUser() {
|
||||
* Returns the username the current instance is running as.
|
||||
* @return Returns the username the current instance is running as.
|
||||
*/
|
||||
QString SingleCoreApplication::currentUser() {
|
||||
QString SingleCoreApplication::currentUser() const {
|
||||
Q_D(SingleCoreApplication);
|
||||
return d->getUsername();
|
||||
}
|
||||
|
@ -96,37 +96,37 @@ class SingleCoreApplication : public QCoreApplication {
|
||||
* @brief Returns if the instance is the primary instance
|
||||
* @returns {bool}
|
||||
*/
|
||||
bool isPrimary();
|
||||
bool isPrimary() const;
|
||||
|
||||
/**
|
||||
* @brief Returns if the instance is a secondary instance
|
||||
* @returns {bool}
|
||||
*/
|
||||
bool isSecondary();
|
||||
bool isSecondary() const;
|
||||
|
||||
/**
|
||||
* @brief Returns a unique identifier for the current instance
|
||||
* @returns {qint32}
|
||||
*/
|
||||
quint32 instanceId();
|
||||
quint32 instanceId() const;
|
||||
|
||||
/**
|
||||
* @brief Returns the process ID (PID) of the primary instance
|
||||
* @returns {qint64}
|
||||
*/
|
||||
qint64 primaryPid();
|
||||
qint64 primaryPid() const;
|
||||
|
||||
/**
|
||||
* @brief Returns the username of the user running the primary instance
|
||||
* @returns {QString}
|
||||
*/
|
||||
QString primaryUser();
|
||||
QString primaryUser() const;
|
||||
|
||||
/**
|
||||
* @brief Returns the username of the current user
|
||||
* @returns {QString}
|
||||
*/
|
||||
QString currentUser();
|
||||
QString currentUser() const;
|
||||
|
||||
/**
|
||||
* @brief Sends a message to the primary instance. Returns true on success.
|
||||
|
@ -284,7 +284,7 @@ bool SingleCoreApplicationPrivate::connectToPrimary(const int timeout, const Con
|
||||
|
||||
}
|
||||
|
||||
quint16 SingleCoreApplicationPrivate::blockChecksum() {
|
||||
quint16 SingleCoreApplicationPrivate::blockChecksum() const {
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
quint16 checksum = qChecksum(QByteArray(static_cast<const char*>(memory_->constData()), offsetof(InstancesInfo, checksum)));
|
||||
@ -296,7 +296,7 @@ quint16 SingleCoreApplicationPrivate::blockChecksum() {
|
||||
|
||||
}
|
||||
|
||||
qint64 SingleCoreApplicationPrivate::primaryPid() {
|
||||
qint64 SingleCoreApplicationPrivate::primaryPid() const {
|
||||
|
||||
memory_->lock();
|
||||
InstancesInfo *inst = static_cast<InstancesInfo*>(memory_->data());
|
||||
@ -307,7 +307,7 @@ qint64 SingleCoreApplicationPrivate::primaryPid() {
|
||||
|
||||
}
|
||||
|
||||
QString SingleCoreApplicationPrivate::primaryUser() {
|
||||
QString SingleCoreApplicationPrivate::primaryUser() const {
|
||||
|
||||
memory_->lock();
|
||||
InstancesInfo *inst = static_cast<InstancesInfo*>(memory_->data());
|
||||
|
@ -86,9 +86,9 @@ class SingleCoreApplicationPrivate : public QObject {
|
||||
void startPrimary();
|
||||
void startSecondary();
|
||||
bool connectToPrimary(const int timeout, const ConnectionType connectionType);
|
||||
quint16 blockChecksum();
|
||||
qint64 primaryPid();
|
||||
QString primaryUser();
|
||||
quint16 blockChecksum() const;
|
||||
qint64 primaryPid() const;
|
||||
QString primaryUser() const;
|
||||
void readInitMessageHeader(QLocalSocket *socket);
|
||||
void readInitMessageBody(QLocalSocket *socket);
|
||||
static void randomSleep();
|
||||
|
@ -58,11 +58,11 @@ void FHT::makeCasTable(void) {
|
||||
}
|
||||
}
|
||||
|
||||
void FHT::scale(float *p, float d) {
|
||||
void FHT::scale(float *p, float d) const {
|
||||
for (int i = 0; i < (num_ / 2); i++) *p++ *= d;
|
||||
}
|
||||
|
||||
void FHT::ewma(float *d, float *s, float w) {
|
||||
void FHT::ewma(float *d, float *s, float w) const {
|
||||
for (int i = 0; i < (num_ / 2); i++, d++, s++) *d = *d * w + *s * (1 - w);
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,7 @@ class FHT {
|
||||
~FHT();
|
||||
int sizeExp() const;
|
||||
int size() const;
|
||||
void scale(float*, float);
|
||||
void scale(float*, float) const;
|
||||
|
||||
/**
|
||||
* Exponentially Weighted Moving Average (EWMA) filter.
|
||||
@ -76,7 +76,7 @@ class FHT {
|
||||
* @param s is fresh input.
|
||||
* @param w is the weighting factor.
|
||||
*/
|
||||
void ewma(float *d, float *s, float w);
|
||||
void ewma(float *d, float *s, float w) const;
|
||||
|
||||
/**
|
||||
* Logarithmic audio spectrum. Maps semi-logarithmic spectrum
|
||||
|
@ -121,7 +121,7 @@ CollectionQuery::CollectionQuery(const QSqlDatabase &db, const QString &songs_ta
|
||||
|
||||
}
|
||||
|
||||
QString CollectionQuery::GetInnerQuery() {
|
||||
QString CollectionQuery::GetInnerQuery() const {
|
||||
return duplicates_only_
|
||||
? QString(" INNER JOIN (select * from duplicated_songs) dsongs "
|
||||
"ON (%songs_table.artist = dsongs.dup_artist "
|
||||
|
@ -107,7 +107,7 @@ class CollectionQuery : public QSqlQuery {
|
||||
int limit() const { return limit_; }
|
||||
|
||||
private:
|
||||
QString GetInnerQuery();
|
||||
QString GetInnerQuery() const;
|
||||
|
||||
QSqlDatabase db_;
|
||||
QString songs_table_;
|
||||
|
@ -636,7 +636,7 @@ void CollectionView::FilterReturnPressed() {
|
||||
emit doubleClicked(currentIndex());
|
||||
}
|
||||
|
||||
void CollectionView::ShowInBrowser() {
|
||||
void CollectionView::ShowInBrowser() const {
|
||||
|
||||
SongList songs = GetSelectedSongs();
|
||||
QList<QUrl> urls;
|
||||
@ -649,13 +649,13 @@ void CollectionView::ShowInBrowser() {
|
||||
|
||||
}
|
||||
|
||||
int CollectionView::TotalSongs() {
|
||||
int CollectionView::TotalSongs() const {
|
||||
return total_song_count_;
|
||||
}
|
||||
int CollectionView::TotalArtists() {
|
||||
int CollectionView::TotalArtists() const {
|
||||
return total_artist_count_;
|
||||
}
|
||||
int CollectionView::TotalAlbums() {
|
||||
int CollectionView::TotalAlbums() const {
|
||||
return total_album_count_;
|
||||
}
|
||||
|
||||
|
@ -66,9 +66,9 @@ class CollectionView : public AutoExpandingTreeView {
|
||||
void keyboardSearch(const QString &search) override;
|
||||
void scrollTo(const QModelIndex &idx, ScrollHint hint = EnsureVisible) override;
|
||||
|
||||
int TotalSongs();
|
||||
int TotalArtists();
|
||||
int TotalAlbums();
|
||||
int TotalSongs() const;
|
||||
int TotalArtists() const;
|
||||
int TotalAlbums() const;
|
||||
|
||||
public slots:
|
||||
void TotalSongCountUpdated(const int count);
|
||||
@ -107,7 +107,7 @@ class CollectionView : public AutoExpandingTreeView {
|
||||
void CopyToDevice();
|
||||
void EditTracks();
|
||||
void RescanSongs();
|
||||
void ShowInBrowser();
|
||||
void ShowInBrowser() const;
|
||||
void ShowInVarious();
|
||||
void NoShowInVarious();
|
||||
void Delete();
|
||||
|
@ -46,7 +46,7 @@ CollectionViewContainer::CollectionViewContainer(QWidget *parent) : QWidget(pare
|
||||
CollectionViewContainer::~CollectionViewContainer() { delete ui_; }
|
||||
CollectionView *CollectionViewContainer::view() const { return ui_->view; }
|
||||
CollectionFilterWidget *CollectionViewContainer::filter() const { return ui_->filter; }
|
||||
void CollectionViewContainer::ReloadSettings() {
|
||||
void CollectionViewContainer::ReloadSettings() const {
|
||||
filter()->ReloadSettings();
|
||||
view()->ReloadSettings();
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ class CollectionViewContainer : public QWidget {
|
||||
CollectionFilterWidget *filter() const;
|
||||
CollectionView *view() const;
|
||||
|
||||
void ReloadSettings();
|
||||
void ReloadSettings() const;
|
||||
|
||||
private:
|
||||
Ui_CollectionViewContainer *ui_;
|
||||
|
@ -418,7 +418,7 @@ void ContextAlbumsView::CopyToDevice() {
|
||||
#endif
|
||||
}
|
||||
|
||||
void ContextAlbumsView::ShowInBrowser() {
|
||||
void ContextAlbumsView::ShowInBrowser() const {
|
||||
|
||||
const SongList songs = GetSelectedSongs();
|
||||
QList<QUrl> urls;
|
||||
|
@ -96,7 +96,7 @@ class ContextAlbumsView : public AutoExpandingTreeView {
|
||||
void Organize();
|
||||
void CopyToDevice();
|
||||
void EditTracks();
|
||||
void ShowInBrowser();
|
||||
void ShowInBrowser() const;
|
||||
|
||||
private:
|
||||
void RecheckIsEmpty();
|
||||
|
@ -440,12 +440,12 @@ void InternetCollectionView::FilterReturnPressed() {
|
||||
|
||||
}
|
||||
|
||||
int InternetCollectionView::TotalSongs() {
|
||||
int InternetCollectionView::TotalSongs() const {
|
||||
return total_song_count_;
|
||||
}
|
||||
int InternetCollectionView::TotalArtists() {
|
||||
int InternetCollectionView::TotalArtists() const {
|
||||
return total_artist_count_;
|
||||
}
|
||||
int InternetCollectionView::TotalAlbums() {
|
||||
int InternetCollectionView::TotalAlbums() const {
|
||||
return total_album_count_;
|
||||
}
|
||||
|
@ -65,9 +65,9 @@ class InternetCollectionView : public AutoExpandingTreeView {
|
||||
void keyboardSearch(const QString &search) override;
|
||||
void scrollTo(const QModelIndex &idx, ScrollHint hint = EnsureVisible) override;
|
||||
|
||||
int TotalSongs();
|
||||
int TotalArtists();
|
||||
int TotalAlbums();
|
||||
int TotalSongs() const;
|
||||
int TotalArtists() const;
|
||||
int TotalAlbums() const;
|
||||
|
||||
public slots:
|
||||
void TotalSongCountUpdated(int count);
|
||||
|
@ -52,7 +52,7 @@ InternetCollectionViewContainer::InternetCollectionViewContainer(QWidget *parent
|
||||
|
||||
InternetCollectionViewContainer::~InternetCollectionViewContainer() { delete ui_; }
|
||||
|
||||
void InternetCollectionViewContainer::ReloadSettings() {
|
||||
void InternetCollectionViewContainer::ReloadSettings() const {
|
||||
filter()->ReloadSettings();
|
||||
view()->ReloadSettings();
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ class InternetCollectionViewContainer : public QWidget {
|
||||
explicit InternetCollectionViewContainer(QWidget *parent = nullptr);
|
||||
~InternetCollectionViewContainer() override;
|
||||
|
||||
void ReloadSettings();
|
||||
void ReloadSettings() const;
|
||||
|
||||
QStackedWidget *stacked() const { return ui_->stacked; }
|
||||
QWidget *help_page() const { return ui_->help_page; }
|
||||
|
@ -543,7 +543,7 @@ void PlaylistManager::RemoveItemsWithoutUndo(const int id, const QList<int> &ind
|
||||
|
||||
}
|
||||
|
||||
void PlaylistManager::RemoveCurrentSong() {
|
||||
void PlaylistManager::RemoveCurrentSong() const {
|
||||
active()->removeRows(active()->current_index().row(), 1);
|
||||
}
|
||||
|
||||
|
@ -213,7 +213,7 @@ class PlaylistManager : public PlaylistManagerInterface {
|
||||
// Removes items with given indices from the playlist. This operation is not undoable.
|
||||
void RemoveItemsWithoutUndo(const int id, const QList<int> &indices);
|
||||
// Remove the current playing song
|
||||
void RemoveCurrentSong();
|
||||
void RemoveCurrentSong() const;
|
||||
|
||||
void PlaySmartPlaylist(PlaylistGeneratorPtr generator, const bool as_new, const bool clear) override;
|
||||
|
||||
|
@ -206,7 +206,7 @@ void CoversSettingsPage::DisableAuthentication() {
|
||||
|
||||
}
|
||||
|
||||
void CoversSettingsPage::DisconnectAuthentication(CoverProvider *provider) {
|
||||
void CoversSettingsPage::DisconnectAuthentication(CoverProvider *provider) const {
|
||||
|
||||
QObject::disconnect(provider, &CoverProvider::AuthenticationFailure, this, &CoversSettingsPage::AuthenticationFailure);
|
||||
QObject::disconnect(provider, &CoverProvider::AuthenticationSuccess, this, &CoversSettingsPage::AuthenticationSuccess);
|
||||
|
@ -50,7 +50,7 @@ class CoversSettingsPage : public SettingsPage {
|
||||
void NoProviderSelected();
|
||||
void ProvidersMove(const int d);
|
||||
void DisableAuthentication();
|
||||
void DisconnectAuthentication(CoverProvider *provider);
|
||||
void DisconnectAuthentication(CoverProvider *provider) const;
|
||||
static bool ProviderCompareOrder(CoverProvider *a, CoverProvider *b);
|
||||
|
||||
private slots:
|
||||
|
@ -196,7 +196,7 @@ void LyricsSettingsPage::DisableAuthentication() {
|
||||
|
||||
}
|
||||
|
||||
void LyricsSettingsPage::DisconnectAuthentication(LyricsProvider *provider) {
|
||||
void LyricsSettingsPage::DisconnectAuthentication(LyricsProvider *provider) const {
|
||||
|
||||
QObject::disconnect(provider, &LyricsProvider::AuthenticationFailure, this, &LyricsSettingsPage::AuthenticationFailure);
|
||||
QObject::disconnect(provider, &LyricsProvider::AuthenticationSuccess, this, &LyricsSettingsPage::AuthenticationSuccess);
|
||||
|
@ -50,7 +50,7 @@ class LyricsSettingsPage : public SettingsPage {
|
||||
void NoProviderSelected();
|
||||
void ProvidersMove(const int d);
|
||||
void DisableAuthentication();
|
||||
void DisconnectAuthentication(LyricsProvider *provider);
|
||||
void DisconnectAuthentication(LyricsProvider *provider) const;
|
||||
static bool ProviderCompareOrder(LyricsProvider *a, LyricsProvider *b);
|
||||
|
||||
private slots:
|
||||
|
@ -53,7 +53,7 @@ SubsonicBaseRequest::SubsonicBaseRequest(SubsonicService *service, QObject *pare
|
||||
|
||||
}
|
||||
|
||||
QUrl SubsonicBaseRequest::CreateUrl(const QString &ressource_name, const QList<Param> ¶ms_provided) {
|
||||
QUrl SubsonicBaseRequest::CreateUrl(const QString &ressource_name, const QList<Param> ¶ms_provided) const {
|
||||
|
||||
ParamList params = ParamList() << params_provided
|
||||
<< Param("c", client_name())
|
||||
|
@ -53,7 +53,7 @@ class SubsonicBaseRequest : public QObject {
|
||||
typedef QPair<QByteArray, QByteArray> EncodedParam;
|
||||
typedef QList<EncodedParam> EncodedParamList;
|
||||
|
||||
QUrl CreateUrl(const QString &ressource_name, const QList<Param> ¶ms_provided);
|
||||
QUrl CreateUrl(const QString &ressource_name, const QList<Param> ¶ms_provided) const;
|
||||
QNetworkReply *CreateGetRequest(const QString &ressource_name, const QList<Param> ¶ms_provided);
|
||||
QByteArray GetReplyData(QNetworkReply *reply);
|
||||
QJsonObject ExtractJsonObj(QByteArray &data);
|
||||
|
@ -394,7 +394,7 @@ GstBusSyncReply Transcoder::BusCallbackSync(GstBus*, GstMessage *msg, gpointer d
|
||||
|
||||
}
|
||||
|
||||
void Transcoder::JobState::ReportError(GstMessage *msg) {
|
||||
void Transcoder::JobState::ReportError(GstMessage *msg) const {
|
||||
|
||||
GError *error = nullptr;
|
||||
gchar *debugs = nullptr;
|
||||
|
@ -100,7 +100,7 @@ class Transcoder : public QObject {
|
||||
~JobState();
|
||||
|
||||
void PostFinished(const bool success);
|
||||
void ReportError(GstMessage *msg);
|
||||
void ReportError(GstMessage *msg) const;
|
||||
|
||||
Job job_;
|
||||
Transcoder *parent_;
|
||||
|
@ -360,12 +360,12 @@ class TabData : public QObject { // clazy:exclude=missing-qobject-macro
|
||||
page_->setLayout(layout);
|
||||
}
|
||||
|
||||
QWidget *widget_view() { return widget_view_; }
|
||||
QString name() { return name_; }
|
||||
QIcon icon() { return icon_; }
|
||||
QString label() { return label_; }
|
||||
QWidget *page() { return page_; }
|
||||
int index() { return index_; }
|
||||
QWidget *widget_view() const { return widget_view_; }
|
||||
QString name() const { return name_; }
|
||||
QIcon icon() const { return icon_; }
|
||||
QString label() const { return label_; }
|
||||
QWidget *page() const { return page_; }
|
||||
int index() const { return index_; }
|
||||
|
||||
private:
|
||||
QWidget *widget_view_;
|
||||
|
Loading…
x
Reference in New Issue
Block a user