projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
No more posF in Qt 5; use the new localPos
[quassel.git]
/
src
/
uisupport
/
uistyle.cpp
diff --git
a/src/uisupport/uistyle.cpp
b/src/uisupport/uistyle.cpp
index
0e00d51
..
975c79d
100644
(file)
--- a/
src/uisupport/uistyle.cpp
+++ b/
src/uisupport/uistyle.cpp
@@
-491,12
+491,16
@@
QList<QTextLayout::FormatRange> UiStyle::toTextLayoutList(const FormatList &form
UiStyle::StyledString UiStyle::styleString(const QString &s_, quint32 baseFormat)
{
QString s = s_;
UiStyle::StyledString UiStyle::styleString(const QString &s_, quint32 baseFormat)
{
QString s = s_;
+ StyledString result;
+ result.formatList.append(qMakePair((quint16)0, baseFormat));
+
if (s.length() > 65535) {
if (s.length() > 65535) {
+ // We use quint16 for indexes
qWarning() << QString("String too long to be styled: %1").arg(s);
qWarning() << QString("String too long to be styled: %1").arg(s);
- return StyledString();
+ result.plainText = s;
+ return result;
}
}
- StyledString result;
- result.formatList.append(qMakePair((quint16)0, baseFormat));
+
quint32 curfmt = baseFormat;
int pos = 0; quint16 length = 0;
for (;;) {
quint32 curfmt = baseFormat;
int pos = 0; quint16 length = 0;
for (;;) {
@@
-858,7
+862,7
@@
quint8 UiStyle::StyledMessage::senderHash() const
if (chopCount < nick.size())
nick.chop(chopCount);
}
if (chopCount < nick.size())
nick.chop(chopCount);
}
- quint16 hash = qChecksum(nick.to
Ascii().data(), nick.toAscii
().size());
+ quint16 hash = qChecksum(nick.to
Latin1().data(), nick.toLatin1
().size());
return (_senderHash = (hash & 0xf) + 1);
}
return (_senderHash = (hash & 0xf) + 1);
}