------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. http://bugs.kde.org/show_bug.cgi?id=113794
------- Additional Comments From tommi.rantala cs helsinki fi 2006-07-27 16:06 ------- SVN commit 566905 by rantala: Commit the patch partially. Reduces time taken by HistoryLogger::readMessages(QDate) from 25 seconds to 0.5 seconds with a 200kb log file. CCBUG: 113794 M +10 -2 kopetemessage.cpp --- trunk/KDE/kdenetwork/kopete/libkopete/kopetemessage.cpp #566904:566905 @ -83,7 +83,11 @ { //This is coming from the RichTextEditor component. //Strip off the containing HTML document - this->body.replace( QRegExp( QLatin1String(".*<body.*>\\s+(.*)\\s+</body>.*") ), QLatin1String("\\1") ); + if (this->body.contains(QLatin1String("<body"))) { + QRegExp rx( QLatin1String("<body[^>]*>\\s+(.*)\\s+</body>") ); + if (rx.indexIn(this->body) != -1) + this->body = rx.cap(1); + } //Strip <p> tags this->body.replace( QLatin1String("<p>"), QString::null ); @ -192,7 +196,11 @ { //This is coming from the RichTextEditor component. //Strip off the containing HTML document - theBody.replace( QRegExp( QLatin1String(".*<body.*>\\s+(.*)\\s+</body>.*") ), QLatin1String("\\1") ); + if (theBody.contains(QLatin1String("<body"))) { + QRegExp rx( QLatin1String("<body[^>]*>\\s+(.*)\\s+</body>") ); + if (rx.indexIn(theBody) != -1) + theBody = rx.cap(1); + } //Strip <p> tags theBody.replace( QLatin1String("<p>"), QString::null ); _______________________________________________ kopete-devel mailing list kopete-devel@kde.org https://mail.kde.org/mailman/listinfo/kopete-devel