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) (show whitespace changes)
-rw-r--r--noncore/apps/checkbook/traninfo.cpp0
-rw-r--r--noncore/apps/confedit/listviewconfdir.cpp2
-rw-r--r--noncore/apps/confedit/listviewitemconfigentry.cpp0
-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.cpp10
-rw-r--r--noncore/apps/opie-gutenbrowser/helpwindow.cpp2
-rw-r--r--noncore/apps/oxygen/kmolelements.cpp4
9 files changed, 11 insertions, 12 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
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
@@ -44,22 +44,22 @@ void ListViewConfDir::readConfFiles()
44 confDir.setSorting( QDir::Name ); 44 confDir.setSorting( QDir::Name );
45 confDir.setNameFilter("*.conf"); 45 confDir.setNameFilter("*.conf");
46 const QFileInfoList *list = confDir.entryInfoList(); 46 const QFileInfoList *list = confDir.entryInfoList();
47 QFileInfoListIterator it( *list ); 47 QFileInfoListIterator it( *list );
48 QFileInfo *fi; 48 QFileInfo *fi;
49 49
50 ListViewItemConfFile *fileEntry; 50 ListViewItemConfFile *fileEntry;
51 51
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 }
59} 59}
60 60
61void ListViewConfDir::expand(QListViewItem *item) 61void ListViewConfDir::expand(QListViewItem *item)
62{ 62{
63 ((ListViewItemConf*)item)->expand(); 63 ((ListViewItemConf*)item)->expand();
64} 64}
65 65
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
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
@@ -125,25 +125,24 @@ BacDialog::BacDialog( QWidget* parent, const char* name, bool modal, WFlags fl
125 125
126 Layout7->addWidget( LCDNumber1 ); 126 Layout7->addWidget( LCDNumber1 );
127 NumberSpinBox->setFocus(); 127 NumberSpinBox->setFocus();
128} 128}
129 129
130BacDialog::~BacDialog() 130BacDialog::~BacDialog()
131{} 131{}
132 132
133void BacDialog::calculate() 133void BacDialog::calculate()
134{ 134{
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
140 if( GenderComboBox->currentItem()==0) 139 if( GenderComboBox->currentItem()==0)
141 genderDiff = .58; 140 genderDiff = .58;
142 else 141 else
143 genderDiff = .49; 142 genderDiff = .49;
144 143
145 switch(TypeDrinkComboBox->currentItem()) { 144 switch(TypeDrinkComboBox->currentItem()) {
146 case 0: { //beer 145 case 0: { //beer
147 typeDrink = .045; 146 typeDrink = .045;
148 drinkOz = 12; 147 drinkOz = 12;
149 } 148 }
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
@@ -26,25 +26,25 @@
26#include <qpushbutton.h> 26#include <qpushbutton.h>
27#include <qmultilineedit.h> 27#include <qmultilineedit.h>
28//#include <qlayout.h> 28//#include <qlayout.h>
29 29
30/* STD */ 30/* STD */
31#include <unistd.h> 31#include <unistd.h>
32#include <stdio.h> 32#include <stdio.h>
33#include <stdlib.h> 33#include <stdlib.h>
34 34
35/* 35/*
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{
41 if ( !name ) 41 if ( !name )
42 setName( "LibraryDialog" ); 42 setName( "LibraryDialog" );
43 indexLoaded=false; 43 indexLoaded=false;
44 initDialog(); 44 initDialog();
45 45
46 // this->setMaximumWidth(240); 46 // this->setMaximumWidth(240);
47 47
48 index = "GUTINDEX.ALL"; 48 index = "GUTINDEX.ALL";
49 local_library = (QDir::homeDirPath ()) +"/Applications/gutenbrowser/"; 49 local_library = (QDir::homeDirPath ()) +"/Applications/gutenbrowser/";
50 local_index = local_library + index; 50 local_index = local_library + index;
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
@@ -31,25 +31,25 @@
31#include <qlayout.h> 31#include <qlayout.h>
32 32
33/* STD */ 33/* STD */
34#include <unistd.h> 34#include <unistd.h>
35extern "C" { 35extern "C" {
36#include <ftplib.h> 36#include <ftplib.h>
37} 37}
38 38
39QProgressBar* ProgressBar1; 39QProgressBar* ProgressBar1;
40QPushButton* buttonCancel; 40QPushButton* 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;
46 printf("%3d%%\r", pct); 46 printf("%3d%%\r", pct);
47 fflush(stdout); 47 fflush(stdout);
48 ProgressBar1->setProgress(xfered); 48 ProgressBar1->setProgress(xfered);
49 qApp->processEvents(); 49 qApp->processEvents();
50 50
51 return 1; 51 return 1;
52} 52}
53 53
54NetworkDialog::NetworkDialog( QWidget* parent, const char* name, bool modal, WFlags fl, const QStringList netL) 54NetworkDialog::NetworkDialog( QWidget* parent, const char* name, bool modal, WFlags fl, const QStringList netL)
55 : QDialog( parent, name, modal, fl ) 55 : QDialog( parent, name, modal, fl )
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
@@ -104,38 +104,38 @@ QValueList<int> smoothies = fdb.smoothSizes( family, styleListBox->text(0) );
104 sizeComboBox->insertItem( dstyle.left( dstyle.length() - 1 )); 104 sizeComboBox->insertItem( dstyle.left( dstyle.length() - 1 ));
105 } 105 }
106#else 106#else
107 107
108 for (int i=0; i<nfontsizes; i++) { 108 for (int i=0; i<nfontsizes; i++) {
109 sizeComboBox->insertItem( QString::number(fontsize[i])); 109 sizeComboBox->insertItem( QString::number(fontsize[i]));
110 if(fontsize[i] == sizeInt) { 110 if(fontsize[i] == sizeInt) {
111 sizeComboBox->setCurrentItem(i); 111 sizeComboBox->setCurrentItem(i);
112 } 112 }
113 } 113 }
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
119 styleListBox->setCurrentItem(styleInt); 119 styleListBox->setCurrentItem(styleInt);
120 120
121 changeText(); 121 changeText();
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();
132} 132}
133 133
134void FontDialog::populateLists() 134void FontDialog::populateLists()
135{ 135{
136// QFont defaultFont=MultiLineEdit1->font(); 136// QFont defaultFont=MultiLineEdit1->font();
137// QFont defaultFont=Lview->font(); 137// QFont defaultFont=Lview->font();
138// QFontInfo fontInfo(defaultFont); 138// QFontInfo fontInfo(defaultFont);
139 Config config("Gutenbrowser"); 139 Config config("Gutenbrowser");
140 config.setGroup("Font"); 140 config.setGroup("Font");
141 QString familyStr = config.readEntry("Family", "fixed"); 141 QString familyStr = config.readEntry("Family", "fixed");
@@ -165,30 +165,30 @@ void FontDialog::populateLists()
165 if(styleListBox->text(0) == style) { 165 if(styleListBox->text(0) == style) {
166 166
167 QValueList<int> smoothies = fdb.smoothSizes( family, style ); 167 QValueList<int> smoothies = fdb.smoothSizes( family, style );
168 for ( QValueList<int>::Iterator points = smoothies.begin(); points != smoothies.end(); ++points ) { 168 for ( QValueList<int>::Iterator points = smoothies.begin(); points != smoothies.end(); ++points ) {
169 dstyle = QString::number( *points ) + " "; 169 dstyle = QString::number( *points ) + " ";
170 sizeComboBox ->insertItem( dstyle.left( dstyle.length() - 1 )); 170 sizeComboBox ->insertItem( dstyle.left( dstyle.length() - 1 ));
171 } 171 }
172 dstyle = dstyle.left( dstyle.length() - 1 ) + ")"; 172 dstyle = dstyle.left( dstyle.length() - 1 ) + ")";
173 } 173 }
174 } // styles 174 } // styles
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);
185 } 185 }
186 186
187 for (int i=0; i<sizeComboBox->count(); i++) { 187 for (int i=0; i<sizeComboBox->count(); i++) {
188 188
189#ifdef BUGGY_SHARP_ZAURUS 189#ifdef BUGGY_SHARP_ZAURUS
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);
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
@@ -11,25 +11,25 @@
11*****************************************************************************/ 11*****************************************************************************/
12 12
13#include "helpwindow.h" 13#include "helpwindow.h"
14#include <qstatusbar.h> 14#include <qstatusbar.h>
15 15
16#include <qmenubar.h> 16#include <qmenubar.h>
17#include <qtoolbar.h> 17#include <qtoolbar.h>
18#include <qtoolbutton.h> 18#include <qtoolbutton.h>
19#include <qcombobox.h> 19#include <qcombobox.h>
20 20
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{
26 QString local_library = (QDir::homeDirPath ()) +"/Applications/gutenbrowser/"; 26 QString local_library = (QDir::homeDirPath ()) +"/Applications/gutenbrowser/";
27// readHistory(); 27// readHistory();
28// readBookmarks(); 28// readBookmarks();
29 29
30 browser = new QTextBrowser( this ); 30 browser = new QTextBrowser( this );
31 QStringList Strlist; 31 QStringList Strlist;
32 Strlist.append( home_); 32 Strlist.append( home_);
33 browser->mimeSourceFactory()->setFilePath( Strlist ); 33 browser->mimeSourceFactory()->setFilePath( Strlist );
34 34
35 browser->setFrameStyle( QFrame::Panel | QFrame::Sunken ); 35 browser->setFrameStyle( QFrame::Panel | QFrame::Sunken );
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
@@ -39,25 +39,25 @@ SubUnit* SubUnit::makeSubUnit(QString line) {
39 } 39 }
40 return els; 40 return els;
41 } 41 }
42} 42}
43 43
44QString SubUnit::getName() const { 44QString SubUnit::getName() const {
45 return QString("None"); 45 return QString("None");
46} 46}
47 47
48/** 48/**
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 () {
59 elements = new QList<ElementCoef>; 59 elements = new QList<ElementCoef>;
60} 60}
61 61
62ElementList::~ElementList () { 62ElementList::~ElementList () {
63 delete elements; 63 delete elements;
@@ -209,25 +209,25 @@ Element::Element(const QString& n, double w)
209Element::~Element() { 209Element::~Element() {
210} 210}
211 211
212 212
213/** 213/**
214 * Write THIS to LINE, in a format suitable for the element definition file. 214 * Write THIS to LINE, in a format suitable for the element definition file.
215 */ 215 */
216void Element::writeOut(QString& line) { 216void Element::writeOut(QString& line) {
217 line.setNum(weight); 217 line.setNum(weight);
218 line = name + " " + line; 218 line = name + " " + 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}
224 224
225void Element::addTo(ElementList& els, double coef) { 225void Element::addTo(ElementList& els, double coef) {
226 els.addElement(name, coef); 226 els.addElement(name, coef);
227} 227}
228 228
229QString Element::getName() const { 229QString Element::getName() const {
230 return name; 230 return name;
231} 231}
232 232
233/** 233/**