Diffstat (limited to 'noncore/tools/opie-sh/inputdialog.cpp') (more/less context) (show whitespace changes)
-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 if(!filename.isNull()) { QFile file(filename); - file.open(IO_ReadOnly); + if (file.open(IO_ReadOnly)) + { QTextStream stream(&file); QString string = stream.read(); comboBox->insertStringList(QStringList::split('\n', string)); } + } else { QFile file; @@ -63,12 +65,14 @@ InputDialog::InputDialog(int w, int h, int newtype, QString labelString, QString if(!filename.isNull()) { QFile file(filename); - file.open(IO_ReadOnly); + if (file.open(IO_ReadOnly)) + { QTextStream stream(&file); QString string = stream.read(); listBox->insertStringList(QStringList::split('\n', string)); } + } else { QFile file; |