-rw-r--r-- | noncore/tools/opie-sh/inputdialog.cpp | 8 |
1 files changed, 6 insertions, 2 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,12 +40,14 @@ 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 | { | ||
44 | QTextStream stream(&file); | 45 | QTextStream stream(&file); |
45 | QString string = stream.read(); | 46 | QString string = stream.read(); |
46 | 47 | ||
47 | comboBox->insertStringList(QStringList::split('\n', string)); | 48 | comboBox->insertStringList(QStringList::split('\n', string)); |
48 | } | 49 | } |
50 | } | ||
49 | else | 51 | else |
50 | { | 52 | { |
51 | QFile file; | 53 | QFile file; |
@@ -63,12 +65,14 @@ 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)) |
69 | { | ||
67 | QTextStream stream(&file); | 70 | QTextStream stream(&file); |
68 | QString string = stream.read(); | 71 | QString string = stream.read(); |
69 | 72 | ||
70 | listBox->insertStringList(QStringList::split('\n', string)); | 73 | listBox->insertStringList(QStringList::split('\n', string)); |
71 | } | 74 | } |
75 | } | ||
72 | else | 76 | else |
73 | { | 77 | { |
74 | QFile file; | 78 | QFile file; |