diff options
author | Mavridis Philippe <mavridisf@gmail.com> | 2021-01-13 19:30:17 +0200 |
---|---|---|
committer | Mavridis Philippe <mavridisf@gmail.com> | 2021-01-13 19:30:17 +0200 |
commit | 357ddeb8afd82d69ef871c146f4fc8f2c67fb17e (patch) | |
tree | dc3ef0e6fedd64f5fb177c114f72e1515a07cd1b /src/kuarantine.cpp | |
parent | c6cbd71bc169ac0e927e52325dbbbcb506abbc73 (diff) | |
download | klamav-357ddeb8afd82d69ef871c146f4fc8f2c67fb17e.tar.gz klamav-357ddeb8afd82d69ef871c146f4fc8f2c67fb17e.zip |
Conversion Qt3->TQt
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
Diffstat (limited to 'src/kuarantine.cpp')
-rw-r--r-- | src/kuarantine.cpp | 268 |
1 files changed, 134 insertions, 134 deletions
diff --git a/src/kuarantine.cpp b/src/kuarantine.cpp index 27e4ea0..fdb335f 100644 --- a/src/kuarantine.cpp +++ b/src/kuarantine.cpp @@ -23,13 +23,13 @@ #include <kurlrequester.h> #include <kurlcompletion.h> #include <kcombobox.h> -#include <qlayout.h> +#include <tqlayout.h> #include <kmessagebox.h> #include <kstandarddirs.h> -Kuarantine::Kuarantine(QWidget *parent, const char *name) - : QWidget(parent, name) +Kuarantine::Kuarantine(TQWidget *parent, const char *name) + : TQWidget(parent, name) { config = KGlobal::config(); @@ -40,7 +40,7 @@ Kuarantine::Kuarantine(QWidget *parent, const char *name) if (lastQuarLocations.isEmpty()){ createQuarDir(); }else{ - for (QStringList::Iterator it = lastQuarLocations.begin(); it == lastQuarLocations.begin(); it++ ) + for (TQStringList::Iterator it = lastQuarLocations.begin(); it == lastQuarLocations.begin(); it++ ) quarloc = *it; if (!(KIO::NetAccess::exists(quarloc,TRUE,NULL))){ KMessageBox::information (this,i18n( "Your current quarantine location ('%1') no longer exists. I'm going to attempt to create a new one.").arg(quarloc)); @@ -52,42 +52,42 @@ Kuarantine::Kuarantine(QWidget *parent, const char *name) //Get Items for this location - lastQuarItems = config->readListEntry(QString("Items %1").arg(quarloc)); + lastQuarItems = config->readListEntry(TQString("Items %1").arg(quarloc)); if (lastQuarItems.isEmpty()){ - config->writeEntry(QString("Items %1").arg(quarloc), ""); - lastQuarItems = config->readListEntry(QString("Items %1").arg(quarloc)); + config->writeEntry(TQString("Items %1").arg(quarloc), ""); + lastQuarItems = config->readListEntry(TQString("Items %1").arg(quarloc)); } //Get History for this location - lastHistoryItems = config->readListEntry(QString("History %1").arg(quarloc)); + lastHistoryItems = config->readListEntry(TQString("History %1").arg(quarloc)); if (lastHistoryItems.isEmpty()){ - config->writeEntry(QString("History %1").arg(quarloc), ""); + config->writeEntry(TQString("History %1").arg(quarloc), ""); config->sync(); - lastHistoryItems = config->readListEntry(QString("History %1").arg(quarloc)); + lastHistoryItems = config->readListEntry(TQString("History %1").arg(quarloc)); } //Create GUI - QVBoxLayout *vbox = new QVBoxLayout(this, KDialog::marginHint(), + TQVBoxLayout *vbox = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint(), "vbox"); - QGroupBox *group = new QGroupBox(i18n("Quarantine Location"), this); + TQGroupBox *group = new TQGroupBox(i18n("Quarantine Location"), this); vbox->addWidget(group); - QGridLayout *layout = new QGridLayout( group, 9, 3, KDialog::spacingHint(), + TQGridLayout *layout = new TQGridLayout( group, 9, 3, KDialog::spacingHint(), KDialog::spacingHint(), "layout"); layout->addRowSpacing(0, group->fontMetrics().height()); layout->setColStretch(0, 1); layout->setColStretch(1, 1); - QWidget *hlp = new QWidget( group ); + TQWidget *hlp = new TQWidget( group ); layout->addMultiCellWidget(hlp, 1,1, 0,2); - QHBoxLayout *dir_layout = new QHBoxLayout(hlp, KDialog::spacingHint() ); + TQHBoxLayout *dir_layout = new TQHBoxLayout(hlp, KDialog::spacingHint() ); - QLabel *dir_label = new QLabel(i18n("&Directory:"), hlp); + TQLabel *dir_label = new TQLabel(i18n("&Directory:"), hlp); dir_label->setFixedSize(dir_label->sizeHint()); dir_label->adjustSize(); dir_layout->addWidget(dir_label); @@ -102,51 +102,51 @@ Kuarantine::Kuarantine(QWidget *parent, const char *name) dir_layout->addWidget(dir_combo); dir_label->setBuddy(dir_combo); - connect( dir_combo, SIGNAL(urlSelected(const QString &)), + connect( dir_combo, SIGNAL(urlSelected(const TQString &)), SLOT(updateLastQuarLocations()) ); - connect( dir_combo, SIGNAL(textChanged(const QString &)), + connect( dir_combo, SIGNAL(textChanged(const TQString &)), SLOT(updateLastQuarLocations()) ); - QGroupBox *group2 = new QGroupBox(i18n("Contents Of Quarantine"), this); + TQGroupBox *group2 = new TQGroupBox(i18n("Contents Of Quarantine"), this); vbox->addWidget(group2); - QGridLayout *layout2 = new QGridLayout( group2, 9, 3, KDialog::spacingHint(), + TQGridLayout *layout2 = new TQGridLayout( group2, 9, 3, KDialog::spacingHint(), KDialog::spacingHint(), "layout2"); layout2->addRowSpacing(0, group2->fontMetrics().height()); layout2->setColStretch(0, 1); layout2->setColStretch(1, 1); - QWidget *hlp2 = new QWidget( group2 ); + TQWidget *hlp2 = new TQWidget( group2 ); layout2->addMultiCellWidget(hlp2, 1,1, 0,2); - QHBoxLayout *dir_layout2 = new QHBoxLayout(hlp2, KDialog::spacingHint() ); + TQHBoxLayout *dir_layout2 = new TQHBoxLayout(hlp2, KDialog::spacingHint() ); -// currentbox = new QListBox(hlp2); -// QFontMetrics rb_fm(currentbox->fontMetrics()); +// currentbox = new TQListBox(hlp2); +// TQFontMetrics rb_fm(currentbox->fontMetrics()); // currentbox->setMinimumSize(rb_fm.width("0")*25, // rb_fm.lineSpacing()*8); // dir_layout2->addWidget(currentbox); - currentbox = new QListView(hlp2); + currentbox = new TQListView(hlp2); currentbox->setShowSortIndicator(true); - QFontMetrics rb_fm(currentbox->fontMetrics()); + TQFontMetrics rb_fm(currentbox->fontMetrics()); //currentbox->setMinimumSize(rb_fm.width("0")*55, // rb_fm.lineSpacing()*15); //kdDebug() << ((currentbox->width())/3) << endl; currentbox->addColumn( i18n( "Name of File" ),0); currentbox->addColumn( i18n( "Name of Virus Found" ),0); currentbox->addColumn( i18n( "Date Quarantined" ),0); - currentbox->setResizeMode(QListView::AllColumns); - currentbox->setSelectionMode( QListView::Extended ); + currentbox->setResizeMode(TQListView::AllColumns); + currentbox->setSelectionMode( TQListView::Extended ); currentbox->setAllColumnsShowFocus(true); - qmenu = new QPopupMenu( currentbox ); + qmenu = new TQPopupMenu( currentbox ); - connect(currentbox, SIGNAL( contextMenuRequested( QListViewItem *, const QPoint& , int ) ), - this, SLOT( slotRMB( QListViewItem *, const QPoint &, int ) ) ); + connect(currentbox, SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint& , int ) ), + this, SLOT( slotRMB( TQListViewItem *, const TQPoint &, int ) ) ); dir_layout2->addWidget(currentbox); @@ -154,7 +154,7 @@ Kuarantine::Kuarantine(QWidget *parent, const char *name) refresh(); - KButtonBox *actionbox = new KButtonBox(hlp2, Qt::Vertical); + KButtonBox *actionbox = new KButtonBox(hlp2, TQt::Vertical); actionbox->addStretch(); refresh_button = actionbox->addButton(i18n("&Refresh")); refresh_button->setDefault(true); @@ -178,48 +178,48 @@ Kuarantine::Kuarantine(QWidget *parent, const char *name) - QGroupBox *group3 = new QGroupBox(i18n("Quarantine History"), this); + TQGroupBox *group3 = new TQGroupBox(i18n("Quarantine History"), this); vbox->addWidget(group3); - QGridLayout *layout3 = new QGridLayout( group3, 9, 2, KDialog::spacingHint(), + TQGridLayout *layout3 = new TQGridLayout( group3, 9, 2, KDialog::spacingHint(), KDialog::spacingHint(), "layout3"); layout3->addRowSpacing(0, group3->fontMetrics().height()); layout3->setColStretch(0, 1); layout3->setColStretch(1, 1); - QWidget *hlp3 = new QWidget( group3 ); + TQWidget *hlp3 = new TQWidget( group3 ); layout3->addMultiCellWidget(hlp3, 1,1, 0,2); - QHBoxLayout *dir_layout3 = new QHBoxLayout(hlp3, KDialog::spacingHint() ); + TQHBoxLayout *dir_layout3 = new TQHBoxLayout(hlp3, KDialog::spacingHint() ); -// historybox = new QListBox(hlp3); -// QFontMetrics rb_fm3(historybox->fontMetrics()); +// historybox = new TQListBox(hlp3); +// TQFontMetrics rb_fm3(historybox->fontMetrics()); // historybox->setMinimumSize(rb_fm3.width("0")*25, // rb_fm3.lineSpacing()*8); // dir_layout3->addWidget(historybox); - historybox = new QListView(hlp3); + historybox = new TQListView(hlp3); historybox->setShowSortIndicator(true); - QFontMetrics rb_fm2(historybox->fontMetrics()); + TQFontMetrics rb_fm2(historybox->fontMetrics()); //historybox->setMinimumSize(rb_fm2.width("0")*55, // rb_fm2.lineSpacing()*15); historybox->addColumn( i18n( "Name of File" ),(historybox->width())); historybox->addColumn( i18n( "Name of Virus Found" ),(historybox->width())); historybox->addColumn( i18n( "Date Quarantined" ),(historybox->width())); - historybox->setResizeMode(QListView::AllColumns); - historybox->setSelectionMode( QListView::Extended ); + historybox->setResizeMode(TQListView::AllColumns); + historybox->setSelectionMode( TQListView::Extended ); historybox->setAllColumnsShowFocus(true); - hmenu = new QPopupMenu( historybox ); + hmenu = new TQPopupMenu( historybox ); - connect(historybox, SIGNAL( contextMenuRequested( QListViewItem *, const QPoint& , int ) ), - this, SLOT( slotRMB( QListViewItem *, const QPoint &, int ) ) ); + connect(historybox, SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint& , int ) ), + this, SLOT( slotRMB( TQListViewItem *, const TQPoint &, int ) ) ); dir_layout3->addWidget(historybox); //layout->addMultiCellWidget(historybox, 2, 2, 0, 2); - KButtonBox *actionbox3 = new KButtonBox(hlp3, Qt::Vertical); + KButtonBox *actionbox3 = new KButtonBox(hlp3, TQt::Vertical); actionbox3->addStretch(); search_button3 = actionbox3->addButton(i18n("&Clear All")); search_button3->setDefault(true); @@ -249,10 +249,10 @@ void Kuarantine::refresh() { - QStringList obsoleteQuarItems; + TQStringList obsoleteQuarItems; config = KGlobal::config(); config->setGroup("Kuarantine"); - lastQuarItems = config->readListEntry(QString("Items %1").arg(quarloc)); + lastQuarItems = config->readListEntry(TQString("Items %1").arg(quarloc)); if (!(KIO::NetAccess::exists(quarloc,TRUE,NULL))){ KMessageBox::information (this,i18n("Your current quarantine location ('%1') no longer exists. I'm going to attempt to create a new one.").arg(quarloc)); @@ -260,14 +260,14 @@ void Kuarantine::refresh() }else{ currentbox->clear(); - for (QStringList::Iterator it = lastQuarItems.begin(); it != lastQuarItems.end(); it++ ){ + for (TQStringList::Iterator it = lastQuarItems.begin(); it != lastQuarItems.end(); it++ ){ - QString fname = getFileName(*it); - QString itemname = getVirusName(*it); - QString when = getWhen(*it); + TQString fname = getFileName(*it); + TQString itemname = getVirusName(*it); + TQString when = getWhen(*it); - QStringList tokens = QStringList::split ( "/", fname, FALSE ); - QString qname = tokens.last(); + TQStringList tokens = TQStringList::split ( "/", fname, FALSE ); + TQString qname = tokens.last(); qname.prepend("/"); qname.prepend(quarloc); @@ -275,17 +275,17 @@ void Kuarantine::refresh() //kdDebug() << qname << endl; if (KIO::NetAccess::exists(qname,TRUE,NULL)){ //currentbox->insertItem(*it); - new QListViewItem( currentbox, fname, itemname,when); + new TQListViewItem( currentbox, fname, itemname,when); }else{ //kdDebug() << qname << "doesna exist" << endl; obsoleteQuarItems.append(*it); } } - for (QStringList::Iterator it = obsoleteQuarItems.begin(); it != obsoleteQuarItems.end(); it++ ) + for (TQStringList::Iterator it = obsoleteQuarItems.begin(); it != obsoleteQuarItems.end(); it++ ) lastQuarItems.remove(*it); - config->writeEntry(QString("Items %1").arg(quarloc), lastQuarItems); + config->writeEntry(TQString("Items %1").arg(quarloc), lastQuarItems); } config->sync(); @@ -295,32 +295,32 @@ void Kuarantine::refreshhistory() { config = KGlobal::config(); config->setGroup("Kuarantine"); - lastHistoryItems = config->readListEntry(QString("History %1").arg(quarloc)); + lastHistoryItems = config->readListEntry(TQString("History %1").arg(quarloc)); historybox->clear(); - for (QStringList::Iterator it = lastHistoryItems.begin(); it != lastHistoryItems.end(); it++ ){ - QString fname = getFileName(*it); - QString itemname = getVirusName(*it); - QString when = getWhen(*it); + for (TQStringList::Iterator it = lastHistoryItems.begin(); it != lastHistoryItems.end(); it++ ){ + TQString fname = getFileName(*it); + TQString itemname = getVirusName(*it); + TQString when = getWhen(*it); - new QListViewItem( historybox, fname, itemname,when); + new TQListViewItem( historybox, fname, itemname,when); } } void Kuarantine::load() { - QString target; + TQString target; // the below code is what you should normally do. in this // example case, we want the url to our own. you probably // want to use this code instead for your app currentbox->clear(); - for (QStringList::Iterator it = lastQuarItems.begin(); it != lastQuarItems.end(); it++ ){ - QString fname = getFileName(*it); - QString itemname = getVirusName(*it); - QString when = getWhen(*it); + for (TQStringList::Iterator it = lastQuarItems.begin(); it != lastQuarItems.end(); it++ ){ + TQString fname = getFileName(*it); + TQString itemname = getVirusName(*it); + TQString when = getWhen(*it); - new QListViewItem( currentbox, fname, itemname,when); + new TQListViewItem( currentbox, fname, itemname,when); } } @@ -331,22 +331,22 @@ void Kuarantine::slotSearch() //if (!(currentbox->selectedItem())) // return; - QPtrList<QListViewItem> list; + TQPtrList<TQListViewItem> list; - QListViewItemIterator it( currentbox, QListViewItemIterator::Selected ); + TQListViewItemIterator it( currentbox, TQListViewItemIterator::Selected ); while ( it.current() ) { - QListViewItem* tItem = it.current(); + TQListViewItem* tItem = it.current(); config = KGlobal::config(); config->setGroup("Kuarantine"); - lastQuarItems = config->readListEntry(QString("Items %1").arg(quarloc)); - lastHistoryItems = config->readListEntry(QString("History %1").arg(quarloc)); + lastQuarItems = config->readListEntry(TQString("Items %1").arg(quarloc)); + lastHistoryItems = config->readListEntry(TQString("History %1").arg(quarloc)); - QString fname = tItem->text(0); + TQString fname = tItem->text(0); - QStringList tokens = QStringList::split ( "/", fname, FALSE ); - QString qname = tokens.last(); + TQStringList tokens = TQStringList::split ( "/", fname, FALSE ); + TQString qname = tokens.last(); qname.prepend("/"); qname.prepend(quarloc); qname.append(":"+tItem->text(2)); @@ -357,7 +357,7 @@ void Kuarantine::slotSearch() //currentbox->takeItem(currentbox->currentItem()); list.prepend( it.current() ); - config->writeEntry(QString("Items %1").arg(quarloc), lastQuarItems); + config->writeEntry(TQString("Items %1").arg(quarloc), lastQuarItems); config->sync(); }else{ KMessageBox::information (this,i18n("<p>There was a problem restoring <b>%1</b>. Check your diskspace, the permissions on the location you are restoring to, and whether a file with the same name already exists in that location. </p>").arg(fname)); @@ -365,7 +365,7 @@ void Kuarantine::slotSearch() ++it; } -for( QListViewItem *item = list.first(); item; item = list.next() ) +for( TQListViewItem *item = list.first(); item; item = list.next() ) { delete item; } @@ -408,30 +408,30 @@ void Kuarantine::slotCancel() //if (!(currentbox->selectedItem())) // return; - QPtrList<QListViewItem> list; + TQPtrList<TQListViewItem> list; - QListViewItemIterator it( currentbox, QListViewItemIterator::Selected ); + TQListViewItemIterator it( currentbox, TQListViewItemIterator::Selected ); while ( it.current() ) { - //QListViewItem* tItem = ( *it ); + //TQListViewItem* tItem = ( *it ); //if (tItem->isSelected()){ config = KGlobal::config(); config->setGroup("Kuarantine"); - lastQuarItems = config->readListEntry(QString("Items %1").arg(quarloc)); - lastHistoryItems = config->readListEntry(QString("History %1").arg(quarloc)); + lastQuarItems = config->readListEntry(TQString("Items %1").arg(quarloc)); + lastHistoryItems = config->readListEntry(TQString("History %1").arg(quarloc)); - QString QuarLocation = dir_combo->url(); + TQString QuarLocation = dir_combo->url(); - //QStringList tokens = QStringList::split ( ":", ( it.current() )->text(), FALSE ); - QString fname = ( it.current() )->text(0); - QString itemname = ( it.current() )->text(1); - QString when = ( it.current() )->text(2); + //TQStringList tokens = TQStringList::split ( ":", ( it.current() )->text(), FALSE ); + TQString fname = ( it.current() )->text(0); + TQString itemname = ( it.current() )->text(1); + TQString when = ( it.current() )->text(2); - QStringList tokens = QStringList::split ( "/", fname, FALSE ); - QString qname = tokens.last(); + TQStringList tokens = TQStringList::split ( "/", fname, FALSE ); + TQString qname = tokens.last(); qname.prepend("/"); qname.prepend(QuarLocation); qname.append(":"+( it.current() )->text(2)); @@ -441,7 +441,7 @@ void Kuarantine::slotCancel() lastQuarItems.remove(( it.current() )->text(0)+":"+( it.current() )->text(1)+":"+( it.current() )->text(2)); lastHistoryItems.prepend(( it.current() )->text(0)+":"+( it.current() )->text(1)+":"+( it.current() )->text(2)); - new QListViewItem( historybox, fname, itemname,when); + new TQListViewItem( historybox, fname, itemname,when); //historybox->inser( it.current() )(( it.current() )->text()); //currentbox->takeItem(( it.current() )); @@ -453,13 +453,13 @@ void Kuarantine::slotCancel() ++it; } - for( QListViewItem *item = list.first(); item; item = list.next() ) + for( TQListViewItem *item = list.first(); item; item = list.next() ) { delete item; } - config->writeEntry(QString("Items %1").arg(quarloc), lastQuarItems); - config->writeEntry(QString("History %1").arg(quarloc), lastHistoryItems); + config->writeEntry(TQString("Items %1").arg(quarloc), lastQuarItems); + config->writeEntry(TQString("History %1").arg(quarloc), lastHistoryItems); config->sync(); @@ -475,14 +475,14 @@ void Kuarantine::slotClearHistory() historybox->clear(); config = KGlobal::config(); config->setGroup("Kuarantine"); - lastHistoryItems = config->readListEntry(QString("History %1").arg(quarloc)); + lastHistoryItems = config->readListEntry(TQString("History %1").arg(quarloc)); if (lastHistoryItems.isEmpty()) return; lastHistoryItems.clear(); - config->writeEntry(QString("History %1").arg(quarloc), lastHistoryItems); + config->writeEntry(TQString("History %1").arg(quarloc), lastHistoryItems); config->sync(); @@ -495,14 +495,14 @@ void Kuarantine::slotDeleteHistory() //if (!(historybox->selectedItem())) // return; - //QListViewItem* tItem = historybox->selectedItem(); + //TQListViewItem* tItem = historybox->selectedItem(); config->setGroup("Kuarantine"); - lastHistoryItems = config->readListEntry(QString("History %1").arg(quarloc)); + lastHistoryItems = config->readListEntry(TQString("History %1").arg(quarloc)); - QPtrList<QListViewItem> list; + TQPtrList<TQListViewItem> list; - QListViewItemIterator it( historybox, QListViewItemIterator::Selected ); + TQListViewItemIterator it( historybox, TQListViewItemIterator::Selected ); while ( it.current() ) { @@ -512,36 +512,36 @@ void Kuarantine::slotDeleteHistory() ++it; } - for( QListViewItem *item = list.first(); item; item = list.next() ) + for( TQListViewItem *item = list.first(); item; item = list.next() ) { delete item; } - config->writeEntry(QString("History %1").arg(quarloc), lastHistoryItems); + config->writeEntry(TQString("History %1").arg(quarloc), lastHistoryItems); config->sync(); } -void Kuarantine::setDirName(QString dir){ +void Kuarantine::setDirName(TQString dir){ // dir_combo->setEditText(dir); dir_combo->setURL(dir); } void Kuarantine::createQuarDir(){ - 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 += "/quarantine"; if (ok) { - QDir klamavqdir(path); + TQDir klamavqdir(path); if (!klamavqdir.exists() && !klamavqdir.mkdir(path)) ok = false; else @@ -549,8 +549,8 @@ void Kuarantine::createQuarDir(){ } if (ok){ - quarloc = QString("%1").arg(path); - lastQuarLocations.append( QString("%1").arg(path)); + quarloc = TQString("%1").arg(path); + lastQuarLocations.append( TQString("%1").arg(path)); config = KGlobal::config(); config->setGroup("Kuarantine"); config->writeEntry("KuarantineLocations", lastQuarLocations); @@ -559,16 +559,16 @@ void Kuarantine::createQuarDir(){ } - KMessageBox::information (this,QString(ok ? i18n( "Your default quarantine location has been set up as '%1'. You can change this to something else if you want to." ) : i18n( "I cannot create the directory '%1' for you. Something is wrong with your HOME or klamav directory. You have to adjust your quarantine directory by your self." )).arg(path)); + KMessageBox::information (this,TQString(ok ? i18n( "Your default quarantine location has been set up as '%1'. You can change this to something else if you want to." ) : i18n( "I cannot create the directory '%1' for you. Something is wrong with your HOME or klamav directory. You have to adjust your quarantine directory by your self." )).arg(path)); } -QString Kuarantine::getFileName(QString entry){ +TQString Kuarantine::getFileName(TQString entry){ int fnameStartPoint = 0; int dtStartPoint = entry.findRev(":"); int fnameEndPoint = entry.findRev(":", (signed int)-((entry.length() - dtStartPoint)+1)); - QString fname = entry.mid(fnameStartPoint,(fnameEndPoint - fnameStartPoint)); + TQString fname = entry.mid(fnameStartPoint,(fnameEndPoint - fnameStartPoint)); //kdDebug() << fname << endl; @@ -576,12 +576,12 @@ QString Kuarantine::getFileName(QString entry){ } -QString Kuarantine::getVirusName(QString entry){ +TQString Kuarantine::getVirusName(TQString entry){ int dtStartPoint = entry.findRev(":"); int fnameEndPoint = entry.findRev(":", (signed int)-((entry.length() - dtStartPoint)+1)); - QString itemName = entry.mid((fnameEndPoint+1),((dtStartPoint+1) - (fnameEndPoint+2))); + TQString itemName = entry.mid((fnameEndPoint+1),((dtStartPoint+1) - (fnameEndPoint+2))); //kdDebug() << itemName << endl; @@ -589,11 +589,11 @@ QString Kuarantine::getVirusName(QString entry){ } -QString Kuarantine::getWhen(QString entry){ +TQString Kuarantine::getWhen(TQString entry){ int dtStartPoint = entry.findRev(":"); - QString when = entry.mid((dtStartPoint+1),(entry.length() - (dtStartPoint+1))); + TQString when = entry.mid((dtStartPoint+1),(entry.length() - (dtStartPoint+1))); //kdDebug() << when << endl; @@ -601,38 +601,38 @@ QString Kuarantine::getWhen(QString entry){ } -void Kuarantine::slotRMB( QListViewItem* Item, const QPoint & point, int ) +void Kuarantine::slotRMB( TQListViewItem* Item, const TQPoint & point, int ) { if( Item ){ - QPixmap gicon; - QPixmap vicon; - QPixmap ticon; - QPixmap vlicon; + TQPixmap gicon; + TQPixmap vicon; + TQPixmap ticon; + TQPixmap vlicon; - QString iconPath = locate("cache", KMimeType::favIconForURL("http://www.viruspool.net")+".png"); + TQString iconPath = locate("cache", KMimeType::favIconForURL("http://www.viruspool.net")+".png"); if ( iconPath.isEmpty() ) vicon = SmallIcon("find"); else - vicon = QPixmap( iconPath ); + vicon = TQPixmap( iconPath ); iconPath = locate("cache", KMimeType::favIconForURL("http://www.google.com")+".png"); if ( iconPath.isEmpty() ) gicon = SmallIcon("find"); else - gicon = QPixmap( iconPath ); + gicon = TQPixmap( iconPath ); iconPath = locate("cache", KMimeType::favIconForURL("http://www.trendmicro.com")+".png"); if ( iconPath.isEmpty() ) ticon = SmallIcon("find"); else - ticon = QPixmap( iconPath ); + ticon = TQPixmap( iconPath ); iconPath = locate("cache", KMimeType::favIconForURL("http://www.viruslist.com")+".png"); if ( iconPath.isEmpty() ) vlicon = SmallIcon("find"); else - vlicon = QPixmap( iconPath ); + vlicon = TQPixmap( iconPath ); if (Item->listView() == currentbox){ @@ -657,50 +657,50 @@ void Kuarantine::slotRMB( QListViewItem* Item, const QPoint & point, int ) void Kuarantine::slotVirusPoolCurrent() { - QString name = currentbox->currentItem()->text(1); + TQString name = currentbox->currentItem()->text(1); kmain->klamdb->slotExternal(name,"VirusPool"); } void Kuarantine::slotVirusListCurrent() { - QString name = currentbox->currentItem()->text(1); + TQString name = currentbox->currentItem()->text(1); kmain->klamdb->slotExternal(name,"VirusList"); } void Kuarantine::slotGoogleCurrent() { - QString name = currentbox->currentItem()->text(1); + TQString name = currentbox->currentItem()->text(1); kmain->klamdb->slotExternal(name,"Google"); } void Kuarantine::slotTrendMicroCurrent() { - QString name = currentbox->currentItem()->text(1); + TQString name = currentbox->currentItem()->text(1); kmain->klamdb->slotExternal(name, "TrendMicro"); } void Kuarantine::slotVirusPoolHistory() { - QString name = historybox->currentItem()->text(1); + TQString name = historybox->currentItem()->text(1); kmain->klamdb->slotExternal(name,"VirusPool"); } void Kuarantine::slotVirusListHistory() { - QString name = historybox->currentItem()->text(1); + TQString name = historybox->currentItem()->text(1); kmain->klamdb->slotExternal(name,"VirusList"); } void Kuarantine::slotGoogleHistory() { - QString name = historybox->currentItem()->text(1); + TQString name = historybox->currentItem()->text(1); kmain->klamdb->slotExternal(name,"Google"); } void Kuarantine::slotTrendMicroHistory() { - QString name = historybox->currentItem()->text(1); + TQString name = historybox->currentItem()->text(1); kmain->klamdb->slotExternal(name, "TrendMicro"); } |