diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-28 20:34:15 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-28 20:34:15 +0000 |
commit | 1c1403293485f35fd53db45aaa77a01cdd9627e7 (patch) | |
tree | 38559cd68cd4f63023fb5f6375def9db3b8b491e /plugins/upnp/upnpprefwidget.cpp | |
parent | 894f94545727610df22c4f73911d62d58266f695 (diff) | |
download | ktorrent-1c1403293485f35fd53db45aaa77a01cdd9627e7.tar.gz ktorrent-1c1403293485f35fd53db45aaa77a01cdd9627e7.zip |
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
Diffstat (limited to 'plugins/upnp/upnpprefwidget.cpp')
-rw-r--r-- | plugins/upnp/upnpprefwidget.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
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<KListViewItem*,UPnPRouter*>::iterator i = itemmap.begin(); + TQMap<KListViewItem*,UPnPRouter*>::iterator i = itemmap.begin(); while (i != itemmap.end()) { UPnPRouter* r = i.data(); KListViewItem* item = i.key(); - QString msg,services; - QValueList<UPnPRouter::Forwarding>::iterator j = r->beginPortMappings(); + TQString msg,services; + TQValueList<UPnPRouter::Forwarding>::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"; |