[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 21:50:11
Message-ID: 1228859411.776749.15070.nullmailer () svn ! kde ! org
[Download RAW message or body]

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("<br>") );
-			msg->replace( QString("&lt;"), QString('<') );
-			msg->replace( QString("&gt;"), QString('>') );
+		} else {
+			msg->replace( QString('<'), QString("&lt;") );
 		}
+		msg->replace( QString('\n'), QString("<br>") );
 	}
 	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;


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

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