blob: bbbca319d2c20314969f5052196d904fc791ce79 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
/***************************************************************************
* Copyright (C) 2004 by Sashmit Bhaduri *
* [email protected] *
* *
* Licensed under GPL. *
***************************************************************************/
#include "viewer.h"
#include "klamav_run.h"
using namespace KlamAV;
BrowserRun::BrowserRun(Viewer *viewer, TQWidget *parent, KParts::ReadOnlyPart *part, const KURL & url, const KParts::URLArgs &args)
: KParts::BrowserRun(url, args, part, parent, false, true)
{
m_viewer=viewer;
connect(m_viewer, SIGNAL(destroyed()), this, SLOT(killMyself()));
setEnableExternalBrowser(false);
}
BrowserRun::~BrowserRun()
{
//kdDebug() << "BrowserRun::~BrowserRun()" << endl;
}
void BrowserRun::foundMimeType( const TQString & type )
{
if (type=="text/html" ||type=="text/xml" || type=="application/xhtml+xml" )
m_viewer->openPage(url());
else
KParts::BrowserRun::foundMimeType( type );
}
void BrowserRun::killMyself()
{
kdDebug() << "BrowserRun::killMyself()" << endl;
delete this;
}
#include "klamav_run.moc"
|