Coding style fixes.

This commit is contained in:
Felix Geyer 2015-12-06 20:27:09 +01:00
parent efc4cd5969
commit a3b936fcd0
2 changed files with 4 additions and 3 deletions

View File

@ -990,6 +990,7 @@ bool DatabaseWidget::eventFilter(QObject* object, QEvent* event)
if (object == m_searchUi->searchEdit) {
if (event->type() == QEvent::KeyPress) {
QKeyEvent* keyEvent = static_cast<QKeyEvent*>(event);
if (keyEvent->matches(QKeySequence::Copy)) {
// If Control+C is pressed in the search edit when no
// text is selected, copy the password of the current
@ -1003,8 +1004,8 @@ bool DatabaseWidget::eventFilter(QObject* object, QEvent* event)
else if (keyEvent->matches(QKeySequence::MoveToNextLine)) {
// If Down is pressed at EOL in the search edit, move
// the focus to the entry view.
if (!m_searchUi->searchEdit->hasSelectedText() &&
m_searchUi->searchEdit->cursorPosition() == m_searchUi->searchEdit->text().length()) {
if (!m_searchUi->searchEdit->hasSelectedText()
&& m_searchUi->searchEdit->cursorPosition() == m_searchUi->searchEdit->text().size()) {
m_entryView->setFocus();
return true;
}

View File

@ -103,7 +103,7 @@ Q_SIGNALS:
void entryColumnSizesChanged();
protected:
bool eventFilter(QObject* object, QEvent* event);
bool eventFilter(QObject* object, QEvent* event) Q_DECL_OVERRIDE;
public Q_SLOTS:
void createEntry();