author | llornkcor <llornkcor> | 2004-07-10 01:55:11 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2004-07-10 01:55:11 (UTC) |
commit | 9c40b0465fc9d553077f020bed889bb1ac1a472f (patch) (side-by-side diff) | |
tree | 3f315ab6dca8a78e7b8428b23b5370bf294e9897 | |
parent | d83b24ab6a294e320146220d7b1302f86b0c3560 (diff) | |
download | opie-9c40b0465fc9d553077f020bed889bb1ac1a472f.zip opie-9c40b0465fc9d553077f020bed889bb1ac1a472f.tar.gz opie-9c40b0465fc9d553077f020bed889bb1ac1a472f.tar.bz2 |
qwarning for non opie
-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() comment = dialog->CommentField->text(); +#ifndef NO_OPIE owarn << name << oendl; +#else + qWarning (name); +#endif } @@ -977,3 +981,5 @@ void ZSafe::findPwd() { +#ifndef NO_OPIE owarn << i->text(0) << oendl; +#endif i->setSelected(FALSE); @@ -991,3 +997,7 @@ void ZSafe::findPwd() { +#ifndef NO_OPIE owarn << si->text(0) << oendl; +#else + qWarning (si->text(0)); +#endif if (si->isSelected()) @@ -1008,3 +1018,7 @@ void ZSafe::findPwd() { +#ifndef NO_OPIE owarn << "Found" << oendl; +#else + qWarning ("Found"); +#endif selectedItem = si; @@ -1278,3 +1292,7 @@ void ZSafe::removeAsciiFile() { +#ifndef NO_OPIE owarn << "Could not remove file " << fn << oendl; +#else + qWarning( QString("Could not remove file %1").arg(fn),2000 ); +#endif QMessageBox::critical( 0, tr("ZSafe"), @@ -1327,3 +1345,7 @@ void ZSafe::writeAllEntries() if ( !f.open( IO_WriteOnly ) ) { +#ifndef NO_OPIE owarn << "Could not write to file " << fn << oendl; +#else + qWarning( QString("Could not write to file %1").arg(fn),2000 ); +#endif QMessageBox::critical( 0, "ZSafe", @@ -1421,3 +1443,7 @@ void ZSafe::readAllEntries() { +#ifndef NO_OPIE owarn << "Could not read file " << fn << oendl; +#else + qWarning( QString("Could not read file %1").arg(fn), 2000 ); +#endif QMessageBox::critical( 0, "ZSafe", @@ -1450,3 +1476,7 @@ void ZSafe::readAllEntries() +#ifndef NO_OPIE owarn << "ReadAllEntries(): " << oendl; +#else + qWarning ("ReadAllEntries(): "); +#endif @@ -1597,2 +1627,9 @@ void ZSafe::writeAllEntries() { + if (filename.isEmpty()) + { + QMessageBox::critical( 0, tr("ZSafe"), + tr("<P>No document defined. You have to create a new document</P>")); + return; + } + // open the file for writing @@ -1601,3 +1638,7 @@ void ZSafe::writeAllEntries() if ( !f.open( IO_WriteOnly ) ) { +#ifndef NO_OPIE owarn << "Could not write to file " << fn << oendl; +#else + qWarning( QString("Could not write to file %1").arg(fn), 2000 ); +#endif QMessageBox::critical( 0, tr("ZSafe"), @@ -1654,3 +1695,7 @@ void ZSafe::readAllEntries() { +#ifndef NO_OPIE owarn << "Could not read file " << fn << oendl; +#else + qWarning( QString("Could not read file %1").arg(fn), 2000 ); +#endif QMessageBox::critical( 0, tr("ZSafe"), @@ -1683,4 +1728,7 @@ void ZSafe::readAllEntries() +#ifndef NO_OPIE owarn << "ReadAllEntries(): " << oendl; - +#else + qWarning ("ReadAllEntries(): "); +#endif QTextStream t(&f); @@ -1807,3 +1855,5 @@ void ZSafe::resume(int) { +#ifndef NO_OPIE owarn << "Resume" << oendl; +#endif // hide the main window @@ -1866,3 +1916,7 @@ bool ZSafe::openDocument(const char* _filename, const char* ) { +#ifndef NO_OPIE owarn << "Wrong password" << oendl; +#else + qWarning ("Wrong password"); +#endif QMessageBox::critical( 0, tr("ZSafe"), @@ -1875,3 +1929,7 @@ bool ZSafe::openDocument(const char* _filename, const char* ) { +#ifndef NO_OPIE owarn << "Error loading Document" << oendl; +#lese + qWarning ("Error loading Document"); +#endif return false; @@ -2275,3 +2333,7 @@ bool ZSafe::saveDocument(const char* _filename, if (retval == PWERR_DATA) { +#ifndef NO_OPIE owarn << "1: Error writing file, contents not saved" << oendl; +#else + qWarning("1: Error writing file, contents not saved"); +#endif saveFinalize(); @@ -2319,3 +2381,7 @@ bool ZSafe::saveDocument(const char* _filename, if (retval == PWERR_DATA) { +#ifndef NO_OPIE owarn << "1: Error writing file, contents not saved" << oendl; +#else + qWarning("1: Error writing file, contents not saved"); +#endif saveFinalize(); @@ -2328,3 +2394,7 @@ bool ZSafe::saveDocument(const char* _filename, if (saveFinalize() == PWERR_DATA) { +#ifndef NO_OPIE owarn << "2: Error writing file, contents not saved" << oendl; +#else + qWarning("2: Error writing file, contents not saved"); +#endif return false; @@ -2349,3 +2419,5 @@ void ZSafe::getDocPassword(QString title) { +#ifndef NO_OPIE owarn << "getDocPassword" << oendl; +#endif // open the 'Password' dialog @@ -2531,3 +2603,5 @@ void ZSafe::quitMe () { +#ifndef NO_OPIE owarn << "QUIT..." << oendl; +#endif @@ -2735,3 +2809,5 @@ void ZSafe::addCategory() +#ifndef NO_OPIE owarn << category << oendl; +#endif @@ -3209,3 +3285,7 @@ void ZSafe::editCategory() { +#ifndef NO_OPIE owarn << "Category found" << oendl; +#else + qWarning("Category found"); +#endif @@ -3243,3 +3323,7 @@ void ZSafe::editCategory() { +#ifndef NO_OPIE owarn << category << oendl; +#else + qWarning (category); +#endif catItem->setText( 0, tr( category ) ); |