|
|
|
@ -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( )
|
|
|
|
|
{
|
|
|
|
|