Author: mir3x Date: Sun Feb 12 20:11:06 2017 New Revision: 35020 URL: http://svn.gna.org/viewcvs/freeciv?rev=35020&view=rev Log: Qt client - Fixed 'glued' links in chat.
See gna bug #25499 Modified: trunk/client/gui-qt/chatline.cpp Modified: trunk/client/gui-qt/chatline.cpp URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/chatline.cpp?rev=35020&r1=35019&r2=35020&view=diff ============================================================================== --- trunk/client/gui-qt/chatline.cpp (original) +++ trunk/client/gui-qt/chatline.cpp Sun Feb 12 20:11:06 2017 @@ -613,15 +613,26 @@ /* insert html starting from last items */ last_i = str.count(); QMultiMap<int, QString>::const_iterator i = mm.constEnd(); + QMultiMap<int, QString>::const_iterator j = mm.constEnd(); while (i != mm.constBegin()) { --i; if (i.key() < last_i) { final_string = final_string.prepend(QString(qba.mid(i.key(), last_i - i.key())) - .toHtmlEscaped()); + .toHtmlEscaped()); } last_i = i.key(); - final_string = final_string.prepend(i.value()); + j = i; + if (i != mm.constBegin()) { + j--; + } + if (j.key() == i.key() && i != j) { + final_string = final_string.prepend(j.value()); + final_string = final_string.prepend(i.value()); + i--; + } else { + final_string = final_string.prepend(i.value()); + } } if (last_i == str.count()) { return str; _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits