Rename KStandard for enhanced compatibility with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent d012fd9b3d
commit 5f3c4af105

@ -526,11 +526,11 @@ TQ_INT64 K3b::fromLe64( char* data )
TQString K3b::findExe( const TQString& name )
{
// first we search the path
TQString bin = KStandardDirs::findExe( name );
TQString bin = TDEStandardDirs::findExe( name );
// then go on with our own little list
if( bin.isEmpty() )
bin = KStandardDirs::findExe( name, k3bcore->externalBinManager()->searchPath().join(":") );
bin = TDEStandardDirs::findExe( name, k3bcore->externalBinManager()->searchPath().join(":") );
return bin;
}

@ -145,7 +145,7 @@ namespace K3b
LIBK3B_EXPORT TQString findTempFile( const TQString& ending = TQString(), const TQString& d = TQString() );
/**
* Wrapper around KStandardDirs::findExe which searches the PATH and some additional
* Wrapper around TDEStandardDirs::findExe which searches the PATH and some additional
* directories to find system tools which are normally only in root's PATH.
*/
LIBK3B_EXPORT TQString findExe( const TQString& name );

@ -118,7 +118,7 @@ void K3bVideoDVDTitleTranscodingJob::start()
// let's see if the directory exists and we can write to it
TQFileInfo fileInfo( m_filename );
TQFileInfo dirInfo( fileInfo.dirPath() );
if( !dirInfo.exists() && !KStandardDirs::makeDir( dirInfo.absFilePath() ) ) {
if( !dirInfo.exists() && !TDEStandardDirs::makeDir( dirInfo.absFilePath() ) ) {
emit infoMessage( i18n("Unable to create folder '%1'").arg(dirInfo.filePath()), ERROR );
return;
}

@ -252,7 +252,7 @@ bool K3bExternalEncoder::initEncoderInternal( const TQString& extension )
}
else {
TQString commandName = d->cmd.command.section( TQRegExp("\\s+"), 0 );
if( !KStandardDirs::findExe( commandName ).isEmpty() )
if( !TDEStandardDirs::findExe( commandName ).isEmpty() )
setLastError( i18n("Could not find program '%1'").arg(commandName) );
return false;

@ -59,7 +59,7 @@ TQValueList<K3bExternalEncoderCommand> K3bExternalEncoderCommand::readCommands()
cl.append( lameCmd );
#endif
if( !KStandardDirs::findExe( "flac" ).isEmpty() ) {
if( !TDEStandardDirs::findExe( "flac" ).isEmpty() ) {
K3bExternalEncoderCommand flacCmd;
flacCmd.name = "Flac";
flacCmd.extension = "flac";
@ -82,7 +82,7 @@ TQValueList<K3bExternalEncoderCommand> K3bExternalEncoderCommand::readCommands()
cl.append( flacCmd );
}
if( !KStandardDirs::findExe( "mppenc" ).isEmpty() ) {
if( !TDEStandardDirs::findExe( "mppenc" ).isEmpty() ) {
K3bExternalEncoderCommand mppCmd;
mppCmd.name = "Musepack";
mppCmd.extension = "mpc";

@ -126,7 +126,7 @@ bool K3bMiscOptionTab::saveSettings()
if( !fi.exists() ) {
if( KMessageBox::questionYesNo( this, i18n("Directory (%1) does not exist. Create?").arg(tempDir),
i18n("Create Directory"), i18n("Create"), KStdGuiItem::cancel() ) == KMessageBox::Yes ) {
if( !KStandardDirs::makeDir( fi.absFilePath() ) ) {
if( !TDEStandardDirs::makeDir( fi.absFilePath() ) ) {
KMessageBox::error( this, i18n("Unable to create directory %1").arg(tempDir) );
return false;
}

@ -201,7 +201,7 @@ void K3bProjectBurnDialog::slotStartClicked()
if( !TQFile::exists( tempDir ) ) {
if( KMessageBox::warningYesNo( this, i18n("Image folder '%1' does not exist. Do you want K3b to create it?").arg( tempDir ) )
== KMessageBox::Yes ) {
if( !KStandardDirs::makeDir( tempDir ) ) {
if( !TDEStandardDirs::makeDir( tempDir ) ) {
KMessageBox::error( this, i18n("Failed to create folder '%1'.").arg( tempDir ) );
return;
}

@ -109,7 +109,7 @@ void K3bAudioProjectConvertingThread::run()
TQString& filename = m_tracks[0].second;
TQString dir = filename.left( filename.findRev("/") );
if( !KStandardDirs::makeDir( dir ) ) {
if( !TDEStandardDirs::makeDir( dir ) ) {
emitInfoMessage( i18n("Unable to create directory %1").arg(dir), K3bJob::ERROR );
emitFinished(false);
return;
@ -195,7 +195,7 @@ void K3bAudioProjectConvertingThread::run()
bool K3bAudioProjectConvertingThread::convertTrack( K3bAudioTrack* track, const TQString& filename )
{
TQString dir = filename.left( filename.findRev("/") );
if( !KStandardDirs::makeDir( dir ) ) {
if( !TDEStandardDirs::makeDir( dir ) ) {
emitInfoMessage( i18n("Unable to create directory %1").arg(dir), K3bJob::ERROR );
return false;
}
@ -303,7 +303,7 @@ bool K3bAudioProjectConvertingThread::writePlaylist()
// this is an absolut path so there is always a "/"
TQString playlistDir = m_playlistFilename.left( m_playlistFilename.findRev( "/" ) );
if( !KStandardDirs::makeDir( playlistDir ) ) {
if( !TDEStandardDirs::makeDir( playlistDir ) ) {
emitInfoMessage( i18n("Unable to create directory %1").arg(playlistDir), K3bJob::ERROR );
return false;
}

@ -195,7 +195,7 @@ void K3bAudioRipThread::run()
TQString& filename = m_tracks[0].second;
TQString dir = filename.left( filename.findRev("/") );
if( !KStandardDirs::makeDir( dir, 0777 ) ) {
if( !TDEStandardDirs::makeDir( dir, 0777 ) ) {
d->paranoiaLib->close();
emitInfoMessage( i18n("Unable to create directory %1").arg(dir), K3bJob::ERROR );
m_device->block(false);
@ -299,7 +299,7 @@ bool K3bAudioRipThread::ripTrack( int track, const TQString& filename )
long trackSectorsRead = 0;
TQString dir = filename.left( filename.findRev("/") );
if( !KStandardDirs::makeDir( dir, 0777 ) ) {
if( !TDEStandardDirs::makeDir( dir, 0777 ) ) {
emitInfoMessage( i18n("Unable to create directory %1").arg(dir), K3bJob::ERROR );
return false;
}
@ -446,7 +446,7 @@ bool K3bAudioRipThread::writePlaylist()
// this is an absolut path so there is always a "/"
TQString playlistDir = m_playlistFilename.left( m_playlistFilename.findRev( "/" ) );
if( !KStandardDirs::makeDir( playlistDir ) ) {
if( !TDEStandardDirs::makeDir( playlistDir ) ) {
emitInfoMessage( i18n("Unable to create directory %1").arg(playlistDir), K3bJob::ERROR );
return false;
}

@ -159,7 +159,7 @@ void K3bVideoCdRippingDialog::slotStartClicked()
if( !d.exists() ) {
if( KMessageBox::warningYesNo( this, i18n("Image folder '%1' does not exist. Do you want K3b to create it?").arg( m_editDirectory->url() ) )
== KMessageBox::Yes ) {
if( !KStandardDirs::makeDir( m_editDirectory->url() ) ) {
if( !TDEStandardDirs::makeDir( m_editDirectory->url() ) ) {
KMessageBox::error( this, i18n("Failed to create folder '%1'.").arg( m_editDirectory->url() ) );
return;
}

Loading…
Cancel
Save