summaryrefslogtreecommitdiff
path: root/noncore/apps
authorar <ar>2004-05-31 15:26:50 (UTC)
committer ar <ar>2004-05-31 15:26:50 (UTC)
commit27dfc34d411dee76f09f5e516c60b0a64eb35948 (patch) (unidiff)
treeb7f7259497630390e352a1257cac5dc59f5399a6 /noncore/apps
parent27b09fe4f930b96e82cea9fb0eb1a9b87f7ec062 (diff)
downloadopie-27dfc34d411dee76f09f5e516c60b0a64eb35948.zip
opie-27dfc34d411dee76f09f5e516c60b0a64eb35948.tar.gz
opie-27dfc34d411dee76f09f5e516c60b0a64eb35948.tar.bz2
- convert qWarning to owarn
Diffstat (limited to 'noncore/apps') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-write/qrichtext_p.h5
-rw-r--r--noncore/apps/tableviewer/browsekeyentry.cpp11
-rw-r--r--noncore/apps/tableviewer/db/common.cpp7
-rw-r--r--noncore/apps/tableviewer/db/datacache.cpp2
-rw-r--r--noncore/apps/tableviewer/db/datacache.h12
-rw-r--r--noncore/apps/tableviewer/ui/browsekeyentry.cpp9
-rw-r--r--noncore/apps/tableviewer/ui/filterkeyentry.cpp8
-rw-r--r--noncore/apps/tableviewer/ui/tvfilterview.cpp11
-rw-r--r--noncore/apps/tinykate/libkate/kateconfig.cpp4
-rw-r--r--noncore/apps/zsafe/main.cpp15
-rw-r--r--noncore/apps/zsafe/zlistview.cpp11
-rw-r--r--noncore/apps/zsafe/zsafe.cpp51
12 files changed, 82 insertions, 64 deletions
diff --git a/noncore/apps/opie-write/qrichtext_p.h b/noncore/apps/opie-write/qrichtext_p.h
index e368edb..3778feb 100644
--- a/noncore/apps/opie-write/qrichtext_p.h
+++ b/noncore/apps/opie-write/qrichtext_p.h
@@ -47,12 +47,15 @@
47// version to version without notice, or even be removed. 47// version to version without notice, or even be removed.
48// 48//
49// We mean it. 49// We mean it.
50// 50//
51// 51//
52 52
53#include <opie2/odebug.h>
54using namespace Opie::Core;
55
53#ifndef QT_H 56#ifndef QT_H
54#include "qstring.h" 57#include "qstring.h"
55#include "qlist.h" 58#include "qlist.h"
56#include "qrect.h" 59#include "qrect.h"
57#include "qfontmetrics.h" 60#include "qfontmetrics.h"
58#include "qintdict.h" 61#include "qintdict.h"
@@ -1880,13 +1883,13 @@ inline void QTextParagraph::setParagId( int i )
1880 id = i; 1883 id = i;
1881} 1884}
1882 1885
1883inline int QTextParagraph::paragId() const 1886inline int QTextParagraph::paragId() const
1884{ 1887{
1885 if ( id == -1 ) 1888 if ( id == -1 )
1886 qWarning( "invalid parag id!!!!!!!! (%p)", (void*)this ); 1889 owarn << "invalid parag id!!!!!!!! (" << (void*)this << ")" << oendl;
1887 return id; 1890 return id;
1888} 1891}
1889 1892
1890inline bool QTextParagraph::firstPreProcess() const 1893inline bool QTextParagraph::firstPreProcess() const
1891{ 1894{
1892 return firstPProcess; 1895 return firstPProcess;
diff --git a/noncore/apps/tableviewer/browsekeyentry.cpp b/noncore/apps/tableviewer/browsekeyentry.cpp
index 04e7902..bab9af6 100644
--- a/noncore/apps/tableviewer/browsekeyentry.cpp
+++ b/noncore/apps/tableviewer/browsekeyentry.cpp
@@ -16,24 +16,26 @@
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#include "browsekeyentry.h" 20#include "browsekeyentry.h"
21 21
22/* OPIE */
23#include <opie2/odebug.h>
24using namespace Opie::Core;
25
26/* QT */
22#include <qtoolbutton.h> 27#include <qtoolbutton.h>
23#include <qwidgetstack.h> 28#include <qwidgetstack.h>
24#include <qlayout.h> 29#include <qlayout.h>
25#include <qlineedit.h> 30#include <qlineedit.h>
26#include <qpushbutton.h> 31#include <qpushbutton.h>
27#include <qpopupmenu.h> 32#include <qpopupmenu.h>
28#include <qhbox.h> 33#include <qhbox.h>
29#include <qdatetime.h> 34#include <qdatetime.h>
30 35
31//#include <iostream.h>
32#include <qheader.h>
33// For qWarning(const char *)
34 36
35/*! 37/*!
36 \class TVBrowseKeyEntry 38 \class TVBrowseKeyEntry
37 \brief a Widget used enter keys into the TVBrowseViewWidget 39 \brief a Widget used enter keys into the TVBrowseViewWidget
38 40
39 The TVBrowseKeyEntry Widget provides the facility to enter 41 The TVBrowseKeyEntry Widget provides the facility to enter
@@ -225,14 +227,13 @@ void TVBrowseKeyEntry::searchOnText()
225 if(!QDate::isValid(y, m, d)) 227 if(!QDate::isValid(y, m, d))
226 return; 228 return;
227 sendkey = (void *) new QDate(y, m, d); 229 sendkey = (void *) new QDate(y, m, d);
228 break; 230 break;
229 } 231 }
230 default: 232 default:
231 qWarning("TVBrowseKeyEntry::searchOnText() " 233 owarn << "TVBrowseKeyEntry::searchOnText() cannot work out data type" << oendl;
232 "cannot work out data type");
233 return; 234 return;
234 } 235 }
235 emit searchOnKey(ts->current_column, sendkey); 236 emit searchOnKey(ts->current_column, sendkey);
236} 237}
237 238
238/*! \fn void TVBrowseKeyEntry::searchOnKey(int currentKeyId, void *v) 239/*! \fn void TVBrowseKeyEntry::searchOnKey(int currentKeyId, void *v)
diff --git a/noncore/apps/tableviewer/db/common.cpp b/noncore/apps/tableviewer/db/common.cpp
index b58af85..c35dbea 100644
--- a/noncore/apps/tableviewer/db/common.cpp
+++ b/noncore/apps/tableviewer/db/common.cpp
@@ -857,14 +857,13 @@ int KeyList::addKey(QString name, TVVariant::KeyType type)
857 return addKey(name, TVVariant(QTime(0,0,0)).toTime()); 857 return addKey(name, TVVariant(QTime(0,0,0)).toTime());
858 break; 858 break;
859 case TVVariant::Int: 859 case TVVariant::Int:
860 return addKey(name, TVVariant(0).toInt()); 860 return addKey(name, TVVariant(0).toInt());
861 break; 861 break;
862 default: 862 default:
863 qWarning(QObject::tr("KeyList::addKey() Cannot make default " 863 owarn << "KeyList::addKey() Cannot make default value for type " << type << ", Key not added." << oendl;
864 "value for type %1, Key not added.").arg(type));
865 break; 864 break;
866 } 865 }
867 return -1; 866 return -1;
868} 867}
869 868
870void KeyList::setKeyFlags(int i, int flag) 869void KeyList::setKeyFlags(int i, int flag)
@@ -1205,15 +1204,13 @@ void DataElem::setField(int i, QString q)
1205 case TVVariant::Time: { 1204 case TVVariant::Time: {
1206 t.asTime(); 1205 t.asTime();
1207 setField(i, t); 1206 setField(i, t);
1208 return; 1207 return;
1209 } 1208 }
1210 default: 1209 default:
1211 qWarning( 1210 owarn << "DataElem::setField(" << i << ", " << q << ") No valid type found" << oendl;
1212 QObject::tr("DataElem::setField(%1, %2) No valid type found").arg(i).arg(q)
1213 );
1214 } 1211 }
1215} 1212}
1216 1213
1217/*! 1214/*!
1218 Sets the value of the elements field index i to the value at the pointer 1215 Sets the value of the elements field index i to the value at the pointer
1219 value. 1216 value.
diff --git a/noncore/apps/tableviewer/db/datacache.cpp b/noncore/apps/tableviewer/db/datacache.cpp
index 6380e1b..de57961 100644
--- a/noncore/apps/tableviewer/db/datacache.cpp
+++ b/noncore/apps/tableviewer/db/datacache.cpp
@@ -153,13 +153,13 @@ void DBStore::addItem(DataElem *delem)
153{ 153{
154 addItemInternal(delem); 154 addItemInternal(delem);
155} 155}
156 156
157void DBStore::addItemInternal(DataElem *delem) 157void DBStore::addItemInternal(DataElem *delem)
158{ 158{
159 /* if already full, don't over fill, do a qWarning though */ 159 /* if already full, don't over fill, do a owarn though */
160 if (full) { 160 if (full) {
161 owarn << "Attempted to add items to already full table" << oendl; 161 owarn << "Attempted to add items to already full table" << oendl;
162 return; 162 return;
163 } 163 }
164 164
165 master_table.insert(number_elems, delem); 165 master_table.insert(number_elems, delem);
diff --git a/noncore/apps/tableviewer/db/datacache.h b/noncore/apps/tableviewer/db/datacache.h
index c5dc637..e38050c 100644
--- a/noncore/apps/tableviewer/db/datacache.h
+++ b/noncore/apps/tableviewer/db/datacache.h
@@ -24,15 +24,21 @@
24 * otherwise any other data headings are allowed. 24 * otherwise any other data headings are allowed.
25 */ 25 */
26 26
27#ifndef __DATACACHE_H__ 27#ifndef __DATACACHE_H__
28#define __DATACACHE_H__ 28#define __DATACACHE_H__
29 29
30#include "common.h"
31
32/* OPIE */
33#include <opie2/odebug.h>
34using namespace Opie::Core;
35
36/* QT */
30#include <qstring.h> 37#include <qstring.h>
31#include <qvector.h> 38#include <qvector.h>
32#include "common.h"
33 39
34class DBStore; 40class DBStore;
35 41
36/*! Abstract class that defines how database stuff can be accessed */ 42/*! Abstract class that defines how database stuff can be accessed */
37class DBAccess { 43class DBAccess {
38public: 44public:
@@ -42,18 +48,18 @@ public:
42 48
43 virtual QString type() { 49 virtual QString type() {
44 return QString(); 50 return QString();
45 } 51 }
46 52
47 virtual bool openSource(QIODevice *) { 53 virtual bool openSource(QIODevice *) {
48 qWarning("DBAccess::openSource not yet implemented"); 54 owarn << "DBAccess::openSource not yet implemented" << oendl;
49 return false; 55 return false;
50 } 56 }
51 57
52 virtual bool saveSource(QIODevice *) { 58 virtual bool saveSource(QIODevice *) {
53 qWarning("DBAccess::saveSource(QString) not yet implemented"); 59 owarn << "DBAccess::saveSource(QString) not yet implemented" << oendl;
54 return false; 60 return false;
55 } 61 }
56 62
57protected: 63protected:
58 DBStore *dstore; 64 DBStore *dstore;
59 QString source_name; 65 QString source_name;
diff --git a/noncore/apps/tableviewer/ui/browsekeyentry.cpp b/noncore/apps/tableviewer/ui/browsekeyentry.cpp
index 42e24dd..6b78437 100644
--- a/noncore/apps/tableviewer/ui/browsekeyentry.cpp
+++ b/noncore/apps/tableviewer/ui/browsekeyentry.cpp
@@ -17,24 +17,24 @@
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#include "browsekeyentry.h" 20#include "browsekeyentry.h"
21#include "commonwidgets.h" 21#include "commonwidgets.h"
22 22
23#include <opie2/odebug.h>
24using namespace Opie::Core;
25
23#include <qtoolbutton.h> 26#include <qtoolbutton.h>
24#include <qwidgetstack.h> 27#include <qwidgetstack.h>
25#include <qlayout.h> 28#include <qlayout.h>
26#include <qlineedit.h> 29#include <qlineedit.h>
27#include <qpushbutton.h> 30#include <qpushbutton.h>
28#include <qpopupmenu.h> 31#include <qpopupmenu.h>
29#include <qhbox.h> 32#include <qhbox.h>
30#include <qdatetime.h> 33#include <qdatetime.h>
31 34
32#include <qheader.h>
33// For qWarning(const char *)
34
35/*! 35/*!
36 \class TVBrowseKeyEntry 36 \class TVBrowseKeyEntry
37 \brief a Widget used enter keys into the TVBrowseViewWidget 37 \brief a Widget used enter keys into the TVBrowseViewWidget
38 38
39 The TVBrowseKeyEntry Widget provides the facility to enter 39 The TVBrowseKeyEntry Widget provides the facility to enter
40 various key types to be search on in the table. The key can be changed 40 various key types to be search on in the table. The key can be changed
@@ -189,14 +189,13 @@ void TVBrowseKeyEntry::searchOnText()
189 sendkey = TVVariant(QDate(dateKey->date())); 189 sendkey = TVVariant(QDate(dateKey->date()));
190 break; 190 break;
191 } 191 }
192 case TVVariant::Invalid: 192 case TVVariant::Invalid:
193 break; 193 break;
194 default: 194 default:
195 qWarning("TVBrowseKeyEntry::searchOnText() " 195 owarn << "TVBrowseKeyEntry::searchOnText() cannot work out data type" << oendl;
196 "cannot work out data type");
197 return; 196 return;
198 } 197 }
199 emit searchOnKey(ts->current_column, sendkey); 198 emit searchOnKey(ts->current_column, sendkey);
200} 199}
201 200
202/*! \fn void TVBrowseKeyEntry::searchOnKey(int currentKeyId, TVVariant) 201/*! \fn void TVBrowseKeyEntry::searchOnKey(int currentKeyId, TVVariant)
diff --git a/noncore/apps/tableviewer/ui/filterkeyentry.cpp b/noncore/apps/tableviewer/ui/filterkeyentry.cpp
index d108fbd..4d74d6b 100644
--- a/noncore/apps/tableviewer/ui/filterkeyentry.cpp
+++ b/noncore/apps/tableviewer/ui/filterkeyentry.cpp
@@ -17,12 +17,17 @@
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#include "filterkeyentry.h" 20#include "filterkeyentry.h"
21#include "commonwidgets.h" 21#include "commonwidgets.h"
22 22
23/* OPIE */
24#include <opie2/odebug.h>
25using namespace Opie::Core;
26
27/* QT */
23#include <qwidgetstack.h> 28#include <qwidgetstack.h>
24#include <qcombobox.h> 29#include <qcombobox.h>
25#include <qlayout.h> 30#include <qlayout.h>
26#include <qlineedit.h> 31#include <qlineedit.h>
27#include <qsizepolicy.h> 32#include <qsizepolicy.h>
28#include <qdatetime.h> 33#include <qdatetime.h>
@@ -197,12 +202,11 @@ TVVariant TVFilterKeyEntry::getCompareValue()
197 case TVVariant::Date: { 202 case TVVariant::Date: {
198 sendkey = TVVariant(QDate(dateKey->date())); 203 sendkey = TVVariant(QDate(dateKey->date()));
199 break; 204 break;
200 } 205 }
201 default: { 206 default: {
202 sendkey = TVVariant(0); 207 sendkey = TVVariant(0);
203 qWarning("TVFilterKeyEntry::getCompareValue() " 208 owarn << "TVFilterKeyEntry::getCompareValue() cannot work out data type" << oendl;
204 "cannot work out data type");
205 } 209 }
206 } 210 }
207 return sendkey; 211 return sendkey;
208} 212}
diff --git a/noncore/apps/tableviewer/ui/tvfilterview.cpp b/noncore/apps/tableviewer/ui/tvfilterview.cpp
index 22f1fb7..198c8b5 100644
--- a/noncore/apps/tableviewer/ui/tvfilterview.cpp
+++ b/noncore/apps/tableviewer/ui/tvfilterview.cpp
@@ -15,21 +15,27 @@
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#include "tvfilterview.h" 20#include "tvfilterview.h"
21
22/* OPIE */
23#include <opie2/odebug.h>
24#include <qpe/qpeapplication.h>
25using namespace Opie::Core;
26
27/* QT */
21#include <qtoolbutton.h> 28#include <qtoolbutton.h>
22#include <qcombobox.h> 29#include <qcombobox.h>
23#include <qlistview.h> 30#include <qlistview.h>
24#include <qlayout.h> 31#include <qlayout.h>
25#include <qheader.h> 32#include <qheader.h>
26#include <qpushbutton.h> 33#include <qpushbutton.h>
27#include <qlabel.h> 34#include <qlabel.h>
28 35
29#include <qpe/qpeapplication.h>
30 36
31TVFilterView::TVFilterView(TableState *t, QWidget* parent, 37TVFilterView::TVFilterView(TableState *t, QWidget* parent,
32 const char *name, WFlags fl ) : QDialog(parent, name, TRUE, fl) 38 const char *name, WFlags fl ) : QDialog(parent, name, TRUE, fl)
33{ 39{
34 if ( !name ) 40 if ( !name )
35 setName( "Filter View" ); 41 setName( "Filter View" );
@@ -172,14 +178,13 @@ bool TVFilterView::passesFilter(DataElem *d) {
172 break; 178 break;
173 case ct_endswith: 179 case ct_endswith:
174 if (!d->endsWith(t->keyIndex, t->value)) 180 if (!d->endsWith(t->keyIndex, t->value))
175 return false; 181 return false;
176 break; 182 break;
177 default: 183 default:
178 qWarning("TVFilterView::passesFilter() " 184 owarn << "TVFilterView::passesFilter() unrecognized filter type" << oendl;
179 "unrecognized filter type");
180 return false; 185 return false;
181 } 186 }
182 } 187 }
183 return true; 188 return true;
184} 189}
185 190
diff --git a/noncore/apps/tinykate/libkate/kateconfig.cpp b/noncore/apps/tinykate/libkate/kateconfig.cpp
index 782b629..4b8ce78 100644
--- a/noncore/apps/tinykate/libkate/kateconfig.cpp
+++ b/noncore/apps/tinykate/libkate/kateconfig.cpp
@@ -21,12 +21,13 @@
21#define QTOPIA_INTERNAL_LANGLIST 21#define QTOPIA_INTERNAL_LANGLIST
22#include "kateconfig.h" 22#include "kateconfig.h"
23 23
24/* OPIE */ 24/* OPIE */
25#include <opie2/odebug.h> 25#include <opie2/odebug.h>
26#include <qpe/global.h> 26#include <qpe/global.h>
27using namespace Opie::Core;
27 28
28/* QT */ 29/* QT */
29#include <qdir.h> 30#include <qdir.h>
30#include <qmessagebox.h> 31#include <qmessagebox.h>
31#if QT_VERSION <= 230 && defined(QT_NO_CODECS) 32#if QT_VERSION <= 230 && defined(QT_NO_CODECS)
32#include <qtextcodec.h> 33#include <qtextcodec.h>
@@ -553,14 +554,13 @@ void KateConfig::write( const QString &fn )
553 return; 554 return;
554 } 555 }
555 556
556 f.close(); 557 f.close();
557 // now rename the file... 558 // now rename the file...
558 if ( rename( strNewFile, filename ) < 0 ) { 559 if ( rename( strNewFile, filename ) < 0 ) {
559 qWarning( "problem renaming the file %s to %s", strNewFile.latin1(), 560 owarn << "problem renaming the file " << strNewFile.latin1() << " to " << filename.latin1() << oendl;
560 filename.latin1() );
561 QFile::remove( strNewFile ); 561 QFile::remove( strNewFile );
562 } 562 }
563} 563}
564 564
565/*! 565/*!
566 Returns whether the KateConfig is in a valid state. 566 Returns whether the KateConfig is in a valid state.
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
@@ -5,17 +5,25 @@
5** 5**
6** Homepage: http://home.t-online.de/home/CarstenSchneider/zsafe/index.html 6** Homepage: http://home.t-online.de/home/CarstenSchneider/zsafe/index.html
7*/ 7*/
8 8
9 9
10#include "zsafe.h" 10#include "zsafe.h"
11
12/* OPIE */
13#include <opie2/odebug.h>
14using namespace Opie::Core;
15
16/* QT */
11#ifdef DESKTOP 17#ifdef DESKTOP
12#include <qapplication.h> 18#include <qapplication.h>
13#else 19#else
14#include <qpe/qpeapplication.h> 20#include <qpe/qpeapplication.h>
15#endif 21#endif
22
23/* STD */
16#include <stdio.h> 24#include <stdio.h>
17#include <signal.h> 25#include <signal.h>
18 26
19ZSafe *zs; 27ZSafe *zs;
20#ifdef DESKTOP 28#ifdef DESKTOP
21QApplication *appl; 29QApplication *appl;
@@ -71,25 +79,22 @@ int main( int argc, char ** argv )
71 DeskH = 400; 79 DeskH = 400;
72 } 80 }
73#else 81#else
74 DeskW = a.desktop()->width(); 82 DeskW = a.desktop()->width();
75 DeskH = a.desktop()->height(); 83 DeskH = a.desktop()->height();
76 84
77 char buf[128]; 85 owarn << "Width: " << DeskW << " Height: " << DeskH << oendl;
78 sprintf (buf, "Width: %d Height: %d\n", DeskW, DeskH);
79 qWarning (buf);
80 86
81#ifdef JPATCH_HDE 87#ifdef JPATCH_HDE
82 // nothings 88 // nothings
83#else 89#else
84 if (DeskW > 240) 90 if (DeskW > 240)
85 { 91 {
86 DeskW -= 20; 92 DeskW -= 20;
87 DeskH += 25; 93 DeskH += 25;
88 sprintf (buf, "Changed width: %d Height: %d\n", DeskW, DeskH); 94 owarn << "Changed width: " << DeskW << " Height: " << DeskH << oendl;
89 qWarning (buf);
90 } 95 }
91#endif 96#endif
92 97
93#endif 98#endif
94 99
95 ZSafe mw; 100 ZSafe mw;
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
@@ -1,29 +1,32 @@
1/* 1/*
2** $Id$ 2** $Id$
3*/ 3*/
4 4
5#include "zlistview.h" 5#include "zlistview.h"
6#include <stdio.h>
7#include "zsafe.h" 6#include "zsafe.h"
8 7
8/* OPIE */
9//#include <opie2/odebug.h>
10
11/* STD */
12#include <stdio.h>
13
9ZListView::ZListView (ZSafe *zsafe, const char *id) : QListView(zsafe, id) 14ZListView::ZListView (ZSafe *zsafe, const char *id) : QListView(zsafe, id)
10{ 15{
11 zs = zsafe; 16 zs = zsafe;
12} 17}
13 18
14ZListView::~ZListView() 19ZListView::~ZListView()
15{ 20{
16} 21}
17 22
18void ZListView::keyPressEvent ( QKeyEvent *e ) 23void ZListView::keyPressEvent ( QKeyEvent *e )
19{ 24{
20/* 25/*
21 char buf[64]; 26 owarn << "key: " << e->key() << oendl;
22 sprintf (buf, "key: %d\n", e->key());
23 qWarning (buf);
24*/ 27*/
25 28
26 switch (e->key()) 29 switch (e->key())
27 { 30 {
28 case 32: // middle cursor key pressed 31 case 32: // middle cursor key pressed
29 zs->showInfo (zs->selectedItem); 32 zs->showInfo (zs->selectedItem);
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
@@ -878,13 +878,13 @@ void ZSafe::findPwd()
878 QString comment; 878 QString comment;
879 if (result == Accepted) 879 if (result == Accepted)
880 { 880 {
881 name = dialog->NameField->text(); 881 name = dialog->NameField->text();
882 username = dialog->UsernameField->text(); 882 username = dialog->UsernameField->text();
883 comment = dialog->CommentField->text(); 883 comment = dialog->CommentField->text();
884 qWarning (name); 884 owarn << name << oendl;
885 } 885 }
886 else 886 else
887 { 887 {
888 delete dialog; 888 delete dialog;
889 return; 889 return;
890 } 890 }
@@ -924,13 +924,13 @@ void ZSafe::findPwd()
924 else 924 else
925 i = ListView->firstChild(); 925 i = ListView->firstChild();
926 for (; 926 for (;
927 i != NULL; 927 i != NULL;
928 i = i->nextSibling()) 928 i = i->nextSibling())
929 { 929 {
930 qWarning (i->text(0)); 930 owarn << i->text(0) << oendl;
931 i->setSelected(FALSE); 931 i->setSelected(FALSE);
932 932
933 // step through all subitems 933 // step through all subitems
934 QListViewItem *si; 934 QListViewItem *si;
935 if (lastSearchedItem) 935 if (lastSearchedItem)
936 si = lastSearchedItem; 936 si = lastSearchedItem;
@@ -938,13 +938,13 @@ void ZSafe::findPwd()
938 si = i->firstChild(); 938 si = i->firstChild();
939 // for (si = i->firstChild(); 939 // for (si = i->firstChild();
940 for (; 940 for (;
941 si != NULL; 941 si != NULL;
942 si = si->nextSibling()) 942 si = si->nextSibling())
943 { 943 {
944 qWarning (si->text(0)); 944 owarn << si->text(0) << oendl;
945 if (si->isSelected()) 945 if (si->isSelected())
946 si->setSelected(FALSE); 946 si->setSelected(FALSE);
947 // ListView->repaintItem(si); 947 // ListView->repaintItem(si);
948 948
949 bool n=TRUE; 949 bool n=TRUE;
950 bool u=TRUE; 950 bool u=TRUE;
@@ -955,13 +955,13 @@ void ZSafe::findPwd()
955 u = (si->text(1)).contains (username, FALSE); 955 u = (si->text(1)).contains (username, FALSE);
956 if (!comment.isEmpty()) 956 if (!comment.isEmpty())
957 c = (si->text(3)).contains (comment, FALSE); 957 c = (si->text(3)).contains (comment, FALSE);
958 958
959 if ((n && u && c ) && !found) 959 if ((n && u && c ) && !found)
960 { 960 {
961 qWarning ("Found"); 961 owarn << "Found" << oendl;
962 selectedItem = si; 962 selectedItem = si;
963 si->setSelected(TRUE); 963 si->setSelected(TRUE);
964 ListView->setCurrentItem(si); 964 ListView->setCurrentItem(si);
965 ListView->ensureItemVisible(si); 965 ListView->ensureItemVisible(si);
966 ListView->triggerUpdate(); 966 ListView->triggerUpdate();
967 967
@@ -1225,14 +1225,13 @@ void ZSafe::removeAsciiFile()
1225 1225
1226 if (fn && fn.length() > 0 ) 1226 if (fn && fn.length() > 0 )
1227 { 1227 {
1228 QFile f( fn ); 1228 QFile f( fn );
1229 if ( !f.remove() ) 1229 if ( !f.remove() )
1230 { 1230 {
1231 qWarning( QString("Could not remove file %1").arg(fn), 1231 owarn << "Could not remove file " << fn << oendl;
1232 2000 );
1233 QMessageBox::critical( 0, tr("ZSafe"), 1232 QMessageBox::critical( 0, tr("ZSafe"),
1234 tr("Could not remove text file.") ); 1233 tr("Could not remove text file.") );
1235 return; 1234 return;
1236 } 1235 }
1237 } 1236 }
1238} 1237}
@@ -1275,14 +1274,13 @@ void ZSafe::writeAllEntries()
1275 1274
1276 // open the new document 1275 // open the new document
1277 if (fn && fn.length() > 0 ) 1276 if (fn && fn.length() > 0 )
1278 { 1277 {
1279 QFile f( fn ); 1278 QFile f( fn );
1280 if ( !f.open( IO_WriteOnly ) ) { 1279 if ( !f.open( IO_WriteOnly ) ) {
1281 qWarning( QString("Could not write to file %1").arg(fn), 1280 owarn << "Could not write to file " << fn << oendl;
1282 2000 );
1283 QMessageBox::critical( 0, "ZSafe", 1281 QMessageBox::critical( 0, "ZSafe",
1284 QString("Could not export to text file.") ); 1282 QString("Could not export to text file.") );
1285 return; 1283 return;
1286 } 1284 }
1287 QTextStream t( &f ); 1285 QTextStream t( &f );
1288 1286
@@ -1319,16 +1317,16 @@ void ZSafe::writeAllEntries()
1319 oneEntry += "\""; 1317 oneEntry += "\"";
1320 oneEntry += si->text(4); 1318 oneEntry += si->text(4);
1321 oneEntry += "\";"; 1319 oneEntry += "\";";
1322 oneEntry += "\""; 1320 oneEntry += "\"";
1323 oneEntry += si->text(5); 1321 oneEntry += si->text(5);
1324 oneEntry += "\""; 1322 oneEntry += "\"";
1325 // qWarning (oneEntry); 1323 // owarn << oneEntry << oendl;
1326 t << oneEntry << endl; 1324 t << oneEntry << endl;
1327 1325
1328 // qWarning (si->text(0)); 1326 // owarn << si->text(0) << oendl;
1329 } 1327 }
1330 } 1328 }
1331 f.close(); 1329 f.close();
1332 } 1330 }
1333} 1331}
1334 1332
@@ -1370,14 +1368,13 @@ void ZSafe::readAllEntries()
1370 1368
1371 if (fn && fn.length() > 0 ) 1369 if (fn && fn.length() > 0 )
1372 { 1370 {
1373 QFile f( fn ); 1371 QFile f( fn );
1374 if ( !f.open( IO_ReadOnly ) ) 1372 if ( !f.open( IO_ReadOnly ) )
1375 { 1373 {
1376 qWarning( QString("Could not read file %1").arg(fn), 1374 owarn << "Could not read file " << fn << oendl;
1377 2000 );
1378 QMessageBox::critical( 0, "ZSafe", 1375 QMessageBox::critical( 0, "ZSafe",
1379 QString("Could not import text file.") ); 1376 QString("Could not import text file.") );
1380 return; 1377 return;
1381 } 1378 }
1382 1379
1383 modified = true; 1380 modified = true;
@@ -1400,13 +1397,13 @@ void ZSafe::readAllEntries()
1400 si = si->nextSibling(); 1397 si = si->nextSibling();
1401 i->takeItem(_si); // remove from view list 1398 i->takeItem(_si); // remove from view list
1402 if (_si) delete _si; 1399 if (_si) delete _si;
1403 } 1400 }
1404 } 1401 }
1405 1402
1406 qWarning ("ReadAllEntries(): "); 1403 owarn << "ReadAllEntries(): " << oendl;
1407 1404
1408 QTextStream t(&f); 1405 QTextStream t(&f);
1409 while ( !t.eof() ) 1406 while ( !t.eof() )
1410 { 1407 {
1411 QString s = t.readLine(); 1408 QString s = t.readLine();
1412 s.replace (QRegExp("\";\""), "\"|\""); 1409 s.replace (QRegExp("\";\""), "\"|\"");
@@ -1551,14 +1548,13 @@ void ZSafe::readAllEntries()
1551void ZSafe::writeAllEntries() 1548void ZSafe::writeAllEntries()
1552{ 1549{
1553 // open the file for writing 1550 // open the file for writing
1554 QString fn = filename + ".txt"; 1551 QString fn = filename + ".txt";
1555 QFile f( fn ); 1552 QFile f( fn );
1556 if ( !f.open( IO_WriteOnly ) ) { 1553 if ( !f.open( IO_WriteOnly ) ) {
1557 qWarning( QString("Could not write to file %1").arg(fn), 1554 owarn << "Could not write to file " << fn << oendl;
1558 2000 );
1559 QMessageBox::critical( 0, tr("ZSafe"), 1555 QMessageBox::critical( 0, tr("ZSafe"),
1560 tr("Could not export to text file.") ); 1556 tr("Could not export to text file.") );
1561 return; 1557 return;
1562 } 1558 }
1563 QTextStream t( &f ); 1559 QTextStream t( &f );
1564 1560
@@ -1590,29 +1586,28 @@ void ZSafe::writeAllEntries()
1590 oneEntry += "\""; 1586 oneEntry += "\"";
1591 // oneEntry += si->text(3); 1587 // oneEntry += si->text(3);
1592 QString comment = si->text(3); 1588 QString comment = si->text(3);
1593 comment.replace (QRegExp("\n"), "<br>"); 1589 comment.replace (QRegExp("\n"), "<br>");
1594 oneEntry += comment; 1590 oneEntry += comment;
1595 oneEntry += "\""; 1591 oneEntry += "\"";
1596 // qWarning (oneEntry); 1592 // owarn << oneEntry << oendl;
1597 t << oneEntry << endl; 1593 t << oneEntry << endl;
1598 1594
1599 // qWarning (si->text(0)); 1595 // owarn << si->text(0) << oendl;
1600 } 1596 }
1601 } 1597 }
1602 f.close(); 1598 f.close();
1603} 1599}
1604 1600
1605void ZSafe::readAllEntries() 1601void ZSafe::readAllEntries()
1606{ 1602{
1607 QString fn = filename + ".txt"; 1603 QString fn = filename + ".txt";
1608 QFile f( fn ); 1604 QFile f( fn );
1609 if ( !f.open( IO_ReadOnly ) ) 1605 if ( !f.open( IO_ReadOnly ) )
1610 { 1606 {
1611 qWarning( QString("Could not read file %1").arg(fn), 1607 owarn << "Could not read file " << fn << oendl;
1612 2000 );
1613 QMessageBox::critical( 0, tr("ZSafe"), 1608 QMessageBox::critical( 0, tr("ZSafe"),
1614 tr("Could not import text file.") ); 1609 tr("Could not import text file.") );
1615 return; 1610 return;
1616 } 1611 }
1617 1612
1618 modified = true; 1613 modified = true;
@@ -1635,13 +1630,13 @@ void ZSafe::readAllEntries()
1635 si = si->nextSibling(); 1630 si = si->nextSibling();
1636 i->takeItem(_si); // remove from view list 1631 i->takeItem(_si); // remove from view list
1637 if (_si) delete _si; 1632 if (_si) delete _si;
1638 } 1633 }
1639 } 1634 }
1640 1635
1641 qWarning ("ReadAllEntries(): "); 1636 owarn << "ReadAllEntries(): " << oendl;
1642 1637
1643 QTextStream t(&f); 1638 QTextStream t(&f);
1644 while ( !t.eof() ) 1639 while ( !t.eof() )
1645 { 1640 {
1646 QString s = t.readLine(); 1641 QString s = t.readLine();
1647 s.replace (QRegExp("\";\""), "\"|\""); 1642 s.replace (QRegExp("\";\""), "\"|\"");
@@ -1759,13 +1754,13 @@ void ZSafe::readAllEntries()
1759 1754
1760} 1755}
1761#endif // UNUSED 1756#endif // UNUSED
1762 1757
1763void ZSafe::resume(int) 1758void ZSafe::resume(int)
1764{ 1759{
1765 qWarning ("Resume"); 1760 owarn << "Resume" << oendl;
1766 // hide the main window 1761 // hide the main window
1767 1762
1768 infoForm->hide(); 1763 infoForm->hide();
1769 // open zsafe again 1764 // open zsafe again
1770 m_password = ""; 1765 m_password = "";
1771 selectedItem = NULL; 1766 selectedItem = NULL;
@@ -1815,22 +1810,22 @@ bool ZSafe::openDocument(const char* _filename, const char* )
1815 { 1810 {
1816 // ask with a dialog for the password 1811 // ask with a dialog for the password
1817 if (m_password.isEmpty()) 1812 if (m_password.isEmpty())
1818 getDocPassword(tr("Enter Password")); 1813 getDocPassword(tr("Enter Password"));
1819 if (m_password.isEmpty() && validationFlag == 0) 1814 if (m_password.isEmpty() && validationFlag == 0)
1820 { 1815 {
1821 qWarning ("Wrong password"); 1816 owarn << "Wrong password" << oendl;
1822 QMessageBox::critical( 0, tr("ZSafe"), 1817 QMessageBox::critical( 0, tr("ZSafe"),
1823 tr("Wrong password.\n\nZSafe will now exit.") ); 1818 tr("Wrong password.\n\nZSafe will now exit.") );
1824 exitZs (1); 1819 exitZs (1);
1825 } 1820 }
1826 1821
1827 retval = loadInit(_filename, m_password); 1822 retval = loadInit(_filename, m_password);
1828 if (retval != PWERR_GOOD) 1823 if (retval != PWERR_GOOD)
1829 { 1824 {
1830 qWarning ("Error loading Document"); 1825 owarn << "Error loading Document" << oendl;
1831 return false; 1826 return false;
1832 } 1827 }
1833 } 1828 }
1834 else 1829 else
1835 { 1830 {
1836#ifdef WIN32 1831#ifdef WIN32
@@ -2298,13 +2293,13 @@ void ZSafe::setPasswordDialogDone()
2298 newPwdDialogResult = true; 2293 newPwdDialogResult = true;
2299 newPwdDialog->close(); 2294 newPwdDialog->close();
2300} 2295}
2301 2296
2302void ZSafe::getDocPassword(QString title) 2297void ZSafe::getDocPassword(QString title)
2303{ 2298{
2304qWarning ("getDocPassword"); 2299 owarn << "getDocPassword" << oendl;
2305 // open the 'Password' dialog 2300 // open the 'Password' dialog
2306 PasswordForm *dialog = new PasswordForm(this, title, TRUE); 2301 PasswordForm *dialog = new PasswordForm(this, title, TRUE);
2307 newPwdDialog = dialog; 2302 newPwdDialog = dialog;
2308 newPwdDialogResult = false; 2303 newPwdDialogResult = false;
2309 2304
2310 connect( dialog->PasswordField, SIGNAL( returnPressed() ), 2305 connect( dialog->PasswordField, SIGNAL( returnPressed() ),
@@ -2477,13 +2472,13 @@ int ZSafe::saveFinalize(void)
2477 free(buffer); 2472 free(buffer);
2478 return retval; 2473 return retval;
2479} 2474}
2480 2475
2481void ZSafe::quitMe () 2476void ZSafe::quitMe ()
2482{ 2477{
2483 qWarning ("QUIT..."); 2478 owarn << "QUIT..." << oendl;
2484 2479
2485 if (modified) 2480 if (modified)
2486 { 2481 {
2487 switch( QMessageBox::information( this, tr("ZSafe"), 2482 switch( QMessageBox::information( this, tr("ZSafe"),
2488 tr("Do you want to save\nbefore exiting?"), 2483 tr("Do you want to save\nbefore exiting?"),
2489 tr("&Save"), 2484 tr("&Save"),
@@ -2681,13 +2676,13 @@ void ZSafe::addCategory()
2681 if (result == Accepted) 2676 if (result == Accepted)
2682 { 2677 {
2683 modified = true; 2678 modified = true;
2684 category = dialog->CategoryField->currentText(); 2679 category = dialog->CategoryField->currentText();
2685 icon = dialog->IconField->currentText()+".png"; 2680 icon = dialog->IconField->currentText()+".png";
2686 2681
2687 qWarning (category); 2682 owarn << category << oendl;
2688 2683
2689 QListViewItem *li = new ShadedListItem( 1, ListView ); 2684 QListViewItem *li = new ShadedListItem( 1, ListView );
2690 Category *c1 = new Category(); 2685 Category *c1 = new Category();
2691 c1->setCategoryName(category); 2686 c1->setCategoryName(category);
2692 2687
2693 // if (!icon.isEmpty() && !icon.isNull()) 2688 // if (!icon.isEmpty() && !icon.isNull())
@@ -3189,13 +3184,13 @@ void ZSafe::editCategory()
3189 } 3184 }
3190 3185
3191 // change the category name of the selected category 3186 // change the category name of the selected category
3192 QListViewItem *catItem = cat->getListItem(); 3187 QListViewItem *catItem = cat->getListItem();
3193 if (catItem) 3188 if (catItem)
3194 { 3189 {
3195 qWarning (category); 3190 owarn << category << oendl;
3196 catItem->setText( 0, tr( category ) ); 3191 catItem->setText( 0, tr( category ) );
3197 cat->setCategoryName (tr(category)); 3192 cat->setCategoryName (tr(category));
3198 3193
3199 cat->initListItem(); 3194 cat->initListItem();
3200 categories.insert (category, cat); 3195 categories.insert (category, cat);
3201 } 3196 }
@@ -3590,13 +3585,13 @@ void ZSafe::paintEvent( QPaintEvent * )
3590 infoForm->raise(); 3585 infoForm->raise();
3591 } 3586 }
3592} 3587}
3593 3588
3594void ZSafe::resizeEvent ( QResizeEvent * ) 3589void ZSafe::resizeEvent ( QResizeEvent * )
3595{ 3590{
3596 // qWarning ("resizeEvent"); 3591 // owarn << "resizeEvent" << oendl;
3597#ifndef DESKTOP 3592#ifndef DESKTOP
3598 DeskW = appl->desktop()->width(); 3593 DeskW = appl->desktop()->width();
3599 DeskH = appl->desktop()->height(); 3594 DeskH = appl->desktop()->height();
3600#else 3595#else
3601 DeskW = this->width(); 3596 DeskW = this->width();
3602 DeskH = this->height(); 3597 DeskH = this->height();