QFont font = v.value<QFont>();
if(font.family().isEmpty())
font = QApplication::font();
- ui.inputEdit->setFont(font);
+ ui.inputEdit->setCustomFont(font);
}
void InputWidget::currentChanged(const QModelIndex ¤t, const QModelIndex &previous) {
return;
IrcUser *me = net->me();
- if(me)
- nicks[nickIdx] = net->myNick() + QString(" (+%1)").arg(me->userModes());
+ if(me) {
+ nicks[nickIdx] = net->myNick();
+ if(!me->userModes().isEmpty())
+ nicks[nickIdx] += QString(" (+%1)").arg(me->userModes());
+ }
ui.ownNick->addItems(nicks);
const Network *net = currentNetwork();
if(!net || net->isMyNick(newNick))
return;
- sendText(QString("/NICK %1").arg(newNick));
+
+ // we reset the nick selecter as we have no confirmation yet, that this will succeed.
+ // if the action succeeds it will be properly updated anyways.
+ updateNickSelector();
+ Client::userInput(BufferInfo::fakeStatusBuffer(net->networkId()), QString("/NICK %1").arg(newNick));
}
void InputWidget::sendText(const QString &text) const {