summaryrefslogtreecommitdiffstats
path: root/kget/kget_plug_in
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
commit69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch)
tree073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /kget/kget_plug_in
parent3467e6464beac3a162839bf7078e22e3a74d73e7 (diff)
downloadtdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.tar.gz
tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.zip
TQt4 port kdenetwork
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kget/kget_plug_in')
-rw-r--r--kget/kget_plug_in/kget_linkview.cpp22
-rw-r--r--kget/kget_plug_in/kget_linkview.h7
-rw-r--r--kget/kget_plug_in/kget_plug_in.cpp16
-rw-r--r--kget/kget_plug_in/kget_plug_in.h10
-rw-r--r--kget/kget_plug_in/links.cpp8
5 files changed, 33 insertions, 30 deletions
diff --git a/kget/kget_plug_in/kget_linkview.cpp b/kget/kget_plug_in/kget_linkview.cpp
index a9bab704..295d04b4 100644
--- a/kget/kget_plug_in/kget_linkview.cpp
+++ b/kget/kget_plug_in/kget_linkview.cpp
@@ -18,8 +18,8 @@
#define COL_MIME 2
#define COL_URL 3
-LinkViewItem::LinkViewItem( TQListView *parent, const LinkItem *lnk )
- : TQListViewItem( parent ),
+LinkViewItem::LinkViewItem( TQListView *tqparent, const LinkItem *lnk )
+ : TQListViewItem( tqparent ),
link( lnk )
{
TQString file = link->url.fileName();
@@ -37,17 +37,17 @@ LinkViewItem::LinkViewItem( TQListView *parent, const LinkItem *lnk )
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
-KGetLinkView::KGetLinkView( TQWidget *parent, const char *name )
- : KMainWindow( parent, name )
+KGetLinkView::KGetLinkView( TQWidget *tqparent, const char *name )
+ : KMainWindow( tqparent, name )
{
setPlainCaption( i18n( "KGet" ) );
KAction* actionDownload = new KAction( i18n("Download Selected Files"),
"kget", CTRL+Key_D,
- this, TQT_SLOT( slotStartLeech() ),
+ TQT_TQOBJECT(this), TQT_SLOT( slotStartLeech() ),
actionCollection(), "startDownload" );
- KAction* actionSelectAll = KStdAction::selectAll( this, TQT_SLOT( slotSelectAll() ),
+ KAction* actionSelectAll = KStdAction::selectAll( TQT_TQOBJECT(this), TQT_SLOT( slotSelectAll() ),
actionCollection() );
m_links.setAutoDelete( true );
@@ -56,7 +56,7 @@ KGetLinkView::KGetLinkView( TQWidget *parent, const char *name )
actionSelectAll->plug( toolBar() );
TQWidget *mainWidget = new TQWidget( this );
- TQVBoxLayout *layout = new TQVBoxLayout( mainWidget );
+ TQVBoxLayout *tqlayout = new TQVBoxLayout( mainWidget );
setCentralWidget( mainWidget );
m_view = new KListView( mainWidget, "listview" );
@@ -68,8 +68,8 @@ KGetLinkView::KGetLinkView( TQWidget *parent, const char *name )
m_view->setShowSortIndicator( true );
KListViewSearchLineWidget *line = new KListViewSearchLineWidget( m_view, mainWidget, "search line" );
- layout->addWidget( line );
- layout->addWidget( m_view );
+ tqlayout->addWidget( line );
+ tqlayout->addWidget( m_view );
// setting a fixed (not floating) toolbar
toolBar()->setMovingEnabled( false );
@@ -125,7 +125,7 @@ void KGetLinkView::slotStartLeech()
TQByteArray data;
TQDataStream stream( data, IO_WriteOnly );
- stream << urls << TQString::null;
+ stream << urls << TQString();
bool ok = DCOPClient::mainClient()->send( "kget", "KGet-Interface",
"addTransfers(KURL::List, TQString)",
data );
@@ -139,7 +139,7 @@ void KGetLinkView::slotStartLeech()
void KGetLinkView::setPageURL( const TQString& url )
{
- setPlainCaption( i18n( "Links in: %1 - KGet" ).arg( url ) );
+ setPlainCaption( i18n( "Links in: %1 - KGet" ).tqarg( url ) );
}
void KGetLinkView::slotSelectAll()
diff --git a/kget/kget_plug_in/kget_linkview.h b/kget/kget_plug_in/kget_linkview.h
index 26ce28fc..b09e902d 100644
--- a/kget/kget_plug_in/kget_linkview.h
+++ b/kget/kget_plug_in/kget_linkview.h
@@ -16,10 +16,10 @@
#include "links.h"
-class LinkViewItem : public QListViewItem
+class LinkViewItem : public TQListViewItem
{
public:
- LinkViewItem( TQListView *parent, const LinkItem * lnk );
+ LinkViewItem( TQListView *tqparent, const LinkItem * lnk );
const LinkItem *link;
};
@@ -27,9 +27,10 @@ public:
class KGetLinkView : public KMainWindow
{
Q_OBJECT
+ TQ_OBJECT
public:
- KGetLinkView( TQWidget *parent = 0L, const char *name = 0L );
+ KGetLinkView( TQWidget *tqparent = 0L, const char *name = 0L );
~KGetLinkView();
void setLinks( TQPtrList<LinkItem>& links );
diff --git a/kget/kget_plug_in/kget_plug_in.cpp b/kget/kget_plug_in/kget_plug_in.cpp
index c73406a2..78ef597e 100644
--- a/kget/kget_plug_in/kget_plug_in.cpp
+++ b/kget/kget_plug_in/kget_plug_in.cpp
@@ -44,8 +44,8 @@
#include "links.h"
#include "kget_linkview.h"
-KGet_plug_in::KGet_plug_in( TQObject* parent, const char* name )
- : Plugin( parent, name )
+KGet_plug_in::KGet_plug_in( TQObject* tqparent, const char* name )
+ : Plugin( tqparent, name )
{
TQPixmap pix = KGlobal::iconLoader()->loadIcon("kget",
KIcon::MainToolbar);
@@ -104,10 +104,10 @@ void KGet_plug_in::slotShowDrop()
void KGet_plug_in::slotShowLinks()
{
- if ( !parent() || !parent()->inherits( "KHTMLPart" ) )
+ if ( !tqparent() || !tqparent()->inherits( "KHTMLPart" ) )
return;
- KHTMLPart *htmlPart = static_cast<KHTMLPart*>( parent() );
+ KHTMLPart *htmlPart = static_cast<KHTMLPart*>( tqparent() );
KParts::Part *activePart = 0L;
if ( htmlPart->partManager() )
{
@@ -157,15 +157,15 @@ void KGet_plug_in::slotShowLinks()
view->show();
}
-KPluginFactory::KPluginFactory( TQObject* parent, const char* name )
- : KLibFactory( parent, name )
+KPluginFactory::KPluginFactory( TQObject* tqparent, const char* name )
+ : KLibFactory( tqparent, name )
{
s_instance = new KInstance("KPluginFactory");
}
-TQObject* KPluginFactory::createObject( TQObject* parent, const char* name, const char*, const TQStringList & )
+TQObject* KPluginFactory::createObject( TQObject* tqparent, const char* name, const char*, const TQStringList & )
{
- TQObject *obj = new KGet_plug_in( parent, name );
+ TQObject *obj = new KGet_plug_in( tqparent, name );
return obj;
}
diff --git a/kget/kget_plug_in/kget_plug_in.h b/kget/kget_plug_in/kget_plug_in.h
index b5cfea29..6cca1390 100644
--- a/kget/kget_plug_in/kget_plug_in.h
+++ b/kget/kget_plug_in/kget_plug_in.h
@@ -27,8 +27,9 @@ class KInstance;
class KGet_plug_in : public KParts::Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- KGet_plug_in( TQObject* parent = 0, const char* name = 0 );
+ KGet_plug_in( TQObject* tqparent = 0, const char* name = 0 );
KToggleAction *m_paToggleDropTarget ;
DCOPClient* p_dcopServer;
virtual ~KGet_plug_in();
@@ -43,12 +44,13 @@ private slots:
class KPluginFactory : public KLibFactory
{
Q_OBJECT
+ TQ_OBJECT
public:
- KPluginFactory( TQObject *parent = 0, const char *name = 0 );
+ KPluginFactory( TQObject *tqparent = 0, const char *name = 0 );
~KPluginFactory() ;
- virtual TQObject* createObject( TQObject* parent = 0, const char* pname = 0,
- const char* name = "TQObject",
+ virtual TQObject* createObject( TQObject* tqparent = 0, const char* pname = 0,
+ const char* name = TQOBJECT_OBJECT_NAME_STRING,
const TQStringList &args = TQStringList() );
private:
diff --git a/kget/kget_plug_in/links.cpp b/kget/kget_plug_in/links.cpp
index 12600353..b1410cef 100644
--- a/kget/kget_plug_in/links.cpp
+++ b/kget/kget_plug_in/links.cpp
@@ -24,17 +24,17 @@ LinkItem::LinkItem( DOM::Element link )
// somehow getElementsByTagName("#text") doesn't work :(
- DOM::NodeList children = link.childNodes();
- for ( uint i = 0; i < children.length(); i++ )
+ DOM::NodeList tqchildren = link.childNodes();
+ for ( uint i = 0; i < tqchildren.length(); i++ )
{
- DOM::Node node = children.item( i );
+ DOM::Node node = tqchildren.item( i );
if ( node.nodeType() == DOM::Node::TEXT_NODE )
text.append( node.nodeValue().string() );
}
// force "local file" mimetype determination
KMimeType::Ptr mt = KMimeType::findByURL( url, 0, true, true);
- icon = mt->icon( TQString::null, false ); // dummy parameters
+ icon = mt->icon( TQString(), false ); // dummy parameters
mimeType = mt->comment();
m_valid = true;