Remove unneeded this
This commit is contained in:
@@ -53,17 +53,17 @@ struct QueryOptions {
|
|||||||
|
|
||||||
QString filter() const { return filter_; }
|
QString filter() const { return filter_; }
|
||||||
void set_filter(const QString &filter) {
|
void set_filter(const QString &filter) {
|
||||||
this->filter_ = filter;
|
filter_ = filter;
|
||||||
this->query_mode_ = QueryMode_All;
|
query_mode_ = QueryMode_All;
|
||||||
}
|
}
|
||||||
|
|
||||||
int max_age() const { return max_age_; }
|
int max_age() const { return max_age_; }
|
||||||
void set_max_age(int max_age) { this->max_age_ = max_age; }
|
void set_max_age(int max_age) { max_age_ = max_age; }
|
||||||
|
|
||||||
QueryMode query_mode() const { return query_mode_; }
|
QueryMode query_mode() const { return query_mode_; }
|
||||||
void set_query_mode(QueryMode query_mode) {
|
void set_query_mode(QueryMode query_mode) {
|
||||||
this->query_mode_ = query_mode;
|
query_mode_ = query_mode;
|
||||||
this->filter_ = QString();
|
filter_ = QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -548,7 +548,7 @@ bool Database::IntegrityCheck(const QSqlDatabase &db) {
|
|||||||
|
|
||||||
void Database::DoBackup() {
|
void Database::DoBackup() {
|
||||||
|
|
||||||
QSqlDatabase db(this->Connect());
|
QSqlDatabase db(Connect());
|
||||||
|
|
||||||
if (!db.isOpen()) return;
|
if (!db.isOpen()) return;
|
||||||
|
|
||||||
|
|||||||
@@ -1429,8 +1429,8 @@ void Song::BindToQuery(SqlQuery *query) const {
|
|||||||
query->BindValue(":art_automatic", d->art_automatic_.isValid() ? d->art_automatic_.toString(QUrl::FullyEncoded) : "");
|
query->BindValue(":art_automatic", d->art_automatic_.isValid() ? d->art_automatic_.toString(QUrl::FullyEncoded) : "");
|
||||||
query->BindValue(":art_manual", d->art_manual_.isValid() ? d->art_manual_.toString(QUrl::FullyEncoded) : "");
|
query->BindValue(":art_manual", d->art_manual_.isValid() ? d->art_manual_.toString(QUrl::FullyEncoded) : "");
|
||||||
|
|
||||||
query->BindValue(":effective_albumartist", strval(this->effective_albumartist()));
|
query->BindValue(":effective_albumartist", strval(effective_albumartist()));
|
||||||
query->BindValue(":effective_originalyear", intval(this->effective_originalyear()));
|
query->BindValue(":effective_originalyear", intval(effective_originalyear()));
|
||||||
|
|
||||||
query->BindValue(":cue_path", d->cue_path_);
|
query->BindValue(":cue_path", d->cue_path_);
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
About::About(QWidget *parent) : QDialog(parent) {
|
About::About(QWidget *parent) : QDialog(parent) {
|
||||||
|
|
||||||
ui_.setupUi(this);
|
ui_.setupUi(this);
|
||||||
setWindowFlags(this->windowFlags()|Qt::WindowStaysOnTopHint);
|
setWindowFlags(windowFlags()|Qt::WindowStaysOnTopHint);
|
||||||
setWindowTitle(tr("About Strawberry"));
|
setWindowTitle(tr("About Strawberry"));
|
||||||
|
|
||||||
strawberry_authors_ \
|
strawberry_authors_ \
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
SnapDialog::SnapDialog(QWidget *parent) : QDialog(parent), ui_(new Ui_SnapDialog) {
|
SnapDialog::SnapDialog(QWidget *parent) : QDialog(parent), ui_(new Ui_SnapDialog) {
|
||||||
|
|
||||||
ui_->setupUi(this);
|
ui_->setupUi(this);
|
||||||
setWindowFlags(this->windowFlags() | Qt::WindowStaysOnTopHint);
|
setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint);
|
||||||
setWindowTitle(tr("Strawberry is running as a Snap"));
|
setWindowTitle(tr("Strawberry is running as a Snap"));
|
||||||
|
|
||||||
QString text;
|
QString text;
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class InternetServices : public QObject {
|
|||||||
InternetService *ServiceBySource(const Song::Source source) const;
|
InternetService *ServiceBySource(const Song::Source source) const;
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T *Service() {
|
T *Service() {
|
||||||
return static_cast<T*>(this->ServiceBySource(T::kSource));
|
return static_cast<T*>(ServiceBySource(T::kSource));
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddService(InternetService *service);
|
void AddService(InternetService *service);
|
||||||
|
|||||||
@@ -458,7 +458,7 @@ void OSDPretty::Reposition() {
|
|||||||
|
|
||||||
// On windows, enable blurbehind on the masked area
|
// On windows, enable blurbehind on the masked area
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
Utilities::enableBlurBehindWindow(this->windowHandle(), QRegion(mask));
|
Utilities::enableBlurBehindWindow(windowHandle(), QRegion(mask));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ void Queue::SourceDataChanged(const QModelIndex &top_left, const QModelIndex &bo
|
|||||||
|
|
||||||
emit dataChanged(proxy_index, proxy_index);
|
emit dataChanged(proxy_index, proxy_index);
|
||||||
}
|
}
|
||||||
emit ItemCountChanged(this->ItemCount());
|
emit ItemCountChanged(ItemCount());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -128,7 +128,7 @@ void Queue::SourceLayoutChanged() {
|
|||||||
|
|
||||||
signal_item_count_changed_ = QObject::connect(this, &Queue::ItemCountChanged, this, &Queue::UpdateTotalLength);
|
signal_item_count_changed_ = QObject::connect(this, &Queue::ItemCountChanged, this, &Queue::UpdateTotalLength);
|
||||||
|
|
||||||
emit ItemCountChanged(this->ItemCount());
|
emit ItemCountChanged(ItemCount());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -250,8 +250,8 @@ void Queue::UpdateTotalLength() {
|
|||||||
void Queue::UpdateSummaryText() {
|
void Queue::UpdateSummaryText() {
|
||||||
|
|
||||||
QString summary;
|
QString summary;
|
||||||
int tracks = this->ItemCount();
|
int tracks = ItemCount();
|
||||||
quint64 nanoseconds = this->GetTotalLength();
|
quint64 nanoseconds = GetTotalLength();
|
||||||
|
|
||||||
summary += tracks == 1 ? tr("1 track") : tr("%1 tracks").arg(tracks);
|
summary += tracks == 1 ? tr("1 track") : tr("%1 tracks").arg(tracks);
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ class RadioServices : public QObject {
|
|||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T *Service() {
|
T *Service() {
|
||||||
return static_cast<T*>(this->ServiceBySource(T::source));
|
return static_cast<T*>(ServiceBySource(T::source));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReloadSettings();
|
void ReloadSettings();
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ class AudioScrobbler : public QObject {
|
|||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T *Service() {
|
T *Service() {
|
||||||
return qobject_cast<T*>(this->ServiceByName(T::kName));
|
return qobject_cast<T*>(ServiceByName(T::kName));
|
||||||
}
|
}
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ class ScrobblerServices : public QObject {
|
|||||||
ScrobblerService *ServiceByName(const QString &name);
|
ScrobblerService *ServiceByName(const QString &name);
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T *Service() {
|
T *Service() {
|
||||||
return qobject_cast<T*>(this->ServiceByName(T::kName));
|
return qobject_cast<T*>(ServiceByName(T::kName));
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -257,7 +257,7 @@ void CoversSettingsPage::AuthenticationSuccess() {
|
|||||||
if (!provider) return;
|
if (!provider) return;
|
||||||
DisconnectAuthentication(provider);
|
DisconnectAuthentication(provider);
|
||||||
|
|
||||||
if (!this->isVisible() || !ui_->providers->currentItem() || ui_->providers->currentItem()->text() != provider->name()) return;
|
if (!isVisible() || !ui_->providers->currentItem() || ui_->providers->currentItem()->text() != provider->name()) return;
|
||||||
|
|
||||||
ui_->login_state->SetLoggedIn(LoginStateWidget::LoggedIn);
|
ui_->login_state->SetLoggedIn(LoginStateWidget::LoggedIn);
|
||||||
ui_->button_authenticate->setEnabled(true);
|
ui_->button_authenticate->setEnabled(true);
|
||||||
@@ -270,7 +270,7 @@ void CoversSettingsPage::AuthenticationFailure(const QStringList &errors) {
|
|||||||
if (!provider) return;
|
if (!provider) return;
|
||||||
DisconnectAuthentication(provider);
|
DisconnectAuthentication(provider);
|
||||||
|
|
||||||
if (!this->isVisible() || !ui_->providers->currentItem() || ui_->providers->currentItem()->text() != provider->name()) return;
|
if (!isVisible() || !ui_->providers->currentItem() || ui_->providers->currentItem()->text() != provider->name()) return;
|
||||||
|
|
||||||
QMessageBox::warning(this, tr("Authentication failed"), errors.join("\n"));
|
QMessageBox::warning(this, tr("Authentication failed"), errors.join("\n"));
|
||||||
|
|
||||||
|
|||||||
@@ -237,7 +237,7 @@ void LyricsSettingsPage::AuthenticationSuccess() {
|
|||||||
if (!provider) return;
|
if (!provider) return;
|
||||||
DisconnectAuthentication(provider);
|
DisconnectAuthentication(provider);
|
||||||
|
|
||||||
if (!this->isVisible() || !ui_->providers->currentItem() || ui_->providers->currentItem()->text() != provider->name()) return;
|
if (!isVisible() || !ui_->providers->currentItem() || ui_->providers->currentItem()->text() != provider->name()) return;
|
||||||
|
|
||||||
ui_->login_state->SetLoggedIn(LoginStateWidget::LoggedIn);
|
ui_->login_state->SetLoggedIn(LoginStateWidget::LoggedIn);
|
||||||
ui_->button_authenticate->setEnabled(true);
|
ui_->button_authenticate->setEnabled(true);
|
||||||
@@ -250,7 +250,7 @@ void LyricsSettingsPage::AuthenticationFailure(const QStringList &errors) {
|
|||||||
if (!provider) return;
|
if (!provider) return;
|
||||||
DisconnectAuthentication(provider);
|
DisconnectAuthentication(provider);
|
||||||
|
|
||||||
if (!this->isVisible() || !ui_->providers->currentItem() || ui_->providers->currentItem()->text() != provider->name()) return;
|
if (!isVisible() || !ui_->providers->currentItem() || ui_->providers->currentItem()->text() != provider->name()) return;
|
||||||
|
|
||||||
QMessageBox::warning(this, tr("Authentication failed"), errors.join("\n"));
|
QMessageBox::warning(this, tr("Authentication failed"), errors.join("\n"));
|
||||||
|
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ void QobuzSettingsPage::LogoutClicked() {
|
|||||||
|
|
||||||
void QobuzSettingsPage::LoginSuccess() {
|
void QobuzSettingsPage::LoginSuccess() {
|
||||||
|
|
||||||
if (!this->isVisible()) return;
|
if (!isVisible()) return;
|
||||||
ui_->login_state->SetLoggedIn(LoginStateWidget::LoggedIn);
|
ui_->login_state->SetLoggedIn(LoginStateWidget::LoggedIn);
|
||||||
ui_->button_login->setEnabled(true);
|
ui_->button_login->setEnabled(true);
|
||||||
|
|
||||||
@@ -171,7 +171,7 @@ void QobuzSettingsPage::LoginSuccess() {
|
|||||||
|
|
||||||
void QobuzSettingsPage::LoginFailure(const QString &failure_reason) {
|
void QobuzSettingsPage::LoginFailure(const QString &failure_reason) {
|
||||||
|
|
||||||
if (!this->isVisible()) return;
|
if (!isVisible()) return;
|
||||||
QMessageBox::warning(this, tr("Authentication failed"), failure_reason);
|
QMessageBox::warning(this, tr("Authentication failed"), failure_reason);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ bool SubsonicSettingsPage::eventFilter(QObject *object, QEvent *event) {
|
|||||||
|
|
||||||
void SubsonicSettingsPage::TestSuccess() {
|
void SubsonicSettingsPage::TestSuccess() {
|
||||||
|
|
||||||
if (!this->isVisible()) return;
|
if (!isVisible()) return;
|
||||||
ui_->button_test->setEnabled(true);
|
ui_->button_test->setEnabled(true);
|
||||||
|
|
||||||
QMessageBox::information(this, tr("Test successful!"), tr("Test successful!"));
|
QMessageBox::information(this, tr("Test successful!"), tr("Test successful!"));
|
||||||
@@ -160,7 +160,7 @@ void SubsonicSettingsPage::TestSuccess() {
|
|||||||
|
|
||||||
void SubsonicSettingsPage::TestFailure(const QString &failure_reason) {
|
void SubsonicSettingsPage::TestFailure(const QString &failure_reason) {
|
||||||
|
|
||||||
if (!this->isVisible()) return;
|
if (!isVisible()) return;
|
||||||
ui_->button_test->setEnabled(true);
|
ui_->button_test->setEnabled(true);
|
||||||
|
|
||||||
QMessageBox::warning(this, tr("Test failed!"), failure_reason);
|
QMessageBox::warning(this, tr("Test failed!"), failure_reason);
|
||||||
|
|||||||
@@ -207,7 +207,7 @@ void TidalSettingsPage::LogoutClicked() {
|
|||||||
|
|
||||||
void TidalSettingsPage::LoginSuccess() {
|
void TidalSettingsPage::LoginSuccess() {
|
||||||
|
|
||||||
if (!this->isVisible()) return;
|
if (!isVisible()) return;
|
||||||
ui_->login_state->SetLoggedIn(LoginStateWidget::LoggedIn);
|
ui_->login_state->SetLoggedIn(LoginStateWidget::LoggedIn);
|
||||||
ui_->button_login->setEnabled(true);
|
ui_->button_login->setEnabled(true);
|
||||||
|
|
||||||
@@ -215,7 +215,7 @@ void TidalSettingsPage::LoginSuccess() {
|
|||||||
|
|
||||||
void TidalSettingsPage::LoginFailure(const QString &failure_reason) {
|
void TidalSettingsPage::LoginFailure(const QString &failure_reason) {
|
||||||
|
|
||||||
if (!this->isVisible()) return;
|
if (!isVisible()) return;
|
||||||
QMessageBox::warning(this, tr("Authentication failed"), failure_reason);
|
QMessageBox::warning(this, tr("Authentication failed"), failure_reason);
|
||||||
ui_->button_login->setEnabled(true);
|
ui_->button_login->setEnabled(true);
|
||||||
|
|
||||||
|
|||||||
@@ -299,9 +299,9 @@ QMimeData *SmartPlaylistsModel::mimeData(const QModelIndexList &indexes) const {
|
|||||||
PlaylistGeneratorPtr generator = CreateGenerator(indexes.first());
|
PlaylistGeneratorPtr generator = CreateGenerator(indexes.first());
|
||||||
if (!generator) return nullptr;
|
if (!generator) return nullptr;
|
||||||
|
|
||||||
PlaylistGeneratorMimeData *data = new PlaylistGeneratorMimeData(generator);
|
PlaylistGeneratorMimeData *mimedata = new PlaylistGeneratorMimeData(generator);
|
||||||
data->setData(kSmartPlaylistsMimeType, QByteArray());
|
mimedata->setData(kSmartPlaylistsMimeType, QByteArray());
|
||||||
data->name_for_new_playlist_ = this->data(indexes.first()).toString();
|
mimedata->name_for_new_playlist_ = data(indexes.first()).toString();
|
||||||
return data;
|
return mimedata;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -264,9 +264,9 @@ void GroupedIconView::paintEvent(QPaintEvent *e) {
|
|||||||
const QAbstractItemModel *itemModel = model();
|
const QAbstractItemModel *itemModel = model();
|
||||||
const QItemSelectionModel *selections = selectionModel();
|
const QItemSelectionModel *selections = selectionModel();
|
||||||
const bool focus = (hasFocus() || viewport()->hasFocus()) && current.isValid();
|
const bool focus = (hasFocus() || viewport()->hasFocus()) && current.isValid();
|
||||||
const QStyle::State state = option.state;
|
const QStyle::State opt_state = option.state;
|
||||||
const QAbstractItemView::State viewState = this->state();
|
const QAbstractItemView::State viewState = state();
|
||||||
const bool enabled = (state & QStyle::State_Enabled) != 0;
|
const bool enabled = (opt_state & QStyle::State_Enabled) != 0;
|
||||||
|
|
||||||
int maxSize = (flow() == TopToBottom) ? viewport()->size().width() - 2 * spacing() : viewport()->size().height() - 2 * spacing();
|
int maxSize = (flow() == TopToBottom) ? viewport()->size().width() - 2 * spacing() : viewport()->size().height() - 2 * spacing();
|
||||||
|
|
||||||
@@ -285,7 +285,7 @@ void GroupedIconView::paintEvent(QPaintEvent *e) {
|
|||||||
option.rect.setHeight(qMin(maxSize, option.rect.height()));
|
option.rect.setHeight(qMin(maxSize, option.rect.height()));
|
||||||
}
|
}
|
||||||
|
|
||||||
option.state = state;
|
option.state = opt_state;
|
||||||
if (selections && selections->isSelected(*it))
|
if (selections && selections->isSelected(*it))
|
||||||
option.state |= QStyle::State_Selected;
|
option.state |= QStyle::State_Selected;
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ class QSearchField : public QWidget {
|
|||||||
void setFocus(Qt::FocusReason);
|
void setFocus(Qt::FocusReason);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void setText(const QString &text);
|
void setText(const QString &new_text);
|
||||||
void setPlaceholderText(const QString &text);
|
void setPlaceholderText(const QString &text);
|
||||||
void clear();
|
void clear();
|
||||||
void selectAll();
|
void selectAll();
|
||||||
|
|||||||
@@ -111,11 +111,11 @@ void QSearchField::setIconSize(const int iconsize) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QSearchField::setText(const QString &text) {
|
void QSearchField::setText(const QString &new_text) {
|
||||||
|
|
||||||
Q_ASSERT(pimpl && pimpl->clearbutton_ && pimpl->lineedit_);
|
Q_ASSERT(pimpl && pimpl->clearbutton_ && pimpl->lineedit_);
|
||||||
if (!(pimpl && pimpl->clearbutton_ && pimpl->lineedit_)) return;
|
if (!(pimpl && pimpl->clearbutton_ && pimpl->lineedit_)) return;
|
||||||
if (text != this->text()) pimpl->lineedit_->setText(text);
|
if (new_text != text()) pimpl->lineedit_->setText(new_text);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user