summaryrefslogtreecommitdiff
path: root/noncore/tools/opie-sh/inputdialog.cpp
Unidiff
Diffstat (limited to 'noncore/tools/opie-sh/inputdialog.cpp') (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
@@ -40,11 +40,13 @@ InputDialog::InputDialog(int w, int h, int newtype, QString labelString, QString
40 if(!filename.isNull()) 40 if(!filename.isNull())
41 { 41 {
42 QFile file(filename); 42 QFile file(filename);
43 file.open(IO_ReadOnly); 43 if (file.open(IO_ReadOnly))
44 QTextStream stream(&file); 44 {
45 QString string = stream.read(); 45 QTextStream stream(&file);
46 QString string = stream.read();
46 47
47 comboBox->insertStringList(QStringList::split('\n', string)); 48 comboBox->insertStringList(QStringList::split('\n', string));
49 }
48 } 50 }
49 else 51 else
50 { 52 {
@@ -63,11 +65,13 @@ InputDialog::InputDialog(int w, int h, int newtype, QString labelString, QString
63 if(!filename.isNull()) 65 if(!filename.isNull())
64 { 66 {
65 QFile file(filename); 67 QFile file(filename);
66 file.open(IO_ReadOnly); 68 if (file.open(IO_ReadOnly))
67 QTextStream stream(&file); 69 {
68 QString string = stream.read(); 70 QTextStream stream(&file);
71 QString string = stream.read();
69 72
70 listBox->insertStringList(QStringList::split('\n', string)); 73 listBox->insertStringList(QStringList::split('\n', string));
74 }
71 } 75 }
72 else 76 else
73 { 77 {