From 83b1cf63165d62d294621d3003f4b2d5f5fa6c8a Mon Sep 17 00:00:00 2001 From: Mavridis Philippe Date: Thu, 14 Jan 2021 20:45:48 +0200 Subject: [PATCH] Freshklam: removed unneeded code Signed-off-by: Mavridis Philippe --- src/freshklam.cpp | 50 ----------------------------------------------- src/freshklam.h | 6 ------ 2 files changed, 56 deletions(-) diff --git a/src/freshklam.cpp b/src/freshklam.cpp index a00db74..791e78e 100644 --- a/src/freshklam.cpp +++ b/src/freshklam.cpp @@ -252,7 +252,6 @@ Freshklam::Freshklam(TQWidget *parent, const char *name) initCheckBoxes(); - checkInternet(); } Freshklam::~Freshklam() @@ -782,8 +781,6 @@ void Freshklam::createDBDir(){ } if (ok){ - lastDownloadPaths.prepend( TQString("%1").arg(path)); - config = TDEGlobal::config(); config->setGroup("Freshklam"); config->writeEntry("lastDownloadPaths", lastDownloadPaths); config->sync(); @@ -826,53 +823,6 @@ void Freshklam::enableAutoUpdates() } -void Freshklam::checkForNewClamAVNow() -{ - - updater->checkForNewClamAVDirectly(); -} - -void Freshklam::checkForNewKlamAVNow() -{ - - updater->checkForNewKlamAVDirectly(); -} - -void -Freshklam::checkInternet() //SLOT -{ - - m_url.setHost( "prdownloads.sourceforge.net" ); - if ( !m_url.port() ) m_url.setPort( 80 ); - - connect( &m_resolver, SIGNAL( finished( KResolverResults ) ), SLOT( resolved( KResolverResults ) ) ); - connectToHost(); -} - -void -Freshklam::connectToHost() //SLOT -{ - - ////kdDebug() << m_url.host() << endl; - - m_resolver.setNodeName( m_url.host() ); - m_resolver.setFamily( KResolver::InetFamily ); - m_resolver.start(); - -} - - -void -Freshklam::resolved( KResolverResults result) // SLOT -{ - - if ((!( result.error() != KResolver::NoError || result.isEmpty() )) ){ - updater->checkForNewKlamAV(); - }else - kdDebug() << "network error or not set to check for new klamav" << endl; -} - - void Freshklam::getCurrentVersionOfClamAV( ) { diff --git a/src/freshklam.h b/src/freshklam.h index ee01247..5477ff3 100644 --- a/src/freshklam.h +++ b/src/freshklam.h @@ -112,7 +112,6 @@ signals: public slots: void slotSearch(); void slotCancel(); - void checkForNewClamAVNow(); void getCurrentVersionOfClamAV( ); private slots: /* void slotProg();*/ @@ -126,8 +125,6 @@ private slots: /* void klamavInstallationExited(TDEProcess *arkollonproc); void clamavInstallationExited(TDEProcess *arkollonproc);*/ //void newItems( const KFileItemList& ); - void resolved(KResolverResults result); - void checkForNewKlamAVNow(); void readVersionLine(KProcIO *); /* void parseSFPage(); void parseSFPageHack();*/ @@ -146,8 +143,6 @@ private: void createDBDir(); /* void downloadComponent(TQString component, TQString version, TQString extension);*/ void startProgressDialog( const TQString & text ); - void checkInternet(); - void connectToHost(); /* void checkForNewKlamAV();*/ void initCheckBoxes(); /* void getVersionFromLink( const DOM::Node &n ); @@ -183,7 +178,6 @@ private: /* double highestsofarnumeric; TQString highestsofarraw; TQString highestsofarfilename;*/ - KResolver m_resolver; /* TQString currentClamAVVersion; TDEHTMLPart *filelist;*/