From 357ddeb8afd82d69ef871c146f4fc8f2c67fb17e Mon Sep 17 00:00:00 2001 From: Mavridis Philippe Date: Wed, 13 Jan 2021 19:30:17 +0200 Subject: Conversion Qt3->TQt Signed-off-by: Mavridis Philippe --- src/update.cpp | 70 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 35 insertions(+), 35 deletions(-) (limited to 'src/update.cpp') diff --git a/src/update.cpp b/src/update.cpp index 93393dd..f8497d0 100644 --- a/src/update.cpp +++ b/src/update.cpp @@ -31,12 +31,12 @@ #include -#include +#include #include #include #include #include -#include +#include #include #include #include @@ -50,7 +50,7 @@ #include #include -#include +#include #include "version.h" @@ -77,8 +77,8 @@ const char *mirrors[] = { 0 }; -KlamavUpdate::KlamavUpdate(QWidget *parent, const char *name) - : QWidget(parent, name),filelist(new KHTMLPart(this)) +KlamavUpdate::KlamavUpdate(TQWidget *parent, const char *name) + : TQWidget(parent, name),filelist(new KHTMLPart(this)) { filelist->hide(); @@ -98,29 +98,29 @@ KlamavUpdate::~KlamavUpdate() -void KlamavUpdate::downloadComponent(QString component, QString version, QString extension) +void KlamavUpdate::downloadComponent(TQString component, TQString version, TQString extension) { upgradeinprogress = true; - QString location = getenv("HOME"); + TQString location = getenv("HOME"); location += "/.klamav"; - QDir klamavdir(location); + TQDir klamavdir(location); if (!klamavdir.exists() && !klamavdir.mkdir(location)) location = getenv("HOME"); - QString currentclamav = location + QString("/%1-%2").arg(component).arg(version); - QDir clamavdir(currentclamav); + TQString currentclamav = location + TQString("/%1-%2").arg(component).arg(version); + TQDir clamavdir(currentclamav); - QString configure; + TQString configure; /* if (component == "klamav"){ - configure = QString("%1/%2-%3/%4-%5/configure").arg(location).arg(component).arg(version).arg(component).arg(version); + configure = TQString("%1/%2-%3/%4-%5/configure").arg(location).arg(component).arg(version).arg(component).arg(version); }else{*/ - configure = QString("%1/%2-%3/configure").arg(location).arg(component).arg(version); + configure = TQString("%1/%2-%3/configure").arg(location).arg(component).arg(version); // } - QFile configurefile(configure); + TQFile configurefile(configure); bool download = true; @@ -139,8 +139,8 @@ void KlamavUpdate::downloadComponent(QString component, QString version, QString startProgressDialog( i18n( "Downloading %1-%2..." ).arg(component).arg(version) ); - QString tmpFile; - if ( !KIO::NetAccess::download( QString("http://%1.dl.sourceforge.net/sourceforge/%2/%3-%4.%5").arg(getMirror()).arg(component).arg(component).arg(version).arg(extension), tmpFile, 0L ) ){ + TQString tmpFile; + if ( !KIO::NetAccess::download( TQString("http://%1.dl.sourceforge.net/sourceforge/%2/%3-%4.%5").arg(getMirror()).arg(component).arg(component).arg(version).arg(extension), tmpFile, 0L ) ){ KMessageBox::information (this,i18n("Couldn't download %1.").arg(component)); delete timer; timer=0; @@ -201,7 +201,7 @@ void KlamavUpdate::downloadComponent(QString component, QString version, QString chmod((const char *)configure,0700); // if (component == "klamav"){ -// QString dazukoconfigure = i18n("%1/%2-%3/dazuko/configure").arg(location).arg(component).arg(version); +// TQString dazukoconfigure = i18n("%1/%2-%3/dazuko/configure").arg(location).arg(component).arg(version); // // chmod((const char *)dazukoconfigure,0700); // } @@ -217,17 +217,17 @@ void KlamavUpdate::downloadComponent(QString component, QString version, QString KProcess* arkollonproc = new KShellProcess(); //make sure we catch arkollon in the .klamav directory -// QString curpath = (QString) getenv("PATH"); -// QString homedir = (QString) getenv("HOME"); +// TQString curpath = (TQString) getenv("PATH"); +// TQString homedir = (TQString) getenv("HOME"); // arkollonproc->setEnvironment("PATH",homedir+"/.klamav/bin:" + curpath); KMessageBox::information (this,i18n( "

If this the first time you've compiled software then here are a few useful tips:
" - "1. Any error messages in the log file with the words 'KDE', 'Qt','curl' or 'X' in them mean that you need to install " + "1. Any error messages in the log file with the words 'KDE', 'TQt','curl' or 'X' in them mean that you need to install " "the appropriate development libraries.
" "2. Any package provided by your distribution with 'lib' or 'devel' in the name is a development library, e.g. qt-devel, libkde.
" "3. If you encounter errors installing Dazuko, just deselect it at installation time and try the instructions at www.dazuko.org.
" "4. Some distributions provide a dazuko package, see if yours does.

" ),"Compilation Tips","compiler"); - QString command = QString("klamarkollon %1/%2-%3").arg(location).arg(component).arg(version); + TQString command = TQString("klamarkollon %1/%2-%3").arg(location).arg(component).arg(version); *arkollonproc << command; if (component == "klamav") connect( arkollonproc, SIGNAL(processExited(KProcess *)), SLOT(klamavInstallationExited(KProcess *)) ); @@ -284,7 +284,7 @@ void KlamavUpdate::checkForNewClamAVDirectly() } -void KlamavUpdate::completedSearchForUpdates(const QString &component, const QString &extension) +void KlamavUpdate::completedSearchForUpdates(const TQString &component, const TQString &extension) { double currentversion; @@ -292,7 +292,7 @@ void KlamavUpdate::completedSearchForUpdates(const QString &component, const QSt if (component == "KlamAV") currentversion = VERSION_KLAMAV; else{ - QString currentClamAVVersion = KlamavConfig::clamAVVersion(); + TQString currentClamAVVersion = KlamavConfig::clamAVVersion(); currentversion = numericizeVersion(currentClamAVVersion); } @@ -321,12 +321,12 @@ void KlamavUpdate::completedSearchForUpdates(const QString &component, const QSt -void KlamavUpdate::startProgressDialog( const QString & text ) +void KlamavUpdate::startProgressDialog( const TQString & text ) { //if ( progressDialog ) // delete progressDialog; - progressDialog = new KProgressDialog( this, "progress_dialog", QString::null, text, false ); + progressDialog = new KProgressDialog( this, "progress_dialog", TQString::null, text, false ); progressDialog->setAllowCancel( true ); progressDialog->showCancelButton( true ); @@ -338,7 +338,7 @@ void KlamavUpdate::startProgressDialog( const QString & text ) progressDialog->setMinimumDuration( 500 ); progressDialog->show(); - timer = new QTimer( this ); + timer = new TQTimer( this ); connect( timer, SIGNAL( timeout() ), this, SLOT( slotProg() ) ); timer->start( 200, FALSE ); @@ -492,7 +492,7 @@ void KlamavUpdate::parseSFPageHack() void KlamavUpdate::getVersionFromLink( const DOM::Node &n ) { double numericversion; - QString tmpversion; + TQString tmpversion; if ( n.isNull() || n.nodeType() != DOM::Node::ELEMENT_NODE ) return; @@ -503,11 +503,11 @@ void KlamavUpdate::getVersionFromLink( const DOM::Node &n ) kdDebug() << elem.getAttribute( "href" ).string() << endl; - QString name = elem.getAttribute( "href" ).string(); - QString version = name.replace(".tar.bz2","").replace(".tar.gz",""); + TQString name = elem.getAttribute( "href" ).string(); + TQString version = name.replace(".tar.bz2","").replace(".tar.gz",""); version = version.replace("clamav-","").replace("klamav-",""); - QString rawversion = version; + TQString rawversion = version; if (m_alpha) version.remove("-alpha").remove("-beta").remove("-rc"); @@ -523,7 +523,7 @@ void KlamavUpdate::getVersionFromLink( const DOM::Node &n ) } -QString KlamavUpdate::getMirror() +TQString KlamavUpdate::getMirror() { int r = 1+(int) (16.0*rand()/(RAND_MAX+1.0)); static int previousmirror = 0; @@ -537,11 +537,11 @@ QString KlamavUpdate::getMirror() return mirrors[r]; } -double KlamavUpdate::numericizeVersion(QString &version) +double KlamavUpdate::numericizeVersion(TQString &version) { - QString tmpversion = version; - QStringList tokens = QStringList::split(".",tmpversion); - for ( QStringList::Iterator it = tokens.begin(); it != tokens.end(); it++ ) + TQString tmpversion = version; + TQStringList tokens = TQStringList::split(".",tmpversion); + for ( TQStringList::Iterator it = tokens.begin(); it != tokens.end(); it++ ) { if ((*it).length() < 2) (*it).prepend("0"); -- cgit v1.2.1