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 --- libkcddb/asynccddbplookup.cpp | 4 +- libkcddb/asynccddbplookup.h | 1 + libkcddb/asynchttplookup.h | 1 + libkcddb/asynchttpsubmit.h | 1 + libkcddb/asyncsmtpsubmit.h | 1 + libkcddb/cache.cpp | 2 +- libkcddb/categories.cpp | 4 +- libkcddb/cddb.cpp | 24 ++++---- libkcddb/cddb.h | 4 +- libkcddb/cddbplookup.cpp | 18 +++--- libkcddb/cddbplookup.h | 2 +- libkcddb/cdinfo.cpp | 36 ++++++------ libkcddb/cdinfodialogbase.ui | 84 ++++++++++++++-------------- libkcddb/cdinfodialogbase.ui.h | 8 +-- libkcddb/cdinfoencodingwidget.cpp | 6 +- libkcddb/cdinfoencodingwidget.h | 3 +- libkcddb/cdinfoencodingwidgetbase.ui | 18 +++--- libkcddb/client.h | 3 +- libkcddb/genres.cpp | 4 +- libkcddb/httplookup.cpp | 8 +-- libkcddb/httplookup.h | 1 + libkcddb/kcmcddb/cddbconfigwidget.cpp | 4 +- libkcddb/kcmcddb/cddbconfigwidget.h | 3 +- libkcddb/kcmcddb/cddbconfigwidgetbase.ui | 94 ++++++++++++++++---------------- libkcddb/kcmcddb/kcmcddb.cpp | 14 ++--- libkcddb/kcmcddb/kcmcddb.h | 3 +- libkcddb/libkcddb.kcfg | 4 +- libkcddb/lookup.cpp | 16 +++--- libkcddb/lookup.h | 4 +- libkcddb/sites.cpp | 4 +- libkcddb/smtpsubmit.cpp | 2 +- libkcddb/submit.cpp | 10 ++-- libkcddb/submit.h | 2 +- libkcddb/synccddbplookup.cpp | 6 +- libkcddb/test/asynccddblookuptest.h | 3 +- libkcddb/test/asynchttplookuptest.h | 3 +- libkcddb/test/asynchttpsubmittest.h | 3 +- libkcddb/test/asyncsmtpsubmittest.h | 3 +- 38 files changed, 212 insertions(+), 199 deletions(-) (limited to 'libkcddb') diff --git a/libkcddb/asynccddbplookup.cpp b/libkcddb/asynccddbplookup.cpp index d2584adf..d51ef386 100644 --- a/libkcddb/asynccddbplookup.cpp +++ b/libkcddb/asynccddbplookup.cpp @@ -224,7 +224,7 @@ namespace KCDDB } } - QString + TQString AsyncCDDBPLookup::readLine() { return TQString::fromUtf8(socket_->readLine()); @@ -294,7 +294,7 @@ namespace KCDDB sendQuit(); } - QString + TQString AsyncCDDBPLookup::stateToString() const { switch (state_) diff --git a/libkcddb/asynccddbplookup.h b/libkcddb/asynccddbplookup.h index 17b72f48..dc578e64 100644 --- a/libkcddb/asynccddbplookup.h +++ b/libkcddb/asynccddbplookup.h @@ -30,6 +30,7 @@ namespace KCDDB class AsyncCDDBPLookup : public CDDBPLookup { Q_OBJECT + TQ_OBJECT public: diff --git a/libkcddb/asynchttplookup.h b/libkcddb/asynchttplookup.h index 80926211..897b4791 100644 --- a/libkcddb/asynchttplookup.h +++ b/libkcddb/asynchttplookup.h @@ -29,6 +29,7 @@ namespace KCDDB { Q_OBJECT + TQ_OBJECT public: diff --git a/libkcddb/asynchttpsubmit.h b/libkcddb/asynchttpsubmit.h index 89ab8313..fcb8ec35 100644 --- a/libkcddb/asynchttpsubmit.h +++ b/libkcddb/asynchttpsubmit.h @@ -26,6 +26,7 @@ namespace KCDDB class AsyncHTTPSubmit : public HTTPSubmit { Q_OBJECT + TQ_OBJECT public: AsyncHTTPSubmit(const TQString& from, const TQString& hostname, uint port); virtual ~AsyncHTTPSubmit(); diff --git a/libkcddb/asyncsmtpsubmit.h b/libkcddb/asyncsmtpsubmit.h index 9bcf84eb..24d10439 100644 --- a/libkcddb/asyncsmtpsubmit.h +++ b/libkcddb/asyncsmtpsubmit.h @@ -27,6 +27,7 @@ namespace KCDDB class AsyncSMTPSubmit : public SMTPSubmit { Q_OBJECT + TQ_OBJECT public: AsyncSMTPSubmit(const TQString& hostname, uint port, const TQString& username, diff --git a/libkcddb/cache.cpp b/libkcddb/cache.cpp index 01c5dec0..127fc6ba 100644 --- a/libkcddb/cache.cpp +++ b/libkcddb/cache.cpp @@ -30,7 +30,7 @@ namespace KCDDB { - QString + TQString Cache::fileName( const TQString &category, const TQString &discid, const TQString &cacheDir ) { TQDir dir( cacheDir ); diff --git a/libkcddb/categories.cpp b/libkcddb/categories.cpp index 5b86a5f5..97ec6acf 100644 --- a/libkcddb/categories.cpp +++ b/libkcddb/categories.cpp @@ -25,7 +25,7 @@ KCDDB::Categories::Categories() const TQString KCDDB::Categories::cddb2i18n(const TQString &category) const { - int index = m_cddb.findIndex(category.stripWhiteSpace()); + int index = m_cddb.tqfindIndex(category.stripWhiteSpace()); if (index != -1) { return m_i18n[index]; @@ -38,7 +38,7 @@ const TQString KCDDB::Categories::cddb2i18n(const TQString &category) const const TQString KCDDB::Categories::i18n2cddb(const TQString &category) const { - int index = m_i18n.findIndex(category.stripWhiteSpace()); + int index = m_i18n.tqfindIndex(category.stripWhiteSpace()); if (index != -1) { return m_cddb[index]; diff --git a/libkcddb/cddb.cpp b/libkcddb/cddb.cpp index f0ee84e0..c11e086c 100644 --- a/libkcddb/cddb.cpp +++ b/libkcddb/cddb.cpp @@ -43,12 +43,12 @@ namespace KCDDB // Empty. } - QString + TQString CDDB::trackOffsetListToId() { return trackOffsetListToId( trackOffsetList_ ); } - QString + TQString CDDB::trackOffsetListToId( const TrackOffsetList & list ) { // Taken from version by Michael Matz in kio_audiocd. @@ -74,7 +74,7 @@ namespace KCDDB return TQString::number( id, 16 ).rightJustify( 8, '0' ); } - QString + TQString CDDB::trackOffsetListToString() { TQString ret; @@ -100,14 +100,14 @@ namespace KCDDB bool CDDB::parseGreeting( const TQString & line ) { - uint serverStatus = statusCode( line ); + uint servertqStatus = statusCode( line ); - if ( 200 == serverStatus ) + if ( 200 == servertqStatus ) { kdDebug(60010) << "Server response: read-only" << endl; readOnly_ = true; } - else if ( 201 == serverStatus ) + else if ( 201 == servertqStatus ) { kdDebug(60010) << "Server response: read-write" << endl; } @@ -123,9 +123,9 @@ namespace KCDDB bool CDDB::parseHandshake( const TQString & line ) { - uint serverStatus = statusCode( line ); + uint servertqStatus = statusCode( line ); - if ( ( 200 != serverStatus ) && ( 402 != serverStatus ) ) + if ( ( 200 != servertqStatus ) && ( 402 != servertqStatus ) ) { kdDebug(60010) << "Handshake was too tight. Letting go." << endl; return false; @@ -141,9 +141,9 @@ namespace KCDDB { TQStringList tokenList = TQStringList::split( ' ', line ); - uint serverStatus = tokenList[ 0 ].toUInt(); + uint servertqStatus = tokenList[ 0 ].toUInt(); - return serverStatus; + return servertqStatus; } /* CDDB::Transport @@ -157,7 +157,7 @@ namespace KCDDB return SMTP; }*/ - QString + TQString CDDB::resultToString(Result r) { switch (r) @@ -200,7 +200,7 @@ namespace KCDDB } } -/* QString +/* TQString CDDB::transportToString(uint t) { switch (Transport(t)) diff --git a/libkcddb/cddb.h b/libkcddb/cddb.h index 04d754c0..d82ea599 100644 --- a/libkcddb/cddb.h +++ b/libkcddb/cddb.h @@ -66,8 +66,8 @@ namespace KCDDB static TQString resultToString(Result); static TQString trackOffsetListToId( const TrackOffsetList & ); - static TQString clientName() { return TQString::fromLatin1("libkcddb"); } - static TQString clientVersion() { return TQString::fromLatin1("0.31"); } + static TQString clientName() { return TQString::tqfromLatin1("libkcddb"); } + static TQString clientVersion() { return TQString::tqfromLatin1("0.31"); } protected: bool parseGreeting( const TQString & ); diff --git a/libkcddb/cddbplookup.cpp b/libkcddb/cddbplookup.cpp index cd287b99..db62cbae 100644 --- a/libkcddb/cddbplookup.cpp +++ b/libkcddb/cddbplookup.cpp @@ -40,10 +40,10 @@ namespace KCDDB CDDBPLookup::sendHandshake() { TQString handshake = TQString( "cddb hello %1 %2 %3 %4" ) - .arg( user_ ) - .arg( localHostName_ ) - .arg( clientName() ) - .arg( clientVersion() ); + .tqarg( user_ ) + .tqarg( localHostName_ ) + .tqarg( clientName() ) + .tqarg( clientVersion() ); writeLine( handshake ); } @@ -58,8 +58,8 @@ namespace KCDDB CDDBPLookup::sendQuery() { TQString query = TQString( "cddb query %1 %2" ) - .arg( trackOffsetListToId() ) - .arg( trackOffsetListToString() ); + .tqarg( trackOffsetListToId() ) + .tqarg( trackOffsetListToString() ); writeLine( query ); } @@ -71,8 +71,8 @@ namespace KCDDB TQString discid = match.second; TQString readRequest = TQString( "cddb read %1 %2" ) - .arg( category_ ) - .arg( discid ); + .tqarg( category_ ) + .tqarg( discid ); writeLine( readRequest ); } @@ -93,7 +93,7 @@ namespace KCDDB } } - Q_LONG + TQ_LONG CDDBPLookup::writeLine( const TQString & line ) { if ( !isConnected() ) diff --git a/libkcddb/cddbplookup.h b/libkcddb/cddbplookup.h index c7983cde..de20e532 100644 --- a/libkcddb/cddbplookup.h +++ b/libkcddb/cddbplookup.h @@ -42,7 +42,7 @@ namespace KCDDB void close(); protected: - Q_LONG writeLine( const TQString & ); + TQ_LONG writeLine( const TQString & ); bool isConnected() { return KNetwork::KClientSocketBase::Connected == socket_->state(); } diff --git a/libkcddb/cdinfo.cpp b/libkcddb/cdinfo.cpp index bf69f853..eee89d87 100644 --- a/libkcddb/cdinfo.cpp +++ b/libkcddb/cdinfo.cpp @@ -177,7 +177,7 @@ namespace KCDDB } } - int slashPos = dtitle.find('/'); + int slashPos = dtitle.tqfind('/'); if (-1 == slashPos) { @@ -198,7 +198,7 @@ namespace KCDDB return true; } - QString + TQString CDInfo::toString(bool submit) const { TQString s; @@ -209,18 +209,18 @@ namespace KCDDB if (submit) { s += "#\n"; - s += TQString("# Submitted via: %1 %2\n").arg(CDDB::clientName(), + s += TQString("# Submitted via: %1 %2\n").tqarg(CDDB::clientName(), CDDB::clientVersion()); } s += "DISCID=" + escape( id ) + "\n"; s += createLine("DTITLE",escape( artist ) + " / " + escape( title )); - s += "DYEAR=" + (0 == year ? TQString::null : TQString::number(year)) + "\n"; + s += "DYEAR=" + (0 == year ? TQString() : TQString::number(year)) + "\n"; s += createLine("DGENRE",escape( genre )); for (uint i = 0; i < trackInfoList.count(); ++i) { - s += createLine(TQString("TTITLE%1").arg(i), + s += createLine(TQString("TTITLE%1").tqarg(i), escape( trackInfoList[ i ].title)); } @@ -228,7 +228,7 @@ namespace KCDDB for (uint i = 0; i < trackInfoList.count(); ++i) { - s += createLine(TQString("EXTT%1").arg(i), escape(trackInfoList[i].extt)); + s += createLine(TQString("EXTT%1").tqarg(i), escape(trackInfoList[i].extt)); } s +="PLAYORDER=\n"; @@ -238,7 +238,7 @@ namespace KCDDB // Creates a line in the form NAME=VALUE, and splits it into several // lines if the line gets longer than 256 chars - QString + TQString CDInfo::createLine(const TQString& name, const TQString& value) const { Q_ASSERT(name.length() < 254); @@ -251,11 +251,11 @@ namespace KCDDB while (tmpValue.length() > maxLength) { - lines += TQString("%1=%2\n").arg(name,tmpValue.left(maxLength)); + lines += TQString("%1=%2\n").tqarg(name,tmpValue.left(maxLength)); tmpValue = tmpValue.mid(maxLength); } - lines += TQString("%1=%2\n").arg(name,tmpValue); + lines += TQString("%1=%2\n").tqarg(name,tmpValue); return lines; } @@ -270,25 +270,25 @@ namespace KCDDB } } - QString + TQString CDInfo::escape( const TQString& value ) { TQString s = value; - s.replace( "\\", "\\\\" ); - s.replace( "\n", "\\n" ); - s.replace( "\t", "\\t" ); + s.tqreplace( "\\", "\\\\" ); + s.tqreplace( "\n", "\\n" ); + s.tqreplace( "\t", "\\t" ); return s; } - QString + TQString CDInfo::unescape( const TQString& value ) { TQString s = value; - s.replace( "\\n", "\n" ); - s.replace( "\\t", "\t" ); - s.replace( "\\\\", "\\" ); + s.tqreplace( "\\n", "\n" ); + s.tqreplace( "\\t", "\t" ); + s.tqreplace( "\\\\", "\\" ); return s; } @@ -296,7 +296,7 @@ namespace KCDDB void CDInfo::clear() { - id = artist = title = genre = extd = TQString::null; + id = artist = title = genre = extd = TQString(); length = year = revision = 0; trackInfoList.clear(); } diff --git a/libkcddb/cdinfodialogbase.ui b/libkcddb/cdinfodialogbase.ui index 76ee8141..dcebf8fb 100644 --- a/libkcddb/cdinfodialogbase.ui +++ b/libkcddb/cdinfodialogbase.ui @@ -1,10 +1,10 @@ CDInfoDialogBase - + CDInfoDialogBase - + 0 0 @@ -16,15 +16,15 @@ unnamed - + - layout1 + tqlayout1 unnamed - + lb_revision @@ -40,7 +40,7 @@ Use the name of the artist if there is no title. - + lb_category @@ -51,7 +51,7 @@ m_category - + m_id @@ -67,7 +67,7 @@ Write names as "first last", not "last, first". Omit any leading "The". Use "Various" for compilations. - + lb_artist @@ -78,7 +78,7 @@ m_artist - + lb_year @@ -89,7 +89,7 @@ m_year - + lb_genre @@ -122,7 +122,7 @@ 0 - + m_multiple @@ -138,7 +138,7 @@ - + lb_comment @@ -149,7 +149,7 @@ le_discInfo - + lb_title @@ -174,7 +174,7 @@ Avoid custom values, as they will be written to CDDB as-is. - + lb_id @@ -182,7 +182,7 @@ Disc Id: - + lb_length @@ -190,12 +190,12 @@ Length: - + m_revision - + m_length @@ -274,9 +274,9 @@ For a CD-Extra, set title to "Data". - + - layout2 + tqlayout2 @@ -292,14 +292,14 @@ Expanding - + 231 41 - + m_changeEncoding @@ -309,7 +309,7 @@ - + lb_playingOrder @@ -329,27 +329,27 @@ m_trackList - selectionChanged(QListViewItem*) + selectionChanged(TQListViewItem*) CDInfoDialogBase - slotTrackSelected(QListViewItem*) + slotTrackSelected(TQListViewItem*) m_trackList - doubleClicked(QListViewItem*,const QPoint&,int) + doubleClicked(TQListViewItem*,const TQPoint&,int) CDInfoDialogBase - slotTrackDoubleClicked(QListViewItem*,const QPoint&,int) + slotTrackDoubleClicked(TQListViewItem*,const TQPoint&,int) m_artist - textChanged(const QString&) + textChanged(const TQString&) CDInfoDialogBase - artistChanged(const QString&) + artistChanged(const TQString&) m_genre - textChanged(const QString&) + textChanged(const TQString&) CDInfoDialogBase - genreChanged(const QString&) + genreChanged(const TQString&) m_multiple @@ -376,7 +376,7 @@ kdialog.h - qdatetime.h + tqdatetime.h libkcddb/cdinfo.h libkcddb/cddb.h libkcddb/categories.h @@ -397,29 +397,29 @@ static const unsigned TRACK_TITLE = 2; static const unsigned TRACK_COMMENT = 3; - + play(int i) discInfoClicked() trackInfoClicked(unsigned) - - - slotTrackSelected( QListViewItem * item ) + + + slotTrackSelected( TQListViewItem * item ) slotNextTrack() - slotTrackDoubleClicked( QListViewItem * item, const QPoint &, int column ) + slotTrackDoubleClicked( TQListViewItem * item, const TQPoint &, int column ) setInfo( const KCDDB::CDInfo & info, KCDDB::TrackOffsetList & trackStartFrames ) - artistChanged( const QString & newArtist ) - genreChanged( const QString & newGenre ) + artistChanged( const TQString & newArtist ) + genreChanged( const TQString & newGenre ) slotMultipleArtists( bool hasMultipleArtist ) slotChangeEncoding() - + init() destroy() - framesTime( unsigned frames ) + framesTime( unsigned frames ) info() const - - + + klineedit.h kcombobox.h diff --git a/libkcddb/cdinfodialogbase.ui.h b/libkcddb/cdinfodialogbase.ui.h index e33ad487..35447aaa 100644 --- a/libkcddb/cdinfodialogbase.ui.h +++ b/libkcddb/cdinfodialogbase.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ @@ -83,7 +83,7 @@ void CDInfoDialogBase::setInfo( const KCDDB::CDInfo &info, KCDDB::TrackOffsetLis item->setText(TRACK_NUMBER, TQString().sprintf("%02d", i + 1)); item->setText(TRACK_TIME, framesTime(trackStartFrames[i + ((i + 1 < tracks) ? 1 : 2)] - trackStartFrames[i])); TQString title = info.trackInfoList[i].title; - int separator = title.find(SEPARATOR); + int separator = title.tqfind(SEPARATOR); if (info.artist != "Various" || separator == -1 || !m_multiple->isChecked() ) { item->setText(TRACK_ARTIST, ""); @@ -179,7 +179,7 @@ void CDInfoDialogBase::slotMultipleArtists( bool hasMultipleArtist) for (TQListViewItem *item = m_trackList->firstChild(); item; item=item->nextSibling()) { TQString title = item->text(TRACK_TITLE); - int separator = title.find(SEPARATOR); + int separator = title.tqfind(SEPARATOR); if (separator != -1) { // Artists probably entered already @@ -196,7 +196,7 @@ void CDInfoDialogBase::slotMultipleArtists( bool hasMultipleArtist) TQString artist = item->text(TRACK_ARTIST); if (!artist.isEmpty()) { - item->setText(TRACK_ARTIST, TQString::null); + item->setText(TRACK_ARTIST, TQString()); item->setText(TRACK_TITLE, artist + SEPARATOR + item->text(TRACK_TITLE)); } } diff --git a/libkcddb/cdinfoencodingwidget.cpp b/libkcddb/cdinfoencodingwidget.cpp index 42d0e506..0cf47196 100644 --- a/libkcddb/cdinfoencodingwidget.cpp +++ b/libkcddb/cdinfoencodingwidget.cpp @@ -28,9 +28,9 @@ namespace KCDDB { - CDInfoEncodingWidget::CDInfoEncodingWidget(TQWidget* parent, const TQString& artist, + CDInfoEncodingWidget::CDInfoEncodingWidget(TQWidget* tqparent, const TQString& artist, const TQString& title, const TQStringList& songTitles) - : CDInfoEncodingWidgetBase(parent), m_artist(artist), m_title(title), + : CDInfoEncodingWidgetBase(tqparent), m_artist(artist), m_title(title), m_songTitles(songTitles) { encodingCombo->insertStringList(KGlobal::charsets()->descriptiveEncodingNames()); @@ -62,7 +62,7 @@ namespace KCDDB songsBox->clear(); songsBox->insertStringList(newTitles); - titleLabel->setText(i18n("artist - cdtitle", "%1 - %2").arg( + titleLabel->setText(i18n("artist - cdtitle", "%1 - %2").tqarg( codec->toUnicode(m_artist.latin1()), codec->toUnicode(m_title.latin1()))); } } diff --git a/libkcddb/cdinfoencodingwidget.h b/libkcddb/cdinfoencodingwidget.h index 7182b44f..a5fa8522 100644 --- a/libkcddb/cdinfoencodingwidget.h +++ b/libkcddb/cdinfoencodingwidget.h @@ -27,8 +27,9 @@ namespace KCDDB class CDInfoEncodingWidget : public CDInfoEncodingWidgetBase { Q_OBJECT + TQ_OBJECT public: - CDInfoEncodingWidget(TQWidget* parent, const TQString& artist, const TQString& title, + CDInfoEncodingWidget(TQWidget* tqparent, const TQString& artist, const TQString& title, const TQStringList& songTitles); TQString selectedEncoding(); diff --git a/libkcddb/cdinfoencodingwidgetbase.ui b/libkcddb/cdinfoencodingwidgetbase.ui index e5156908..a3ffa82b 100644 --- a/libkcddb/cdinfoencodingwidgetbase.ui +++ b/libkcddb/cdinfoencodingwidgetbase.ui @@ -1,10 +1,10 @@ CDInfoEncodingWidgetBase - + CDInfoEncodingWidgetBase - + 0 0 @@ -16,7 +16,7 @@ unnamed - + encodingLabel @@ -24,12 +24,12 @@ Encoding: - + encodingCombo - + groupBox1 @@ -40,7 +40,7 @@ unnamed - + titleLabel @@ -51,11 +51,11 @@ - + songsBox - + 300 250 @@ -66,5 +66,5 @@ - + diff --git a/libkcddb/client.h b/libkcddb/client.h index 3aeb3bd6..33728783 100644 --- a/libkcddb/client.h +++ b/libkcddb/client.h @@ -40,9 +40,10 @@ namespace KCDDB * cddb->lookup(discSignature); * CDInfo info = cddb->bestLookupResponse(); */ - class KDE_EXPORT Client : public QObject + class KDE_EXPORT Client : public TQObject { Q_OBJECT + TQ_OBJECT public: diff --git a/libkcddb/genres.cpp b/libkcddb/genres.cpp index 423e80fc..ac1b86ad 100644 --- a/libkcddb/genres.cpp +++ b/libkcddb/genres.cpp @@ -97,7 +97,7 @@ KCDDB::Genres::Genres() const TQString KCDDB::Genres::cddb2i18n(const TQString &genre) const { TQString userDefinedGenre = genre.stripWhiteSpace(); - int index = m_cddb.findIndex(userDefinedGenre); + int index = m_cddb.tqfindIndex(userDefinedGenre); if (index != -1) { return m_i18n[index]; @@ -111,7 +111,7 @@ const TQString KCDDB::Genres::cddb2i18n(const TQString &genre) const const TQString KCDDB::Genres::i18n2cddb(const TQString &genre) const { TQString userDefinedGenre = genre.stripWhiteSpace(); - int index = m_i18n.findIndex(userDefinedGenre); + int index = m_i18n.tqfindIndex(userDefinedGenre); if (index != -1) { return m_cddb[index]; diff --git a/libkcddb/httplookup.cpp b/libkcddb/httplookup.cpp index c360c423..c3a942d3 100644 --- a/libkcddb/httplookup.cpp +++ b/libkcddb/httplookup.cpp @@ -40,7 +40,7 @@ namespace KCDDB HTTPLookup::sendQuery() { TQString cmd = TQString( "cddb query %1 %2" ) - .arg( trackOffsetListToId(), trackOffsetListToString() ) ; + .tqarg( trackOffsetListToId(), trackOffsetListToString() ) ; makeURL( cmd ); Result result = fetchURL(); @@ -55,7 +55,7 @@ namespace KCDDB TQString discid = match.second; TQString cmd = TQString( "cddb read %1 %2" ) - .arg( category_, discid ); + .tqarg( category_, discid ); makeURL( cmd ); Result result = fetchURL(); @@ -80,10 +80,10 @@ namespace KCDDB // The whole query has to constructed each time as the // CDDB CGI script expects the parameters in strict order - cgiURL_.setQuery( TQString::null ); + cgiURL_.setQuery( TQString() ); TQString hello = TQString("%1 %2 %3 %4") - .arg(user_, localHostName_, clientName(), clientVersion()); + .tqarg(user_, localHostName_, clientName(), clientVersion()); cgiURL_.addQueryItem( "cmd", cmd ); cgiURL_.addQueryItem( "hello", hello ); diff --git a/libkcddb/httplookup.h b/libkcddb/httplookup.h index b8f9c179..ae720f5e 100644 --- a/libkcddb/httplookup.h +++ b/libkcddb/httplookup.h @@ -38,6 +38,7 @@ namespace KCDDB { Q_OBJECT + TQ_OBJECT public: diff --git a/libkcddb/kcmcddb/cddbconfigwidget.cpp b/libkcddb/kcmcddb/cddbconfigwidget.cpp index 442efd12..ec08253a 100644 --- a/libkcddb/kcmcddb/cddbconfigwidget.cpp +++ b/libkcddb/kcmcddb/cddbconfigwidget.cpp @@ -38,8 +38,8 @@ #include #include -CDDBConfigWidget::CDDBConfigWidget(TQWidget * parent, const char * name) - : CDDBConfigWidgetBase(parent, name) +CDDBConfigWidget::CDDBConfigWidget(TQWidget * tqparent, const char * name) + : CDDBConfigWidgetBase(tqparent, name) { // Connections from widgets are made in designer. diff --git a/libkcddb/kcmcddb/cddbconfigwidget.h b/libkcddb/kcmcddb/cddbconfigwidget.h index e927284c..647d4717 100644 --- a/libkcddb/kcmcddb/cddbconfigwidget.h +++ b/libkcddb/kcmcddb/cddbconfigwidget.h @@ -27,10 +27,11 @@ class CDDBConfigWidget : public CDDBConfigWidgetBase { Q_OBJECT + TQ_OBJECT public: - CDDBConfigWidget(TQWidget * parent = 0, const char * name = 0); + CDDBConfigWidget(TQWidget * tqparent = 0, const char * name = 0); protected slots: diff --git a/libkcddb/kcmcddb/cddbconfigwidgetbase.ui b/libkcddb/kcmcddb/cddbconfigwidgetbase.ui index 2158159a..71ed425d 100644 --- a/libkcddb/kcmcddb/cddbconfigwidgetbase.ui +++ b/libkcddb/kcmcddb/cddbconfigwidgetbase.ui @@ -1,11 +1,11 @@ CDDBConfigWidgetBase Used for configuring libkcddb. - + CDDBConfigWidgetBase - + 0 0 @@ -23,11 +23,11 @@ 0 - + tabWidget2 - + tab @@ -38,7 +38,7 @@ unnamed - + kcfg_cachePolicy @@ -63,7 +63,7 @@ 0 - + cacheOnly @@ -74,7 +74,7 @@ Only check in the local cache for CD information. - + cacheAndRemote @@ -85,7 +85,7 @@ Check for locally cached CD information before trying to look up at remote CDDB server. - + remoteOnly @@ -98,7 +98,7 @@ - + serverBox @@ -115,7 +115,7 @@ 6 - + TextLabel7 @@ -126,7 +126,7 @@ kcfg_hostname - + TextLabel9 @@ -137,7 +137,7 @@ kcfg_lookupTransport - + CDDB @@ -163,7 +163,7 @@ Show &Mirror List - + kcfg_port @@ -185,21 +185,21 @@ Port to connect to on CDDB server. - + TextLabel8 &Port: - + AlignVCenter|AlignRight kcfg_port - + kcfg_hostname @@ -220,11 +220,11 @@ - + cacheLocationsParent - + WStackPage @@ -243,7 +243,7 @@ Expanding - + 41 260 @@ -252,7 +252,7 @@ - + tab @@ -263,12 +263,12 @@ unnamed - + kcfg_emailAddress - + textLabel1 @@ -286,14 +286,14 @@ Expanding - + 21 240 - + kcfg_submitTransport @@ -314,7 +314,7 @@ Fixed - + 21 21 @@ -331,14 +331,14 @@ Fixed - + 21 21 - + textLabel2 @@ -346,7 +346,7 @@ Server: - + radioButton8 @@ -367,14 +367,14 @@ Fixed - + 20 140 - + radioButton6 @@ -390,23 +390,23 @@ kcfg_httpSubmitServer - + textLabel1_2 Port: - + AlignVCenter|AlignRight - + kcfg_httpSubmitPort - + textLabel9_2 @@ -414,7 +414,7 @@ Reply-To: - + textLabel2_2 @@ -430,7 +430,7 @@ SMTP server: - + textLabel3 @@ -446,12 +446,12 @@ Port: - + kcfg_replyTo - + needsAuthenticationBox @@ -459,12 +459,12 @@ Server needs authentication - + kcfg_smtpHostname - + textLabel4 @@ -472,7 +472,7 @@ Username: - + kcfg_smtpUsername @@ -488,7 +488,7 @@ - + kcfg_smtpPort @@ -517,7 +517,7 @@ Expanding - + 260 20 @@ -580,13 +580,13 @@ kcfg_port kcfg_lookupTransport - + protocolChanged() showMirrorList() needAuthenticationChanged(bool) - - - + + + kpushbutton.h klineedit.h diff --git a/libkcddb/kcmcddb/kcmcddb.cpp b/libkcddb/kcmcddb/kcmcddb.cpp index 3688ba6a..fa10bc4a 100644 --- a/libkcddb/kcmcddb/kcmcddb.cpp +++ b/libkcddb/kcmcddb/kcmcddb.cpp @@ -45,8 +45,8 @@ typedef KGenericFactory KCDDBFactory; K_EXPORT_COMPONENT_FACTORY ( kcm_cddb, KCDDBFactory( "kcmcddb" ) ) -CDDBModule::CDDBModule(TQWidget *parent, const char *name, const TQStringList &) - : KCModule(parent, name) +CDDBModule::CDDBModule(TQWidget *tqparent, const char *name, const TQStringList &) + : KCModule(tqparent, name) { KGlobal::locale()->insertCatalogue("libkcddb"); setButtons(Default | Apply); @@ -58,10 +58,10 @@ CDDBModule::CDDBModule(TQWidget *parent, const char *name, const TQStringList &) addConfig(cfg, widget_); - TQVBoxLayout * layout = new TQVBoxLayout(this, 0); + TQVBoxLayout * tqlayout = new TQVBoxLayout(this, 0); - layout->addWidget(widget_); - layout->addStretch(); + tqlayout->addWidget(widget_); + tqlayout->addStretch(); setQuickHelp(i18n("CDDB is used to get information like artist, title and song-names in CD's")); @@ -84,8 +84,8 @@ CDDBModule::checkSettings() const config.readConfig(); if (config.smtpHostname().isEmpty() || config.emailAddress().isEmpty() - || !config.emailAddress().contains("@") || - (!config.replyTo().isEmpty() && !config.replyTo().contains("@"))) + || !config.emailAddress().tqcontains("@") || + (!config.replyTo().isEmpty() && !config.replyTo().tqcontains("@"))) { if (config.submitTransport() == KCDDB::Submit::SMTP) diff --git a/libkcddb/kcmcddb/kcmcddb.h b/libkcddb/kcmcddb/kcmcddb.h index 36d42e6f..84978228 100644 --- a/libkcddb/kcmcddb/kcmcddb.h +++ b/libkcddb/kcmcddb/kcmcddb.h @@ -30,10 +30,11 @@ class KConfigDialogManager; class CDDBModule : public KCModule { Q_OBJECT + TQ_OBJECT public: - CDDBModule(TQWidget * parent, const char *name, const TQStringList &); + CDDBModule(TQWidget * tqparent, const char *name, const TQStringList &); public slots: diff --git a/libkcddb/libkcddb.kcfg b/libkcddb/libkcddb.kcfg index cbd123c7..938ac306 100644 --- a/libkcddb/libkcddb.kcfg +++ b/libkcddb/libkcddb.kcfg @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0 http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" > - qdir.h + tqdir.h @@ -28,7 +28,7 @@ HTTP - QDir::homeDirPath()+"/.cddb/" + TQDir::homeDirPath()+"/.cddb/" diff --git a/libkcddb/lookup.cpp b/libkcddb/lookup.cpp index d7c15956..25c7599e 100644 --- a/libkcddb/lookup.cpp +++ b/libkcddb/lookup.cpp @@ -38,19 +38,19 @@ namespace KCDDB CDDB::Result Lookup::parseQuery( const TQString & line ) { - uint serverStatus = statusCode( line ); + uint servertqStatus = statusCode( line ); - if ( 200 == serverStatus ) + if ( 200 == servertqStatus ) { TQStringList tokenList = TQStringList::split( ' ', line ); - matchList_.append( qMakePair( tokenList[ 1 ], tokenList[ 2 ] ) ); + matchList_.append( tqMakePair( tokenList[ 1 ], tokenList[ 2 ] ) ); return Success; } - else if ( ( 211 == serverStatus ) || ( 210 == serverStatus ) ) + else if ( ( 211 == servertqStatus ) || ( 210 == servertqStatus ) ) { return MultipleRecordFound; } - else if ( 202 == serverStatus ) + else if ( 202 == servertqStatus ) { return NoRecordFound; } @@ -62,15 +62,15 @@ namespace KCDDB Lookup::parseExtraMatch( const TQString & line ) { TQStringList tokenList = TQStringList::split( ' ', line ); - matchList_.append( qMakePair( tokenList[ 0 ], tokenList[ 1 ] ) ); + matchList_.append( tqMakePair( tokenList[ 0 ], tokenList[ 1 ] ) ); } CDDB::Result Lookup::parseRead( const TQString & line ) { - uint serverStatus = statusCode( line ); + uint servertqStatus = statusCode( line ); - if ( 210 != serverStatus ) + if ( 210 != servertqStatus ) return ServerError; return Success; diff --git a/libkcddb/lookup.h b/libkcddb/lookup.h index 96538ac5..c11ad8e6 100644 --- a/libkcddb/lookup.h +++ b/libkcddb/lookup.h @@ -28,10 +28,10 @@ namespace KCDDB { - typedef QPair CDDBMatch; + typedef TQPair CDDBMatch; typedef TQValueList CDDBMatchList; - class Lookup : public CDDB, public QObject + class Lookup : public CDDB, public TQObject { public: diff --git a/libkcddb/sites.cpp b/libkcddb/sites.cpp index 393740fe..18082587 100644 --- a/libkcddb/sites.cpp +++ b/libkcddb/sites.cpp @@ -41,10 +41,10 @@ namespace KCDDB url.setPort( 80 ); url.setPath( "/~cddb/cddb.cgi" ); - url.setQuery( TQString::null ); + url.setQuery( TQString() ); TQString hello = TQString("%1 %2 %3 %4") - .arg(user_, localHostName_, clientName(), clientVersion()); + .tqarg(user_, localHostName_, clientName(), clientVersion()); url.addQueryItem( "cmd", "sites" ); url.addQueryItem( "hello", hello ); diff --git a/libkcddb/smtpsubmit.cpp b/libkcddb/smtpsubmit.cpp index 07f34b61..9733ee40 100644 --- a/libkcddb/smtpsubmit.cpp +++ b/libkcddb/smtpsubmit.cpp @@ -43,7 +43,7 @@ namespace KCDDB KIO::Job* SMTPSubmit::createJob(const CDInfo& cdInfo) { url_.setQuery(TQString("to=%1&subject=cddb %2 %3&from=%4") - .arg(to_, cdInfo.category, cdInfo.id, from_)); + .tqarg(to_, cdInfo.category, cdInfo.id, from_)); kdDebug(60010) << "Url is: " << url_.prettyURL() << endl; return KIO::storedPut(diskData_.utf8(), url_, -1, false, false, false); diff --git a/libkcddb/submit.cpp b/libkcddb/submit.cpp index 63a0951b..8742469d 100644 --- a/libkcddb/submit.cpp +++ b/libkcddb/submit.cpp @@ -57,9 +57,9 @@ namespace KCDDB CDDB::Result Submit::parseWrite( const TQString & line ) { - uint serverStatus = statusCode( line ); + uint servertqStatus = statusCode( line ); - if ( 320 != serverStatus ) + if ( 320 != servertqStatus ) return ServerError; return Success; @@ -74,10 +74,10 @@ namespace KCDDB diskData_ += "# Track frame offsets:\n"; for (uint i=0; i < numTracks; i++) - diskData_ += TQString("#\t%1\n").arg(offsetList[i]); + diskData_ += TQString("#\t%1\n").tqarg(offsetList[i]); int l = offsetList[numTracks+1]/75; - diskData_ += TQString("# Disc length: %1 seconds\n").arg(l); + diskData_ += TQString("# Disc length: %1 seconds\n").tqarg(l); diskData_ += cdInfo.toString(true); @@ -91,7 +91,7 @@ namespace KCDDB << "data" << "folk" << "jazz" << "misc" << "newage" << "reggae" << "rock" << "soundtrack"; - if (validCategories.contains(c)) + if (validCategories.tqcontains(c)) return true; else return false; diff --git a/libkcddb/submit.h b/libkcddb/submit.h index 877b499a..512e69b9 100644 --- a/libkcddb/submit.h +++ b/libkcddb/submit.h @@ -34,7 +34,7 @@ namespace KIO namespace KCDDB { - class Submit : public CDDB, public QObject + class Submit : public CDDB, public TQObject { public: diff --git a/libkcddb/synccddbplookup.cpp b/libkcddb/synccddbplookup.cpp index b2be7618..ed102b9d 100644 --- a/libkcddb/synccddbplookup.cpp +++ b/libkcddb/synccddbplookup.cpp @@ -196,13 +196,13 @@ namespace KCDDB return Success; } - QString + TQString SyncCDDBPLookup::readLine() { if ( !isConnected() ) { kdDebug(60010) << "socket status: " << socket_->state() << endl; - return TQString::null; + return TQString(); } if (!socket_->canReadLine()) @@ -212,7 +212,7 @@ namespace KCDDB socket_->waitForMore(-1,&timeout); if (timeout) - return TQString::null; + return TQString(); } return TQString::fromUtf8(socket_->readLine()); diff --git a/libkcddb/test/asynccddblookuptest.h b/libkcddb/test/asynccddblookuptest.h index db4436e4..fb4b940f 100644 --- a/libkcddb/test/asynccddblookuptest.h +++ b/libkcddb/test/asynccddblookuptest.h @@ -6,9 +6,10 @@ using namespace KCDDB; -class AsyncCDDBLookupTest : public QObject +class AsyncCDDBLookupTest : public TQObject { Q_OBJECT + TQ_OBJECT public: diff --git a/libkcddb/test/asynchttplookuptest.h b/libkcddb/test/asynchttplookuptest.h index 7649f204..e323b5c6 100644 --- a/libkcddb/test/asynchttplookuptest.h +++ b/libkcddb/test/asynchttplookuptest.h @@ -6,9 +6,10 @@ using namespace KCDDB; -class AsyncHTTPLookupTest : public QObject +class AsyncHTTPLookupTest : public TQObject { Q_OBJECT + TQ_OBJECT public: diff --git a/libkcddb/test/asynchttpsubmittest.h b/libkcddb/test/asynchttpsubmittest.h index 6cce8ed2..0a1c8389 100644 --- a/libkcddb/test/asynchttpsubmittest.h +++ b/libkcddb/test/asynchttpsubmittest.h @@ -6,9 +6,10 @@ using namespace KCDDB; -class AsyncHTTPSubmitTest : public QObject +class AsyncHTTPSubmitTest : public TQObject { Q_OBJECT + TQ_OBJECT public: AsyncHTTPSubmitTest(); diff --git a/libkcddb/test/asyncsmtpsubmittest.h b/libkcddb/test/asyncsmtpsubmittest.h index 0e6f445e..01514feb 100644 --- a/libkcddb/test/asyncsmtpsubmittest.h +++ b/libkcddb/test/asyncsmtpsubmittest.h @@ -6,9 +6,10 @@ using namespace KCDDB; -class AsyncSMTPSubmitTest : public QObject +class AsyncSMTPSubmitTest : public TQObject { Q_OBJECT + TQ_OBJECT public: AsyncSMTPSubmitTest(); -- cgit v1.2.1