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

List:       kde-commits
Subject:    KDE/kdepim/kpilot
From:       Bertjan Broeksema <b.broeksema () home ! nl>
Date:       2008-08-30 20:14:54
Message-ID: 1220127294.040824.1663.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 854964 by bbroeksema:

EBN Fixes++ - QString::null issues.


 M  +1 -1      conduits/akonadibase/akonadirecord.cc  
 M  +2 -2      conduits/base/idmappingxmlsource.cc  
 M  +6 -6      conduits/base/tests/rcfirstsynctest.cc  
 M  +10 -10    conduits/base/tests/rcfullsynchhtest.cc  
 M  +10 -10    conduits/base/tests/rchotsynchhtest.cc  
 M  +2 -2      conduits/contacts/contactsconduit.cc  
 M  +7 -9      lib/kpilotdevicelink.cc  
 M  +2 -2      lib/kpilotdevicelinkPrivate.h  
 M  +3 -3      lib/plugin.cc  


--- trunk/KDE/kdepim/kpilot/conduits/akonadibase/akonadirecord.cc #854963:854964
@@ -109,7 +109,7 @@
 	}
 	else
 	{
-		d->fTempId = QString();
+		d->fTempId.clear();
 		d->fItem.setId( id.toULongLong() );
 	}
 }
--- trunk/KDE/kdepim/kpilot/conduits/base/idmappingxmlsource.cc #854963:854964
@@ -174,7 +174,7 @@
 	// Reset local data.
 	d->fMappings = QMap<QString, QString>();
 	d->fLastSyncedDateTime = QDateTime();
-	d->fLastSyncedPC = QString();
+	d->fLastSyncedPC.clear();
 	
 	QFile file( d->fPath );
 	
@@ -316,7 +316,7 @@
 		// No backup, reset values.
 		d->fMappings = QMap<QString, QString>();
 		d->fLastSyncedDateTime = QDateTime();
-		d->fLastSyncedPC = QString();
+		d->fLastSyncedPC.clear();
 		return true;
 	}
 	
--- trunk/KDE/kdepim/kpilot/conduits/base/tests/rcfirstsynctest.cc #854963:854964
@@ -133,8 +133,8 @@
 	conduit.hhDataProxy()->records()->insert( rec2->id(), rec2 );
 	
 	// There should be a valid mapping
-	QVERIFY( conduit.mapping().hhRecordId( CSL1( "pc-1" ) ) == QString() );
-	QVERIFY( conduit.mapping().pcRecordId( CSL1( "hh-1" ) ) == QString() );
+	QVERIFY( conduit.mapping().hhRecordId( CSL1( "pc-1" ) ).isEmpty() );
+	QVERIFY( conduit.mapping().pcRecordId( CSL1( "hh-1" ) ).isEmpty() );
 	QVERIFY( conduit.equal( rec1, rec2 ) );
 	
 	// Everything is ok, do a hotsync now.
@@ -167,17 +167,17 @@
 	conduit.hhDataProxy()->records()->insert( rec2->id(), rec2 );
 	
 	// There should be a valid mapping
-	QVERIFY( conduit.mapping().hhRecordId( CSL1( "pc-1" ) ) == QString() );
-	QVERIFY( conduit.mapping().pcRecordId( CSL1( "hh-1" ) ) == QString() );
+	QVERIFY( conduit.mapping().hhRecordId( CSL1( "pc-1" ) ).isEmpty() );
+	QVERIFY( conduit.mapping().pcRecordId( CSL1( "hh-1" ) ).isEmpty() );
 	QVERIFY( !conduit.equal( rec1, rec2 ) );
 	
 	// Everything is ok, do a hotsync now.
 	conduit.firstSyncTest();
 	
 	// There should be a valid mapping
-	QVERIFY( conduit.mapping().hhRecordId( CSL1( "pc-1" ) ) != QString() );
+	QVERIFY( !conduit.mapping().hhRecordId( CSL1( "pc-1" ) ).isEmpty() );
 	QVERIFY( conduit.mapping().hhRecordId( CSL1( "pc-1" ) ) != CSL1( "hh-1" ) );
-	QVERIFY( conduit.mapping().pcRecordId( CSL1( "hh-1" ) ) != QString() );
+	QVERIFY( !conduit.mapping().pcRecordId( CSL1( "hh-1" ) ).isEmpty() );
 	QVERIFY( conduit.mapping().pcRecordId( CSL1( "hh-1" ) ) != CSL1( "pc-1" ) );
 	
 	QString hhId = conduit.mapping().hhRecordId( rec1->id() );
--- trunk/KDE/kdepim/kpilot/conduits/base/tests/rcfullsynchhtest.cc #854963:854964
@@ -260,7 +260,7 @@
 	QVERIFY( hhRec->isModified() );
 	
 	// There shouldn't be a mapping
-	QVERIFY( fConduit->mapping().hhRecordId( CSL1( "hh-2" ) ) == QString() );
+	QVERIFY( fConduit->mapping().hhRecordId( CSL1( "hh-2" ) ).isEmpty() );
 	
 	// Everything is ok, do a hotsync now.
 	fConduit->hotSyncTest();
@@ -270,7 +270,7 @@
 	
 	QString pcRecId = fConduit->mapping().pcRecordId( CSL1( "hh-2" ) );
 	
-	QVERIFY( pcRecId != QString() );
+	QVERIFY( !pcRecId.isEmpty() );
 	
 	Record *syncedPCRec = fConduit->pcDataProxy()->find( pcRecId );
 	
@@ -389,7 +389,7 @@
 	QVERIFY( pcRec->isModified() );
 	
 	// There shouldn't be a mapping
-	QVERIFY( fConduit->mapping().hhRecordId( CSL1( "pc-4" ) ) == QString() );
+	QVERIFY( fConduit->mapping().hhRecordId( CSL1( "pc-4" ) ).isEmpty() );
 	
 	// Everything is ok, do a hotsync now.
 	fConduit->hotSyncTest();
@@ -398,7 +398,7 @@
 	
 	QString hhRecId = fConduit->mapping().hhRecordId( CSL1( "pc-4" ) );
 	
-	QVERIFY( hhRecId != QString() );
+	QVERIFY( !hhRecId.isEmpty() );
 	
 	HHRecord *syncedHHRec = 
 		static_cast<HHRecord*>( fConduit->hhDataProxy()->find( hhRecId ) );
@@ -677,7 +677,7 @@
 	QVERIFY( !hhRec->isModified() );
 	
 	// There shouldn't be a mapping
-	QVERIFY( fConduit->mapping().pcRecordId( CSL1( "hh-12" ) ) == QString() );
+	QVERIFY( fConduit->mapping().pcRecordId( CSL1( "hh-12" ) ).isEmpty() );
 	
 	// Everything is ok, do a hotsync now.
 	fConduit->hotSyncTest();
@@ -689,7 +689,7 @@
 	Record *syncedPCRec = fConduit->pcDataProxy()->find( pcRecId );
 	
 	// Mapping should exist.
-	QVERIFY( pcRecId != QString() );
+	QVERIFY( !pcRecId.isEmpty() );
 	// PC record should exist.
 	QVERIFY( syncedPCRec );
 	
@@ -719,7 +719,7 @@
 	QVERIFY( !pcRec->isModified() );
 	
 	// There shouldn't be a mapping
-	QVERIFY( fConduit->mapping().hhRecordId( CSL1( "pc-12" ) ) == QString() );
+	QVERIFY( fConduit->mapping().hhRecordId( CSL1( "pc-12" ) ).isEmpty() );
 	
 	// Everything is ok, do a hotsync now.
 	fConduit->hotSyncTest();
@@ -728,7 +728,7 @@
 	
 	QString hhRecId = fConduit->mapping().hhRecordId( CSL1( "pc-12" ) );
 	
-	QVERIFY( hhRecId != QString() );
+	QVERIFY( !hhRecId.isEmpty() );
 	TestHHRecord *syncedHHRec = static_cast<TestHHRecord*>(
 		fConduit->hhDataProxy()->find( hhRecId ) );
 	
@@ -866,8 +866,8 @@
 	fConduit->hotSyncTest();
 	
 	// There shouldn't be a mapping anymore
-	QVERIFY( fConduit->mapping().hhRecordId( CSL1( "pc-15" ) ) == QString() );
-	QVERIFY( fConduit->mapping().pcRecordId( CSL1( "hh-15" ) ) == QString() );
+	QVERIFY( fConduit->mapping().hhRecordId( CSL1( "pc-15" ) ).isEmpty() );
+	QVERIFY( fConduit->mapping().pcRecordId( CSL1( "hh-15" ) ).isEmpty() );
 	
 	Record *syncedPCRec = fConduit->pcDataProxy()->find( CSL1( "pc-15" ) );
 	Record *syncedHHRec = fConduit->hhDataProxy()->find( CSL1( "hh-15" ) );
--- trunk/KDE/kdepim/kpilot/conduits/base/tests/rchotsynchhtest.cc #854963:854964
@@ -289,7 +289,7 @@
 	QVERIFY( hhRec->isModified() );
 	
 	// There shouldn't be a mapping
-	QVERIFY( fConduit->mapping().hhRecordId( CSL1( "hh-2" ) ) == QString() );
+	QVERIFY( fConduit->mapping().hhRecordId( CSL1( "hh-2" ) ).isEmpty() );
 	
 	// Everything is ok, do a hotsync now.
 	fConduit->hotSyncTest();
@@ -299,7 +299,7 @@
 	
 	QString pcRecId = fConduit->mapping().pcRecordId( CSL1( "hh-2" ) );
 	
-	QVERIFY( pcRecId != QString() );
+	QVERIFY( !pcRecId.isEmpty() );
 	
 	Record *syncedPCRec = fConduit->pcDataProxy()->find( pcRecId );
 	
@@ -418,7 +418,7 @@
 	QVERIFY( pcRec->isModified() );
 	
 	// There shouldn't be a mapping
-	QVERIFY( fConduit->mapping().hhRecordId( CSL1( "pc-4" ) ) == QString() );
+	QVERIFY( fConduit->mapping().hhRecordId( CSL1( "pc-4" ) ).isEmpty() );
 	
 	// Everything is ok, do a hotsync now.
 	fConduit->hotSyncTest();
@@ -427,7 +427,7 @@
 	
 	QString hhRecId = fConduit->mapping().hhRecordId( CSL1( "pc-4" ) );
 	
-	QVERIFY( hhRecId != QString() );
+	QVERIFY( !hhRecId.isEmpty() );
 	
 	TestHHRecord *syncedHHRec = static_cast<TestHHRecord*>(
 		fConduit->hhDataProxy()->find( hhRecId ) );
@@ -705,7 +705,7 @@
 	QVERIFY( !hhRec->isModified() );
 	
 	// There shouldn't be a mapping
-	QVERIFY( fConduit->mapping().pcRecordId( CSL1( "hh-12" ) ) == QString() );
+	QVERIFY( fConduit->mapping().pcRecordId( CSL1( "hh-12" ) ).isEmpty() );
 	
 	// Everything is ok, do a hotsync now.
 	fConduit->hotSyncTest();
@@ -715,7 +715,7 @@
 	
 	QString pcRecId = fConduit->mapping().pcRecordId( CSL1( "hh-12" ) );
 	
-	QVERIFY( pcRecId == QString() );
+	QVERIFY( pcRecId.isEmpty() );
 	
 	// Record should be there.
 	QVERIFY( syncedHHRec );
@@ -741,7 +741,7 @@
 	QVERIFY( !pcRec->isModified() );
 	
 	// There shouldn't be a mapping
-	QVERIFY( fConduit->mapping().hhRecordId( CSL1( "pc-12" ) ) == QString() );
+	QVERIFY( fConduit->mapping().hhRecordId( CSL1( "pc-12" ) ).isEmpty() );
 	
 	// Everything is ok, do a hotsync now.
 	fConduit->hotSyncTest();
@@ -750,7 +750,7 @@
 	
 	QString hhRecId = fConduit->mapping().hhRecordId( CSL1( "pc-12" ) );
 	
-	QVERIFY( hhRecId == QString() );
+	QVERIFY( hhRecId.isEmpty() );
 	
 	// Record should be there.
 	QVERIFY( syncedPCRec );
@@ -881,8 +881,8 @@
 	fConduit->hotSyncTest();
 	
 	// There shouldn't be a mapping anymore
-	QVERIFY( fConduit->mapping().hhRecordId( CSL1( "pc-15" ) ) == QString() );
-	QVERIFY( fConduit->mapping().pcRecordId( CSL1( "hh-15" ) ) == QString() );
+	QVERIFY( fConduit->mapping().hhRecordId( CSL1( "pc-15" ) ).isEmpty() );
+	QVERIFY( fConduit->mapping().pcRecordId( CSL1( "hh-15" ) ).isEmpty() );
 	
 	Record *syncedPCRec = fConduit->pcDataProxy()->find( CSL1( "pc-15" ) );
 	Record *syncedHHRec = fConduit->hhDataProxy()->find( CSL1( "hh-15" ) );
--- trunk/KDE/kdepim/kpilot/conduits/contacts/contactsconduit.cc #854963:854964
@@ -662,12 +662,12 @@
 	if( index > 3 )
 	{
 		WARNINGKPILOT <<"Bad index number" << index;
-		retval = QString();
+		retval.clear();
 	}
 	if( d->fSettings.customMapping().count() != 4 )
 	{
 		WARNINGKPILOT <<"Mapping does not have 4 elements." << index;
-		retval = QString();
+		retval.clear();
 	}
 
 	switch( d->fSettings.custom(index) )
--- trunk/KDE/kdepim/kpilot/lib/kpilotdevicelink.cc #854963:854964
@@ -28,10 +28,8 @@
 ** Bug reports and questions can be sent to kde-pim@kde.org
 */
 
-#include "options.h"
+#include "kpilotlink.h"
 
-
-
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <stdio.h>
@@ -60,13 +58,13 @@
 #include <kurl.h>
 #include <kio/netaccess.h>
 
+#include "options.h"
 #include "pilotUser.h"
 #include "pilotSysInfo.h"
 #include "pilotCard.h"
 #include "pilotSerialDatabase.h"
 #include "pilotLocalDatabase.h"
 
-#include "kpilotlink.h"
 #include "kpilotdevicelinkPrivate.moc"
 #include "kpilotdevicelink.moc"
 
@@ -461,7 +459,7 @@
 		return;
 	}
 
-	QApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, \
QString::null, 10)); +	QApplication::postEvent(link(), new \
DeviceCommEvent(EventLogProgress, QString(), 10));  
 	DEBUGKPILOT << 
 		": Listening to pilot. Now trying accept...";
@@ -497,7 +495,7 @@
 		return;
 	}
 
-	QApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, \
QString::null, 30)); +	QApplication::postEvent(link(), new \
DeviceCommEvent(EventLogProgress, QString(), 30));  
 	DEBUGKPILOT << ": doing dlp_ReadSysInfo...";
 
@@ -527,7 +525,7 @@
 	// If we've made it this far, make sure our USB workaround timer doesn't fire!
 	fWorkaroundUSBTimer->stop();
 
-	QApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, \
QString::null, 60)); +	QApplication::postEvent(link(), new \
DeviceCommEvent(EventLogProgress, QString(), 60));  
 	KPILOT_DELETE(link()->fPilotUser);
 	link()->fPilotUser = new KPilotUser;
@@ -557,7 +555,7 @@
 	}
 	link()->fLinkStatus = AcceptedDevice;
 
-	QApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, \
QString::null, 100)); +	QApplication::postEvent(link(), new \
DeviceCommEvent(EventLogProgress, QString(), 100));  
 	DeviceCommEvent * ev = new DeviceCommEvent(EventDeviceReady);
 	ev->setCurrentSocket(fPilotSocket);
@@ -692,7 +690,7 @@
 	// Release all resources
 	//
 	close();
-	fPilotPath = QString();
+	fPilotPath.clear();
 
 	fPilotPath = dP;
 	if (fPilotPath.isEmpty())
--- trunk/KDE/kdepim/kpilot/lib/kpilotdevicelinkPrivate.h #854963:854964
@@ -171,7 +171,7 @@
 class DeviceCommEvent : public QEvent
 {
 public:
-	explicit DeviceCommEvent(DeviceCustomEvents type, QString msg = QString::null,
+	explicit DeviceCommEvent(DeviceCustomEvents type, QString msg = QString(),
 			int progress = 0) :
 		QEvent( (QEvent::Type)type ), fMessage(msg), fProgress(progress),
 				fPilotSocket(-1)
@@ -246,7 +246,7 @@
 	 * Does the low-level opening of the device and handles the
 	 * pilot-link library initialisation.
 	 */
-	bool open(const QString &device = QString::null);
+	bool open(const QString &device = QString());
 
 	KPilotDeviceLink *fHandle;
 	inline KPilotDeviceLink *link()
--- trunk/KDE/kdepim/kpilot/lib/plugin.cc #854963:854964
@@ -177,14 +177,14 @@
 
 	if (!p->homepage().isEmpty())
 	{
-		s = QString();
+		s.clear();
 		s += CSL1("<a href=\"%1\">").arg(p->homepage());
 		s += p->homepage();
 		s += CSL1("</a><br>");
 		linktext->append(s);
 	}
 
-	s = QString();
+	s.clear();
 	s += i18n("Send questions and comments to <a href=\"mailto:%1\">%2</a>.", \
CSL1("kdepim-users@kde.org"), CSL1("kdepim-users@kde.org") );  s += ' ';
 	s += i18n("Send bug reports to <a \
href=\"mailto:%1\">%2</a>.",p->bugAddress(),p->bugAddress()); @@ -215,7 +215,7 @@
 	}
 	linktext->append(s);
 
-	s = QString();
+	s.clear();
 	pl = p->credits();
 	if (pl.count()>0)
 	{


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

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