From 4db4742f007d1d0621dd5a61c475972a965b108c Mon Sep 17 00:00:00 2001 From: csoler Date: Sun, 25 Aug 2013 20:22:41 +0000 Subject: [PATCH] fixed up completer for nicknames in chat lobbies (Patch from Phenom) git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6608 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/chat/ChatWidget.cpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/retroshare-gui/src/gui/chat/ChatWidget.cpp b/retroshare-gui/src/gui/chat/ChatWidget.cpp index 003d7badd..995901d09 100644 --- a/retroshare-gui/src/gui/chat/ChatWidget.cpp +++ b/retroshare-gui/src/gui/chat/ChatWidget.cpp @@ -132,10 +132,9 @@ ChatWidget::ChatWidget(QWidget *parent) : resetStatusBar(); completer = new QCompleter(this); - completer->setModel(modelFromPeers()); - completer->setModelSorting(QCompleter::CaseInsensitivelySortedModel); + //completer->setModel(modelFromPeers()); //No peers at this point. completer->setModelSorting(QCompleter::UnsortedModel); - //completer->setCaseSensitivity(Qt::CaseInsensitive); + completer->setCaseSensitivity(Qt::CaseInsensitive); completer->setWrapAround(false); ui->chatTextEdit->setCompleter(completer); ui->chatTextEdit->setCompleterKeyModifiers(Qt::ControlModifier); @@ -200,15 +199,6 @@ void ChatWidget::init(const std::string &peerId, const QString &title) QString customStateString = QString::fromUtf8(rsMsgs->getCustomStateString(peerId).c_str()); updatePeersCustomStateString(QString::fromStdString(peerId), customStateString); } else { - completer = new QCompleter(this); - completer->setModel(modelFromPeers()); - completer->setModelSorting(QCompleter::CaseInsensitivelySortedModel); - completer->setCaseSensitivity(Qt::CaseInsensitive); - completer->setWrapAround(false); - ui->chatTextEdit->setCompleter(completer); - ui->chatTextEdit->setCompleterKeyModifiers(Qt::ControlModifier); - ui->chatTextEdit->setCompleterKey(Qt::Key_Space); - updateTitle(); }