author | zecke <zecke> | 2004-09-10 11:11:23 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-09-10 11:11:23 (UTC) |
commit | 532d65f8a45850bfda3c3344a7b165af91e48440 (patch) (side-by-side diff) | |
tree | cbda2467001ed9a5be304fa52cabbb797b56ecfe | |
parent | e64d9e9682e0afefc4fbebe7ba9737e0f86e3ed7 (diff) | |
download | opie-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...
-rw-r--r-- | noncore/apps/checkbook/traninfo.cpp | 2 | ||||
-rw-r--r-- | noncore/apps/confedit/listviewconfdir.cpp | 4 | ||||
-rw-r--r-- | noncore/apps/confedit/listviewitemconfigentry.cpp | 8 | ||||
-rw-r--r-- | noncore/apps/opie-bartender/bac.cpp | 1 | ||||
-rw-r--r-- | noncore/apps/opie-gutenbrowser/LibraryDialog.cpp | 2 | ||||
-rw-r--r-- | noncore/apps/opie-gutenbrowser/NetworkDialog.cpp | 2 | ||||
-rw-r--r-- | noncore/apps/opie-gutenbrowser/fontDialog.cpp | 40 | ||||
-rw-r--r-- | noncore/apps/opie-gutenbrowser/helpwindow.cpp | 2 | ||||
-rw-r--r-- | noncore/apps/oxygen/kmolelements.cpp | 36 |
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 @@ -226,2 +226,2 @@ TranInfo *TranInfoList::findMostRecentByDesc( const QString &desc ) return(NULL); -}
\ No newline at end of file +} 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 @@ -53,5 +53,5 @@ void ListViewConfDir::readConfFiles() { - odebug << "opening: >" << fi->fileName().data() << "<" << oendl; + odebug << "opening: >" << fi->fileName().data() << "<" << oendl; fileEntry = new ListViewItemConfFile( fi, this ); - QListViewItem *dummy = new QListViewItem(fileEntry, "dummy"); + (void)new QListViewItem(fileEntry, "dummy"); ++it; 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 @@ -138,5 +138,5 @@ void ListViewItemConfigEntry::revert() { - _group = _groupOrig; - _key = _keyOrig; - _value = _valueOrig; + _group = _groupOrig; + _key = _keyOrig; + _value = _valueOrig; _changed=false; @@ -149,2 +149,2 @@ void ListViewItemConfigEntry::expand() -}
\ No newline at end of file +} 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 @@ -136,3 +136,2 @@ void BacDialog::calculate() float weight,genderDiff, bac, typeDrink=0, drinkOz=0, bodyWater, milliliters, oz, gram, gramsMil, alc, metab, bac1; - float weightunitDifference, massunitdiff; QString estBac; 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 @@ -37,3 +37,3 @@ * TRUE to construct a modal dialog. */ -LibraryDialog::LibraryDialog( QWidget* parent, const char* name , bool modal, WFlags fl ) +LibraryDialog::LibraryDialog( QWidget* parent, const char* name , bool /*modal*/, WFlags fl ) : QDialog( parent, name, true/* modal*/, fl ) 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 @@ -42,3 +42,3 @@ static netbuf *conn = NULL; -static int log_progress(netbuf *ctl, int xfered, void *arg) { +static int log_progress(netbuf *, int xfered, void *arg) { int fsz = *(int *)arg; 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 @@ -57,3 +57,3 @@ FontDialog::FontDialog( QWidget * parent, const char* name /*, bool modal, WFla hbox->addWidget( FontTextLabel4,0); - + sizeComboBox = new QComboBox( FALSE, this, "SizeCombo"); @@ -64,3 +64,3 @@ FontDialog::FontDialog( QWidget * parent, const char* name /*, bool modal, WFla layout->addLayout( vbox,0,3); - + MultiLineEdit1 = new QMultiLineEdit( this, "MultiLineEdit1" ); @@ -92,3 +92,3 @@ void FontDialog::familyListBoxSlot(const QString & text) family = text; -// odebug << family << oendl; +// odebug << family << oendl; QStringList styles = fdb.styles( family ); // string list of styles of our current font family @@ -97,3 +97,3 @@ void FontDialog::familyListBoxSlot(const QString & text) -#ifdef BUGGY_SHARP_ZAURUS +#ifdef BUGGY_SHARP_ZAURUS @@ -102,3 +102,3 @@ QValueList<int> smoothies = fdb.smoothSizes( family, styleListBox->text(0) ); dstyle = QString::number( *points ); - odebug << dstyle << oendl; + odebug << dstyle << oendl; sizeComboBox->insertItem( dstyle.left( dstyle.length() - 1 )); @@ -115,3 +115,3 @@ QValueList<int> smoothies = fdb.smoothSizes( family, styleListBox->text(0) ); - if(styleInt == -1 || styleInt > styleListBox->count() ) + if(styleInt == -1 || styleInt > static_cast<int>(styleListBox->count()) ) styleListBox->setCurrentItem(0); @@ -123,3 +123,3 @@ QValueList<int> smoothies = fdb.smoothSizes( family, styleListBox->text(0) ); -void FontDialog::styleListBoxSlot(const QString &text) +void FontDialog::styleListBoxSlot(const QString &) { @@ -128,3 +128,3 @@ void FontDialog::styleListBoxSlot(const QString &text) -void FontDialog::sizeComboBoxSlot(const QString & text) +void FontDialog::sizeComboBoxSlot(const QString &) { @@ -153,3 +153,3 @@ void FontDialog::populateLists() // if(family == defaultFont.family()) -// odebug << family << oendl; +// odebug << family << oendl; familyListBox->insertItem( family); @@ -176,3 +176,3 @@ void FontDialog::populateLists() } - for(int i=0;i < familyListBox->count();i++) { + for(uint i=0;i < familyListBox->count();i++) { if( familyListBox->text(i) == familyStr) @@ -181,3 +181,3 @@ void FontDialog::populateLists() - for(int i=0;i < styleListBox->count();i++) { + for(uint i=0;i < styleListBox->count();i++) { if( styleListBox->text(i) == styleStr) @@ -191,3 +191,3 @@ void FontDialog::populateLists() #else - if(fontsize[i] == i_size) + if(fontsize[i] == i_size) #endif @@ -211,3 +211,3 @@ void FontDialog::changeText() } -// odebug << "Font family is "+family << oendl; +// odebug << "Font family is "+family << oendl; if( styleListBox->currentItem() == -1) @@ -217,3 +217,3 @@ void FontDialog::changeText() } -// odebug << "font style is "+style << oendl; +// odebug << "font style is "+style << oendl; @@ -225,3 +225,3 @@ void FontDialog::changeText() -// odebug << "Font size is "+size << oendl; +// odebug << "Font size is "+size << oendl; bool ok; @@ -233,3 +233,3 @@ void FontDialog::changeText() charSet = *s; -// odebug << charSet << oendl; +// odebug << charSet << oendl; } @@ -237,5 +237,5 @@ void FontDialog::changeText() QFontInfo fontInfo( selectedFont); -// if(fontInfo.italic() ) odebug << "italic" << oendl; - selectedFont.setWeight(fontInfo.weight() ); -// odebug << "Style are "+style+" " << fontInfo.weight() << " " << oendl; +// if(fontInfo.italic() ) odebug << "italic" << oendl; + selectedFont.setWeight(fontInfo.weight() ); +// odebug << "Style are "+style+" " << fontInfo.weight() << " " << oendl; Config cfg("Gutenbrowser"); @@ -251,3 +251,3 @@ void FontDialog::changeText() cfg.writeEntry("Italic","TRUE"); -// odebug << "Style is "+styleListBox->currentText() << oendl; +// odebug << "Style is "+styleListBox->currentText() << oendl; } else 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 @@ -22,3 +22,3 @@ -HelpWindow::HelpWindow( const QString& home_, const QString& _path, QWidget* parent, const char *name ) +HelpWindow::HelpWindow( const QString& home_, const QString&, QWidget* parent, const char *name ) : QMainWindow( parent, name, WDestructiveClose ), pathCombo( 0 ), selectedURL() 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 @@ -10,6 +10,6 @@ #include <stdio.h> -#include "kmolelements.h" +#include "kmolelements.h" /** - * A generic chemical entity. Can be an element or a group. + * A generic chemical entity. Can be an element or a group. */ @@ -20,3 +20,3 @@ SubUnit::~SubUnit () {} /** - * Construct a subunit and return a pointer to it. The syntax of LINE is + * Construct a subunit and return a pointer to it. The syntax of LINE is * the one used in the element definition file. @@ -30,3 +30,3 @@ SubUnit* SubUnit::makeSubUnit(QString line) { return new Element(name, weight.toDouble()); - } + } else { @@ -50,3 +50,3 @@ QString SubUnit::getName() const { */ -double SubUnit::getWeight(QDict<SubUnit>* elstable) const { +double SubUnit::getWeight(QDict<SubUnit>* ) const { return -1; @@ -55,3 +55,3 @@ double SubUnit::getWeight(QDict<SubUnit>* elstable) const { /** - * A group of elements. + * A group of elements. */ @@ -67,3 +67,3 @@ ElementList::~ElementList () { /** - * A group of elements. + * A group of elements. */ @@ -82,3 +82,3 @@ void ElementList::writeOut(QString& line) { while (current != 0) { - line += " " + current->name + " " + coef.setNum(current->coef, 'g', 10); + line += " " + current->name + " " + coef.setNum(current->coef, 'g', 10); // precision set to 10 digits @@ -105,3 +105,3 @@ double ElementList::getWeight(QDict<SubUnit>* elstable) const { /** - * Return a string representing the elemental composition of THIS, as + * Return a string representing the elemental composition of THIS, as * a tab-separated element - percentage pairs, separated by newlines. @@ -116,6 +116,6 @@ QString ElementList::getEA(QDict<SubUnit>* elstable, double mw) const { if (e != 0) { - double current_percent = 100 * (current->coef) * - (e->getWeight(elstable)) + double current_percent = 100 * (current->coef) * + (e->getWeight(elstable)) / mw; - ea += current->name + "\t" + + ea += current->name + "\t" + temp.setNum(current_percent) + "\n"; @@ -126,3 +126,3 @@ QString ElementList::getEA(QDict<SubUnit>* elstable, double mw) const { } - + /** @@ -164,3 +164,3 @@ void ElementList::addTo(ElementList& els, double coef) { /** - * Add an element to THIS, with a coefficient COEF. If THIS already contains + * Add an element to THIS, with a coefficient COEF. If THIS already contains * an element with the same name, adjust its coefficient only; if not, create @@ -186,3 +186,3 @@ bool ElementList::contains(const QString& name) { while (current != 0) { - if (current->name == name) + if (current->name == name) return true; @@ -204,3 +204,3 @@ QString ElementList::getName() const { */ -Element::Element(const QString& n, double w) +Element::Element(const QString& n, double w) : weight(w), name(n) { } @@ -220,3 +220,3 @@ void Element::writeOut(QString& line) { -double Element::getWeight(QDict<SubUnit>* elstable) const { +double Element::getWeight(QDict<SubUnit>* ) const { return weight; @@ -233,3 +233,3 @@ QString Element::getName() const { /** - * An element - coefficient pair. Used to represent elements within an + * An element - coefficient pair. Used to represent elements within an * element list. |