From 6a1bc5a8e05637d074b9158a0a79c42c92ee9eb0 Mon Sep 17 00:00:00 2001 From: Mavridis Philippe Date: Thu, 28 Jan 2021 20:56:06 +0200 Subject: Virus Browser: Updated related HTML files and made them translatable.: Signed-off-by: Mavridis Philippe --- src/viewer.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/viewer.cpp') diff --git a/src/viewer.cpp b/src/viewer.cpp index f98fb79..dc31dce 100644 --- a/src/viewer.cpp +++ b/src/viewer.cpp @@ -13,6 +13,7 @@ #include #include +#include #include #include "viewer.h" @@ -67,6 +68,22 @@ bool Viewer::openURL(const KURL &url) return true; } +/* borrowed from Konqueror */ +TQString Viewer::loadFile( const TQString& file ) { + TQString res; + if( file.isEmpty() ) + return res; + + TQFile f(file); + + if( !f.open(IO_ReadOnly) ) + return res; + + TQTextStream t(&f); + res = t.read(); + + return res; +} bool Viewer::closeURL() { -- cgit v1.2.1