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

View File

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