-rw-r--r-- | noncore/apps/zsafe/zsafe.cpp | 86 |
1 files changed, 85 insertions, 1 deletions
diff --git a/noncore/apps/zsafe/zsafe.cpp b/noncore/apps/zsafe/zsafe.cpp index 5cad7cb..824b841 100644 --- a/noncore/apps/zsafe/zsafe.cpp +++ b/noncore/apps/zsafe/zsafe.cpp | |||
@@ -931,3 +931,7 @@ void ZSafe::findPwd() | |||
931 | comment = dialog->CommentField->text(); | 931 | comment = dialog->CommentField->text(); |
932 | #ifndef NO_OPIE | ||
932 | owarn << name << oendl; | 933 | owarn << name << oendl; |
934 | #else | ||
935 | qWarning (name); | ||
936 | #endif | ||
933 | } | 937 | } |
@@ -977,3 +981,5 @@ void ZSafe::findPwd() | |||
977 | { | 981 | { |
982 | #ifndef NO_OPIE | ||
978 | owarn << i->text(0) << oendl; | 983 | owarn << i->text(0) << oendl; |
984 | #endif | ||
979 | i->setSelected(FALSE); | 985 | i->setSelected(FALSE); |
@@ -991,3 +997,7 @@ void ZSafe::findPwd() | |||
991 | { | 997 | { |
998 | #ifndef NO_OPIE | ||
992 | owarn << si->text(0) << oendl; | 999 | owarn << si->text(0) << oendl; |
1000 | #else | ||
1001 | qWarning (si->text(0)); | ||
1002 | #endif | ||
993 | if (si->isSelected()) | 1003 | if (si->isSelected()) |
@@ -1008,3 +1018,7 @@ void ZSafe::findPwd() | |||
1008 | { | 1018 | { |
1019 | #ifndef NO_OPIE | ||
1009 | owarn << "Found" << oendl; | 1020 | owarn << "Found" << oendl; |
1021 | #else | ||
1022 | qWarning ("Found"); | ||
1023 | #endif | ||
1010 | selectedItem = si; | 1024 | selectedItem = si; |
@@ -1278,3 +1292,7 @@ void ZSafe::removeAsciiFile() | |||
1278 | { | 1292 | { |
1293 | #ifndef NO_OPIE | ||
1279 | owarn << "Could not remove file " << fn << oendl; | 1294 | owarn << "Could not remove file " << fn << oendl; |
1295 | #else | ||
1296 | qWarning( QString("Could not remove file %1").arg(fn),2000 ); | ||
1297 | #endif | ||
1280 | QMessageBox::critical( 0, tr("ZSafe"), | 1298 | QMessageBox::critical( 0, tr("ZSafe"), |
@@ -1327,3 +1345,7 @@ void ZSafe::writeAllEntries() | |||
1327 | if ( !f.open( IO_WriteOnly ) ) { | 1345 | if ( !f.open( IO_WriteOnly ) ) { |
1346 | #ifndef NO_OPIE | ||
1328 | owarn << "Could not write to file " << fn << oendl; | 1347 | owarn << "Could not write to file " << fn << oendl; |
1348 | #else | ||
1349 | qWarning( QString("Could not write to file %1").arg(fn),2000 ); | ||
1350 | #endif | ||
1329 | QMessageBox::critical( 0, "ZSafe", | 1351 | QMessageBox::critical( 0, "ZSafe", |
@@ -1421,3 +1443,7 @@ void ZSafe::readAllEntries() | |||
1421 | { | 1443 | { |
1444 | #ifndef NO_OPIE | ||
1422 | owarn << "Could not read file " << fn << oendl; | 1445 | owarn << "Could not read file " << fn << oendl; |
1446 | #else | ||
1447 | qWarning( QString("Could not read file %1").arg(fn), 2000 ); | ||
1448 | #endif | ||
1423 | QMessageBox::critical( 0, "ZSafe", | 1449 | QMessageBox::critical( 0, "ZSafe", |
@@ -1450,3 +1476,7 @@ void ZSafe::readAllEntries() | |||
1450 | 1476 | ||
1477 | #ifndef NO_OPIE | ||
1451 | owarn << "ReadAllEntries(): " << oendl; | 1478 | owarn << "ReadAllEntries(): " << oendl; |
1479 | #else | ||
1480 | qWarning ("ReadAllEntries(): "); | ||
1481 | #endif | ||
1452 | 1482 | ||
@@ -1597,2 +1627,9 @@ void ZSafe::writeAllEntries() | |||
1597 | { | 1627 | { |
1628 | if (filename.isEmpty()) | ||
1629 | { | ||
1630 | QMessageBox::critical( 0, tr("ZSafe"), | ||
1631 | tr("<P>No document defined. You have to create a new document</P>")); | ||
1632 | return; | ||
1633 | } | ||
1634 | |||
1598 | // open the file for writing | 1635 | // open the file for writing |
@@ -1601,3 +1638,7 @@ void ZSafe::writeAllEntries() | |||
1601 | if ( !f.open( IO_WriteOnly ) ) { | 1638 | if ( !f.open( IO_WriteOnly ) ) { |
1639 | #ifndef NO_OPIE | ||
1602 | owarn << "Could not write to file " << fn << oendl; | 1640 | owarn << "Could not write to file " << fn << oendl; |
1641 | #else | ||
1642 | qWarning( QString("Could not write to file %1").arg(fn), 2000 ); | ||
1643 | #endif | ||
1603 | QMessageBox::critical( 0, tr("ZSafe"), | 1644 | QMessageBox::critical( 0, tr("ZSafe"), |
@@ -1654,3 +1695,7 @@ void ZSafe::readAllEntries() | |||
1654 | { | 1695 | { |
1696 | #ifndef NO_OPIE | ||
1655 | owarn << "Could not read file " << fn << oendl; | 1697 | owarn << "Could not read file " << fn << oendl; |
1698 | #else | ||
1699 | qWarning( QString("Could not read file %1").arg(fn), 2000 ); | ||
1700 | #endif | ||
1656 | QMessageBox::critical( 0, tr("ZSafe"), | 1701 | QMessageBox::critical( 0, tr("ZSafe"), |
@@ -1683,4 +1728,7 @@ void ZSafe::readAllEntries() | |||
1683 | 1728 | ||
1729 | #ifndef NO_OPIE | ||
1684 | owarn << "ReadAllEntries(): " << oendl; | 1730 | owarn << "ReadAllEntries(): " << oendl; |
1685 | 1731 | #else | |
1732 | qWarning ("ReadAllEntries(): "); | ||
1733 | #endif | ||
1686 | QTextStream t(&f); | 1734 | QTextStream t(&f); |
@@ -1807,3 +1855,5 @@ void ZSafe::resume(int) | |||
1807 | { | 1855 | { |
1856 | #ifndef NO_OPIE | ||
1808 | owarn << "Resume" << oendl; | 1857 | owarn << "Resume" << oendl; |
1858 | #endif | ||
1809 | // hide the main window | 1859 | // hide the main window |
@@ -1866,3 +1916,7 @@ bool ZSafe::openDocument(const char* _filename, const char* ) | |||
1866 | { | 1916 | { |
1917 | #ifndef NO_OPIE | ||
1867 | owarn << "Wrong password" << oendl; | 1918 | owarn << "Wrong password" << oendl; |
1919 | #else | ||
1920 | qWarning ("Wrong password"); | ||
1921 | #endif | ||
1868 | QMessageBox::critical( 0, tr("ZSafe"), | 1922 | QMessageBox::critical( 0, tr("ZSafe"), |
@@ -1875,3 +1929,7 @@ bool ZSafe::openDocument(const char* _filename, const char* ) | |||
1875 | { | 1929 | { |
1930 | #ifndef NO_OPIE | ||
1876 | owarn << "Error loading Document" << oendl; | 1931 | owarn << "Error loading Document" << oendl; |
1932 | #lese | ||
1933 | qWarning ("Error loading Document"); | ||
1934 | #endif | ||
1877 | return false; | 1935 | return false; |
@@ -2275,3 +2333,7 @@ bool ZSafe::saveDocument(const char* _filename, | |||
2275 | if (retval == PWERR_DATA) { | 2333 | if (retval == PWERR_DATA) { |
2334 | #ifndef NO_OPIE | ||
2276 | owarn << "1: Error writing file, contents not saved" << oendl; | 2335 | owarn << "1: Error writing file, contents not saved" << oendl; |
2336 | #else | ||
2337 | qWarning("1: Error writing file, contents not saved"); | ||
2338 | #endif | ||
2277 | saveFinalize(); | 2339 | saveFinalize(); |
@@ -2319,3 +2381,7 @@ bool ZSafe::saveDocument(const char* _filename, | |||
2319 | if (retval == PWERR_DATA) { | 2381 | if (retval == PWERR_DATA) { |
2382 | #ifndef NO_OPIE | ||
2320 | owarn << "1: Error writing file, contents not saved" << oendl; | 2383 | owarn << "1: Error writing file, contents not saved" << oendl; |
2384 | #else | ||
2385 | qWarning("1: Error writing file, contents not saved"); | ||
2386 | #endif | ||
2321 | saveFinalize(); | 2387 | saveFinalize(); |
@@ -2328,3 +2394,7 @@ bool ZSafe::saveDocument(const char* _filename, | |||
2328 | if (saveFinalize() == PWERR_DATA) { | 2394 | if (saveFinalize() == PWERR_DATA) { |
2395 | #ifndef NO_OPIE | ||
2329 | owarn << "2: Error writing file, contents not saved" << oendl; | 2396 | owarn << "2: Error writing file, contents not saved" << oendl; |
2397 | #else | ||
2398 | qWarning("2: Error writing file, contents not saved"); | ||
2399 | #endif | ||
2330 | return false; | 2400 | return false; |
@@ -2349,3 +2419,5 @@ void ZSafe::getDocPassword(QString title) | |||
2349 | { | 2419 | { |
2420 | #ifndef NO_OPIE | ||
2350 | owarn << "getDocPassword" << oendl; | 2421 | owarn << "getDocPassword" << oendl; |
2422 | #endif | ||
2351 | // open the 'Password' dialog | 2423 | // open the 'Password' dialog |
@@ -2531,3 +2603,5 @@ void ZSafe::quitMe () | |||
2531 | { | 2603 | { |
2604 | #ifndef NO_OPIE | ||
2532 | owarn << "QUIT..." << oendl; | 2605 | owarn << "QUIT..." << oendl; |
2606 | #endif | ||
2533 | 2607 | ||
@@ -2735,3 +2809,5 @@ void ZSafe::addCategory() | |||
2735 | 2809 | ||
2810 | #ifndef NO_OPIE | ||
2736 | owarn << category << oendl; | 2811 | owarn << category << oendl; |
2812 | #endif | ||
2737 | 2813 | ||
@@ -3209,3 +3285,7 @@ void ZSafe::editCategory() | |||
3209 | { | 3285 | { |
3286 | #ifndef NO_OPIE | ||
3210 | owarn << "Category found" << oendl; | 3287 | owarn << "Category found" << oendl; |
3288 | #else | ||
3289 | qWarning("Category found"); | ||
3290 | #endif | ||
3211 | 3291 | ||
@@ -3243,3 +3323,7 @@ void ZSafe::editCategory() | |||
3243 | { | 3323 | { |
3324 | #ifndef NO_OPIE | ||
3244 | owarn << category << oendl; | 3325 | owarn << category << oendl; |
3326 | #else | ||
3327 | qWarning (category); | ||
3328 | #endif | ||
3245 | catItem->setText( 0, tr( category ) ); | 3329 | catItem->setText( 0, tr( category ) ); |