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

List:       kde-commits
Subject:    KDE/kdenetwork/kopete
From:       Duncan Mac-Vicar Prett <duncan () kde ! org>
Date:       2007-03-18 14:03:03
Message-ID: 1174226583.250093.23957.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 643822 by dmacvicar:


Various Qt4 ports and IO_*



 M  +1 -1      kopete/chatwindow/chatmessagepart.h  
 M  +4 -4      kopete/chatwindow/kopetechatwindowstyle.cpp  
 M  +1 -1      kopete/chatwindow/kopetechatwindowstylemanager.cpp  
 M  +1 -1      kopete/chatwindow/tests/chatwindowstyle_test.cpp  
 M  +2 -2      kopete/chatwindow/tests/chatwindowstylerendering_test.cpp  
 M  +1 -1      kopete/config/identity/kopeteidentityconfig.cpp  
 M  +6 -6      libkopete/kopetemessage.cpp  
 M  +2 -2      libkopete/kopetepicture.cpp  
 M  +1 -1      libkopete/private/kopeteemoticons.cpp  
 M  +2 -2      libkopete/tests/kopetemessage_test.cpp  
 M  +3 -3      libkopete/ui/webcamwidget.cpp  
 M  +1 -1      plugins/smpppdcs/libsmpppdclient/smpppdunsettled.cpp  
 M  +1 -1      protocols/winpopup/libwinpopup/libwinpopup.cpp  


--- trunk/KDE/kdenetwork/kopete/kopete/chatwindow/chatmessagepart.h #643821:643822
@@ -32,7 +32,7 @@
 	class ChatSession; 
 	class Contact; 
 }
-class KPopupMenu;
+class KMenu;
 class ChatWindowStyle;
 
 /**
--- trunk/KDE/kdenetwork/kopete/kopete/chatwindow/kopetechatwindowstyle.cpp \
#643821:643822 @@ -214,7 +214,7 @@
 	if( QFile::exists(nextIncomingFile) )
 	{
 		fileAccess.setFileName(nextIncomingFile);
-		fileAccess.open(IO_ReadOnly);
+		fileAccess.open(QIODevice::ReadOnly);
 		QTextStream headerStream(&fileAccess);
 		headerStream.setCodec(QTextCodec::codecForName("UTF-8"));
 		d->nextIncomingHtml = headerStream.readAll();
@@ -236,7 +236,7 @@
 	if( QFile::exists(nextOutgoingFile) )
 	{
 		fileAccess.setFileName(nextOutgoingFile);
-		fileAccess.open(IO_ReadOnly);
+		fileAccess.open(QIODevice::ReadOnly);
 		QTextStream headerStream(&fileAccess);
 		headerStream.setCodec(QTextCodec::codecForName("UTF-8"));
 		d->nextOutgoingHtml = headerStream.readAll();
@@ -259,7 +259,7 @@
 	if( QFile::exists(actionIncomingFile) )
 	{
 		fileAccess.setFileName(actionIncomingFile);
-		fileAccess.open(IO_ReadOnly);
+		fileAccess.open(QIODevice::ReadOnly);
 		QTextStream headerStream(&fileAccess);
 		headerStream.setCodec(QTextCodec::codecForName("UTF-8"));
 		d->actionIncomingHtml = headerStream.readAll();
@@ -270,7 +270,7 @@
 	if( QFile::exists(actionOutgoingFile) )
 	{
 		fileAccess.setFileName(actionOutgoingFile);
-		fileAccess.open(IO_ReadOnly);
+		fileAccess.open(QIODevice::ReadOnly);
 		QTextStream headerStream(&fileAccess);
 		headerStream.setCodec(QTextCodec::codecForName("UTF-8"));
 		d->actionOutgoingHtml = headerStream.readAll();
--- trunk/KDE/kdenetwork/kopete/kopete/chatwindow/kopetechatwindowstylemanager.cpp \
#643821:643822 @@ -146,7 +146,7 @@
 		return StyleCannotOpen;
 	}
 
-	if ( !archive->open(IO_ReadOnly) )
+	if ( !archive->open(QIODevice::ReadOnly) )
 	{
 		delete archive;
 
--- trunk/KDE/kdenetwork/kopete/kopete/chatwindow/tests/chatwindowstyle_test.cpp \
#643821:643822 @@ -33,7 +33,7 @@
 	testStyle = new ChatWindowStyle(QString(SRCDIR)+QString("/TestStyle"));
 
 	// change user data dir to avoid messing with user's .kde dir
-	setenv( "KDEHOME", QFile::encodeName( QDir::homeDirPath() + "/.kopete-unittest" ), \
true ); +	setenv( "KDEHOME", QFile::encodeName( QDir::homePath() + \
"/.kopete-unittest" ), true );  
 	testPaths();
 	testHtml();
--- trunk/KDE/kdenetwork/kopete/kopete/chatwindow/tests/chatwindowstylerendering_test.cpp \
#643821:643822 @@ -181,7 +181,7 @@
 void ChatWindowStyleRendering_Test::allTests()
 {
 	// change user data dir to avoid messing with user's .kde dir
-	setenv( "KDEHOME", QFile::encodeName( QDir::homeDirPath() + "/.kopete-unittest" ), \
true ); +	setenv( "KDEHOME", QFile::encodeName( QDir::homePath() + \
"/.kopete-unittest" ), true );  
 	//KApplication::disableAutoDcopRegistration();
 	//KCmdLineArgs::init(argc,argv,"testkopetemessage", 0, 0, 0, 0);
@@ -317,7 +317,7 @@
 
 	// Read the expected(sample) HTML from file.
 	QFile sampleHtml(QString(SRCDIR)+"sample.html");
-	if(sampleHtml.open(IO_ReadOnly))
+	if(sampleHtml.open(QIODevice::ReadOnly))
 	{
 		QTextStream stream(&sampleHtml);
 		stream.setEncoding(QTextStream::UnicodeUTF8);
--- trunk/KDE/kdenetwork/kopete/kopete/config/identity/kopeteidentityconfig.cpp \
#643821:643822 @@ -560,7 +560,7 @@
 		// Bug 124175: My personnal picture doesn't appear cause of l10n
 		QByteArray tempArray;
 		QBuffer tempBuffer(&tempArray);
-		tempBuffer.open( IO_WriteOnly );
+		tempBuffer.open( QIODevice::WriteOnly );
 		photo.save(&tempBuffer, "PNG");
 		KMD5 context(tempArray);
 		// Save the image to a file.
--- trunk/KDE/kdenetwork/kopete/libkopete/kopetemessage.cpp #643821:643822
@@ -234,26 +234,26 @@
 	QString data = xml;
 
 	// Remove linebreak and multiple spaces. First return nbsp's to normal spaces :)
-	data = data.simplifyWhiteSpace();
+	data = data.simplified();
 
 	int pos;
 	while ( ( pos = data.indexOf( '<' ) ) != -1 )
 	{
-		int endPos = data.find( '>', pos + 1 );
+		int endPos = data.indexOf( '>', pos + 1 );
 		if( endPos == -1 )
 			break;    // No more complete elements left
 
 		// Take the part between < and >, and extract the element name from that
 		int matchWidth = endPos - pos + 1;
-		QString match = data.mid( pos + 1, matchWidth - 2 ).simplifyWhiteSpace();
+		QString match = data.mid( pos + 1, matchWidth - 2 ).simplified();
 		int elemEndPos = match.indexOf( ' ' );
-		QString elem = ( elemEndPos == -1 ? match.lower() : match.left( elemEndPos \
).lower() ); +		QString elem = ( elemEndPos == -1 ? match.toLower() : match.left( \
elemEndPos ).toLower() );  if ( elem == QLatin1String( "img" ) )
 		{
 			// Replace smileys with their original text'
 			const QString attrTitle  = QLatin1String( "title=\"" );
-			int titlePos    = match.find( attrTitle, elemEndPos );
-			int titleEndPos = match.find( '"',       titlePos + attrTitle.length() );
+			int titlePos    = match.indexOf( attrTitle, elemEndPos );
+			int titleEndPos = match.indexOf( '"',       titlePos + attrTitle.length() );
 			if( titlePos == -1 || titleEndPos == -1 )
 			{
 				// Not a smiley but a normal <img>
--- trunk/KDE/kdenetwork/kopete/libkopete/kopetepicture.cpp #643821:643822
@@ -94,7 +94,7 @@
 		// Generate base64 cache for the picture.
 		QByteArray tempArray;
 		QBuffer tempBuffer( &tempArray );
-		tempBuffer.open( IO_WriteOnly );
+		tempBuffer.open( QIODevice::WriteOnly );
 		// Make sure it create a image cache.
 		if( image().save( &tempBuffer, "PNG" ) )
 		{
@@ -116,7 +116,7 @@
 		// Generate MD5 Hash for the image.
 		QByteArray tempArray;
 		QBuffer tempBuffer(&tempArray);
-		tempBuffer.open( IO_WriteOnly );
+		tempBuffer.open( QIODevice::WriteOnly );
 		image().save(&tempBuffer, "PNG");
 		KMD5 context(tempArray);
 		// Save the image to a file.
--- trunk/KDE/kdenetwork/kopete/libkopete/private/kopeteemoticons.cpp #643821:643822
@@ -432,7 +432,7 @@
 	QDomDocument emoticonMap( QLatin1String( "icondef" ) );	
 	
 	QFile mapFile( filename );
-	mapFile.open( IO_ReadOnly );
+	mapFile.open( QIODevice::ReadOnly );
 	emoticonMap.setContent( &mapFile );
 
 	QDomElement list = emoticonMap.documentElement();
--- trunk/KDE/kdenetwork/kopete/libkopete/tests/kopetemessage_test.cpp #643821:643822
@@ -172,8 +172,8 @@
 
 		QCOMPARE(msg.escapedBody(),                   QString(" &nbsp; <b>HELLO WORLD</b> \
&nbsp; "));  QCOMPARE(msg.plainBody(),                     QString("   HELLO WORLD   \
                "));
-		QCOMPARE(msg.plainBody().stripWhiteSpace(),   QString("HELLO WORLD"));
-		QCOMPARE(msg.escapedBody().stripWhiteSpace(), QString("&nbsp; <b>HELLO WORLD</b> \
&nbsp;")); +		QCOMPARE(msg.plainBody().trimmed(),   QString("HELLO WORLD"));
+		QCOMPARE(msg.escapedBody().trimmed(), QString("&nbsp; <b>HELLO WORLD</b> \
&nbsp;"));  }
 	{
 		Kopete::Message msg( m_contactFrom, m_contactTo, "foo", Kopete::Message::Inbound, \
                Kopete::Message::PlainText);
--- trunk/KDE/kdenetwork/kopete/libkopete/ui/webcamwidget.cpp #643821:643822
@@ -82,17 +82,17 @@
 	}
 
 	// TODO: draw the text
-	QRect r = p.boundingRect(rect(), Qt::AlignCenter | Qt::WordBreak, mText );
+	QRect r = p.boundingRect(rect(), Qt::AlignCenter | Qt::TextWordWrap, mText );
 	if ( !mText.isEmpty() && event->rect().intersects(r))
 	{
 		p.setPen(Qt::black);
 		QRect rec = rect();
 		rec.moveTopLeft(QPoint(1,1));
-		p.drawText(rec, Qt::AlignCenter | Qt::WordBreak, mText); 
+		p.drawText(rec, Qt::AlignCenter | Qt::TextWordWrap, mText); 
 
 		rec.moveTopLeft(QPoint(-1,-1));
 		p.setPen(Qt::white);
-		p.drawText(rec, Qt::AlignCenter | Qt::WordBreak, mText); 
+		p.drawText(rec, Qt::AlignCenter | Qt::TextWordWrap, mText); 
 	}
 	p.end();
 }
--- trunk/KDE/kdenetwork/kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.cpp \
#643821:643822 @@ -99,7 +99,7 @@
                       clg.exactMatch(response)) {
 				if(!password(client).isNull()) {
                     // we are challenged, ok, respond
-					write(client, QString("response = \
%1\n").arg(make_response(clg.cap(1).stripWhiteSpace(), password(client))).latin1()); \
+					write(client, QString("response = \
%1\n").arg(make_response(clg.cap(1)..trimmed(), password(client))).latin1());  \
response = read(client)[0];  if(ver.exactMatch(response)) {
 						setServerID(client, response);
--- trunk/KDE/kdenetwork/kopete/protocols/winpopup/libwinpopup/libwinpopup.cpp \
#643821:643822 @@ -272,7 +272,7 @@
 		if (tmpItem->isFile()) {
 			QFile messageFile(tmpItem->url().path());
 
-			if (messageFile.open(IO_ReadOnly)) {
+			if (messageFile.open(QIODevice::ReadOnly)) {
 				QTextStream stream(&messageFile);
 				QString sender;
 				QDateTime time;


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

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