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

pull/1/head
Timothy Pearson 12 years ago
parent 5e21b1fe4b
commit bece9aa3ad

@ -98,7 +98,7 @@ void Convert::get( ConvertItem* item )
logger->log( item->logID, "cp \"" + source.path() + "\" \"" + destination.path() + "\"" );
item->convertProcess->setPriority( config->data.general.priority );
item->convertProcess->start( KProcess::NotifyOnExit, KProcess::AllOutput );
item->convertProcess->start( TDEProcess::NotifyOnExit, TDEProcess::AllOutput );
}
else {
item->moveJob = new KIO::FileCopyJob( source, destination, -1, false, true, false, false );
@ -139,7 +139,7 @@ void Convert::getCorrection( ConvertItem* item )
logger->log( item->logID, "cp \"" + source.path() + "\" \"" + destination.path() + "\"" );
item->convertProcess->setPriority( config->data.general.priority );
item->convertProcess->start( KProcess::NotifyOnExit, KProcess::AllOutput );
item->convertProcess->start( TDEProcess::NotifyOnExit, TDEProcess::AllOutput );
}
else {
item->moveJob = new KIO::FileCopyJob( source, destination, -1, false, true, false, false );
@ -261,7 +261,7 @@ void Convert::rip( ConvertItem* item )
item->fileListItem->ripping = true;
item->convertProcess->setPriority( config->data.general.priority );
item->convertProcess->start( KProcess::NotifyOnExit, KProcess::AllOutput );
item->convertProcess->start( TDEProcess::NotifyOnExit, TDEProcess::AllOutput );
}
}
@ -314,7 +314,7 @@ void Convert::decode( ConvertItem* item )
item->fileListItem->setText( fileList->columnByName(i18n("State")), i18n("Decoding")+"... 00 %" );
item->convertProcess->setPriority( config->data.general.priority );
item->convertProcess->start( KProcess::NotifyOnExit, KProcess::AllOutput );
item->convertProcess->start( TDEProcess::NotifyOnExit, TDEProcess::AllOutput );
}
void Convert::encode( ConvertItem* item )
@ -420,7 +420,7 @@ void Convert::encode( ConvertItem* item )
//t_int -= t_int%plugin->enc.quality.step;
sQuality = TQString::number( t_int );
}
if( plugin->enc.bin == "oggenc" ) sQuality.replace(TQChar('.'),KGlobal::locale()->decimalSymbol()); // HACK make oggenc usable with all langauges
if( plugin->enc.bin == "oggenc" ) sQuality.replace(TQChar('.'),TDEGlobal::locale()->decimalSymbol()); // HACK make oggenc usable with all langauges
else if( plugin->enc.lossy.quality.separator != '.' ) sQuality.replace(TQChar('.'),plugin->enc.lossy.quality.separator);
}
else {
@ -555,7 +555,7 @@ void Convert::encode( ConvertItem* item )
item->fileListItem->setText( fileList->columnByName(i18n("State")), i18n("Encoding")+"... 00 %" );
item->convertProcess->setPriority( config->data.general.priority );
item->convertProcess->start( KProcess::NotifyOnExit, KProcess::AllOutput );
item->convertProcess->start( TDEProcess::NotifyOnExit, TDEProcess::AllOutput );
}
void Convert::replaygain( ConvertItem* item )
@ -631,7 +631,7 @@ void Convert::put( ConvertItem* item )
logger->log( item->logID, "cp \"" + source.path() + "\" \"" + destination.path() + "\"" );
item->convertProcess->setPriority( config->data.general.priority );
item->convertProcess->start( KProcess::NotifyOnExit, KProcess::AllOutput );
item->convertProcess->start( TDEProcess::NotifyOnExit, TDEProcess::AllOutput );
}
else {
item->moveJob = new KIO::FileCopyJob( source, destination, -1, false, false, false, false );
@ -670,7 +670,7 @@ void Convert::putCorrection( ConvertItem* item )
logger->log( item->logID, "cp \"" + source.path() + "\" \"" + destination.path() + "\"" );
item->convertProcess->setPriority( config->data.general.priority );
item->convertProcess->start( KProcess::NotifyOnExit, KProcess::AllOutput );
item->convertProcess->start( TDEProcess::NotifyOnExit, TDEProcess::AllOutput );
}
else {
item->moveJob = new KIO::FileCopyJob( source, destination, -1, false, false, false, false );
@ -705,7 +705,7 @@ void Convert::executeUserScript( ConvertItem* item )
logger->log( item->logID, userscript + " \"" + source.path() + "\" \"" + destination.path() + "\"" );
item->convertProcess->setPriority( config->data.general.priority );
item->convertProcess->start( KProcess::NotifyOnExit, KProcess::AllOutput );
item->convertProcess->start( TDEProcess::NotifyOnExit, TDEProcess::AllOutput );
}
void Convert::executeNextStep( ConvertItem* item )
@ -924,7 +924,7 @@ void Convert::moveFinished( KIO::Job* job )
}
}
void Convert::processOutput( KProcess* proc, char* data, int )
void Convert::processOutput( TDEProcess* proc, char* data, int )
{
int iPercent = 0, iTime = 0, iPos = 0, iNum = 0;
@ -1083,7 +1083,7 @@ void Convert::processOutput( KProcess* proc, char* data, int )
}
}
void Convert::processExit( KProcess* proc )
void Convert::processExit( TDEProcess* proc )
{
// search the item list for our item
for( TQValueList<ConvertItem*>::Iterator item = items.begin(); item != items.end(); item++ ) {
@ -1316,15 +1316,15 @@ void Convert::add( FileListItem* item )
(*newItem)->correctionOutputExtension = TQString()();*/
// connect convertProcess of our new item with the slots of Convert
(*newItem)->convertProcess = new KProcess();
connect( (*newItem)->convertProcess, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),
this, TQT_SLOT(processOutput(KProcess*,char*,int))
(*newItem)->convertProcess = new TDEProcess();
connect( (*newItem)->convertProcess, TQT_SIGNAL(receivedStdout(TDEProcess*,char*,int)),
this, TQT_SLOT(processOutput(TDEProcess*,char*,int))
);
connect( (*newItem)->convertProcess, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)),
this, TQT_SLOT(processOutput(KProcess*,char*,int))
connect( (*newItem)->convertProcess, TQT_SIGNAL(receivedStderr(TDEProcess*,char*,int)),
this, TQT_SLOT(processOutput(TDEProcess*,char*,int))
);
connect( (*newItem)->convertProcess, TQT_SIGNAL(processExited(KProcess*)),
this, TQT_SLOT(processExit(KProcess*))
connect( (*newItem)->convertProcess, TQT_SIGNAL(processExited(TDEProcess*)),
this, TQT_SLOT(processExit(TDEProcess*))
);
// NOTE the tempInFile is also created if the file is a audio cd track
@ -1486,7 +1486,7 @@ void Convert::remove( ConvertItem* item, int state )
paramSplinter.replace( "%o", item->outputFilePathName );
notify << paramSplinter;
}
notify.start( KProcess::DontCare );
notify.start( TDEProcess::DontCare );
}
item->fileListItem->converting = false;
@ -1592,7 +1592,7 @@ void Convert::updateProgressIndicator()
// void Convert::priorityChanged( int priority )
// { // FIXME setting a higher priority does not work
// KProcess pChangePriority;
// TDEProcess pChangePriority;
//
// for( TQValueList<ConvertItem*>::Iterator it = items.begin(); it != items.end(); it++ ) {
// if( (*it)->convertProcess->isRunning() ) {
@ -1607,7 +1607,7 @@ void Convert::updateProgressIndicator()
// pChangePriority << pid;
// //TQString cmd;
// //cmd.sprintf( "renice %i %i", );
// pChangePriority.start( KProcess::Block );
// pChangePriority.start( TDEProcess::Block );
// }
// }
// }

@ -18,7 +18,7 @@ class FileListItem;
class ReplayGain;
class Logger;
class KTempFile;
//class KProcess;
//class TDEProcess;
/**
* @short The items for the conversion (for every active file)
@ -67,7 +67,7 @@ public:
ReplayGain* replayGain;
/** if we need to encode, decode, etc. here we have our processes */
KProcess* convertProcess;
TDEProcess* convertProcess;
/** for moving the file to the temporary or output directory */
KIO::Job* moveJob;
@ -206,7 +206,7 @@ private:
FileList* fileList;
Logger* logger;
TQTimer* tUpdateProgressIndicator;
KProcess notify;
TDEProcess notify;
private slots:
/**
@ -227,13 +227,13 @@ private slots:
* @p data The output data
* @p length The length of the data
*/
void processOutput( KProcess *proc, char *data, int length );
void processOutput( TDEProcess *proc, char *data, int length );
/**
* The process has exited
* @p proc The pinter to the progess
*/
void processExit( KProcess *proc );
void processExit( TDEProcess *proc );
/**
* Updates the progress indicator

@ -1369,7 +1369,7 @@ TQString FileList::debug_params( ConversionOptions conversionOptions, FormatItem
//t_int -= t_int%plugin->enc.quality.step;
sQuality = TQString::number( t_int );
}
if( plugin->enc.bin == "oggenc" ) sQuality.replace(TQChar('.'),KGlobal::locale()->decimalSymbol());
if( plugin->enc.bin == "oggenc" ) sQuality.replace(TQChar('.'),TDEGlobal::locale()->decimalSymbol());
else if( plugin->enc.lossy.quality.separator != '.' ) sQuality.replace(TQChar('.'),plugin->enc.lossy.quality.separator);
}
else {

@ -113,7 +113,7 @@ Options::Options( Config* _config, const TQString &text, TQWidget *parent, const
optionsBox->addStretch();
// pPluginsNotify = new KPushButton( "", this, "pPluginsNotify");
// pPluginsNotify->setPixmap( KGlobal::iconLoader()->loadIcon("connect_creating",KIcon::Toolbar) );
// pPluginsNotify->setPixmap( TDEGlobal::iconLoader()->loadIcon("connect_creating",KIcon::Toolbar) );
// TQToolTip::add( pPluginsNotify, i18n("There are new plugin updates available.\nClick on this button in order to open the configuration dialog.") );
// pPluginsNotify->hide();
// pPluginsNotify->setPaletteBackgroundColor( TQColor(255,220,247) );
@ -123,7 +123,7 @@ Options::Options( Config* _config, const TQString &text, TQWidget *parent, const
// );
pBackendsNotify = new KPushButton( "", this, "pBackendsNotify");
pBackendsNotify->setPixmap( KGlobal::iconLoader()->loadIcon("kcmsystem",KIcon::Toolbar) );
pBackendsNotify->setPixmap( TDEGlobal::iconLoader()->loadIcon("kcmsystem",KIcon::Toolbar) );
TQToolTip::add( pBackendsNotify, i18n("soundKonverter either found new backends or misses some.\nClick on this button in order to open the configuration dialog.") );
pBackendsNotify->setShown( config->backendsChanged );
config->backendsChanged = false;

@ -675,7 +675,7 @@ void OptionsDetailed::qualityChanged()
// t_int = ( (100 - item->fileListItem->options.encodingOptions.iQuality) * (int)( plugin->enc.lossy.quality.range_min - plugin->enc.lossy.quality.range_max ) / 100) + (int)plugin->enc.lossy.quality.range_max;
quality.replace( "%q", TQString::number( ( (100 - qualityLevel) * (int)( plugin->enc.lossy.quality.range_min - plugin->enc.lossy.quality.range_max ) / 100) + (int)plugin->enc.lossy.quality.range_max ) );
}
if( plugin->enc.bin == "oggenc" ) quality.replace(TQChar('.'),KGlobal::locale()->decimalSymbol()); // HACK make oggenc usable with all langauges
if( plugin->enc.bin == "oggenc" ) quality.replace(TQChar('.'),TDEGlobal::locale()->decimalSymbol()); // HACK make oggenc usable with all langauges
else if( plugin->enc.lossy.quality.separator != '.' ) {
quality.replace( TQChar('.'), plugin->enc.lossy.quality.separator );
}

@ -419,7 +419,7 @@ void OutputDirectory::gotoDir()
kfm << "kfmclient";
kfm << "openURL";
kfm << startDir;
kfm.start( KProcess::DontCare );
kfm.start( TDEProcess::DontCare );
}
void OutputDirectory::modeChangedSlot( int mode )

@ -77,7 +77,7 @@ private:
bool modeJustChanged;
KProcess kfm;
TDEProcess kfm;
Config* config;

@ -66,7 +66,7 @@ ConvertPlugin* ConvertPluginLoader::loadFile( TQString fileName )
}
opmlFile.close();
TQString language = KGlobal::locale()->languagesTwoAlpha().first();
TQString language = TDEGlobal::locale()->languagesTwoAlpha().first();
TQDomElement root = domTree.documentElement();
if( root.attribute("type") != "converter" ) return plugin;

@ -54,7 +54,7 @@ FormatInfo* FormatInfoLoader::loadFile( TQString fileName )
}
opmlFile.close();
TQString language = KGlobal::locale()->languagesTwoAlpha().first();
TQString language = TDEGlobal::locale()->languagesTwoAlpha().first();
TQDomElement root = domTree.documentElement();
if( root.attribute("type") != "format_info" ) return plugin;

@ -19,7 +19,7 @@ ReplayGain::ReplayGain( Config* _config, Logger* _logger )
ReplayGain::~ReplayGain()
{}
bool ReplayGain::apply( TQStringList files, const TQString& format, KProcess* proc, int logID, Mode mode )
bool ReplayGain::apply( TQStringList files, const TQString& format, TDEProcess* proc, int logID, Mode mode )
{
TQStringList params;
TQString param, paramSplinter;
@ -88,7 +88,7 @@ bool ReplayGain::apply( TQStringList files, const TQString& format, KProcess* pr
logger->log( logID, " " + i18n("Executing") + ": `" + param + "'" );
proc->setPriority( config->data.general.priority );
proc->start( KProcess::NotifyOnExit, KProcess::AllOutput );
proc->start( TDEProcess::NotifyOnExit, TDEProcess::AllOutput );
return true;
}

@ -8,7 +8,7 @@
class Config;
class Logger;
class KProcess;
class TDEProcess;
/**
* @short Starts a process to add/remove Replay Gain tags to/from a given file
@ -41,10 +41,10 @@ public:
* Add/remove Replay Gain
* @param files a list of files (of the same format)
* @param format the format of the file/files (extension or mime type)
* @param prc a pointer to a KProcess
* @param prc a pointer to a TDEProcess
* @param remove if true the Replay Gain tags are being removed, if false (default) the tags are calculated and added
*/
bool apply( TQStringList files, const TQString& format, KProcess* proc, int logID, Mode mode = Mode(calc_track|calc_album) ); // NOTE const TQStringList& ?
bool apply( TQStringList files, const TQString& format, TDEProcess* proc, int logID, Mode mode = Mode(calc_track|calc_album) ); // NOTE const TQStringList& ?
/*
* Returns the track and the album gain (in this order) of the @p file

@ -126,7 +126,7 @@ void ReplayGainFileListItem::setType( Type type )
if( type == Album ) {
setOpen( true );
setPixmap( 0, KGlobal::iconLoader()->loadIcon("cdrom_unmount",KIcon::Small) );
setPixmap( 0, TDEGlobal::iconLoader()->loadIcon("cdrom_unmount",KIcon::Small) );
}
}
@ -236,15 +236,15 @@ ReplayGainFileList::ReplayGainFileList( TagEngine* _tagEngine, Config* _config,
TQT_SLOT( slotDropped(TQDropEvent*, TQListViewItem*, TQListViewItem*) )
);
process = new KProcess();
connect( process, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),
TQT_TQOBJECT(this), TQT_SLOT(processOutput(KProcess*,char*,int))
process = new TDEProcess();
connect( process, TQT_SIGNAL(receivedStdout(TDEProcess*,char*,int)),
TQT_TQOBJECT(this), TQT_SLOT(processOutput(TDEProcess*,char*,int))
);
connect( process, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)),
TQT_TQOBJECT(this), TQT_SLOT(processOutput(KProcess*,char*,int))
connect( process, TQT_SIGNAL(receivedStderr(TDEProcess*,char*,int)),
TQT_TQOBJECT(this), TQT_SLOT(processOutput(TDEProcess*,char*,int))
);
connect( process, TQT_SIGNAL(processExited(KProcess*)),
TQT_TQOBJECT(this), TQT_SLOT(processExit(KProcess*))
connect( process, TQT_SIGNAL(processExited(TDEProcess*)),
TQT_TQOBJECT(this), TQT_SLOT(processExit(TDEProcess*))
);
tUpdateProgress = new TQTimer( this, "tUpdateProgress" );
@ -1129,7 +1129,7 @@ void ReplayGainFileList::processNextFile()
emit processStopped();
}
void ReplayGainFileList::processOutput( KProcess* proc, char* data, int )
void ReplayGainFileList::processOutput( TDEProcess* proc, char* data, int )
{
int iPercent = 0, iTime = 0, iPos = 0, iNum = 0;
@ -1192,7 +1192,7 @@ void ReplayGainFileList::processOutput( KProcess* proc, char* data, int )
}
}
void ReplayGainFileList::processExit( KProcess* proc )
void ReplayGainFileList::processExit( TDEProcess* proc )
{
logger->processCompleted( logID, ( proc->signalled() ) ? -1 : 0 );

@ -20,7 +20,7 @@ class KProgress;
class KPopupMenu;
class KAction;
class KActionCollection;
class KProcess;
class TDEProcess;
// FIXME differ diffrent sampling rates, too!
@ -155,7 +155,7 @@ private:
Config* config;
Logger* logger;
KProcess* process;
TDEProcess* process;
ReplayGain* replayGain;
int logID;
@ -226,8 +226,8 @@ private slots:
void slotDropped( TQDropEvent*, TQListViewItem*, TQListViewItem* ); // NOTE rename?
void processOutput( KProcess*, char*, int );
void processExit( KProcess* );
void processOutput( TDEProcess*, char*, int );
void processExit( TDEProcess* );
signals:
//void calcGain();

@ -86,9 +86,9 @@ soundKonverter::soundKonverter()
// if( ret == KMessageBox::Yes ) {
// config->write();
// // TODO parameters are lost
// KProcess restart;
// TDEProcess restart;
// restart << "soundkonverter";
// restart.start( KProcess::DontCare );
// restart.start( TDEProcess::DontCare );
// kapp->quit();
// return;
// }

Loading…
Cancel
Save