summaryrefslogtreecommitdiff
path: root/noncore/apps
Side-by-side diff
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
@@ -221,7 +221,7 @@ TranInfo *TranInfoList::findMostRecentByDesc( const QString &desc )
{
for(TranInfo *cur=last(); cur; cur=prev()) {
if( cur->desc()==desc )
return( cur );
}
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
@@ -48,15 +48,15 @@ void ListViewConfDir::readConfFiles()
QFileInfo *fi;
ListViewItemConfFile *fileEntry;
while ( (fi=it.current()) )
{
- 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;
}
}
void ListViewConfDir::expand(QListViewItem *item)
{
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
@@ -133,18 +133,18 @@ void ListViewItemConfigEntry::save(QTextStream *t)
((ListViewItemConfigEntry*)it)->save(t);
}
}
void ListViewItemConfigEntry::revert()
{
- _group = _groupOrig;
- _key = _keyOrig;
- _value = _valueOrig;
+ _group = _groupOrig;
+ _key = _keyOrig;
+ _value = _valueOrig;
_changed=false;
displayText();
}
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
@@ -131,13 +131,12 @@ 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;
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
@@ -32,13 +32,13 @@
#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();
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
@@ -37,13 +37,13 @@ extern "C" {
}
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();
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
@@ -52,20 +52,20 @@ FontDialog::FontDialog( QWidget * parent, const char* name /*, bool modal, WFla
styleListBox = new QListBox( this, "styleListBox" );
vbox->addWidget( styleListBox, 0);
FontTextLabel4 = new QLabel( this, "TextLabel4" );
FontTextLabel4->setText( tr( "Size" ) );
hbox->addWidget( FontTextLabel4,0);
-
+
sizeComboBox = new QComboBox( FALSE, this, "SizeCombo");
// sizeComboBox->setMaximumWidth(60);
hbox->addWidget( sizeComboBox, 0);
vbox->addLayout(hbox,0);
layout->addLayout( vbox,0,3);
-
+
MultiLineEdit1 = new QMultiLineEdit( this, "MultiLineEdit1" );
MultiLineEdit1->setText( tr( "The Quick Brown Fox Jumps Over The Lazy Dog" ) );
MultiLineEdit1->setWordWrap( QMultiLineEdit::WidgetWidth);
layout->addMultiCellWidget( MultiLineEdit1, 4, 4, 0, 3);
@@ -87,49 +87,49 @@ void FontDialog::familyListBoxSlot(const QString & text)
int sizeInt = sizeComboBox->currentText().toInt();
sizeComboBox->clear();
styleListBox->clear();
// clearListBoxes();
family = text;
-// odebug << family << oendl;
+// 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
+#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;
+ 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()
{
@@ -148,13 +148,13 @@ void FontDialog::populateLists()
// 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;
+// 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);
@@ -171,28 +171,28 @@ void FontDialog::populateLists()
}
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)
+ if(fontsize[i] == i_size)
#endif
sizeComboBox->setCurrentItem(i);
}
changeText();
}
@@ -206,53 +206,53 @@ void FontDialog::changeText()
{
if( familyListBox->currentItem() == -1)
family= familyListBox->text(0);
else {
family = familyListBox->currentText();
}
-// odebug << "Font family is "+family << oendl;
+// odebug << "Font family is "+family << oendl;
if( styleListBox->currentItem() == -1)
style=styleListBox->text(0);
else {
style = styleListBox->currentText();
}
-// odebug << "font style is "+style << oendl;
+// odebug << "font style is "+style << oendl;
if( sizeComboBox->currentItem() == -1 )
size = sizeComboBox->text(0);
else {
size = sizeComboBox->currentText();
}
-// odebug << "Font size is "+size << oendl;
+// odebug << "Font size is "+size << oendl;
bool ok;
int i_size = size.toInt(&ok,10);
QStringList charSetList = fdb.charSets(family);
// QStringList styles = fdb.styles( family ); // string list of styles of our current font family
QString charSet;
for ( QStringList::Iterator s = charSetList.begin(); s != charSetList.end();++s ) { // for each font style
charSet = *s;
-// odebug << charSet << oendl;
+// odebug << charSet << oendl;
}
selectedFont = fdb.font(family,style,i_size,charSet);
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");
cfg.setGroup("Font");
cfg.writeEntry("Family",family);
cfg.writeEntry("Style",style);
cfg.writeEntry("Size",size);
cfg.writeEntry("CharSet",charSet);
if(style.find("Italic",0,TRUE) != -1) {
selectedFont = fdb.font(family,"Regular",i_size,charSet);
selectedFont.setItalic(TRUE); //ya right
cfg.writeEntry("Italic","TRUE");
-// odebug << "Style is "+styleListBox->currentText() << oendl;
+// odebug << "Style is "+styleListBox->currentText() << oendl;
} else
cfg.writeEntry("Italic","FALSE");
MultiLineEdit1->setFont( selectedFont);
MultiLineEdit1->update();
changedFonts=TRUE;
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
@@ -17,13 +17,13 @@
#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();
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
@@ -5,33 +5,33 @@
*/
// classes that store and manipulate chemical formulas represented as
// lists of elements
#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.
*/
SubUnit::SubUnit () {}
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.
*/
SubUnit* SubUnit::makeSubUnit(QString line) {
QString name, grpname, weight, coef;
QTextStream str (line, IO_ReadOnly);
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;
@@ -45,30 +45,30 @@ 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.
+ * A group of elements.
*/
ElementList::ElementList () {
elements = new QList<ElementCoef>;
}
ElementList::~ElementList () {
delete elements;
}
/**
- * A group of elements.
+ * A group of elements.
*/
ElementList::ElementList (QString name) {
this->name = name;
elements = new QList<ElementCoef>;
}
@@ -77,13 +77,13 @@ ElementList::ElementList (QString name) {
*/
void ElementList::writeOut(QString& line) {
QString coef;
line = "-group " + name;
ElementCoef* current = elements->first();
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
current = elements->next();
}
}
/**
@@ -100,34 +100,34 @@ double ElementList::getWeight(QDict<SubUnit>* elstable) const {
current = elements->next();
}
return weight;
}
/**
- * 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.
*/
QString ElementList::getEA(QDict<SubUnit>* elstable, double mw) const {
if (mw == 0) mw = getWeight(elstable);
QString ea;
QString temp;
ElementCoef* current = elements->first();
while (current != 0) {
SubUnit* e = elstable->find(current->name);
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";
} else return QString("ERROR!\n"); //ERROR
current = elements->next();
}
return ea;
}
-
+
/**
* Return a string representing THIS as an empirical chemical formula.
*/
QString ElementList::getEmpFormula() const {
QString ef;
QString temp;
@@ -159,13 +159,13 @@ void ElementList::addTo(ElementList& els, double coef) {
els.addElement(current->name, (current->coef) * coef);
current = elements->next();
}
}
/**
- * 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
* a new ElementCoef pair and add to THIS.
*/
void ElementList::addElement(const QString& name, double coef) {
ElementCoef* current = elements->first();
while (current != 0) {
@@ -181,13 +181,13 @@ void ElementList::addElement(const QString& name, double coef) {
/**
* True iff THIS contains element named NAME.
*/
bool ElementList::contains(const QString& name) {
ElementCoef* current = elements->first();
while (current != 0) {
- if (current->name == name)
+ if (current->name == name)
return true;
current = elements->next();
}
return false;
}
@@ -199,13 +199,13 @@ QString ElementList::getName() const {
return name;
}
/**
* A chemical element.
*/
-Element::Element(const QString& n, double w)
+Element::Element(const QString& n, double w)
: weight(w), name(n) { }
Element::~Element() {
}
@@ -215,24 +215,24 @@ Element::~Element() {
*/
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
+ * An element - coefficient pair. Used to represent elements within an
* element list.
*/
ElementCoef::ElementCoef(const QString& n, double c) : name(n), coef(c) {}