From 63ec7b5828eb0ec11ccad61ab28516b2949d65d5 Mon Sep 17 00:00:00 2001 From: Allen Winter Date: Fri, 9 Sep 2005 16:49:51 +0000 Subject: [PATCH] forward port (part I forgot with the previous commit) by burghard: Make sure no empty imap path is set/saved and issue a warning in this case. Please check your logfiles if you get this warning. svn path=/trunk/KDE/kdepim/; revision=459041 --- kmfolderimap.cpp | 10 ++++++++++ kmfolderimap.h | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/kmfolderimap.cpp b/kmfolderimap.cpp index c2870930f..ba77cea31 100644 --- a/kmfolderimap.cpp +++ b/kmfolderimap.cpp @@ -2263,4 +2263,14 @@ void KMFolderImap::saveMsgMetaData( KMMessage* msg, ulong uid ) mUidMetaDataMap.replace( uid, new KMMsgMetaData(msg->status(), serNum) ); } +//----------------------------------------------------------------------------- +void KMFolderImap::setImapPath( const QString& path ) +{ + if ( path.isEmpty() ) { + kdWarning(5006) << k_funcinfo << "ignoring empty path"; + } else { + mImapPath = path; + } +} + #include "kmfolderimap.moc" diff --git a/kmfolderimap.h b/kmfolderimap.h index d426e432d..9ec0c7596 100644 --- a/kmfolderimap.h +++ b/kmfolderimap.h @@ -106,7 +106,7 @@ public: virtual KMMessage* getMsg(int idx); /** The path to the imap folder on the server */ - void setImapPath(const QString &path) { mImapPath = path; } + void setImapPath( const QString &path ); QString imapPath() { return mImapPath; } /** The highest UID in the folder */