Remove unneeded this

This commit is contained in:
Jonas Kvinge
2021-09-13 20:49:33 +02:00
parent d78ee3d62b
commit d5b0794b00
20 changed files with 40 additions and 40 deletions

View File

@@ -264,9 +264,9 @@ void GroupedIconView::paintEvent(QPaintEvent *e) {
const QAbstractItemModel *itemModel = model();
const QItemSelectionModel *selections = selectionModel();
const bool focus = (hasFocus() || viewport()->hasFocus()) && current.isValid();
const QStyle::State state = option.state;
const QAbstractItemView::State viewState = this->state();
const bool enabled = (state & QStyle::State_Enabled) != 0;
const QStyle::State opt_state = option.state;
const QAbstractItemView::State viewState = state();
const bool enabled = (opt_state & QStyle::State_Enabled) != 0;
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.state = state;
option.state = opt_state;
if (selections && selections->isSelected(*it))
option.state |= QStyle::State_Selected;
if (enabled) {

View File

@@ -25,7 +25,7 @@ class QSearchField : public QWidget {
void setFocus(Qt::FocusReason);
public slots:
void setText(const QString &text);
void setText(const QString &new_text);
void setPlaceholderText(const QString &text);
void clear();
void selectAll();

View File

@@ -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_);
if (!(pimpl && pimpl->clearbutton_ && pimpl->lineedit_)) return;
if (text != this->text()) pimpl->lineedit_->setText(text);
if (new_text != text()) pimpl->lineedit_->setText(new_text);
}