From 32343107b30904806d02672955c57ed53d39fe79 Mon Sep 17 00:00:00 2001 From: erik Date: Fri, 19 Jan 2007 01:18:01 +0000 Subject: Every file in this commit has a change to check the return value of a call. --- (limited to 'noncore/apps/tinykate') 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; -- cgit v0.9.0.2