summaryrefslogtreecommitdiffstats
path: root/src/klamav.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/klamav.cpp')
-rw-r--r--src/klamav.cpp70
1 files changed, 35 insertions, 35 deletions
diff --git a/src/klamav.cpp b/src/klamav.cpp
index 282b117..4778c11 100644
--- a/src/klamav.cpp
+++ b/src/klamav.cpp
@@ -21,16 +21,16 @@
#include <kaction.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
#include <ksystemtray.h>
#include <kpopupmenu.h>
#include <kdebug.h>
#include <kmessagebox.h>
#include <kurl.h>
-#include <qdir.h>
-#include <qfile.h>
+#include <tqdir.h>
+#include <tqfile.h>
Klamav *kmain = 0L;
@@ -44,8 +44,8 @@ Klamav::Klamav()
downloadClamAVForWizard = false;
kmain = this;
- QVBoxLayout *top = new QVBoxLayout(this,10,10);
- tab = new QTabWidget(this);
+ TQVBoxLayout *top = new TQVBoxLayout(this,10,10);
+ tab = new TQTabWidget(this);
_tray = new KSystemTray(kmain, "klamav tray");
_tray->setPixmap(KSystemTray::loadIcon("klamav_on_acc_disabled"));
@@ -63,7 +63,7 @@ Klamav::Klamav()
EnableKlamd->plug(conf_menu);
DisableKlamd->plug(conf_menu);
- QToolTip::add( _tray, i18n( "KlamAV - Virus Protection for KDE" ) );
+ TQToolTip::add( _tray, i18n( "KlamAV - Virus Protection for KDE" ) );
_tray->show();
DisableFreshklam->setEnabled(FALSE);
@@ -73,10 +73,10 @@ Klamav::Klamav()
KConfig* config = KGlobal::config();
config->setGroup("Freshklam");
- QStringList DatabasePaths = config->readListEntry("lastDownloadPaths");
+ TQStringList DatabasePaths = config->readListEntry("lastDownloadPaths");
config->setGroup("Kuarantine");
- QStringList QuarantinePaths = config->readListEntry("KuarantineLocations");
+ TQStringList QuarantinePaths = config->readListEntry("KuarantineLocations");
if ((DatabasePaths.isEmpty()) && (QuarantinePaths.isEmpty())){
@@ -122,14 +122,14 @@ Klamav::Klamav()
top->addWidget(tab);
- connect(tab,SIGNAL(currentChanged ( QWidget * ) ),klamdb,SLOT(shouldIShow(QWidget *)));
+ connect(tab,SIGNAL(currentChanged ( TQWidget * ) ),klamdb,SLOT(shouldIShow(TQWidget *)));
KStdAction::quit(this, SLOT(shuttingDown()), actionCollection());
if (KApplication::kApplication()->isRestored()){
/* config = KGlobal::config();
config->setGroup("Klamd");
- QString RunKlamd = config->readEntry("Enabled");
+ TQString RunKlamd = config->readEntry("Enabled");
if (RunKlamd == "Yes"){
_tray->setPixmap(KSystemTray::loadIcon("klamav"));
@@ -156,7 +156,7 @@ Klamav::Klamav()
CollectionDB::instance()->insertEvent("Launch","KlamAV Launched");
- setCaption(QString("KlamAV %1 (Using ClamAV %2)").arg(KLAMAV_VERSION).arg(KlamavConfig::clamAVVersion()));
+ setCaption(TQString("KlamAV %1 (Using ClamAV %2)").arg(KLAMAV_VERSION).arg(KlamavConfig::clamAVVersion()));
}
Klamav::~Klamav()
@@ -244,43 +244,43 @@ void Klamav::firstRunWizard() {
FirstRunWizard wizard;
wizard.setCaption( i18n( "First-Run Wizard" ));
- QString homepath = getenv("HOME");
- QString defaultdb = homepath + "/.klamav/database";
- QString defaultquar = homepath + "/.klamav/quarantine";
- if( wizard.exec() != QDialog::Rejected ){
+ TQString homepath = getenv("HOME");
+ TQString defaultdb = homepath + "/.klamav/database";
+ TQString defaultquar = homepath + "/.klamav/quarantine";
+ if( wizard.exec() != TQDialog::Rejected ){
KConfig* config = KGlobal::config();
config->setGroup("Freshklam");
- QString wizardDBPath = wizard.databasePath().path(-1);
- QString wizardQRPath = wizard.quarantinePath().path(-1);
+ TQString wizardDBPath = wizard.databasePath().path(-1);
+ TQString wizardTQRPath = wizard.quarantinePath().path(-1);
/* kdDebug() << wizard.databasePath() << endl;
kdDebug() << wizard.defaultDatabasePath() << endl;*/
//Configure Database Path
- QStringList lastDownloadPaths;
- if ((wizardDBPath != "") && (QDir::cleanDirPath(wizardDBPath) != defaultdb)){
- lastDownloadPaths.prepend( QString("%1").arg(wizardDBPath));
+ TQStringList lastDownloadPaths;
+ if ((wizardDBPath != "") && (TQDir::cleanDirPath(wizardDBPath) != defaultdb)){
+ lastDownloadPaths.prepend( TQString("%1").arg(wizardDBPath));
checkDir(wizardDBPath);
}else{
- lastDownloadPaths.prepend( QString("%1").arg(wizard.defaultDatabasePath()));
+ lastDownloadPaths.prepend( TQString("%1").arg(wizard.defaultDatabasePath()));
createDefaultKlamAVDir("database");
}
config->writeEntry("lastDownloadPaths", lastDownloadPaths);
config->sync();
//Configure Quarantine Path
- QStringList lastQuarLocations;
+ TQStringList lastQuarLocations;
config->setGroup("Kuarantine");
/* kdDebug() << wizard.quarantinePath() << endl;
kdDebug() << wizard.defaultQuarantinePath() << endl;
kdDebug() << defaultquar << endl;*/
- if ((wizardQRPath != "") && (QDir::cleanDirPath(wizardQRPath) != defaultquar)){
- lastQuarLocations.prepend( QString("%1").arg(wizardQRPath));
- checkDir(wizardQRPath);
+ if ((wizardTQRPath != "") && (TQDir::cleanDirPath(wizardTQRPath) != defaultquar)){
+ lastQuarLocations.prepend( TQString("%1").arg(wizardTQRPath));
+ checkDir(wizardTQRPath);
}else{
- lastQuarLocations.prepend( QString("%1").arg(wizard.defaultQuarantinePath()));
+ lastQuarLocations.prepend( TQString("%1").arg(wizard.defaultQuarantinePath()));
createDefaultKlamAVDir("quarantine");
}
config->writeEntry("KuarantineLocations", lastQuarLocations);
@@ -299,20 +299,20 @@ void Klamav::firstRunWizard() {
}
-void Klamav::createDefaultKlamAVDir(QString type){
+void Klamav::createDefaultKlamAVDir(TQString type){
- QString path = getenv("HOME");
+ TQString path = getenv("HOME");
bool ok = true;
// directory exist?
path += "/.klamav";
- QDir klamavdir(path);
+ TQDir klamavdir(path);
if (!klamavdir.exists() && !klamavdir.mkdir(path))
ok = false;
path += "/" + type;
if (ok)
{
- QDir klamavqdir(path);
+ TQDir klamavqdir(path);
if (!klamavqdir.exists() && !klamavqdir.mkdir(path))
ok = false;
else
@@ -321,17 +321,17 @@ void Klamav::createDefaultKlamAVDir(QString type){
}
-void Klamav::checkDir(QString path){
+void Klamav::checkDir(TQString path){
- QDir klamavdir(path);
- QFile f1( path );
+ TQDir klamavdir(path);
+ TQFile f1( path );
if ((!klamavdir.exists()) || (f1.open( IO_ReadWrite )))
KMessageBox::information(this, i18n("Either the directory %1 does not exist or you are not able to write to it. Either way, you will have to change it as it cannot be used. Sorry!").arg(path));
f1.close();
}
-void Klamav::slotConfigKlamav( const QCString& page )
+void Klamav::slotConfigKlamav( const TQCString& page )
{
KlamavConfigDialog* dialog = (KlamavConfigDialog*) KConfigDialog::exists( "settings" );