diff options
Diffstat (limited to 'kdpkg/kdpkg.cpp')
-rw-r--r-- | kdpkg/kdpkg.cpp | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/kdpkg/kdpkg.cpp b/kdpkg/kdpkg.cpp index e08fa3d..a8ecd01 100644 --- a/kdpkg/kdpkg.cpp +++ b/kdpkg/kdpkg.cpp @@ -24,28 +24,28 @@ #include <kaboutapplication.h> #include <kurlrequester.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qlistview.h> -#include <qlistbox.h> -#include <qtextbrowser.h> -#include <qwidgetstack.h> -#include <qprocess.h> -#include <qregexp.h> -#include <qfiledialog.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqlistview.h> +#include <tqlistbox.h> +#include <tqtextbrowser.h> +#include <tqwidgetstack.h> +#include <tqprocess.h> +#include <tqregexp.h> +#include <tqfiledialog.h> #include "kdpkg.h" -kdpkg::kdpkg( const QString &url, QWidget *parent, const char *name, const QStringList &) -:KdpkgDialog(parent, name) +kdpkg::kdpkg( const TQString &url, TQWidget *tqparent, const char *name, const TQStringList &) +:KdpkgDialog(tqparent, name) { if( !url ) - path = KFileDialog::getOpenFileName( QString::null, QString("*.deb|") + i18n("Debian Package (*.deb)"), this, i18n("Choose a Debian package file to open")); + path = KFileDialog::getOpenFileName( TQString(), TQString("*.deb|") + i18n("Debian Package (*.deb)"), this, i18n("Choose a Debian package file to open")); else path = url; @@ -55,17 +55,17 @@ kdpkg::kdpkg( const QString &url, QWidget *parent, const char *name, const QStri // show fields this->shell->setCommand("dpkg -f "+path); this->shell->start(true); - fields = QStringList::split( "\n", this->shell->getBuffer().stripWhiteSpace() ); + fields = TQStringList::split( "\n", this->shell->getBuffer().stripWhiteSpace() ); showFields(); // show files this->shell->setCommand("dpkg -c "+url); this->shell->start(true); - QStringList files = QStringList::split( "\n", this->shell->getBuffer().stripWhiteSpace() ); - QString tmp; + TQStringList files = TQStringList::split( "\n", this->shell->getBuffer().stripWhiteSpace() ); + TQString tmp; for(uint i = 0; i < files.count(); i++) - tmp += QStringList::split( ".", files[i])[1]+"<br>"; + tmp += TQStringList::split( ".", files[i])[1]+"<br>"; filesTextBrowser->setText( tmp ) ; @@ -87,11 +87,11 @@ void kdpkg::showFields() // common //-------- - QString pkgName = fields.grep("Package:")[0].mid(9); - QString pkgVersion = fields.grep("Version:")[0].mid(9); - QStringList versions = getVersions(fields.grep("Package:")[0].mid(9)); - QString sysVersion = versions[0]; - QString repVersion = versions[1]; + TQString pkgName = fields.grep("Package:")[0].mid(9); + TQString pkgVersion = fields.grep("Version:")[0].mid(9); + TQStringList versions = getVersions(fields.grep("Package:")[0].mid(9)); + TQString sysVersion = versions[0]; + TQString repVersion = versions[1]; package2TextLabel->setText( pkgName ); version2TextLabel->setText( pkgVersion+" (Package)<br>"+sysVersion+" (System)<br>"+repVersion+" (Repository)"); @@ -102,8 +102,8 @@ void kdpkg::showFields() // description //------------- - QStringList tmp = fields.grep( QRegExp("^ ") ); - QString description = "<b>"+fields.grep("Description:")[0].mid(13)+"</b><br><br>"; + TQStringList tmp = fields.grep( TQRegExp("^ ") ); + TQString description = "<b>"+fields.grep("Description:")[0].mid(13)+"</b><br><br>"; for(uint i = 0; i < tmp.count(); i++) { if( tmp[i] == " ." ) @@ -125,7 +125,7 @@ void kdpkg::showFields() types.append("Conflicts"); types.append("Replaces"); - for( QStringList::Iterator it = types.begin(); it != types.end(); ++it ) + for( TQStringList::Iterator it = types.begin(); it != types.end(); ++it ) dependencies.append(fields.grep(*it+":")[0]); showDependencies(0); } @@ -145,19 +145,19 @@ void kdpkg::showDependencies(int i) if(i == 0) // all { - for( QStringList::Iterator it = dependencies.begin(); it != dependencies.end(); ++it ) + for( TQStringList::Iterator it = dependencies.begin(); it != dependencies.end(); ++it ) { - QStringList tmp = QStringList::split( ", ", *it ); - QString type = QStringList::split( ":", tmp[0])[0]; - tmp[0] = QStringList::split( ": ", tmp[0] )[1]; + TQStringList tmp = TQStringList::split( ", ", *it ); + TQString type = TQStringList::split( ":", tmp[0])[0]; + tmp[0] = TQStringList::split( ": ", tmp[0] )[1]; for(uint i = 0; i < tmp.count(); i++) dependenciesListBox->insertItem( type+": "+tmp[i] ); } } else { - QString choice = types[i-1]; - dependenciesListBox->insertStringList( QStringList::split( ", ", dependencies.grep(choice+":")[0].mid(choice.length()+2) ) ); + TQString choice = types[i-1]; + dependenciesListBox->insertStringList( TQStringList::split( ", ", dependencies.grep(choice+":")[0].mid(choice.length()+2) ) ); } } @@ -166,27 +166,27 @@ void kdpkg::showDependencies(int i) //--- get --------------------------------------------------------------------// //----------------------------------------------------------------------------// -QStringList kdpkg::getVersions(QString package) +TQStringList kdpkg::getVersions(TQString package) { this->shell->setCommand("apt-cache policy "+package); this->shell->start(true); - QStringList input = QStringList::split( "\n", this->shell->getBuffer().stripWhiteSpace() ); + TQStringList input = TQStringList::split( "\n", this->shell->getBuffer().stripWhiteSpace() ); - QString sysVersion = input[1]; - sysVersion = QStringList::split( ":", sysVersion)[1].replace(" ",""); + TQString sysVersion = input[1]; + sysVersion = TQStringList::split( ":", sysVersion)[1].tqreplace(" ",""); - if( sysVersion.contains("(") || sysVersion == "" ) + if( sysVersion.tqcontains("(") || sysVersion == "" ) sysVersion = i18n("not installed"); - QString repVersion = input[2]; - repVersion = QStringList::split( ":", repVersion)[1].replace(" ",""); + TQString repVersion = input[2]; + repVersion = TQStringList::split( ":", repVersion)[1].tqreplace(" ",""); - if( repVersion.contains("(") || repVersion == "" ) + if( repVersion.tqcontains("(") || repVersion == "" ) repVersion = i18n("not available"); - QStringList versions; + TQStringList versions; versions.append(sysVersion); versions.append(repVersion); @@ -199,7 +199,7 @@ QStringList kdpkg::getVersions(QString package) //----------------------------------------------------------------------------// -void kdpkg::checkArchitecture(QString arch) +void kdpkg::checkArchitecture(TQString arch) { if(arch == "all") return; |