author | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
commit | 16cf79e90b5217f8d4bfce2a0fa817ae4b73db36 (patch) (unidiff) | |
tree | 0701eae15aa606a0211a2fccfde0eafdac69357c /noncore/apps/zsafe/zsafe.cpp | |
parent | 8d2d2664e5f544b8292806e617deb7a0e4170dc0 (diff) | |
download | opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.zip opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.gz opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.bz2 |
convert to Opie Debugging Framework
-rw-r--r-- | noncore/apps/zsafe/zsafe.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/noncore/apps/zsafe/zsafe.cpp b/noncore/apps/zsafe/zsafe.cpp index 3df55eb..bf8f7f4 100644 --- a/noncore/apps/zsafe/zsafe.cpp +++ b/noncore/apps/zsafe/zsafe.cpp | |||
@@ -29,7 +29,8 @@ | |||
29 | #ifndef DESKTOP | 29 | #ifndef DESKTOP |
30 | #ifndef NO_OPIE | 30 | #ifndef NO_OPIE |
31 | #include <opie2/ofiledialog.h> | 31 | #include <opie2/ofiledialog.h> |
32 | 32 | #include <opie2/odebug.h> | |
33 | using namespace Opie::Core; | ||
33 | using namespace Opie::Ui; | 34 | using namespace Opie::Ui; |
34 | #else | 35 | #else |
35 | #include "scqtfileedit.h" | 36 | #include "scqtfileedit.h" |
@@ -38,8 +39,6 @@ using namespace Opie::Ui; | |||
38 | 39 | ||
39 | #include <qclipboard.h> | 40 | #include <qclipboard.h> |
40 | 41 | ||
41 | #include <stdio.h> | ||
42 | |||
43 | #include <sys/types.h> | 42 | #include <sys/types.h> |
44 | #include <sys/stat.h> | 43 | #include <sys/stat.h> |
45 | #include <fcntl.h> | 44 | #include <fcntl.h> |
@@ -2069,7 +2068,6 @@ int ZSafe::loadInit(const char* _filename, const char *password) | |||
2069 | #ifndef WIN32 | 2068 | #ifndef WIN32 |
2070 | size = read(fileno (fd), (unsigned char *) (charbuf + count), 8); | 2069 | size = read(fileno (fd), (unsigned char *) (charbuf + count), 8); |
2071 | #else | 2070 | #else |
2072 | printf ("LoadInit() read1"); | ||
2073 | size = fread ((unsigned char *) (charbuf + count), sizeof(unsigned char), 8, fd); | 2071 | size = fread ((unsigned char *) (charbuf + count), sizeof(unsigned char), 8, fd); |
2074 | #endif | 2072 | #endif |
2075 | 2073 | ||
@@ -2089,7 +2087,6 @@ int ZSafe::loadInit(const char* _filename, const char *password) | |||
2089 | while (count < 8) { | 2087 | while (count < 8) { |
2090 | count2 = read (fileno (fd), (unsigned char *) (charbuf + count), 8); | 2088 | count2 = read (fileno (fd), (unsigned char *) (charbuf + count), 8); |
2091 | #else | 2089 | #else |
2092 | printf ("LoadInit() read2"); | ||
2093 | while ((count = fread ((unsigned char *) (charbuf), sizeof(unsigned char), 8, fd)) > 0) { | 2090 | while ((count = fread ((unsigned char *) (charbuf), sizeof(unsigned char), 8, fd)) > 0) { |
2094 | while (count < 8) { | 2091 | while (count < 8) { |
2095 | count2 = fread ((unsigned char *) (charbuf + count), sizeof(unsigned char), 8, fd); | 2092 | count2 = fread ((unsigned char *) (charbuf + count), sizeof(unsigned char), 8, fd); |
@@ -2259,7 +2256,7 @@ bool ZSafe::saveDocument(const char* _filename, | |||
2259 | retval = saveEntry(entry); | 2256 | retval = saveEntry(entry); |
2260 | for (int z=0; z<i; z++) free(entry[z]); | 2257 | for (int z=0; z<i; z++) free(entry[z]); |
2261 | if (retval == PWERR_DATA) { | 2258 | if (retval == PWERR_DATA) { |
2262 | qWarning("1: Error writing file, contents not saved"); | 2259 | owarn << "1: Error writing file, contents not saved" << oendl; |
2263 | saveFinalize(); | 2260 | saveFinalize(); |
2264 | return false; | 2261 | return false; |
2265 | } | 2262 | } |
@@ -2303,7 +2300,7 @@ bool ZSafe::saveDocument(const char* _filename, | |||
2303 | free(entry[z]); | 2300 | free(entry[z]); |
2304 | } | 2301 | } |
2305 | if (retval == PWERR_DATA) { | 2302 | if (retval == PWERR_DATA) { |
2306 | qWarning("1: Error writing file, contents not saved"); | 2303 | owarn << "1: Error writing file, contents not saved" << oendl; |
2307 | saveFinalize(); | 2304 | saveFinalize(); |
2308 | return false; | 2305 | return false; |
2309 | } | 2306 | } |
@@ -2312,7 +2309,7 @@ bool ZSafe::saveDocument(const char* _filename, | |||
2312 | } | 2309 | } |
2313 | 2310 | ||
2314 | if (saveFinalize() == PWERR_DATA) { | 2311 | if (saveFinalize() == PWERR_DATA) { |
2315 | qWarning("2: Error writing file, contents not saved"); | 2312 | owarn << "2: Error writing file, contents not saved" << oendl; |
2316 | return false; | 2313 | return false; |
2317 | } else { | 2314 | } else { |
2318 | #ifndef DESKTOP | 2315 | #ifndef DESKTOP |
@@ -3190,7 +3187,7 @@ void ZSafe::editCategory() | |||
3190 | 3187 | ||
3191 | if (cat) | 3188 | if (cat) |
3192 | { | 3189 | { |
3193 | qWarning("Category found"); | 3190 | owarn << "Category found" << oendl; |
3194 | 3191 | ||
3195 | // if (!icon.isEmpty() && !icon.isNull()) | 3192 | // if (!icon.isEmpty() && !icon.isNull()) |
3196 | if (icon != "predefined.png") | 3193 | if (icon != "predefined.png") |