[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdepim/akonadi/resources/mbox/libmbox
From: Bertjan Broeksema <b.broeksema () home ! nl>
Date: 2009-04-04 18:46:27
Message-ID: 1238870787.750240.9436.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 949255 by bbroeksema:
Add tests for the isValid() method and the procmail lock method. Also fix some
small issues which I found because of the tests.
M +3 -1 CMakeLists.txt
M +9 -3 mbox.cpp
A tests (directory)
A tests/CMakeLists.txt
A tests/mboxtest.cpp [License: LGPL (v2)]
A tests/mboxtest.h [License: LGPL (v2+)]
--- trunk/KDE/kdepim/akonadi/resources/mbox/libmbox/CMakeLists.txt #949254:949255
@@ -1,8 +1,10 @@
set(mbox_LIB_SRCS mbox.cpp)
+add_subdirectory(tests)
+
kde4_add_library(mbox SHARED ${mbox_LIB_SRCS})
target_link_libraries(mbox ${KDE4_KDECORE_LIBS} ${KDE4_KPIMUTILS_LIBS} )
set_target_properties(mbox PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION} )
-install(TARGETS mbox ${INSTALL_TARGETS_DEFAULT_ARGS})
\ No newline at end of file
+install(TARGETS mbox ${INSTALL_TARGETS_DEFAULT_ARGS})
--- trunk/KDE/kdepim/akonadi/resources/mbox/libmbox/mbox.cpp #949254:949255
@@ -111,13 +111,17 @@
switch (d->mLockType) {
case procmail_lockfile:
- if (KStandardDirs::findExe("lockfile") == QString())
+ if (KStandardDirs::findExe("lockfile") == QString()) {
errorMsg = i18n("Could not find the lockfile executable");
+ return false;
+ }
break;
case mutt_dotlock: // fall through
case mutt_dotlock_privileged:
- if (KStandardDirs::findExe("mutt_dotlock") == QString())
+ if (KStandardDirs::findExe("mutt_dotlock") == QString()) {
errorMsg = i18n("Could not find the mutt_dotlock executable");
+ return false;
+ }
break;
default:
break; // We assume fcntl available and lock_none doesn't need a check.
@@ -144,8 +148,10 @@
return errno;
}
- lock();
+ if (int rc = lock() != 0)
+ return rc;
+
return 0;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic