[SCM] KCheckGMail's Development repository branch, kde4-port, updated. acff3181862d04cc85b55a6e188470d299e74ae9

Luís Pereira lpereira-guest at alioth.debian.org
Tue Jul 21 17:15:31 UTC 2009


The following commit has been merged in the kde4-port branch:
commit 2cf1af73b2967f428e3569b23b40224a66821bb4
Author: Luís Pereira <luis.artur.pereira at gmail.com>
Date:   Tue Jul 21 09:31:48 2009 -0700

    Ran $SVN/trunk/KDE/kdesdk/scripts/qt4/dapt-to-new-kdebug-api.pl
    
    Signed-off-by: Luís Pereira <luis.artur.pereira at gmail.com>
---
 src/gmail.cpp              |   96 ++++++++++++++++++++++----------------------
 src/gmailparser.cpp        |   44 ++++++++++----------
 src/gmailwalletmanager.cpp |   62 ++++++++++++++--------------
 src/jsprotocol.cpp         |   12 +++---
 src/kcheckgmailcore.cpp    |   26 ++++++------
 src/kcheckgmailtray.cpp    |    4 +-
 6 files changed, 122 insertions(+), 122 deletions(-)

diff --git a/src/gmail.cpp b/src/gmail.cpp
index ae2e128..90e0bef 100644
--- a/src/gmail.cpp
+++ b/src/gmail.cpp
@@ -132,7 +132,7 @@ GMail::~GMail()
 
 void GMail::slotSetWalletPassword(bool)
 {
-	kDebug() << k_funcinfo << "now, check login params." << endl;
+	kDebug() << k_funcinfo << "now, check login params.";
 	checkLoginParams();
 }
 
@@ -157,14 +157,14 @@ void GMail::checkLoginParams()
 		
 		if ( QString::compare(mUsername.section("@",1),"gmail.com") != 0 &&
 			QString::compare(mUsername.section("@",1),"googlemail.com") != 0) {
-			kDebug() << k_funcinfo << mUsername << " seems to be a GAP4D account" << endl;
+			kDebug() << k_funcinfo << mUsername << " seems to be a GAP4D account";
 			isGAP4D = true;
 			useDomain = mUsername.section("@",1);
 		}
 		useUsername = mUsername.section("@",0,0);
 	}
 	
-	kDebug() << k_funcinfo << "Using " << useUsername << " as username and " << useDomain << " as domain" << endl;
+	kDebug() << k_funcinfo << "Using " << useUsername << " as username and " << useDomain << " as domain";
 
 	bool isLocked = true;
 	if (mLoginLock->tryLock()) {
@@ -175,7 +175,7 @@ void GMail::checkLoginParams()
 		
 		//Try to log out if a session already exists (because it might be from another address)
 		if(isLoggedIn(false)) {
-			kDebug() << k_funcinfo << "A gmail session was already open, logging out from it" << endl;
+			kDebug() << k_funcinfo << "A gmail session was already open, logging out from it";
 			logOut(true);
 		}
 		
@@ -196,7 +196,7 @@ void GMail::login()
 	if(mLoginLock->tryLock()) {
 		emit loginStart();
 		
-		kDebug() << k_funcinfo << "Waiting for wallet..." << endl;
+		kDebug() << k_funcinfo << "Waiting for wallet...";
 		// this will call back to gotWalletPassword().
 		// we will continue the process from there.
 		GMailWalletManager::instance()->get();
@@ -220,7 +220,7 @@ void GMail::slotGetWalletPassword(const QString& pass)
 			QLatin1String(QUrl::toPercentEncoding(pass)));
 	str.replace('@','%');
 
-	kDebug() << k_funcinfo << "Requesting login URL" << endl;
+	kDebug() << k_funcinfo << "Requesting login URL";
 
 	loginRedirection = "";
 	
@@ -231,7 +231,7 @@ void GMail::slotGetWalletPassword(const QString& pass)
 
 	
 	if (d->buffer) {
-		kDebug() << k_funcinfo << "d->buffer isn't empty. Shouldn't happen" << endl;
+		kDebug() << k_funcinfo << "d->buffer isn't empty. Shouldn't happen";
 		return;
 	}
 	d->buffer = new QBuffer;
@@ -259,7 +259,7 @@ void GMail::slotLoginData(KIO::Job *job, const QByteArray &data)
 {
 
 	if(job->error() != 0) {
-		kWarning() << k_funcinfo << "error: " << job->errorString() << endl;
+		kWarning() << k_funcinfo << "error: " << job->errorString();
 	} else {
 		d->buffer->write(data.data(), data.size());
 	}
@@ -267,10 +267,10 @@ void GMail::slotLoginData(KIO::Job *job, const QByteArray &data)
 
 void GMail::slotLoginRedirection(KIO::Job *job, const KUrl &url)
 {
-	kDebug() << k_funcinfo << url.url() << endl;
+	kDebug() << k_funcinfo << url.url();
 
 	if(job->error() != 0) {
-		kWarning() << k_funcinfo << "error: " << job->errorString() << endl;
+		kWarning() << k_funcinfo << "error: " << job->errorString();
 	} else {
 		loginRedirection = url;
 	}
@@ -279,7 +279,7 @@ void GMail::slotLoginRedirection(KIO::Job *job, const KUrl &url)
 void GMail::slotLoginResult(KJob *job)
 {	
 	if(job->error() != 0) {
-		kWarning() << k_funcinfo << "error: " << job->errorString() << endl;
+		kWarning() << k_funcinfo << "error: " << job->errorString();
 
 		delete d->buffer;
 		d->buffer = 0;
@@ -310,7 +310,7 @@ void GMail::slotLoginResult(KJob *job)
 					emit loginDone(false, mLoginFromTimer, i18n("Invalid username or password"));
 					return;
 				} else {
-					kWarning() << k_funcinfo << " Redirection couldn't be found!" << endl;
+					kWarning() << k_funcinfo << " Redirection couldn't be found!";
 					
 					mLoginLock->unlock();
 					emit loginDone(false, mLoginFromTimer, i18n("GMail's login procedure has changed, check for new version"));
@@ -319,10 +319,10 @@ void GMail::slotLoginResult(KJob *job)
 			} else if (mLoginBuffer.contains("?ui=html") && (
 						mLoginBuffer.contains("nocheckbrowser") ||
 						mLoginBuffer.contains("noscript") )) {
-				kDebug() << k_funcinfo << "Google is performing dirty JS check, bypassing it" << endl;
+				kDebug() << k_funcinfo << "Google is performing dirty JS check, bypassing it";
 				
 				if (loginRedirection.isEmpty()) {
-					kWarning() << k_funcinfo << "loginRedirection is empty!" << endl;
+					kWarning() << k_funcinfo << "loginRedirection is empty!";
 					mLoginLock->unlock();
 					emit loginDone(false, mLoginFromTimer, i18n("GMail's login procedure has changed, check for new version"));
 					return;
@@ -336,7 +336,7 @@ void GMail::slotLoginResult(KJob *job)
 				_url.setQuery("ui=html&zy=n");
 				
 				if (!_url.isValid()) {
-					kWarning() << k_funcinfo << "New _url is invalid!:" << _url.url() << endl;
+					kWarning() << k_funcinfo << "New _url is invalid!:" << _url.url();
 					mLoginLock->unlock();
 					// let's show a nice error message to the user instead
 					emit loginDone(false, mLoginFromTimer, i18n("GMail's login procedure has changed, check for new version"));
@@ -348,7 +348,7 @@ void GMail::slotLoginResult(KJob *job)
 				
 			} else {
 				//no more redirections?
-				kWarning() << k_funcinfo << "No redirection was found, but seems like we are logged in!" << endl;
+				kWarning() << k_funcinfo << "No redirection was found, but seems like we are logged in!";
 				
 				mLoginBuffer = "";
 				slotPostLoginResult(job);
@@ -387,7 +387,7 @@ void GMail::postLogin(QString url)
 		found = rx.indexIn(url);
 		
 		if(found == -1) {
-			kWarning() <<  "This can't be a valid url!: " << url << endl;
+			kWarning() <<  "This can't be a valid url!: " << url;
 			if (!KUrl(url).isValid()) {
 				kError() <<  "This is absolutely a non-valid URL!: " << url << endl;
 			}
@@ -402,14 +402,14 @@ void GMail::postLogin(QString url)
 		mPostLoginBuffer = "";
 		
 		if (d->buffer) {
-			kDebug() << k_funcinfo << "d->buffer isn't empty. Shouldn't happen" << endl;
+			kDebug() << k_funcinfo << "d->buffer isn't empty. Shouldn't happen";
 			return;
 		}
 
 		d->buffer = new QBuffer;
 		d->buffer->open(QIODevice::WriteOnly);
 
-		kDebug() << k_funcinfo << "Starting job to " << url << endl;
+		kDebug() << k_funcinfo << "Starting job to " << url;
 
 		KIO::TransferJob *job = KIO::get(url, KIO::Reload, KIO::HideProgressInfo);
 		job->addMetaData("cookies", "auto");
@@ -421,7 +421,7 @@ void GMail::postLogin(QString url)
 		connect(job, SIGNAL(data(KIO::Job*, const QByteArray&)),
 			SLOT(slotPostLoginData(KIO::Job*, const QByteArray&)));
 	} else {
-		kWarning() << k_funcinfo << "mLoginLock is not locked!" << endl;
+		kWarning() << k_funcinfo << "mLoginLock is not locked!";
 	}
 }
 
@@ -429,7 +429,7 @@ void GMail::slotPostLoginData(KIO::Job *job, const QByteArray &data)
 {
 
 	if(job->error() != 0) {
-		kWarning() << k_funcinfo << "error: " << job->errorString() << endl;
+		kWarning() << k_funcinfo << "error: " << job->errorString();
 	} else {
 		d->buffer->write(data.data(), data.size());
 	}
@@ -438,7 +438,7 @@ void GMail::slotPostLoginData(KIO::Job *job, const QByteArray &data)
 void GMail::slotPostLoginResult(KJob *job)
 {
 	if(job->error() != 0) {
-		kWarning() << k_funcinfo << "error: " << job->errorString() << endl;
+		kWarning() << k_funcinfo << "error: " << job->errorString();
 
 		delete d->buffer;
 		d->buffer = 0;
@@ -473,7 +473,7 @@ void GMail::slotPostLoginResult(KJob *job)
 				emit loginDone(false, mLoginFromTimer, 
 				       i18n("Unknown error retrieving cookies"));
 			} else {
-				kDebug() << k_funcinfo << "Found another redirect!: " << url << endl;
+				kDebug() << k_funcinfo << "Found another redirect!: " << url;
 				mLoginLock->tryLock();
 				postLogin(url);
 			}
@@ -488,7 +488,7 @@ void GMail::slotPostLoginResult(KJob *job)
 void GMail::checkGMail()
 {
 	if(isLoggedIn() && mCheckLock->tryLock()) {
-		kDebug() << k_funcinfo << "Starting check..." << endl;
+		kDebug() << k_funcinfo << "Starting check...";
 		// stop timer. start again when we have some sort of result.
 		mTimer->stop();
 		emit checkStart();
@@ -514,13 +514,13 @@ void GMail::checkGMail()
 		url.replace('@','%');
 
 		if (d->buffer) {
-			kDebug() << k_funcinfo << "d->buffer isn't empty. Shouldn't happen" << endl;
+			kDebug() << k_funcinfo << "d->buffer isn't empty. Shouldn't happen";
 		return;
 		}
 		d->buffer = new QBuffer;
 		d->buffer->open(QIODevice::WriteOnly);
 
-		kDebug() << k_funcinfo << "GET: " << url << endl;
+		kDebug() << k_funcinfo << "GET: " << url;
 
 		KIO::TransferJob *job = KIO::get(url, KIO::Reload, KIO::HideProgressInfo);
 		job->addMetaData("cookies", "auto");
@@ -537,7 +537,7 @@ void GMail::checkGMail()
 void GMail::slotCheckData(KIO::Job *job, const QByteArray &data)
 {
 	if(job->error() != 0) {
-		kWarning() << k_funcinfo << "error: " << job->errorString() << endl;
+		kWarning() << k_funcinfo << "error: " << job->errorString();
 	} else {
 		d->buffer->write(data.data(), data.size());
 	}
@@ -548,7 +548,7 @@ void GMail::slotCheckResult(KJob *job)
 {
 	if(job->error() != 0) {
 		// TODO: We should notify the user
-		kWarning() << k_funcinfo << "error: " << job->errorString() << endl;
+		kWarning() << k_funcinfo << "error: " << job->errorString();
 
 		delete d->buffer;
 		d->buffer = 0;
@@ -563,7 +563,7 @@ void GMail::slotCheckResult(KJob *job)
 		delete d->buffer;
 		d->buffer = 0;
 
-		kDebug() << k_funcinfo << "Check finished." << endl;
+		kDebug() << k_funcinfo << "Check finished.";
 
 		dump2File("gmail_data.html", mPageBuffer);
 
@@ -584,7 +584,7 @@ void GMail::slotCheckResult(KJob *job)
 		found = rx.indexIn(mPageBuffer);
 
 		if( found != -1 || !isLoggedIn() ) {
-			kWarning() << k_funcinfo << "User is not logged in!" << endl;
+			kWarning() << k_funcinfo << "User is not logged in!";
 
 			mPageBuffer = "";
 			mCheckLock->unlock();
@@ -600,7 +600,7 @@ void GMail::slotCheckResult(KJob *job)
 		found = rx2.indexIn(mPageBuffer);
 
 		if( found != -1 ) {
-			kWarning() << k_funcinfo << "Gmail is unavailable because of server-side errors!" << endl;
+			kWarning() << k_funcinfo << "Gmail is unavailable because of server-side errors!";
 
 			mPageBuffer = "";
 			mCheckLock->unlock();
@@ -670,8 +670,8 @@ bool GMail::isLoggedIn(bool lockCheck)
 	if( !lockCheck || ( lockCheck && !isLocked ) ) {
 		if(cookieExists(ACTION_TOKEN_COOKIE))
 			ret = true;
-		else kDebug() << k_funcinfo << ACTION_TOKEN_COOKIE << " wasn't found!" << endl;
-	} else kDebug() << "mLoginLock is locked" << endl;
+		else kDebug() << k_funcinfo << ACTION_TOKEN_COOKIE << " wasn't found!";
+	} else kDebug() << "mLoginLock is locked";
 
 	return ret;
 }
@@ -721,11 +721,11 @@ void GMail::logOut(bool force)
 	KIO::Job *job = KIO::get(logoutUrl, KIO::Reload, KIO::HideProgressInfo);
 	job->addMetaData("cookies", "auto");
 	job->addMetaData("cache", "reload");
-	kDebug() << "Loging out! " << logoutUrl << endl;
+	kDebug() << "Loging out! " << logoutUrl;
 
 	// we really don't want async jobs here
 	result= KIO::NetAccess::synchronousRun(job, 0);
-	kDebug() << "Log out job done, with result: " << result << endl;
+	kDebug() << "Log out job done, with result: " << result;
 	alreadyRunning = false;
 }
 
@@ -736,7 +736,7 @@ void GMail::logOut()
 
 void GMail::slotLogOut()
 {
-	kDebug() << k_funcinfo << endl;
+	kDebug() << k_funcinfo;
 	logOut(true);
 }
 
@@ -747,7 +747,7 @@ void GMail::dump2File(const QString filename, const QString data)
 		
 	dump_dir += filename;
 	
-	kDebug() << k_funcinfo << "Dumping data to file " << dump_dir << endl;
+	kDebug() << k_funcinfo << "Dumping data to file " << dump_dir;
 		
 	QFile f(dump_dir);
 		
@@ -770,8 +770,8 @@ bool GMail::setDomainAdvice(QString url, QString advice)
 	QDBusReply<void> reply = kded.call("setDomainAdvice", url, advice);
 	if (!reply.isValid()) {
 		QDBusError error = reply.error();
-		kWarning() << k_funcinfo << "D-BUS error while calling setDomainAdvice" << endl;
-		kDebug() << "Error description:" << error.message() << endl;
+		kWarning() << k_funcinfo << "D-BUS error while calling setDomainAdvice";
+		kDebug() << "Error description:" << error.message();
 		return false;
 	}
 	
@@ -790,8 +790,8 @@ QString GMail::getDomainAdvice(QString url)
 	if (!reply.isValid())
 	{
 		QDBusError error = reply.error();
-		kWarning() << k_funcinfo << "D-BUS error while calling getDomainAdvice" << endl;
-		kDebug() << "Error description:" << error.message() << endl;
+		kWarning() << k_funcinfo << "D-BUS error while calling getDomainAdvice";
+		kDebug() << "Error description:" << error.message();
 		return QString();
 	}
 
@@ -819,8 +819,8 @@ QString GMail::findCookies(QString url)
 	if (!reply.isValid())
 	{
 		QDBusError error = reply.error();
-		kWarning() << k_funcinfo << "D-BUS error while calling findCookies" << endl;
-		kWarning() << "Error description:" << error.message() << endl;
+		kWarning() << k_funcinfo << "D-BUS error while calling findCookies";
+		kWarning() << "Error description:" << error.message();
 		return QString();
 	}
 	return reply.value();
@@ -828,7 +828,7 @@ QString GMail::findCookies(QString url)
 
 bool GMail::cookieExists(QString cookieName,QString url)
 {
-	kDebug() << k_funcinfo << "Searching for cookie " << cookieName << " at " << url << endl;;
+	kDebug() << k_funcinfo << "Searching for cookie " << cookieName << " at " << url;
 	
 	QString cookies;
 	int found;
@@ -864,7 +864,7 @@ bool GMail::cookieExists(QString cookieName,QString url)
 		}
 	}
 	
-	kDebug() << cookieName << " was " << (ret? "FOUND":"NOT FOUND") << endl;
+	kDebug() << cookieName << " was " << (ret? "FOUND":"NOT FOUND");
 	
 	return ret;
 }
@@ -899,7 +899,7 @@ QString GMail::getRedirectURL(QString buffer)
 	int found;
 	QString url, jsurl;
 	
-	kDebug() << k_funcinfo << endl;
+	kDebug() << k_funcinfo;
 
 	metaRX.setMinimal(true);
 	if(!metaRX.isValid()) {
@@ -931,11 +931,11 @@ QString GMail::getRedirectURL(QString buffer)
 	
 	// if both match it's ok
 	if (url.compare(jsurl) == 0) {
-		kDebug() << k_funcinfo << "Found redirection to " << url << endl;
+		kDebug() << k_funcinfo << "Found redirection to " << url;
 		return url;
 	} else {
 		// otherwise use JS redirection
-		kDebug() << k_funcinfo << "META and JS redirections do not match! META: " << url << " JS: " << jsurl << endl;
+		kDebug() << k_funcinfo << "META and JS redirections do not match! META: " << url << " JS: " << jsurl;
 		return /*js*/url;
 	}
 	
diff --git a/src/gmailparser.cpp b/src/gmailparser.cpp
index 4ca0842..c70a2f0 100644
--- a/src/gmailparser.cpp
+++ b/src/gmailparser.cpp
@@ -142,15 +142,15 @@ void GMailParser::parse(const QString &data)
 	freeThreadList();
 	
 	if(oldMap) {
-		kDebug() << k_funcinfo << "oldmap.size=" << oldMap->size() << endl;
+		kDebug() << k_funcinfo << "oldmap.size=" << oldMap->size();
 		if (oldMap->begin().key() > previousLatestThread) {
 			previousLatestThread = oldMap->begin().key();
 		}
 	} else {
-		kDebug() << k_funcinfo << "no oldmap" << endl;
+		kDebug() << k_funcinfo << "no oldmap";
 	}
 	
-	kDebug() << k_funcinfo << "previousLatestThread=" << previousLatestThread << endl;
+	kDebug() << k_funcinfo << "previousLatestThread=" << previousLatestThread;
 
 
 	/*
@@ -300,12 +300,12 @@ uint GMailParser::parseThread(const QString &_data, const QMap<QString,bool>* ol
 
 		if(t->isNew && (t->msgId > previousLatestThread || t->replyId > previousLatestThread) && (!oldMap || 
 				 (oldMap->find(t->msgId) == oldMap->end()))) {
-			kDebug() << "Message [" << t->msgId << "] is new." << endl;
+			kDebug() << "Message [" << t->msgId << "] is new.";
 			t->isNew = true;
 			newMsgCount ++;
 		} else {
 			t->isNew = false;
-			kDebug() << "Message [" << t->msgId << "] is NOT new." << endl;
+			kDebug() << "Message [" << t->msgId << "] is NOT new.";
 		}
 
 		// (re-)insert
@@ -337,11 +337,11 @@ uint GMailParser::parseThread(const QString &_data, const QMap<QString,bool>* ol
 
 		if(t->isNew && (t->msgId > previousLatestThread || t->replyId > previousLatestThread) && (!oldMap || 
 				 (oldMap->find(t->msgId) == oldMap->end()))) {
-			kDebug() << "Message [" << t->msgId << "] is new." << endl;
+			kDebug() << "Message [" << t->msgId << "] is new.";
 			t->isNew = true;
 			newMsgCount ++;
 		} else {
-			kDebug() << "Message [" << t->msgId << "] is NOT new." << endl;
+			kDebug() << "Message [" << t->msgId << "] is NOT new.";
 			t->isNew = false;
 		}
 
@@ -351,9 +351,9 @@ uint GMailParser::parseThread(const QString &_data, const QMap<QString,bool>* ol
 		pos += rx2.matchedLength();
 	}
 
-	kDebug() << k_funcinfo << "Finished searching for threads in: " << endl;
-	kDebug() << data << endl;
-	kDebug() << k_funcinfo << "newMsgCount: " << newMsgCount << endl;
+	kDebug() << k_funcinfo << "Finished searching for threads in: ";
+	kDebug() << data;
+	kDebug() << k_funcinfo << "newMsgCount: " << newMsgCount;
 
 	return newMsgCount;
 }
@@ -370,7 +370,7 @@ void GMailParser::parseVersion(const QString &_data)
 	QString data = _data;
 	data.remove('"');
 	
-	kDebug() << k_funcinfo << "Version string: " << data << endl;
+	kDebug() << k_funcinfo << "Version string: " << data;
 	
 	QStringList list = data.split(",", QString::SkipEmptyParts);
 	if(list.size() != 5)
@@ -398,13 +398,13 @@ void GMailParser::parseVersion(const QString &_data)
 				mVersion.version = str;
 				break;
 			default:
-				kWarning() << k_funcinfo << "Unknown version token: " << str << "(" << i <<")" << endl;
+				kWarning() << k_funcinfo << "Unknown version token: " << str << "(" << i <<")";
 				break;
 		}
 		iter++;
 		i++;
 	}
-	kDebug() << "Gmail version " << mVersion.version << endl;
+	kDebug() << "Gmail version " << mVersion.version;
 	
 	bool ok = false;
 	
@@ -415,13 +415,13 @@ void GMailParser::parseVersion(const QString &_data)
 	
 #ifdef DETECT_GLANGUAGE
 	if(gGMailLanguageCode.contains(mVersion.language))
-		kDebug() << "Gmail language: " << gGMailLanguageCode[mVersion.language] << endl;
+		kDebug() << "Gmail language: " << gGMailLanguageCode[mVersion.language];
 	else
-		kWarning() << k_funcinfo << "Unknown language code: " << mVersion.language << endl;
+		kWarning() << k_funcinfo << "Unknown language code: " << mVersion.language;
 #endif
 	
 	if(!ok) {
-		kWarning() << k_funcinfo << "Gmail version " << mVersion.version << " is not supported, check for updates!" << endl;
+		kWarning() << k_funcinfo << "Gmail version " << mVersion.version << " is not supported, check for updates!";
 		emit versionMismatch();
 	}
 }
@@ -495,7 +495,7 @@ void GMailParser::parseDefaultSummary(const QString &_data)
 			mSummary.drafts = val;
 		else if( QString::compare(str_name,"spam") == 0)
 			mSummary.spam = val;
-		else kWarning() << k_funcinfo << "unkown identifier " << str_name << endl;
+		else kWarning() << k_funcinfo << "unkown identifier " << str_name;
 
 		pos += rx.matchedLength();
 	}
@@ -529,7 +529,7 @@ void GMailParser::parseLabel(const QString &data)
 	mLabels.clear();
 	eLabels.clear();
 	
-	kDebug() << k_funcinfo << endl;
+	kDebug() << k_funcinfo;
 
 	while((pos = rx.indexIn(data, pos)) != -1) {
 		mLabels.insert(rx.cap(1), rx.cap(2).toUInt());
@@ -538,7 +538,7 @@ void GMailParser::parseLabel(const QString &data)
 		k.replace(" ", "-");
 		eLabels.insert(k, rx.cap(1));
 		
-		kDebug() << rx.cap(1) << " has " << rx.cap(2) << " unread messages" << endl;
+		kDebug() << rx.cap(1) << " has " << rx.cap(2) << " unread messages";
 		pos += rx.matchedLength();
 	}
 }
@@ -557,7 +557,7 @@ void GMailParser::parseInvite(const QString &data)
 	if(!ok) {
 		mInvites = 0;
 	}
-	kDebug() << k_funcinfo << "Invites=" << mInvites << endl;
+	kDebug() << k_funcinfo << "Invites=" << mInvites;
 }
 
 /**
@@ -575,7 +575,7 @@ void GMailParser::parseGName(const QString &data)
 	
 	if(newName != gName) {
 		gName = newName;
-		kDebug() << "Gaia name: " << gName << endl;
+		kDebug() << "Gaia name: " << gName;
 		emit gNameUpdate(gName);
 	}
 }
@@ -704,7 +704,7 @@ unsigned int GMailParser::unread(CountMode mode, QString box) const
 			if (mLabels.contains(box))
 				return mLabels[box];
 		}
-		kWarning() << k_funcinfo << "The box " << box << " doesn't exist! returning value as if mode=ParsedOnlyCount" << endl;
+		kWarning() << k_funcinfo << "The box " << box << " doesn't exist! returning value as if mode=ParsedOnlyCount";
 	}
 	
 	QMap<QString, bool> *lst = getThreadList();
diff --git a/src/gmailwalletmanager.cpp b/src/gmailwalletmanager.cpp
index a6f5c64..8afcb36 100644
--- a/src/gmailwalletmanager.cpp
+++ b/src/gmailwalletmanager.cpp
@@ -41,12 +41,12 @@ bool GMailWalletManager::set(const QString &p)
 	mPassword = p;
 
 	if(Prefs::passwordFromWallet()) {
-		kDebug() << k_funcinfo << "PasswordFromWallet" << endl;
+		kDebug() << k_funcinfo << "PasswordFromWallet";
 		Prefs::setGmailPassword("");
 		Prefs::self()->writeConfig();
 		ret = storeWallet();
 	} else {
-		kDebug() << k_funcinfo << "PasswordFromKConfig" << endl;
+		kDebug() << k_funcinfo << "PasswordFromKConfig";
 		ret = storeKConfig();
 	}
 
@@ -57,35 +57,35 @@ bool GMailWalletManager::get()
 {
 	bool ret = true;
 
-	kDebug() << k_funcinfo << endl;
+	kDebug() << k_funcinfo;
 
 	if(Prefs::passwordFromWallet()) {
-		kDebug() << k_funcinfo << "yeah, from wallet" << endl;
+		kDebug() << k_funcinfo << "yeah, from wallet";
 		
 		Prefs::setGmailPassword("");
 		Prefs::self()->writeConfig();
 		if(mWallet) {
-			kDebug() << k_funcinfo << "wallet exists" << endl;
+			kDebug() << k_funcinfo << "wallet exists";
 			if(mWallet->isOpen()) {
-				kDebug() << k_funcinfo << "wallet open" << endl;
+				kDebug() << k_funcinfo << "wallet open";
 				QString ret;
 				mWallet->readPassword("gmailPassword", ret);
-				kDebug() << k_funcinfo << "Got password" << endl;
+				kDebug() << k_funcinfo << "Got password";
 				KMD5 md5(ret.toUtf8());
 				mHash = md5.hexDigest();
 				emit getWalletPassword(ret);
 			}
 		} else {
-			kDebug() << k_funcinfo << "wallet NOT open, callback" << endl;
+			kDebug() << k_funcinfo << "wallet NOT open, callback";
 			ret = getWallet();
 		}
 	} else {
-		kDebug() << k_funcinfo << "from kconfig" << endl;
+		kDebug() << k_funcinfo << "from kconfig";
 		ret = getKConfig();
 	}
 
 
-	kDebug() << k_funcinfo << "return " << ret << endl;
+	kDebug() << k_funcinfo << "return " << ret;
 	
 	return ret;
 
@@ -94,14 +94,14 @@ bool GMailWalletManager::get()
 void GMailWalletManager::openWallet()
 {
 	if(!mWallet) {
-		kDebug() << k_funcinfo << "calling openWallet" << endl;
+		kDebug() << k_funcinfo << "calling openWallet";
 		mWallet = KWallet::Wallet::openWallet(KWallet::Wallet::NetworkWallet(),
 		                    0, KWallet::Wallet::Asynchronous);
 		if(!mWallet)
 			KMessageBox::error(0, i18n("KCheckGMail could not open "
 				"the wallet. Please check your preferences."));
 		else {
-			kDebug() << k_funcinfo << "connecting wallet" << endl;
+			kDebug() << k_funcinfo << "connecting wallet";
 			connect(mWallet, SIGNAL(walletOpened(bool)), SLOT(slotWalletChangedStatus()));
 		}
 	}
@@ -110,20 +110,20 @@ void GMailWalletManager::openWallet()
 // Kopete is a strong influence here. Cheers to those guys!
 void GMailWalletManager::slotWalletChangedStatus()
 {
-	kDebug() << k_funcinfo << endl;
+	kDebug() << k_funcinfo;
 
 	if(!mWallet)
-		kDebug() << k_funcinfo << "status changed but mWallet == 0" << endl;
+		kDebug() << k_funcinfo << "status changed but mWallet == 0";
 	else
 	if(mWallet->isOpen()) {
-		kDebug() << k_funcinfo << "Wallet Open!" << endl;
+		kDebug() << k_funcinfo << "Wallet Open!";
 		if(!mWallet->hasFolder(QString::fromLatin1("KCheckGmail"))) {
-			kDebug() << k_funcinfo << "Creating folder" << endl;
+			kDebug() << k_funcinfo << "Creating folder";
 			mWallet->createFolder(QString::fromLatin1("KCheckGmail"));
 		}
 
 		if(mWallet->setFolder(QString::fromLatin1("KCheckGmail"))) {
-			kDebug() << k_funcinfo << "Setting folder" << endl;
+			kDebug() << k_funcinfo << "Setting folder";
 			// success!
 			QObject::connect(mWallet, SIGNAL(walletClosed()), 
 				this, SLOT(slotCloseWallet()));
@@ -136,7 +136,7 @@ void GMailWalletManager::slotWalletChangedStatus()
 
 			QString ret;
 			mWallet->readPassword("gmailPassword", ret);
-			kDebug() << k_funcinfo << "Got pass: " << ret << endl;
+			kDebug() << k_funcinfo << "Got pass: " << ret;
 			KMD5 md5(ret.toUtf8());
 			mHash = md5.hexDigest();
 			emit getWalletPassword(ret);
@@ -144,14 +144,14 @@ void GMailWalletManager::slotWalletChangedStatus()
 
 		} else {
 			// opened OK, but we can't use it
-			kDebug() << k_funcinfo << "Could not set folder" << endl;
+			kDebug() << k_funcinfo << "Could not set folder";
 			delete mWallet;
 			mWallet = 0;
 		}
 
 
 	} else {
-		kDebug() << k_funcinfo << "Wallet not open!" << endl;
+		kDebug() << k_funcinfo << "Wallet not open!";
 		delete mWallet;
 		mWallet = 0;
 	}
@@ -166,16 +166,16 @@ void GMailWalletManager::slotCloseWallet()
 bool GMailWalletManager::storeWallet()
 {
 	bool ret = true;
-	kDebug() << k_funcinfo << endl;
+	kDebug() << k_funcinfo;
 
 	if(KWallet::Wallet::isEnabled()) {
 		if(mWallet && mWallet->isOpen()) {
-			kDebug() << k_funcinfo << "Wallet open. Setting immediately." << endl;
+			kDebug() << k_funcinfo << "Wallet open. Setting immediately.";
 			mWallet->writePassword("gmailPassword", mPassword);
 			clearPassword();
 			emit setWalletPassword(true);
 		} else {
-			kDebug() << k_funcinfo << "Wallet Not Open.." << endl;
+			kDebug() << k_funcinfo << "Wallet Not Open..";
 			openWallet();
 		}
 	} else {
@@ -199,7 +199,7 @@ bool GMailWalletManager::storeWallet()
 bool GMailWalletManager::storeKConfig()
 {
 	bool ret = true;
-	kDebug() << k_funcinfo << endl;
+	kDebug() << k_funcinfo;
 	Prefs::setGmailPassword(mPassword);
 	Prefs::self()->writeConfig();
 	clearPassword();
@@ -210,17 +210,17 @@ bool GMailWalletManager::storeKConfig()
 bool GMailWalletManager::getWallet()
 {
 	bool ret = true;
-	kDebug() << k_funcinfo << endl;
+	kDebug() << k_funcinfo;
 
 	if(KWallet::Wallet::isEnabled()) {
-		kDebug() << k_funcinfo << "it's enabled" << endl;
+		kDebug() << k_funcinfo << "it's enabled";
 		// just have to rely on not calling this method twice for now. No checks
 		// are in place.
 		if(mWallet && mWallet->isOpen()) {
-			kDebug() << k_funcinfo << "Wallet open." << endl;
+			kDebug() << k_funcinfo << "Wallet open.";
 			QString p;
 			mWallet->readPassword("gmailPassword", p);
-			kDebug() << k_funcinfo << "p=" << p << endl;
+			kDebug() << k_funcinfo << "p=" << p;
 			KMD5 md5(p.toUtf8());
 			mHash = md5.hexDigest();
 			emit getWalletPassword(p);
@@ -238,7 +238,7 @@ bool GMailWalletManager::getWallet()
 		} else
 			ret = getKConfig();
 		
-		kDebug() << k_funcinfo << "Returned from getKConfig()" << endl;
+		kDebug() << k_funcinfo << "Returned from getKConfig()";
 		
 	}
 	return ret;
@@ -247,7 +247,7 @@ bool GMailWalletManager::getWallet()
 bool GMailWalletManager::getKConfig()
 {
 	bool ret = true;
-	kDebug() << k_funcinfo << endl;
+	kDebug() << k_funcinfo;
 
 	KMD5 md5(Prefs::gmailPassword().toUtf8());
 	mHash = md5.hexDigest();
@@ -258,7 +258,7 @@ bool GMailWalletManager::getKConfig()
 
 void GMailWalletManager::clearPassword()
 {
-	kDebug() << k_funcinfo << endl;
+	kDebug() << k_funcinfo;
 
 	mPassword.fill('0');
 	mPassword = "";
diff --git a/src/jsprotocol.cpp b/src/jsprotocol.cpp
index ecee018..7018375 100644
--- a/src/jsprotocol.cpp
+++ b/src/jsprotocol.cpp
@@ -87,12 +87,12 @@ void JSProtocol::slotCountUpdate(unsigned int currentParsed)
 	int currentTotal = mParser->unread(GMailParser::TotalCount);
 	mCount.setCount(currentTotal, currentParsed);
 
-	kDebug() << k_funcinfo << endl;
-	kDebug() << "firstTime: " << firstTime << endl;
-	kDebug() << "previousParsed: " << mCount.previousParsed() << endl;
-	kDebug() << "currentParsed: " << currentParsed << endl;
-	kDebug() << "previousTotal: " << mCount.previousTotal() << endl;
-	kDebug() << "currentTotal: " << currentTotal << endl;
+	kDebug() << k_funcinfo;
+	kDebug() << "firstTime: " << firstTime;
+	kDebug() << "previousParsed: " << mCount.previousParsed();
+	kDebug() << "currentParsed: " << currentParsed;
+	kDebug() << "previousTotal: " << mCount.previousTotal();
+	kDebug() << "currentTotal: " << currentTotal;
 
 	if (firstTime) {
 		firstTime = false;
diff --git a/src/kcheckgmailcore.cpp b/src/kcheckgmailcore.cpp
index 005ad5d..792dc00 100644
--- a/src/kcheckgmailcore.cpp
+++ b/src/kcheckgmailcore.cpp
@@ -252,7 +252,7 @@ void KCheckGmailCore::start()
 	static bool started = false;
 	
 	if(started) {
-		kWarning() << k_funcinfo << "Unexpected call!" << endl;
+		kWarning() << k_funcinfo << "Unexpected call!";
 	}
 	
 	//From RSIBreak
@@ -333,7 +333,7 @@ void KCheckGmailCore::updateThreadMenu()
 		QList<QString> klist = threads->keys();
 		QList<QString>::iterator iter = klist.begin();
 
-		kDebug() << k_funcinfo << "number of threads=" << klist.size() << endl;
+		kDebug() << k_funcinfo << "number of threads=" << klist.size();
 		while(iter != klist.end()) {
 			const GMailParser::Thread &t = d->mJSP->parser()->getThread(*iter);
 			if(!t.isNull) {
@@ -518,7 +518,7 @@ void KCheckGmailCore::slotThreadsItemHighlighted(int n)
 		//TODO check mimetype return value
 		mimetype = KMimeType::findByPath(fileName, 0, true); // no disk access
 		iconFileName = KIconLoader::global()->iconPath(mimetype->iconName(), KIconLoader::Small);
-		kDebug() << "Attachment name: " << fileName << ", iconFileName: " << iconFileName << endl;
+		kDebug() << "Attachment name: " << fileName << ", iconFileName: " << iconFileName;
 		attachments.append(format.arg(iconFileName, fileName));
 	}
 
@@ -528,7 +528,7 @@ void KCheckGmailCore::slotThreadsItemHighlighted(int n)
 	}
 
 	KNotification::event(QString::fromLatin1("gmail-mail-snippet"), message, QPixmap(), d->mThreadsMenu);
-	kDebug() << k_funcinfo << "Notification:" << "gmail-mail-snippet" << endl;
+	kDebug() << k_funcinfo << "Notification:" << "gmail-mail-snippet";
 }
 
 
@@ -557,10 +557,10 @@ void KCheckGmailCore::slotSettingsChanged()
 	const QString user = d->mConfigDialog->username();
 	int res;
 
-	kDebug() << k_funcinfo << passwd << endl;
+	kDebug() << k_funcinfo << passwd;
 	
 	if(passwd.length() == 0 ) {
-		kDebug() << k_funcinfo << "user: " << user << endl;
+		kDebug() << k_funcinfo << "user: " << user;
 		if(user.length() == 0) {
 			res = KMessageBox::warningYesNo(0, i18n("No account information has been entered. Do you want to quit?"));
 
@@ -573,15 +573,15 @@ void KCheckGmailCore::slotSettingsChanged()
 		}
 	} else {
 		
-		kDebug() << k_funcinfo << " strncmp: " << (passwd == QString("\007\007\007"))  << endl;
+		kDebug() << k_funcinfo << " strncmp: " << (passwd == QString("\007\007\007"));
 
 		if(passwd != QString("\007\007\007")) {
-			kDebug() << k_funcinfo << "setting wallet" << endl;
+			kDebug() << k_funcinfo << "setting wallet";
 			loginOk = GMailWalletManager::instance()->set(d->mConfigDialog->password());
 			d->mConfigDialog->erasePassword();
 			d->mConfigDialog->insertPassword("\007\007\007");
 		} else
-			kDebug() << k_funcinfo << "passwd unchanged: " << passwd << endl;
+			kDebug() << k_funcinfo << "passwd unchanged: " << passwd;
 		
 		d->mJSP->retriever()->setInterval(Prefs::interval());
 		
@@ -648,7 +648,7 @@ void KCheckGmailCore::slotLoginDone(bool ok, bool isExcuseNeeded, const QString&
 		d->mTray->setPixmapEmpty();
 		KNotification::event(QString::fromLatin1("gmail-login-yes"), i18n("Now logged in to Gmail!"));
 
-		kDebug() << k_funcinfo << "Notification: gmail-login-yes" << endl;
+		kDebug() << k_funcinfo << "Notification: gmail-login-yes";
 
 		d->mLoginCheckMailAction->setText(i18n("Chec&k Mail Now"));
 	}
@@ -659,7 +659,7 @@ void KCheckGmailCore::slotLoginDone(bool ok, bool isExcuseNeeded, const QString&
 
 void KCheckGmailCore::slotLoginStart()
 {
-	kDebug() << k_funcinfo << endl;
+	kDebug() << k_funcinfo;
 	d->mTray->setPixmapAuth();
 	d->mLoginCheckMailAction->setEnabled(false);
 	d->mTray->startAnim(200);
@@ -675,7 +675,7 @@ void KCheckGmailCore::slotCheckStart()
 void KCheckGmailCore::slotSessionChanged()
 {
 	KNotification::event(QString::fromLatin1("gmail-session-changed"), i18n("Another account has been opened, logging out from it!"));
-	kDebug() << k_funcinfo << "Notification: gmail-session-changed" << endl;
+	kDebug() << k_funcinfo << "Notification: gmail-session-changed";
 }
 
 
@@ -689,7 +689,7 @@ void KCheckGmailCore::slotLogingOut()
 {
 	d->mTray->setPixmapEmpty();
 	KNotification::event(QString::fromLatin1("gmail-login-yes"), i18n("Now logged in to Gmail!"));
-	kDebug() << k_funcinfo << "Notification: gmail-login-yes" << endl;
+	kDebug() << k_funcinfo << "Notification: gmail-login-yes";
 
 	d->mLoginCheckMailAction->setText(i18n("Chec&k Mail Now"));
 
diff --git a/src/kcheckgmailtray.cpp b/src/kcheckgmailtray.cpp
index 3ae361a..7967829 100644
--- a/src/kcheckgmailtray.cpp
+++ b/src/kcheckgmailtray.cpp
@@ -133,7 +133,7 @@ void KCheckGmailTray::slotVersionMismatch()
  */
 void KCheckGmailTray::updateCountImage(QColor color)
 {
-	kDebug() << k_funcinfo << "Count=" << mMailCount << endl;
+	kDebug() << k_funcinfo << "Count=" << mMailCount;
 
 	if(mMailCount == 0)
 		setPixmapEmpty();
@@ -266,7 +266,7 @@ void KCheckGmailTray::takeScreenshotOfTrayIcon()
 void KCheckGmailTray::slotgNameUpdate(QString name)
 {
 	static QString sname;
-	kDebug() << k_funcinfo << "Updating tooltip" << endl;
+	kDebug() << k_funcinfo << "Updating tooltip";
 	
 	//Trick to restore the tooltip
 	if(name == QString())

-- 
KCheckGMail's Development repository



More information about the pkg-kde-commits mailing list