-rw-r--r-- | noncore/apps/zsafe/main.cpp | 15 | ||||
-rw-r--r-- | noncore/apps/zsafe/zlistview.cpp | 11 | ||||
-rw-r--r-- | noncore/apps/zsafe/zsafe.cpp | 51 |
3 files changed, 40 insertions, 37 deletions
diff --git a/noncore/apps/zsafe/main.cpp b/noncore/apps/zsafe/main.cpp index 4fe319b..5f48f77 100644 --- a/noncore/apps/zsafe/main.cpp +++ b/noncore/apps/zsafe/main.cpp @@ -9,4 +9,10 @@ #include "zsafe.h" + +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; + +/* QT */ #ifdef DESKTOP #include <qapplication.h> @@ -14,4 +20,6 @@ #include <qpe/qpeapplication.h> #endif + +/* STD */ #include <stdio.h> #include <signal.h> @@ -75,7 +83,5 @@ int main( int argc, char ** argv ) DeskH = a.desktop()->height(); - char buf[128]; - sprintf (buf, "Width: %d Height: %d\n", DeskW, DeskH); - qWarning (buf); + owarn << "Width: " << DeskW << " Height: " << DeskH << oendl; #ifdef JPATCH_HDE @@ -86,6 +92,5 @@ int main( int argc, char ** argv ) DeskW -= 20; DeskH += 25; - sprintf (buf, "Changed width: %d Height: %d\n", DeskW, DeskH); - qWarning (buf); + owarn << "Changed width: " << DeskW << " Height: " << DeskH << oendl; } #endif diff --git a/noncore/apps/zsafe/zlistview.cpp b/noncore/apps/zsafe/zlistview.cpp index ba02a15..7d0b8c2 100644 --- a/noncore/apps/zsafe/zlistview.cpp +++ b/noncore/apps/zsafe/zlistview.cpp @@ -4,7 +4,12 @@ #include "zlistview.h" -#include <stdio.h> #include "zsafe.h" +/* OPIE */ +//#include <opie2/odebug.h> + +/* STD */ +#include <stdio.h> + ZListView::ZListView (ZSafe *zsafe, const char *id) : QListView(zsafe, id) { @@ -19,7 +24,5 @@ void ZListView::keyPressEvent ( QKeyEvent *e ) { /* - char buf[64]; - sprintf (buf, "key: %d\n", e->key()); - qWarning (buf); + owarn << "key: " << e->key() << oendl; */ diff --git a/noncore/apps/zsafe/zsafe.cpp b/noncore/apps/zsafe/zsafe.cpp index 6ff05ac..ca3ff52 100644 --- a/noncore/apps/zsafe/zsafe.cpp +++ b/noncore/apps/zsafe/zsafe.cpp @@ -882,5 +882,5 @@ void ZSafe::findPwd() username = dialog->UsernameField->text(); comment = dialog->CommentField->text(); - qWarning (name); + owarn << name << oendl; } else @@ -928,5 +928,5 @@ void ZSafe::findPwd() i = i->nextSibling()) { - qWarning (i->text(0)); + owarn << i->text(0) << oendl; i->setSelected(FALSE); @@ -942,5 +942,5 @@ void ZSafe::findPwd() si = si->nextSibling()) { - qWarning (si->text(0)); + owarn << si->text(0) << oendl; if (si->isSelected()) si->setSelected(FALSE); @@ -959,5 +959,5 @@ void ZSafe::findPwd() if ((n && u && c ) && !found) { - qWarning ("Found"); + owarn << "Found" << oendl; selectedItem = si; si->setSelected(TRUE); @@ -1229,6 +1229,5 @@ void ZSafe::removeAsciiFile() if ( !f.remove() ) { - qWarning( QString("Could not remove file %1").arg(fn), - 2000 ); + owarn << "Could not remove file " << fn << oendl; QMessageBox::critical( 0, tr("ZSafe"), tr("Could not remove text file.") ); @@ -1279,6 +1278,5 @@ void ZSafe::writeAllEntries() QFile f( fn ); if ( !f.open( IO_WriteOnly ) ) { - qWarning( QString("Could not write to file %1").arg(fn), - 2000 ); + owarn << "Could not write to file " << fn << oendl; QMessageBox::critical( 0, "ZSafe", QString("Could not export to text file.") ); @@ -1323,8 +1321,8 @@ void ZSafe::writeAllEntries() oneEntry += si->text(5); oneEntry += "\""; - // qWarning (oneEntry); + // owarn << oneEntry << oendl; t << oneEntry << endl; - // qWarning (si->text(0)); + // owarn << si->text(0) << oendl; } } @@ -1374,6 +1372,5 @@ void ZSafe::readAllEntries() if ( !f.open( IO_ReadOnly ) ) { - qWarning( QString("Could not read file %1").arg(fn), - 2000 ); + owarn << "Could not read file " << fn << oendl; QMessageBox::critical( 0, "ZSafe", QString("Could not import text file.") ); @@ -1404,5 +1401,5 @@ void ZSafe::readAllEntries() } - qWarning ("ReadAllEntries(): "); + owarn << "ReadAllEntries(): " << oendl; QTextStream t(&f); @@ -1555,6 +1552,5 @@ void ZSafe::writeAllEntries() QFile f( fn ); if ( !f.open( IO_WriteOnly ) ) { - qWarning( QString("Could not write to file %1").arg(fn), - 2000 ); + owarn << "Could not write to file " << fn << oendl; QMessageBox::critical( 0, tr("ZSafe"), tr("Could not export to text file.") ); @@ -1594,8 +1590,8 @@ void ZSafe::writeAllEntries() oneEntry += comment; oneEntry += "\""; - // qWarning (oneEntry); + // owarn << oneEntry << oendl; t << oneEntry << endl; - // qWarning (si->text(0)); + // owarn << si->text(0) << oendl; } } @@ -1609,6 +1605,5 @@ void ZSafe::readAllEntries() if ( !f.open( IO_ReadOnly ) ) { - qWarning( QString("Could not read file %1").arg(fn), - 2000 ); + owarn << "Could not read file " << fn << oendl; QMessageBox::critical( 0, tr("ZSafe"), tr("Could not import text file.") ); @@ -1639,5 +1634,5 @@ void ZSafe::readAllEntries() } - qWarning ("ReadAllEntries(): "); + owarn << "ReadAllEntries(): " << oendl; QTextStream t(&f); @@ -1763,5 +1758,5 @@ void ZSafe::readAllEntries() void ZSafe::resume(int) { - qWarning ("Resume"); + owarn << "Resume" << oendl; // hide the main window @@ -1819,5 +1814,5 @@ bool ZSafe::openDocument(const char* _filename, const char* ) if (m_password.isEmpty() && validationFlag == 0) { - qWarning ("Wrong password"); + owarn << "Wrong password" << oendl; QMessageBox::critical( 0, tr("ZSafe"), tr("Wrong password.\n\nZSafe will now exit.") ); @@ -1828,5 +1823,5 @@ bool ZSafe::openDocument(const char* _filename, const char* ) if (retval != PWERR_GOOD) { - qWarning ("Error loading Document"); + owarn << "Error loading Document" << oendl; return false; } @@ -2302,5 +2297,5 @@ void ZSafe::setPasswordDialogDone() void ZSafe::getDocPassword(QString title) { -qWarning ("getDocPassword"); + owarn << "getDocPassword" << oendl; // open the 'Password' dialog PasswordForm *dialog = new PasswordForm(this, title, TRUE); @@ -2481,5 +2476,5 @@ int ZSafe::saveFinalize(void) void ZSafe::quitMe () { - qWarning ("QUIT..."); + owarn << "QUIT..." << oendl; if (modified) @@ -2685,5 +2680,5 @@ void ZSafe::addCategory() icon = dialog->IconField->currentText()+".png"; - qWarning (category); + owarn << category << oendl; QListViewItem *li = new ShadedListItem( 1, ListView ); @@ -3193,5 +3188,5 @@ void ZSafe::editCategory() if (catItem) { - qWarning (category); + owarn << category << oendl; catItem->setText( 0, tr( category ) ); cat->setCategoryName (tr(category)); @@ -3594,5 +3589,5 @@ void ZSafe::paintEvent( QPaintEvent * ) void ZSafe::resizeEvent ( QResizeEvent * ) { - // qWarning ("resizeEvent"); + // owarn << "resizeEvent" << oendl; #ifndef DESKTOP DeskW = appl->desktop()->width(); |