summaryrefslogtreecommitdiff
authorzecke <zecke>2004-09-10 11:11:23 (UTC)
committer zecke <zecke>2004-09-10 11:11:23 (UTC)
commit532d65f8a45850bfda3c3344a7b165af91e48440 (patch) (side-by-side diff)
treecbda2467001ed9a5be304fa52cabbb797b56ecfe
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 (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
@@ -32,34 +32,34 @@ ListViewConfDir::ListViewConfDir(QString settingsPath, QWidget *parent, const ch
connect( this, SIGNAL(expanded(QListViewItem*)), SLOT(expand(QListViewItem*)));
}
ListViewConfDir::~ListViewConfDir()
{
}
void ListViewConfDir::readConfFiles()
{
confDir.setFilter( QDir::Files | QDir::NoSymLinks );
confDir.setSorting( QDir::Name );
confDir.setNameFilter("*.conf");
const QFileInfoList *list = confDir.entryInfoList();
QFileInfoListIterator it( *list );
QFileInfo *fi;
ListViewItemConfFile *fileEntry;
while ( (fi=it.current()) )
{
odebug << "opening: >" << fi->fileName().data() << "<" << oendl;
fileEntry = new ListViewItemConfFile( fi, this );
- QListViewItem *dummy = new QListViewItem(fileEntry, "dummy");
+ (void)new QListViewItem(fileEntry, "dummy");
++it;
}
}
void ListViewConfDir::expand(QListViewItem *item)
{
((ListViewItemConf*)item)->expand();
}
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
@@ -113,49 +113,48 @@ BacDialog::BacDialog( QWidget* parent, const char* name, bool modal, WFlags fl
LCDNumber1 = new QLCDNumber( this, "LCDNumber1" );
LCDNumber1->setMaximumHeight( 50);
LCDNumber1->setNumDigits(6);
LCDNumber1->setSmallDecimalPoint(TRUE);
LCDNumber1->setFrameStyle(QFrame::Box);
LCDNumber1->setLineWidth(2);
LCDNumber1->setSegmentStyle( QLCDNumber::Filled);
QPalette palette = LCDNumber1->palette();
palette.setColor(QPalette::Normal, QColorGroup::Foreground, Qt::red);
palette.setColor(QPalette::Normal, QColorGroup::Light, Qt::black);
palette.setColor(QPalette::Normal, QColorGroup::Dark, Qt::darkGreen);
LCDNumber1->setPalette(palette);
Layout7->addWidget( LCDNumber1 );
NumberSpinBox->setFocus();
}
BacDialog::~BacDialog()
{}
void BacDialog::calculate()
{
float weight,genderDiff, bac, typeDrink=0, drinkOz=0, bodyWater, milliliters, oz, gram, gramsMil, alc, metab, bac1;
- float weightunitDifference, massunitdiff;
QString estBac;
if( GenderComboBox->currentItem()==0)
genderDiff = .58;
else
genderDiff = .49;
switch(TypeDrinkComboBox->currentItem()) {
case 0: { //beer
typeDrink = .045;
drinkOz = 12;
}
break;
case 1: {
typeDrink = .2;
drinkOz = 4;
}
break;
case 2: {
typeDrink = .5;
drinkOz = 1.5;
}
break;
};
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
@@ -14,49 +14,49 @@
//ftp://ibiblio.org/pub/docs/books/gutenberg/GUTINDEX.ALL
#include "LibraryDialog.h"
#include "output.h"
/* OPIE */
#include <qpe/applnk.h>
#include <qpe/qpeapplication.h>
#include <qpe/qpedialog.h>
#include <opie2/odebug.h>
/* QT */
#include <qpushbutton.h>
#include <qmultilineedit.h>
//#include <qlayout.h>
/* STD */
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
/*
* The dialog will by default be modeless, unless you set 'modal' to
* 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 )
{
if ( !name )
setName( "LibraryDialog" );
indexLoaded=false;
initDialog();
// this->setMaximumWidth(240);
index = "GUTINDEX.ALL";
local_library = (QDir::homeDirPath ()) +"/Applications/gutenbrowser/";
local_index = local_library + index;
QString iniFile ;
iniFile = QPEApplication::qpeDir()+"/etc/gutenbrowser/gutenbrowserrc";
new_index =QPEApplication::qpeDir()+"/etc/gutenbrowser/PGWHOLE.TXT";
old_index = QPEApplication::qpeDir()+"/etc/gutenbrowser/GUTINDEX.ALL";
// old_index = QPEApplication::qpeDir()+"etc/gutenbrowser/GUTINDEX.ALL";
// iniFile = local_library+"gutenbrowserrc";
// new_index = local_library + "PGWHOLE.TXT";
// old_index = local_library + "GUTINDEX.ALL";
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
@@ -19,49 +19,49 @@
#include <opie2/odebug.h>
/* QT */
#include <qprogressbar.h>
#include <qstringlist.h>
#include <qpe/config.h>
#include <qvaluelist.h>
#include <qapplication.h>
#include <qfile.h>
#include <qstringlist.h>
#include <qlabel.h>
#include <qpushbutton.h>
#include <qlayout.h>
/* STD */
#include <unistd.h>
extern "C" {
#include <ftplib.h>
}
QProgressBar* ProgressBar1;
QPushButton* buttonCancel;
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;
int pct = (xfered * 100) / fsz;
printf("%3d%%\r", pct);
fflush(stdout);
ProgressBar1->setProgress(xfered);
qApp->processEvents();
return 1;
}
NetworkDialog::NetworkDialog( QWidget* parent, const char* name, bool modal, WFlags fl, const QStringList netL)
: QDialog( parent, name, modal, fl )
{
ftp_host = netL[0];
networkUrl = strUrl = netL[0];
dir = ftp_base_dir = netL[1];
localFileName = netL[2];
s_partialFileName = netL[3];
resize(240,120);
local_library = (QDir::homeDirPath ()) +"/Applications/gutenbrowser/";
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
@@ -92,115 +92,115 @@ void FontDialog::familyListBoxSlot(const QString & text)
family = text;
// odebug << family << oendl;
QStringList styles = fdb.styles( family ); // string list of styles of our current font family
styleListBox->insertStringList( styles);
QString dstyle;// = "\t" + style + " (";
#ifdef BUGGY_SHARP_ZAURUS
QValueList<int> smoothies = fdb.smoothSizes( family, styleListBox->text(0) );
for ( QValueList<int>::Iterator points = smoothies.begin(); points != smoothies.end(); ++points ) {
dstyle = QString::number( *points );
odebug << dstyle << oendl;
sizeComboBox->insertItem( dstyle.left( dstyle.length() - 1 ));
}
#else
for (int i=0; i<nfontsizes; i++) {
sizeComboBox->insertItem( QString::number(fontsize[i]));
if(fontsize[i] == sizeInt) {
sizeComboBox->setCurrentItem(i);
}
}
#endif
- if(styleInt == -1 || styleInt > styleListBox->count() )
+ if(styleInt == -1 || styleInt > static_cast<int>(styleListBox->count()) )
styleListBox->setCurrentItem(0);
else
styleListBox->setCurrentItem(styleInt);
changeText();
}
-void FontDialog::styleListBoxSlot(const QString &text)
+void FontDialog::styleListBoxSlot(const QString &)
{
changeText();
}
-void FontDialog::sizeComboBoxSlot(const QString & text)
+void FontDialog::sizeComboBoxSlot(const QString &)
{
changeText();
}
void FontDialog::populateLists()
{
// QFont defaultFont=MultiLineEdit1->font();
// QFont defaultFont=Lview->font();
// QFontInfo fontInfo(defaultFont);
Config config("Gutenbrowser");
config.setGroup("Font");
QString familyStr = config.readEntry("Family", "fixed");
QString styleStr = config.readEntry("Style", "Regular");
QString sizeStr = config.readEntry("Size", "10");
QString charSetStr = config.readEntry("CharSet", "iso10646-1" );
bool ok;
int i_size = sizeStr.toInt(&ok,10);
selectedFont = fdb.font(familyStr,styleStr,i_size,charSetStr);
// defaultFont.setItalic(TRUE);
families = fdb.families();
for ( QStringList::Iterator f = families.begin(); f != families.end();++f ) {
QString family = *f;
// if(family == defaultFont.family())
// odebug << family << oendl;
familyListBox->insertItem( family);
if( familyListBox->text(0) == family) {
QStringList styles = fdb.styles( family );
// string list of styles of our current font family
styleListBox->insertStringList( styles);
for ( QStringList::Iterator s = styles.begin(); s != styles.end();++s ) { // for each font style
style = *s;
QString dstyle;// = "\t" + style + " (";
if(styleListBox->text(0) == style) {
QValueList<int> smoothies = fdb.smoothSizes( family, style );
for ( QValueList<int>::Iterator points = smoothies.begin(); points != smoothies.end(); ++points ) {
dstyle = QString::number( *points ) + " ";
sizeComboBox ->insertItem( dstyle.left( dstyle.length() - 1 ));
}
dstyle = dstyle.left( dstyle.length() - 1 ) + ")";
}
} // styles
}
}
- for(int i=0;i < familyListBox->count();i++) {
+ for(uint i=0;i < familyListBox->count();i++) {
if( familyListBox->text(i) == familyStr)
familyListBox->setSelected( i, TRUE);
}
- for(int i=0;i < styleListBox->count();i++) {
+ for(uint i=0;i < styleListBox->count();i++) {
if( styleListBox->text(i) == styleStr)
styleListBox->setSelected( i, TRUE);
}
for (int i=0; i<sizeComboBox->count(); i++) {
#ifdef BUGGY_SHARP_ZAURUS
if(sizeComboBox->text(i) == sizeStr)
#else
if(fontsize[i] == i_size)
#endif
sizeComboBox->setCurrentItem(i);
}
changeText();
}
void FontDialog::clearListBoxes() {
familyListBox->clear();
sizeComboBox->clear();
styleListBox->clear();
}
void FontDialog::changeText()
{
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
@@ -1,47 +1,47 @@
/****************************************************************************
** $Id$
**
** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
**
** This file is part of an example program for Qt. This example
** program may be used, distributed and modified without limitation.
**
copyright : (C) 2000 -2004 by llornkcor
email : ljp@llornkcor.com
*****************************************************************************/
#include "helpwindow.h"
#include <qstatusbar.h>
#include <qmenubar.h>
#include <qtoolbar.h>
#include <qtoolbutton.h>
#include <qcombobox.h>
#include <ctype.h>
-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()
{
QString local_library = (QDir::homeDirPath ()) +"/Applications/gutenbrowser/";
// readHistory();
// readBookmarks();
browser = new QTextBrowser( this );
QStringList Strlist;
Strlist.append( home_);
browser->mimeSourceFactory()->setFilePath( Strlist );
browser->setFrameStyle( QFrame::Panel | QFrame::Sunken );
connect(browser,SIGNAL(textChanged()),this,SLOT(textChanged()));
setCentralWidget( browser );
if ( !home_.isEmpty() )
////////////////////////////////
browser->setSource( home_ );
////////////////////////////////
connect( browser, SIGNAL( highlighted( const QString&) ),
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
@@ -27,49 +27,49 @@ SubUnit* SubUnit::makeSubUnit(QString line) {
str >> name;
if (name != "-group") { // not a group - must be represented as Element
str >> weight >> ws;
return new Element(name, weight.toDouble());
}
else {
str >> grpname;
ElementList* els = new ElementList(grpname); // group - make an ElementList
while (!str.eof()) {
str >> name >> ws;
str >> coef >> ws;
els->addElement(name, coef.toDouble());
}
return els;
}
}
QString SubUnit::getName() const {
return QString("None");
}
/**
* Get the molecular weight of THIS, based on the data from ELSTABLE.
*/
-double SubUnit::getWeight(QDict<SubUnit>* elstable) const {
+double SubUnit::getWeight(QDict<SubUnit>* ) const {
return -1;
}
/**
* A group of elements.
*/
ElementList::ElementList () {
elements = new QList<ElementCoef>;
}
ElementList::~ElementList () {
delete elements;
}
/**
* A group of elements.
*/
ElementList::ElementList (QString name) {
this->name = name;
elements = new QList<ElementCoef>;
}
/**
@@ -197,42 +197,42 @@ bool ElementList::isEmpty() {
QString ElementList::getName() const {
return name;
}
/**
* A chemical element.
*/
Element::Element(const QString& n, double w)
: weight(w), name(n) { }
Element::~Element() {
}
/**
* Write THIS to LINE, in a format suitable for the element definition file.
*/
void Element::writeOut(QString& line) {
line.setNum(weight);
line = name + " " + line;
}
-double Element::getWeight(QDict<SubUnit>* elstable) const {
+double Element::getWeight(QDict<SubUnit>* ) const {
return weight;
}
void Element::addTo(ElementList& els, double coef) {
els.addElement(name, coef);
}
QString Element::getName() const {
return name;
}
/**
* An element - coefficient pair. Used to represent elements within an
* element list.
*/
ElementCoef::ElementCoef(const QString& n, double c) : name(n), coef(c) {}