Commit 713ebece authored by Max-Wilhelm Bruker's avatar Max-Wilhelm Bruker
Browse files

server version bump, minor chat view fix

parent d4f60039
......@@ -10,7 +10,7 @@ ChatView::ChatView(const QString &_ownName, QWidget *parent)
setTextInteractionFlags(Qt::TextSelectableByMouse);
}
void ChatView::appendMessage(const QString &sender, const QString &message)
void ChatView::appendMessage(QString sender, const QString &message)
{
QTextCursor cursor(document()->lastBlock());
cursor.movePosition(QTextCursor::End);
......@@ -31,7 +31,9 @@ void ChatView::appendMessage(const QString &sender, const QString &message)
} else
senderFormat.setForeground(Qt::blue);
cursor.setCharFormat(senderFormat);
cursor.insertText(sender + " ");
if (!sender.isEmpty())
sender.append(" ");
cursor.insertText(sender);
QTextCharFormat messageFormat;
if (sender.isEmpty())
......@@ -39,6 +41,5 @@ void ChatView::appendMessage(const QString &sender, const QString &message)
cursor.setCharFormat(messageFormat);
cursor.insertText(message);
verticalScrollBar()->setValue(verticalScrollBar()->maximum());
}
......@@ -12,7 +12,7 @@ private:
QString ownName;
public:
ChatView(const QString &_ownName, QWidget *parent = 0);
void appendMessage(const QString &sender, const QString &message);
void appendMessage(QString sender, const QString &message);
};
#endif
\ No newline at end of file
......@@ -235,4 +235,4 @@ void Servatrice::statusUpdate()
execSqlQuery(query);
}
const QString Servatrice::versionString = "Servatrice 0.20110127";
const QString Servatrice::versionString = "Servatrice 0.20110215";
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment