[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdenetwork/kopete/plugins/otr
From:       Michael Zanetti <michael_zanetti () gmx ! net>
Date:       2008-12-09 20:32:04
Message-ID: 1228854724.336208.9007.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 895020 by mzanetti:

fixes BUG 167352


 M  +6 -2      otrlchatinterface.cpp  
 M  +1 -1      otrplugin.cpp  


--- trunk/KDE/kdenetwork/kopete/plugins/otr/otrlchatinterface.cpp #895019:895020
@@ -105,10 +105,13 @@
 
 	KeyGenThread *keyGenThread = new KeyGenThread ( accountname, protocol );
 	keyGenThread->start();
+	QEventLoop eventLoop;
+	eventLoop.exec(QEventLoop::ExcludeSocketNotifiers | QEventLoop::ExcludeUserInputEvents);
 	while( !keyGenThread->wait(100) ){
-		qApp->processEvents(QEventLoop::ExcludeUserInputEvents | QEventLoop::ExcludeSocketNotifiers, \
100); +//		eventLoop.processEvents(QEventLoop::ExcludeUserInputEvents | \
QEventLoop::ExcludeSocketNotifiers, 100);  }
 
+	eventLoop.quit();
 	popup->setCloseLock( false );
 	popup->close();
 }
@@ -388,7 +391,6 @@
 
 	ignoremessage = otrl_message_receiving( userstate, &ui_ops, chatSession, \
accountId.toLocal8Bit(), protocol.toLocal8Bit(), contactId.toLocal8Bit(), msg->toLocal8Bit(), \
&newMessage, &tlvs, NULL, NULL );  
-
 	tlv = otrl_tlv_find(tlvs, OTRL_TLV_DISCONNECTED);
 	if( tlv ){
 		Kopete::Message msg( chatSession->members().first(), chatSession->account()->myself() );
@@ -527,6 +529,8 @@
 			otrl_message_free( newMessage );
 			//msg = Qt::convertFromPlainText( msg, Qt::WhiteSpaceNormal );
 			msg->replace( QString('\n'), QString("<br>") );
+			msg->replace( QString("&lt;"), QString('<') );
+			msg->replace( QString("&gt;"), QString('>') );
 		}
 	}
 	return ignoremessage;
--- trunk/KDE/kdenetwork/kopete/plugins/otr/otrplugin.cpp #895019:895020
@@ -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.setHtmlBody( body );
+		msg.setPlainBody( body );
 		if( ignoremessage | OtrlChatInterface::self()->shouldDiscard( msg.plainBody() ) ){
 			event->discard();
 			return;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic