Remove KDE_IS_VERSION definition.

Signed-off-by: gregory guy <gregory-tde@laposte.net>
(cherry picked from commit c0822095d4)
r14.0.x
gregory guy 3 years ago committed by Michele Calgaro
parent d2a45e163c
commit a9360ae683
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -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)
{
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)
: TDEAction(text, pix, cut, receiver, slot, parent, name)

@ -42,9 +42,7 @@
#include <tqdom.h>
#if KDE_IS_VERSION(3,4,0)
#include "kftpzeroconf.h"
#endif
namespace KFTPBookmarks {
class Site;
@ -79,13 +77,10 @@ class KFTPZeroconfAction : public TDEAction
Q_OBJECT
public:
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);
DNSSD::RemoteService::Ptr getSite() { return m_service; }
private:
DNSSD::RemoteService::Ptr m_service;
#endif
};
/**

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

@ -38,13 +38,11 @@
KFTPZeroConf::KFTPZeroConf(TQObject *parent, const char *name)
: TQObject(parent, name)
{
#if KDE_IS_VERSION(3,4,0)
m_browser = new DNSSD::ServiceBrowser("_ftp._tcp", 0, true);
connect(m_browser, SIGNAL(finished()), this, SLOT(slotServiceChanged()));
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
{
return m_browser->services();
}
#endif
void KFTPZeroConf::slotServiceChanged()
{

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

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

Loading…
Cancel
Save