mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-12 16:09:37 -05:00
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
This commit is contained in:
parent
348c860d6e
commit
4db4742f00
@ -132,10 +132,9 @@ ChatWidget::ChatWidget(QWidget *parent) :
|
|||||||
resetStatusBar();
|
resetStatusBar();
|
||||||
|
|
||||||
completer = new QCompleter(this);
|
completer = new QCompleter(this);
|
||||||
completer->setModel(modelFromPeers());
|
//completer->setModel(modelFromPeers()); //No peers at this point.
|
||||||
completer->setModelSorting(QCompleter::CaseInsensitivelySortedModel);
|
|
||||||
completer->setModelSorting(QCompleter::UnsortedModel);
|
completer->setModelSorting(QCompleter::UnsortedModel);
|
||||||
//completer->setCaseSensitivity(Qt::CaseInsensitive);
|
completer->setCaseSensitivity(Qt::CaseInsensitive);
|
||||||
completer->setWrapAround(false);
|
completer->setWrapAround(false);
|
||||||
ui->chatTextEdit->setCompleter(completer);
|
ui->chatTextEdit->setCompleter(completer);
|
||||||
ui->chatTextEdit->setCompleterKeyModifiers(Qt::ControlModifier);
|
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());
|
QString customStateString = QString::fromUtf8(rsMsgs->getCustomStateString(peerId).c_str());
|
||||||
updatePeersCustomStateString(QString::fromStdString(peerId), customStateString);
|
updatePeersCustomStateString(QString::fromStdString(peerId), customStateString);
|
||||||
} else {
|
} 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();
|
updateTitle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user