SVN commit 895051 by mzanetti: really fixes 167352 and another related issue M +4 -10 otrlchatinterface.cpp M +1 -1 otrplugin.cpp --- trunk/KDE/kdenetwork/kopete/plugins/otr/otrlchatinterface.cpp #895050:895051 @@ -102,16 +102,12 @@ popup->show(); popup->setCloseLock( true ); - KeyGenThread *keyGenThread = new KeyGenThread ( accountname, protocol ); keyGenThread->start(); - QEventLoop eventLoop; - eventLoop.exec(QEventLoop::ExcludeSocketNotifiers | QEventLoop::ExcludeUserInputEvents); while( !keyGenThread->wait(100) ){ -// eventLoop.processEvents(QEventLoop::ExcludeUserInputEvents | QEventLoop::ExcludeSocketNotifiers, 100); + qApp->processEvents(QEventLoop::ExcludeUserInputEvents | QEventLoop::ExcludeSocketNotifiers, 100); } - eventLoop.quit(); popup->setCloseLock( false ); popup->close(); } @@ -520,18 +516,16 @@ } } - // message is now decrypted or is a Plaintext message and ready to deliver if( !ignoremessage ){ // message is decrypted if( newMessage != NULL ){ *msg = QString::fromUtf8(newMessage); otrl_message_free( newMessage ); - //msg = Qt::convertFromPlainText( msg, Qt::WhiteSpaceNormal ); - msg->replace( QString('\n'), QString("
") ); - msg->replace( QString("<"), QString('<') ); - msg->replace( QString(">"), QString('>') ); + } else { + msg->replace( QString('<'), QString("<") ); } + msg->replace( QString('\n'), QString("
") ); } return ignoremessage; } --- trunk/KDE/kdenetwork/kopete/plugins/otr/otrplugin.cpp #895050:895051 @@ -239,7 +239,7 @@ QString accountId = msg.manager()->account()->accountId(); QString contactId = msg.from()->contactId(); int ignoremessage = OtrlChatInterface::self()->decryptMessage( &body, accountId, msg.manager()->account()->protocol()->displayName(), contactId, msg.manager() ); - msg.setPlainBody( body ); + msg.setHtmlBody( body ); if( ignoremessage | OtrlChatInterface::self()->shouldDiscard( msg.plainBody() ) ){ event->discard(); return;