projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
*headdesk* Apparently QTextLayout::FormatRange() does not have an initializing ctor...
[quassel.git]
/
src
/
qtui
/
chatline-old.cpp
diff --git
a/src/qtui/chatline-old.cpp
b/src/qtui/chatline-old.cpp
index
2c9cb0d
..
0a3cc20
100644
(file)
--- a/
src/qtui/chatline-old.cpp
+++ b/
src/qtui/chatline-old.cpp
@@
-29,8
+29,7
@@
*/
ChatLineOld::ChatLineOld(Message m) {
hght = 0;
*/
ChatLineOld::ChatLineOld(Message m) {
hght = 0;
- //networkName = m.buffer.network();
- //bufferName = m.buffer.buffer();
+
msg = m;
selectionMode = None;
isHighlight = false;
msg = m;
selectionMode = None;
isHighlight = false;
@@
-50,9
+49,17
@@
void ChatLineOld::formatMsg(Message msg) {
precomputeLine();
}
precomputeLine();
}
+QList<ChatLineOld::FormatRange> ChatLineOld::calcFormatRanges(const UiStyle::StyledText &fs) {
+ QTextLayout::FormatRange additional;
+ additional.start = additional.length = 0;
+ return calcFormatRanges(fs, additional);
+}
+
// This function is almost obsolete, since with the new style engine, we already get a list of formats...
// We don't know yet if we keep this implementation of ChatLineOld, so I won't bother making this actually nice.
// This function is almost obsolete, since with the new style engine, we already get a list of formats...
// We don't know yet if we keep this implementation of ChatLineOld, so I won't bother making this actually nice.
-QList<ChatLineOld::FormatRange> ChatLineOld::calcFormatRanges(UiStyle::StyledText fs, QTextLayout::FormatRange additional) {
+QList<ChatLineOld::FormatRange> ChatLineOld::calcFormatRanges(const UiStyle::StyledText &_fs,
+ const QTextLayout::FormatRange &additional) {
+ UiStyle::StyledText fs = _fs;
QList<FormatRange> ranges;
if(additional.length > 0) {
QList<FormatRange> ranges;
if(additional.length > 0) {
@@
-76,6
+83,7
@@
QList<ChatLineOld::FormatRange> ChatLineOld::calcFormatRanges(UiStyle::StyledTex
}
}
}
}
}
}
+
foreach(QTextLayout::FormatRange f, fs.formats) {
if(f.length <= 0) continue;
FormatRange range;
foreach(QTextLayout::FormatRange f, fs.formats) {
if(f.length <= 0) continue;
FormatRange range;