Rename KGlobal, KProcess, and KClipboard to avoid conflicts with KDE4

remotes/gitea/gg-tdeadmin-kcron
Timothy Pearson 12 years ago
parent 91f62a5883
commit 5f444a9ea9

@ -49,15 +49,15 @@ CTCron::CTCron(bool _syscron, string _login) :
{
if (syscron)
{
readCommand = "cat /etc/crontab > " + KProcess::quote(tmpFileName);
writeCommand = "cat " + KProcess::quote(tmpFileName) + " > /etc/crontab";
readCommand = "cat /etc/crontab > " + TDEProcess::quote(tmpFileName);
writeCommand = "cat " + TDEProcess::quote(tmpFileName) + " > /etc/crontab";
login = (const char *)i18n("(System Crontab)").local8Bit();
name = "";
}
else
{
readCommand = TQString("crontab -u ") + _login.c_str() + " -l > " + KProcess::quote(tmpFileName);
writeCommand = TQString("crontab -u ") + _login.c_str() + " " + KProcess::quote(tmpFileName);
readCommand = TQString("crontab -u ") + _login.c_str() + " -l > " + TDEProcess::quote(tmpFileName);
writeCommand = TQString("crontab -u ") + _login.c_str() + " " + TDEProcess::quote(tmpFileName);
if (!initFromPasswd(getpwnam(_login.c_str())))
{
error = i18n("No password entry found for user '%1'").arg(_login.c_str());
@ -67,8 +67,8 @@ CTCron::CTCron(bool _syscron, string _login) :
else
// regular user, so provide user's own crontab
{
readCommand = "crontab -l > " + KProcess::quote(tmpFileName);
writeCommand = "crontab " + KProcess::quote(tmpFileName);
readCommand = "crontab -l > " + TDEProcess::quote(tmpFileName);
writeCommand = "crontab " + TDEProcess::quote(tmpFileName);
if (!initFromPasswd(getpwuid(uid)))
{
error = i18n("No password entry found for uid '%1'").arg(uid);
@ -106,8 +106,8 @@ CTCron::CTCron(const struct passwd *pwd) :
tmp.close();
tmpFileName = tmp.name();
TQString readCommand = TQString("crontab -u ") + TQString(pwd->pw_name) + " -l > " + KProcess::quote(tmpFileName);
writeCommand = TQString("crontab -u ") + TQString(pwd->pw_name) + " " + KProcess::quote(tmpFileName);
TQString readCommand = TQString("crontab -u ") + TQString(pwd->pw_name) + " -l > " + TDEProcess::quote(tmpFileName);
writeCommand = TQString("crontab -u ") + TQString(pwd->pw_name) + " " + TDEProcess::quote(tmpFileName);
initFromPasswd(pwd);

@ -70,7 +70,7 @@ void KTListTasks::print (KTPrint& printer) const
stnd = printer.getFont();
printer.setFont(TQFont( KGlobalSettings::generalFont().family(), 10, TQFont::Bold ));
printer.setFont(TQFont( TDEGlobalSettings::generalFont().family(), 10, TQFont::Bold ));
printer.print (i18n("Task name:"), 1, KTPrint::alignTextLeft);
printer.print (i18n("Program:"), 2, KTPrint::alignTextCenter);
printer.print (i18n("Description:"),3,KTPrint::alignTextRight);

@ -65,7 +65,7 @@ void KTListVars::print(KTPrint& printer) const
TQFont stnd;
stnd = printer.getFont() ;
printer.setFont(TQFont( KGlobalSettings::generalFont().family(), 10, TQFont::Bold ));
printer.setFont(TQFont( TDEGlobalSettings::generalFont().family(), 10, TQFont::Bold ));
printer.print(i18n("Variable:"), 1, KTPrint::alignTextLeft);
printer.print(i18n("Value:"), 2, KTPrint::alignTextCenter);

@ -278,11 +278,11 @@ void KTView :: pageHeading (KTListItem* user, KTPrint &printer) const
.arg(TQString::fromLocal8Bit(hostName));
stnd = printer.getFont();
printer.setFont(TQFont( KGlobalSettings::generalFont().family(), 14, TQFont::Bold ));
printer.setFont(TQFont( TDEGlobalSettings::generalFont().family(), 14, TQFont::Bold ));
printer.print (i18n("Scheduled Tasks"), 2, KTPrint::alignTextCenter, false);
printer.print (logonInfo, 2, KTPrint::alignTextCenter, false);
printer.print (KGlobal::locale()->formatDateTime(now), 2, KTPrint::alignTextCenter, false);
printer.print (TDEGlobal::locale()->formatDateTime(now), 2, KTPrint::alignTextCenter, false);
printer.setFont(stnd);
printer.levelColumns(20);

@ -216,7 +216,7 @@ void BackupDlg::show()
_tarParser = new TarParser();
connect( _tarParser, TQT_SIGNAL( sigEntry( const TQString &, int, int, int ) ), this, TQT_SLOT( slotEntry( const TQString &, int, int, int ) ) );
_proc = new KProcess();
_proc = new TDEProcess();
*_proc << Options::instance()->getTarCommand();
if ( _oneFilesystem ) {
*_proc << "-l";
@ -281,17 +281,17 @@ void BackupDlg::show()
return;
}
connect( _proc, TQT_SIGNAL( processExited( KProcess* ) ), this, TQT_SLOT( slotProcessExited( KProcess* ) ) );
connect( _proc, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ), this, TQT_SLOT( slotStdout( KProcess*, char*, int ) ) );
connect( _proc, TQT_SIGNAL( processExited( TDEProcess* ) ), this, TQT_SLOT( slotProcessExited( TDEProcess* ) ) );
connect( _proc, TQT_SIGNAL( receivedStdout( TDEProcess*, char*, int ) ), this, TQT_SLOT( slotStdout( TDEProcess*, char*, int ) ) );
startTimer( 1000 );
_proc->start( KProcess::NotifyOnExit, KProcess::Stdout );
_proc->start( TDEProcess::NotifyOnExit, TDEProcess::Stdout );
TQDialog::show();
}
void BackupDlg::slotProcessExited( KProcess* )
void BackupDlg::slotProcessExited( TDEProcess* )
{
updateStats();
@ -316,12 +316,12 @@ void BackupDlg::slotProcessExited( KProcess* )
_abort->setEnabled( FALSE );
}
// the KProcess passes the arguments to tar, and tar's output is piped here.
// the TDEProcess passes the arguments to tar, and tar's output is piped here.
// The output is shown to _tarParser->slotData(), which figures out which files
// are going to tape and their file parameters, and saves these data into
// kdat's archive. The raw data are then written to tape with write().
// 2002-01-27 LEW
void BackupDlg::slotStdout( KProcess*, char* buf, int len )
void BackupDlg::slotStdout( TDEProcess*, char* buf, int len )
{
// Don't start throughput timer until the first block of data is written.
if ( _startTime == 0 ) {

@ -24,7 +24,7 @@
class TQLabel;
class TQPushButton;
class KProcess;
class TDEProcess;
class Archive;
class File;
@ -38,7 +38,7 @@ class TarParser;
class BackupDlg : public TQDialog {
Q_OBJECT
KProcess* _proc;
TDEProcess* _proc;
TarParser* _tarParser;
TQString _archiveName;
TQString _workingDir;
@ -72,8 +72,8 @@ class BackupDlg : public TQDialog {
void updateStats();
private slots:
void slotProcessExited( KProcess* proc );
void slotStdout( KProcess* proc, char* buf, int len );
void slotProcessExited( TDEProcess* proc );
void slotStdout( TDEProcess* proc, char* buf, int len );
void slotOK();
void slotAbort();
void slotEntry( const TQString& name, int size, int mtime, int record );

@ -35,7 +35,7 @@ BackupProfileManager::BackupProfileManager()
// Get a list of all available backup profiles.
TQStringList relList;
(void) KGlobal::dirs()->findAllResources( "appdata", "*.bp", false, true, relList);
(void) TDEGlobal::dirs()->findAllResources( "appdata", "*.bp", false, true, relList);
for(TQStringList::Iterator it = relList.begin();
it != relList.end();

@ -143,13 +143,13 @@ void FileInfoWidget::setFile( const TQString & name )
TQDateTime datetime;
datetime.setTime_t(info.st_ctime);
_ctime->setText( KGlobal::locale()->formatDateTime(datetime, false) );
_ctime->setText( TDEGlobal::locale()->formatDateTime(datetime, false) );
datetime.setTime_t(info.st_mtime);
_mtime->setText( KGlobal::locale()->formatDateTime(datetime, false) );
_mtime->setText( TDEGlobal::locale()->formatDateTime(datetime, false) );
datetime.setTime_t(info.st_atime);
_atime->setText( KGlobal::locale()->formatDateTime(datetime, false) );
_atime->setText( TDEGlobal::locale()->formatDateTime(datetime, false) );
_size->setText( Util::bytesToString( info.st_size ) );

@ -108,7 +108,7 @@ FormatOptDlg::FormatOptDlg( const TQString & def, TQWidget* parent, const char*
size /= 1024;
_tapeSizeUnits->setCurrentItem( 0 );
}
_tapeSize->setText( KGlobal::locale()->formatNumber(size, 0) );
_tapeSize->setText( TDEGlobal::locale()->formatNumber(size, 0) );
}
FormatOptDlg::~FormatOptDlg()
@ -119,7 +119,7 @@ void FormatOptDlg::okClicked()
{
_name = _entry->text();
_size = (int)KGlobal::locale()->readNumber( _tapeSize->text() );
_size = (int)TDEGlobal::locale()->readNumber( _tapeSize->text() );
if ( _tapeSizeUnits->currentItem() == 0 ) {
// MB
_size *= 1024;

@ -24,7 +24,7 @@
ImageCache::ImageCache()
{
KIconLoader *l = KGlobal::iconLoader();
KIconLoader *l = TDEGlobal::iconLoader();
/* 2002-01-24 FP */
// _archive = new TQPixmap(l->iconPath("package", KIcon::Toolbar));
_archive = new TQPixmap(l->iconPath("tar", KIcon::Small));

@ -446,7 +446,7 @@ void KDatMainWindow::fileBackup()
backupProfile.setRemoveSnapshot( bp->getRemoveSnapshot() );
} else {
TQString name;
name = i18n( "Archive created on %1" ).arg( KGlobal::locale()->formatDate(TQDate::currentDate(), true) );
name = i18n( "Archive created on %1" ).arg( TDEGlobal::locale()->formatDate(TQDate::currentDate(), true) );
name = name.stripWhiteSpace();
TQStringList files;
@ -486,8 +486,8 @@ void KDatMainWindow::fileBackup()
msg = i18n( "WARNING: The estimated archive size is %1 KB but "
"the tape has only %2 KB of space!\n"
"Back up anyway?" )
.arg(KGlobal::locale()->formatNumber(size, 0))
.arg(KGlobal::locale()->formatNumber(TapeManager::instance()->getMountedTape()->getSize() - tapeSize, 0 ));
.arg(TDEGlobal::locale()->formatNumber(size, 0))
.arg(TDEGlobal::locale()->formatNumber(TapeManager::instance()->getMountedTape()->getSize() - tapeSize, 0 ));
int result = KMessageBox::warningContinueCancel( this,
msg, i18n("Backup"), i18n("Backup") );
if ( result != KMessageBox::Continue) {
@ -865,7 +865,7 @@ void KDatMainWindow::fileFormatTape()
i18n("Format Tape"), i18n("Format"));
if (result == KMessageBox::Continue ) {
TQString name;
name = i18n( "Tape created on %1" ).arg( KGlobal::locale()->formatDate(TQDate::currentDate(), true) );
name = i18n( "Tape created on %1" ).arg( TDEGlobal::locale()->formatDate(TQDate::currentDate(), true) );
FormatOptDlg dlg( name.stripWhiteSpace(), this );
if ( dlg.exec() != TQDialog::Accepted ) {
return;

@ -218,7 +218,7 @@ bool TapeInfoWidget::isModified()
return TRUE;
}
int size = (int)KGlobal::locale()->readNumber( _tapeSize->text() );
int size = (int)TDEGlobal::locale()->readNumber( _tapeSize->text() );
if ( _tapeSizeUnits->currentItem() == 0 ) {
// MB
size *= 1024;
@ -254,7 +254,7 @@ void TapeInfoWidget::slotApply()
return;
}
int size = (int)KGlobal::locale()->readNumber( _tapeSize->text() );
int size = (int)TDEGlobal::locale()->readNumber( _tapeSize->text() );
if ( _tapeSizeUnits->currentItem() == 0 ) {
// MB
size *= 1024;

@ -40,8 +40,8 @@ TapeManager::TapeManager()
// Fix 2002-01-24 c/o RG. The problem was: "Tape Index is empty, but I did
// just a few minutes ago a 1st backup onto the the tape."
// (void) KGlobal::dirs()->findAllResources( "appdata", ".*:[0-9]+", false, true, relList);
(void) KGlobal::dirs()->findAllResources( "appdata", "*:[0-9]*", false, true, relList);
// (void) TDEGlobal::dirs()->findAllResources( "appdata", ".*:[0-9]+", false, true, relList);
(void) TDEGlobal::dirs()->findAllResources( "appdata", "*:[0-9]*", false, true, relList);
for(TQStringList::Iterator it = relList.begin();
it != relList.end();

@ -24,12 +24,12 @@
TQString Util::bytesToString( uint bytes )
{
return KGlobal::locale()->formatNumber(bytes, 0);
return TDEGlobal::locale()->formatNumber(bytes, 0);
}
TQString Util::kbytesToString( uint kbytes )
{
return KGlobal::locale()->formatNumber(kbytes, 0) + 'k';
return TDEGlobal::locale()->formatNumber(kbytes, 0) + 'k';
}
TQString Util::longestCommonPath( const TQStringList& files )

@ -210,7 +210,7 @@ void VerifyDlg::show()
{
chdir( TQFile::encodeName(_workingDir) );
_proc = new KProcess();
_proc = new TDEProcess();
//_proc->setExecutable( Options::instance()->getTarCommand() );
*_proc << Options::instance()->getTarCommand();
if ( _restore ) {
@ -219,19 +219,19 @@ void VerifyDlg::show()
*_proc << "-dvf" << "-";
}
connect( _proc, TQT_SIGNAL( processExited( KProcess* ) ), this, TQT_SLOT( slotProcessExited( KProcess* ) ) );
connect( _proc, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ), this, TQT_SLOT( slotStdout( KProcess*, char*, int ) ) );
connect( _proc, TQT_SIGNAL( wroteStdin( KProcess* ) ), this, TQT_SLOT( slotWroteStdin( KProcess* ) ) );
connect( _proc, TQT_SIGNAL( processExited( TDEProcess* ) ), this, TQT_SLOT( slotProcessExited( TDEProcess* ) ) );
connect( _proc, TQT_SIGNAL( receivedStdout( TDEProcess*, char*, int ) ), this, TQT_SLOT( slotStdout( TDEProcess*, char*, int ) ) );
connect( _proc, TQT_SIGNAL( wroteStdin( TDEProcess* ) ), this, TQT_SLOT( slotWroteStdin( TDEProcess* ) ) );
_startTime = time( NULL );
startTimer( 100 );
_proc->start( KProcess::NotifyOnExit, KProcess::All );
_proc->start( TDEProcess::NotifyOnExit, TDEProcess::All );
TQDialog::show();
}
void VerifyDlg::slotProcessExited( KProcess* )
void VerifyDlg::slotProcessExited( TDEProcess* )
{
TQT_TQOBJECT(this)->killTimers();
delete _proc;
@ -245,7 +245,7 @@ void VerifyDlg::slotProcessExited( KProcess* )
_abort->setEnabled( FALSE );
}
void VerifyDlg::slotStdout( KProcess*, char* buf, int len )
void VerifyDlg::slotStdout( TDEProcess*, char* buf, int len )
{
TQString data;
data.replace( 0, len, buf );
@ -286,7 +286,7 @@ void VerifyDlg::slotStdout( KProcess*, char* buf, int len )
}
}
void VerifyDlg::slotWroteStdin( KProcess* )
void VerifyDlg::slotWroteStdin( TDEProcess* )
{
_wroteStdin = TRUE;
}

@ -27,7 +27,7 @@
class TQLabel;
class TQPushButton;
class KProcess;
class TDEProcess;
class LoggerWidget;
class TapeDrive;
@ -39,7 +39,7 @@ class VerifyDlg : public TQDialog {
Q_OBJECT
bool _restore;
KProcess* _proc;
TDEProcess* _proc;
TQString _workingDir;
int _fileno;
const RangeList& _ranges;
@ -64,9 +64,9 @@ class VerifyDlg : public TQDialog {
void updateStats();
private slots:
void slotProcessExited( KProcess* proc );
void slotStdout( KProcess* proc, char* buf, int len );
void slotWroteStdin( KProcess* proc );
void slotProcessExited( TDEProcess* proc );
void slotStdout( TDEProcess* proc, char* buf, int len );
void slotWroteStdin( TDEProcess* proc );
void slotOK();
void slotAbort();
protected:

@ -42,7 +42,7 @@ extern "C"
{
KDE_EXPORT KCModule *create_knetworkconfmodule(TQWidget *parent, const char *name)
{
KGlobal::locale()->insertCatalogue("knetworkconf");
TDEGlobal::locale()->insertCatalogue("knetworkconf");
return new KNetworkConfModule(parent, name);
}
}

@ -432,10 +432,10 @@ TQString DEBAPT::install(int installFlags, TQPtrList<packageInfo> *p,
TQString fname = i->fetchFilename();
if (!file.isEmpty()) {
files += KProcess::quote(file);
files += TDEProcess::quote(file);
files += " ";
} else if (!fname.isEmpty()) {
packs += KProcess::quote(fname);
packs += TDEProcess::quote(fname);
packs += " ";
}
}

@ -275,7 +275,7 @@ packageInfo *DEB::getUPackageInfo( const TQString &name)
packageInfo *pki = 0;
TQString s = "dpkg --info ";
s += KProcess::quote(name);
s += TDEProcess::quote(name);
TQStringList list = kpty->run(s);
for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
@ -566,7 +566,7 @@ TQString DEB::install(int installFlags, TQPtrList<packageInfo> *p,
for (i = p->first(); i!= 0; i = p->next()) {
TQString fname = i->fetchFilename();
if (!fname.isEmpty()) {
packs += KProcess::quote(fname);
packs += TDEProcess::quote(fname);
packs += " ";
}
}

@ -61,14 +61,14 @@ kpKProcIO::~kpKProcIO()
bool kpKProcIO::sstart (RunMode runmode)
{
connect (this, TQT_SIGNAL (receivedStdout (KProcess *, char *, int)),
this, TQT_SLOT (received (KProcess *, char *, int)));
connect (this, TQT_SIGNAL (receivedStdout (TDEProcess *, char *, int)),
this, TQT_SLOT (received (TDEProcess *, char *, int)));
connect (this, TQT_SIGNAL (wroteStdin(KProcess *)),
this, TQT_SLOT (sent (KProcess *)));
connect (this, TQT_SIGNAL (wroteStdin(TDEProcess *)),
this, TQT_SLOT (sent (TDEProcess *)));
return KProcess::start (runmode,( KProcess::Communication) ( KProcess::Stdin | KProcess::Stdout));
return TDEProcess::start (runmode,( TDEProcess::Communication) ( TDEProcess::Stdin | TDEProcess::Stdout));
}
//////////////////////////////////////////////////////////////////////////////
@ -76,11 +76,11 @@ bool kpKProcIO::sstart (RunMode runmode)
kpPty::kpPty() : TQObject()
{
pty = new kpKProcIO();
pty->setUsePty(KProcess::All, false);
pty->setUsePty(TDEProcess::All, false);
connect(pty, TQT_SIGNAL(readReady(KProcIO *)), this,
TQT_SLOT(readLines()));
connect(pty, TQT_SIGNAL(processExited(KProcess *)), this,
connect(pty, TQT_SIGNAL(processExited(TDEProcess *)), this,
TQT_SLOT(done()));
pty->pty()->setWinSize(0,80);
tm = new TQTimer(this);
@ -166,7 +166,7 @@ bool kpPty::startSession(bool needRoot)
passMsg = i18n("The action you requested needs root privileges. Please enter your SUDO password.\n");
startSudo();
}
pty->sstart(KProcess::NotifyOnExit);
pty->sstart(TDEProcess::NotifyOnExit);
RESTART:
tm->start(6*1000, TRUE);
@ -289,7 +289,7 @@ TQStringList kpPty::run(const TQString &cmd, bool inLoop, bool needRoot)
pty->resetAll();
breakUpCmd(cmd);
pty->setEnvironment("TERM", "dumb");
if (!pty->sstart(KProcess::NotifyOnExit)) {
if (!pty->sstart(TDEProcess::NotifyOnExit)) {
kdDebug() << " kpPty::run execute=0\n";
return 0;
}
@ -322,7 +322,7 @@ void kpPty::close() {
pty->closeAll();
while(pty->isRunning()) {
KProcessController::theKProcessController->waitForProcessExit(1);
TDEProcessController::theTDEProcessController->waitForProcessExit(1);
}
inSession = false;
}

@ -42,7 +42,7 @@ kpTerm::kpTerm(kpPty *pt, TQWidget * parent, const char * name ) :
TQTextEdit(parent,name)
{
pty = pt;
setFont(KGlobalSettings::fixedFont());
setFont(TDEGlobalSettings::fixedFont());
// setMinimumWidth(fontMetrics().maxWidth()*80 +
// minimumSizeHint().width());
setWordWrap(NoWrap);
@ -175,7 +175,7 @@ kpRun::kpRun( TQWidget *parent)
{
TQVBox *page = makeVBoxMainWidget();
title = new TQLabel("", page);
TQFont f( KGlobalSettings::generalFont());
TQFont f( TDEGlobalSettings::generalFont());
f.setBold(true);
f.setPointSize(f.pointSize()+4);
title->setFont(f);

@ -108,7 +108,7 @@ TQString pkgInterface::doInstall(int, const TQString &, bool &) {return 0;}
////////////////////////////////////////////////////////////////////////////
bool pkgInterface::ifExe(TQString exe) {
if (!KGlobal::dirs()->findExe( exe ).isNull()) {
if (!TDEGlobal::dirs()->findExe( exe ).isNull()) {
return TRUE;
} else {
kdDebug() << "Program not found: " << exe << "\n";

@ -75,7 +75,7 @@ void pkgOptions::setupWidgets(TQPtrList<param> &pars)
// Create widgets
title = new TQLabel("", this);
TQFont f( KGlobalSettings::generalFont());
TQFont f( TDEGlobalSettings::generalFont());
f.setBold(true);
f.setPointSize(f.pointSize()+6);
title->setFont(f);

@ -60,19 +60,19 @@ procbuf::~procbuf()
void procbuf::setup(TQString cmd)
{
buf.truncate(0);
proc = new KProcess();
connect(proc, TQT_SIGNAL( receivedStdout(KProcess *, char *, int)),
this, TQT_SLOT(slotReadInfo(KProcess *, char *, int)));
connect(proc, TQT_SIGNAL( receivedStderr(KProcess *, char *, int)),
this, TQT_SLOT(slotReadInfo(KProcess *, char *, int)));
connect(proc, TQT_SIGNAL( processExited(KProcess *)),
this, TQT_SLOT(slotExited(KProcess *)));
proc = new TDEProcess();
connect(proc, TQT_SIGNAL( receivedStdout(TDEProcess *, char *, int)),
this, TQT_SLOT(slotReadInfo(TDEProcess *, char *, int)));
connect(proc, TQT_SIGNAL( receivedStderr(TDEProcess *, char *, int)),
this, TQT_SLOT(slotReadInfo(TDEProcess *, char *, int)));
connect(proc, TQT_SIGNAL( processExited(TDEProcess *)),
this, TQT_SLOT(slotExited(TDEProcess *)));
proc->clearArguments();
*proc << cmd;
command = cmd;
}
void procbuf::slotReadInfo(KProcess *, char *buffer, int buflen)
void procbuf::slotReadInfo(TDEProcess *, char *buffer, int buflen)
{
char last;
@ -88,7 +88,7 @@ void procbuf::slotReadInfo(KProcess *, char *buffer, int buflen)
}
}
void procbuf::slotExited(KProcess *)
void procbuf::slotExited(TDEProcess *)
{
if (m) {
m->terminate();
@ -115,8 +115,8 @@ int procbuf::start (TQString msg, bool errorDlg,
timed = true;
}
if (!proc->start(!msg.isNull() ? KProcess::NotifyOnExit : KProcess::Block,
KProcess::All)) {
if (!proc->start(!msg.isNull() ? TDEProcess::NotifyOnExit : TDEProcess::Block,
TDEProcess::All)) {
if (errorDlg) {
KpMsgE(i18n("Kprocess Failure"),TRUE);
}

@ -56,15 +56,15 @@ public:
int timeout=0, TQString timeMsg = "");
TQString buf;
KProcess *proc;
TDEProcess *proc;
Modal *m;
TQString command;
bool timed;
TQTimer *tm;
public slots:
void slotReadInfo(KProcess *, char *, int);
void slotExited(KProcess *);
void slotReadInfo(TDEProcess *, char *, int);
void slotExited(TDEProcess *);
void slotTimeout();
};
#endif

@ -82,7 +82,7 @@ KSVContent::KSVContent (KPopupMenu* openWithMenu, KSVTopLevel* parent, const cha
mOrigin (0L),
mOpenWithMenu (openWithMenu), m_buffer( TQCString() )
{
setOpaqueResize( KGlobalSettings::opaqueResize() );
setOpaqueResize( TDEGlobalSettings::opaqueResize() );
KXMLGUIFactory* factory = parent->factory();
mItemMenu = static_cast<KPopupMenu*> (factory->container ("item_menu", parent));
@ -201,7 +201,7 @@ void KSVContent::initLList()
"<p>To stop one, do the same for the <em>Stop</em> section.</p>"));
TQFont bold_font = TQFont(KGlobalSettings::generalFont());
TQFont bold_font = TQFont(TDEGlobalSettings::generalFont());
bold_font.setBold(TRUE);
servL->setFont(bold_font);
@ -603,20 +603,20 @@ void KSVContent::stopService ()
void KSVContent::stopService (const TQString& path)
{
KProcess *_proc = new KProcess();
TDEProcess *_proc = new TDEProcess();
_proc->clearArguments();
*_proc << path << "stop";
connect(_proc, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(slotExitedProcess(KProcess*)));
connect(_proc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), this, TQT_SLOT(slotOutputOrError(KProcess*, char*, int)));
connect(_proc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), this, TQT_SLOT(slotOutputOrError(KProcess*, char*, int)));
connect(_proc, TQT_SIGNAL(processExited(TDEProcess*)), this, TQT_SLOT(slotExitedProcess(TDEProcess*)));
connect(_proc, TQT_SIGNAL(receivedStdout(TDEProcess*, char*, int)), this, TQT_SLOT(slotOutputOrError(TDEProcess*, char*, int)));
connect(_proc, TQT_SIGNAL(receivedStderr(TDEProcess*, char*, int)), this, TQT_SLOT(slotOutputOrError(TDEProcess*, char*, int)));
// refresh textDisplay
appendLog(i18n("** <stop>Stopping</stop> <cmd>%1</cmd> **<br/>").arg(path),
i18n("** Stopping %1 **").arg(path));
_proc->start(KProcess::NotifyOnExit, KProcess::AllOutput);
_proc->start(TDEProcess::NotifyOnExit, TDEProcess::AllOutput);
// notify parent
emit sigRun(path + i18n(" stop"));
@ -629,20 +629,20 @@ void KSVContent::startService ()
void KSVContent::startService (const TQString& path)
{
KProcess* _proc = new KProcess();
TDEProcess* _proc = new TDEProcess();
_proc->clearArguments();
*_proc << path << "start";
connect(_proc, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(slotExitedProcess(KProcess*)));
connect(_proc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), this, TQT_SLOT(slotOutputOrError(KProcess*, char*, int)));
connect(_proc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), this, TQT_SLOT(slotOutputOrError(KProcess*, char*, int)));
connect(_proc, TQT_SIGNAL(processExited(TDEProcess*)), this, TQT_SLOT(slotExitedProcess(TDEProcess*)));
connect(_proc, TQT_SIGNAL(receivedStdout(TDEProcess*, char*, int)), this, TQT_SLOT(slotOutputOrError(TDEProcess*, char*, int)));
connect(_proc, TQT_SIGNAL(receivedStderr(TDEProcess*, char*, int)), this, TQT_SLOT(slotOutputOrError(TDEProcess*, char*, int)));
// refresh textDisplay
appendLog(i18n("** <start>Starting</start> <cmd>%1</cmd> **<br/>").arg(path),
i18n("** Starting %1 **").arg(path));
_proc->start(KProcess::NotifyOnExit, KProcess::AllOutput);
_proc->start(TDEProcess::NotifyOnExit, TDEProcess::AllOutput);
// notify parent
emit sigRun(path + i18n(" start"));
@ -669,33 +669,33 @@ void KSVContent::restartService ()
void KSVContent::restartService (const TQString& path)
{
// restarting
KProcess *_proc = new KProcess();
TDEProcess *_proc = new TDEProcess();
_proc->clearArguments();
*_proc << path << "restart";
connect(_proc, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(slotExitDuringRestart(KProcess*)));
connect(_proc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), this, TQT_SLOT(slotOutputOrError(KProcess*, char*, int)));
connect(_proc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), this, TQT_SLOT(slotOutputOrError(KProcess*, char*, int)));
connect(_proc, TQT_SIGNAL(processExited(TDEProcess*)), this, TQT_SLOT(slotExitDuringRestart(TDEProcess*)));
connect(_proc, TQT_SIGNAL(receivedStdout(TDEProcess*, char*, int)), this, TQT_SLOT(slotOutputOrError(TDEProcess*, char*, int)));
connect(_proc, TQT_SIGNAL(receivedStderr(TDEProcess*, char*, int)), this, TQT_SLOT(slotOutputOrError(TDEProcess*, char*, int)));
// refresh textDisplay
appendLog(i18n("** Re-starting <cmd>%1</cmd> **</br>").arg(path),
i18n("** Re-starting %1 **").arg(path));
_proc->start(KProcess::NotifyOnExit, KProcess::AllOutput);
_proc->start(TDEProcess::NotifyOnExit, TDEProcess::AllOutput);
// notify parent
emit sigRun(path + i18n(" restart"));
}
void KSVContent::slotOutputOrError( KProcess*, char* _buffer, int _buflen) {
void KSVContent::slotOutputOrError( TDEProcess*, char* _buffer, int _buflen) {
if (_buflen > 0) {
m_buffer += TQCString( _buffer, _buflen + 1 );
appendLog( m_buffer );
}
}
void KSVContent::slotExitedProcess( KProcess* proc ) {
void KSVContent::slotExitedProcess( TDEProcess* proc ) {
appendLog("<hr/>", "--------------");
emit sigStop();
@ -730,18 +730,18 @@ void KSVContent::slotScriptProperties(TQListViewItem* item)
// delete prop;
}
void KSVContent::slotExitDuringRestart( KProcess* proc )
void KSVContent::slotExitDuringRestart( TDEProcess* proc )
{
delete proc;
proc = new KProcess(); // necessary because otherwise we still have some
proc = new TDEProcess(); // necessary because otherwise we still have some
// signals connected that screw up our output
proc->clearArguments();
connect(proc, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(slotExitedProcess(KProcess*)));
connect(proc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), this, TQT_SLOT(slotOutputOrError(KProcess*, char*, int)));
connect(proc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), this, TQT_SLOT(slotOutputOrError(KProcess*, char*, int)));
connect(proc, TQT_SIGNAL(processExited(TDEProcess*)), this, TQT_SLOT(slotExitedProcess(TDEProcess*)));
connect(proc, TQT_SIGNAL(receivedStdout(TDEProcess*, char*, int)), this, TQT_SLOT(slotOutputOrError(TDEProcess*, char*, int)));
connect(proc, TQT_SIGNAL(receivedStderr(TDEProcess*, char*, int)), this, TQT_SLOT(slotOutputOrError(TDEProcess*, char*, int)));
proc->start(KProcess::NotifyOnExit, KProcess::AllOutput);
proc->start(TDEProcess::NotifyOnExit, TDEProcess::AllOutput);
}
KSVDragList* KSVContent::getOrigin()

@ -32,7 +32,7 @@ class TQPixmap;
class TQLayout;
class KScroller;
class KProcess;
class TDEProcess;
class KListView;
class TQSplitter;
class KPopupMenu;
@ -93,11 +93,11 @@ private slots:
void restartService (const TQString& path);
void editService();
void editService (const TQString& path);
void slotOutputOrError( KProcess* _p, char* _buffer, int _buflen );
void slotExitedProcess(KProcess* proc);
void slotOutputOrError( TDEProcess* _p, char* _buffer, int _buflen );
void slotExitedProcess(TDEProcess* proc);
void slotScriptsNotRemovable();
void slotDoubleClick (TQListViewItem*);
void slotExitDuringRestart(KProcess* proc);
void slotExitDuringRestart(TDEProcess* proc);
void appendLog(const TQString& rich, const TQString& plain);
void appendLog(const TQCString& _buffer);
void fwdCannotGenerateNumber();

@ -775,7 +775,7 @@ void KSVTopLevel::printLog()
y += tmp_h;
TQSimpleRichText rdate (i18n("<h3>Printed on %1</h3><br/><br/>").arg(KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime())),
TQSimpleRichText rdate (i18n("<h3>Printed on %1</h3><br/><br/>").arg(TDEGlobal::locale()->formatDateTime(TQDateTime::currentDateTime())),
TQFont("times"), TQString(), ksv::styleSheet(),
TQMimeSourceFactory::defaultFactory());
rdate.setWidth (&p, width);

@ -23,7 +23,7 @@
#include "ksv_conf.h"
KSVConfig::KSVConfig ()
: mConfig (KGlobal::config())
: mConfig (TDEGlobal::config())
{
readSettings();
}
@ -53,9 +53,9 @@ void KSVConfig::readSettings()
mChangedSelectedColor = mConfig->readColorEntry ("Changed Selected Text", &TQt::red);
mConfig->setGroup("Fonts");
TQFont tmp = KGlobalSettings::generalFont();
TQFont tmp = TDEGlobalSettings::generalFont();
mServiceFont = mConfig->readFontEntry ("Service Font", &tmp);
tmp = KGlobalSettings::fixedFont();
tmp = TDEGlobalSettings::fixedFont();
mNumberFont = mConfig->readFontEntry ("Number Font", &tmp);
readRunlevels();

@ -115,7 +115,7 @@ TQStyleSheet* ksv::styleSheet ()
item->setLogicalFontSizeStep (1);
item = new TQStyleSheetItem (&style, "cmd"); // command line
item->setFontFamily (KGlobalSettings::fixedFont().family());
item->setFontFamily (TDEGlobalSettings::fixedFont().family());
}
return &style;

@ -31,7 +31,7 @@
KSVTrash::KSVTrash (TQWidget* parent, const char* name)
: TQFrame (parent, name),
mKIL (KGlobal::iconLoader()),
mKIL (TDEGlobal::iconLoader()),
mLabel (new TQLabel(this)),
mOpen (false)
{

@ -772,7 +772,7 @@ int KU::KUser::removeCrontabs()
file = TQFile::decodeName(CRONTAB_DIR) + "/" + p_name;
if ( access(TQFile::encodeName(file), F_OK) == 0 ) {
command = TQString::fromLatin1("crontab -u %1 -r").arg(KProcess::quote(p_name));
command = TQString::fromLatin1("crontab -u %1 -r").arg(TDEProcess::quote(p_name));
if ( system(TQFile::encodeName(command)) != 0 ) {
KMessageBox::error( 0, i18n("Cannot remove crontab %1.\nError: %2")
.arg(command).arg(TQString::fromLocal8Bit(strerror(errno))) );

@ -51,7 +51,7 @@ void KUserViewItem::paintCell( TQPainter *p, const TQColorGroup &cg,
TQColor c = _cg.text();
if ( mUser->getDisabled() )
_cg.setColor( TQColorGroup::Text, KGlobalSettings::visitedLinkColor() );
_cg.setColor( TQColorGroup::Text, TDEGlobalSettings::visitedLinkColor() );
KListViewItem::paintCell( p, _cg, column, width, alignment );

@ -461,7 +461,7 @@ void propdlg::selectuser()
kug->getUsers().getCaps() & KU::KUsers::Cap_Samba ||
kug->getUsers().getCaps() & KU::KUsers::Cap_BSD ) {
leslstchg->setText( KGlobal::locale()->formatDateTime( datetime, false ) );
leslstchg->setText( TDEGlobal::locale()->formatDateTime( datetime, false ) );
}
if ( one ) {
@ -919,7 +919,7 @@ void propdlg::setpwd()
kug->getUsers().getCaps() & KU::KUsers::Cap_Samba ||
kug->getUsers().getCaps() & KU::KUsers::Cap_BSD ) {
leslstchg->setText( KGlobal::locale()->formatDateTime( datetime, false ) );
leslstchg->setText( TDEGlobal::locale()->formatDateTime( datetime, false ) );
}
cbdisabled->setChecked( false );
}

Loading…
Cancel
Save