-rw-r--r-- | noncore/tools/calc2/engine.cpp | 13 | ||||
-rw-r--r-- | noncore/tools/clock/setAlarm.cpp | 2 | ||||
-rw-r--r-- | noncore/tools/pimconverter/converter.cpp | 44 |
3 files changed, 35 insertions, 24 deletions
diff --git a/noncore/tools/calc2/engine.cpp b/noncore/tools/calc2/engine.cpp index e843e29..74cd701 100644 --- a/noncore/tools/calc2/engine.cpp +++ b/noncore/tools/calc2/engine.cpp | |||
@@ -19,10 +19,17 @@ | |||
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include "engine.h" | 21 | #include "engine.h" |
22 | |||
23 | /* OPIE */ | ||
24 | #include <opie2/odebug.h> | ||
25 | |||
26 | /* QT */ | ||
22 | #include <qstring.h> | 27 | #include <qstring.h> |
23 | #include <math.h> | ||
24 | #include <qlcdnumber.h> | 28 | #include <qlcdnumber.h> |
25 | 29 | ||
30 | /* STD */ | ||
31 | #include <math.h> | ||
32 | |||
26 | Data Engine::evalStack (Data num, bool inbrace = FALSE) | 33 | Data Engine::evalStack (Data num, bool inbrace = FALSE) |
27 | { | 34 | { |
28 | if (state != sError) { | 35 | if (state != sError) { |
@@ -42,7 +49,7 @@ Data Engine::evalStack (Data num, bool inbrace = FALSE) | |||
42 | 49 | ||
43 | // Error-check ( change this to work for all types ) | 50 | // Error-check ( change this to work for all types ) |
44 | if (isnan (num.dbl) || isinf (num.dbl)) { | 51 | if (isnan (num.dbl) || isinf (num.dbl)) { |
45 | qDebug ("bad result from operation"); | 52 | odebug << "bad result from operation" << oendl; |
46 | state = sError; | 53 | state = sError; |
47 | clearData(&num); | 54 | clearData(&num); |
48 | return num; | 55 | return num; |
@@ -113,7 +120,7 @@ void Engine::pushValue (char v) | |||
113 | state = sAppend; | 120 | state = sAppend; |
114 | pushValue (v); | 121 | pushValue (v); |
115 | } else if (state == sError) { | 122 | } else if (state == sError) { |
116 | qDebug ("in error state"); | 123 | odebug << "in error state" << oendl; |
117 | return; | 124 | return; |
118 | } | 125 | } |
119 | } | 126 | } |
diff --git a/noncore/tools/clock/setAlarm.cpp b/noncore/tools/clock/setAlarm.cpp index 9d5fc49..049af8d 100644 --- a/noncore/tools/clock/setAlarm.cpp +++ b/noncore/tools/clock/setAlarm.cpp | |||
@@ -213,7 +213,7 @@ void Set_Alarm::slotChangemp3CkeckBox(bool b) { | |||
213 | QString str = OFileDialog::getOpenFileName( 2,"/", QString::null, map);//,"", "*", this ); | 213 | QString str = OFileDialog::getOpenFileName( 2,"/", QString::null, map);//,"", "*", this ); |
214 | // QString str = Opie::OFileDialog::getOpenFileName( 2,"/");//,"", "*", this ); | 214 | // QString str = Opie::OFileDialog::getOpenFileName( 2,"/");//,"", "*", this ); |
215 | if(!str.isEmpty() ) { | 215 | if(!str.isEmpty() ) { |
216 | qDebug(str); | 216 | odebug << str << oendl; |
217 | config.writeEntry("mp3Alarm",1); | 217 | config.writeEntry("mp3Alarm",1); |
218 | config.writeEntry("mp3File",str); | 218 | config.writeEntry("mp3File",str); |
219 | } | 219 | } |
diff --git a/noncore/tools/pimconverter/converter.cpp b/noncore/tools/pimconverter/converter.cpp index 2bd47a4..7d34b24 100644 --- a/noncore/tools/pimconverter/converter.cpp +++ b/noncore/tools/pimconverter/converter.cpp | |||
@@ -1,17 +1,21 @@ | |||
1 | #include "converter.h" | 1 | #include "converter.h" |
2 | 2 | ||
3 | #include <qdatetime.h> | 3 | /* OPIE */ |
4 | #include <qprogressbar.h> | ||
5 | #include <qcombobox.h> | ||
6 | #include <qcheckbox.h> | ||
7 | |||
8 | #include <qpe/qpeapplication.h> | 4 | #include <qpe/qpeapplication.h> |
9 | 5 | ||
6 | #include <opie2/odebug.h> | ||
10 | #include <opie2/opimglobal.h> | 7 | #include <opie2/opimglobal.h> |
11 | // Include SQL related header files | 8 | // Include SQL related header files |
12 | #define __USE_SQL | 9 | #define __USE_SQL |
13 | #include <opie2/opimaccessfactory.h> | 10 | #include <opie2/opimaccessfactory.h> |
14 | 11 | ||
12 | /* QT */ | ||
13 | #include <qdatetime.h> | ||
14 | #include <qprogressbar.h> | ||
15 | #include <qcombobox.h> | ||
16 | #include <qcheckbox.h> | ||
17 | |||
18 | |||
15 | using namespace Opie; | 19 | using namespace Opie; |
16 | using namespace Pim; | 20 | using namespace Pim; |
17 | 21 | ||
@@ -49,7 +53,7 @@ void Converter::start_conversion(){ | |||
49 | 53 | ||
50 | switch( m_selectedSourceFormat ){ | 54 | switch( m_selectedSourceFormat ){ |
51 | case XML: | 55 | case XML: |
52 | qDebug("XMLSourceDB = %d", m_selectedDatabase); | 56 | odebug << "XMLSourceDB = " << m_selectedDatabase << "" << oendl; |
53 | switch( m_selectedDatabase ){ | 57 | switch( m_selectedDatabase ){ |
54 | case ADDRESSBOOK:{ | 58 | case ADDRESSBOOK:{ |
55 | sourceDB = OPimAccessFactory<OPimContactAccess>::create( OPimGlobal::CONTACTLIST, OPimGlobal::XML, "converter" ); | 59 | sourceDB = OPimAccessFactory<OPimContactAccess>::create( OPimGlobal::CONTACTLIST, OPimGlobal::XML, "converter" ); |
@@ -63,12 +67,12 @@ void Converter::start_conversion(){ | |||
63 | } | 67 | } |
64 | break; | 68 | break; |
65 | default: | 69 | default: |
66 | qWarning( "Unknown database selected (%d)", m_selectedDatabase ); | 70 | owarn << "Unknown database selected (" << m_selectedDatabase << ")" << oendl; |
67 | return; | 71 | return; |
68 | } | 72 | } |
69 | break; | 73 | break; |
70 | case SQL: | 74 | case SQL: |
71 | qDebug("SQLSourceDB = %d", m_selectedDatabase); | 75 | odebug << "SQLSourceDB = " << m_selectedDatabase << "" << oendl; |
72 | switch( m_selectedDatabase ){ | 76 | switch( m_selectedDatabase ){ |
73 | case ADDRESSBOOK:{ | 77 | case ADDRESSBOOK:{ |
74 | sourceDB = OPimAccessFactory<OPimContactAccess>::create( OPimGlobal::CONTACTLIST, OPimGlobal::SQL, "converter" ); | 78 | sourceDB = OPimAccessFactory<OPimContactAccess>::create( OPimGlobal::CONTACTLIST, OPimGlobal::SQL, "converter" ); |
@@ -82,18 +86,18 @@ void Converter::start_conversion(){ | |||
82 | } | 86 | } |
83 | break; | 87 | break; |
84 | default: | 88 | default: |
85 | qWarning( "Unknown database selected (%d)", m_selectedDatabase ); | 89 | owarn << "Unknown database selected (" << m_selectedDatabase << ")" << oendl; |
86 | return; | 90 | return; |
87 | } | 91 | } |
88 | break; | 92 | break; |
89 | default: | 93 | default: |
90 | qWarning( "Unknown source format selected (%d) !!", m_selectedSourceFormat ); | 94 | owarn << "Unknown source format selected (" << m_selectedSourceFormat << ") !!" << oendl; |
91 | return; | 95 | return; |
92 | } | 96 | } |
93 | 97 | ||
94 | switch ( m_selectedDestFormat ){ | 98 | switch ( m_selectedDestFormat ){ |
95 | case XML: | 99 | case XML: |
96 | qDebug("XMLDestDB = %d", m_selectedDatabase); | 100 | odebug << "XMLDestDB = " << m_selectedDatabase << "" << oendl; |
97 | switch( m_selectedDatabase ){ | 101 | switch( m_selectedDatabase ){ |
98 | case ADDRESSBOOK:{ | 102 | case ADDRESSBOOK:{ |
99 | destDB = OPimAccessFactory<OPimContactAccess>::create( OPimGlobal::CONTACTLIST, OPimGlobal::XML, "converter" ); | 103 | destDB = OPimAccessFactory<OPimContactAccess>::create( OPimGlobal::CONTACTLIST, OPimGlobal::XML, "converter" ); |
@@ -107,12 +111,12 @@ void Converter::start_conversion(){ | |||
107 | } | 111 | } |
108 | break; | 112 | break; |
109 | default: | 113 | default: |
110 | qWarning( "Unknown database selected (%d)", m_selectedDatabase ); | 114 | owarn << "Unknown database selected (" << m_selectedDatabase << ")" << oendl; |
111 | return; | 115 | return; |
112 | } | 116 | } |
113 | break; | 117 | break; |
114 | case SQL: | 118 | case SQL: |
115 | qDebug("SQLDestDB = %d", m_selectedDatabase); | 119 | odebug << "SQLDestDB = " << m_selectedDatabase << "" << oendl; |
116 | switch( m_selectedDatabase ){ | 120 | switch( m_selectedDatabase ){ |
117 | case ADDRESSBOOK:{ | 121 | case ADDRESSBOOK:{ |
118 | destDB = OPimAccessFactory<OPimContactAccess>::create( OPimGlobal::CONTACTLIST, OPimGlobal::SQL, "converter" ); | 122 | destDB = OPimAccessFactory<OPimContactAccess>::create( OPimGlobal::CONTACTLIST, OPimGlobal::SQL, "converter" ); |
@@ -126,12 +130,12 @@ void Converter::start_conversion(){ | |||
126 | } | 130 | } |
127 | break; | 131 | break; |
128 | default: | 132 | default: |
129 | qWarning( "Unknown database selected (%d)", m_selectedDatabase ); | 133 | owarn << "Unknown database selected (" << m_selectedDatabase << ")" << oendl; |
130 | return; | 134 | return; |
131 | } | 135 | } |
132 | break; | 136 | break; |
133 | default: | 137 | default: |
134 | qWarning( "Unknown destination format selected (%d)!!", m_selectedDestFormat ); | 138 | owarn << "Unknown destination format selected (" << m_selectedDestFormat << ")!!" << oendl; |
135 | return; | 139 | return; |
136 | } | 140 | } |
137 | 141 | ||
@@ -146,17 +150,17 @@ void Converter::start_conversion(){ | |||
146 | 150 | ||
147 | // Clean the dest-database if requested (isChecked) | 151 | // Clean the dest-database if requested (isChecked) |
148 | if ( m_eraseDB -> isChecked() ){ | 152 | if ( m_eraseDB -> isChecked() ){ |
149 | qDebug( "Clearing destination database!" ); | 153 | odebug << "Clearing destination database!" << oendl; |
150 | destDB -> clear(); | 154 | destDB -> clear(); |
151 | } | 155 | } |
152 | 156 | ||
153 | // Now transmit every pim-item from the source database to the destination -database | 157 | // Now transmit every pim-item from the source database to the destination -database |
154 | QArray<int> uidList = sourceDB->records(); | 158 | QArray<int> uidList = sourceDB->records(); |
155 | qDebug( "Try to move data for addressbook.. (%d items) ", uidList.count() ); | 159 | odebug << "Try to move data for addressbook.. (" << uidList.count() << " items) " << oendl; |
156 | m_progressBar->setTotalSteps( uidList.count() ); | 160 | m_progressBar->setTotalSteps( uidList.count() ); |
157 | int count = 0; | 161 | int count = 0; |
158 | for ( uint i = 0; i < uidList.count(); ++i ){ | 162 | for ( uint i = 0; i < uidList.count(); ++i ){ |
159 | qDebug( "Adding uid: %d", uidList[i] ); | 163 | odebug << "Adding uid: " << uidList[i] << "" << oendl; |
160 | OPimRecord* rec = sourceDB -> record( uidList[i] ); | 164 | OPimRecord* rec = sourceDB -> record( uidList[i] ); |
161 | destDB -> add( rec ); | 165 | destDB -> add( rec ); |
162 | m_progressBar->setProgress( ++count ); | 166 | m_progressBar->setProgress( ++count ); |
@@ -181,12 +185,12 @@ void Converter::start_conversion(){ | |||
181 | delete static_cast<ODateBookAccess*> (destDB); | 185 | delete static_cast<ODateBookAccess*> (destDB); |
182 | break; | 186 | break; |
183 | default: | 187 | default: |
184 | qWarning( "Unknown database selected (%d)", m_selectedDatabase ); | 188 | owarn << "Unknown database selected (" << m_selectedDatabase << ")" << oendl; |
185 | return; | 189 | return; |
186 | } | 190 | } |
187 | 191 | ||
188 | 192 | ||
189 | qWarning("Conversion is finished and needed %d ms !", t.elapsed()); | 193 | owarn << "Conversion is finished and needed " << t.elapsed() << " ms !" << oendl; |
190 | } | 194 | } |
191 | 195 | ||
192 | int main( int argc, char** argv ) { | 196 | int main( int argc, char** argv ) { |