Code formatting
This commit is contained in:
@@ -619,9 +619,8 @@ bool AutoType::windowMatches(const QString& windowTitle, const QString& windowPa
|
||||
if (windowPattern.startsWith("//") && windowPattern.endsWith("//") && windowPattern.size() >= 4) {
|
||||
QRegExp regExp(windowPattern.mid(2, windowPattern.size() - 4), Qt::CaseInsensitive, QRegExp::RegExp2);
|
||||
return (regExp.indexIn(windowTitle) != -1);
|
||||
}
|
||||
return WildcardMatcher(windowTitle).match(windowPattern);
|
||||
|
||||
}
|
||||
return WildcardMatcher(windowTitle).match(windowPattern);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "AutoTypeFilterLineEdit.h"
|
||||
#include <QKeyEvent>
|
||||
|
||||
void AutoTypeFilterLineEdit::keyPressEvent(QKeyEvent *event)
|
||||
void AutoTypeFilterLineEdit::keyPressEvent(QKeyEvent* event)
|
||||
{
|
||||
if (event->key() == Qt::Key_Up) {
|
||||
emit keyUpPressed();
|
||||
@@ -29,7 +29,7 @@ void AutoTypeFilterLineEdit::keyPressEvent(QKeyEvent *event)
|
||||
}
|
||||
}
|
||||
|
||||
void AutoTypeFilterLineEdit::keyReleaseEvent(QKeyEvent *event)
|
||||
void AutoTypeFilterLineEdit::keyReleaseEvent(QKeyEvent* event)
|
||||
{
|
||||
if (event->key() == Qt::Key_Escape) {
|
||||
emit escapeReleased();
|
||||
|
||||
@@ -25,10 +25,14 @@ class AutoTypeFilterLineEdit : public QLineEdit
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
AutoTypeFilterLineEdit(QWidget* widget) : QLineEdit(widget) {}
|
||||
AutoTypeFilterLineEdit(QWidget* widget)
|
||||
: QLineEdit(widget)
|
||||
{
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual void keyPressEvent(QKeyEvent *event);
|
||||
virtual void keyReleaseEvent(QKeyEvent *event);
|
||||
virtual void keyPressEvent(QKeyEvent* event);
|
||||
virtual void keyReleaseEvent(QKeyEvent* event);
|
||||
signals:
|
||||
void keyUpPressed();
|
||||
void keyDownPressed();
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
#include <QDialogButtonBox>
|
||||
#include <QHeaderView>
|
||||
#include <QLabel>
|
||||
#include <QVBoxLayout>
|
||||
#include <QLineEdit>
|
||||
#include <QSortFilterProxyModel>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#include "autotype/AutoTypeSelectView.h"
|
||||
#include "core/AutoTypeMatch.h"
|
||||
@@ -77,7 +77,7 @@ AutoTypeSelectDialog::AutoTypeSelectDialog(QWidget* parent)
|
||||
connect(m_view, SIGNAL(rejected()), SLOT(reject()));
|
||||
// clang-format on
|
||||
|
||||
QSortFilterProxyModel *proxy = qobject_cast<QSortFilterProxyModel*>(m_view->model());
|
||||
QSortFilterProxyModel* proxy = qobject_cast<QSortFilterProxyModel*>(m_view->model());
|
||||
if (proxy) {
|
||||
proxy->setFilterKeyColumn(-1);
|
||||
proxy->setFilterCaseSensitivity(Qt::CaseInsensitive);
|
||||
@@ -146,10 +146,9 @@ void AutoTypeSelectDialog::matchRemoved()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void AutoTypeSelectDialog::filterList(QString filterString)
|
||||
{
|
||||
QSortFilterProxyModel *proxy = qobject_cast<QSortFilterProxyModel*>(m_view->model());
|
||||
QSortFilterProxyModel* proxy = qobject_cast<QSortFilterProxyModel*>(m_view->model());
|
||||
if (proxy) {
|
||||
proxy->setFilterWildcard(filterString);
|
||||
if (!m_view->currentIndex().isValid()) {
|
||||
|
||||
Reference in New Issue
Block a user