summaryrefslogtreecommitdiff
path: root/noncore/apps
authorzecke <zecke>2004-09-10 11:11:23 (UTC)
committer zecke <zecke>2004-09-10 11:11:23 (UTC)
commit532d65f8a45850bfda3c3344a7b165af91e48440 (patch) (unidiff)
treecbda2467001ed9a5be304fa52cabbb797b56ecfe /noncore/apps
parente64d9e9682e0afefc4fbebe7ba9737e0f86e3ed7 (diff)
downloadopie-532d65f8a45850bfda3c3344a7b165af91e48440.zip
opie-532d65f8a45850bfda3c3344a7b165af91e48440.tar.gz
opie-532d65f8a45850bfda3c3344a7b165af91e48440.tar.bz2
Add newlines, remove unused local variables, remove unused parameters,
add newlines at the end of file...
Diffstat (limited to 'noncore/apps') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/checkbook/traninfo.cpp2
-rw-r--r--noncore/apps/confedit/listviewconfdir.cpp4
-rw-r--r--noncore/apps/confedit/listviewitemconfigentry.cpp8
-rw-r--r--noncore/apps/opie-bartender/bac.cpp1
-rw-r--r--noncore/apps/opie-gutenbrowser/LibraryDialog.cpp2
-rw-r--r--noncore/apps/opie-gutenbrowser/NetworkDialog.cpp2
-rw-r--r--noncore/apps/opie-gutenbrowser/fontDialog.cpp40
-rw-r--r--noncore/apps/opie-gutenbrowser/helpwindow.cpp2
-rw-r--r--noncore/apps/oxygen/kmolelements.cpp36
9 files changed, 48 insertions, 49 deletions
diff --git a/noncore/apps/checkbook/traninfo.cpp b/noncore/apps/checkbook/traninfo.cpp
index 506f567..4833af9 100644
--- a/noncore/apps/checkbook/traninfo.cpp
+++ b/noncore/apps/checkbook/traninfo.cpp
@@ -225,3 +225,3 @@ TranInfo *TranInfoList::findMostRecentByDesc( const QString &desc )
225 } 225 }
226 return(NULL); 226 return(NULL);
227} \ No newline at end of file 227}
diff --git a/noncore/apps/confedit/listviewconfdir.cpp b/noncore/apps/confedit/listviewconfdir.cpp
index 33bffe1..73eaae3 100644
--- a/noncore/apps/confedit/listviewconfdir.cpp
+++ b/noncore/apps/confedit/listviewconfdir.cpp
@@ -52,7 +52,7 @@ void ListViewConfDir::readConfFiles()
52 while ( (fi=it.current()) ) 52 while ( (fi=it.current()) )
53 { 53 {
54 odebug << "opening: >" << fi->fileName().data() << "<" << oendl; 54 odebug << "opening: >" << fi->fileName().data() << "<" << oendl;
55 fileEntry = new ListViewItemConfFile( fi, this ); 55 fileEntry = new ListViewItemConfFile( fi, this );
56 QListViewItem *dummy = new QListViewItem(fileEntry, "dummy"); 56 (void)new QListViewItem(fileEntry, "dummy");
57 ++it; 57 ++it;
58 } 58 }
diff --git a/noncore/apps/confedit/listviewitemconfigentry.cpp b/noncore/apps/confedit/listviewitemconfigentry.cpp
index 0970125..714a154 100644
--- a/noncore/apps/confedit/listviewitemconfigentry.cpp
+++ b/noncore/apps/confedit/listviewitemconfigentry.cpp
@@ -137,7 +137,7 @@ void ListViewItemConfigEntry::save(QTextStream *t)
137void ListViewItemConfigEntry::revert() 137void ListViewItemConfigEntry::revert()
138{ 138{
139 _group = _groupOrig; 139 _group = _groupOrig;
140 _key = _keyOrig; 140 _key = _keyOrig;
141 _value = _valueOrig; 141 _value = _valueOrig;
142 _changed=false; 142 _changed=false;
143 displayText(); 143 displayText();
@@ -148,3 +148,3 @@ void ListViewItemConfigEntry::expand()
148{ 148{
149 149
150} \ No newline at end of file 150}
diff --git a/noncore/apps/opie-bartender/bac.cpp b/noncore/apps/opie-bartender/bac.cpp
index 2e74029..8dc7e88 100644
--- a/noncore/apps/opie-bartender/bac.cpp
+++ b/noncore/apps/opie-bartender/bac.cpp
@@ -135,5 +135,4 @@ void BacDialog::calculate()
135 135
136 float weight,genderDiff, bac, typeDrink=0, drinkOz=0, bodyWater, milliliters, oz, gram, gramsMil, alc, metab, bac1; 136 float weight,genderDiff, bac, typeDrink=0, drinkOz=0, bodyWater, milliliters, oz, gram, gramsMil, alc, metab, bac1;
137 float weightunitDifference, massunitdiff;
138 QString estBac; 137 QString estBac;
139 138
diff --git a/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp b/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp
index 124b6f3..020a116 100644
--- a/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp
+++ b/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp
@@ -36,5 +36,5 @@
36 * The dialog will by default be modeless, unless you set 'modal' to 36 * The dialog will by default be modeless, unless you set 'modal' to
37 * TRUE to construct a modal dialog. */ 37 * TRUE to construct a modal dialog. */
38LibraryDialog::LibraryDialog( QWidget* parent, const char* name , bool modal, WFlags fl ) 38LibraryDialog::LibraryDialog( QWidget* parent, const char* name , bool /*modal*/, WFlags fl )
39 : QDialog( parent, name, true/* modal*/, fl ) 39 : QDialog( parent, name, true/* modal*/, fl )
40{ 40{
diff --git a/noncore/apps/opie-gutenbrowser/NetworkDialog.cpp b/noncore/apps/opie-gutenbrowser/NetworkDialog.cpp
index af14aac..a321952 100644
--- a/noncore/apps/opie-gutenbrowser/NetworkDialog.cpp
+++ b/noncore/apps/opie-gutenbrowser/NetworkDialog.cpp
@@ -41,5 +41,5 @@ QPushButton* buttonCancel;
41static netbuf *conn = NULL; 41static netbuf *conn = NULL;
42 42
43static int log_progress(netbuf *ctl, int xfered, void *arg) { 43static int log_progress(netbuf *, int xfered, void *arg) {
44 int fsz = *(int *)arg; 44 int fsz = *(int *)arg;
45 int pct = (xfered * 100) / fsz; 45 int pct = (xfered * 100) / fsz;
diff --git a/noncore/apps/opie-gutenbrowser/fontDialog.cpp b/noncore/apps/opie-gutenbrowser/fontDialog.cpp
index fa964a6..c6d0fe6 100644
--- a/noncore/apps/opie-gutenbrowser/fontDialog.cpp
+++ b/noncore/apps/opie-gutenbrowser/fontDialog.cpp
@@ -56,5 +56,5 @@ FontDialog::FontDialog( QWidget * parent, const char* name /*, bool modal, WFla
56 FontTextLabel4->setText( tr( "Size" ) ); 56 FontTextLabel4->setText( tr( "Size" ) );
57 hbox->addWidget( FontTextLabel4,0); 57 hbox->addWidget( FontTextLabel4,0);
58 58
59 sizeComboBox = new QComboBox( FALSE, this, "SizeCombo"); 59 sizeComboBox = new QComboBox( FALSE, this, "SizeCombo");
60// sizeComboBox->setMaximumWidth(60); 60// sizeComboBox->setMaximumWidth(60);
@@ -63,5 +63,5 @@ FontDialog::FontDialog( QWidget * parent, const char* name /*, bool modal, WFla
63 vbox->addLayout(hbox,0); 63 vbox->addLayout(hbox,0);
64 layout->addLayout( vbox,0,3); 64 layout->addLayout( vbox,0,3);
65 65
66 MultiLineEdit1 = new QMultiLineEdit( this, "MultiLineEdit1" ); 66 MultiLineEdit1 = new QMultiLineEdit( this, "MultiLineEdit1" );
67 MultiLineEdit1->setText( tr( "The Quick Brown Fox Jumps Over The Lazy Dog" ) ); 67 MultiLineEdit1->setText( tr( "The Quick Brown Fox Jumps Over The Lazy Dog" ) );
@@ -91,15 +91,15 @@ void FontDialog::familyListBoxSlot(const QString & text)
91// clearListBoxes(); 91// clearListBoxes();
92 family = text; 92 family = text;
93// odebug << family << oendl; 93// odebug << family << oendl;
94 QStringList styles = fdb.styles( family ); // string list of styles of our current font family 94 QStringList styles = fdb.styles( family ); // string list of styles of our current font family
95 styleListBox->insertStringList( styles); 95 styleListBox->insertStringList( styles);
96 QString dstyle;// = "\t" + style + " ("; 96 QString dstyle;// = "\t" + style + " (";
97 97
98#ifdef BUGGY_SHARP_ZAURUS 98#ifdef BUGGY_SHARP_ZAURUS
99 99
100QValueList<int> smoothies = fdb.smoothSizes( family, styleListBox->text(0) ); 100QValueList<int> smoothies = fdb.smoothSizes( family, styleListBox->text(0) );
101 for ( QValueList<int>::Iterator points = smoothies.begin(); points != smoothies.end(); ++points ) { 101 for ( QValueList<int>::Iterator points = smoothies.begin(); points != smoothies.end(); ++points ) {
102 dstyle = QString::number( *points ); 102 dstyle = QString::number( *points );
103 odebug << dstyle << oendl; 103 odebug << dstyle << oendl;
104 sizeComboBox->insertItem( dstyle.left( dstyle.length() - 1 )); 104 sizeComboBox->insertItem( dstyle.left( dstyle.length() - 1 ));
105 } 105 }
@@ -114,5 +114,5 @@ QValueList<int> smoothies = fdb.smoothSizes( family, styleListBox->text(0) );
114#endif 114#endif
115 115
116 if(styleInt == -1 || styleInt > styleListBox->count() ) 116 if(styleInt == -1 || styleInt > static_cast<int>(styleListBox->count()) )
117 styleListBox->setCurrentItem(0); 117 styleListBox->setCurrentItem(0);
118 else 118 else
@@ -122,10 +122,10 @@ QValueList<int> smoothies = fdb.smoothSizes( family, styleListBox->text(0) );
122} 122}
123 123
124void FontDialog::styleListBoxSlot(const QString &text) 124void FontDialog::styleListBoxSlot(const QString &)
125{ 125{
126 changeText(); 126 changeText();
127} 127}
128 128
129void FontDialog::sizeComboBoxSlot(const QString & text) 129void FontDialog::sizeComboBoxSlot(const QString &)
130{ 130{
131 changeText(); 131 changeText();
@@ -152,5 +152,5 @@ void FontDialog::populateLists()
152 QString family = *f; 152 QString family = *f;
153// if(family == defaultFont.family()) 153// if(family == defaultFont.family())
154// odebug << family << oendl; 154// odebug << family << oendl;
155 familyListBox->insertItem( family); 155 familyListBox->insertItem( family);
156 156
@@ -175,10 +175,10 @@ void FontDialog::populateLists()
175 } 175 }
176 } 176 }
177 for(int i=0;i < familyListBox->count();i++) { 177 for(uint i=0;i < familyListBox->count();i++) {
178 if( familyListBox->text(i) == familyStr) 178 if( familyListBox->text(i) == familyStr)
179 familyListBox->setSelected( i, TRUE); 179 familyListBox->setSelected( i, TRUE);
180 } 180 }
181 181
182 for(int i=0;i < styleListBox->count();i++) { 182 for(uint i=0;i < styleListBox->count();i++) {
183 if( styleListBox->text(i) == styleStr) 183 if( styleListBox->text(i) == styleStr)
184 styleListBox->setSelected( i, TRUE); 184 styleListBox->setSelected( i, TRUE);
@@ -190,5 +190,5 @@ void FontDialog::populateLists()
190 if(sizeComboBox->text(i) == sizeStr) 190 if(sizeComboBox->text(i) == sizeStr)
191#else 191#else
192 if(fontsize[i] == i_size) 192 if(fontsize[i] == i_size)
193#endif 193#endif
194 sizeComboBox->setCurrentItem(i); 194 sizeComboBox->setCurrentItem(i);
@@ -210,5 +210,5 @@ void FontDialog::changeText()
210 family = familyListBox->currentText(); 210 family = familyListBox->currentText();
211 } 211 }
212// odebug << "Font family is "+family << oendl; 212// odebug << "Font family is "+family << oendl;
213 if( styleListBox->currentItem() == -1) 213 if( styleListBox->currentItem() == -1)
214 style=styleListBox->text(0); 214 style=styleListBox->text(0);
@@ -216,5 +216,5 @@ void FontDialog::changeText()
216 style = styleListBox->currentText(); 216 style = styleListBox->currentText();
217 } 217 }
218// odebug << "font style is "+style << oendl; 218// odebug << "font style is "+style << oendl;
219 219
220 if( sizeComboBox->currentItem() == -1 ) 220 if( sizeComboBox->currentItem() == -1 )
@@ -224,5 +224,5 @@ void FontDialog::changeText()
224 } 224 }
225 225
226// odebug << "Font size is "+size << oendl; 226// odebug << "Font size is "+size << oendl;
227 bool ok; 227 bool ok;
228 int i_size = size.toInt(&ok,10); 228 int i_size = size.toInt(&ok,10);
@@ -232,11 +232,11 @@ void FontDialog::changeText()
232 for ( QStringList::Iterator s = charSetList.begin(); s != charSetList.end();++s ) { // for each font style 232 for ( QStringList::Iterator s = charSetList.begin(); s != charSetList.end();++s ) { // for each font style
233 charSet = *s; 233 charSet = *s;
234// odebug << charSet << oendl; 234// odebug << charSet << oendl;
235 } 235 }
236 selectedFont = fdb.font(family,style,i_size,charSet); 236 selectedFont = fdb.font(family,style,i_size,charSet);
237 QFontInfo fontInfo( selectedFont); 237 QFontInfo fontInfo( selectedFont);
238// if(fontInfo.italic() ) odebug << "italic" << oendl; 238// if(fontInfo.italic() ) odebug << "italic" << oendl;
239 selectedFont.setWeight(fontInfo.weight() ); 239 selectedFont.setWeight(fontInfo.weight() );
240// odebug << "Style are "+style+" " << fontInfo.weight() << " " << oendl; 240// odebug << "Style are "+style+" " << fontInfo.weight() << " " << oendl;
241 Config cfg("Gutenbrowser"); 241 Config cfg("Gutenbrowser");
242 cfg.setGroup("Font"); 242 cfg.setGroup("Font");
@@ -250,5 +250,5 @@ void FontDialog::changeText()
250 selectedFont.setItalic(TRUE); //ya right 250 selectedFont.setItalic(TRUE); //ya right
251 cfg.writeEntry("Italic","TRUE"); 251 cfg.writeEntry("Italic","TRUE");
252// odebug << "Style is "+styleListBox->currentText() << oendl; 252// odebug << "Style is "+styleListBox->currentText() << oendl;
253 } else 253 } else
254 cfg.writeEntry("Italic","FALSE"); 254 cfg.writeEntry("Italic","FALSE");
diff --git a/noncore/apps/opie-gutenbrowser/helpwindow.cpp b/noncore/apps/opie-gutenbrowser/helpwindow.cpp
index e86ca49..ffdc9f0 100644
--- a/noncore/apps/opie-gutenbrowser/helpwindow.cpp
+++ b/noncore/apps/opie-gutenbrowser/helpwindow.cpp
@@ -21,5 +21,5 @@
21#include <ctype.h> 21#include <ctype.h>
22 22
23HelpWindow::HelpWindow( const QString& home_, const QString& _path, QWidget* parent, const char *name ) 23HelpWindow::HelpWindow( const QString& home_, const QString&, QWidget* parent, const char *name )
24 : QMainWindow( parent, name, WDestructiveClose ), pathCombo( 0 ), selectedURL() 24 : QMainWindow( parent, name, WDestructiveClose ), pathCombo( 0 ), selectedURL()
25{ 25{
diff --git a/noncore/apps/oxygen/kmolelements.cpp b/noncore/apps/oxygen/kmolelements.cpp
index ce8f9c1..e76461b 100644
--- a/noncore/apps/oxygen/kmolelements.cpp
+++ b/noncore/apps/oxygen/kmolelements.cpp
@@ -9,8 +9,8 @@
9 9
10#include <stdio.h> 10#include <stdio.h>
11#include "kmolelements.h" 11#include "kmolelements.h"
12 12
13/** 13/**
14 * A generic chemical entity. Can be an element or a group. 14 * A generic chemical entity. Can be an element or a group.
15 */ 15 */
16SubUnit::SubUnit () {} 16SubUnit::SubUnit () {}
@@ -19,5 +19,5 @@ SubUnit::~SubUnit () {}
19 19
20/** 20/**
21 * Construct a subunit and return a pointer to it. The syntax of LINE is 21 * Construct a subunit and return a pointer to it. The syntax of LINE is
22 * the one used in the element definition file. 22 * the one used in the element definition file.
23 */ 23 */
@@ -29,5 +29,5 @@ SubUnit* SubUnit::makeSubUnit(QString line) {
29 str >> weight >> ws; 29 str >> weight >> ws;
30 return new Element(name, weight.toDouble()); 30 return new Element(name, weight.toDouble());
31 } 31 }
32 else { 32 else {
33 str >> grpname; 33 str >> grpname;
@@ -49,10 +49,10 @@ QString SubUnit::getName() const {
49 * Get the molecular weight of THIS, based on the data from ELSTABLE. 49 * Get the molecular weight of THIS, based on the data from ELSTABLE.
50 */ 50 */
51double SubUnit::getWeight(QDict<SubUnit>* elstable) const { 51double SubUnit::getWeight(QDict<SubUnit>* ) const {
52 return -1; 52 return -1;
53} 53}
54 54
55/** 55/**
56 * A group of elements. 56 * A group of elements.
57 */ 57 */
58ElementList::ElementList () { 58ElementList::ElementList () {
@@ -66,5 +66,5 @@ ElementList::~ElementList () {
66 66
67/** 67/**
68 * A group of elements. 68 * A group of elements.
69 */ 69 */
70ElementList::ElementList (QString name) { 70ElementList::ElementList (QString name) {
@@ -81,5 +81,5 @@ void ElementList::writeOut(QString& line) {
81 ElementCoef* current = elements->first(); 81 ElementCoef* current = elements->first();
82 while (current != 0) { 82 while (current != 0) {
83 line += " " + current->name + " " + coef.setNum(current->coef, 'g', 10); 83 line += " " + current->name + " " + coef.setNum(current->coef, 'g', 10);
84 // precision set to 10 digits 84 // precision set to 10 digits
85 current = elements->next(); 85 current = elements->next();
@@ -104,5 +104,5 @@ double ElementList::getWeight(QDict<SubUnit>* elstable) const {
104 104
105/** 105/**
106 * Return a string representing the elemental composition of THIS, as 106 * Return a string representing the elemental composition of THIS, as
107 * a tab-separated element - percentage pairs, separated by newlines. 107 * a tab-separated element - percentage pairs, separated by newlines.
108 */ 108 */
@@ -115,8 +115,8 @@ QString ElementList::getEA(QDict<SubUnit>* elstable, double mw) const {
115 SubUnit* e = elstable->find(current->name); 115 SubUnit* e = elstable->find(current->name);
116 if (e != 0) { 116 if (e != 0) {
117 double current_percent = 100 * (current->coef) * 117 double current_percent = 100 * (current->coef) *
118 (e->getWeight(elstable)) 118 (e->getWeight(elstable))
119 / mw; 119 / mw;
120 ea += current->name + "\t" + 120 ea += current->name + "\t" +
121 temp.setNum(current_percent) + "\n"; 121 temp.setNum(current_percent) + "\n";
122 } else return QString("ERROR!\n"); //ERROR 122 } else return QString("ERROR!\n"); //ERROR
@@ -125,5 +125,5 @@ QString ElementList::getEA(QDict<SubUnit>* elstable, double mw) const {
125 return ea; 125 return ea;
126} 126}
127 127
128/** 128/**
129 * Return a string representing THIS as an empirical chemical formula. 129 * Return a string representing THIS as an empirical chemical formula.
@@ -163,5 +163,5 @@ void ElementList::addTo(ElementList& els, double coef) {
163 163
164/** 164/**
165 * Add an element to THIS, with a coefficient COEF. If THIS already contains 165 * Add an element to THIS, with a coefficient COEF. If THIS already contains
166 * an element with the same name, adjust its coefficient only; if not, create 166 * an element with the same name, adjust its coefficient only; if not, create
167 * a new ElementCoef pair and add to THIS. 167 * a new ElementCoef pair and add to THIS.
@@ -185,5 +185,5 @@ bool ElementList::contains(const QString& name) {
185 ElementCoef* current = elements->first(); 185 ElementCoef* current = elements->first();
186 while (current != 0) { 186 while (current != 0) {
187 if (current->name == name) 187 if (current->name == name)
188 return true; 188 return true;
189 current = elements->next(); 189 current = elements->next();
@@ -203,5 +203,5 @@ QString ElementList::getName() const {
203 * A chemical element. 203 * A chemical element.
204 */ 204 */
205Element::Element(const QString& n, double w) 205Element::Element(const QString& n, double w)
206 : weight(w), name(n) { } 206 : weight(w), name(n) { }
207 207
@@ -219,5 +219,5 @@ void Element::writeOut(QString& line) {
219} 219}
220 220
221double Element::getWeight(QDict<SubUnit>* elstable) const { 221double Element::getWeight(QDict<SubUnit>* ) const {
222 return weight; 222 return weight;
223} 223}
@@ -232,5 +232,5 @@ QString Element::getName() const {
232 232
233/** 233/**
234 * An element - coefficient pair. Used to represent elements within an 234 * An element - coefficient pair. Used to represent elements within an
235 * element list. 235 * element list.
236 */ 236 */