commit
25747a0964
2 changed files with 10 additions and 5 deletions
|
@ -23,8 +23,11 @@ ChatView::ChatView(const TabSupervisor *_tabSupervisor, TabGame *_game, bool _sh
|
||||||
userContextMenu = new UserContextMenu(tabSupervisor, this, game);
|
userContextMenu = new UserContextMenu(tabSupervisor, this, game);
|
||||||
connect(userContextMenu, SIGNAL(openMessageDialog(QString, bool)), this, SIGNAL(openMessageDialog(QString, bool)));
|
connect(userContextMenu, SIGNAL(openMessageDialog(QString, bool)), this, SIGNAL(openMessageDialog(QString, bool)));
|
||||||
|
|
||||||
userName = QString::fromStdString(tabSupervisor->getUserInfo()->name());
|
if(tabSupervisor->getUserInfo())
|
||||||
mention = "@" + userName.toLower();
|
{
|
||||||
|
userName = QString::fromStdString(tabSupervisor->getUserInfo()->name());
|
||||||
|
mention = "@" + userName.toLower();
|
||||||
|
}
|
||||||
|
|
||||||
mentionFormat.setFontWeight(QFont::Bold);
|
mentionFormat.setFontWeight(QFont::Bold);
|
||||||
|
|
||||||
|
@ -127,7 +130,7 @@ void ChatView::appendMessage(QString message, QString sender, UserLevelFlags use
|
||||||
senderFormat.setAnchor(true);
|
senderFormat.setAnchor(true);
|
||||||
senderFormat.setAnchorHref("user://" + QString::number(userLevel) + "_" + sender);
|
senderFormat.setAnchorHref("user://" + QString::number(userLevel) + "_" + sender);
|
||||||
if (!sameSender) {
|
if (!sameSender) {
|
||||||
if (!sender.isEmpty()) {
|
if (!sender.isEmpty() && tabSupervisor->getUserListsTab()) {
|
||||||
const int pixelSize = QFontInfo(cursor.charFormat().font()).pixelSize();
|
const int pixelSize = QFontInfo(cursor.charFormat().font()).pixelSize();
|
||||||
QMap<QString, UserListTWI *> buddyList = tabSupervisor->getUserListsTab()->getBuddyList()->getUsers();
|
QMap<QString, UserListTWI *> buddyList = tabSupervisor->getUserListsTab()->getBuddyList()->getUsers();
|
||||||
cursor.insertImage(UserLevelPixmapGenerator::generatePixmap(pixelSize, userLevel, buddyList.contains(sender)).toImage());
|
cursor.insertImage(UserLevelPixmapGenerator::generatePixmap(pixelSize, userLevel, buddyList.contains(sender)).toImage());
|
||||||
|
|
|
@ -246,7 +246,8 @@ TabGame::TabGame(TabSupervisor *_tabSupervisor, GameReplay *_replay)
|
||||||
activeCard(0),
|
activeCard(0),
|
||||||
gameClosed(false),
|
gameClosed(false),
|
||||||
replay(_replay),
|
replay(_replay),
|
||||||
currentReplayStep(0)
|
currentReplayStep(0),
|
||||||
|
sayEdit(0)
|
||||||
{
|
{
|
||||||
setAttribute(Qt::WA_DeleteOnClose);
|
setAttribute(Qt::WA_DeleteOnClose);
|
||||||
|
|
||||||
|
@ -885,7 +886,8 @@ void TabGame::startGame(bool resuming)
|
||||||
gameInfo.set_started(true);
|
gameInfo.set_started(true);
|
||||||
static_cast<GameScene *>(gameView->scene())->rearrange();
|
static_cast<GameScene *>(gameView->scene())->rearrange();
|
||||||
gameView->show();
|
gameView->show();
|
||||||
sayEdit->setFocus();
|
if(sayEdit)
|
||||||
|
sayEdit->setFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TabGame::stopGame()
|
void TabGame::stopGame()
|
||||||
|
|
Loading…
Reference in a new issue