summaryrefslogtreecommitdiffstats
path: root/src/viewer.cpp
diff options
context:
space:
mode:
authorMavridis Philippe <mavridisf@gmail.com>2021-01-13 19:30:17 +0200
committerMavridis Philippe <mavridisf@gmail.com>2021-01-13 19:30:17 +0200
commit357ddeb8afd82d69ef871c146f4fc8f2c67fb17e (patch)
treedc3ef0e6fedd64f5fb177c114f72e1515a07cd1b /src/viewer.cpp
parentc6cbd71bc169ac0e927e52325dbbbcb506abbc73 (diff)
downloadklamav-357ddeb8afd82d69ef871c146f4fc8f2c67fb17e.tar.gz
klamav-357ddeb8afd82d69ef871c146f4fc8f2c67fb17e.zip
Conversion Qt3->TQt
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
Diffstat (limited to 'src/viewer.cpp')
-rw-r--r--src/viewer.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/viewer.cpp b/src/viewer.cpp
index 3d763f5..1cbf083 100644
--- a/src/viewer.cpp
+++ b/src/viewer.cpp
@@ -12,8 +12,8 @@
#include <klocale.h>
#include <kpopupmenu.h>
-#include <qclipboard.h>
-#include <qpaintdevicemetrics.h>
+#include <tqclipboard.h>
+#include <tqpaintdevicemetrics.h>
#include "viewer.h"
#include "klamav_run.h"
@@ -21,7 +21,7 @@
using namespace KlamAV;
-Viewer::Viewer(QWidget *parent, const char *name)
+Viewer::Viewer(TQWidget *parent, const char *name)
: KHTMLPart(parent, name), m_url(0)
{
setZoomFactor(100);
@@ -43,8 +43,8 @@ Viewer::Viewer(QWidget *parent, const char *name)
connect( browserExtension(),
-SIGNAL(popupMenu (KXMLGUIClient*, const QPoint&, const KURL&, const
- KParts::URLArgs&, KParts::BrowserExtension::PopupFlags, mode_t)), this, SLOT(slotPopupMenu(KXMLGUIClient*, const QPoint&, const KURL&, const
+SIGNAL(popupMenu (KXMLGUIClient*, const TQPoint&, const KURL&, const
+ KParts::URLArgs&, KParts::BrowserExtension::PopupFlags, mode_t)), this, SLOT(slotPopupMenu(KXMLGUIClient*, const TQPoint&, const KURL&, const
KParts::URLArgs&, KParts::BrowserExtension::PopupFlags, mode_t)));
KStdAction::print(this, SLOT(slotPrint()), actionCollection(), "viewer_print");
@@ -62,7 +62,7 @@ SIGNAL(popupMenu (KXMLGUIClient*, const QPoint&, const KURL&, const
bool Viewer::openURL(const KURL &url)
{
- new KlamAV::BrowserRun(this, (QWidget*)parent(), this, url, KParts::URLArgs());
+ new KlamAV::BrowserRun(this, (TQWidget*)parent(), this, url, KParts::URLArgs());
emit started(0);
return true;
}
@@ -71,17 +71,17 @@ bool Viewer::openURL(const KURL &url)
bool Viewer::closeURL()
{
emit browserExtension()->loadingProgress(-1);
- emit canceled(QString::null);
+ emit canceled(TQString::null);
return KHTMLPart::closeURL();
}
int Viewer::pointsToPixel(int pointSize) const
{
- const QPaintDeviceMetrics metrics(view());
+ const TQPaintDeviceMetrics metrics(view());
return ( pointSize * metrics.logicalDpiY() + 36 ) / 72 ;
}
-void Viewer::displayInExternalBrowser(const KURL &url, const QString &mimetype)
+void Viewer::displayInExternalBrowser(const KURL &url, const TQString &mimetype)
{
if (!url.isValid()) return;
/* if (Settings::externalBrowserUseKdeDefault())
@@ -93,11 +93,11 @@ void Viewer::displayInExternalBrowser(const KURL &url, const QString &mimetype)
/* }
else
{
- QString cmd = Settings::externalBrowserCustomCommand();
- QString urlStr = url.url();
- cmd.replace(QRegExp("%u"), urlStr);
+ TQString cmd = Settings::externalBrowserCustomCommand();
+ TQString urlStr = url.url();
+ cmd.replace(TQRegExp("%u"), urlStr);
KProcess *proc = new KProcess;
- QStringList cmdAndArgs = KShell::splitArgs(cmd);
+ TQStringList cmdAndArgs = KShell::splitArgs(cmd);
*proc << cmdAndArgs;
proc->start(KProcess::DontCare);
delete proc;
@@ -140,9 +140,9 @@ void Viewer::slotOpenURLRequest(const KURL& url, const KParts::URLArgs& args)
}
}
-void Viewer::slotPopupMenu(KXMLGUIClient*, const QPoint& p, const KURL& kurl, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags, mode_t)
+void Viewer::slotPopupMenu(KXMLGUIClient*, const TQPoint& p, const KURL& kurl, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags, mode_t)
{
- QString url = kurl.url();
+ TQString url = kurl.url();
if(this->url() == url) return;
m_url = url;
KPopupMenu popup;
@@ -168,9 +168,9 @@ void Viewer::slotPopupMenu(KXMLGUIClient*, const QPoint& p, const KURL& kurl, co
// taken from KDevelop
void Viewer::slotCopy()
{
- QString text = selectedText();
- text.replace( QChar( 0xa0 ), ' ' );
- QClipboard *cb = QApplication::clipboard();
+ TQString text = selectedText();
+ text.replace( TQChar( 0xa0 ), ' ' );
+ TQClipboard *cb = TQApplication::clipboard();
disconnect( cb, SIGNAL( selectionChanged() ), this, SLOT( slotClearSelection() ) );
cb->setText(text);
connect( cb, SIGNAL( selectionChanged() ), this, SLOT( slotClearSelection() ) );
@@ -179,9 +179,9 @@ void Viewer::slotCopy()
void Viewer::slotCopyLinkAddress()
{
if(m_url.isEmpty()) return;
- QClipboard *cb = QApplication::clipboard();
- cb->setText(m_url.prettyURL(), QClipboard::Clipboard);
- cb->setText(m_url.prettyURL(), QClipboard::Selection);
+ TQClipboard *cb = TQApplication::clipboard();
+ cb->setText(m_url.prettyURL(), TQClipboard::Clipboard);
+ cb->setText(m_url.prettyURL(), TQClipboard::Selection);
}
void Viewer::slotSelectionChanged()
@@ -207,7 +207,7 @@ void Viewer::slotOpenLinkInBackgroundTab()
void Viewer::slotOpenLinkInBrowser()
{
kdDebug() << "display external" << endl;
- displayInExternalBrowser(m_url, QString::null);
+ displayInExternalBrowser(m_url, TQString::null);
}
void Viewer::slotStarted(KIO::Job *)