summaryrefslogtreecommitdiffstats
path: root/lib/compatibility/knewstuff/knewstuffgeneric.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
commitdc6b8e72fed2586239e3514819238c520636c9d9 (patch)
tree88b200df0a0b7fab9d6f147596173556f1ed9a13 /lib/compatibility/knewstuff/knewstuffgeneric.cpp
parent6927d4436e54551917f600b706a8d6109e49de1c (diff)
downloadtdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.tar.gz
tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1157656 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib/compatibility/knewstuff/knewstuffgeneric.cpp')
-rw-r--r--lib/compatibility/knewstuff/knewstuffgeneric.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/lib/compatibility/knewstuff/knewstuffgeneric.cpp b/lib/compatibility/knewstuff/knewstuffgeneric.cpp
index 22673dac..51305f62 100644
--- a/lib/compatibility/knewstuff/knewstuffgeneric.cpp
+++ b/lib/compatibility/knewstuff/knewstuffgeneric.cpp
@@ -19,9 +19,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qdir.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqdir.h>
#include <kdebug.h>
#include <klocale.h>
@@ -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(5850) << "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(5850) << "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(5850) << "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,20 +80,20 @@ 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;
+ TQString path, file, target;
mConfig->setGroup("KNewStuff");
if( entry ) target = entry->fullName();
else target = "/";
- QString res = mConfig->readEntry( "StandardResource" );
+ TQString res = mConfig->readEntry( "StandardResource" );
if ( res.isEmpty() )
{
target = mConfig->readEntry("TargetDir");
@@ -110,13 +110,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();
}
else file = locateLocal( res.utf8() , target );
@@ -124,16 +124,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 override 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;