Changeset View
Changeset View
Standalone View
Standalone View
krusader/BookMan/krbookmarkhandler.cpp
Context not available. | |||||
592 | return true; | 592 | return true; | ||
---|---|---|---|---|---|
593 | } | 593 | } | ||
594 | 594 | | |||
595 | if (kev->modifiers() != Qt::NoModifier || | 595 | if ((kev->modifiers() != Qt::ShiftModifier && | ||
596 | kev->text().isEmpty() || | 596 | kev->modifiers() != Qt::NoModifier) || | ||
597 | kev->key() == Qt::Key_Delete || | 597 | kev->text().isEmpty() || | ||
598 | kev->key() == Qt::Key_Return || | 598 | kev->key() == Qt::Key_Delete || | ||
599 | kev->key() == Qt::Key_Return || | ||||
599 | kev->key() == Qt::Key_Escape) { | 600 | kev->key() == Qt::Key_Escape) { | ||
600 | | ||||
601 | return QObject::eventFilter(obj, ev); | 601 | return QObject::eventFilter(obj, ev); | ||
602 | } | 602 | } | ||
603 | 603 | | |||
Context not available. | |||||
623 | // match actions | 623 | // match actions | ||
624 | QAction *matchedAction = nullptr; | 624 | QAction *matchedAction = nullptr; | ||
625 | int nMatches = 0; | 625 | int nMatches = 0; | ||
626 | const Qt::CaseSensitivity matchCase = | ||||
627 | _quickSearchText() == _quickSearchText().toLower() ? Qt::CaseInsensitive : Qt::CaseSensitive; | ||||
626 | for (auto act : acts) { | 628 | for (auto act : acts) { | ||
627 | if (act->isSeparator() || act->text() == "") { | 629 | if (act->isSeparator() || act->text() == "") { | ||
628 | continue; | 630 | continue; | ||
Context not available. | |||||
647 | } | 649 | } | ||
648 | 650 | | |||
649 | // match prefix of the action text to the query | 651 | // match prefix of the action text to the query | ||
650 | if (act->text().left(_quickSearchText().length()).compare(_quickSearchText(), Qt::CaseInsensitive) == 0) { | 652 | if (act->text().left(_quickSearchText().length()).compare(_quickSearchText(), matchCase) == 0) { | ||
651 | _highlightAction(act); | 653 | _highlightAction(act); | ||
652 | if (!matchedAction || matchedAction->menu()) { | 654 | if (!matchedAction || matchedAction->menu()) { | ||
653 | // Can't highlight menus (see comment below), hopefully pick something we can | 655 | // Can't highlight menus (see comment below), hopefully pick something we can | ||
Context not available. |