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

feat/lzip-support
Timothy Pearson 11 years ago
parent c92efa3ed8
commit b8fb4538e9

@ -97,11 +97,11 @@ kio_krarcProtocol::~kio_krarcProtocol(){
// delete the temp directory
KrShellProcess proc;
proc << "rm -rf "<< arcTempDir;
proc.start(KProcess::Block);
proc.start(TDEProcess::Block);
}
/* ---------------------------------------------------------------------------------- */
void kio_krarcProtocol::receivedData(KProcess*,char* buf,int len){
void kio_krarcProtocol::receivedData(TDEProcess*,char* buf,int len){
TQByteArray d(len);
d.setRawData(buf,len);
data(d);
@ -156,7 +156,7 @@ void kio_krarcProtocol::mkdir(const KURL& url,int permissions){
proc << putCmd << convertName( arcFile->url().path() ) + " " << convertFileName( tmpDir.mid(arcTempDir.length()) );
infoMessage(i18n("Creating %1 ...").arg( url.fileName() ) );
TQDir::setCurrent(arcTempDir);
proc.start(KProcess::Block,KProcess::AllOutput);
proc.start(TDEProcess::Block,TDEProcess::AllOutput);
// delete the temp directory
TQDir().rmdir(arcTempDir);
@ -227,7 +227,7 @@ void kio_krarcProtocol::put(const KURL& url,int permissions,bool overwrite,bool
proc << putCmd << convertName( arcFile->url().path() )+ " " <<convertFileName( tmpFile.mid(arcTempDir.length()) );
infoMessage(i18n("Packing %1 ...").arg( url.fileName() ) );
TQDir::setCurrent(arcTempDir);
proc.start(KProcess::Block,KProcess::AllOutput);
proc.start(TDEProcess::Block,TDEProcess::AllOutput);
// remove the file
TQFile::remove(tmpFile);
@ -276,7 +276,7 @@ void kio_krarcProtocol::get(const KURL& url, int tries ){
if( !extArcReady && arcType == "rpm"){
KrShellProcess cpio;
cpio << "rpm2cpio" << convertName( arcFile->url().path(-1) ) << " > " << arcTempDir+"contents.cpio";
cpio.start(KProcess::Block,KProcess::AllOutput);
cpio.start(TDEProcess::Block,TDEProcess::AllOutput);
if( !cpio.normalExit() || cpio.exitStatus() != 0 ) {
error(ERR_COULD_NOT_READ,url.path() + "\n\n" + cpio.getErrorMsg() );
return;
@ -287,7 +287,7 @@ void kio_krarcProtocol::get(const KURL& url, int tries ){
if ( !extArcReady && arcType == "deb" ) {
KrShellProcess dpkg;
dpkg << cmd + " --fsys-tarfile" << convertName( arcFile->url().path( -1 ) ) << " > " << arcTempDir + "contents.cpio";
dpkg.start( KProcess::Block, KProcess::AllOutput );
dpkg.start( TDEProcess::Block, TDEProcess::AllOutput );
if( !dpkg.normalExit() || dpkg.exitStatus() != 0 ) {
error(ERR_COULD_NOT_READ,url.path() + "\n\n" + dpkg.getErrorMsg() );
return;
@ -314,13 +314,13 @@ void kio_krarcProtocol::get(const KURL& url, int tries ){
emit mimeType( mt->name() );
proc << getCmd << convertName( arcFile->url().path() )+" ";
if( arcType != "gzip" && arcType != "bzip2" ) proc << convertFileName( file );
connect(&proc,TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),
this,TQT_SLOT(receivedData(KProcess*,char*,int)) );
connect(&proc,TQT_SIGNAL(receivedStdout(TDEProcess*,char*,int)),
this,TQT_SLOT(receivedData(TDEProcess*,char*,int)) );
}
infoMessage(i18n("Unpacking %1 ...").arg( url.fileName() ) );
// change the working directory to our arcTempDir
TQDir::setCurrent(arcTempDir);
proc.start(KProcess::Block,KProcess::AllOutput);
proc.start(TDEProcess::Block,TDEProcess::AllOutput);
if( !extArcReady && !decompressToFile ) {
if( !proc.normalExit() || !checkStatus( proc.exitStatus() ) || ( arcType != "bzip2" && expectedSize != decompressedLen ) ) {
@ -456,7 +456,7 @@ void kio_krarcProtocol::del(KURL const & url, bool isFile){
KrShellProcess proc;
proc << delCmd << convertName( arcFile->url().path() )+" " << convertFileName( file );
infoMessage(i18n("Deleting %1 ...").arg( url.fileName() ) );
proc.start(KProcess::Block, KProcess::AllOutput);
proc.start(TDEProcess::Block, TDEProcess::AllOutput);
if( !proc.normalExit() || !checkStatus( proc.exitStatus() ) ) {
error(ERR_COULD_NOT_WRITE,url.path() + "\n\n" + proc.getErrorMsg() );
return;
@ -552,7 +552,7 @@ void kio_krarcProtocol::copy (const KURL &url, const KURL &dest, int, bool overw
proc << "<" << "/dev/ptmx";
infoMessage(i18n("Unpacking %1 ...").arg( url.fileName() ) );
proc.start(KProcess::Block, KProcess::AllOutput);
proc.start(TDEProcess::Block, TDEProcess::AllOutput);
if( !proc.normalExit() || !checkStatus( proc.exitStatus() ) ) {
error(KIO::ERR_COULD_NOT_WRITE, dest.path(-1) + "\n\n" + proc.getErrorMsg() );
return;
@ -711,7 +711,7 @@ bool kio_krarcProtocol::initDirDict(const KURL&url, bool forced){
proc << listCmd << convertName( arcFile->url().path(-1) ) <<" > " << temp.name();
if( arcType == "ace" && TQFile( "/dev/ptmx" ).exists() ) // Don't remove, unace crashes if missing!!!
proc << "<" << "/dev/ptmx";
proc.start(KProcess::Block,KProcess::AllOutput);
proc.start(TDEProcess::Block,TDEProcess::AllOutput);
if( !proc.normalExit() || !checkStatus( proc.exitStatus() ) ) return false;
}
// clear the dir dictionary
@ -1513,9 +1513,9 @@ TQString kio_krarcProtocol::detectArchive( bool &encrypted, TQString fileName )
KrShellProcess proc;
proc << testCmd << convertName( fileName );
connect( &proc, TQT_SIGNAL( receivedStdout(KProcess*,char*,int) ),
this, TQT_SLOT( checkOutputForPassword( KProcess*,char*,int ) ) );
proc.start(KProcess::Block,KProcess::AllOutput);
connect( &proc, TQT_SIGNAL( receivedStdout(TDEProcess*,char*,int) ),
this, TQT_SLOT( checkOutputForPassword( TDEProcess*,char*,int ) ) );
proc.start(TDEProcess::Block,TDEProcess::AllOutput);
encrypted = this->encrypted;
if( encrypted )
@ -1548,7 +1548,7 @@ TQString kio_krarcProtocol::detectArchive( bool &encrypted, TQString fileName )
return TQString();
}
void kio_krarcProtocol::checkOutputForPassword( KProcess *proc,char *buf,int len ) {
void kio_krarcProtocol::checkOutputForPassword( TDEProcess *proc,char *buf,int len ) {
TQByteArray d(len);
d.setRawData(buf,len);
TQString data = TQString( d );

@ -28,7 +28,7 @@
#include <kio/slavebase.h>
#include <kprocess.h>
class KProcess;
class TDEProcess;
class KFileItem;
class TQCString;
@ -47,8 +47,8 @@ public:
virtual void copy (const KURL &src, const KURL &dest, int permissions, bool overwrite);
public slots:
void receivedData(KProcess* proc,char* buf,int len);
void checkOutputForPassword( KProcess*,char*,int );
void receivedData(TDEProcess* proc,char* buf,int len);
void checkOutputForPassword( TDEProcess*,char*,int );
protected:
virtual bool initDirDict(const KURL& url,bool forced = false);
@ -109,10 +109,10 @@ class KrShellProcess : public KShellProcess {
public:
KrShellProcess() : KShellProcess(), errorMsg( TQString() ), outputMsg( TQString() ) {
connect(this,TQT_SIGNAL(receivedStderr(KProcess*,char*,int)),
this,TQT_SLOT(receivedErrorMsg(KProcess*,char*,int)) );
connect(this,TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),
this,TQT_SLOT(receivedOutputMsg(KProcess*,char*,int)) );
connect(this,TQT_SIGNAL(receivedStderr(TDEProcess*,char*,int)),
this,TQT_SLOT(receivedErrorMsg(TDEProcess*,char*,int)) );
connect(this,TQT_SIGNAL(receivedStdout(TDEProcess*,char*,int)),
this,TQT_SLOT(receivedOutputMsg(TDEProcess*,char*,int)) );
}
TQString getErrorMsg() {
@ -123,14 +123,14 @@ public:
}
public slots:
void receivedErrorMsg(KProcess*, char *buf, int len) {
void receivedErrorMsg(TDEProcess*, char *buf, int len) {
errorMsg += TQString::fromLocal8Bit( buf, len );
if( errorMsg.length() > 500 )
errorMsg = errorMsg.right( 500 );
receivedOutputMsg( 0, buf, len );
}
void receivedOutputMsg(KProcess*, char *buf, int len) {
void receivedOutputMsg(TDEProcess*, char *buf, int len) {
outputMsg += TQString::fromLocal8Bit( buf, len );
if( outputMsg.length() > 500 )
outputMsg = outputMsg.right( 500 );

@ -33,7 +33,7 @@
#include <ktextedit.h>
#include <kiconloader.h>
#define ICON(N) KGlobal::iconLoader()->loadIcon(N, KIcon::Small)
#define ICON(N) TDEGlobal::iconLoader()->loadIcon(N, KIcon::Small)
ActionProperty::ActionProperty( TQWidget *parent, const char *name, KrAction *action )
: ActionPropertyBase( parent, name ), _modified(false)

@ -214,7 +214,7 @@ void UserActionListViewItem::update() {
return;
if ( ! _action->icon().isEmpty() )
setPixmap( COL_TITLE, KGlobal::iconLoader()->loadIcon( _action->icon(), KIcon::Small ) );
setPixmap( COL_TITLE, TDEGlobal::iconLoader()->loadIcon( _action->icon(), KIcon::Small ) );
setText( COL_TITLE, _action->text() );
setText( COL_NAME, _action->name() );
}

@ -29,7 +29,7 @@
#include "../UserAction/kraction.h"
#include "../krusader.h"
#define ICON(N) KGlobal::iconLoader()->loadIcon(N, KIcon::Toolbar)
#define ICON(N) TDEGlobal::iconLoader()->loadIcon(N, KIcon::Toolbar)
//This is the filter in the KFileDialog of Import/Export:
static const char* FILE_FILTER = I18N_NOOP("*.xml|xml-files\n*|all files");

@ -24,7 +24,7 @@
#include <kstandarddirs.h>
class CS_Tool; // forward
typedef void PREPARE_PROC_FUNC(KProcess& proc, CS_Tool *self, const TQStringList& files,
typedef void PREPARE_PROC_FUNC(TDEProcess& proc, CS_Tool *self, const TQStringList& files,
const TQString checksumFile, bool recursive, const TQString& stdoutFileName,
const TQString& stderrFileName, const TQString& type=TQString());
typedef TQStringList GET_FAILED_FUNC(const TQStringList& stdOut, const TQStringList& stdErr);
@ -51,7 +51,7 @@ public:
};
// handles md5sum and sha1sum
void sumCreateFunc(KProcess& proc, CS_Tool *self, const TQStringList& files,
void sumCreateFunc(TDEProcess& proc, CS_Tool *self, const TQStringList& files,
const TQString, bool recursive, const TQString& stdoutFileName,
const TQString& stderrFileName, const TQString&) {
proc.setUseShell(true, "/bin/bash");
@ -60,7 +60,7 @@ void sumCreateFunc(KProcess& proc, CS_Tool *self, const TQStringList& files,
proc << files << "1>" << stdoutFileName << "2>" << stderrFileName;
}
void sumVerifyFunc(KProcess& proc, CS_Tool *self, const TQStringList& /* files */,
void sumVerifyFunc(TDEProcess& proc, CS_Tool *self, const TQStringList& /* files */,
const TQString checksumFile, bool recursive, const TQString& stdoutFileName,
const TQString& stderrFileName, const TQString& /* type */) {
proc.setUseShell(true, "/bin/bash");
@ -86,7 +86,7 @@ TQStringList sumFailedFunc(const TQStringList& stdOut, const TQStringList& stdEr
}
// handles *deep binaries
void deepCreateFunc(KProcess& proc, CS_Tool *self, const TQStringList& files,
void deepCreateFunc(TDEProcess& proc, CS_Tool *self, const TQStringList& files,
const TQString, bool recursive, const TQString& stdoutFileName,
const TQString& stderrFileName, const TQString&) {
proc.setUseShell(true, "/bin/bash");
@ -95,7 +95,7 @@ void deepCreateFunc(KProcess& proc, CS_Tool *self, const TQStringList& files,
proc << "-l" << files << "1>" << stdoutFileName << "2>" << stderrFileName;
}
void deepVerifyFunc(KProcess& proc, CS_Tool *self, const TQStringList& files,
void deepVerifyFunc(TDEProcess& proc, CS_Tool *self, const TQStringList& files,
const TQString checksumFile, bool recursive, const TQString& stdoutFileName,
const TQString& stderrFileName, const TQString&) {
proc.setUseShell(true, "/bin/bash");
@ -110,7 +110,7 @@ TQStringList deepFailedFunc(const TQStringList& stdOut, const TQStringList&/* st
}
// handles cfv binary
void cfvCreateFunc(KProcess& proc, CS_Tool *self, const TQStringList& files,
void cfvCreateFunc(TDEProcess& proc, CS_Tool *self, const TQStringList& files,
const TQString, bool recursive, const TQString& stdoutFileName,
const TQString& stderrFileName, const TQString& type) {
proc.setUseShell(true, "/bin/bash");
@ -119,7 +119,7 @@ void cfvCreateFunc(KProcess& proc, CS_Tool *self, const TQStringList& files,
proc << "-t" << type << "-f-" << "-U" << files << "1>" << stdoutFileName << "2>" << stderrFileName;
}
void cfvVerifyFunc(KProcess& proc, CS_Tool *self, const TQStringList& /* files */,
void cfvVerifyFunc(TDEProcess& proc, CS_Tool *self, const TQStringList& /* files */,
const TQString checksumFile, bool recursive, const TQString& stdoutFileName,
const TQString& stderrFileName, const TQString&type) {
proc.setUseShell(true, "/bin/bash");
@ -262,14 +262,14 @@ CreateChecksumDlg::CreateChecksumDlg(const TQStringList& files, bool containFold
// else implied: run the process
tmpOut = new KTempFile(locateLocal("tmp", "krusader"), ".stdout" );
tmpErr = new KTempFile(locateLocal("tmp", "krusader"), ".stderr" );
KProcess proc;
TDEProcess proc;
CS_Tool *mytool = tools.at(method->currentItem());
mytool->create(proc, mytool, KrServices::quote(files), TQString(), containFolders,
tmpOut->name(), tmpErr->name(), method->currentText());
krApp->startWaiting(i18n("Calculating checksums ..."), 0, true);
TQApplication::setOverrideCursor( KCursor::waitCursor() );
bool r = proc.start(KProcess::NotifyOnExit, KProcess::AllOutput);
bool r = proc.start(TDEProcess::NotifyOnExit, TDEProcess::AllOutput);
if (r) while ( proc.isRunning() ) {
usleep( 500 );
tqApp->processEvents();
@ -381,11 +381,11 @@ MatchChecksumDlg::MatchChecksumDlg(const TQStringList& files, bool containFolder
// else implied: run the process
tmpOut = new KTempFile(locateLocal("tmp", "krusader"), ".stdout" );
tmpErr = new KTempFile(locateLocal("tmp", "krusader"), ".stderr" );
KProcess proc;
TDEProcess proc;
mytool->verify(proc, mytool, KrServices::quote(files), KrServices::quote(file), containFolders, tmpOut->name(), tmpErr->name(), extension);
krApp->startWaiting(i18n("Verifying checksums ..."), 0, true);
TQApplication::setOverrideCursor( KCursor::waitCursor() );
bool r = proc.start(KProcess::NotifyOnExit, KProcess::AllOutput);
bool r = proc.start(TDEProcess::NotifyOnExit, TDEProcess::AllOutput);
if (r) while ( proc.isRunning() ) {
usleep( 500 );
tqApp->processEvents();

@ -59,7 +59,7 @@ KrKeyDialog::~KrKeyDialog() {
void KrKeyDialog::slotImportShortcuts() {
// find $TDEDIR/share/apps/krusader
TQString basedir = KGlobal::dirs()->findResourceDir("appdata", "total_commander.keymap");
TQString basedir = TDEGlobal::dirs()->findResourceDir("appdata", "total_commander.keymap");
// let the user select a file to load
TQString filename = KFileDialog::getOpenFileName(basedir, i18n(FILE_FILTER), 0, i18n("Select a keymap file"));
if ( filename.isEmpty() )

@ -141,7 +141,7 @@ void KRPleaseWaitHandler::incProgress(int i){
incMutex=false;
}
void KRPleaseWaitHandler::incProgress( KProcess *, char *buffer, int buflen ) {
void KRPleaseWaitHandler::incProgress( TDEProcess *, char *buffer, int buflen ) {
int howMuch = 0;
for ( int i = 0 ; i < buflen; ++i )
if ( buffer[ i ] == '\n' )

@ -36,7 +36,7 @@
#include <tqguardedptr.h>
#include <kio/jobclasses.h>
class KProcess;
class TDEProcess;
class KRPleaseWait;
class KRPleaseWaitHandler : public TQObject {
@ -52,7 +52,7 @@ public slots:
void stopWait();
void cycleProgress();
void incProgress(int i);
void incProgress( KProcess *, char *buffer, int buflen );
void incProgress( TDEProcess *, char *buffer, int buflen );
void killJob();
void setJob(KIO::Job* j);
bool wasCancelled() const { return _wasCancelled; }

@ -44,8 +44,8 @@ KrProgress::KrProgress( KIO::Job* job )
#ifdef TQ_WS_X11 //FIXME(E): Remove once all the KWin::foo calls have been ported to TQWS
// Set a useful icon for this window!
KWin::setIcons( winId(),
KGlobal::iconLoader()->loadIcon( "filesave", KIcon::NoGroup, 32 ),
KGlobal::iconLoader()->loadIcon( "filesave", KIcon::NoGroup, 16 ) );
TDEGlobal::iconLoader()->loadIcon( "filesave", KIcon::NoGroup, 32 ),
TDEGlobal::iconLoader()->loadIcon( "filesave", KIcon::NoGroup, 16 ) );
#endif
TQVBoxLayout *topLayout = new TQVBoxLayout( this, KDialog::marginHint(),

@ -249,7 +249,7 @@ void QuickNavLineEdit::init() {
_numOfSelectedChars=0;
_dummyDisplayed=false;
_pop=0;
//setCompletionMode( KGlobalSettings::CompletionPopupAuto ); ==> removed by public demand
//setCompletionMode( TDEGlobalSettings::CompletionPopupAuto ); ==> removed by public demand
}
void QuickNavLineEdit::leaveEvent(TQEvent *) {

@ -329,12 +329,12 @@ void PackGUIBase::expand() {
void PackGUIBase::checkConsistency() {
if( password->text().isEmpty() && passwordAgain->text().isEmpty()) {
passwordConsistencyLabel->setPaletteForegroundColor( KGlobalSettings::textColor() );
passwordConsistencyLabel->setPaletteForegroundColor( TDEGlobalSettings::textColor() );
passwordConsistencyLabel->setText( i18n( "No password specified" ) );
}
else
if( password->text() == passwordAgain->text() ) {
passwordConsistencyLabel->setPaletteForegroundColor( KGlobalSettings::textColor() );
passwordConsistencyLabel->setPaletteForegroundColor( TDEGlobalSettings::textColor() );
passwordConsistencyLabel->setText( i18n( "The passwords are equal" ) );
}
else {

@ -644,7 +644,7 @@ int DiskUsage::del( File *file, bool calcPercents, int depth )
#if KDE_IS_VERSION(3,4,0)
job = KIO::trash( url, true );
#else
job = new KIO::CopyJob( url,KGlobalSettings::trashPath(),KIO::CopyJob::Move,false,true );
job = new KIO::CopyJob( url,TDEGlobalSettings::trashPath(),KIO::CopyJob::Move,false,true );
#endif
connect(job,TQT_SIGNAL(result(KIO::Job*)),krApp,TQT_SLOT(changeTrashIcon()));
}
@ -1025,7 +1025,7 @@ TQString DiskUsage::getToolTip( File *item )
time_t tma = item->time();
struct tm* t=localtime((time_t *)&tma);
TQDateTime tmp(TQDate(t->tm_year+1900, t->tm_mon+1, t->tm_mday), TQTime(t->tm_hour, t->tm_min));
TQString date = KGlobal::locale()->formatDateTime(tmp);
TQString date = TDEGlobal::locale()->formatDateTime(tmp);
TQString str = "<qt><h5><table><tr><td>" + i18n( "Name:" ) + "</td><td>" + item->name() + "</td></tr>"+
"<tr><td>" + i18n( "Type:" ) + "</td><td>" + mime + "</td></tr>"+

@ -132,7 +132,7 @@ void DUListView::addDirectory( Directory *dirEntry, TQListViewItem *parent )
time_t tma = item->time();
struct tm* t=localtime((time_t *)&tma);
TQDateTime tmp(TQDate(t->tm_year+1900, t->tm_mon+1, t->tm_mday), TQTime(t->tm_hour, t->tm_min));
TQString date = KGlobal::locale()->formatDateTime(tmp);
TQString date = TDEGlobal::locale()->formatDateTime(tmp);
TQString totalSize = KRpermHandler::parseSize( item->size() ) + " ";
TQString ownSize = KRpermHandler::parseSize( item->ownSize() ) + " ";

@ -16,7 +16,7 @@ Filelight::MapScheme Config::scheme;
inline KConfig&
Filelight::Config::kconfig()
{
KConfig *config = KGlobal::config();
KConfig *config = TDEGlobal::config();
config->setGroup( "DiskUsage" );
return *config;
}

@ -52,7 +52,7 @@ File::humanReadableSize( FileSize size, UnitPrefix key /*= mega*/ ) //static
{
TQString s;
double prettySize = (double)size / (double)DENOMINATOR[key];
const KLocale &locale = *KGlobal::locale();
const KLocale &locale = *TDEGlobal::locale();
if( prettySize >= 0.01 )
{

@ -131,7 +131,7 @@ RadialMap::Builder::build( const Directory* const dir, const unsigned int depth,
{
//append a segment for unrepresented space - a "fake" segment
const TQString s = i18n( "%1 files: ~ %2" ).arg( KGlobal::locale()->formatNumber( hiddenFileCount, 0 ) ).arg( File::humanReadableSize( hiddenSize/hiddenFileCount ) );
const TQString s = i18n( "%1 files: ~ %2" ).arg( TDEGlobal::locale()->formatNumber( hiddenFileCount, 0 ) ).arg( File::humanReadableSize( hiddenSize/hiddenFileCount ) );
(m_signature + depth)->append( new Segment( new File( s, hiddenSize ), a_start, a_end - a_start, true ) );
}

@ -158,7 +158,7 @@ RadialMap::Map::colorise()
double contrast = (double)Config::contrast / (double)100;
int h, s1, s2, v1, v2;
TQColor kdeColour[2] = { KGlobalSettings::inactiveTitleColor(), KGlobalSettings::activeTitleColor() };
TQColor kdeColour[2] = { TDEGlobalSettings::inactiveTitleColor(), TDEGlobalSettings::activeTitleColor() };
double deltaRed = (double)(kdeColour[0].red() - kdeColour[1].red()) / 2880; //2880 for semicircle
double deltaGreen = (double)(kdeColour[0].green() - kdeColour[1].green()) / 2880;

@ -33,7 +33,7 @@ SegmentTip::moveto( TQPoint p, const TQWidget &canvas, bool placeAbove )
p.rx() -= rect().center().x();
p.ry() -= (placeAbove ? 8 + height() : m_cursorHeight - 8);
const TQRect screen = KGlobalSettings::desktopGeometry( parentWidget() );
const TQRect screen = TDEGlobalSettings::desktopGeometry( parentWidget() );
const int x = p.x();
const int y = p.y();
@ -84,7 +84,7 @@ SegmentTip::updateTip( const File* const file, const Directory* const root )
{
const TQString s1 = file->fullPath( root );
TQString s2 = file->humanReadableSize();
KLocale *loc = KGlobal::locale();
KLocale *loc = TDEGlobal::locale();
const uint MARGIN = 3;
const uint pc = 100 * file->size() / root->size();
uint maxw = 0;

@ -422,14 +422,14 @@ void AdvancedFilter::notModifiedAfterSetDate()
void AdvancedFilter::changeDate(TQLineEdit *p) {
// check if the current date is valid
TQDate d = KGlobal::locale()->readDate(p->text());
TQDate d = TDEGlobal::locale()->readDate(p->text());
if (!d.isValid()) d = TQDate::currentDate();
KRGetDate *gd = new KRGetDate(d, this);
d = gd->getDate();
// if a user pressed ESC or closed the dialog, we'll return an invalid date
if (d.isValid())
p->setText(KGlobal::locale()->formatDate(d, true));
p->setText(TDEGlobal::locale()->formatDate(d, true));
delete gd;
}
@ -517,9 +517,9 @@ bool AdvancedFilter::fillQuery( KRQuery *query )
if ( !(modifiedBetweenData1->text().simplifyWhiteSpace().isEmpty() &&
modifiedBetweenData2->text().simplifyWhiteSpace().isEmpty()) ) {
// check if date is valid
TQDate d1 = KGlobal::locale()->readDate(modifiedBetweenData1->text());
TQDate d1 = TDEGlobal::locale()->readDate(modifiedBetweenData1->text());
if (!d1.isValid()) { invalidDateMessage(modifiedBetweenData1); return false; }
TQDate d2 = KGlobal::locale()->readDate(modifiedBetweenData2->text());
TQDate d2 = TDEGlobal::locale()->readDate(modifiedBetweenData2->text());
if (!d2.isValid()) { invalidDateMessage(modifiedBetweenData2); return false; }
if (d1 > d2) {
@ -538,7 +538,7 @@ bool AdvancedFilter::fillQuery( KRQuery *query )
}
} else if (notModifiedAfterEnabled->isChecked()) {
if ( !notModifiedAfterData->text().simplifyWhiteSpace().isEmpty() ) {
TQDate d = KGlobal::locale()->readDate(notModifiedAfterData->text());
TQDate d = TDEGlobal::locale()->readDate(notModifiedAfterData->text());
if (!d.isValid()) { invalidDateMessage(notModifiedAfterData); return false; }
time_t olderTime;
qdate2time_t(&olderTime, d, false);

@ -65,8 +65,8 @@ KCMDLine::KCMDLine( TQWidget *parent, const char *name ) : TQWidget( parent, nam
path->setAlignment( TQt::AlignRight );
path->setFrameStyle( TQFrame::Box | TQFrame::Sunken );
path->setLineWidth( 1 );
path->setFont( KGlobalSettings::generalFont() );
int height = TQFontMetrics( KGlobalSettings::generalFont() ).height();
path->setFont( TDEGlobalSettings::generalFont() );
int height = TQFontMetrics( TDEGlobalSettings::generalFont() ).height();
height = height + 5*(height > 14) + 6;
path->setMaximumHeight( height );
path->setSizePolicy(TQSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::Preferred));
@ -77,7 +77,7 @@ KCMDLine::KCMDLine( TQWidget *parent, const char *name ) : TQWidget( parent, nam
cmdLine = new KrHistoryCombo( this );
cmdLine->setMaxCount(100); // remember 100 commands
cmdLine->setDuplicatesEnabled( false );
cmdLine->setFont( KGlobalSettings::generalFont() );
cmdLine->setFont( TDEGlobalSettings::generalFont() );
cmdLine->setMaximumHeight( height );
cmdLine->setCompletionObject( &completion );
cmdLine->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed));

@ -45,7 +45,7 @@ KFnKeys::KFnKeys(TQWidget *parent, char *name): TQWidget(parent,name) {
TARGET->setMinimumWidth(45);\
}
setFont( KGlobalSettings::generalFont() );
setFont( TDEGlobalSettings::generalFont() );
layout=new TQGridLayout(this,1,9); // 9 keys
F2=new TQPushButton( i18n("F2 Term ") ,this);
TQToolTip::add( F2, "<qt>" + i18n( "<p>Open terminal in current directory.</p>"

@ -83,7 +83,7 @@ void KrRemoteEncodingMenu::slotAboutToShow()
void KrRemoteEncodingMenu::loadSettings()
{
settingsLoaded = true;
encodingNames = KGlobal::charsets()->descriptiveEncodingNames();
encodingNames = TDEGlobal::charsets()->descriptiveEncodingNames();
KPopupMenu *menu = popupMenu();
menu->clear();
@ -125,7 +125,7 @@ void KrRemoteEncodingMenu::slotItemSelected(int id)
if (!popupMenu()->isItemChecked(id))
{
TQString charset = KGlobal::charsets()->encodingForName( encodingNames[id - 1] );
TQString charset = TDEGlobal::charsets()->encodingForName( encodingNames[id - 1] );
config.setGroup(host);
config.writeEntry(DATA_KEY, charset);

@ -576,9 +576,9 @@ void MediaButton::rightClickMenu( int index ) {
bool MediaButton::mount( int index ) {
if ( (unsigned)index < mimes.count() ) {
if( !mediaUrls[ index ].isEmpty() ) {
KProcess proc;
TDEProcess proc;
proc << KrServices::fullPathName( "kio_media_mounthelper" ) << "-m" << mediaUrls[ index ].url();
proc.start( KProcess::DontCare );
proc.start( TDEProcess::DontCare );
} else {
krMtMan.mount( urls[ index ].path(), false );
}
@ -589,9 +589,9 @@ bool MediaButton::mount( int index ) {
bool MediaButton::umount( int index ) {
if ( (unsigned)index < mimes.count() ) {
if( !mediaUrls[ index ].isEmpty() ) {
KProcess proc;
TDEProcess proc;
proc << KrServices::fullPathName( "kio_media_mounthelper" ) << "-u" << mediaUrls[ index ].url();
proc.start( KProcess::DontCare );
proc.start( TDEProcess::DontCare );
} else {
krMtMan.unmount( urls[ index ].path(), false );
}
@ -602,9 +602,9 @@ bool MediaButton::umount( int index ) {
bool MediaButton::eject( int index ) {
if ( (unsigned)index < mimes.count() ) {
if( !mediaUrls[ index ].isEmpty() ) {
KProcess proc;
TDEProcess proc;
proc << KrServices::fullPathName( "kio_media_mounthelper" ) << "-e" << mediaUrls[ index ].url();
proc.start( KProcess::DontCare );
proc.start( TDEProcess::DontCare );
} else {
krMtMan.eject( urls[ index ].path() );
}

@ -274,13 +274,13 @@ void KrViewer::edit( KURL url, Mode mode, int new_window, TQWidget * parent ) {
new_window = krConfig->readBoolEntry( "View In Separate Window",_ViewInSeparateWindow );
if ( edit != "internal editor" ) {
KProcess proc;
TDEProcess proc;
// if the file is local, pass a normal path and not a url. this solves
// the problem for editors that aren't url-aware
if ( url.isLocalFile() )
proc << TQStringList::split( ' ', edit ) << url.path();
else proc << TQStringList::split( ' ', edit ) << url.prettyURL();
if ( !proc.start( KProcess::DontCare ) )
if ( !proc.start( TDEProcess::DontCare ) )
KMessageBox::sorry( krApp, i18n( "Can't open " ) + "\"" + edit + "\"" );
return ;
}

@ -94,16 +94,16 @@ KgColors::KgColors( bool first, TQWidget* parent, const char* name ) :
ADDITIONAL_COLOR transparent = { i18n("Transparent"), TQt::white, "transparent" };
addColorSelector( "Foreground", i18n( "Foreground:" ), KGlobalSettings::textColor() );
addColorSelector( "Foreground", i18n( "Foreground:" ), TDEGlobalSettings::textColor() );
addColorSelector( "Directory Foreground", i18n( "Directory foreground:" ), getColorSelector( "Foreground" )->getColor(), i18n( "Same as foreground" ) );
addColorSelector( "Executable Foreground", i18n( "Executable foreground:" ), getColorSelector( "Foreground" )->getColor(), i18n( "Same as foreground" ) );
addColorSelector( "Symlink Foreground", i18n( "Symbolic link foreground:" ), getColorSelector( "Foreground" )->getColor(), i18n( "Same as foreground" ) );
addColorSelector( "Invalid Symlink Foreground", i18n( "Invalid symlink foreground:" ), getColorSelector( "Foreground" )->getColor(), i18n( "Same as foreground" ) );
addColorSelector( "Background", i18n( "Background:" ), KGlobalSettings::baseColor() );
addColorSelector( "Background", i18n( "Background:" ), TDEGlobalSettings::baseColor() );
ADDITIONAL_COLOR sameAsBckgnd = { i18n("Same as background"), getColorSelector( "Background" )->getColor(), "Background" };
addColorSelector( "Alternate Background", i18n( "Alternate background:" ), KGlobalSettings::alternateBackgroundColor(),"", &sameAsBckgnd, 1 );
addColorSelector( "Marked Foreground", i18n( "Selected foreground:" ), KGlobalSettings::highlightedTextColor(), "", &transparent, 1 );
addColorSelector( "Marked Background", i18n( "Selected background:" ), KGlobalSettings::highlightColor(), "", &sameAsBckgnd, 1 );
addColorSelector( "Alternate Background", i18n( "Alternate background:" ), TDEGlobalSettings::alternateBackgroundColor(),"", &sameAsBckgnd, 1 );
addColorSelector( "Marked Foreground", i18n( "Selected foreground:" ), TDEGlobalSettings::highlightedTextColor(), "", &transparent, 1 );
addColorSelector( "Marked Background", i18n( "Selected background:" ), TDEGlobalSettings::highlightColor(), "", &sameAsBckgnd, 1 );
ADDITIONAL_COLOR sameAsAltern = { i18n("Same as alt. background"), getColorSelector( "Alternate Background" )->getColor(), "Alternate Background" };
addColorSelector( "Alternate Marked Background",i18n( "Alternate selected background:" ), getColorSelector( "Marked Background" )->getColor(), i18n( "Same as selected background" ), &sameAsAltern, 1 );
addColorSelector( "Current Foreground", i18n( "Current foreground:" ), TQt::white, i18n( "Not used" ) );
@ -187,19 +187,19 @@ KgColors::KgColors( bool first, TQWidget* parent, const char* name ) :
colorsGrid->setSpacing( 0 );
colorsGrid->setMargin( 2 );
ADDITIONAL_COLOR KDEDefaultBase = { i18n("KDE default"), KGlobalSettings::baseColor(), "KDE default" };
ADDITIONAL_COLOR KDEDefaultFore = { i18n("KDE default"), KGlobalSettings::textColor(), "KDE default" };
ADDITIONAL_COLOR KDEDefaultBase = { i18n("KDE default"), TDEGlobalSettings::baseColor(), "KDE default" };
ADDITIONAL_COLOR KDEDefaultFore = { i18n("KDE default"), TDEGlobalSettings::textColor(), "KDE default" };
offset = endOfPanelColors = itemList.count();
addColorSelector( "Synchronizer Equals Foreground", i18n( "Equals foreground:" ), TQt::black, TQString(), &KDEDefaultFore, 1 );
addColorSelector( "Synchronizer Equals Background", i18n( "Equals background:" ), KGlobalSettings::baseColor(), TQString(), &KDEDefaultBase, 1 );
addColorSelector( "Synchronizer Equals Background", i18n( "Equals background:" ), TDEGlobalSettings::baseColor(), TQString(), &KDEDefaultBase, 1 );
addColorSelector( "Synchronizer Differs Foreground", i18n( "Differing foreground:" ), TQt::red, TQString(), &KDEDefaultFore, 1 );
addColorSelector( "Synchronizer Differs Background", i18n( "Differing background:" ), KGlobalSettings::baseColor(), TQString(), &KDEDefaultBase, 1 );
addColorSelector( "Synchronizer Differs Background", i18n( "Differing background:" ), TDEGlobalSettings::baseColor(), TQString(), &KDEDefaultBase, 1 );
addColorSelector( "Synchronizer LeftCopy Foreground", i18n( "Copy to left foreground:" ), TQt::blue, TQString(), &KDEDefaultFore, 1 );
addColorSelector( "Synchronizer LeftCopy Background", i18n( "Copy to left background:" ), KGlobalSettings::baseColor(), TQString(), &KDEDefaultBase, 1 );
addColorSelector( "Synchronizer LeftCopy Background", i18n( "Copy to left background:" ), TDEGlobalSettings::baseColor(), TQString(), &KDEDefaultBase, 1 );
addColorSelector( "Synchronizer RightCopy Foreground", i18n( "Copy to right foreground:" ), TQt::darkGreen, TQString(), &KDEDefaultFore, 1 );
addColorSelector( "Synchronizer RightCopy Background", i18n( "Copy to right background:" ), KGlobalSettings::baseColor(), TQString(), &KDEDefaultBase, 1 );
addColorSelector( "Synchronizer RightCopy Background", i18n( "Copy to right background:" ), TDEGlobalSettings::baseColor(), TQString(), &KDEDefaultBase, 1 );
addColorSelector( "Synchronizer Delete Foreground", i18n( "Delete foreground:" ), TQt::white, TQString(), &KDEDefaultFore, 1 );
addColorSelector( "Synchronizer Delete Background", i18n( "Delete background:" ), TQt::red, TQString(), &KDEDefaultBase, 1 );
@ -499,7 +499,7 @@ bool KgColors::apply()
void KgColors::slotImportColors() {
// find $TDEDIR/share/apps/krusader
TQString basedir = KGlobal::dirs()->findResourceDir("appdata", "total_commander.keymap");
TQString basedir = TDEGlobal::dirs()->findResourceDir("appdata", "total_commander.keymap");
// let the user select a file to load
TQString file = KFileDialog::getOpenFileName(basedir, "*.color", 0, i18n("Select a color-scheme file"));
if (file == TQString()) return;

@ -37,7 +37,7 @@ KgWelcome::KgWelcome( bool first, TQWidget* parent, const char* name ) :
TQGridLayout *kgWelcomeLayout = new TQGridLayout( parent );
kgWelcomeLayout->setSpacing( 6 );
TQString pix=KGlobal::dirs()->findResource("appdata","konfig_small.jpg");
TQString pix=TDEGlobal::dirs()->findResource("appdata","konfig_small.jpg");
TQPixmap image0( pix );
TQLabel *pixmapLabel = new TQLabel( parent, "pixmapLabel" );

@ -59,7 +59,7 @@ TQGridLayout* KrResultTable::initTable()
_grid->addWidget(_label, 0, column);
// Set font
TQFont defFont = KGlobalSettings::generalFont();
TQFont defFont = TDEGlobalSettings::generalFont();
defFont.setPointSize(defFont.pointSize()-1);
defFont.setBold(true);
_label->setFont(defFont);
@ -84,7 +84,7 @@ void KrResultTable::adjustRow(TQGridLayout* grid)
// Paint uneven rows in alternate color
if( ((col/_numColumns)%2) )
child->widget()->setPaletteBackgroundColor( KGlobalSettings::baseColor() );
child->widget()->setPaletteBackgroundColor( TDEGlobalSettings::baseColor() );
++it;
++col;

@ -51,7 +51,7 @@ KrResultTableDialog::KrResultTableDialog( TQWidget *parent, DialogType type,
_iconLabel->setAlignment( TQt::AlignLeft | TQt::AlignVCenter );
_iconLabel->setFixedSize( _iconLabel->sizeHint() );
_headingLabel = new TQLabel(heading, _iconBox);
TQFont defFont = KGlobalSettings::generalFont();
TQFont defFont = TDEGlobalSettings::generalFont();
defFont.setBold(true);
_headingLabel->setFont(defFont);
_headingLabel->setIndent(10);

@ -94,7 +94,7 @@ public:
}
};
KProcess * LocateDlg::updateProcess = 0;
TDEProcess * LocateDlg::updateProcess = 0;
LocateDlg * LocateDlg::LocateDialog = 0;
LocateDlg::LocateDlg() : KDialogBase(0,0,false,"Locate", KDialogBase::User1 | KDialogBase::User2 | KDialogBase::User3 | KDialogBase::Close,
@ -171,7 +171,7 @@ LocateDlg::LocateDlg() : KDialogBase(0,0,false,"Locate", KDialogBase::User1 | KD
{
if( updateProcess->isRunning() )
{
connect( updateProcess, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(updateFinished()));
connect( updateProcess, TQT_SIGNAL(processExited(TDEProcess *)), this, TQT_SLOT(updateFinished()));
enableButton( KDialogBase::User2, false );
}
else
@ -198,12 +198,12 @@ void LocateDlg::slotUser2() /* The Update DB button */
{
krConfig->setGroup("Locate");
updateProcess = new KProcess();
updateProcess = new TDEProcess();
*updateProcess << KrServices::fullPathName( "updatedb" );
*updateProcess << KrServices::separateArgs( krConfig->readEntry( "UpdateDB Arguments", "" ) );
connect( updateProcess, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(updateFinished()));
updateProcess->start(KProcess::NotifyOnExit);
connect( updateProcess, TQT_SIGNAL(processExited(TDEProcess *)), this, TQT_SLOT(updateFinished()));
updateProcess->start(TDEProcess::NotifyOnExit);
enableButton( KDialogBase::User2, false );
}
}
@ -246,11 +246,11 @@ void LocateDlg::slotUser3() /* The locate button */
stopping = false;
KProcess locateProc;
connect( &locateProc, TQT_SIGNAL( receivedStdout(KProcess *, char *, int) ),
this, TQT_SLOT( processStdout(KProcess *, char *, int) ) );
connect( &locateProc, TQT_SIGNAL( receivedStderr(KProcess *, char *, int) ),
this, TQT_SLOT( processStderr(KProcess *, char *, int) ) );
TDEProcess locateProc;
connect( &locateProc, TQT_SIGNAL( receivedStdout(TDEProcess *, char *, int) ),
this, TQT_SLOT( processStdout(TDEProcess *, char *, int) ) );
connect( &locateProc, TQT_SIGNAL( receivedStderr(TDEProcess *, char *, int) ),
this, TQT_SLOT( processStderr(TDEProcess *, char *, int) ) );
locateProc << KrServices::fullPathName( "locate" );
if( !isCs )
@ -263,7 +263,7 @@ void LocateDlg::slotUser3() /* The locate button */
pattern = pattern + "*";
collectedErr = "";
bool result = !locateProc.start( KProcess::Block, KProcess::AllOutput );
bool result = !locateProc.start( TDEProcess::Block, TDEProcess::AllOutput );
if( !collectedErr.isEmpty() && ( !locateProc.normalExit() || locateProc.exitStatus() ) )
{
KMessageBox::error( krApp, i18n( "Locate produced the following error message:\n\n" ) + collectedErr );
@ -284,7 +284,7 @@ void LocateDlg::slotUser3() /* The locate button */
}
}
void LocateDlg::processStdout(KProcess *proc, char *buffer, int length)
void LocateDlg::processStdout(TDEProcess *proc, char *buffer, int length)
{
char *buf = new char[ length+1 ];
memcpy( buf, buffer, length );
@ -335,7 +335,7 @@ void LocateDlg::processStdout(KProcess *proc, char *buffer, int length)
tqApp->processEvents();
}
void LocateDlg::processStderr(KProcess *, char *buffer, int length)
void LocateDlg::processStderr(TDEProcess *, char *buffer, int length)
{
char *buf = new char[ length+1 ];
memcpy( buf, buffer, length );

@ -55,8 +55,8 @@ public:
void reset();
public slots:
void processStdout(KProcess *, char *, int);
void processStderr(KProcess *proc, char *buffer, int length);
void processStdout(TDEProcess *, char *, int);
void processStderr(TDEProcess *proc, char *buffer, int length);
void slotRightClick(TQListViewItem *);
void slotDoubleClick(TQListViewItem *);
void updateFinished();
@ -95,7 +95,7 @@ private:
TQCheckBox *existingFiles;
TQCheckBox *caseSensitive;
static KProcess *updateProcess;
static TDEProcess *updateProcess;
};
#endif /* __LOCATE_H__ */

@ -45,11 +45,11 @@
KDiskFreeSp::KDiskFreeSp(TQObject *parent, const char *name)
: TQObject(parent,name)
{
dfProc = new KProcess(); TQ_CHECK_PTR(dfProc);
dfProc = new TDEProcess(); TQ_CHECK_PTR(dfProc);
dfProc->setEnvironment("LANGUAGE", "C");
connect( dfProc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int) ),
this, TQT_SLOT (receivedDFStdErrOut(KProcess *, char *, int)) );
connect(dfProc,TQT_SIGNAL(processExited(KProcess *) ),
connect( dfProc, TQT_SIGNAL(receivedStdout(TDEProcess *, char *, int) ),
this, TQT_SLOT (receivedDFStdErrOut(TDEProcess *, char *, int)) );
connect(dfProc,TQT_SIGNAL(processExited(TDEProcess *) ),
this, TQT_SLOT(dfDone() ) );
readingDFStdErrOut=false;
@ -67,7 +67,7 @@ KDiskFreeSp::~KDiskFreeSp()
/***************************************************************************
* is called, when the df-command writes on StdOut
**/
void KDiskFreeSp::receivedDFStdErrOut(KProcess *, char *data, int len)
void KDiskFreeSp::receivedDFStdErrOut(TDEProcess *, char *data, int len)
{
TQCString tmp(data,len+1); // adds a zero-byte
dfStringErrOut.append(tmp);
@ -84,7 +84,7 @@ int KDiskFreeSp::readDF( const TQString & mountPoint )
dfStringErrOut=""; // yet no data received
dfProc->clearArguments();
(*dfProc) << TQString::fromLocal8Bit(DF_COMMAND) << TQString::fromLocal8Bit(DF_ARGS) << mountPoint;
if (!dfProc->start( KProcess::NotifyOnExit, KProcess::AllOutput ))
if (!dfProc->start( TDEProcess::NotifyOnExit, TDEProcess::AllOutput ))
kdError() << "could not execute ["<< DF_COMMAND << "]" << endl;
return 1;
}

@ -30,7 +30,7 @@
#include <tqobject.h>
#include <tqstring.h>
class KProcess;
class TDEProcess;
/**
* This class parses the output of "df" to find the disk usage
@ -72,11 +72,11 @@ signals:
void done();
private slots:
void receivedDFStdErrOut(KProcess *, char *data, int len);
void receivedDFStdErrOut(TDEProcess *, char *data, int len);
void dfDone();
private:
KProcess *dfProc;
TDEProcess *dfProc;
TQCString dfStringErrOut;
TQString m_mountPoint;
bool readingDFStdErrOut;

@ -192,7 +192,7 @@ void KMountMan::autoMount( TQString path ) {
void KMountMan::eject( TQString mntPoint ) {
KShellProcess proc;
proc << KrServices::fullPathName( "eject" ) << "'" + mntPoint + "'";
proc.start( KProcess::Block );
proc.start( TDEProcess::Block );
if ( !proc.normalExit() || proc.exitStatus() != 0 ) // if we failed with eject
KMessageBox::information( 0, i18n( "Error ejecting device! You need to have 'eject' in your path." ), i18n( "Error" ), "CantExecuteEjectWarning" );
}
@ -221,24 +221,24 @@ TQString KMountMan::convertSize( KIO::filesize_t size ) {
fsize = ( float ) size / ( float ) 1073741824;
if ( fsize > 1024 ) // no name for something bigger than tera byte
// let's call it Zega-Byte, who'll ever find out? :-)
s = i18n( "%1 ZB" ).arg( KGlobal::locale() ->formatNumber( fsize / ( float ) 1024, 1 ) );
s = i18n( "%1 ZB" ).arg( TDEGlobal::locale() ->formatNumber( fsize / ( float ) 1024, 1 ) );
else
s = i18n( "%1 TB" ).arg( KGlobal::locale() ->formatNumber( fsize, 1 ) );
s = i18n( "%1 TB" ).arg( TDEGlobal::locale() ->formatNumber( fsize, 1 ) );
}
// Giga-byte
else if ( size >= 1048576 ) {
fsize = ( float ) size / ( float ) 1048576;
s = i18n( "%1 GB" ).arg( KGlobal::locale() ->formatNumber( fsize, 1 ) );
s = i18n( "%1 GB" ).arg( TDEGlobal::locale() ->formatNumber( fsize, 1 ) );
}
// Mega-byte
else if ( size > 1024 ) {
fsize = ( float ) size / ( float ) 1024;
s = i18n( "%1 MB" ).arg( KGlobal::locale() ->formatNumber( fsize, 1 ) );
s = i18n( "%1 MB" ).arg( TDEGlobal::locale() ->formatNumber( fsize, 1 ) );
}
// Kilo-byte
else {
fsize = ( float ) size;
s = i18n( "%1 KB" ).arg( KGlobal::locale() ->formatNumber( fsize, 0 ) );
s = i18n( "%1 KB" ).arg( TDEGlobal::locale() ->formatNumber( fsize, 0 ) );
}
return s;
}

@ -98,7 +98,7 @@ void KrBriefView::setup() {
setFont( _config->readFontEntry( "Filelist Font", _FilelistFont ) );
// decide on single click/double click selection
if ( _config->readBoolEntry( "Single Click Selects", _SingleClickSelects ) &&
KGlobalSettings::singleClick() ) {
TDEGlobalSettings::singleClick() ) {
connect( this, TQT_SIGNAL( executed( TQIconViewItem* ) ), this, TQT_SLOT( slotExecuted( TQIconViewItem* ) ) );
} else {
connect( this, TQT_SIGNAL( clicked( TQIconViewItem* ) ), this, TQT_SLOT( slotClicked( TQIconViewItem* ) ) );
@ -341,7 +341,7 @@ void KrBriefView::slotClicked( TQIconViewItem *item ) {
if ( !modifierPressed ) {
if ( singleClicked && !renameTimer.isActive() ) {
KConfig * config = KGlobal::config();
KConfig * config = TDEGlobal::config();
config->setGroup( "KDE" );
int doubleClickInterval = config->readNumEntry( "DoubleClickInterval", 400 );
@ -1237,7 +1237,7 @@ void KrBriefView::refreshColors() {
setPaletteBackgroundColor( cg.background() );
} else {
// KDE default is choosen: set back the background color
setPaletteBackgroundColor( KGlobalSettings::baseColor() );
setPaletteBackgroundColor( TDEGlobalSettings::baseColor() );
}
slotUpdate();
}

@ -400,16 +400,16 @@ TQColorGroup KrColorCacheImpl::getColors(const KrColorItemType & type) const
TQColorGroup result;
if (m_colorSettings.getBoolValue("KDE Default", _KDEDefaultColors))
{
// KDE default? Getcolors from KGlobalSettings.
// KDE default? Getcolors from TDEGlobalSettings.
bool enableAlternateBackground = m_colorSettings.getBoolValue("Enable Alternate Background", _AlternateBackground);
TQColor background = enableAlternateBackground && type.m_alternateBackgroundColor ?
KGlobalSettings::alternateBackgroundColor()
: KGlobalSettings::baseColor();
TDEGlobalSettings::alternateBackgroundColor()
: TDEGlobalSettings::baseColor();
result.setColor(TQColorGroup::Base, background);
result.setColor(TQColorGroup::Background, background);
result.setColor(TQColorGroup::Text, KGlobalSettings::textColor());
result.setColor(TQColorGroup::HighlightedText, KGlobalSettings::highlightedTextColor());
result.setColor(TQColorGroup::Highlight, KGlobalSettings::highlightColor());
result.setColor(TQColorGroup::Text, TDEGlobalSettings::textColor());
result.setColor(TQColorGroup::HighlightedText, TDEGlobalSettings::highlightedTextColor());
result.setColor(TQColorGroup::Highlight, TDEGlobalSettings::highlightColor());
return result;
}
bool markCurrentAlways = m_colorSettings.getBoolValue("Show Current Item Always", _ShowCurrentItemAlways);
@ -526,7 +526,7 @@ const TQColor & KrColorCacheImpl::setColorIfContrastIsSufficient(const TQColor &
TQColor KrColorCacheImpl::getForegroundColor(bool isActive) const
{
TQColor color = KGlobalSettings::textColor();
TQColor color = TDEGlobalSettings::textColor();
SETCOLOR(color, m_colorSettings.getColorValue("Foreground"));
if (!isActive) SETCOLOR(color, m_colorSettings.getColorValue("Inactive Foreground"));
return color;
@ -546,7 +546,7 @@ TQColor KrColorCacheImpl::getSpecialForegroundColor(const TQString & type, bool
TQColor KrColorCacheImpl::getBackgroundColor(bool isActive) const
{
TQColor color = KGlobalSettings::baseColor();
TQColor color = TDEGlobalSettings::baseColor();
SETCOLOR(color, m_colorSettings.getColorValue("Background"));
if (!isActive) SETCOLOR(color, m_colorSettings.getColorValue("Inactive Background"));
return color;
@ -564,9 +564,9 @@ TQColor KrColorCacheImpl::getAlternateBackgroundColor(bool isActive) const
m_colorSettings.getColorValue("Alternate Background")
: m_colorSettings.getColorValue("Inactive Alternate Background");
if (!color.isValid())
color = KGlobalSettings::alternateBackgroundColor();
color = TDEGlobalSettings::alternateBackgroundColor();
if (!color.isValid())
color = KGlobalSettings::baseColor();
color = TDEGlobalSettings::baseColor();
return color;
}
@ -576,7 +576,7 @@ TQColor KrColorCacheImpl::getMarkedForegroundColor(bool isActive) const
if (m_colorSettings.getColorTextValue(colorName) == "transparent")
return TQColor();
if (isActive && m_colorSettings.getColorTextValue(colorName) == "")
return KGlobalSettings::highlightedTextColor();
return TDEGlobalSettings::highlightedTextColor();
if (!isActive && m_colorSettings.getColorTextValue(colorName) == "")
return getMarkedForegroundColor(true);
return m_colorSettings.getColorValue(colorName);
@ -585,7 +585,7 @@ TQColor KrColorCacheImpl::getMarkedForegroundColor(bool isActive) const
TQColor KrColorCacheImpl::getMarkedBackgroundColor(bool isActive) const
{
if (isActive && m_colorSettings.getColorTextValue("Marked Background") == "")
return KGlobalSettings::highlightColor();
return TDEGlobalSettings::highlightColor();
if (isActive && m_colorSettings.getColorTextValue("Marked Background") == "Background")
return getBackgroundColor(true);
if (!isActive && m_colorSettings.getColorTextValue("Inactive Marked Background") == "")

@ -117,7 +117,7 @@ void KrDetailedView::setup() {
setFont( _config->readFontEntry( "Filelist Font", _FilelistFont ) );
// decide on single click/double click selection
if ( _config->readBoolEntry( "Single Click Selects", _SingleClickSelects ) &&
KGlobalSettings::singleClick() ) {
TDEGlobalSettings::singleClick() ) {
connect( this, TQT_SIGNAL( executed( TQListViewItem* ) ), this, TQT_SLOT( slotExecuted( TQListViewItem* ) ) );
} else {
connect( this, TQT_SIGNAL( clicked( TQListViewItem* ) ), this, TQT_SLOT( slotClicked( TQListViewItem* ) ) );
@ -163,7 +163,7 @@ void KrDetailedView::setup() {
newColumn( KrDetailedViewProperties::DateTime );
setColumnWidthMode( COLUMN(DateTime), TQListView::Manual );
//setColumnWidth( column( DateTime ), TQFontMetrics( font() ).width( "99/99/99 99:99" ) );
setColumnWidth( COLUMN(DateTime), TQFontMetrics( font() ).width( KGlobal::locale() ->formatDateTime(
setColumnWidth( COLUMN(DateTime), TQFontMetrics( font() ).width( TDEGlobal::locale() ->formatDateTime(
TQDateTime ( TQDate( 2099, 12, 29 ), TQTime( 23, 59 ) ) ) ) + 3 );
}
if ( _config->readBoolEntry( "Perm Column", _PermColumn ) ) {
@ -431,7 +431,7 @@ void KrDetailedView::slotClicked( TQListViewItem *item ) {
if ( !modifierPressed ) {
if ( singleClicked && !renameTimer.isActive() ) {
KConfig * config = KGlobal::config();
KConfig * config = TDEGlobal::config();
config->setGroup( "KDE" );
int doubleClickInterval = config->readNumEntry( "DoubleClickInterval", 400 );
@ -1333,9 +1333,9 @@ void KrDetailedView::refreshColors() {
setAlternateBackground( cg.background() );
} else {
// KDE default is choosen: set back the background color
setPaletteBackgroundColor( KGlobalSettings::baseColor() );
setPaletteBackgroundColor( TDEGlobalSettings::baseColor() );
// Set the alternate color to its default or to an invalid color, to turn alternate the background off.
setAlternateBackground( alternateBackgroundEnabled ? KGlobalSettings::alternateBackgroundColor() : TQColor() );
setAlternateBackground( alternateBackgroundEnabled ? TDEGlobalSettings::alternateBackgroundColor() : TQColor() );
}
}

@ -324,7 +324,7 @@ void KrPopupMenu::performAction(int id) {
case OPEN_TERM_ID :
TQString save = getcwd( 0, 0 );
chdir( panel->func->files() ->vfs_getFile( item->name() ).path( -1 ).local8Bit() );
KProcess proc;
TDEProcess proc;
{
KConfigGroupSaver saver(krConfig, "General");
TQString term = krConfig->readEntry( "Terminal", _Terminal );
@ -335,7 +335,7 @@ void KrPopupMenu::performAction(int id) {
proc << "&";
proc.setUseShell( true );
}
if ( !proc.start( KProcess::DontCare ) )
if ( !proc.start( TDEProcess::DontCare ) )
KMessageBox::sorry( krApp, i18n( "Can't open \"%1\"" ).arg(term) );
} // group-saver is blown out of scope here
chdir( save.local8Bit() );

@ -85,7 +85,7 @@ TQString KrViewItem::dateTime() const {
struct tm* t=localtime((time_t *)&time);
TQDateTime tmp(TQDate(t->tm_year+1900, t->tm_mon+1, t->tm_mday), TQTime(t->tm_hour, t->tm_min));
return KGlobal::locale()->formatDateTime(tmp);
return TDEGlobal::locale()->formatDateTime(tmp);
}
TQPixmap KrViewItem::icon() {

@ -594,8 +594,8 @@ void ListPanel::slotFocusOnMe() {
// take care of the 'otherpanel'
TQPalette q( otherPanel->status->palette() );
q.setColor( TQColorGroup::Foreground, KGlobalSettings::textColor() );
q.setColor( TQColorGroup::Background, KGlobalSettings::baseColor() );
q.setColor( TQColorGroup::Foreground, TDEGlobalSettings::textColor() );
q.setColor( TQColorGroup::Background, TDEGlobalSettings::baseColor() );
otherPanel->status->setPalette( q );
otherPanel->totals->setPalette( q );
@ -603,8 +603,8 @@ void ListPanel::slotFocusOnMe() {
// now, take care of this panel
TQPalette p( status->palette() );
p.setColor( TQColorGroup::Foreground, KGlobalSettings::highlightedTextColor() );
p.setColor( TQColorGroup::Background, KGlobalSettings::highlightColor() );
p.setColor( TQColorGroup::Foreground, TDEGlobalSettings::highlightedTextColor() );
p.setColor( TQColorGroup::Background, TDEGlobalSettings::highlightColor() );
status->setPalette( p );
totals->setPalette( p );

@ -365,7 +365,7 @@ void ListPanelFunc::terminal() {
TQString save = getcwd( 0, 0 );
chdir( panel->realPath().local8Bit() );
KProcess proc;
TDEProcess proc;
krConfig->setGroup( "General" );
TQString term = krConfig->readEntry( "Terminal", _Terminal );
proc << KrServices::separateArgs( term );
@ -376,7 +376,7 @@ void ListPanelFunc::terminal() {
proc.setUseShell( true );
}
if ( !proc.start( KProcess::DontCare ) )
if ( !proc.start( TDEProcess::DontCare ) )
KMessageBox::sorry( krApp, i18n( "<qt>Can't open <b>%1</b></qt>" ).arg(term) );
chdir( save.local8Bit() );

@ -49,8 +49,8 @@ PanelPopup::PanelPopup( TQSplitter *parent, bool left ) : TQWidget( parent ),
// --- hack: setup colors to be the same as an inactive panel
dataLine->setBackgroundMode( PaletteBackground );
TQPalette q( dataLine->palette() );
q.setColor( TQColorGroup::Foreground, KGlobalSettings::textColor() );
q.setColor( TQColorGroup::Background, KGlobalSettings::baseColor() );
q.setColor( TQColorGroup::Foreground, TDEGlobalSettings::textColor() );
q.setColor( TQColorGroup::Background, TDEGlobalSettings::baseColor() );
dataLine->setPalette( q );
dataLine->setFrameStyle( TQFrame::Box | TQFrame::Raised );
dataLine->setLineWidth( 1 ); // a nice 3D touch :-)

@ -132,7 +132,7 @@ public:
ResultListViewItem( TQListView *resultsList, TQString name, TQString where, KIO::filesize_t size,
TQDateTime date, TQString perm ) : TQListViewItem( resultsList, name, where,
KRpermHandler::parseSize(size),
KGlobal::locale()->formatDateTime( date ), perm )
TDEGlobal::locale()->formatDateTime( date ), perm )
{
fileSize = size;
fileDate = date;

@ -1441,10 +1441,10 @@ void Synchronizer::synchronizeWithKGet()
source = startString+endString;
}
KProcess p;
TDEProcess p;
p << KrServices::fullPathName( "kget" ) << source << destURL.path();
if (!p.start(KProcess::Block))
if (!p.start(TDEProcess::Block))
KMessageBox::error(parentWidget,i18n("Error executing ")+KrServices::fullPathName( "kget" )+" !");
else
p.detach();

@ -2098,7 +2098,7 @@ TQString SynchronizerGUI::convertTime(time_t time) const
struct tm* t=localtime((time_t *)&time);
TQDateTime tmp(TQDate(t->tm_year+1900, t->tm_mon+1, t->tm_mday), TQTime(t->tm_hour, t->tm_min));
return KGlobal::locale()->formatDateTime(tmp);
return TDEGlobal::locale()->formatDateTime(tmp);
}
void SynchronizerGUI::setMarkFlags()

@ -101,7 +101,7 @@ _stdout(0), _stderr(0), _currentTextEdit(0) {
connect( useFixedFont, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( toggleFixedFont(bool) ) );
}
void KrActionProcDlg::addStderr( KProcess *, char *buffer, int buflen ) {
void KrActionProcDlg::addStderr( TDEProcess *, char *buffer, int buflen ) {
if (_stderr)
_stderr->append( TQString::fromLatin1( buffer, buflen ) );
else {
@ -111,7 +111,7 @@ void KrActionProcDlg::addStderr( KProcess *, char *buffer, int buflen ) {
}
}
void KrActionProcDlg::addStdout( KProcess *, char *buffer, int buflen ) {
void KrActionProcDlg::addStdout( TDEProcess *, char *buffer, int buflen ) {
_stdout->append( TQString::fromLatin1( buffer, buflen ) );
}
@ -173,11 +173,11 @@ void KrActionProcDlg::currentTextEditChanged() {
//////////////////////////////////// KrActionProc ////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////
KrActionProc::KrActionProc( KrActionBase* action ) : TQObject(), _action( action ), _proc( new KProcess(this) ), _output( 0 ) {
KrActionProc::KrActionProc( KrActionBase* action ) : TQObject(), _action( action ), _proc( new TDEProcess(this) ), _output( 0 ) {
_proc->setUseShell( true );
connect( _proc, TQT_SIGNAL( processExited( KProcess* ) ),
this, TQT_SLOT( processExited( KProcess* ) ) ) ;
connect( _proc, TQT_SIGNAL( processExited( TDEProcess* ) ),
this, TQT_SLOT( processExited( TDEProcess* ) ) ) ;
}
KrActionProc::~KrActionProc() {
@ -227,15 +227,15 @@ void KrActionProc::start( TQStringList cmdLineList ) {
if ( _action->user().isEmpty() )
( *_proc ) << term << cmd;
else
// ( *_proc ) << "tdesu" << "-u" << *_properties->user() << "-c" << KProcess::quote("konsole --noclose -e " + KProcess::quote(cmd) );
( *_proc ) << "tdesu" << "-u" << _action->user() << "-c" << KProcess::quote( term + " " + cmd );
// ( *_proc ) << "tdesu" << "-u" << *_properties->user() << "-c" << TDEProcess::quote("konsole --noclose -e " + TDEProcess::quote(cmd) );
( *_proc ) << "tdesu" << "-u" << _action->user() << "-c" << TDEProcess::quote( term + " " + cmd );
} else { // no terminal, no output collection, start&forget
if ( _action->user().isEmpty() )
( *_proc ) << cmd;
else
( *_proc ) << "tdesu" << "-u" << _action->user() << "-c" << KProcess::quote(cmd);
( *_proc ) << "tdesu" << "-u" << _action->user() << "-c" << TDEProcess::quote(cmd);
}
_proc->start( KProcess::NotifyOnExit, ( KProcess::Communication ) ( KProcess::Stdout | KProcess::Stderr ) );
_proc->start( TDEProcess::NotifyOnExit, ( TDEProcess::Communication ) ( TDEProcess::Stdout | TDEProcess::Stderr ) );
}
}
else { // collect output
@ -244,8 +244,8 @@ void KrActionProc::start( TQStringList cmdLineList ) {
separateStderr = true;
_output = new KrActionProcDlg( _action->text(), separateStderr );
// connect the output to the dialog
connect( _proc, TQT_SIGNAL( receivedStderr( KProcess*, char*, int ) ), _output, TQT_SLOT( addStderr( KProcess*, char *, int ) ) );
connect( _proc, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ), _output, TQT_SLOT( addStdout( KProcess*, char *, int ) ) );
connect( _proc, TQT_SIGNAL( receivedStderr( TDEProcess*, char*, int ) ), _output, TQT_SLOT( addStderr( TDEProcess*, char *, int ) ) );
connect( _proc, TQT_SIGNAL( receivedStdout( TDEProcess*, char*, int ) ), _output, TQT_SLOT( addStdout( TDEProcess*, char *, int ) ) );
connect( _output, TQT_SIGNAL( cancelClicked() ), this, TQT_SLOT( kill() ) );
_output->show();
for ( TQStringList::Iterator it = cmdLineList.begin(); it != cmdLineList.end(); ++it) {
@ -260,13 +260,13 @@ void KrActionProc::start( TQStringList cmdLineList ) {
( *_proc ) << cmd;
else
// "-t" is nessesary that tdesu displays the terminal-output of the command
( *_proc ) << "tdesu" << "-t" << "-u" << _action->user() << "-c" << KProcess::quote(cmd);
_proc->start( KProcess::NotifyOnExit, ( KProcess::Communication ) ( KProcess::Stdout | KProcess::Stderr ) );
( *_proc ) << "tdesu" << "-t" << "-u" << _action->user() << "-c" << TDEProcess::quote(cmd);
_proc->start( TDEProcess::NotifyOnExit, ( TDEProcess::Communication ) ( TDEProcess::Stdout | TDEProcess::Stderr ) );
}
}
void KrActionProc::processExited( KProcess * ) {
void KrActionProc::processExited( TDEProcess * ) {
// enable the 'close' button on the dialog (if active), disable 'kill' button
if ( _output ) {
_output->enableButtonOK( true );

@ -127,8 +127,8 @@ class KrActionProcDlg: public KDialogBase {
KrActionProcDlg( TQString caption, bool enableStderr = false, TQWidget *parent = 0 );
protected slots:
void addStderr( KProcess *proc, char *buffer, int buflen );
void addStdout( KProcess *proc, char *buffer, int buflen );
void addStderr( TDEProcess *proc, char *buffer, int buflen );
void addStdout( TDEProcess *proc, char *buffer, int buflen );
void toggleFixedFont( bool state );
void slotUser1(); ///< This is used to save the buffer to disc
@ -156,11 +156,11 @@ class KrActionProc: public TQObject {
protected slots:
void kill() { _proc->kill( SIGINT ); }
void processExited( KProcess *proc );
void processExited( TDEProcess *proc );
private:
KrActionBase* _action;
KProcess *_proc;
TDEProcess *_proc;
TQString _stdout;
TQString _stderr;
KrActionProcDlg *_output;

@ -157,7 +157,7 @@ arc_vfs::arc_vfs(TQString origin,TQString type,TQObject* panel,bool write):
// extract the cpio archive from the rpm
KShellProcess rpm;
rpm << "rpm2cpio"<<"\""+arcFile+"\""+" > "+tmpDir+"/contents.cpio";
rpm.start(KProcess::Block);
rpm.start(TDEProcess::Block);
arcFile = tmpDir+"/contents.cpio";
}
if(type == "cpio" || type == "+rpm" ){
@ -201,7 +201,7 @@ arc_vfs::~arc_vfs(){
// delete the temp dir
KShellProcess proc;
proc<<"rm"<<"-rf"<<tmpDir;
proc.start(KProcess::Block);
proc.start(TDEProcess::Block);
// set the cursor to normal mode
if (!quietMode) krApp->setCursor(KCursor::arrowCursor());
@ -212,7 +212,7 @@ bool arc_vfs::getDirs(){
// write the temp file
KShellProcess proc;
proc << cmd << listCmd << "\""+arcFile+"\"" <<" > " << tmpDir+"/tempfilelist";
proc.start(KProcess::Block);
proc.start(TDEProcess::Block);
if( !proc.normalExit() || !proc.exitStatus() == 0 ){
if (!quietMode) KMessageBox::error(krApp, i18n("<qt>Can't read <b>%1</b>. Archive "
"might be corrupted!</qt>").arg(arcFile.mid(arcFile.findRev('/')+1)));
@ -300,7 +300,7 @@ void arc_vfs::vfs_delFiles(TQStringList *fileNames){
KURL::List* filesUrls = vfs_getFiles(fileNames); // extract
changed = true;
KIO::Job *job = new KIO::CopyJob(*filesUrls,KGlobalSettings::trashPath(),KIO::CopyJob::Move,false,true );
KIO::Job *job = new KIO::CopyJob(*filesUrls,TDEGlobalSettings::trashPath(),KIO::CopyJob::Move,false,true );
connect(job,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(vfs_refresh(KIO::Job*)));
}
// else we have to delete the files from both the archive and the temp dir
@ -320,8 +320,8 @@ void arc_vfs::vfs_delFiles(TQStringList *fileNames){
KShellProcess proc1 , proc2;
krApp->startWaiting(i18n("Deleting Files..."),files.count()+ignoreLines);
connect(&proc1,TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),
krApp, TQT_SLOT(incProgress(KProcess*,char*,int)) );
connect(&proc1,TQT_SIGNAL(receivedStdout(TDEProcess*,char*,int)),
krApp, TQT_SLOT(incProgress(TDEProcess*,char*,int)) );
proc1 << delCmd << "\""+arcFile+"\"";
proc2 << "rm -rf";
@ -330,7 +330,7 @@ void arc_vfs::vfs_delFiles(TQStringList *fileNames){
proc2 << tmpDir+"/"+(*files.at(i));
extFiles.remove(*files.at(i++));
if ( i%MAX_FILES==0 || i==files.count() ){
proc1.start(KProcess::NotifyOnExit,KProcess::AllOutput);
proc1.start(TDEProcess::NotifyOnExit,TDEProcess::AllOutput);
proc2.start();
while( proc1.isRunning() || proc2.isRunning() ) tqApp->processEvents(); // busy wait - need to find something better...
proc1.clearArguments() ; proc2.clearArguments();
@ -395,15 +395,15 @@ KURL::List* arc_vfs::vfs_getFiles(TQStringList* names){
if ( files.count() > 0 ){
krApp->startWaiting(i18n("Unpacking Files"),files.count()+ignoreLines);
KShellProcess proc;
connect(&proc,TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),
krApp, TQT_SLOT(incProgress(KProcess*,char*,int)) );
connect(&proc,TQT_SIGNAL(receivedStdout(TDEProcess*,char*,int)),
krApp, TQT_SLOT(incProgress(TDEProcess*,char*,int)) );
proc << cmd << getCmd << "\""+arcFile+"\"";
if( vfs_type == "gzip" || vfs_type == "zip2" ) proc << ">";
for(unsigned int i=0 ; i < files.count() ; ){
proc << (prefix+*files.at(i++));
if ( i%MAX_FILES==0 || i==files.count() ){
proc.start(KProcess::NotifyOnExit,KProcess::AllOutput);
proc.start(TDEProcess::NotifyOnExit,TDEProcess::AllOutput);
while( proc.isRunning() ) tqApp->processEvents();
proc.clearArguments();
proc << cmd << getCmd << "\""+arcFile+"\"";
@ -577,14 +577,14 @@ void arc_vfs::repack(){
if( !filesToDelete.isEmpty() ){
KShellProcess delProc;
krApp->startWaiting(i18n("Deleting Files..."),filesToDelete.count()+ignoreLines);
connect(&delProc,TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),
krApp, TQT_SLOT(incProgress(KProcess*,char*,int)) );
connect(&delProc,TQT_SIGNAL(receivedStdout(TDEProcess*,char*,int)),
krApp, TQT_SLOT(incProgress(TDEProcess*,char*,int)) );
delProc << delCmd << "\""+arcFile+"\"";
for( unsigned int i=0 ; i < filesToDelete.count() ;){
delProc << (*filesToDelete.at(i++));
if( i%MAX_FILES==0 || i==filesToDelete.count() ){
delProc.start(KProcess::NotifyOnExit,KProcess::AllOutput);
delProc.start(TDEProcess::NotifyOnExit,TDEProcess::AllOutput);
while( delProc.isRunning() ) tqApp->processEvents();
delProc.clearArguments();
delProc << delCmd << "\""+arcFile+"\"";
@ -601,12 +601,12 @@ void arc_vfs::repack(){
if( !filesToPack.isEmpty() ){
KShellProcess addProc;
krApp->startWaiting(i18n("Repacking..."),filesToPack.count()+ignoreLines);
connect(&addProc,TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),
krApp, TQT_SLOT(incProgress(KProcess*,char*,int)) );
connect(&addProc,TQT_SIGNAL(receivedStdout(TDEProcess*,char*,int)),
krApp, TQT_SLOT(incProgress(TDEProcess*,char*,int)) );
if( vfs_type=="gzip" || vfs_type=="zip2" ){
addProc << addCmd << *filesToPack.at(0)<< ">" << "\""+arcFile+"\"";
addProc.start(KProcess::NotifyOnExit);
addProc.start(TDEProcess::NotifyOnExit);
while( addProc.isRunning() ) tqApp->processEvents();
}
else {
@ -614,7 +614,7 @@ void arc_vfs::repack(){
for( unsigned int i=0 ; i<filesToPack.count(); ){
addProc << "\""+prefix+(*filesToPack.at(i++))+"\"";
if( i%MAX_FILES==0 || i==filesToPack.count() ){
addProc.start(KProcess::NotifyOnExit,KProcess::AllOutput);
addProc.start(TDEProcess::NotifyOnExit,TDEProcess::AllOutput);
while( addProc.isRunning() ) tqApp->processEvents(); // busy wait - need to find something better...
addProc.clearArguments();
addProc << addCmd << "\""+arcFile+"\"";

@ -190,7 +190,7 @@ long KRarcHandler::arcFileCount( TQString archive, TQString type, TQString passw
list << lister << KrServices::quote( archive ) << ">" << tmpFile.name() ;
if( type == "-ace" && TQFile( "/dev/ptmx" ).exists() ) // Don't remove, unace crashes if missing!!!
list<< "<" << "/dev/ptmx";
list.start( KProcess::NotifyOnExit, KProcess::AllOutput );
list.start( TDEProcess::NotifyOnExit, TDEProcess::AllOutput );
while ( list.isRunning() ) {
usleep( 1000 );
tqApp->processEvents();
@ -257,7 +257,7 @@ bool KRarcHandler::unpack( TQString archive, TQString type, TQString password, T
KrShellProcess cpio;
cpio << KrServices::fullPathName( "rpm2cpio" ) << " " + KrServices::quote( archive ) << " > " << cpioName;
cpio.start(KProcess::Block, KProcess::AllOutput );
cpio.start(TDEProcess::Block, TDEProcess::AllOutput );
if( !cpio.normalExit() || !checkStatus( "cpio", cpio.exitStatus() ) ) {
KMessageBox::detailedError (krApp, i18n( "Failed to convert rpm (%1) to cpio!" ).arg( archive ),
cpio.getErrorMsg(), i18n("Error" ) );
@ -274,7 +274,7 @@ bool KRarcHandler::unpack( TQString archive, TQString type, TQString password, T
KrShellProcess dpkg;
dpkg << KrServices::fullPathName( "dpkg" ) << " --fsys-tarfile " + KrServices::quote( archive ) << " > " << cpioName;
dpkg.start(KProcess::Block, KProcess::AllOutput );
dpkg.start(TDEProcess::Block, TDEProcess::AllOutput );
if( !dpkg.normalExit() || !checkStatus( "-deb", dpkg.exitStatus() ) ) {
KMessageBox::detailedError (krApp, i18n( "Failed to convert deb (%1) to tar!" ).arg( archive ),
dpkg.getErrorMsg(), i18n("Error" ) );
@ -312,15 +312,15 @@ bool KRarcHandler::unpack( TQString archive, TQString type, TQString password, T
// tell the user to wait
krApp->startWaiting( i18n( "Unpacking File(s)" ), count, true );
if ( count != 0 ) {
connect( &proc, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ),
krApp, TQT_SLOT( incProgress( KProcess*, char*, int ) ) );
connect( &proc, TQT_SIGNAL( receivedStdout( TDEProcess*, char*, int ) ),
krApp, TQT_SLOT( incProgress( TDEProcess*, char*, int ) ) );
if( type == "-rpm" )
connect( &proc, TQT_SIGNAL( receivedStderr( KProcess*, char*, int ) ),
krApp, TQT_SLOT( incProgress( KProcess*, char*, int ) ) );
connect( &proc, TQT_SIGNAL( receivedStderr( TDEProcess*, char*, int ) ),
krApp, TQT_SLOT( incProgress( TDEProcess*, char*, int ) ) );
}
// start the unpacking process
proc.start( KProcess::NotifyOnExit, KProcess::AllOutput );
proc.start( TDEProcess::NotifyOnExit, TDEProcess::AllOutput );
while ( proc.isRunning() ) {
usleep( 1000 );
tqApp->processEvents();
@ -382,11 +382,11 @@ bool KRarcHandler::test( TQString archive, TQString type, TQString password, lon
// tell the user to wait
krApp->startWaiting( i18n( "Testing Archive" ), count, true );
if ( count != 0 ) connect( &proc, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ),
krApp, TQT_SLOT( incProgress( KProcess*, char*, int ) ) );
if ( count != 0 ) connect( &proc, TQT_SIGNAL( receivedStdout( TDEProcess*, char*, int ) ),
krApp, TQT_SLOT( incProgress( TDEProcess*, char*, int ) ) );
// start the unpacking process
proc.start( KProcess::NotifyOnExit, KProcess::AllOutput );
proc.start( TDEProcess::NotifyOnExit, TDEProcess::AllOutput );
while ( proc.isRunning() ) {
usleep( 1000 );
tqApp->processEvents();
@ -489,11 +489,11 @@ bool KRarcHandler::pack( TQStringList fileNames, TQString type, TQString dest, l
// tell the user to wait
krApp->startWaiting( i18n( "Packing File(s)" ), count, true );
if ( count != 0 )
connect( &proc, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ),
krApp, TQT_SLOT( incProgress( KProcess*, char*, int ) ) );
connect( &proc, TQT_SIGNAL( receivedStdout( TDEProcess*, char*, int ) ),
krApp, TQT_SLOT( incProgress( TDEProcess*, char*, int ) ) );
// start the packing process
proc.start( KProcess::NotifyOnExit, KProcess::AllOutput );
proc.start( TDEProcess::NotifyOnExit, TDEProcess::AllOutput );
while ( proc.isRunning() ) {
usleep( 1000 );
tqApp->processEvents();
@ -722,7 +722,7 @@ TQString KRarcHandler::detectArchive( bool &encrypted, TQString fileName, bool c
Kr7zEncryptionChecker proc;
proc << KrServices::fullPathName( "7z" ) << " -y t";
proc << KrServices::quote( fileName );
proc.start(KProcess::Block,KProcess::AllOutput);
proc.start(TDEProcess::Block,TDEProcess::AllOutput);
encrypted = proc.isEncrypted();
}
}

@ -74,10 +74,10 @@ class KrShellProcess : public KShellProcess {
public:
KrShellProcess() : KShellProcess(), errorMsg( TQString() ), outputMsg( TQString() ) {
connect(this,TQT_SIGNAL(receivedStderr(KProcess*,char*,int)),
this,TQT_SLOT(receivedErrorMsg(KProcess*,char*,int)) );
connect(this,TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),
this,TQT_SLOT(receivedOutputMsg(KProcess*,char*,int)) );
connect(this,TQT_SIGNAL(receivedStderr(TDEProcess*,char*,int)),
this,TQT_SLOT(receivedErrorMsg(TDEProcess*,char*,int)) );
connect(this,TQT_SIGNAL(receivedStdout(TDEProcess*,char*,int)),
this,TQT_SLOT(receivedOutputMsg(TDEProcess*,char*,int)) );
}
TQString getErrorMsg() {
@ -88,14 +88,14 @@ public:
}
public slots:
void receivedErrorMsg(KProcess*, char *buf, int len) {
void receivedErrorMsg(TDEProcess*, char *buf, int len) {
errorMsg += TQString::fromLocal8Bit( buf, len );
if( errorMsg.length() > 500 )
errorMsg = errorMsg.right( 500 );
receivedOutputMsg( 0, buf, len );
}
void receivedOutputMsg(KProcess*, char *buf, int len) {
void receivedOutputMsg(TDEProcess*, char *buf, int len) {
outputMsg += TQString::fromLocal8Bit( buf, len );
if( outputMsg.length() > 500 )
outputMsg = outputMsg.right( 500 );
@ -112,12 +112,12 @@ class Kr7zEncryptionChecker : public KrShellProcess {
public:
Kr7zEncryptionChecker() : KrShellProcess(), encrypted( false ), lastData() {
connect(this,TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),
this,TQT_SLOT(processStdout(KProcess*,char*,int)) );
connect(this,TQT_SIGNAL(receivedStdout(TDEProcess*,char*,int)),
this,TQT_SLOT(processStdout(TDEProcess*,char*,int)) );
}
public slots:
void processStdout( KProcess *proc,char *buf,int len ) {
void processStdout( TDEProcess *proc,char *buf,int len ) {
TQByteArray d(len);
d.setRawData(buf,len);
TQString data = TQString( d );

@ -281,9 +281,9 @@ bool KRpermHandler::fileExist( TQString path, TQString name ) {
TQString KRpermHandler::parseSize( KIO::filesize_t val ) {
#if (TDE_VERSION_MAJOR >= 3) && (TDE_VERSION_MINOR >= 5)
return KGlobal::locale()->formatNumber(TQString::number(val), false, 0);
return TDEGlobal::locale()->formatNumber(TQString::number(val), false, 0);
#else
return KGlobal::locale()->formatNumber(val);
return TDEGlobal::locale()->formatNumber(val);
#endif
#if 0

@ -188,7 +188,7 @@ void normal_vfs::vfs_delFiles(TQStringList *fileNames){
#if KDE_IS_VERSION(3,4,0)
job = KIO::trash(filesUrls, true );
#else
job = new KIO::CopyJob(filesUrls,KGlobalSettings::trashPath(),KIO::CopyJob::Move,false,true );
job = new KIO::CopyJob(filesUrls,TDEGlobalSettings::trashPath(),KIO::CopyJob::Move,false,true );
#endif
connect(job,TQT_SIGNAL(result(KIO::Job*)),SLOTS,TQT_SLOT(changeTrashIcon()));
}

@ -60,12 +60,12 @@ temp_vfs::~temp_vfs(){
// unmount the ISO image
KShellProcess umount;
umount << "umount -f" << tmpDir;
umount.start(KProcess::Block);
umount.start(TDEProcess::Block);
}
// delete the temp dir
KShellProcess proc;
proc << "rm -rf" << tmpDir;
proc.start(KProcess::DontCare);
proc.start(TDEProcess::DontCare);
}
// return the working dir
@ -108,20 +108,20 @@ void temp_vfs::handleRpm(TQString origin){
// then extract the cpio archive from the rpm
KShellProcess rpm;
rpm << "rpm2cpio"<<"\""+origin+"\""+" > "+tmpDir+"/contents.cpio";
rpm.start(KProcess::Block);
rpm.start(TDEProcess::Block);
// and write a nice header
rpm.clearArguments();
rpm << "rpm -qip"<<"\""+origin+"\""+" > "+tmpDir+"/header.txt";
rpm.start(KProcess::Block);
rpm.start(TDEProcess::Block);
// and a file list
rpm.clearArguments();
rpm << "rpm -lpq"<<"\""+origin+"\""+" > "+tmpDir+"/filelist.txt";
rpm.start(KProcess::Block);
rpm.start(TDEProcess::Block);
}
void temp_vfs::handleIso(TQString origin){
// mount the ISO image
KShellProcess mount;
mount << KrServices::fullPathName( "mount" ) << "-o loop" << origin << tmpDir;
mount.start(KProcess::Block);
mount.start(TDEProcess::Block);
}

@ -124,7 +124,7 @@ void virt_vfs::vfs_delFiles( TQStringList *fileNames ) {
#if KDE_IS_VERSION(3,4,0)
job = KIO::trash( filesUrls, true );
#else
job = new KIO::CopyJob( filesUrls, KGlobalSettings::trashPath(), KIO::CopyJob::Move, false, true );
job = new KIO::CopyJob( filesUrls, TDEGlobalSettings::trashPath(), KIO::CopyJob::Move, false, true );
#endif
connect( job, TQT_SIGNAL( result( KIO::Job* ) ), krApp, TQT_SLOT( changeTrashIcon() ) );
} else

@ -58,7 +58,7 @@
////////////////////////[Look&Feel]
// Filelist Font ///////
#define _FilelistFont new TQFont(KGlobalSettings::generalFont())
#define _FilelistFont new TQFont(TDEGlobalSettings::generalFont())
// Warn On Exit ////////
#define _WarnOnExit false
// Minimize To Tray ////
@ -203,9 +203,9 @@
// Terminal for UserActions ///////////
#define _UserActions_Terminal "konsole --noclose -e"
// Normal font for output collection ///////
#define _UserActions_NormalFont new TQFont(KGlobalSettings::generalFont())
#define _UserActions_NormalFont new TQFont(TDEGlobalSettings::generalFont())
// Font for output collection with fixed width ///////
#define _UserActions_FixedFont new TQFont(KGlobalSettings::fixedFont())
#define _UserActions_FixedFont new TQFont(TDEGlobalSettings::fixedFont())
// Use for output collection fixed width font as default ///////
#define _UserActions_UseFixedFont false

@ -192,25 +192,25 @@ TQString KrServices::escape( TQString name ) {
// ------- KEasyProcess
KEasyProcess::KEasyProcess(TQObject *parent, const char *name): KProcess(parent, name) {
KEasyProcess::KEasyProcess(TQObject *parent, const char *name): TDEProcess(parent, name) {
init();
}
KEasyProcess::KEasyProcess(): KProcess() {
KEasyProcess::KEasyProcess(): TDEProcess() {
init();
}
void KEasyProcess::init() {
connect(this, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)),
this, TQT_SLOT(receivedStdout(KProcess *, char *, int)));
connect(this, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)),
this, TQT_SLOT(receivedStderr(KProcess *, char *, int)));
connect(this, TQT_SIGNAL(receivedStdout(TDEProcess *, char *, int)),
this, TQT_SLOT(receivedStdout(TDEProcess *, char *, int)));
connect(this, TQT_SIGNAL(receivedStderr(TDEProcess *, char *, int)),
this, TQT_SLOT(receivedStderr(TDEProcess *, char *, int)));
}
void KEasyProcess::receivedStdout (KProcess * /* proc */, char *buffer, int buflen) {
void KEasyProcess::receivedStdout (TDEProcess * /* proc */, char *buffer, int buflen) {
_stdout+=TQString::fromLocal8Bit(buffer, buflen);
}
void KEasyProcess::receivedStderr (KProcess * /* proc */, char *buffer, int buflen) {
void KEasyProcess::receivedStderr (TDEProcess * /* proc */, char *buffer, int buflen) {
_stderr+=TQString::fromLocal8Bit(buffer, buflen);
}

@ -56,7 +56,7 @@ private:
// wraps over kprocess, but buffers stdout and stderr and allows easy access to them later
// note, that you still have to enable stdout,stderr in KEasyProcess::start() for buffering
// to happen (ie: start(KEasyProcess::Block, KEasyProcess::AllOutput);)
class KEasyProcess: public KProcess {
class KEasyProcess: public TDEProcess {
Q_OBJECT
public:
@ -68,8 +68,8 @@ public:
const TQString& getStderr() const { return _stderr; }
protected slots:
void receivedStdout (KProcess *proc, char *buffer, int buflen);
void receivedStderr (KProcess *proc, char *buffer, int buflen);
void receivedStdout (TDEProcess *proc, char *buffer, int buflen);
void receivedStderr (TDEProcess *proc, char *buffer, int buflen);
void init();
private:

@ -115,7 +115,7 @@ void KRslots::sendFileByEmail(TQString filename) {
"--attach "+"\"" + filename + "\"";
}
if (!proc.start(KProcess::DontCare))
if (!proc.start(TDEProcess::DontCare))
KMessageBox::error(0,i18n("Error executing ")+mailProg+" !");
else proc.detach();
}
@ -156,7 +156,7 @@ void KRslots::compareContent() {
compareContent( name1, name2 );
}
class KrProcess: public KProcess
class KrProcess: public TDEProcess
{
TQString tmp1, tmp2;
@ -207,7 +207,7 @@ void KRslots::compareContent( KURL url1, KURL url2 )
KrProcess *p = new KrProcess( tmp1 != url1.path() ? tmp1 : TQString(),
tmp2 != url2.path() ? tmp2 : TQString() );
*p << diffProg << tmp1 << tmp2;
if (!p->start(KProcess::DontCare))
if (!p->start(TDEProcess::DontCare))
KMessageBox::error(0,i18n("Error executing ")+diffProg+" !");
}
@ -485,7 +485,7 @@ void KRslots::homeTerminal(){
TQString save = getcwd(0,0);
chdir (TQDir::homeDirPath().local8Bit());
KProcess proc;
TDEProcess proc;
krConfig->setGroup("General");
TQString term = krConfig->readEntry("Terminal",_Terminal);
proc << KrServices::separateArgs( term );
@ -496,16 +496,16 @@ void KRslots::homeTerminal(){
proc.setUseShell( true );
}
if(!proc.start(KProcess::DontCare))
if(!proc.start(TDEProcess::DontCare))
KMessageBox::sorry(krApp,i18n("Can't open ")+"\""+term+"\"");
chdir(save.local8Bit());
}
void KRslots::sysInfo(){
KProcess proc;
TDEProcess proc;
proc << "kcmshell" << "System/ksysctrl";
if (!proc.start(KProcess::DontCare)){
if (!proc.start(TDEProcess::DontCare)){
KMessageBox::sorry(krApp,i18n("Can't find \"KsysCtrl\". Please install the TDE admin package"));
}
}
@ -536,7 +536,7 @@ void KRslots::multiRename(){
proc << "\"" + (*u).path() + "\""; // patch thanks to Tobias Vogele
}
proc.start(KProcess::DontCare);
proc.start(TDEProcess::DontCare);
delete urls;
}
@ -553,7 +553,7 @@ void KRslots::rootKrusader()
" --left=\"" +MAIN_VIEW->left->func->files()->vfs_getOrigin().url() +
"\" --right=\""+MAIN_VIEW->right->func->files()->vfs_getOrigin().url() + "\"'";
proc.start(KProcess::DontCare);
proc.start(TDEProcess::DontCare);
}
// settings slots
@ -571,7 +571,7 @@ void KRslots::changeTrashIcon(){
// update trash bin icon - this is "stolen" konqi code
// Copyright (C) 2000 David Faure <faure@kde.org>
KURL trash;
trash.setPath(KGlobalSettings::trashPath());
trash.setPath(TDEGlobalSettings::trashPath());
KURL::List lst;
lst.append(trash);
KDirNotify_stub allDirNotify("*","KDirNotify*");

@ -237,7 +237,7 @@ Krusader::Krusader() : KParts::MainWindow(0,0,WType_TopLevel|WDestructiveClose|T
}
// create an icon loader
iconLoader = KGlobal::iconLoader();
iconLoader = TDEGlobal::iconLoader();
// create MountMan
mountMan = new KMountMan();
@ -1020,7 +1020,7 @@ bool Krusader::wasWaitingCancelled() const {
return plzWait->wasCancelled();
}
void Krusader::incProgress( KProcess *, char *buffer, int buflen ) {
void Krusader::incProgress( TDEProcess *, char *buffer, int buflen ) {
int howMuch = 0;
for ( int i = 0 ; i < buflen; ++i )
if ( buffer[ i ] == '\n' )

@ -56,7 +56,7 @@ class KrJS;
class KrusaderStatus;
class KRPleaseWaitHandler;
class KrusaderView;
class KProcess;
class TDEProcess;
class KRslots;
class KIconLoader;
class KSystemTray;
@ -91,7 +91,7 @@ class Krusader : public KParts::MainWindow, public DCOPObject {
public slots:
// increase the internal progress bar
void incProgress( KProcess *, char *buffer, int buflen );
void incProgress( TDEProcess *, char *buffer, int buflen );
void statusBarUpdate( TQString& mess );
// in use by Krusader only
void saveSettings();

Loading…
Cancel
Save