Rename additional global TQt functions

pull/1/head
Timothy Pearson 12 years ago
parent 436105bc56
commit e5bc9e738a

@ -532,12 +532,12 @@ namespace Amarok
TQStringList::ConstIterator it = args.constBegin(); TQStringList::ConstIterator it = args.constBegin();
for( int i = 1; i < argc; ++i, ++it ) { for( int i = 1; i < argc; ++i, ++it ) {
argv[i] = qstrdup( (*it).local8Bit() ); argv[i] = tqstrdup( (*it).local8Bit() );
debug() << "Extracted: " << argv[i] << endl; debug() << "Extracted: " << argv[i] << endl;
} }
// required, loader doesn't add it // required, loader doesn't add it
argv[0] = qstrdup( "amarokapp" ); argv[0] = tqstrdup( "amarokapp" );
// re-initialize KCmdLineArgs with the new arguments // re-initialize KCmdLineArgs with the new arguments
App::initCliArgs( argc, argv ); App::initCliArgs( argc, argv );

@ -21,7 +21,7 @@
#include <tqfile.h> #include <tqfile.h>
#include <tqregexp.h> #include <tqregexp.h>
#include <tqtextstream.h> #include <tqtextstream.h>
#include <tqglobal.h> //qVersion() #include <tqglobal.h> //tqVersion()
#include <cstdio> //popen, fread #include <cstdio> //popen, fread
#include <iostream> #include <iostream>
@ -121,7 +121,7 @@ namespace Amarok
body = body.arg( AmarokConfig::soundSystem() ) body = body.arg( AmarokConfig::soundSystem() )
.arg( qVersion() ) .arg( tqVersion() )
.arg( TAGLIB_MAJOR_VERSION ) .arg( TAGLIB_MAJOR_VERSION )
.arg( TAGLIB_MINOR_VERSION ) .arg( TAGLIB_MINOR_VERSION )
.arg( TAGLIB_PATCH_VERSION ) .arg( TAGLIB_PATCH_VERSION )

@ -189,7 +189,7 @@ App::App()
fixHyperThreading(); fixHyperThreading();
// tell AtomicString that this is the GUI thread // tell AtomicString that this is the GUI thread
if ( !AtomicString::isMainThread() ) if ( !AtomicString::isMainThread() )
qWarning("AtomicString was initialized from a thread other than the GUI " tqWarning("AtomicString was initialized from a thread other than the GUI "
"thread. This could lead to memory leaks."); "thread. This could lead to memory leaks.");
#ifdef TQ_WS_MAC #ifdef TQ_WS_MAC

@ -32,7 +32,7 @@ Worker(void *num) {
TQString str = atStrings[k]->string(); TQString str = atStrings[k]->string();
if( str != base + TQString::number( k ) if( str != base + TQString::number( k )
&& str != base + TQString::number( k % kNumStrings ) ) { && str != base + TQString::number( k % kNumStrings ) ) {
qFatal( "unexpected atStrings[%d]: %s", k, str.ascii() ); tqFatal( "unexpected atStrings[%d]: %s", k, str.ascii() );
} }
delete atStrings[k]; delete atStrings[k];
atStrings[k] = NULL; atStrings[k] = NULL;
@ -52,7 +52,7 @@ int main() {
& Worker, & Worker,
reinterpret_cast<void *>(i)) reinterpret_cast<void *>(i))
!= 0) != 0)
qFatal( "Could not create thread %d", i ); tqFatal( "Could not create thread %d", i );
} }
for( int i = 0; i < kWorkers; i++ ) { for( int i = 0; i < kWorkers; i++ ) {

@ -7422,7 +7422,7 @@ QueryBuilder::addNumericFilter(int tables, TQ_INT64 value, const TQString &n,
case modeNotBetween: case modeNotBetween:
m_where.append(" NOT BETWEEN "); break; m_where.append(" NOT BETWEEN "); break;
default: default:
qWarning( "Unhandled mode in addNumericFilter, using equals: %d", mode ); tqWarning( "Unhandled mode in addNumericFilter, using equals: %d", mode );
m_where.append( " = " ); m_where.append( " = " );
} }
@ -8033,7 +8033,7 @@ QueryBuilder::getField(const TQString &tableValue, int *table, TQ_INT64 *value)
} }
else else
{ {
qFatal("invalid table.value: %s", tableValue.ascii()); tqFatal("invalid table.value: %s", tableValue.ascii());
return false; return false;
} }
} }

@ -212,49 +212,49 @@ MediaItem
if( bundle.title().isEmpty() ) if( bundle.title().isEmpty() )
{ {
trackmeta->title = qstrdup( i18n( "Unknown title" ).utf8() ); trackmeta->title = tqstrdup( i18n( "Unknown title" ).utf8() );
} }
else else
{ {
trackmeta->title = qstrdup( bundle.title().utf8() ); trackmeta->title = tqstrdup( bundle.title().utf8() );
} }
if( bundle.album().isEmpty() ) if( bundle.album().isEmpty() )
{ {
trackmeta->album = qstrdup( i18n( "Unknown album" ).utf8() ); trackmeta->album = tqstrdup( i18n( "Unknown album" ).utf8() );
} }
else else
{ {
trackmeta->album = qstrdup( bundle.album().string().utf8() ); trackmeta->album = tqstrdup( bundle.album().string().utf8() );
} }
if( bundle.artist().isEmpty() ) if( bundle.artist().isEmpty() )
{ {
trackmeta->artist = qstrdup( i18n( "Unknown artist" ).utf8() ); trackmeta->artist = tqstrdup( i18n( "Unknown artist" ).utf8() );
} }
else else
{ {
trackmeta->artist = qstrdup( bundle.artist().string().utf8() ); trackmeta->artist = tqstrdup( bundle.artist().string().utf8() );
} }
if( bundle.genre().isEmpty() ) if( bundle.genre().isEmpty() )
{ {
trackmeta->genre = qstrdup( i18n( "Unknown genre" ).utf8() ); trackmeta->genre = tqstrdup( i18n( "Unknown genre" ).utf8() );
} }
else else
{ {
trackmeta->genre = qstrdup( bundle.genre().string().utf8() ); trackmeta->genre = tqstrdup( bundle.genre().string().utf8() );
} }
if( bundle.year() > 0 ) if( bundle.year() > 0 )
{ {
TQString date; TQString date;
TQTextOStream( &date ) << bundle.year() << "0101T0000.0"; TQTextOStream( &date ) << bundle.year() << "0101T0000.0";
trackmeta->date = qstrdup( date.utf8() ); trackmeta->date = tqstrdup( date.utf8() );
} }
else else
{ {
trackmeta->date = qstrdup( "00010101T0000.0" ); trackmeta->date = tqstrdup( "00010101T0000.0" );
} }
if( bundle.track() > 0 ) if( bundle.track() > 0 )
@ -268,7 +268,7 @@ MediaItem
} }
if( !bundle.filename().isEmpty() ) if( !bundle.filename().isEmpty() )
{ {
trackmeta->filename = qstrdup( bundle.filename().utf8() ); trackmeta->filename = tqstrdup( bundle.filename().utf8() );
} }
trackmeta->filesize = bundle.filesize(); trackmeta->filesize = bundle.filesize();
@ -524,7 +524,7 @@ LIBMTP_album_t
{ {
debug() << "creating new album " << endl; debug() << "creating new album " << endl;
album_object = LIBMTP_new_album_t(); album_object = LIBMTP_new_album_t();
album_object->name = qstrdup( items->first()->bundle()->album().string().utf8() ); album_object->name = tqstrdup( items->first()->bundle()->album().string().utf8() );
album_object->tracks = (uint32_t *) malloc(items->count() * sizeof(uint32_t)); album_object->tracks = (uint32_t *) malloc(items->count() * sizeof(uint32_t));
int i = 0; int i = 0;
for( MtpMediaItem *it = dynamic_cast<MtpMediaItem*>(items->first()); it; it = dynamic_cast<MtpMediaItem*>(items->next()) ) for( MtpMediaItem *it = dynamic_cast<MtpMediaItem*>(items->first()); it; it = dynamic_cast<MtpMediaItem*>(items->next()) )
@ -608,7 +608,7 @@ uint32_t
MtpMediaDevice::createFolder( const char *name, uint32_t parent_id ) MtpMediaDevice::createFolder( const char *name, uint32_t parent_id )
{ {
debug() << "Creating new folder '" << name << "' as a child of "<< parent_id << endl; debug() << "Creating new folder '" << name << "' as a child of "<< parent_id << endl;
char *name_copy = qstrdup( name ); char *name_copy = tqstrdup( name );
uint32_t new_folder_id = LIBMTP_Create_Folder( m_device, name_copy, parent_id, 0 ); uint32_t new_folder_id = LIBMTP_Create_Folder( m_device, name_copy, parent_id, 0 );
delete(name_copy); delete(name_copy);
debug() << "New folder ID: " << new_folder_id << endl; debug() << "New folder ID: " << new_folder_id << endl;
@ -889,7 +889,7 @@ MtpMediaDevice::playlistFromItem( MtpMediaItem *item )
return; return;
m_critical_mutex.lock(); m_critical_mutex.lock();
LIBMTP_playlist_t *metadata = LIBMTP_new_playlist_t(); LIBMTP_playlist_t *metadata = LIBMTP_new_playlist_t();
metadata->name = qstrdup( item->text( 0 ).utf8() ); metadata->name = tqstrdup( item->text( 0 ).utf8() );
const int trackCount = item->childCount(); const int trackCount = item->childCount();
if (trackCount > 0) { if (trackCount > 0) {
uint32_t *tracks = ( uint32_t* )malloc( sizeof( uint32_t ) * trackCount ); uint32_t *tracks = ( uint32_t* )malloc( sizeof( uint32_t ) * trackCount );

@ -298,7 +298,7 @@ RioKarmaMediaDevice::openDevice( bool silent )
TQString genericError = i18n( "Could not connect to Rio Karma" ); TQString genericError = i18n( "Could not connect to Rio Karma" );
char *mount = qstrdup( mountPoint().utf8() ); char *mount = tqstrdup( mountPoint().utf8() );
m_rio = lk_karma_connect( mount ); m_rio = lk_karma_connect( mount );
debug() << "Rio karma : " << m_rio << endl; debug() << "Rio karma : " << m_rio << endl;

@ -2168,8 +2168,8 @@ Playlist::safeClear()
/* 3.3.5 and 3.3.6 have bad KListView::clear() functions. /* 3.3.5 and 3.3.6 have bad KListView::clear() functions.
3.3.5 forgets to clear the pointer to the highlighted item. 3.3.5 forgets to clear the pointer to the highlighted item.
3.3.6 forgets to clear the pointer to the last dragged item */ 3.3.6 forgets to clear the pointer to the last dragged item */
if ( strcmp( qVersion(), "3.3.5" ) == 0 if ( strcmp( tqVersion(), "3.3.5" ) == 0
|| strcmp( qVersion(), "3.3.6" ) == 0 ) || strcmp( tqVersion(), "3.3.6" ) == 0 )
{ {
bool block = signalsBlocked(); bool block = signalsBlocked();
blockSignals( true ); blockSignals( true );

Loading…
Cancel
Save