mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-29 17:32:17 -07:00
Don't commit on ESC, switch to enum for triggers
Took 6 seconds
This commit is contained in:
parent
fdf2b069d7
commit
f717b8687d
5 changed files with 95 additions and 66 deletions
|
|
@ -1291,13 +1291,13 @@ void TabGame::createMessageDock(bool bReplay)
|
|||
connect(this, &TabGame::chatMessageSent, game->getGameEventHandler(), &GameEventHandler::handleChatMessageSent);
|
||||
mentionModel = new QStringListModel(autocompleteUserList, sayEdit);
|
||||
mentionCompleter = createMentionCompleter(mentionModel, sayEdit);
|
||||
sayEdit->addCompleter(mentionCompleter, "@");
|
||||
sayEdit->addCompleter(mentionCompleter, CompleterTrigger::Mention);
|
||||
|
||||
auto *cardDatabaseModel = new CardDatabaseModel(CardDatabaseManager::getInstance(), false, sayEdit);
|
||||
auto *displayModel = new CardDatabaseDisplayModel(sayEdit);
|
||||
displayModel->setSourceModel(cardDatabaseModel);
|
||||
const CardCompleterSetup cardSetup = createCardCompleter(displayModel, sayEdit);
|
||||
sayEdit->addCompleter(cardSetup.completer, "[[");
|
||||
sayEdit->addCompleter(cardSetup.completer, CompleterTrigger::Card);
|
||||
|
||||
connect(sayEdit, &LineEditCompleter::cardPartialChanged, this, [this, cardSetup](const QString &text) {
|
||||
cardSetup.searchModel->updateSearchResults(text);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue