summaryrefslogtreecommitdiffstats
path: root/src/viewer.cpp
diff options
context:
space:
mode:
authorMavridis Philippe <mavridisf@gmail.com>2021-01-28 20:56:06 +0200
committerMavridis Philippe <mavridisf@gmail.com>2021-01-28 20:56:06 +0200
commit6a1bc5a8e05637d074b9158a0a79c42c92ee9eb0 (patch)
tree260147f52cf5afbe84f00cb18308a3c841cd9e5b /src/viewer.cpp
parentd827cbfe31db2ae59a1f02b4958c6903b4e6d66a (diff)
downloadklamav-6a1bc5a8e05637d074b9158a0a79c42c92ee9eb0.tar.gz
klamav-6a1bc5a8e05637d074b9158a0a79c42c92ee9eb0.zip
Virus Browser: Updated related HTML files and made them translatable.:
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
Diffstat (limited to 'src/viewer.cpp')
-rw-r--r--src/viewer.cpp17
1 files changed, 17 insertions, 0 deletions
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 <tdepopupmenu.h>
#include <tqclipboard.h>
+#include <tqfile.h>
#include <tqpaintdevicemetrics.h>
#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()
{