Remove KDE_IS_VERSION definition.

Signed-off-by: gregory guy <gregory-tde@laposte.net>
pull/5/head
gregory guy 3 years ago
parent 71a8bf7029
commit c0822095d4
No known key found for this signature in database
GPG Key ID: 2CC84A1CC6823AF8

@ -45,12 +45,10 @@ KFTPZeroconfAction::KFTPZeroconfAction(const TQString &text, const TQString &pix
{ {
} }
#if KDE_IS_VERSION(3,4,0)
void KFTPZeroconfAction::setSite(DNSSD::RemoteService::Ptr service) void KFTPZeroconfAction::setSite(DNSSD::RemoteService::Ptr service)
{ {
m_service = service; m_service = service;
} }
#endif
KFTPBookmarkAction::KFTPBookmarkAction(const TQString &text, const TQString &pix, const TDEShortcut &cut, const TQObject *receiver, const char *slot, TDEActionCollection *parent, const char *name) KFTPBookmarkAction::KFTPBookmarkAction(const TQString &text, const TQString &pix, const TDEShortcut &cut, const TQObject *receiver, const char *slot, TDEActionCollection *parent, const char *name)
: TDEAction(text, pix, cut, receiver, slot, parent, name) : TDEAction(text, pix, cut, receiver, slot, parent, name)

@ -42,9 +42,7 @@
#include <tqdom.h> #include <tqdom.h>
#if KDE_IS_VERSION(3,4,0)
#include "kftpzeroconf.h" #include "kftpzeroconf.h"
#endif
namespace KFTPBookmarks { namespace KFTPBookmarks {
class Site; class Site;
@ -79,13 +77,10 @@ class KFTPZeroconfAction : public TDEAction
Q_OBJECT Q_OBJECT
public: public:
KFTPZeroconfAction(const TQString &text, const TQString &pix, const TDEShortcut &cut, const TQObject *receiver, const char *slot, TDEActionCollection *parent, const char *name = 0); KFTPZeroconfAction(const TQString &text, const TQString &pix, const TDEShortcut &cut, const TQObject *receiver, const char *slot, TDEActionCollection *parent, const char *name = 0);
#if KDE_IS_VERSION(3,4,0)
void setSite(DNSSD::RemoteService::Ptr service); void setSite(DNSSD::RemoteService::Ptr service);
DNSSD::RemoteService::Ptr getSite() { return m_service; } DNSSD::RemoteService::Ptr getSite() { return m_service; }
private: private:
DNSSD::RemoteService::Ptr m_service; DNSSD::RemoteService::Ptr m_service;
#endif
}; };
/** /**

@ -808,7 +808,6 @@ void Manager::guiPopulateZeroconfMenu(TDEActionMenu *parentMenu)
// Clear the menu // Clear the menu
parentMenu->popupMenu()->clear(); parentMenu->popupMenu()->clear();
#if KDE_IS_VERSION(3,4,0)
// Populate // Populate
TQValueList<DNSSD::RemoteService::Ptr> list = KFTPAPI::getInstance()->zeroConfInterface()->getServiceList(); TQValueList<DNSSD::RemoteService::Ptr> list = KFTPAPI::getInstance()->zeroConfInterface()->getServiceList();
@ -826,11 +825,6 @@ void Manager::guiPopulateZeroconfMenu(TDEActionMenu *parentMenu)
disabledAction->setEnabled(false); disabledAction->setEnabled(false);
parentMenu->insert(disabledAction); parentMenu->insert(disabledAction);
} }
#else
TDEAction *disabledAction = new TDEAction(i18n("<DNSSD Not Available>"));
disabledAction->setEnabled(false);
parentMenu->insert(disabledAction);
#endif
} }
void Manager::guiPopulateWalletMenu(TDEActionMenu *parentMenu) void Manager::guiPopulateWalletMenu(TDEActionMenu *parentMenu)
@ -933,13 +927,11 @@ void Manager::slotWalletExecuted()
void Manager::slotZeroconfExecuted() void Manager::slotZeroconfExecuted()
{ {
#if KDE_IS_VERSION(3,4,0)
// Get the sender // Get the sender
KFTPZeroconfAction *action = (KFTPZeroconfAction*) TQObject::sender(); KFTPZeroconfAction *action = (KFTPZeroconfAction*) TQObject::sender();
DNSSD::RemoteService::Ptr service = action->getSite(); DNSSD::RemoteService::Ptr service = action->getSite();
KFTPAPI::getInstance()->mainWindow()->slotQuickConnect(service->serviceName(), service->hostName(), service->port()); KFTPAPI::getInstance()->mainWindow()->slotQuickConnect(service->serviceName(), service->hostName(), service->port());
#endif
} }
} }

@ -38,13 +38,11 @@
KFTPZeroConf::KFTPZeroConf(TQObject *parent, const char *name) KFTPZeroConf::KFTPZeroConf(TQObject *parent, const char *name)
: TQObject(parent, name) : TQObject(parent, name)
{ {
#if KDE_IS_VERSION(3,4,0)
m_browser = new DNSSD::ServiceBrowser("_ftp._tcp", 0, true); m_browser = new DNSSD::ServiceBrowser("_ftp._tcp", 0, true);
connect(m_browser, SIGNAL(finished()), this, SLOT(slotServiceChanged())); connect(m_browser, SIGNAL(finished()), this, SLOT(slotServiceChanged()));
m_browser->startBrowse(); m_browser->startBrowse();
#endif
} }
@ -52,12 +50,10 @@ KFTPZeroConf::~KFTPZeroConf()
{ {
} }
#if KDE_IS_VERSION(3,4,0)
const TQValueList<DNSSD::RemoteService::Ptr> &KFTPZeroConf::getServiceList() const const TQValueList<DNSSD::RemoteService::Ptr> &KFTPZeroConf::getServiceList() const
{ {
return m_browser->services(); return m_browser->services();
} }
#endif
void KFTPZeroConf::slotServiceChanged() void KFTPZeroConf::slotServiceChanged()
{ {

@ -40,9 +40,7 @@
#include <tdeversion.h> #include <tdeversion.h>
#if KDE_IS_VERSION(3,4,0)
#include <dnssd/servicebrowser.h> #include <dnssd/servicebrowser.h>
#endif
/** /**
* This class provides an interface to TDEDNSSD (that is available from KDE 3.4). * This class provides an interface to TDEDNSSD (that is available from KDE 3.4).
@ -55,12 +53,9 @@ Q_OBJECT
public: public:
KFTPZeroConf(TQObject *parent = 0, const char *name = 0); KFTPZeroConf(TQObject *parent = 0, const char *name = 0);
~KFTPZeroConf(); ~KFTPZeroConf();
#if KDE_IS_VERSION(3,4,0)
const TQValueList<DNSSD::RemoteService::Ptr> &getServiceList() const; const TQValueList<DNSSD::RemoteService::Ptr> &getServiceList() const;
private: private:
DNSSD::ServiceBrowser *m_browser; DNSSD::ServiceBrowser *m_browser;
#endif
private slots: private slots:
void slotServiceChanged(); void slotServiceChanged();
signals: signals:

@ -39,9 +39,7 @@
#include <tdeversion.h> #include <tdeversion.h>
#if KDE_IS_VERSION(3,4,0)
#include "kftpzeroconf.h" #include "kftpzeroconf.h"
#endif
#include <tdelocale.h> #include <tdelocale.h>
#include <kiconloader.h> #include <kiconloader.h>
@ -57,17 +55,14 @@ KFTPZeroConfListView::KFTPZeroConfListView(TQWidget *parent, const char *name)
setEmptyListText(i18n("No sites published.")); setEmptyListText(i18n("No sites published."));
setItemsRenameable(false); setItemsRenameable(false);
#if KDE_IS_VERSION(3,4,0)
connect(KFTPAPI::getInstance()->zeroConfInterface(), SIGNAL(servicesUpdated()), this, SLOT(slotSitesChanged())); connect(KFTPAPI::getInstance()->zeroConfInterface(), SIGNAL(servicesUpdated()), this, SLOT(slotSitesChanged()));
connect(this, SIGNAL(executed(TQListViewItem*)), this, SLOT(slotSiteExecuted(TQListViewItem*))); connect(this, SIGNAL(executed(TQListViewItem*)), this, SLOT(slotSiteExecuted(TQListViewItem*)));
slotSitesChanged(); slotSitesChanged();
#endif
} }
void KFTPZeroConfListView::slotSitesChanged() void KFTPZeroConfListView::slotSitesChanged()
{ {
#if KDE_IS_VERSION(3,4,0)
// Update the site list // Update the site list
TQValueList<DNSSD::RemoteService::Ptr> list = KFTPAPI::getInstance()->zeroConfInterface()->getServiceList(); TQValueList<DNSSD::RemoteService::Ptr> list = KFTPAPI::getInstance()->zeroConfInterface()->getServiceList();
@ -84,15 +79,12 @@ void KFTPZeroConfListView::slotSitesChanged()
site->setPixmap(0, SmallIcon("lan")); site->setPixmap(0, SmallIcon("lan"));
} }
} }
#endif
} }
void KFTPZeroConfListView::slotSiteExecuted(TQListViewItem *item) void KFTPZeroConfListView::slotSiteExecuted(TQListViewItem *item)
{ {
#if KDE_IS_VERSION(3,4,0)
// Connect to the site // Connect to the site
KFTPAPI::getInstance()->mainWindow()->slotQuickConnect(item->text(0), item->text(1), item->text(2).toInt()); KFTPAPI::getInstance()->mainWindow()->slotQuickConnect(item->text(0), item->text(1), item->text(2).toInt());
#endif
} }
#include "kftpzeroconflistview.moc" #include "kftpzeroconflistview.moc"

Loading…
Cancel
Save