summaryrefslogtreecommitdiff
path: root/noncore/tools
authorerik <erik>2007-01-22 22:56:12 (UTC)
committer erik <erik>2007-01-22 22:56:12 (UTC)
commit9b4871054d01a47b4c546952a0948553413840d6 (patch) (side-by-side diff)
tree4e0248489c2790cf4225a116cfb903b637d4cdf0 /noncore/tools
parentf60301bab1f8aa3693089036a3791a01ae6f9db8 (diff)
downloadopie-9b4871054d01a47b4c546952a0948553413840d6.zip
opie-9b4871054d01a47b4c546952a0948553413840d6.tar.gz
opie-9b4871054d01a47b4c546952a0948553413840d6.tar.bz2
Every file in this commit makes a call to a function which returns a value.
Each file also didn't check the return value. This commit changes it so that every single non-checked call in these files is checked.
Diffstat (limited to 'noncore/tools') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/tools/opie-sh/inputdialog.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/noncore/tools/opie-sh/inputdialog.cpp b/noncore/tools/opie-sh/inputdialog.cpp
index 8046795..1dd8bf7 100644
--- a/noncore/tools/opie-sh/inputdialog.cpp
+++ b/noncore/tools/opie-sh/inputdialog.cpp
@@ -37,17 +37,19 @@ InputDialog::InputDialog(int w, int h, int newtype, QString labelString, QString
case 1:
comboBox = new QComboBox(edit, this, "combo box");
layout->addWidget(comboBox);
if(!filename.isNull())
{
QFile file(filename);
- file.open(IO_ReadOnly);
- QTextStream stream(&file);
- QString string = stream.read();
+ if (file.open(IO_ReadOnly))
+ {
+ QTextStream stream(&file);
+ QString string = stream.read();
- comboBox->insertStringList(QStringList::split('\n', string));
+ comboBox->insertStringList(QStringList::split('\n', string));
+ }
}
else
{
QFile file;
file.open(IO_ReadOnly, 0);
QTextStream stream(&file);
@@ -60,17 +62,19 @@ InputDialog::InputDialog(int w, int h, int newtype, QString labelString, QString
listBox = new QListBox(this, "list box");
listBox->setSelectionMode(QListBox::Multi);
layout->addWidget(listBox);
if(!filename.isNull())
{
QFile file(filename);
- file.open(IO_ReadOnly);
- QTextStream stream(&file);
- QString string = stream.read();
+ if (file.open(IO_ReadOnly))
+ {
+ QTextStream stream(&file);
+ QString string = stream.read();
- listBox->insertStringList(QStringList::split('\n', string));
+ listBox->insertStringList(QStringList::split('\n', string));
+ }
}
else
{
QFile file;
file.open(IO_ReadOnly, 0);
QTextStream stream(&file);