Skip to content

Commit

Permalink
Fix some errors and cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
droidmonkey committed Apr 4, 2021
1 parent 1b446bc commit 13c8039
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
5 changes: 0 additions & 5 deletions src/autotype/AutoTypeMatchView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,6 @@ void AutoTypeMatchView::filterList(const QString& filter)
setCurrentIndex(m_sortModel->index(0, 0));
}

QModelIndex AutoTypeMatchView::indexAt(const QPoint& pos) const
{
return m_sortModel->index(pos.y(), pos.x());
}

AutoTypeMatch AutoTypeMatchView::currentMatch()
{
QModelIndexList list = selectionModel()->selectedRows();
Expand Down
1 change: 0 additions & 1 deletion src/autotype/AutoTypeMatchView.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ class AutoTypeMatchView : public QTableView
AutoTypeMatch matchFromIndex(const QModelIndex& index);
void setMatchList(const QList<AutoTypeMatch>& matches, bool selectFirst);
void filterList(const QString& filter);
QModelIndex indexAt(const QPoint& pos) const override;

signals:
void currentMatchChanged(AutoTypeMatch match);
Expand Down
5 changes: 1 addition & 4 deletions src/autotype/AutoTypeSelectDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,7 @@ void AutoTypeSelectDialog::moveSelection(int offset)
{
auto index = m_ui->view->currentIndex();
auto row = index.isValid() ? index.row() : -1;

index = m_ui->view->indexAt({0, qBound(0, row + offset, m_ui->view->model()->rowCount() - 1)});

m_ui->view->setCurrentIndex(index);
m_ui->view->selectRow(qBound(0, row + offset, m_ui->view->model()->rowCount() - 1));
}

void AutoTypeSelectDialog::activateCurrentMatch()
Expand Down

0 comments on commit 13c8039

Please sign in to comment.