From b1057f437bf65300831a0ccb45b920787c6b318d Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 11 Jun 2011 06:00:15 +0000 Subject: TQt4 port kdemultimedia This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1236079 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kioslave/audiocd/audiocd.cpp | 78 ++++++------ kioslave/audiocd/kcmaudiocd/audiocdconfig.ui | 132 ++++++++++----------- kioslave/audiocd/kcmaudiocd/kcmaudiocd.cpp | 16 +-- kioslave/audiocd/kcmaudiocd/kcmaudiocd.h | 7 +- kioslave/audiocd/plugins/audiocdencoder.cpp | 4 +- kioslave/audiocd/plugins/audiocdencoder.h | 4 +- kioslave/audiocd/plugins/flac/encoderflac.cpp | 10 +- .../audiocd/plugins/lame/collectingprocess.cpp | 10 +- kioslave/audiocd/plugins/lame/collectingprocess.h | 9 +- kioslave/audiocd/plugins/lame/encoderlame.cpp | 28 ++--- kioslave/audiocd/plugins/lame/encoderlame.h | 1 + kioslave/audiocd/plugins/lame/encoderlameconfig.ui | 84 ++++++------- kioslave/audiocd/plugins/vorbis/encodervorbis.cpp | 2 +- .../audiocd/plugins/vorbis/encodervorbisconfig.ui | 34 +++--- kioslave/audiocd/plugins/wav/encoderwav.cpp | 2 +- 15 files changed, 212 insertions(+), 209 deletions(-) (limited to 'kioslave/audiocd') diff --git a/kioslave/audiocd/audiocd.cpp b/kioslave/audiocd/audiocd.cpp index d092ffda..43f61d21 100644 --- a/kioslave/audiocd/audiocd.cpp +++ b/kioslave/audiocd/audiocd.cpp @@ -59,7 +59,7 @@ extern "C" using namespace KIO; using namespace KCDDB; -#define QFL1(x) TQString::fromLatin1(x) +#define TQFL1(x) TQString::tqfromLatin1(x) #define DEFAULT_CD_DEVICE "/dev/cdrom" #define CDDB_INFORMATION "CDDB Information" @@ -149,7 +149,7 @@ public: TQString fileNameTemplate; // URL settable TQString albumTemplate; // URL settable TQString rsearch; - TQString rreplace; + TQString rtqreplace; // Current strings for this CD and or cddb selection TQStringList templateTitles; @@ -189,7 +189,7 @@ AudioCDEncoder *AudioCDProtocol::encoderFromExtension(const TQString& extension) AudioCDEncoder *AudioCDProtocol::determineEncoder(const TQString & filename) { int len = filename.length(); - int pos = filename.findRev('.'); + int pos = filename.tqfindRev('.'); return encoderFromExtension(filename.right(len - pos)); } @@ -251,9 +251,9 @@ struct cdrom_drive * AudioCDProtocol::initRequest(const KURL & url) // circumstances, so build a representation from // the unit number and SCSI device name. // - TQString devname = TQString::fromLatin1( "/dev/%1%2" ) - .arg( drive->dev->given_dev_name ) - .arg( drive->dev->given_unit_number ) ; + TQString devname = TQString::tqfromLatin1( "/dev/%1%2" ) + .tqarg( drive->dev->given_dev_name ) + .tqarg( drive->dev->given_unit_number ) ; kdDebug(7117) << " Using derived name " << devname << endl; d->cd.setDevice( devname ); } @@ -326,7 +326,7 @@ struct cdrom_drive * AudioCDProtocol::initRequest(const KURL & url) TQString name(d->fname); // Remove extension - int dot = name.findRev('.'); + int dot = name.tqfindRev('.'); if (dot >= 0) name.truncate(dot); @@ -365,7 +365,7 @@ struct cdrom_drive * AudioCDProtocol::initRequest(const KURL & url) d->req_track = -1; // Are we in the directory that lists "full CD" files? - d->req_allTracks = (dname.contains(d->s_fullCD)); + d->req_allTracks = (dname.tqcontains(d->s_fullCD)); kdDebug(7117) << "dir=" << dname << " file=" << d->fname << " req_track=" << d->req_track << " which_dir=" << d->which_dir << " full CD?=" << d->req_allTracks << endl; @@ -397,9 +397,9 @@ void AudioCDProtocol::get(const KURL & url) if (!drive) return; - if( d->fname.contains(i18n(CDDB_INFORMATION))){ + if( d->fname.tqcontains(i18n(CDDB_INFORMATION))){ uint choice = 1; - if(d->fname != TQString("%1.txt").arg(i18n(CDDB_INFORMATION))){ + if(d->fname != TQString("%1.txt").tqarg(i18n(CDDB_INFORMATION))){ choice= d->fname.section('_',1,1).section('.',0,0).toInt(); } uint count = 1; @@ -417,7 +417,7 @@ void AudioCDProtocol::get(const KURL & url) } count++; } - if(!found && d->fname.contains(i18n(CDDB_INFORMATION)+":")){ + if(!found && d->fname.tqcontains(i18n(CDDB_INFORMATION)+":")){ mimeType("text/html"); //data(TQCString( d->fname.latin1() )); // send an empty TQByteArray to signal end of data. @@ -465,7 +465,7 @@ void AudioCDProtocol::get(const KURL & url) unsigned long size = encoder->size(time_secs); totalSize(size); - emit mimeType(QFL1(encoder->mimeType())); + emit mimeType(TQFL1(encoder->mimeType())); // Read data (track/disk) from the cd paranoiaRead(drive, firstSector, lastSector, encoder, url.fileName(), size); @@ -504,7 +504,7 @@ void AudioCDProtocol::stat(const KURL & url) UDSAtom atom; atom.m_uds = KIO::UDS_NAME; - atom.m_str = url.fileName().replace('/', QFL1("%2F")); + atom.m_str = url.fileName().tqreplace('/', TQFL1("%2F")); kdDebug(7117) << k_funcinfo << atom.m_str << endl; entry.append(atom); @@ -610,15 +610,15 @@ void AudioCDProtocol::listDir(const KURL & url) for ( it = d->cddbList.begin(); it != d->cddbList.end(); ++it ){ (*it).toString(); if(count == 1) - app_file(entry, TQString("%1.txt").arg(i18n(CDDB_INFORMATION)), ((*it).toString().length())+1); + app_file(entry, TQString("%1.txt").tqarg(i18n(CDDB_INFORMATION)), ((*it).toString().length())+1); else - app_file(entry, TQString("%1_%2.txt").arg(i18n(CDDB_INFORMATION)).arg(count), ((*it).toString().length())+1); + app_file(entry, TQString("%1_%2.txt").tqarg(i18n(CDDB_INFORMATION)).tqarg(count), ((*it).toString().length())+1); count++; listEntry(entry, false); } // Error if( count == 1 ) { - app_file(entry, TQString("%1: %2.txt").arg(i18n(CDDB_INFORMATION)).arg(CDDB::resultToString(d->cddbResult)), ((*it).toString().length())+1); + app_file(entry, TQString("%1: %2.txt").tqarg(i18n(CDDB_INFORMATION)).tqarg(CDDB::resultToString(d->cddbResult)), ((*it).toString().length())+1); count++; listEntry(entry, false); } @@ -838,7 +838,7 @@ void AudioCDProtocol::paranoiaRead( if (0 == buf) { kdDebug(7117) << "Unrecoverable error in paranoia_read" << endl; ok = false; - error( ERR_SLAVE_DEFINED, i18n( "Error reading audio data for %1 from the CD" ).arg( fileName ) ); + error( ERR_SLAVE_DEFINED, i18n( "Error reading audio data for %1 from the CD" ).tqarg( fileName ) ); break; } @@ -848,7 +848,7 @@ void AudioCDProtocol::paranoiaRead( if(encoderProcessed == -1){ kdDebug(7117) << "Encoder processing error, stopping." << endl; ok = false; - TQString errMsg = i18n( "Couldn't read %1: encoding failed" ).arg( fileName ); + TQString errMsg = i18n( "Couldn't read %1: encoding failed" ).tqarg( fileName ); TQString details = encoder->lastErrorMessage(); if ( !details.isEmpty() ) errMsg += "\n" + details; @@ -926,7 +926,7 @@ void AudioCDProtocol::paranoiaRead( processedSize(processed); } else if ( ok ) // i.e. no error message already emitted - error( ERR_SLAVE_DEFINED, i18n( "Couldn't read %1: encoding failed" ).arg( fileName ) ); + error( ERR_SLAVE_DEFINED, i18n( "Couldn't read %1: encoding failed" ).tqarg( fileName ) ); paranoia_free(paranoia); paranoia = 0; @@ -953,24 +953,24 @@ void AudioCDProtocol::parseURLArgs(const KURL & url) { TQString token(*it); - int equalsPos(token.find('=')); + int equalsPos(token.tqfind('=')); if (-1 == equalsPos) continue; TQString attribute(token.left(equalsPos)); TQString value(token.mid(equalsPos + 1)); - if (attribute == QFL1("device")) + if (attribute == TQFL1("device")) d->device = value; - else if (attribute == QFL1("paranoia_level")) + else if (attribute == TQFL1("paranoia_level")) d->paranoiaLevel = value.toInt(); - else if (attribute == QFL1("fileNameTemplate")) + else if (attribute == TQFL1("fileNameTemplate")) d->fileNameTemplate = value; - else if (attribute == QFL1("albumNameTemplate")) + else if (attribute == TQFL1("albumNameTemplate")) d->albumTemplate = value; - else if (attribute == QFL1("cddbChoice")) + else if (attribute == TQFL1("cddbChoice")) d->cddbUserChoice = value.toInt(); - else if (attribute == QFL1("niceLevel")){ + else if (attribute == TQFL1("niceLevel")){ int niceLevel = value.toInt(); if(setpriority(PRIO_PROCESS, getpid(), niceLevel) != 0) kdDebug(7117) << "Setting nice level to (" << niceLevel << ") failed." << endl; @@ -984,12 +984,12 @@ void AudioCDProtocol::parseURLArgs(const KURL & url) */ void AudioCDProtocol::loadSettings() { - KConfig *config = new KConfig(QFL1("kcmaudiocdrc"), true /*readonly*/, false /*no kdeglobals*/); + KConfig *config = new KConfig(TQFL1("kcmaudiocdrc"), true /*readonly*/, false /*no kdeglobals*/); - config->setGroup(QFL1("CDDA")); + config->setGroup(TQFL1("CDDA")); - if (!config->readBoolEntry(QFL1("autosearch"),true)) { - d->device = config->readEntry(QFL1("device"),QFL1(DEFAULT_CD_DEVICE)); + if (!config->readBoolEntry(TQFL1("autosearch"),true)) { + d->device = config->readEntry(TQFL1("device"),TQFL1(DEFAULT_CD_DEVICE)); } d->paranoiaLevel = 1; // enable paranoia error correction, but allow skipping @@ -1016,7 +1016,7 @@ void AudioCDProtocol::loadSettings() d->fileNameTemplate = config->readEntry("file_name_template", "%{albumartist} - %{number} - %{title}"); d->albumTemplate = config->readEntry("album_template", "%{albumartist} - %{albumtitle}"); d->rsearch = config->readEntry("regexp_search"); - d->rreplace = config->readEntry("regexp_replace"); + d->rtqreplace = config->readEntry("regexp_tqreplace"); // if the regular expressions are enclosed in qoutes. remove them // otherwise it is not possible to search for a space " ", since an empty (only spaces) value is not // supported by KConfig, so the space has to be qouted, but then here the regexp searches really for " " @@ -1026,9 +1026,9 @@ void AudioCDProtocol::loadSettings() { d->rsearch=d->rsearch.mid(1, d->rsearch.length()-2); } - if (qoutedString.exactMatch(d->rreplace)) + if (qoutedString.exactMatch(d->rtqreplace)) { - d->rreplace=d->rreplace.mid(1, d->rreplace.length()-2); + d->rtqreplace=d->rtqreplace.mid(1, d->rtqreplace.length()-2); } // Tell the encoders to load their settings @@ -1058,7 +1058,7 @@ void AudioCDProtocol::generateTemplateTitles() { for (unsigned int i = 0; i < d->tracks; i++){ TQString n; - d->templateTitles.append( i18n("Track %1").arg(n.sprintf("%02d", i + 1))); + d->templateTitles.append( i18n("Track %1").tqarg(n.sprintf("%02d", i + 1))); } return; } @@ -1076,12 +1076,12 @@ void AudioCDProtocol::generateTemplateTitles() macros["title"] = (info.trackInfoList[i].title); TQString n; macros["number"] = n.sprintf("%02d", i + 1); - //macros["number"] = TQString("%1").arg(i+1, 2, 10); + //macros["number"] = TQString("%1").tqarg(i+1, 2, 10); macros["genre"] = info.genre; macros["year"] = TQString::number(info.year); - TQString title = KMacroExpander::expandMacros(d->fileNameTemplate, macros, '%').replace('/', QFL1("%2F")); - title.replace( TQRegExp(d->rsearch), d->rreplace ); + TQString title = KMacroExpander::expandMacros(d->fileNameTemplate, macros, '%').tqreplace('/', TQFL1("%2F")); + title.tqreplace( TQRegExp(d->rsearch), d->rtqreplace ); d->templateTitles.append(title); } @@ -1090,8 +1090,8 @@ void AudioCDProtocol::generateTemplateTitles() macros["albumtitle"] = info.title; macros["genre"] = info.genre; macros["year"] = TQString::number(info.year); - d->templateAlbumName = KMacroExpander::expandMacros(d->albumTemplate, macros, '%').replace('/', QFL1("%2F")); - d->templateAlbumName.replace( TQRegExp(d->rsearch), d->rreplace ); + d->templateAlbumName = KMacroExpander::expandMacros(d->albumTemplate, macros, '%').tqreplace('/', TQFL1("%2F")); + d->templateAlbumName.tqreplace( TQRegExp(d->rsearch), d->rtqreplace ); } /** diff --git a/kioslave/audiocd/kcmaudiocd/audiocdconfig.ui b/kioslave/audiocd/kcmaudiocd/audiocdconfig.ui index a742a4cc..271c6261 100644 --- a/kioslave/audiocd/kcmaudiocd/audiocdconfig.ui +++ b/kioslave/audiocd/kcmaudiocd/audiocdconfig.ui @@ -4,7 +4,7 @@ AudiocdConfig - + 0 0 @@ -12,9 +12,9 @@ 563 - + - + @@ -26,7 +26,7 @@ 0 - + tabWidget @@ -38,11 +38,11 @@ 0 - + - + - + tab @@ -63,14 +63,14 @@ Expanding - + 20 210 - + encoderPriority @@ -81,7 +81,7 @@ unnamed - + niceLevel @@ -101,7 +101,7 @@ NoMarks - + textLabel2 @@ -109,31 +109,31 @@ Highest - + textLabel3 Lowest - + AlignVCenter|AlignRight - + textLabel4 Normal - + AlignCenter - + cd_device_string @@ -147,7 +147,7 @@ Specify a location for the drive you want to use. Normally, this is a file inside the /dev folder representing your CD or DVD drive. - + cd_specify_device @@ -158,7 +158,7 @@ Check this to specify a CD device different from the one which is detected automatically - + ec_enable_check @@ -172,7 +172,7 @@ If you uncheck this option, the slave will not try to use error correction which can be useful for reading damaged CDs. However, this feature can be problematic in some cases, so you can switch it off here. - + ec_skip_check @@ -193,7 +193,7 @@ Fixed - + 20 20 @@ -202,7 +202,7 @@ - + tab @@ -213,7 +213,7 @@ unnamed - + fileNameGroupBox @@ -224,7 +224,7 @@ unnamed - + textLabel1_2 @@ -232,15 +232,15 @@ The following macros will be expanded: - + - layout7 + tqlayout7 unnamed - + textLabel13 @@ -248,7 +248,7 @@ Genre - + textLabel7 @@ -256,7 +256,7 @@ Track Number - + textLabel2_3 @@ -264,7 +264,7 @@ %{title} - + textLabel11 @@ -272,7 +272,7 @@ Year - + textLabel3_3 @@ -280,7 +280,7 @@ Track Title - + textLabel9 @@ -288,7 +288,7 @@ Album Artist - + textLabel10 @@ -296,7 +296,7 @@ %{year} - + textLabel6 @@ -304,7 +304,7 @@ %{albumtitle} - + textLabel5 @@ -312,7 +312,7 @@ Album Title - + textLabel12 @@ -320,7 +320,7 @@ %{genre} - + textLabel8 @@ -328,7 +328,7 @@ %{albumartist} - + textLabel4_2 @@ -345,7 +345,7 @@ - + groupBox2 @@ -356,7 +356,7 @@ unnamed - + textLabel2_2 @@ -364,7 +364,7 @@ Selection: - + textLabel1 @@ -372,11 +372,11 @@ Regular expression used on all file names. For example using selection " " and replace with "_" would replace all the spaces with underlines. - + WordBreak|AlignVCenter - + inputlabel @@ -384,7 +384,7 @@ Input: - + outputLabel @@ -392,7 +392,7 @@ Output: - + exampleLabel @@ -400,7 +400,7 @@ Example - + exampleOutput @@ -408,7 +408,7 @@ Cool artist - example audio file.wav - + example @@ -416,17 +416,17 @@ Cool artist - example audio file.wav - + kcfg_replaceInput - + kcfg_replaceOutput - + textLabel3_2 @@ -460,14 +460,14 @@ Expanding - + 21 16 - + fileNameGroupBox_2 @@ -478,7 +478,7 @@ unnamed - + fileNameLabel_2 @@ -486,15 +486,15 @@ The following macros will be expanded: - + - layout9 + tqlayout9 unnamed - + textLabel20 @@ -502,7 +502,7 @@ Year - + textLabel15 @@ -510,7 +510,7 @@ %{albumartist} - + textLabel16 @@ -518,7 +518,7 @@ %{year} - + textLabel21 @@ -526,7 +526,7 @@ Genre - + textLabel19 @@ -534,7 +534,7 @@ Album Artist - + textLabel18 @@ -542,7 +542,7 @@ Album Title - + textLabel17 @@ -550,7 +550,7 @@ %{genre} - + textLabel14 @@ -570,7 +570,7 @@ Expanding - + 20 31 @@ -618,10 +618,10 @@ kcmodule.h - + toggleLowpass() - - + + klineedit.h diff --git a/kioslave/audiocd/kcmaudiocd/kcmaudiocd.cpp b/kioslave/audiocd/kcmaudiocd/kcmaudiocd.cpp index 87614806..166aa126 100644 --- a/kioslave/audiocd/kcmaudiocd/kcmaudiocd.cpp +++ b/kioslave/audiocd/kcmaudiocd/kcmaudiocd.cpp @@ -34,8 +34,8 @@ #include "kcmaudiocd.moc" #include -KAudiocdModule::KAudiocdModule(TQWidget *parent, const char *name) - : AudiocdConfig(parent, name), configChanged(false) +KAudiocdModule::KAudiocdModule(TQWidget *tqparent, const char *name) + : AudiocdConfig(tqparent, name), configChanged(false) { TQString foo = i18n("Report errors found on the cd."); @@ -51,7 +51,7 @@ KAudiocdModule::KAudiocdModule(TQWidget *parent, const char *name) KConfigSkeleton *config = NULL; TQWidget *widget = encoder->getConfigureWidget(&config); if(widget && config){ - tabWidget->addTab(widget, i18n("%1 Encoder").arg(encoder->type())); + tabWidget->addTab(widget, i18n("%1 Encoder").tqarg(encoder->type())); KConfigDialogManager *configManager = new KConfigDialogManager(widget, config, TQString(encoder->type()+" EncoderConfigManager").latin1()); encoderSettings.append(configManager); } @@ -123,7 +123,7 @@ void KAudiocdModule::updateExample() TQString deqoutedReplaceInput=removeQoutes(kcfg_replaceInput->text()); TQString deqoutedReplaceOutput=removeQoutes(kcfg_replaceOutput->text()); - text.replace( TQRegExp(deqoutedReplaceInput), deqoutedReplaceOutput ); + text.tqreplace( TQRegExp(deqoutedReplaceInput), deqoutedReplaceOutput ); exampleOutput->setText(text); } @@ -165,7 +165,7 @@ void KAudiocdModule::save() { replaceOutput=TQString("\"")+replaceOutput+TQString("\""); } config->writeEntry("regexp_search", replaceInput); - config->writeEntry("regexp_replace", replaceOutput); + config->writeEntry("regexp_tqreplace", replaceOutput); } KConfigDialogManager *widget; @@ -204,7 +204,7 @@ void KAudiocdModule::load(bool useDefaults) { fileNameLineEdit->setText(config->readEntry("file_name_template", "%{albumartist} - %{number} - %{title}")); albumNameLineEdit->setText(config->readEntry("album_name_template", "%{albumartist} - %{albumtitle}")); kcfg_replaceInput->setText(config->readEntry("regexp_search")); - kcfg_replaceOutput->setText(config->readEntry("regexp_replace")); + kcfg_replaceOutput->setText(config->readEntry("regexp_tqreplace")); example->setText(config->readEntry("example", i18n("Cool artist - example audio file.wav"))); } @@ -259,9 +259,9 @@ TQString KAudiocdModule::quickHelp() const extern "C" { - KCModule *create_audiocd(TQWidget *parent, const char */*name*/) + KCModule *create_audiocd(TQWidget *tqparent, const char */*name*/) { - return new KAudiocdModule(parent, "kcmaudiocd"); + return new KAudiocdModule(tqparent, "kcmaudiocd"); } } diff --git a/kioslave/audiocd/kcmaudiocd/kcmaudiocd.h b/kioslave/audiocd/kcmaudiocd/kcmaudiocd.h index 4d51134d..b69a6784 100644 --- a/kioslave/audiocd/kcmaudiocd/kcmaudiocd.h +++ b/kioslave/audiocd/kcmaudiocd/kcmaudiocd.h @@ -16,8 +16,8 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - Permission is also granted to link this program with the Qt - library, treating Qt like a library that normally accompanies the + Permission is also granted to link this program with the TQt + library, treating TQt like a library that normally accompanies the operating system kernel, whether or not that is in fact the case. */ @@ -32,10 +32,11 @@ class KConfigDialogManager; class KAudiocdModule : public AudiocdConfig { Q_OBJECT + TQ_OBJECT public: - KAudiocdModule(TQWidget *parent=0, const char *name=0); + KAudiocdModule(TQWidget *tqparent=0, const char *name=0); ~KAudiocdModule(); TQString quickHelp() const; diff --git a/kioslave/audiocd/plugins/audiocdencoder.cpp b/kioslave/audiocd/plugins/audiocdencoder.cpp index 6dfbec18..200534a4 100644 --- a/kioslave/audiocd/plugins/audiocdencoder.cpp +++ b/kioslave/audiocd/plugins/audiocdencoder.cpp @@ -78,12 +78,12 @@ void AudioCDEncoder::findAllPlugins(KIO::SlaveBase *slave, TQPtrList &) = (void (*)(KIO::SlaveBase *slave, TQPtrList &encoders)) function; diff --git a/kioslave/audiocd/plugins/audiocdencoder.h b/kioslave/audiocd/plugins/audiocdencoder.h index cac9b2aa..9f58536f 100644 --- a/kioslave/audiocd/plugins/audiocdencoder.h +++ b/kioslave/audiocd/plugins/audiocdencoder.h @@ -31,7 +31,7 @@ class AudioCDEncoder { public: /** * Constructor. - * @param slave parent that this classes can use to call data() with + * @param slave tqparent that this classes can use to call data() with * when finished encoding bits. */ explicit AudioCDEncoder(KIO::SlaveBase *slave) : ioslave(slave) {}; @@ -120,7 +120,7 @@ public: /** * Returns the last error message; called when e.g. read() returns -1. */ - virtual TQString lastErrorMessage() const { return TQString::null; } + virtual TQString lastErrorMessage() const { return TQString(); } /** * Helper function to load all of the AudioCD Encoders from libraries. diff --git a/kioslave/audiocd/plugins/flac/encoderflac.cpp b/kioslave/audiocd/plugins/flac/encoderflac.cpp index 4be1aeb3..fd98f8b4 100644 --- a/kioslave/audiocd/plugins/flac/encoderflac.cpp +++ b/kioslave/audiocd/plugins/flac/encoderflac.cpp @@ -53,9 +53,9 @@ public: }; #ifdef LEGACY_FLAC -static FLAC__StreamEncoderWriteStatus WriteCallback(const FLAC__StreamEncoder *encoder, const FLAC__byte buffer[], unsigned bytes, unsigned samples, unsigned current_frame, void *client_data) +static FLAC__StreamEncoderWritetqStatus WriteCallback(const FLAC__StreamEncoder *encoder, const FLAC__byte buffer[], unsigned bytes, unsigned samples, unsigned current_frame, void *client_data) #else -static FLAC__StreamEncoderWriteStatus WriteCallback(const FLAC__StreamEncoder *encoder, const FLAC__byte buffer[], size_t bytes, unsigned samples, unsigned current_frame, void *client_data) +static FLAC__StreamEncoderWritetqStatus WriteCallback(const FLAC__StreamEncoder *encoder, const FLAC__byte buffer[], size_t bytes, unsigned samples, unsigned current_frame, void *client_data) #endif { EncoderFLAC::Private *d = (EncoderFLAC::Private*)client_data; @@ -80,7 +80,7 @@ static void MetadataCallback (const FLAC__StreamEncoder *encoder, const FLAC__St } /* -static FLAC__SeekableStreamEncoderSeekStatus SeekCallback(const FLAC__SeekableStreamEncoder *encoder, FLAC__uint64 absolute_byte_offset, void *client_data) +static FLAC__SeekableStreamEncoderSeektqStatus SeekCallback(const FLAC__SeekableStreamEncoder *encoder, FLAC__uint64 absolute_byte_offset, void *client_data) {} ; */ @@ -177,14 +177,14 @@ void EncoderFLAC::fillSongInfo( KCDDB::CDInfo info, int track, const TQString &c // d->metadata[1] = FLAC__metadata_object_new(FLAC__METADATA_TYPE_PADDING); // d->metadata[2] = FLAC__metadata_object_new(FLAC__METADATA_TYPE_SEEKTABLE) - typedef QPair Comment; + typedef TQPair Comment; Comment comments[7] = { Comment("Title", info.trackInfoList[track].get("title")), Comment("Artist", info.get("artist")), Comment("Album", info.get("title")), Comment("Genre", info.get("genre")), Comment("Tracknumber", TQString::number(track+1)), Comment("Comment", comment), - Comment("Date", TQString::null )}; + Comment("Date", TQString() )}; if (info.get("Year").toInt() > 0) { TQDateTime dt(TQDate(info.get("Year").toInt(), 1, 1)); comments[6] = Comment("Date", dt.toString(Qt::ISODate)); diff --git a/kioslave/audiocd/plugins/lame/collectingprocess.cpp b/kioslave/audiocd/plugins/lame/collectingprocess.cpp index 42bdf206..58485fa3 100644 --- a/kioslave/audiocd/plugins/lame/collectingprocess.cpp +++ b/kioslave/audiocd/plugins/lame/collectingprocess.cpp @@ -20,11 +20,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -47,8 +47,8 @@ struct CollectingProcess::Private { }; -CollectingProcess::CollectingProcess( TQObject * parent, const char * name ) - : KProcess( parent, name ) +CollectingProcess::CollectingProcess( TQObject * tqparent, const char * name ) + : KProcess( tqparent, name ) { d = new Private(); } diff --git a/kioslave/audiocd/plugins/lame/collectingprocess.h b/kioslave/audiocd/plugins/lame/collectingprocess.h index e9f0def4..bd5abca9 100644 --- a/kioslave/audiocd/plugins/lame/collectingprocess.h +++ b/kioslave/audiocd/plugins/lame/collectingprocess.h @@ -20,11 +20,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -45,8 +45,9 @@ */ class CollectingProcess : public KProcess { Q_OBJECT + TQ_OBJECT public: - CollectingProcess( TQObject * parent = 0, const char * name = 0 ); + CollectingProcess( TQObject * tqparent = 0, const char * name = 0 ); ~CollectingProcess(); /** Starts the process in NotifyOnExit mode and writes in to stdin of diff --git a/kioslave/audiocd/plugins/lame/encoderlame.cpp b/kioslave/audiocd/plugins/lame/encoderlame.cpp index 5e59c6a4..6154145b 100644 --- a/kioslave/audiocd/plugins/lame/encoderlame.cpp +++ b/kioslave/audiocd/plugins/lame/encoderlame.cpp @@ -126,31 +126,31 @@ void EncoderLame::loadSettings(){ if (method == 0) { // Constant Bitrate Encoding args.append("-b"); - args.append(TQString("%1").arg(bitrates[settings->cbr_bitrate()])); + args.append(TQString("%1").tqarg(bitrates[settings->cbr_bitrate()])); d->bitrate = bitrates[settings->cbr_bitrate()]; args.append("-q"); - args.append(TQString("%1").arg(quality)); + args.append(TQString("%1").tqarg(quality)); } else { // Variable Bitrate Encoding if (settings->vbr_average_br()) { args.append("--abr"); - args.append(TQString("%1").arg(bitrates[settings->vbr_mean_brate()])); + args.append(TQString("%1").tqarg(bitrates[settings->vbr_mean_brate()])); d->bitrate = bitrates[settings->vbr_mean_brate()]; if (settings->vbr_min_br()){ args.append("-b"); - args.append(TQString("%1").arg(bitrates[settings->vbr_min_brate()])); + args.append(TQString("%1").tqarg(bitrates[settings->vbr_min_brate()])); } if (settings->vbr_min_hard()) args.append("-F"); if (settings->vbr_max_br()){ args.append("-B"); - args.append(TQString("%1").arg(bitrates[settings->vbr_max_brate()])); + args.append(TQString("%1").tqarg(bitrates[settings->vbr_max_brate()])); } } else { d->bitrate = 128; args.append("-V"); - args.append(TQString("%1").arg(quality)); + args.append(TQString("%1").tqarg(quality)); } if ( !settings->vbr_xing_tag() ) args.append("-t"); @@ -186,21 +186,21 @@ void EncoderLame::loadSettings(){ if ( settings->enable_lowpass() ) { args.append("--lowpass"); - args.append(TQString("%1").arg(settings->lowfilterfreq())); + args.append(TQString("%1").tqarg(settings->lowfilterfreq())); if (settings->set_lpf_width()){ args.append("--lowpass-width"); - args.append(TQString("%1").arg(settings->lowfilterwidth())); + args.append(TQString("%1").tqarg(settings->lowfilterwidth())); } } if ( settings->enable_highpass()) { args.append("--hipass"); - args.append(TQString("%1").arg(settings->highfilterfreq())); + args.append(TQString("%1").tqarg(settings->highfilterfreq())); if (settings->set_hpf_width()){ args.append("--hipass-width"); - args.append(TQString("%1").arg(settings->highfilterwidth())); + args.append(TQString("%1").tqarg(settings->highfilterwidth())); } } } @@ -215,7 +215,7 @@ long EncoderLame::readInit(long /*size*/){ TQString prefix = locateLocal("tmp", ""); d->tempFile = new KTempFile(prefix, ".mp3"); d->tempFile->setAutoDelete(true); - d->lastErrorMessage = TQString::null; + d->lastErrorMessage = TQString(); d->processHasExited = false; // -x bitswap @@ -341,16 +341,16 @@ void EncoderLame::fillSongInfo( KCDDB::CDInfo info, int track, const TQString &c trackInfo.append(info.get("title").toString()); trackInfo.append("--ty"); - trackInfo.append(TQString("%1").arg(info.get("year").toString())); + trackInfo.append(TQString("%1").tqarg(info.get("year").toString())); trackInfo.append("--tc"); trackInfo.append(comment); trackInfo.append("--tn"); - trackInfo.append(TQString("%1").arg(track+1)); + trackInfo.append(TQString("%1").tqarg(track+1)); const TQString genre = info.get( "genre" ).toString(); - if ( d->genreList.find( genre ) != d->genreList.end() ) + if ( d->genreList.tqfind( genre ) != d->genreList.end() ) { trackInfo.append("--tg"); trackInfo.append(genre); diff --git a/kioslave/audiocd/plugins/lame/encoderlame.h b/kioslave/audiocd/plugins/lame/encoderlame.h index ba02cf4f..1f5044b0 100644 --- a/kioslave/audiocd/plugins/lame/encoderlame.h +++ b/kioslave/audiocd/plugins/lame/encoderlame.h @@ -30,6 +30,7 @@ class KProcess; class EncoderLame : public TQObject, public AudioCDEncoder { Q_OBJECT + TQ_OBJECT public: EncoderLame(KIO::SlaveBase *slave); diff --git a/kioslave/audiocd/plugins/lame/encoderlameconfig.ui b/kioslave/audiocd/plugins/lame/encoderlameconfig.ui index 74060353..7b7dcf17 100644 --- a/kioslave/audiocd/plugins/lame/encoderlameconfig.ui +++ b/kioslave/audiocd/plugins/lame/encoderlameconfig.ui @@ -1,10 +1,10 @@ EncoderLameConfig - + LameConfig - + 0 0 @@ -16,7 +16,7 @@ unnamed - + GroupBox1_2 @@ -33,7 +33,7 @@ 6 - + kcfg_copyright @@ -47,7 +47,7 @@ Mark MP3 file as copyrighted. - + kcfg_original @@ -64,7 +64,7 @@ Mark MP3 file as an original. - + kcfg_iso @@ -78,7 +78,7 @@ This selects the maximal bitrate used for encoding. - + kcfg_crc @@ -86,7 +86,7 @@ &Error protection - + kcfg_id3_tag @@ -105,7 +105,7 @@ - + buttonGroup1 @@ -116,7 +116,7 @@ unnamed - + Layout21 @@ -130,7 +130,7 @@ 6 - + TextLabel3_2 @@ -138,7 +138,7 @@ Low - + kcfg_quality @@ -161,7 +161,7 @@ NoMarks - + TextLabel2_2 @@ -171,21 +171,21 @@ - + TextLabel1_2 &Quality: - + AlignLeft kcfg_quality - + Stereo @@ -213,7 +213,7 @@ This option controls whether MP3 files are recorded with one or two channels. Note that choosing <i>"Mono"</i> reduces file size, but also kills the stereo signal. - + kcfg_bitrate_constant @@ -221,7 +221,7 @@ Constant bitrate - + kcfg_bitrate_variable @@ -244,14 +244,14 @@ Expanding - + 20 16 - + vbr_settings @@ -271,7 +271,7 @@ 6 - + kcfg_vbr_average_br @@ -282,7 +282,7 @@ This selects the maximal bitrate used for encoding. - + 32 kbs @@ -363,7 +363,7 @@ 13 - + kcfg_vbr_max_br @@ -377,7 +377,7 @@ This selects the maximal bitrate used for encoding. - + kcfg_vbr_xing_tag @@ -391,7 +391,7 @@ This writes additional information related to VBR as introduced by Xing. - + 32 kbs @@ -472,7 +472,7 @@ 9 - + kcfg_vbr_min_hard @@ -483,7 +483,7 @@ Minimal &value is a hard limit - + kcfg_vbr_min_br @@ -497,7 +497,7 @@ This selects the minimal bitrate used for encoding. - + 32 kbs @@ -580,7 +580,7 @@ - + cbr_settings @@ -597,7 +597,7 @@ 6 - + TextLabel4_2 @@ -608,7 +608,7 @@ kcfg_cbr_bitrate - + 32 kbs @@ -691,14 +691,14 @@ - + GroupBox83_2 Filter Settings - + AlignVCenter|AlignLeft @@ -715,7 +715,7 @@ 6 - + kcfg_enable_lowpass @@ -723,7 +723,7 @@ &Lowpass filter cutoff above - + kcfg_lowfilterfreq @@ -737,7 +737,7 @@ 20000 - + kcfg_enable_highpass @@ -745,7 +745,7 @@ &Highpass filter cutoff below - + kcfg_highfilterfreq @@ -759,7 +759,7 @@ 200 - + kcfg_set_lpf_width @@ -770,7 +770,7 @@ Low&pass filter width - + kcfg_lowfilterwidth @@ -784,7 +784,7 @@ 5000 - + kcfg_set_hpf_width @@ -795,7 +795,7 @@ Highpa&ss filter width - + kcfg_highfilterwidth @@ -926,5 +926,5 @@ kcfg_set_hpf_width kcfg_highfilterwidth - + diff --git a/kioslave/audiocd/plugins/vorbis/encodervorbis.cpp b/kioslave/audiocd/plugins/vorbis/encodervorbis.cpp index 739e1c8f..2caab8e5 100644 --- a/kioslave/audiocd/plugins/vorbis/encodervorbis.cpp +++ b/kioslave/audiocd/plugins/vorbis/encodervorbis.cpp @@ -301,7 +301,7 @@ void EncoderVorbis::fillSongInfo( KCDDB::CDInfo info, int track, const TQString if( !d->write_vorbis_comments ) return; - typedef QPair CommentField; + typedef TQPair CommentField; TQValueList commentFields; commentFields.append(CommentField("title", info.trackInfoList[track].get("title"))); diff --git a/kioslave/audiocd/plugins/vorbis/encodervorbisconfig.ui b/kioslave/audiocd/plugins/vorbis/encodervorbisconfig.ui index 17000745..5e057de0 100644 --- a/kioslave/audiocd/plugins/vorbis/encodervorbisconfig.ui +++ b/kioslave/audiocd/plugins/vorbis/encodervorbisconfig.ui @@ -1,10 +1,10 @@ EncoderVorbisConfig - + VorbisConfig - + 0 0 @@ -16,7 +16,7 @@ unnamed - + kcfg_vorbis_enc_method @@ -27,7 +27,7 @@ unnamed - + vorbis_enc_quality @@ -38,7 +38,7 @@ true - + vorbis_enc_bitrate @@ -48,7 +48,7 @@ - + vorbis_bitrate_settings @@ -68,7 +68,7 @@ 6 - + 32 kbs @@ -149,7 +149,7 @@ 1 - + 32 kbs @@ -230,7 +230,7 @@ 13 - + kcfg_set_vorbis_min_br @@ -241,7 +241,7 @@ M&inimal bitrate: - + kcfg_set_vorbis_max_br @@ -252,7 +252,7 @@ Ma&ximal bitrate: - + 128 kbs @@ -285,7 +285,7 @@ 1 - + kcfg_set_vorbis_nominal_br @@ -298,7 +298,7 @@ - + vorbis_quality_settings @@ -340,7 +340,7 @@ - + GroupBox193 @@ -357,7 +357,7 @@ 6 - + kcfg_vorbis_comments @@ -383,7 +383,7 @@ Expanding - + 20 51 @@ -417,7 +417,7 @@ kcfg_vorbis_quality kcfg_vorbis_comments - + knuminput.h knuminput.h diff --git a/kioslave/audiocd/plugins/wav/encoderwav.cpp b/kioslave/audiocd/plugins/wav/encoderwav.cpp index 8052ce41..57e455c1 100644 --- a/kioslave/audiocd/plugins/wav/encoderwav.cpp +++ b/kioslave/audiocd/plugins/wav/encoderwav.cpp @@ -63,7 +63,7 @@ long EncoderWav::readInit(long byteCount){ 0x00, 0x00, 0x00, 0x00 // 40 byteCount }; - Q_INT32 wavSize(byteCount + 44 - 8); + TQ_INT32 wavSize(byteCount + 44 - 8); riffHeader[4] = (wavSize >> 0 ) & 0xff; -- cgit v1.2.1