TQt4 port kio-umountwrapper

This enables compilation under both Qt3 and Qt4


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kio-umountwrapper@1239344 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 13 years ago
parent 7c6070b35a
commit e6b41752a9

@ -22,7 +22,7 @@
#include "kio_umountwrapper.h" #include "kio_umountwrapper.h"
#include <cstdlib> #include <cstdlib>
#include <qtimer.h> #include <tqtimer.h>
#include <kapplication.h> #include <kapplication.h>
#include <klocale.h> #include <klocale.h>
@ -31,7 +31,7 @@
#include <kcmdlineargs.h> #include <kcmdlineargs.h>
#include <kdebug.h> #include <kdebug.h>
kio_umountwrapper::kio_umountwrapper(const QString& url) kio_umountwrapper::kio_umountwrapper(const TQString& url)
: KApplication( 0, "kio_umountwrapper" ) : KApplication( 0, "kio_umountwrapper" )
{ {
m_progress = new KProgressDialog(); m_progress = new KProgressDialog();
@ -43,17 +43,17 @@ kio_umountwrapper::kio_umountwrapper(const QString& url)
m_progress->progressBar()->setTotalSteps(0); m_progress->progressBar()->setTotalSteps(0);
m_progress->show(); m_progress->show();
QTimer *t = new QTimer(this); TQTimer *t = new TQTimer(this);
connect(t, SIGNAL(timeout()), SLOT(progressAdvance())); connect(t, TQT_SIGNAL(timeout()), TQT_SLOT(progressAdvance()));
t->start(10, FALSE); t->start(10, FALSE);
KProcess *p = new KProcess(this); KProcess *p = new KProcess(TQT_TQOBJECT(this));
*p << "kio_media_mounthelper"; *p << "kio_media_mounthelper";
*p << "-s"; *p << "-s";
*p << url; *p << url;
kdDebug() << "KProcess: " << url << endl; kdDebug() << "KProcess: " << url << endl;
connect(p, SIGNAL(processExited(KProcess *)), connect(p, TQT_SIGNAL(processExited(KProcess *)),
this, SLOT(processFinished(KProcess *))); this, TQT_SLOT(processFinished(KProcess *)));
p->start(); p->start();
} }

@ -33,8 +33,9 @@
class kio_umountwrapper : public KApplication class kio_umountwrapper : public KApplication
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
kio_umountwrapper(const QString&); kio_umountwrapper(const TQString&);
private: private:
KProgressDialog *m_progress; KProgressDialog *m_progress;

@ -52,7 +52,7 @@ int main(int argc, char **argv)
if (args->count() == 0) if (args->count() == 0)
KCmdLineArgs::usage(i18n("No URL specified!")); KCmdLineArgs::usage(i18n("No URL specified!"));
else app = new kio_umountwrapper(QString(args->arg(0))); else app = new kio_umountwrapper(TQString(args->arg(0)));
args->clear(); args->clear();

Loading…
Cancel
Save