Diffstat (limited to 'noncore/apps/tinykate/libkate/document') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/tinykate/libkate/document/katebuffer.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/noncore/apps/tinykate/libkate/document/katebuffer.cpp b/noncore/apps/tinykate/libkate/document/katebuffer.cpp index 4c15fd0..d89edbd 100644 --- a/noncore/apps/tinykate/libkate/document/katebuffer.cpp +++ b/noncore/apps/tinykate/libkate/document/katebuffer.cpp @@ -72,7 +72,10 @@ KWBuffer::insertFile(int line, const QString &file, QTextCodec *codec) } clear(); QFile iofile(file); - iofile.open(IO_ReadOnly); + if (!iofile.open(IO_ReadOnly)) { + owarn << "failed to open file " << iofile.name() << oendl; + return; + } QTextStream stream(&iofile); stream.setCodec(codec); QString qsl; |