X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fuisupport%2Ftabcompleter.cpp;h=5d2bf027b680dc0129c30035bac06656c85e72db;hb=d399105c3cacc85e30afc28e174efefd36332bc3;hp=527eb79540a01a953355fd89e3ec64bb18ce5d68;hpb=d650a89ba2410eea2b6b9a9be4644a7847d16d48;p=quassel.git diff --git a/src/uisupport/tabcompleter.cpp b/src/uisupport/tabcompleter.cpp index 527eb795..5d2bf027 100644 --- a/src/uisupport/tabcompleter.cpp +++ b/src/uisupport/tabcompleter.cpp @@ -30,7 +30,7 @@ #include "uisettings.h" #include "action.h" #include "actioncollection.h" -#include "qtui.h" +#include "graphicalui.h" #include @@ -48,7 +48,7 @@ TabCompleter::TabCompleter(MultiLineEdit *_lineEdit) // use both an Action and generic eventFilter, to make the shortcut configurable // yet still be able to reset() when required _lineEdit->installEventFilter(this); - ActionCollection *coll = QtUi::actionCollection("General"); + ActionCollection *coll = GraphicalUi::actionCollection("General"); coll->addAction("TabCompletionKey", new Action(tr("Tab completion"), coll, this, SLOT(onTabCompletionKey()), QKeySequence(Qt::Key_Tab))); } @@ -144,6 +144,7 @@ void TabCompleter::complete() { _lastCompletionLength += _nickSuffix.length(); } else if (s.addSpaceMidSentence()) { _lineEdit->insert(" "); + _lastCompletionLength++; } // we're at the end of the list -> start over again @@ -165,7 +166,7 @@ bool TabCompleter::eventFilter(QObject *obj, QEvent *event) { QKeyEvent *keyEvent = static_cast(event); - if(keyEvent->key() != QtUi::actionCollection("General")->action("TabCompletionKey")->shortcut()) { + if(keyEvent->key() != GraphicalUi::actionCollection("General")->action("TabCompletionKey")->shortcut()) { reset(); } return false;