From 1c1403293485f35fd53db45aaa77a01cdd9627e7 Mon Sep 17 00:00:00 2001 From: tpearson Date: Tue, 28 Jun 2011 20:34:15 +0000 Subject: TQt4 port ktorrent This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ktorrent@1238733 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- plugins/upnp/upnpprefwidget.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'plugins/upnp/upnpprefwidget.cpp') diff --git a/plugins/upnp/upnpprefwidget.cpp b/plugins/upnp/upnpprefwidget.cpp index 43e2aec..bd4e593 100644 --- a/plugins/upnp/upnpprefwidget.cpp +++ b/plugins/upnp/upnpprefwidget.cpp @@ -37,13 +37,13 @@ using namespace bt; namespace kt { - UPnPPrefWidget::UPnPPrefWidget(QWidget* parent, const char* name, WFlags fl) - : UPnPWidget(parent,name,fl) + UPnPPrefWidget::UPnPPrefWidget(TQWidget* tqparent, const char* name, WFlags fl) + : UPnPWidget(tqparent,name,fl) { def_router = 0; - connect(m_forward_btn,SIGNAL(clicked()),this,SLOT(onForwardBtnClicked())); - connect(m_undo_forward_btn,SIGNAL(clicked()),this,SLOT(onUndoForwardBtnClicked())); - connect(m_rescan,SIGNAL(clicked()),this,SLOT(onRescanClicked())); + connect(m_forward_btn,TQT_SIGNAL(clicked()),this,TQT_SLOT(onForwardBtnClicked())); + connect(m_undo_forward_btn,TQT_SIGNAL(clicked()),this,TQT_SLOT(onUndoForwardBtnClicked())); + connect(m_rescan,TQT_SIGNAL(clicked()),this,TQT_SLOT(onRescanClicked())); bt::Globals::instance().getPortList().setListener(this); } @@ -72,13 +72,13 @@ namespace kt void UPnPPrefWidget::addDevice(UPnPRouter* r) { - connect(r,SIGNAL(updateGUI()),this,SLOT(updatePortMappings())); + connect(r,TQT_SIGNAL(updateGUI()),this,TQT_SLOT(updatePortMappings())); KListViewItem* item = new KListViewItem(m_device_list,r->getDescription().friendlyName); item->setMultiLinesEnabled(true); itemmap[item] = r; // if we have discovered the default device or there is none // forward it's ports - QString def_dev = UPnPPluginSettings::defaultDevice(); + TQString def_dev = UPnPPluginSettings::defaultDevice(); if (def_dev == r->getServer() || def_dev.length() == 0) { Out(SYS_PNP|LOG_DEBUG) << "Doing default port mappings ..." << endl; @@ -126,7 +126,7 @@ namespace kt r->forward(p); } - QString def_dev = UPnPPluginSettings::defaultDevice(); + TQString def_dev = UPnPPluginSettings::defaultDevice(); if (def_dev != r->getServer()) { UPnPPluginSettings::setDefaultDevice(r->getServer()); @@ -168,10 +168,10 @@ namespace kt r->undoForward(p,false); } - QString def_dev = UPnPPluginSettings::defaultDevice(); + TQString def_dev = UPnPPluginSettings::defaultDevice(); if (def_dev == r->getServer()) { - UPnPPluginSettings::setDefaultDevice(QString::null); + UPnPPluginSettings::setDefaultDevice(TQString()); UPnPPluginSettings::writeConfig(); def_router = 0; } @@ -186,22 +186,22 @@ namespace kt void UPnPPrefWidget::updatePortMappings() { // update all port mappings - QMap::iterator i = itemmap.begin(); + TQMap::iterator i = itemmap.begin(); while (i != itemmap.end()) { UPnPRouter* r = i.data(); KListViewItem* item = i.key(); - QString msg,services; - QValueList::iterator j = r->beginPortMappings(); + TQString msg,services; + TQValueList::iterator j = r->beginPortMappings(); while (j != r->endPortMappings()) { UPnPRouter::Forwarding & f = *j; if (!f.pending_req) { - msg += QString::number(f.port.number) + " ("; - QString prot = (f.port.proto == net::UDP ? "UDP" : "TCP"); + msg += TQString::number(f.port.number) + " ("; + TQString prot = (f.port.proto == net::UDP ? "UDP" : "TCP"); msg += prot + ")"; - if (f.service->servicetype.contains("WANPPPConnection")) + if (f.service->servicetype.tqcontains("WANPPPConnection")) services += "PPP"; else services += "IP"; -- cgit v1.2.1