From ffe8a83e053396df448e9413828527613ca3bd46 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:46:43 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- knewstuff/knewstuffgeneric.cpp | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'knewstuff/knewstuffgeneric.cpp') diff --git a/knewstuff/knewstuffgeneric.cpp b/knewstuff/knewstuffgeneric.cpp index c1be1ccca..8438e25ea 100644 --- a/knewstuff/knewstuffgeneric.cpp +++ b/knewstuff/knewstuffgeneric.cpp @@ -19,9 +19,9 @@ Boston, MA 02110-1301, USA. */ -#include -#include -#include +#include +#include +#include #include #include @@ -37,7 +37,7 @@ using namespace std; -KNewStuffGeneric::KNewStuffGeneric( const QString &type, QWidget *parent ) +KNewStuffGeneric::KNewStuffGeneric( const TQString &type, TQWidget *parent ) : KNewStuff( type, parent ) { mConfig = KGlobal::config(); @@ -47,14 +47,14 @@ KNewStuffGeneric::~KNewStuffGeneric() { } -bool KNewStuffGeneric::install( const QString &fileName ) +bool KNewStuffGeneric::install( const TQString &fileName ) { kdDebug() << "KNewStuffGeneric::install(): " << fileName << endl; - QStringList list, list2; + TQStringList list, list2; mConfig->setGroup("KNewStuff"); - QString uncompress = mConfig->readEntry( "Uncompress" ); + TQString uncompress = mConfig->readEntry( "Uncompress" ); if ( !uncompress.isEmpty() ) { kdDebug() << "Uncompression method: " << uncompress << endl; KTar tar(fileName, uncompress); @@ -62,14 +62,14 @@ bool KNewStuffGeneric::install( const QString &fileName ) const KArchiveDirectory *dir = tar.directory(); dir->copyTo(destinationPath(0)); tar.close(); - QFile::remove(fileName); + TQFile::remove(fileName); } - QString cmd = mConfig->readEntry( "InstallationCommand" ); + TQString cmd = mConfig->readEntry( "InstallationCommand" ); if ( !cmd.isEmpty() ) { kdDebug() << "InstallationCommand: " << cmd << endl; - list = QStringList::split( " ", cmd ); - for ( QStringList::iterator it = list.begin(); it != list.end(); ++it ) { + list = TQStringList::split( " ", cmd ); + for ( TQStringList::iterator it = list.begin(); it != list.end(); ++it ) { list2 << (*it).replace("%f", fileName); } KProcess proc; @@ -80,14 +80,14 @@ bool KNewStuffGeneric::install( const QString &fileName ) return true; } -bool KNewStuffGeneric::createUploadFile( const QString & /*fileName*/ ) +bool KNewStuffGeneric::createUploadFile( const TQString & /*fileName*/ ) { return false; } -QString KNewStuffGeneric::destinationPath( KNS::Entry *entry ) +TQString KNewStuffGeneric::destinationPath( KNS::Entry *entry ) { - QString path, file, target, ext; + TQString path, file, target, ext; mConfig->setGroup("KNewStuff"); @@ -99,7 +99,7 @@ QString KNewStuffGeneric::destinationPath( KNS::Entry *entry ) target = entry->fullName() + ext; } else target = "/"; - QString res = mConfig->readEntry( "StandardResource" ); + TQString res = mConfig->readEntry( "StandardResource" ); if ( res.isEmpty() ) { target = mConfig->readEntry("TargetDir"); @@ -116,13 +116,13 @@ QString KNewStuffGeneric::destinationPath( KNS::Entry *entry ) } if ( res.isEmpty() && path.isEmpty() ) { - if ( !entry ) return QString::null; + if ( !entry ) return TQString::null; else return KNewStuff::downloadDestination( entry ); } if ( !path.isEmpty() ) { - file = QDir::home().path() + "/" + path + "/"; + file = TQDir::home().path() + "/" + path + "/"; if ( entry ) file += entry->fullName() + ext; } else file = locateLocal( res.utf8() , target ); @@ -130,16 +130,16 @@ QString KNewStuffGeneric::destinationPath( KNS::Entry *entry ) return file; } -QString KNewStuffGeneric::downloadDestination( KNS::Entry *entry ) +TQString KNewStuffGeneric::downloadDestination( KNS::Entry *entry ) { - QString file = destinationPath(entry); + TQString file = destinationPath(entry); if ( KStandardDirs::exists( file ) ) { int result = KMessageBox::warningContinueCancel( parentWidget(), i18n("The file '%1' already exists. Do you want to overwrite it?") .arg( file ), - QString::null, i18n("Overwrite") ); - if ( result == KMessageBox::Cancel ) return QString::null; + TQString::null, i18n("Overwrite") ); + if ( result == KMessageBox::Cancel ) return TQString::null; } return file; -- cgit v1.2.1