You may not have sufficient permissions to delete the folder %1
."
- ).arg( themeDir.isLocalFile() ? themeDir.path() : themeDir.url() ) );
+ ).tqarg( themeDir.isLocalFile() ? themeDir.path() : themeDir.url() ) );
return;
}
diff --git a/amarok/src/Options4.ui b/amarok/src/Options4.ui
index f55eab85..b4ba9c3c 100644
--- a/amarok/src/Options4.ui
+++ b/amarok/src/Options4.ui
@@ -1,10 +1,10 @@
Options4
-
+Options4
-
+ 00
@@ -24,7 +24,7 @@
unnamed
-
+ opt_crossfade
@@ -36,7 +36,7 @@
0
-
+ 0180
@@ -59,7 +59,7 @@
unnamed
-
+ radioButtonNormalPlayback
@@ -73,15 +73,15 @@
Enable normal track transition. You may insert a gap of silence between tracks.
-
+
- layout11
+ tqlayout11unnamed
-
+ trackDelayLengthLabel
@@ -93,7 +93,7 @@
0
-
+ 1500
@@ -106,7 +106,7 @@
kcfg_TrackDelayLength
-
+ kcfg_TrackDelayLength
@@ -118,7 +118,7 @@
0
-
+ 1600
@@ -142,7 +142,7 @@
-
+ kcfg_Crossfade
@@ -156,23 +156,23 @@
Enable crossfading between tracks.
-
+
- layout9
+ tqlayout9unnamed
-
+
- layout7
+ tqlayout7unnamed
-
+ crossfadeLengthLabel
@@ -187,7 +187,7 @@
0
-
+ 1500
@@ -200,7 +200,7 @@
kcfg_CrossfadeLength
-
+ crossfadeDropdownText
@@ -215,7 +215,7 @@
0
-
+ 1500
@@ -230,15 +230,15 @@
-
+
- layout8
+ tqlayout8unnamed
-
+ kcfg_CrossfadeLength
@@ -253,7 +253,7 @@
0
-
+ 500
@@ -278,7 +278,7 @@
The length of the crossfade between tracks, in milliseconds.
-
+ Always
@@ -308,7 +308,7 @@
0
-
+ 500
@@ -338,7 +338,7 @@
Fixed
-
+ 1620
@@ -347,7 +347,7 @@
-
+ kcfg_FadeoutOnExit
@@ -358,7 +358,7 @@
If checked, Amarok will fade out the music on program exit.
-
+ kcfg_ResumePlayback
@@ -379,14 +379,14 @@
Expanding
-
+ 3130
-
+ opt_crossfade_2
@@ -398,7 +398,7 @@
0
-
+ 0120
@@ -421,7 +421,7 @@
unnamed
-
+ radioButtonNormalPlayback_2
@@ -445,30 +445,30 @@
Fixed
-
+ 1620
-
+
- layout9_2
+ tqlayout9_2unnamed
-
+
- layout7_2
+ tqlayout7_2unnamed
-
+ fadeoutLengthLabel
@@ -483,7 +483,7 @@
0
-
+ 1500
@@ -498,15 +498,15 @@
-
+
- layout8_2
+ tqlayout8_2unnamed
-
+ kcfg_FadeoutLength
@@ -521,7 +521,7 @@
0
-
+ 500
@@ -550,7 +550,7 @@
-
+ kcfg_Fadeout
@@ -618,5 +618,5 @@
setEnabled(bool)
-
+
diff --git a/amarok/src/Options5.ui b/amarok/src/Options5.ui
index 50c54cc8..5681e76e 100644
--- a/amarok/src/Options5.ui
+++ b/amarok/src/Options5.ui
@@ -1,10 +1,10 @@
Options5
-
+Options5
-
+ 00
@@ -19,7 +19,7 @@
0
-
+ kcfg_OsdEnabled
@@ -36,9 +36,9 @@
Check to enable the On-Screen-Display. The OSD briefly displays track data when a new track is played.
-
+
- layout2
+ tqlayout2
@@ -54,14 +54,14 @@
Fixed
-
+ 1620
-
+ mainBox
@@ -78,7 +78,7 @@
0
-
+ fontBox
@@ -119,7 +119,7 @@
The font to use for the On-Screen Display.
-
+ kcfg_OsdDrawShadow
@@ -129,7 +129,7 @@
-
+ groupBox9
@@ -140,9 +140,9 @@
unnamed
-
+
- layout3
+ tqlayout3
@@ -151,7 +151,7 @@
2
-
+ kcfg_OsdUseCustomColors
@@ -165,9 +165,9 @@
Check to enable custom colors for the On-Screen-Display.
-
+
- layout1
+ tqlayout1
@@ -183,14 +183,14 @@
Fixed
-
+ 1620
-
+ colorsBox
@@ -213,7 +213,7 @@
0
-
+ textLabel2_2
@@ -293,7 +293,7 @@
The color of the OSD background.
-
+ textLabel2
@@ -318,7 +318,7 @@
-
+ kcfg_OsdUseFakeTranslucency
@@ -328,7 +328,7 @@
-
+ osdText
@@ -345,7 +345,7 @@
unnamed
-
+ kcfg_OsdUsePlaylistColumns
@@ -377,7 +377,7 @@
-
+ groupBox22
@@ -388,7 +388,7 @@
unnamed
-
+ textLabel1
@@ -458,7 +458,7 @@
The screen that should display the OSD.
-
+ textLabel2_3
@@ -504,26 +504,26 @@
- qapplication.h
- qdesktopwidget.h
+ tqapplication.h
+ tqdesktopwidget.hosd.hOSDPreviewWidget *m_pOSDPreview;
-
+settingsChanged()
-
-
+
+slotPositionChanged()useCustomColorsToggled( bool on )
-
+
init()hideEvent( QHideEvent * )showEvent( QShowEvent * )
-
+ktextedit.h
diff --git a/amarok/src/Options5.ui.h b/amarok/src/Options5.ui.h
index 22e0a04e..0bda6b20 100644
--- a/amarok/src/Options5.ui.h
+++ b/amarok/src/Options5.ui.h
@@ -18,7 +18,7 @@ email : fh@ez.no
** 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.
*****************************************************************************/
@@ -32,7 +32,7 @@ email : fh@ez.no
void Options5::init()
{
m_pOSDPreview = new OSDPreviewWidget( this ); //must be child!!!
- m_pOSDPreview->setAlignment( static_cast( AmarokConfig::osdAlignment() ) );
+ m_pOSDPreview->tqsetAlignment( static_cast( AmarokConfig::osdAlignment() ) );
m_pOSDPreview->setOffset( AmarokConfig::osdYOffset() );
connect( m_pOSDPreview, TQT_SIGNAL( positionChanged() ), TQT_SLOT( slotPositionChanged() ) );
@@ -56,7 +56,7 @@ void Options5::init()
connect( kcfg_OsdEnabled, TQT_SIGNAL( toggled(bool) ),
m_pOSDPreview, TQT_SLOT( setShown(bool) ) );
- Amarok::QStringx text = i18n(
+ Amarok::TQStringx text = i18n(
"
Tags Displayed in OSD
"
"You can use the following tokens:"
"
"
@@ -89,7 +89,7 @@ void Options5::init()
<< "%year " << "%length" << "%track" << "%filename" << "%directory"
<< "%type" << "%comment" << "%score" << "%playcount" << "%discnumber"
<< "%rating" << "%moodbar" << "%elapsed"
- << "%title {" + i18n( "Score: %1" ).arg( "%score" ) +'}' ) );
+ << "%title {" + i18n( "Score: %1" ).tqarg( "%score" ) +'}' ) );
}
void
diff --git a/amarok/src/Options7.ui b/amarok/src/Options7.ui
index 56cf6c3c..2beea9db 100644
--- a/amarok/src/Options7.ui
+++ b/amarok/src/Options7.ui
@@ -1,10 +1,10 @@
Options7
-
+Options7
-
+ 00
@@ -22,7 +22,7 @@
0
-
+ collectionFoldersBox
@@ -30,7 +30,7 @@
Collection Folders
-
+ databaseBox
@@ -73,7 +73,7 @@
789c534e494dcbcc4b554829cdcdad8c2fcf4c29c95030e0524611cd48cd4ccf28010a1797249664262b2467241641a592324b8aa363156c15aab914146aadb90067111b1f
-
+klineedit.hkpushbutton.h
diff --git a/amarok/src/Options8.ui b/amarok/src/Options8.ui
index 6ad0d1de..06eff1bb 100644
--- a/amarok/src/Options8.ui
+++ b/amarok/src/Options8.ui
@@ -1,10 +1,10 @@
Options8
-
+Options8
-
+ 00
@@ -12,7 +12,7 @@
418
-
+ 11
@@ -28,9 +28,9 @@
12
-
+
- layout2
+ tqlayout2
@@ -39,7 +39,7 @@
12
-
+ infoPixmap_2
@@ -54,7 +54,7 @@
-
+ AlignVCenter
@@ -70,7 +70,7 @@
0
-
+ -1-1
@@ -82,7 +82,7 @@
-
+ groupBox3
@@ -109,9 +109,9 @@
<P>To use last.fm with Amarok, you need a <A href='http://www.last.fm:80/signup.php'>last.fm profile</A>.
-
+
- layout3
+ tqlayout3
@@ -130,7 +130,7 @@
-
+ labelPassword
@@ -149,7 +149,7 @@
kcfg_ScrobblerPassword
-
+ labelUsername
@@ -188,7 +188,7 @@
-
+ groupBox2
@@ -202,7 +202,7 @@
unnamed
-
+ textLabel1
@@ -213,7 +213,7 @@
RichText
-
+ kcfg_SubmitPlayedSongs
@@ -232,7 +232,7 @@
Improve m&y profile by submitting the tracks I play
-
+ kcfg_RetrieveSimilarArtists
@@ -271,7 +271,7 @@
Expanding
-
+ 2030
@@ -291,10 +291,10 @@
Options8.ui.h
-
+updateServices( const QString & s )
-
-
+
+kactivelabel.hkactivelabel.h
diff --git a/amarok/src/Options8.ui.h b/amarok/src/Options8.ui.h
index 4e23949e..524b9c87 100644
--- a/amarok/src/Options8.ui.h
+++ b/amarok/src/Options8.ui.h
@@ -4,7 +4,7 @@
** ui.h extension file, included from the uic-generated form implementation.
**
** If you want to add, delete, or rename functions or slots, use
-** Qt Designer to update this file, preserving your code.
+** TQt Designer to update this file, preserving your code.
**
** You should not define a constructor or destructor in this file.
** Instead, write your code in functions called init() and destroy().
diff --git a/amarok/src/actionclasses.cpp b/amarok/src/actionclasses.cpp
index 614045cc..ec85dd26 100644
--- a/amarok/src/actionclasses.cpp
+++ b/amarok/src/actionclasses.cpp
@@ -87,7 +87,7 @@ MenuAction::plug( TQWidget *w, int index )
//TODO create menu on demand
//TODO create menu above and aligned within window
//TODO make the arrow point upwards!
- bar->insertButton( TQString::null, id, true, i18n( "Menu" ), index );
+ bar->insertButton( TQString(), id, true, i18n( "Menu" ), index );
bar->alignItemRight( id );
KToolBarButton* button = bar->getButton( id );
@@ -120,7 +120,7 @@ Menu::Menu()
insertItem( SmallIconSet( Amarok::icon( "covermanager" ) ), i18n( "C&over Manager" ), ID_SHOW_COVER_MANAGER );
safePlug( ac, "queue_manager", this );
insertItem( SmallIconSet( Amarok::icon( "visualizations" ) ), i18n( "&Visualizations" ), ID_SHOW_VIS_SELECTOR );
- insertItem( SmallIconSet( Amarok::icon( "equalizer" ) ), i18n( "E&qualizer" ), kapp, TQT_SLOT( slotConfigEqualizer() ), 0, ID_CONFIGURE_EQUALIZER );
+ insertItem( SmallIconSet( Amarok::icon( "equalizer" ) ), i18n( "E&qualizer" ), kapp, TQT_SLOT( slotConfigEqualizer() ), 0, ID_CONFIGURE_ETQUALIZER );
safePlug( ac, "script_manager", this );
safePlug( ac, "statistics", this );
@@ -131,7 +131,7 @@ Menu::Menu()
insertItem( SmallIconSet( Amarok::icon( "rescan" ) ), i18n("&Rescan Collection"), ID_RESCAN_COLLECTION );
setItemEnabled( ID_RESCAN_COLLECTION, !ThreadManager::instance()->isJobPending( "CollectionScanner" ) );
-#ifndef Q_WS_MAC
+#ifndef TQ_WS_MAC
insertSeparator();
safePlug( ac, KStdAction::name(KStdAction::ShowMenubar), this );
@@ -169,12 +169,12 @@ Menu::instance()
}
KPopupMenu*
-Menu::helpMenu( TQWidget *parent ) //STATIC
+Menu::helpMenu( TQWidget *tqparent ) //STATIC
{
extern KAboutData aboutData;
if ( s_helpMenu == 0 )
- s_helpMenu = new KHelpMenu( parent, &aboutData, Amarok::actionCollection() );
+ s_helpMenu = new KHelpMenu( tqparent, &aboutData, Amarok::actionCollection() );
return s_helpMenu->menu();
}
@@ -182,7 +182,7 @@ Menu::helpMenu( TQWidget *parent ) //STATIC
void
Menu::slotAboutToShow()
{
- setItemEnabled( ID_CONFIGURE_EQUALIZER, EngineController::hasEngineProperty( "HasEqualizer" ) );
+ setItemEnabled( ID_CONFIGURE_ETQUALIZER, EngineController::hasEngineProperty( "HasEqualizer" ) );
setItemEnabled( ID_CONF_DECODER, EngineController::hasEngineProperty( "HasConfigure" ) );
}
@@ -288,8 +288,8 @@ AnalyzerAction::plug( TQWidget *w, int index )
}
-AnalyzerContainer::AnalyzerContainer( TQWidget *parent )
- : TQWidget( parent, "AnalyzerContainer" )
+AnalyzerContainer::AnalyzerContainer( TQWidget *tqparent )
+ : TQWidget( tqparent, "AnalyzerContainer" )
, m_child( 0 )
{
TQToolTip::add( this, i18n( "Click for more analyzers" ) );
@@ -421,7 +421,7 @@ TQString SelectAction::currentText() const {
VolumeAction::VolumeAction( KActionCollection *ac )
: KAction( i18n( "Volume" ), 0, ac, "toolbar_volume" )
, EngineObserver( EngineController::instance() )
- , m_slider( 0 ) //is QGuardedPtr
+ , m_slider( 0 ) //is TQGuardedPtr
{}
int
@@ -434,7 +434,7 @@ VolumeAction::plug( TQWidget *w, int index )
m_slider = new Amarok::VolumeSlider( w, Amarok::VOLUME_MAX );
m_slider->setName( "ToolBarVolume" );
m_slider->setValue( AmarokConfig::masterVolume() );
- m_slider->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Ignored );
+ m_slider->tqsetSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Ignored );
TQToolTip::add( m_slider, i18n( "Volume control" ) );
@@ -521,7 +521,7 @@ BurnMenuAction::plug( TQWidget *w, int index )
addContainer( bar, id );
connect( bar, TQT_SIGNAL( destroyed() ), TQT_SLOT( slotDestroyed() ) );
- bar->insertButton( TQString::null, id, true, i18n( "Burn" ), index );
+ bar->insertButton( TQString(), id, true, i18n( "Burn" ), index );
KToolBarButton* button = bar->getButton( id );
button->setPopup( Amarok::BurnMenu::instance() );
@@ -589,7 +589,7 @@ StopAction::plug( TQWidget *w, int index )
addContainer( bar, id );
connect( bar, TQT_SIGNAL( destroyed() ), TQT_SLOT( slotDestroyed() ) );
- bar->insertButton( TQString::null, id, TQT_SIGNAL( clicked() ), EngineController::instance(), TQT_SLOT( stop() ),
+ bar->insertButton( TQString(), id, TQT_SIGNAL( clicked() ), EngineController::instance(), TQT_SLOT( stop() ),
true, i18n( "Stop" ), index );
KToolBarButton* button = bar->getButton( id );
@@ -608,7 +608,7 @@ StopMenu::StopMenu()
insertTitle( i18n( "Stop" ) );
insertItem( i18n("Now"), NOW );
insertItem( i18n("After Current Track"), AFTER_TRACK );
- insertItem( i18n("After Queue"), AFTER_QUEUE );
+ insertItem( i18n("After Queue"), AFTER_TQUEUE );
connect( this, TQT_SIGNAL( aboutToShow() ), TQT_SLOT( slotAboutToShow() ) );
connect( this, TQT_SIGNAL( activated(int) ), TQT_SLOT( slotActivated(int) ) );
@@ -631,8 +631,8 @@ StopMenu::slotAboutToShow()
setItemEnabled( AFTER_TRACK, EngineController::engine()->loaded() );
setItemChecked( AFTER_TRACK, pl->stopAfterMode() == Playlist::StopAfterCurrent );
- setItemEnabled( AFTER_QUEUE, pl->nextTracks().count() );
- setItemChecked( AFTER_QUEUE, pl->stopAfterMode() == Playlist::StopAfterQueue );
+ setItemEnabled( AFTER_TQUEUE, pl->nextTracks().count() );
+ setItemChecked( AFTER_TQUEUE, pl->stopAfterMode() == Playlist::StopAfterQueue );
}
void
@@ -653,7 +653,7 @@ StopMenu::slotActivated( int index )
? Playlist::DoNotStop
: Playlist::StopAfterCurrent );
break;
- case AFTER_QUEUE:
+ case AFTER_TQUEUE:
pl->setStopAfterMode( mode == Playlist::StopAfterQueue
? Playlist::DoNotStop
: Playlist::StopAfterQueue );
diff --git a/amarok/src/actionclasses.h b/amarok/src/actionclasses.h
index 2abff936..2725bd7a 100644
--- a/amarok/src/actionclasses.h
+++ b/amarok/src/actionclasses.h
@@ -24,15 +24,16 @@ namespace Amarok
class Menu : public PrettyPopupMenu
{
Q_OBJECT
+ TQ_OBJECT
public:
static Menu *instance();
- static KPopupMenu *helpMenu( TQWidget *parent = 0 );
+ static KPopupMenu *helpMenu( TQWidget *tqparent = 0 );
enum MenuIds {
ID_CONF_DECODER,
ID_SHOW_VIS_SELECTOR,
ID_SHOW_COVER_MANAGER,
- ID_CONFIGURE_EQUALIZER,
+ ID_CONFIGURE_ETQUALIZER,
ID_RESCAN_COLLECTION
};
@@ -64,10 +65,10 @@ namespace Amarok
virtual void engineStateChanged( Engine::State, Engine::State = Engine::Empty );
};
- class AnalyzerContainer : public QWidget
+ class AnalyzerContainer : public TQWidget
{
public:
- AnalyzerContainer( TQWidget *parent );
+ AnalyzerContainer( TQWidget *tqparent );
protected:
virtual void resizeEvent( TQResizeEvent* );
virtual void mousePressEvent( TQMouseEvent* );
@@ -154,6 +155,7 @@ namespace Amarok
class BurnMenu : public KPopupMenu
{
Q_OBJECT
+ TQ_OBJECT
public:
enum MenuIds {
@@ -182,12 +184,13 @@ namespace Amarok
class StopMenu : public KPopupMenu
{
Q_OBJECT
+ TQ_OBJECT
public:
enum MenuIds {
NOW,
AFTER_TRACK,
- AFTER_QUEUE
+ AFTER_TQUEUE
};
static KPopupMenu *instance();
diff --git a/amarok/src/amarok.h b/amarok/src/amarok.h
index dd70b3ef..535c6fa1 100644
--- a/amarok/src/amarok.h
+++ b/amarok/src/amarok.h
@@ -41,7 +41,7 @@ namespace Amarok
///eg. base of the Amarok Player-window
extern TQColor Base; //Amarok::blue
///eg. text in the Amarok Player-window
- extern TQColor Text; //Qt::white
+ extern TQColor Text; //TQt::white
///eg. background colour for Amarok::PrettySliders
extern TQColor Background; //brighter blue
///eg. outline of slider widgets in Player-window
@@ -90,12 +90,12 @@ namespace Amarok
bool invokeBrowser( const TQString& url ); //defined in app.cpp
/**
- * Obtain an Amarok PNG image as a QPixmap
+ * Obtain an Amarok PNG image as a TQPixmap
*/
TQPixmap getPNG( const TQString& /*fileName*/ ); //defined in app.cpp
/**
- * Obtain an Amarok JPG image as a QPixmap
+ * Obtain an Amarok JPG image as a TQPixmap
*/
TQPixmap getJPG( const TQString& /*fileName*/ ); //defined in app.cpp
@@ -111,7 +111,7 @@ namespace Amarok
*/
class OverrideCursor { //defined in app.cpp
public:
- OverrideCursor( Qt::CursorShape cursor = Qt::WaitCursor );
+ OverrideCursor( TQt::tqCursorShape cursor = TQt::WaitCursor );
~OverrideCursor();
};
@@ -120,7 +120,7 @@ namespace Amarok
* @param directory will be created if not existing, you MUST end the string
* with '/'
*/
- LIBAMAROK_EXPORT TQString saveLocation( const TQString &directory = TQString::null ); //defined in collectionreader.cpp
+ LIBAMAROK_EXPORT TQString saveLocation( const TQString &directory = TQString() ); //defined in collectionreader.cpp
KIO::Job *trashFiles( const KURL::List &files ); //defined in app.cpp
@@ -146,7 +146,7 @@ namespace Amarok
*/
inline TQString extension( const TQString &fileName )
{
- return fileName.contains( '.' ) ? fileName.mid( fileName.findRev( '.' ) + 1 ).lower() : "";
+ return fileName.tqcontains( '.' ) ? fileName.mid( fileName.tqfindRev( '.' ) + 1 ).lower() : "";
}
/** Transform url into a file url if possible */
@@ -176,7 +176,7 @@ namespace Amarok
/**
* Returns internal code for database type, DbConnection::sqlite, DbConnection::mysql, or DbConnection::postgresql
- * @param type either "SQLite", "MySQL", or "Postgresql".
+ * @param type either "STQLite", "MySQL", or "Postgresql".
*/
int databaseTypeCode( const TQString type ); //defined in configdialog.cpp
@@ -203,7 +203,7 @@ namespace Amarok
TQStringList splitPath( TQString path ); //defined in playlistbrowser.cpp
/**
- * Creates a copy of of the KURL instance, that doesn't have any QStrings sharing memory.
+ * Creates a copy of of the KURL instance, that doesn't have any TQStrings sharing memory.
**/
KURL detachedKURL( const KURL &url ); //defined in metabundle.cpp
@@ -293,7 +293,7 @@ namespace Amarok
*/
class LIBAMAROK_EXPORT Process : public KProcess {
public:
- Process( TQObject *parent = 0 ) : KProcess( parent ) {}
+ Process( TQObject *tqparent = 0 ) : KProcess( tqparent ) {}
virtual int commSetupDoneC() {
const int i = KProcess::commSetupDoneC();
Amarok::closeOpenFiles(KProcess::out[0],KProcess::in[0], KProcess::err[0]);
@@ -304,9 +304,12 @@ namespace Amarok
}
+#ifdef USE_QT4
+#undef foreach
+#endif // USE_QT4
/**
- * Use this to const-iterate over QStringLists, if you like.
+ * Use this to const-iterate over TQStringLists, if you like.
* Watch out for the definition of last in the scope of your for.
*
* TQStringList strings;
@@ -317,7 +320,7 @@ namespace Amarok
for( TQStringList::ConstIterator it = x.begin(), end = x.end(); it != end; ++it )
/**
- * You can use this for lists that aren't QStringLists.
+ * You can use this for lists that aren't TQStringLists.
* Watch out for the definition of last in the scope of your for.
*
* BundleList bundles;
diff --git a/amarok/src/amarok_play_audiocd.desktop b/amarok/src/amarok_play_audiocd.desktop
index 6ccd96ec..b363be0e 100644
--- a/amarok/src/amarok_play_audiocd.desktop
+++ b/amarok/src/amarok_play_audiocd.desktop
@@ -35,11 +35,11 @@ Name[ne]=अमारोकसँग अडियो सीडी बजाउ
Name[nl]=Audio-cd met Amarok afspelen
Name[nn]=Spel lyd-CD med Amarok
Name[pa]=ਅਮਰੋਕ ਨਾਲ ਆਡੀਓ CD ਚਲਾਓ
-Name[pl]=Odtwórz Audio CD za pomocą Amarok
+Name[pl]=Odtwórz Audio CD za potqmocą Amarok
Name[pt]=Tocar o CD de Áudio com o Amarok
Name[pt_BR]=Reproduzir CD de Áudio com o Amarok
Name[se]=Čuojat jietna-CD:a Amarokain
-Name[sk]=Zahrať Audio CD pomocou Amarok
+Name[sk]=Zahrať Audio CD potqmocou Amarok
Name[sr]=Пусти аудио CD помоћу Amarok-а
Name[sr@Latn]=Pusti audio CD pomoću Amarok-a
Name[sv]=Spela ljud-cd med Amarok
diff --git a/amarok/src/amarokcore/amarok.kcfg b/amarok/src/amarokcore/amarok.kcfg
index 0601edc5..bf618fcc 100644
--- a/amarok/src/amarokcore/amarok.kcfg
+++ b/amarok/src/amarokcore/amarok.kcfg
@@ -4,7 +4,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
@@ -443,7 +443,7 @@
- The Y position of the OSD relative to the chosen screen and OSD alignment. If Top alignment is chosen the Y offset is the space between the upper part of the OSD and the top of the screen. If Bottom alignment is chosen the Y offset is the space between the bottom part of the OSD and the bottom of the screen.
+ The Y position of the OSD relative to the chosen screen and OSD tqalignment. If Top tqalignment is chosen the Y offset is the space between the upper part of the OSD and the top of the screen. If Bottom tqalignment is chosen the Y offset is the space between the bottom part of the OSD and the bottom of the screen.50010000
diff --git a/amarok/src/amarokcore/amarokdcophandler.cpp b/amarok/src/amarokcore/amarokdcophandler.cpp
index 584935a1..ab3ec320 100644
--- a/amarok/src/amarokcore/amarokdcophandler.cpp
+++ b/amarok/src/amarokcore/amarokdcophandler.cpp
@@ -72,7 +72,7 @@ namespace Amarok
return APP_VERSION;
}
- bool DcopPlayerHandler::dynamicModeStatus()
+ bool DcopPlayerHandler::dynamicModetqStatus()
{
return Amarok::dynamicMode();
}
@@ -95,17 +95,17 @@ namespace Amarok
return EngineController::engine()->state() == Engine::Playing;
}
- bool DcopPlayerHandler::randomModeStatus()
+ bool DcopPlayerHandler::randomModetqStatus()
{
return AmarokConfig::randomMode();
}
- bool DcopPlayerHandler::repeatPlaylistStatus()
+ bool DcopPlayerHandler::repeatPlaylisttqStatus()
{
return Amarok::repeatPlaylist();
}
- bool DcopPlayerHandler::repeatTrackStatus()
+ bool DcopPlayerHandler::repeatTracktqStatus()
{
return Amarok::repeatTrack();
}
@@ -237,7 +237,7 @@ namespace Amarok
TQString DcopPlayerHandler::lastfmStation()
{
- return LastFm::Controller::stationDescription(); //return TQString::null if not playing
+ return LastFm::Controller::stationDescription(); //return TQString() if not playing
}
TQString DcopPlayerHandler::nowPlaying()
@@ -521,7 +521,7 @@ namespace Amarok
//the amarok binary anyway --mxcl
debug() << "Startup ID: " << args.first() << endl;
kapp->setStartupId( args.first().local8Bit() );
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
// currently X11 only
KStartupInfo::appStarted();
#endif
diff --git a/amarok/src/amarokcore/amarokdcophandler.h b/amarok/src/amarokcore/amarokdcophandler.h
index 33d5d711..028bb4c9 100644
--- a/amarok/src/amarokcore/amarokdcophandler.h
+++ b/amarok/src/amarokcore/amarokdcophandler.h
@@ -30,19 +30,20 @@ namespace Amarok
class DcopPlayerHandler : public TQObject, virtual public AmarokPlayerInterface
{
Q_OBJECT
+ TQ_OBJECT
public:
DcopPlayerHandler();
public:
virtual TQString version();
- virtual bool dynamicModeStatus();
+ virtual bool dynamicModetqStatus();
virtual bool equalizerEnabled();
virtual bool osdEnabled();
virtual bool isPlaying();
- virtual bool randomModeStatus();
- virtual bool repeatPlaylistStatus();
- virtual bool repeatTrackStatus();
+ virtual bool randomModetqStatus();
+ virtual bool repeatPlaylisttqStatus();
+ virtual bool repeatTracktqStatus();
virtual int getVolume();
virtual int sampleRate();
virtual float score ();
@@ -116,6 +117,7 @@ class DcopPlayerHandler : public TQObject, virtual public AmarokPlayerInterface
class DcopPlaylistHandler : public TQObject, virtual public AmarokPlaylistInterface
{
Q_OBJECT
+ TQ_OBJECT
public:
DcopPlaylistHandler();
@@ -146,6 +148,7 @@ class DcopPlaylistHandler : public TQObject, virtual public AmarokPlaylistInterf
class DcopPlaylistBrowserHandler : public TQObject, virtual public AmarokPlaylistBrowserInterface
{
Q_OBJECT
+ TQ_OBJECT
public:
DcopPlaylistBrowserHandler();
@@ -160,6 +163,7 @@ class DcopPlaylistBrowserHandler : public TQObject, virtual public AmarokPlaylis
class DcopContextBrowserHandler : public TQObject, virtual public AmarokContextBrowserInterface
{
Q_OBJECT
+ TQ_OBJECT
public:
DcopContextBrowserHandler();
@@ -175,6 +179,7 @@ class DcopContextBrowserHandler : public TQObject, virtual public AmarokContextB
class DcopCollectionHandler : public TQObject, virtual public AmarokCollectionInterface
{
Q_OBJECT
+ TQ_OBJECT
public:
DcopCollectionHandler();
@@ -208,6 +213,7 @@ class DcopCollectionHandler : public TQObject, virtual public AmarokCollectionIn
class DcopScriptHandler : public TQObject, virtual public AmarokScriptInterface
{
Q_OBJECT
+ TQ_OBJECT
public:
DcopScriptHandler();
@@ -227,6 +233,7 @@ class DcopScriptHandler : public TQObject, virtual public AmarokScriptInterface
class DcopDevicesHandler : public TQObject, virtual public AmarokDevicesInterface
{
Q_OBJECT
+ TQ_OBJECT
public:
DcopDevicesHandler();
@@ -241,6 +248,7 @@ class DcopDevicesHandler : public TQObject, virtual public AmarokDevicesInterfac
class DcopMediaBrowserHandler : public TQObject, virtual public AmarokMediaBrowserInterface
{
Q_OBJECT
+ TQ_OBJECT
public:
DcopMediaBrowserHandler();
diff --git a/amarok/src/amarokcore/amarokdcopiface.h b/amarok/src/amarokcore/amarokdcopiface.h
index 32b330a7..1ce3849b 100644
--- a/amarok/src/amarokcore/amarokdcopiface.h
+++ b/amarok/src/amarokcore/amarokdcopiface.h
@@ -36,13 +36,13 @@ class AmarokPlayerInterface : virtual public DCOPObject
k_dcop:
virtual TQString version() = 0; ///< returns amarok version string
- virtual bool dynamicModeStatus() = 0; ///< Return dynamic mode status.
+ virtual bool dynamicModetqStatus() = 0; ///< Return dynamic mode status.
virtual bool equalizerEnabled() = 0; ///< Return the equalizer status.
virtual bool osdEnabled() = 0; ///< Return the OSD display status.
virtual bool isPlaying() = 0; ///< Return true if something is playing now.
- virtual bool randomModeStatus() = 0; ///< Return random mode status.
- virtual bool repeatPlaylistStatus() = 0; ///< Return repeat playlist status.
- virtual bool repeatTrackStatus() = 0; ///< Return repeat track status.
+ virtual bool randomModetqStatus() = 0; ///< Return random mode status.
+ virtual bool repeatPlaylisttqStatus() = 0; ///< Return repeat playlist status.
+ virtual bool repeatTracktqStatus() = 0; ///< Return repeat track status.
virtual int getVolume() = 0; ///< Return volume in range 0-100%.
virtual int sampleRate() = 0; ///< Return the sample rate of the currently playing track.
virtual float score() = 0; ///< Return the score of the currently playing track.
diff --git a/amarok/src/amarokcore/crashhandler.cpp b/amarok/src/amarokcore/crashhandler.cpp
index c0185b4f..e2258d9d 100644
--- a/amarok/src/amarokcore/crashhandler.cpp
+++ b/amarok/src/amarokcore/crashhandler.cpp
@@ -47,13 +47,13 @@ namespace Amarok
};
#endif
- static QString
+ static TQString
runCommand( const TQCString &command )
{
static const uint SIZE = 40960; //40 KiB
static char stdoutBuf[ SIZE ] = {0};
- std::cout << "Running: " << command << std::endl;
+ std::cout << "Running: " << command.data() << std::endl;
FILE *process = ::popen( command, "r" );
if ( process )
@@ -100,7 +100,7 @@ namespace Amarok
"Build date: " __DATE__ "\n"
"CC version: " __VERSION__ "\n" //assuming we're using GCC
"KDElibs: " KDE_VERSION_STRING "\n"
- "Qt: %2\n"
+ "TQt: %2\n"
"TagLib: %3.%4.%5\n"
"CPU count: %6\n";
@@ -120,12 +120,12 @@ namespace Amarok
#endif
- body = body.arg( AmarokConfig::soundSystem() )
- .arg( qVersion() )
- .arg( TAGLIB_MAJOR_VERSION )
- .arg( TAGLIB_MINOR_VERSION )
- .arg( TAGLIB_PATCH_VERSION )
- .arg( cpucount );
+ body = body.tqarg( AmarokConfig::soundSystem() )
+ .tqarg( qVersion() )
+ .tqarg( TAGLIB_MAJOR_VERSION )
+ .tqarg( TAGLIB_MINOR_VERSION )
+ .tqarg( TAGLIB_PATCH_VERSION )
+ .tqarg( cpucount );
#ifdef NDEBUG
body += "NDEBUG: true";
@@ -171,37 +171,37 @@ namespace Amarok
/// clean up
bt.remove( "(no debugging symbols found)..." );
bt.remove( "(no debugging symbols found)\n" );
- bt.replace( TQRegExp("\n{2,}"), "\n" ); //clean up multiple \n characters
+ bt.tqreplace( TQRegExp("\n{2,}"), "\n" ); //clean up multiple \n characters
bt.stripWhiteSpace();
/// analyze usefulness
bool useful = true;
const TQString fileCommandOutput = runCommand( "file `which amarokapp`" );
- if( fileCommandOutput.find( "not stripped", false ) == -1 )
+ if( fileCommandOutput.tqfind( "not stripped", false ) == -1 )
subject += "[___stripped]"; //same length as below
else
subject += "[NOTstripped]";
if( !bt.isEmpty() ) {
- const int invalidFrames = bt.contains( TQRegExp("\n#[0-9]+\\s+0x[0-9A-Fa-f]+ in \\?\\?") );
- const int validFrames = bt.contains( TQRegExp("\n#[0-9]+\\s+0x[0-9A-Fa-f]+ in [^?]") );
+ const int invalidFrames = bt.tqcontains( TQRegExp("\n#[0-9]+\\s+0x[0-9A-Fa-f]+ in \\?\\?") );
+ const int validFrames = bt.tqcontains( TQRegExp("\n#[0-9]+\\s+0x[0-9A-Fa-f]+ in [^?]") );
const int totalFrames = invalidFrames + validFrames;
if( totalFrames > 0 ) {
const double validity = double(validFrames) / totalFrames;
- subject += TQString("[validity: %1]").arg( validity, 0, 'f', 2 );
+ subject += TQString("[validity: %1]").tqarg( validity, 0, 'f', 2 );
if( validity <= 0.5 ) useful = false;
}
- subject += TQString("[frames: %1]").arg( totalFrames, 3 /*padding*/ );
+ subject += TQString("[frames: %1]").tqarg( totalFrames, 3 /*padding*/ );
- if( bt.find( TQRegExp(" at \\w*\\.cpp:\\d+\n") ) >= 0 )
+ if( bt.tqfind( TQRegExp(" at \\w*\\.cpp:\\d+\n") ) >= 0 )
subject += "[line numbers]";
}
else
useful = false;
- subject += TQString("[%1]").arg( AmarokConfig::soundSystem().remove( TQRegExp("-?engine") ) );
+ subject += TQString("[%1]").tqarg( AmarokConfig::soundSystem().remove( TQRegExp("-?engine") ) );
std::cout << subject.latin1() << std::endl;
@@ -232,7 +232,7 @@ namespace Amarok
else {
std::cout << i18n( "\nAmarok has crashed! We are terribly sorry about this :(\n\n"
"But, all is not lost! Perhaps an upgrade is already available "
- "which fixes the problem. Please check your distribution's software repository.\n" ).local8Bit();
+ "which fixes the problem. Please check your distribution's software repository.\n" ).local8Bit().data();
}
//_exit() exits immediately, otherwise this
@@ -265,10 +265,10 @@ namespace Amarok
Amarok::CrashHandlerWidget::CrashHandlerWidget()
{
- TQBoxLayout *layout = new TQHBoxLayout( this, 18, 12 );
+ TQBoxLayout *tqlayout = new TQHBoxLayout( this, 18, 12 );
{
- TQBoxLayout *lay = new TQVBoxLayout( layout );
+ TQBoxLayout *lay = new TQVBoxLayout( tqlayout );
TQLabel *label = new TQLabel( this );
label->setPixmap( locate( "data", "drkonqi/pics/konqi.png" ) );
label->setFrameStyle( TQFrame::Plain | TQFrame::Box );
@@ -276,9 +276,9 @@ Amarok::CrashHandlerWidget::CrashHandlerWidget()
lay->addItem( new TQSpacerItem( 3, 3, TQSizePolicy::Minimum, TQSizePolicy::Expanding ) );
}
- layout = new TQVBoxLayout( layout, 6 );
+ tqlayout = new TQVBoxLayout( tqlayout, 6 );
- layout->add( new TQLabel( /*i18n*/(
+ tqlayout->add( new TQLabel( /*i18n*/(
"
" "Amarok has crashed! We are terribly sorry about this :("
"
" "However you now have an opportunity to help us fix this crash so that it doesn't "
"happen again! Click Send Email and Amarok will prepare an email that you "
@@ -286,11 +286,11 @@ Amarok::CrashHandlerWidget::CrashHandlerWidget()
"as soon as possible."
"
" "Thanks for choosing Amarok. " ), this ) );
- layout = new TQHBoxLayout( layout, 6 );
+ tqlayout = new TQHBoxLayout( tqlayout, 6 );
- layout->addItem( new TQSpacerItem( 6, 6, TQSizePolicy::Expanding ) );
- layout->add( new KPushButton( KGuiItem( i18n("Send Email"), "mail_send" ), this, "email" ) );
- layout->add( new KPushButton( KStdGuiItem::close(), this, "close" ) );
+ tqlayout->addItem( new TQSpacerItem( 6, 6, TQSizePolicy::Expanding ) );
+ tqlayout->add( new KPushButton( KGuiItem( i18n("Send Email"), "mail_send" ), this, "email" ) );
+ tqlayout->add( new KPushButton( KStdGuiItem::close(), this, "close" ) );
static_cast(child("email"))->setDefault( true );
@@ -298,6 +298,6 @@ Amarok::CrashHandlerWidget::CrashHandlerWidget()
connect( child( "close" ), TQT_SIGNAL(clicked()), TQT_SLOT(reject()) );
setCaption( i18n("Crash Handler") );
- setFixedSize( sizeHint() );
+ setFixedSize( tqsizeHint() );
}
#endif
diff --git a/amarok/src/analyzers/analyzerbase.cpp b/amarok/src/analyzers/analyzerbase.cpp
index 27fb7abc..83fb1595 100644
--- a/amarok/src/analyzers/analyzerbase.cpp
+++ b/amarok/src/analyzers/analyzerbase.cpp
@@ -31,7 +31,7 @@
//can't mod scope in analyze you have to use transform
-//TODO for 2D use setErasePixmap Qt function insetead of m_background
+//TODO for 2D use setErasePixmap TQt function insetead of m_background
// make the linker happy only for gcc < 4.0
#if !( __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 0 ) )
@@ -40,8 +40,8 @@ template class Analyzer::Base;
template
-Analyzer::Base::Base( TQWidget *parent, uint timeout, uint scopeSize )
- : W( parent )
+Analyzer::Base::Base( TQWidget *tqparent, uint timeout, uint scopeSize )
+ : W( tqparent )
, m_timeout( timeout )
, m_fht( new FHT(scopeSize) )
{}
@@ -188,10 +188,10 @@ Analyzer::Base::demo() //virtual
-Analyzer::Base2D::Base2D( TQWidget *parent, uint timeout, uint scopeSize )
- : Base( parent, timeout, scopeSize )
+Analyzer::Base2D::Base2D( TQWidget *tqparent, uint timeout, uint scopeSize )
+ : Base( tqparent, timeout, scopeSize )
{
- setWFlags( Qt::WNoAutoErase ); //no flicker
+ setWFlags( TQt::WNoAutoErase ); //no flicker
connect( &m_timer, TQT_SIGNAL( timeout() ), TQT_SLOT( draw() ) );
}
@@ -228,9 +228,9 @@ Analyzer::Base2D::paletteChange( const TQPalette& )
-#ifdef HAVE_QGLWIDGET
-Analyzer::Base3D::Base3D( TQWidget *parent, uint timeout, uint scopeSize )
- : Base( parent, timeout, scopeSize )
+#ifdef HAVE_TQGLWIDGET
+Analyzer::Base3D::Base3D( TQWidget *tqparent, uint timeout, uint scopeSize )
+ : Base( tqparent, timeout, scopeSize )
{
connect( &m_timer, TQT_SIGNAL( timeout() ), TQT_SLOT( draw() ) );
}
diff --git a/amarok/src/analyzers/analyzerbase.h b/amarok/src/analyzers/analyzerbase.h
index e15f5ee1..41f7d742 100644
--- a/amarok/src/analyzers/analyzerbase.h
+++ b/amarok/src/analyzers/analyzerbase.h
@@ -5,7 +5,7 @@
#define ANALYZERBASE_H
-#include //HAVE_QGLWIDGET
+#include //HAVE_TQGLWIDGET
#ifdef __FreeBSD__
#include
@@ -17,9 +17,9 @@
#include //baseclass
#include //included for convenience
-//#ifdef HAVE_QGLWIDGET
+//#ifdef HAVE_TQGLWIDGET
#include //baseclass
-#ifdef Q_WS_MACX
+#ifdef TQ_WS_MACX
#include //included for convenience
#include //included for convenience
#else
@@ -27,8 +27,8 @@
#include //included for convenience
#endif
//#else
-////this is a workaround for compile problems due to moc
-//#define TQGLWidget QWidget
+////this is a workaround for compile problems due to tqmoc
+//#define TQGLWidget TQWidget
//#endif
class TQEvent;
@@ -76,6 +76,7 @@ protected:
class Base2D : public Base
{
Q_OBJECT
+ TQ_OBJECT
public:
const TQPixmap *background() const { return &m_background; }
const TQPixmap *canvas() const { return &m_canvas; }
@@ -105,16 +106,17 @@ private:
-//This mess is because moc generates an entry for this class despite the #if block
-//1. the Q_OBJECT macro must be exposed
+//This mess is because tqmoc generates an entry for this class despite the #if block
+//1. the TQ_OBJECT macro must be exposed
//2. we have to define the class
//3. we have to declare a ctor (to satisfy the inheritance)
//4. the slot must also by visible (!)
-//TODO find out how to stop moc generating a metaobject for this class
+//TODO find out how to stop tqmoc generating a metaobject for this class
class Base3D : public Base
{
Q_OBJECT
-#ifdef HAVE_QGLWIDGET
+ TQ_OBJECT
+#ifdef HAVE_TQGLWIDGET
protected:
Base3D( TQWidget*, uint, uint = 7 );
private slots:
diff --git a/amarok/src/analyzers/analyzerfactory.cpp b/amarok/src/analyzers/analyzerfactory.cpp
index 16b10acd..e712b4cf 100644
--- a/amarok/src/analyzers/analyzerfactory.cpp
+++ b/amarok/src/analyzers/analyzerfactory.cpp
@@ -15,7 +15,7 @@
* *
***************************************************************************/
-#include //for HAVE_QGLWIDGET macro
+#include //for HAVE_TQGLWIDGET macro
#include "amarokcore/amarokconfig.h"
#include "analyzerbase.h" //declaration here
@@ -26,7 +26,7 @@
#include "turbine.h"
#include "blockanalyzer.h"
-#ifdef HAVE_QGLWIDGET
+#ifdef HAVE_TQGLWIDGET
#include "glanalyzer.h"
#include "glanalyzer2.h"
#include "glanalyzer3.h"
@@ -38,7 +38,7 @@
//separate from analyzerbase.cpp to save compile time
-TQWidget *Analyzer::Factory::createAnalyzer( TQWidget *parent )
+TQWidget *Analyzer::Factory::createAnalyzer( TQWidget *tqparent )
{
//new XmmsWrapper(); //toplevel
@@ -47,80 +47,80 @@ TQWidget *Analyzer::Factory::createAnalyzer( TQWidget *parent )
switch( AmarokConfig::currentAnalyzer() )
{
case 2:
- analyzer = new Sonogram( parent );
+ analyzer = new Sonogram( tqparent );
break;
case 1:
- analyzer = new TurbineAnalyzer( parent );
+ analyzer = new TurbineAnalyzer( tqparent );
break;
case 3:
- analyzer = new BarAnalyzer( parent );
+ analyzer = new BarAnalyzer( tqparent );
break;
case 4:
- analyzer = new BlockAnalyzer( parent );
+ analyzer = new BlockAnalyzer( tqparent );
break;
-#ifdef HAVE_QGLWIDGET
+#ifdef HAVE_TQGLWIDGET
case 5:
- analyzer = new GLAnalyzer( parent );
+ analyzer = new GLAnalyzer( tqparent );
break;
case 6:
- analyzer = new GLAnalyzer2( parent );
+ analyzer = new GLAnalyzer2( tqparent );
break;
case 7:
- analyzer = new GLAnalyzer3( parent );
+ analyzer = new GLAnalyzer3( tqparent );
break;
case 8:
#else
case 5:
#endif
- analyzer = new TQLabel( i18n( "Click for Analyzers" ), parent ); //blank analyzer to satisfy Grue
- static_cast(analyzer)->setAlignment( Qt::AlignCenter );
+ analyzer = new TQLabel( i18n( "Click for Analyzers" ), tqparent ); //blank analyzer to satisfy Grue
+ static_cast(analyzer)->tqsetAlignment( TQt::AlignCenter );
break;
default:
AmarokConfig::setCurrentAnalyzer( 0 );
case 0:
- analyzer = new BoomAnalyzer( parent );
+ analyzer = new BoomAnalyzer( tqparent );
}
return analyzer;
}
-TQWidget *Analyzer::Factory::createPlaylistAnalyzer( TQWidget *parent)
+TQWidget *Analyzer::Factory::createPlaylistAnalyzer( TQWidget *tqparent)
{
TQWidget *analyzer = 0;
switch( AmarokConfig::currentPlaylistAnalyzer() )
{
case 1:
- analyzer = new TurbineAnalyzer( parent );
+ analyzer = new TurbineAnalyzer( tqparent );
break;
case 2:
- analyzer = new Sonogram( parent );
+ analyzer = new Sonogram( tqparent );
break;
case 3:
- analyzer = new BoomAnalyzer( parent );
+ analyzer = new BoomAnalyzer( tqparent );
break;
- #ifdef HAVE_QGLWIDGET
+ #ifdef HAVE_TQGLWIDGET
case 4:
- analyzer = new GLAnalyzer( parent );
+ analyzer = new GLAnalyzer( tqparent );
break;
case 5:
- analyzer = new GLAnalyzer2( parent );
+ analyzer = new GLAnalyzer2( tqparent );
break;
case 6:
- analyzer = new GLAnalyzer3( parent );
+ analyzer = new GLAnalyzer3( tqparent );
break;
case 7:
#else
case 4:
#endif
- analyzer = new TQLabel( i18n( "Click for Analyzers" ), parent ); //blank analyzer to satisfy Grue
- static_cast(analyzer)->setAlignment( Qt::AlignCenter );
+ analyzer = new TQLabel( i18n( "Click for Analyzers" ), tqparent ); //blank analyzer to satisfy Grue
+ static_cast(analyzer)->tqsetAlignment( TQt::AlignCenter );
break;
default:
AmarokConfig::setCurrentPlaylistAnalyzer( 0 );
case 0:
- analyzer = new BlockAnalyzer( parent );
+ analyzer = new BlockAnalyzer( tqparent );
break;
}
return analyzer;
diff --git a/amarok/src/analyzers/baranalyzer.cpp b/amarok/src/analyzers/baranalyzer.cpp
index 24a24c9c..40f5694f 100644
--- a/amarok/src/analyzers/baranalyzer.cpp
+++ b/amarok/src/analyzers/baranalyzer.cpp
@@ -17,15 +17,15 @@
#include
-BarAnalyzer::BarAnalyzer( TQWidget *parent )
- : Analyzer::Base2D( parent, 12, 8 )
+BarAnalyzer::BarAnalyzer( TQWidget *tqparent )
+ : Analyzer::Base2D( tqparent, 12, 8 )
//, m_bands( BAND_COUNT )
//, barVector( BAND_COUNT, 0 )
//, roofVector( BAND_COUNT, 50 )
//, roofVelocityVector( BAND_COUNT, ROOF_VELOCITY_REDUCTION_FACTOR )
{
//roof pixmaps don't depend on size() so we do in the ctor
- m_bg = parent->paletteBackgroundColor();
+ m_bg = tqparent->paletteBackgroundColor();
TQColor fg( 0xff, 0x50, 0x70 );
#define m_bg backgroundColor()
@@ -150,7 +150,7 @@ void BarAnalyzer::analyze( const Scope &s )
//blt the bar
bitBlt( canvas(), x, height() - y2,
- gradient(), y2 * COLUMN_WIDTH, height() - y2, COLUMN_WIDTH, y2, Qt::CopyROP );
+ gradient(), y2 * COLUMN_WIDTH, height() - y2, COLUMN_WIDTH, y2, TQt::CopyROP );
m_roofMem[i].push_back( height() - roofVector[i] - 2 );
diff --git a/amarok/src/analyzers/baranalyzer.h b/amarok/src/analyzers/baranalyzer.h
index 6eb470c8..4bb4e3f3 100644
--- a/amarok/src/analyzers/baranalyzer.h
+++ b/amarok/src/analyzers/baranalyzer.h
@@ -21,7 +21,7 @@ class BarAnalyzer : public Analyzer::Base2D
//virtual void transform( Scope& );
/**
- * Resizes the widget to a new geometry according to @p e
+ * Resizes the widget to a new tqgeometry according to @p e
* @param e The resize-event
*/
void resizeEvent( TQResizeEvent * e);
diff --git a/amarok/src/analyzers/blockanalyzer.cpp b/amarok/src/analyzers/blockanalyzer.cpp
index 886243d8..ed61161a 100644
--- a/amarok/src/analyzers/blockanalyzer.cpp
+++ b/amarok/src/analyzers/blockanalyzer.cpp
@@ -29,8 +29,8 @@ static inline uint myMax( uint v1, uint v2 ) { return v1 > v2 ? v1 : v2; }
namespace Amarok { extern KConfig *config( const TQString& ); }
-BlockAnalyzer::BlockAnalyzer( TQWidget *parent )
- : Analyzer::Base2D( parent, 20, 9 )
+BlockAnalyzer::BlockAnalyzer( TQWidget *tqparent )
+ : Analyzer::Base2D( tqparent, 20, 9 )
, m_columns( 0 ) //uint
, m_rows( 0 ) //uint
, m_y( 0 ) //uint
@@ -141,7 +141,7 @@ BlockAnalyzer::analyze( const Analyzer::Scope &s )
// y starts from the top and increases in units of blocks
// m_yscale looks similar to: { 0.7, 0.5, 0.25, 0.15, 0.1, 0 }
- // if it contains 6 elements there are 5 rows in the analyzer
+ // if it tqcontains 6 elements there are 5 rows in the analyzer
Analyzer::interpolate( s, m_scope );
@@ -222,7 +222,7 @@ adjustToLimits( int &b, int &f, uint &amount )
* It won't modify the hue of fg unless absolutely necessary
* @return the adjusted form of fg
*/
-QColor
+TQColor
ensureContrast( const TQColor &bg, const TQColor &fg, uint _amount = 150 )
{
class OutputOnExit {
@@ -244,8 +244,8 @@ ensureContrast( const TQColor &bg, const TQColor &fg, uint _amount = 150 )
int bh, bs, bv;
int fh, fs, fv;
- bg.getHsv( bh, bs, bv );
- fg.getHsv( fh, fs, fv );
+ bg.getHsv( &bh, &bs, &bv );
+ fg.getHsv( &fh, &fs, &fv );
int dv = abs( bv - fv );
@@ -345,7 +345,7 @@ ensureContrast( const TQColor &bg, const TQColor &fg, uint _amount = 150 )
// STAMP
// debug() << "Something went wrong!\n";
- return Qt::blue;
+ return TQt::blue;
#undef amount
// #undef STAMP
@@ -354,7 +354,7 @@ ensureContrast( const TQColor &bg, const TQColor &fg, uint _amount = 150 )
void
BlockAnalyzer::paletteChange( const TQPalette& ) //virtual
{
- const TQColor bg = palette().active().background();
+ const TQColor bg = tqpalette().active().background();
const TQColor fg = ensureContrast( bg, KGlobalSettings::activeTitleColor() );
m_topBarPixmap.fill( fg );
@@ -372,11 +372,11 @@ BlockAnalyzer::paletteChange( const TQPalette& ) //virtual
p.fillRect( 0, y*(HEIGHT+1), WIDTH, HEIGHT, TQColor( r+int(dr*y), g+int(dg*y), b+int(db*y) ) );
{
- const TQColor bg = palette().active().background().dark( 112 );
+ const TQColor bg = tqpalette().active().background().dark( 112 );
//make a complimentary fadebar colour
//TODO dark is not always correct, dumbo!
- int h,s,v; palette().active().background().dark( 150 ).getHsv( &h, &s, &v );
+ int h,s,v; tqpalette().active().background().dark( 150 ).getHsv( &h, &s, &v );
const TQColor fg( h + 120, s, v, TQColor::Hsv );
const double dr = fg.red() - bg.red();
@@ -386,7 +386,7 @@ BlockAnalyzer::paletteChange( const TQPalette& ) //virtual
// Precalculate all fade-bar pixmaps
for( uint y = 0; y < FADE_SIZE; ++y ) {
- m_fade_bars[y].fill( palette().active().background() );
+ m_fade_bars[y].fill( tqpalette().active().background() );
TQPainter f( &m_fade_bars[y] );
for( int z = 0; (uint)z < m_rows; ++z ) {
const double Y = 1.0 - (log10( FADE_SIZE - y ) / log10( FADE_SIZE ));
@@ -401,7 +401,7 @@ BlockAnalyzer::paletteChange( const TQPalette& ) //virtual
void
BlockAnalyzer::drawBackground()
{
- const TQColor bg = palette().active().background();
+ const TQColor bg = tqpalette().active().background();
const TQColor bgdark = bg.dark( 112 );
background()->fill( bg );
@@ -430,7 +430,7 @@ BlockAnalyzer::contextMenuEvent( TQContextMenuEvent *e )
{
const uint v = ids[x];
- menu.insertItem( i18n( "%1 fps" ).arg( 1000/v ), v );
+ menu.insertItem( i18n( "%1 fps" ).tqarg( 1000/v ), v );
menu.setItemChecked( v, v == timeout() );
}
diff --git a/amarok/src/analyzers/boomanalyzer.cpp b/amarok/src/analyzers/boomanalyzer.cpp
index 3505c82c..d50ca3af 100644
--- a/amarok/src/analyzers/boomanalyzer.cpp
+++ b/amarok/src/analyzers/boomanalyzer.cpp
@@ -10,8 +10,8 @@
#include
#include
-BoomAnalyzer::BoomAnalyzer( TQWidget *parent )
- : Analyzer::Base2D( parent, 10, 9 )
+BoomAnalyzer::BoomAnalyzer( TQWidget *tqparent )
+ : Analyzer::Base2D( tqparent, 10, 9 )
, K_barHeight( 1.271 )//1.471
, F_peakSpeed( 1.103 )//1.122
, F( 1.0 )
diff --git a/amarok/src/analyzers/boomanalyzer.h b/amarok/src/analyzers/boomanalyzer.h
index 37007649..be347b97 100644
--- a/amarok/src/analyzers/boomanalyzer.h
+++ b/amarok/src/analyzers/boomanalyzer.h
@@ -14,6 +14,7 @@
class BoomAnalyzer : public Analyzer::Base2D
{
Q_OBJECT
+ TQ_OBJECT
public:
BoomAnalyzer( TQWidget* );
diff --git a/amarok/src/analyzers/glanalyzer.cpp b/amarok/src/analyzers/glanalyzer.cpp
index 21382efe..a3387734 100644
--- a/amarok/src/analyzers/glanalyzer.cpp
+++ b/amarok/src/analyzers/glanalyzer.cpp
@@ -17,15 +17,15 @@
#include
-#ifdef HAVE_QGLWIDGET
+#ifdef HAVE_TQGLWIDGET
#include
#include "glanalyzer.h"
#include
-GLAnalyzer::GLAnalyzer( TQWidget *parent )
- : Analyzer::Base3D(parent, 15)
+GLAnalyzer::GLAnalyzer( TQWidget *tqparent )
+ : Analyzer::Base3D(tqparent, 15)
, m_oldy(32, -10.0f)
, m_peaks(32)
{}
diff --git a/amarok/src/analyzers/glanalyzer.h b/amarok/src/analyzers/glanalyzer.h
index d25583f5..0f996817 100644
--- a/amarok/src/analyzers/glanalyzer.h
+++ b/amarok/src/analyzers/glanalyzer.h
@@ -19,7 +19,7 @@
#define GLOSCOPE_H
#include
-#ifdef HAVE_QGLWIDGET
+#ifdef HAVE_TQGLWIDGET
#include "analyzerbase.h"
diff --git a/amarok/src/analyzers/glanalyzer2.cpp b/amarok/src/analyzers/glanalyzer2.cpp
index bee9b816..19fae32d 100644
--- a/amarok/src/analyzers/glanalyzer2.cpp
+++ b/amarok/src/analyzers/glanalyzer2.cpp
@@ -17,7 +17,7 @@
#include
-#ifdef HAVE_QGLWIDGET
+#ifdef HAVE_TQGLWIDGET
#include
#include
@@ -28,8 +28,8 @@
#include
-GLAnalyzer2::GLAnalyzer2( TQWidget *parent ):
-Analyzer::Base3D(parent, 15)
+GLAnalyzer2::GLAnalyzer2( TQWidget *tqparent ):
+Analyzer::Base3D(tqparent, 15)
{
//initialize openGL context before managing GL calls
makeCurrent();
@@ -232,7 +232,7 @@ void GLAnalyzer2::paintGL()
glLoadIdentity();
// glRotatef( -frame.rotDegrees, 0,0,1 );
- glBegin( GL_QUADS );
+ glBegin( GL_TQUADS );
// Particle * particle = particleList.first();
// for (; particle; particle = particleList.next())
{
diff --git a/amarok/src/analyzers/glanalyzer2.h b/amarok/src/analyzers/glanalyzer2.h
index 77ef9c9d..b22443d9 100644
--- a/amarok/src/analyzers/glanalyzer2.h
+++ b/amarok/src/analyzers/glanalyzer2.h
@@ -19,7 +19,7 @@
#define GLSTARVIEW_H
#include
-#ifdef HAVE_QGLWIDGET
+#ifdef HAVE_TQGLWIDGET
#include "analyzerbase.h"
#include
diff --git a/amarok/src/analyzers/glanalyzer3.cpp b/amarok/src/analyzers/glanalyzer3.cpp
index 7a69301a..74f8ad29 100644
--- a/amarok/src/analyzers/glanalyzer3.cpp
+++ b/amarok/src/analyzers/glanalyzer3.cpp
@@ -17,7 +17,7 @@
#include
-#ifdef HAVE_QGLWIDGET
+#ifdef HAVE_TQGLWIDGET
#include
#include
@@ -121,8 +121,8 @@ class Paddle
};
-GLAnalyzer3::GLAnalyzer3( TQWidget *parent ):
-Analyzer::Base3D(parent, 15)
+GLAnalyzer3::GLAnalyzer3( TQWidget *tqparent ):
+Analyzer::Base3D(tqparent, 15)
{
//initialize openGL context before managing GL calls
makeCurrent();
@@ -347,7 +347,7 @@ void GLAnalyzer3::drawDot3s( float x, float y, float z, float size )
pYm = y - sizeY,
pYM = y + sizeY;
// Draw the Dot
- glBegin( GL_QUADS );
+ glBegin( GL_TQUADS );
glTexCoord2f( 0, 0 ); // Bottom Left
glVertex3f( pXm, pYm, z );
glTexCoord2f( 0, 1 ); // Top Left
@@ -370,7 +370,7 @@ void GLAnalyzer3::drawDot3s( float x, float y, float z, float size )
// Draw the top shadow
currentColor[3] = topSide * topSide * alpha;
glColor4fv( currentColor );
- glBegin( GL_QUADS );
+ glBegin( GL_TQUADS );
glTexCoord2f( 0, 0 ); // Bottom Left
glVertex3f( pXm, 1, pZm );
glTexCoord2f( 0, 1 ); // Top Left
@@ -383,7 +383,7 @@ void GLAnalyzer3::drawDot3s( float x, float y, float z, float size )
// Draw the bottom shadow
currentColor[3] = bottomSide * bottomSide * alpha;
glColor4fv( currentColor );
- glBegin( GL_QUADS );
+ glBegin( GL_TQUADS );
glTexCoord2f( 0, 0 ); // Bottom Left
glVertex3f( pXm, -1, pZm );
glTexCoord2f( 0, 1 ); // Top Left
diff --git a/amarok/src/analyzers/glanalyzer3.h b/amarok/src/analyzers/glanalyzer3.h
index e33009c5..d6f80d6c 100644
--- a/amarok/src/analyzers/glanalyzer3.h
+++ b/amarok/src/analyzers/glanalyzer3.h
@@ -16,7 +16,7 @@
***************************************************************************/
#include
-#ifdef HAVE_QGLWIDGET
+#ifdef HAVE_TQGLWIDGET
#ifndef GLBOUNCER_H
#define GLBOUNCER_H
diff --git a/amarok/src/analyzers/sonogram.cpp b/amarok/src/analyzers/sonogram.cpp
index 60e7749c..cff361fb 100644
--- a/amarok/src/analyzers/sonogram.cpp
+++ b/amarok/src/analyzers/sonogram.cpp
@@ -14,8 +14,8 @@
#include
#include "sonogram.h"
-Sonogram::Sonogram(TQWidget *parent) :
- Analyzer::Base2D(parent, 16, 9)
+Sonogram::Sonogram(TQWidget *tqparent) :
+ Analyzer::Base2D(tqparent, 16, 9)
{
}
@@ -64,7 +64,7 @@ void Sonogram::analyze(const Scope &s)
else if (*it < 1.0)
c.setHsv(95 - int(*it * 90.0), 255, 255);
else
- c = Qt::red;
+ c = TQt::red;
p.setPen(c);
p.drawPoint(x, y--);
diff --git a/amarok/src/analyzers/turbine.h b/amarok/src/analyzers/turbine.h
index 6ad34fbc..c216a9a0 100644
--- a/amarok/src/analyzers/turbine.h
+++ b/amarok/src/analyzers/turbine.h
@@ -14,7 +14,7 @@
class TurbineAnalyzer : public BoomAnalyzer
{
public:
- TurbineAnalyzer( TQWidget *parent ) : BoomAnalyzer( parent ) {}
+ TurbineAnalyzer( TQWidget *tqparent ) : BoomAnalyzer( tqparent ) {}
void analyze( const Scope& );
};
diff --git a/amarok/src/app.cpp b/amarok/src/app.cpp
index 4cd964d8..edd041c7 100644
--- a/amarok/src/app.cpp
+++ b/amarok/src/app.cpp
@@ -91,12 +91,12 @@ TQMutex Amarok::globalDirsMutex;
int App::mainThreadId = 0;
-#ifdef Q_WS_MAC
+#ifdef TQ_WS_MAC
#include
static AEEventHandlerUPP appleEventProcessorUPP = 0;
-OSStatus
+OStqStatus
appleEventProcessor(const AppleEvent *ae, AppleEvent *, long /*handlerRefCon*/)
{
OSType aeID = typeWildCard;
@@ -130,7 +130,7 @@ App::App()
{
DEBUG_BLOCK
-#ifdef Q_WS_MAC
+#ifdef TQ_WS_MAC
// this is inspired by OpenSceneGraph: osgDB/FilePath.cpp
// Start with the the Bundle PlugIns directory.
@@ -192,7 +192,7 @@ App::App()
qWarning("AtomicString was initialized from a thread other than the GUI "
"thread. This could lead to memory leaks.");
-#ifdef Q_WS_MAC
+#ifdef TQ_WS_MAC
appleEventProcessorUPP = AEEventHandlerUPP(appleEventProcessor);
AEInstallEventHandler(kCoreEventClass, kAEReopenApplication, appleEventProcessorUPP, (long)this, true);
#endif
@@ -214,7 +214,7 @@ App::~App()
AmarokConfig::setResumeTrack( EngineController::instance()->playingURL().prettyURL() );
AmarokConfig::setResumeTime( engine->position() );
}
- else AmarokConfig::setResumeTrack( TQString::null ); //otherwise it'll play previous resume next time!
+ else AmarokConfig::setResumeTrack( TQString() ); //otherwise it'll play previous resume next time!
}
EngineController::instance()->endSession(); //records final statistics
@@ -442,7 +442,7 @@ void App::initGlobalShortcuts()
m_pGlobalAccel->insert( "stop", i18n( "Stop" ), 0, KKey("WIN+v"), 0,
ec, TQT_SLOT( stop() ), true, true );
m_pGlobalAccel->insert( "stop_after_global", i18n( "Stop Playing After Current Track" ), 0, KKey("WIN+CTRL+v"), 0,
- Playlist::instance()->qscrollview(), TQT_SLOT( toggleStopAfterCurrentTrack() ), true, true );
+ TQT_TQOBJECT(Playlist::instance()->qscrollview()), TQT_SLOT( toggleStopAfterCurrentTrack() ), true, true );
m_pGlobalAccel->insert( "next", i18n( "Next Track" ), 0, KKey("WIN+b"), 0,
ec, TQT_SLOT( next() ), true, true );
m_pGlobalAccel->insert( "prev", i18n( "Previous Track" ), 0, KKey("WIN+z"), 0,
@@ -456,26 +456,26 @@ void App::initGlobalShortcuts()
m_pGlobalAccel->insert( "seekbackward", i18n( "Seek Backward" ), 0, KKey("WIN+Shift+KP_Subtract"), 0,
ec, TQT_SLOT( seekBackward() ), true, true );
m_pGlobalAccel->insert( "playlist_add", i18n( "Add Media..." ), 0, KKey("WIN+a"), 0,
- m_pPlaylistWindow, TQT_SLOT( slotAddLocation() ), true, true );
+ TQT_TQOBJECT(m_pPlaylistWindow), TQT_SLOT( slotAddLocation() ), true, true );
m_pGlobalAccel->insert( "show", i18n( "Toggle Playlist Window" ), 0, KKey("WIN+p"), 0,
- m_pPlaylistWindow, TQT_SLOT( showHide() ), true, true );
-#ifdef Q_WS_X11
+ TQT_TQOBJECT(m_pPlaylistWindow), TQT_SLOT( showHide() ), true, true );
+#ifdef TQ_WS_X11
m_pGlobalAccel->insert( "osd", i18n( "Show OSD" ), 0, KKey("WIN+o"), 0,
- Amarok::OSD::instance(), TQT_SLOT( forceToggleOSD() ), true, true );
+ TQT_TQOBJECT(Amarok::OSD::instance()), TQT_SLOT( forceToggleOSD() ), true, true );
#endif
m_pGlobalAccel->insert( "mute", i18n( "Mute Volume" ), 0, KKey("WIN+m"), 0,
ec, TQT_SLOT( mute() ), true, true );
m_pGlobalAccel->insert( "rating1", i18n( "Rate Current Track: 1" ), 0, KKey("WIN+1"), 0,
- this, TQT_SLOT( setRating1() ), true, true );
+ TQT_TQOBJECT(this), TQT_SLOT( setRating1() ), true, true );
m_pGlobalAccel->insert( "rating2", i18n( "Rate Current Track: 2" ), 0, KKey("WIN+2"), 0,
- this, TQT_SLOT( setRating2() ), true, true );
+ TQT_TQOBJECT(this), TQT_SLOT( setRating2() ), true, true );
m_pGlobalAccel->insert( "rating3", i18n( "Rate Current Track: 3" ), 0, KKey("WIN+3"), 0,
- this, TQT_SLOT( setRating3() ), true, true );
+ TQT_TQOBJECT(this), TQT_SLOT( setRating3() ), true, true );
m_pGlobalAccel->insert( "rating4", i18n( "Rate Current Track: 4" ), 0, KKey("WIN+4"), 0,
- this, TQT_SLOT( setRating4() ), true, true );
+ TQT_TQOBJECT(this), TQT_SLOT( setRating4() ), true, true );
m_pGlobalAccel->insert( "rating5", i18n( "Rate Current Track: 5" ), 0, KKey("WIN+5"), 0,
- this, TQT_SLOT( setRating5() ), true, true );
+ TQT_TQOBJECT(this), TQT_SLOT( setRating5() ), true, true );
m_pGlobalAccel->setConfigGroup( "Shortcuts" );
m_pGlobalAccel->readSettings( kapp->config() );
@@ -530,13 +530,13 @@ void App::fixHyperThreading()
// If the library is new enough try and call sched_setaffinity.
#ifdef SCHEDAFFINITY_SUPPORT
- cpu_set_t mask;
- CPU_ZERO( &mask ); // Initializes all the bits in the mask to zero
- CPU_SET( 0, &mask ); // Sets only the bit corresponding to cpu
+ cpu_set_t tqmask;
+ CPU_ZERO( &tqmask ); // Initializes all the bits in the tqmask to zero
+ CPU_SET( 0, &tqmask ); // Sets only the bit corresponding to cpu
#ifdef SCHEDAFFINITY_3PARAMS
- if ( sched_setaffinity( 0, sizeof(mask), &mask ) == -1 )
+ if ( sched_setaffinity( 0, sizeof(tqmask), &tqmask ) == -1 )
#else //SCHEDAFFINITY_3PARAMS
- if ( sched_setaffinity( 0, &mask ) == -1 )
+ if ( sched_setaffinity( 0, &tqmask ) == -1 )
#endif //SCHEDAFFINITY_3PARAMS
{
warning() << "sched_setaffinity() call failed with error code: " << errno << endl;
@@ -622,7 +622,7 @@ void App::applySettings( bool firstTime )
//determine and apply colors first
applyColorScheme();
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
TrackToolTip::instance()->removeFromWidget( m_pTray );
#endif
@@ -644,9 +644,9 @@ void App::applySettings( bool firstTime )
connect( m_pPlayerWindow, TQT_SIGNAL(playlistToggled( bool )), m_pPlaylistWindow, TQT_SLOT(showHide()) );
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
//TODO get this to work!
- //may work if you set no parent for the systray?
+ //may work if you set no tqparent for the systray?
//KWin::setSystemTrayWindowFor( m_pTray->winId(), m_pPlayerWindow->winId() );
delete m_pTray; m_pTray = new Amarok::TrayIcon( m_pPlayerWindow );
@@ -666,7 +666,7 @@ void App::applySettings( bool firstTime )
m_pPlayerWindow->applySettings();
} else if( m_pPlayerWindow ) {
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
delete m_pTray; m_pTray = new Amarok::TrayIcon( m_pPlaylistWindow );
m_pTray->engineStateChanged(EngineController::instance()->engine()->state(), EngineController::instance()->engine()->state());
m_pTray->engineNewMetaData(EngineController::instance()->bundle(), false);
@@ -675,7 +675,7 @@ void App::applySettings( bool firstTime )
//Set the caption correctly.
if ( !EngineController::instance()->bundle().prettyTitle().isEmpty() )
- m_pPlaylistWindow->setCaption( i18n("Amarok - %1").arg( EngineController::instance()->bundle().veryNiceTitle() ) );
+ m_pPlaylistWindow->setCaption( i18n("Amarok - %1").tqarg( EngineController::instance()->bundle().veryNiceTitle() ) );
else
m_pPlaylistWindow->setCaption( "Amarok" );
@@ -691,7 +691,7 @@ void App::applySettings( bool firstTime )
Scrobbler::instance()->applySettings();
Amarok::OSD::instance()->applySettings();
CollectionDB::instance()->applySettings();
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
m_pTray->setShown( AmarokConfig::showTrayIcon() );
TrackToolTip::instance()->addToWidget( m_pTray );
#endif
@@ -700,7 +700,7 @@ void App::applySettings( bool firstTime )
//on startup we need to show the window, but only if it wasn't hidden on exit
//and always if the trayicon isn't showing
TQWidget* main_window = mainWindow();
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
if( ( main_window && firstTime && !Amarok::config()->readBoolEntry( "HiddenOnExit", false ) ) || ( main_window && !AmarokConfig::showTrayIcon() ) )
#endif
{
@@ -780,9 +780,9 @@ App::continueInit()
CollectionDB::instance()->checkDatabase();
m_pMediaDeviceManager = MediaDeviceManager::instance();
- m_pGlobalAccel = new KGlobalAccel( this );
+ m_pGlobalAccel = new KGlobalAccel( TQT_TQOBJECT(this) );
m_pPlaylistWindow = new PlaylistWindow();
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
m_pTray = new Amarok::TrayIcon( m_pPlaylistWindow );
#endif
m_pPlaylistWindow->init(); //creates the playlist, browsers, etc.
@@ -855,8 +855,8 @@ App::applyColorScheme()
TQColorGroup group;
using Amarok::ColorScheme::AltBase;
int h, s, v;
- TQWidget* const browserBar = static_cast( playlistWindow()->child( "BrowserBar" ) );
- TQWidget* const contextBrowser = static_cast( ContextBrowser::instance() );
+ TQWidget* const browserBar = TQT_TQWIDGET( playlistWindow()->child( "BrowserBar" ) );
+ TQWidget* const contextBrowser = TQT_TQWIDGET( ContextBrowser::instance() );
if( AmarokConfig::schemeKDE() )
{
@@ -871,11 +871,11 @@ App::applyColorScheme()
else if( AmarokConfig::schemeAmarok() )
{
- group = TQApplication::palette().active();
+ group = TQApplication::tqpalette().active();
const TQColor bg( Amarok::blue );
AltBase.setRgb( 57, 64, 98 );
- group.setColor( TQColorGroup::Text, Qt::white );
+ group.setColor( TQColorGroup::Text, TQt::white );
group.setColor( TQColorGroup::Link, 0xCCCCCC );
group.setColor( TQColorGroup::Base, bg );
group.setColor( TQColorGroup::Foreground, 0xd7d7ef );
@@ -884,13 +884,13 @@ App::applyColorScheme()
group.setColor( TQColorGroup::Button, AltBase );
group.setColor( TQColorGroup::ButtonText, 0xd7d7ef );
-// group.setColor( TQColorGroup::Light, Qt::cyan /*lighter than Button color*/ );
-// group.setColor( TQColorGroup::Midlight, Qt::blue /*between Button and Light*/ );
-// group.setColor( TQColorGroup::Dark, Qt::green /*darker than Button*/ );
-// group.setColor( TQColorGroup::Mid, Qt::red /*between Button and Dark*/ );
-// group.setColor( TQColorGroup::Shadow, Qt::yellow /*a very dark color. By default, the shadow color is Qt::black*/ );
+// group.setColor( TQColorGroup::Light, TQt::cyan /*lighter than Button color*/ );
+// group.setColor( TQColorGroup::Midlight, TQt::blue /*between Button and Light*/ );
+// group.setColor( TQColorGroup::Dark, TQt::green /*darker than Button*/ );
+// group.setColor( TQColorGroup::Mid, TQt::red /*between Button and Dark*/ );
+// group.setColor( TQColorGroup::Shadow, TQt::yellow /*a very dark color. By default, the shadow color is TQt::black*/ );
- group.setColor( TQColorGroup::Highlight, Qt::white );
+ group.setColor( TQColorGroup::Highlight, TQt::white );
group.setColor( TQColorGroup::HighlightedText, bg );
//group.setColor( TQColorGroup::BrightText, TQColor( 0xff, 0x40, 0x40 ) ); //GlowColor
@@ -902,11 +902,11 @@ App::applyColorScheme()
using namespace Amarok::ColorScheme;
Base = Amarok::blue;
- Text = Qt::white;
+ Text = TQt::white;
Background = 0x002090;
Foreground = 0x80A0FF;
- //all children() derive their palette from this
+ //all tqchildren() derive their palette from this
playlistWindow()->setPalette( TQPalette( group, group, group ) );
browserBar->unsetPalette();
contextBrowser->setPalette( TQPalette( group, group, group ) );
@@ -916,7 +916,7 @@ App::applyColorScheme()
{
// we try to be smart: this code figures out contrasting colors for
// selection and alternate background rows
- group = TQApplication::palette().active();
+ group = TQApplication::tqpalette().active();
const TQColor fg( AmarokConfig::playlistWindowFgColor() );
const TQColor bg( AmarokConfig::playlistWindowBgColor() );
@@ -937,8 +937,8 @@ App::applyColorScheme()
group.setColor( TQColorGroup::Text, fg );
group.setColor( TQColorGroup::Link, fg.light( 120 ) );
group.setColor( TQColorGroup::Highlight, highlight );
- group.setColor( TQColorGroup::HighlightedText, Qt::white );
- group.setColor( TQColorGroup::Dark, Qt::darkGray );
+ group.setColor( TQColorGroup::HighlightedText, TQt::white );
+ group.setColor( TQColorGroup::Dark, TQt::darkGray );
PlayerWidget::determineAmarokColors();
@@ -952,7 +952,7 @@ App::applyColorScheme()
// set the KListView alternate colours
TQObjectList* const list = playlistWindow()->queryList( "KListView" );
for( TQObject *o = list->first(); o; o = list->next() )
- static_cast(o)->setAlternateBackground( AltBase );
+ static_cast(TQT_TQWIDGET(o))->setAlternateBackground( AltBase );
delete list; //heap allocated!
}
@@ -964,7 +964,7 @@ bool Amarok::genericEventHandler( TQWidget *recipient, TQEvent *e )
//to use it just pass the event eg:
//
- // void Foo::barEvent( QBarEvent *e )
+ // void Foo::barEvent( TQBarEvent *e )
// {
// Amarok::genericEventHandler( this, e );
// }
@@ -1009,14 +1009,14 @@ bool Amarok::genericEventHandler( TQWidget *recipient, TQEvent *e )
//please don't remove!
case TQEvent::Wheel:
{
- #define e static_cast(e)
+ #define e TQT_TQWHEELEVENT(e)
//this behaviour happens for the systray and the player window
//to override one, override it in that class
switch( e->state() )
{
- case Qt::ControlButton:
+ case TQt::ControlButton:
{
const bool up = e->delta() > 0;
@@ -1026,7 +1026,7 @@ bool Amarok::genericEventHandler( TQWidget *recipient, TQEvent *e )
else EngineController::instance()->next();
break;
}
- case Qt::ShiftButton:
+ case TQt::ShiftButton:
{
EngineController::instance()->seekRelative( ( e->delta() / 120 ) * 10000 ); // 10 seconds
break;
@@ -1046,7 +1046,7 @@ bool Amarok::genericEventHandler( TQWidget *recipient, TQEvent *e )
//KDE policy states we should hide to tray and not quit() when the
//close window button is pushed for the main widget
- static_cast(e)->accept(); //if we don't do this the info box appears on quit()!
+ TQT_TQCLOSEEVENT(e)->accept(); //if we don't do this the info box appears on quit()!
if( AmarokConfig::showTrayIcon() && !e->spontaneous() && !kapp->sessionSaving() )
{
@@ -1084,7 +1084,7 @@ void App::engineStateChanged( Engine::State state, Engine::State oldState )
if ( oldState == Engine::Paused )
Amarok::OSD::instance()->OSDWidget::show( i18n( "state, as in playing", "Play" ) );
if ( !bundle.prettyTitle().isEmpty() )
- m_pPlaylistWindow->setCaption( i18n("Amarok - %1").arg( bundle.veryNiceTitle() ) );
+ m_pPlaylistWindow->setCaption( i18n("Amarok - %1").tqarg( bundle.veryNiceTitle() ) );
break;
case Engine::Paused:
@@ -1106,7 +1106,7 @@ void App::engineNewMetaData( const MetaBundle &bundle, bool /*trackChanged*/ )
{
Amarok::OSD::instance()->show( bundle );
if ( !bundle.prettyTitle().isEmpty() )
- m_pPlaylistWindow->setCaption( i18n("Amarok - %1").arg( bundle.veryNiceTitle() ) );
+ m_pPlaylistWindow->setCaption( i18n("Amarok - %1").tqarg( bundle.veryNiceTitle() ) );
TrackToolTip::instance()->setTrack( bundle );
}
@@ -1272,8 +1272,8 @@ void App::slotTrashResult( KIO::Job *job )
TQWidget *App::mainWindow() const
{
- return AmarokConfig::showPlayerWindow() ? static_cast( m_pPlayerWindow )
- : static_cast( m_pPlaylistWindow );
+ return AmarokConfig::showPlayerWindow() ? TQT_TQWIDGET( m_pPlayerWindow )
+ : TQT_TQWIDGET( m_pPlaylistWindow );
}
void App::quit()
@@ -1313,7 +1313,7 @@ namespace Amarok
{
//URL can be in whatever forms KURL::fromPathOrURL understands - ie most.
const TQString cmd = "%1 \"%2\"";
- return KRun::runCommand( cmd.arg( AmarokConfig::externalBrowser(), KURL::fromPathOrURL( url ).url() ) ) > 0;
+ return KRun::runCommand( cmd.tqarg( AmarokConfig::externalBrowser(), KURL::fromPathOrURL( url ).url() ) ) > 0;
}
namespace ColorScheme
@@ -1325,9 +1325,9 @@ namespace Amarok
TQColor AltBase;
}
- OverrideCursor::OverrideCursor( Qt::CursorShape cursor )
+ OverrideCursor::OverrideCursor( TQt::tqCursorShape cursor )
{
- TQApplication::setOverrideCursor( cursor == Qt::WaitCursor ? KCursor::waitCursor() : KCursor::workingCursor() );
+ TQApplication::setOverrideCursor( cursor == TQt::WaitCursor ? KCursor::waitCursor() : KCursor::workingCursor() );
}
OverrideCursor::~OverrideCursor()
@@ -1347,24 +1347,24 @@ namespace Amarok
{
TQString result = path;
// german umlauts
- result.replace( TQChar(0x00e4), "ae" ).replace( TQChar(0x00c4), "Ae" );
- result.replace( TQChar(0x00f6), "oe" ).replace( TQChar(0x00d6), "Oe" );
- result.replace( TQChar(0x00fc), "ue" ).replace( TQChar(0x00dc), "Ue" );
- result.replace( TQChar(0x00df), "ss" );
+ result.tqreplace( TQChar(0x00e4), "ae" ).tqreplace( TQChar(0x00c4), "Ae" );
+ result.tqreplace( TQChar(0x00f6), "oe" ).tqreplace( TQChar(0x00d6), "Oe" );
+ result.tqreplace( TQChar(0x00fc), "ue" ).tqreplace( TQChar(0x00dc), "Ue" );
+ result.tqreplace( TQChar(0x00df), "ss" );
// some strange accents
- result.replace( TQChar(0x00e7), "c" ).replace( TQChar(0x00c7), "C" );
- result.replace( TQChar(0x00fd), "y" ).replace( TQChar(0x00dd), "Y" );
- result.replace( TQChar(0x00f1), "n" ).replace( TQChar(0x00d1), "N" );
+ result.tqreplace( TQChar(0x00e7), "c" ).tqreplace( TQChar(0x00c7), "C" );
+ result.tqreplace( TQChar(0x00fd), "y" ).tqreplace( TQChar(0x00dd), "Y" );
+ result.tqreplace( TQChar(0x00f1), "n" ).tqreplace( TQChar(0x00d1), "N" );
// czech letters with carons
- result.replace( TQChar(0x0161), "s" ).replace( TQChar(0x0160), "S" );
- result.replace( TQChar(0x010d), "c" ).replace( TQChar(0x010c), "C" );
- result.replace( TQChar(0x0159), "r" ).replace( TQChar(0x0158), "R" );
- result.replace( TQChar(0x017e), "z" ).replace( TQChar(0x017d), "Z" );
- result.replace( TQChar(0x0165), "t" ).replace( TQChar(0x0164), "T" );
- result.replace( TQChar(0x0148), "n" ).replace( TQChar(0x0147), "N" );
- result.replace( TQChar(0x010f), "d" ).replace( TQChar(0x010e), "D" );
+ result.tqreplace( TQChar(0x0161), "s" ).tqreplace( TQChar(0x0160), "S" );
+ result.tqreplace( TQChar(0x010d), "c" ).tqreplace( TQChar(0x010c), "C" );
+ result.tqreplace( TQChar(0x0159), "r" ).tqreplace( TQChar(0x0158), "R" );
+ result.tqreplace( TQChar(0x017e), "z" ).tqreplace( TQChar(0x017d), "Z" );
+ result.tqreplace( TQChar(0x0165), "t" ).tqreplace( TQChar(0x0164), "T" );
+ result.tqreplace( TQChar(0x0148), "n" ).tqreplace( TQChar(0x0147), "N" );
+ result.tqreplace( TQChar(0x010f), "d" ).tqreplace( TQChar(0x010e), "D" );
// accented vowels
TQChar a[] = { 'a', 0xe0,0xe1,0xe2,0xe3,0xe5, 0 };
diff --git a/amarok/src/app.h b/amarok/src/app.h
index fcbb3316..79eac9ea 100644
--- a/amarok/src/app.h
+++ b/amarok/src/app.h
@@ -42,11 +42,12 @@ class MediaDeviceManager;
class LIBAMAROK_EXPORT App : public KApplication, public EngineObserver
{
Q_OBJECT
+ TQ_OBJECT
public:
App();
~App();
- static App *instance() { return static_cast( qApp ); }
+ static App *instance() { return static_cast( tqApp ); }
static void handleCliArgs();
static void initCliArgs( int argc, char *argv[] );
@@ -113,7 +114,7 @@ class LIBAMAROK_EXPORT App : public KApplication, public EngineObserver
KGlobalAccel *m_pGlobalAccel;
PlayerWidget *m_pPlayerWindow;
PlaylistWindow *m_pPlaylistWindow;
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
Amarok::TrayIcon *m_pTray;
#endif
MediaDeviceManager *m_pMediaDeviceManager;
diff --git a/amarok/src/atomicstring.cpp b/amarok/src/atomicstring.cpp
index 2de299af..a384ee72 100644
--- a/amarok/src/atomicstring.cpp
+++ b/amarok/src/atomicstring.cpp
@@ -27,7 +27,7 @@
#include "atomicstring.h"
-class AtomicString::Data: public QString
+class AtomicString::Data: public TQString
{
public:
uint refcount;
@@ -82,7 +82,7 @@ TQString AtomicString::string() const
TQString AtomicString::deepCopy() const
{
if (m_string)
- return TQString( m_string->unicode(), m_string->length() );
+ return TQString( m_string->tqunicode(), m_string->length() );
return TQString();
}
@@ -95,7 +95,7 @@ const TQString *AtomicString::ptr() const
{
if( m_string )
return m_string;
- return &TQString::null;
+ return &TQString();
}
uint AtomicString::refcount() const
@@ -150,10 +150,10 @@ inline void AtomicString::ref( Data *s )
bool AtomicString::isMainThread()
{
// For isMainThread(), we could use TQThread::currentThread(), except the
- // docs say it's unreliable. And in general QThreads don't like to be called from
+ // docs say it's unreliable. And in general TQThreads don't like to be called from
// app destructors. Good old pthreads will serve us well. As for Windows, these
// two calls surely have equivalents; better yet we'll have QT4 and thread safe
- // QStrings by then.
+ // TQStrings by then.
// Note that the the static local init is thread safe.
static pthread_t main_thread = pthread_self();
return pthread_equal(pthread_self(), main_thread);
diff --git a/amarok/src/atomicstring.h b/amarok/src/atomicstring.h
index 11790ce9..4cee7fff 100644
--- a/amarok/src/atomicstring.h
+++ b/amarok/src/atomicstring.h
@@ -27,7 +27,7 @@
* can hash 5 million 256 byte strings in 1.34s on a 1.62GHz Athlon XP.) For
* other use, the overhead compared to a plain TQString should be minimal.
*
- * Added note: due to QString's thread unsafe refcounting, special precautions have to be
+ * Added note: due to TQString's thread unsafe refcounting, special precautions have to be
* taken to avoid memory corruption, while still maintaining some level of efficiency.
* We deepCopy strings, unless we are in the same thread that *first* used
* AtomicStrings. Also, deletions from other threads are delayed until that first thread
@@ -136,15 +136,15 @@ public:
* different ones. This can be useful for certain kinds of hacks, but
* shouldn't normally be used.
*
- * Note: DO NOT COPY this pointer with TQString() or QString=. It is not
+ * Note: DO NOT COPY this pointer with TQString() or TQString=. It is not
* thread safe to do it (TQString internal refcount)
* @return the internal pointer to the string
*/
const TQString *ptr() const;
/**
- * For convenience, so you can do atomicstring->QStringfunction(),
- * instead of atomicstring.string().QStringfunction(). The same warning
+ * For convenience, so you can do atomicstring->TQStringfunction(),
+ * instead of atomicstring.string().TQStringfunction(). The same warning
* applies as for the above ptr() function.
*/
inline const TQString *operator->() const { return ptr(); }
diff --git a/amarok/src/browserToolBar.h b/amarok/src/browserToolBar.h
index 6d421ab0..1425cd37 100644
--- a/amarok/src/browserToolBar.h
+++ b/amarok/src/browserToolBar.h
@@ -18,8 +18,8 @@ namespace Browser
class ToolBar : public KToolBar
{
public:
- ToolBar( TQWidget *parent )
- : KToolBar( parent, "NotMainToolBar" )
+ ToolBar( TQWidget *tqparent )
+ : KToolBar( tqparent, "NotMainToolBar" )
{
setMovingEnabled(false);
setFlat(true);
diff --git a/amarok/src/browserbar.cpp b/amarok/src/browserbar.cpp
index 5574a915..b5104365 100644
--- a/amarok/src/browserbar.cpp
+++ b/amarok/src/browserbar.cpp
@@ -38,38 +38,38 @@ namespace Amarok
Splitter( BrowserBar *w ) : TQWidget( w, "divider" )
{
setCursor( TQCursor(SplitHCursor) );
- styleChange( style() );
+ styleChange( tqstyle() );
}
virtual void paintEvent( TQPaintEvent* )
{
TQPainter p( this );
- parentWidget()->style().drawPrimitive( TQStyle::PE_Splitter, &p, rect(), colorGroup(), TQStyle::Style_Horizontal );
+ tqparentWidget()->tqstyle().tqdrawPrimitive( TQStyle::PE_Splitter, &p, rect(), tqcolorGroup(), TQStyle::Style_Horizontal );
}
virtual void styleChange( TQStyle& )
{
- setFixedWidth( style().pixelMetric( TQStyle::PM_SplitterWidth, this ) );
+ setFixedWidth( tqstyle().tqpixelMetric( TQStyle::PM_SplitterWidth, this ) );
}
virtual void mouseMoveEvent( TQMouseEvent *e )
{
- static_cast(parent())->mouseMovedOverSplitter( e );
+ static_cast(TQT_TQWIDGET(tqparent()))->mouseMovedOverSplitter( e );
}
};
}
BrowserBar* BrowserBar::s_instance = 0;
-BrowserBar::BrowserBar( TQWidget *parent )
- : TQWidget( parent, "BrowserBar" )
+BrowserBar::BrowserBar( TQWidget *tqparent )
+ : TQWidget( tqparent, "BrowserBar" )
, EngineObserver( EngineController::instance() )
, m_playlistBox( new TQVBox( this ) )
, m_divider( new Amarok::Splitter( this ) )
, m_browserBox( new TQVBox( this ) )
, m_currentIndex( -1 )
, m_lastIndex( -1 )
- , m_mapper( new TQSignalMapper( this ) )
+ , m_mapper( new TQSignalMapper( TQT_TQOBJECT(this) ) )
{
m_tabManagementButton = new TQPushButton( SmallIconSet(Amarok::icon( "configure" )), 0, this, "tab_managment_button" );
connect (m_tabManagementButton, TQT_SIGNAL(clicked()), TQT_SLOT(showBrowserSelectionMenu()));
@@ -81,12 +81,12 @@ BrowserBar::BrowserBar( TQWidget *parent )
m_tabBar = new MultiTabBar( MultiTabBar::Vertical, this );
- m_tabManagementButton->setFixedWidth(m_tabBar->sizeHint().width());
- m_tabManagementButton->setFixedHeight(m_tabBar->sizeHint().width());
+ m_tabManagementButton->setFixedWidth(m_tabBar->tqsizeHint().width());
+ m_tabManagementButton->setFixedHeight(m_tabBar->tqsizeHint().width());
s_instance = this;
- m_pos = m_tabBar->sizeHint().width() + 5; //5 = esthetic spacing
+ m_pos = m_tabBar->tqsizeHint().width() + 5; //5 = esthetic spacing
m_tabBar->setStyle( MultiTabBar::AMAROK );
m_tabBar->setPosition( MultiTabBar::Left );
@@ -94,9 +94,9 @@ BrowserBar::BrowserBar( TQWidget *parent )
m_tabBar->setFixedWidth( m_pos );
m_tabBar->move( 0, 25 );
- TQVBoxLayout *layout = new TQVBoxLayout( m_browserBox );
- layout->addSpacing( 3 ); // aesthetics
- layout->setAutoAdd( true );
+ TQVBoxLayout *tqlayout = new TQVBoxLayout( m_browserBox );
+ tqlayout->addSpacing( 3 ); // aesthetics
+ tqlayout->setAutoAdd( true );
m_browserBox->move( m_pos, 0 );
m_browserBox->hide();
@@ -109,14 +109,14 @@ BrowserBar::BrowserBar( TQWidget *parent )
- //m_tabBar->appendButton( Amarok::icon( "configure" ), 1, 0, TQString::null );
+ //m_tabBar->appendButton( Amarok::icon( "configure" ), 1, 0, TQString() );
}
BrowserBar::~BrowserBar()
{
KConfig* const config = Amarok::config( "BrowserBar" );
- config->writeEntry( "CurrentPane", m_currentIndex != -1 ? TQString(currentBrowser()->name()) : TQString::null );
+ config->writeEntry( "CurrentPane", m_currentIndex != -1 ? TQString(currentBrowser()->name()) : TQString() );
config->writeEntry( "Width", m_browserBox->width() );
}
@@ -133,7 +133,7 @@ int
BrowserBar::restoreWidth()
{
const int index = indexForName( Amarok::config( "BrowserBar" )->readEntry( "CurrentPane" ) );
- const int width = Amarok::config( "BrowserBar" )->readNumEntry( "Width", browser( index )->sizeHint().width() );
+ const int width = Amarok::config( "BrowserBar" )->readNumEntry( "Width", browser( index )->tqsizeHint().width() );
m_browserBox->resize( width, height() );
m_pos = m_browserBox->width() + m_tabBar->width();
@@ -170,7 +170,7 @@ BrowserBar::polish()
void
BrowserBar::adjustWidgetSizes()
{
- //TODO set the geometry of the PlaylistWindow before
+ //TODO set the tqgeometry of the PlaylistWindow before
// the browsers are loaded so this isn't called twice
const uint w = width();
@@ -226,8 +226,8 @@ BrowserBar::event( TQEvent *e )
case TQEvent::Resize:
// DEBUG_LINE_INFO
- m_divider->resize( 0, height() ); //Qt will set width
- m_tabBar->resize( 0, height() ); //Qt will set width
+ m_divider->resize( 0, height() ); //TQt will set width
+ m_tabBar->resize( 0, height() ); //TQt will set width
adjustWidgetSizes();
@@ -253,11 +253,11 @@ BrowserBar::addBrowser( const TQString &identifier, TQWidget *widget, const TQSt
m_tabBar->appendTab( SmallIcon( icon ), id, title, identifier );
tab = m_tabBar->tab( id );
- tab->setFocusPolicy( TQWidget::NoFocus ); //FIXME you can focus on the tab, but they respond to no input!
+ tab->setFocusPolicy( TQ_NoFocus ); //FIXME you can focus on the tab, but they respond to no input!
//we use a SignalMapper to show/hide the corresponding browser when tabs are clicked
connect( tab, TQT_SIGNAL(clicked()), m_mapper, TQT_SLOT(map()) );
- m_mapper->setMapping( tab, id );
+ m_mapper->setMapping( TQT_TQOBJECT(tab), id );
connect( tab, TQT_SIGNAL(initiateDrag ( int ) ), this, TQT_SLOT( showBrowser( int )) );
m_browsers.push_back( widget );
@@ -266,12 +266,12 @@ BrowserBar::addBrowser( const TQString &identifier, TQWidget *widget, const TQSt
void
BrowserBar::removeMediaBrowser( TQWidget *widget )
{
- BrowserList::iterator it = qFind( m_browsers.begin(), m_browsers.end(), widget );
+ BrowserList::iterator it = tqFind( m_browsers.begin(), m_browsers.end(), widget );
if( it != m_browsers.end() )
m_browsers.erase( it );
TQWidget *tab;
tab = m_tabBar->tab( m_browserIds["MediaBrowser"] );
- m_mapper->removeMappings( tab );
+ m_mapper->removeMappings( TQT_TQOBJECT(tab) );
m_tabBar->removeTab( m_browserIds["MediaBrowser"] );
}
diff --git a/amarok/src/browserbar.h b/amarok/src/browserbar.h
index 54b3b090..c0cb226d 100644
--- a/amarok/src/browserbar.h
+++ b/amarok/src/browserbar.h
@@ -33,9 +33,10 @@ class TQVBox;
class BrowserBar : public TQWidget, public EngineObserver
{
Q_OBJECT
+ TQ_OBJECT
public:
- BrowserBar( TQWidget *parent );
+ BrowserBar( TQWidget *tqparent );
~BrowserBar();
LIBAMAROK_EXPORT static BrowserBar* instance() { return s_instance; }
@@ -84,12 +85,12 @@ private:
LIBAMAROK_EXPORT static BrowserBar *s_instance;
uint m_pos; ///the x-axis position of m_divider
- TQVBox *m_playlistBox; ///parent to playlist, playlist filter and toolbar
+ TQVBox *m_playlistBox; ///tqparent to playlist, playlist filter and toolbar
TQWidget *m_divider; ///a qsplitter like widget
MultiTabBar *m_tabBar;
BrowserList m_browsers;
BrowserIdMap m_browserIds;
- TQVBox *m_browserBox; ///parent widget to the browsers
+ TQVBox *m_browserBox; ///tqparent widget to the browsers
int m_currentIndex;
int m_lastIndex;
TQSignalMapper *m_mapper; ///maps tab clicks to browsers
diff --git a/amarok/src/clicklineedit.cpp b/amarok/src/clicklineedit.cpp
index f33da486..8e1b2b77 100644
--- a/amarok/src/clicklineedit.cpp
+++ b/amarok/src/clicklineedit.cpp
@@ -25,8 +25,8 @@
#include "tqpainter.h"
-ClickLineEdit::ClickLineEdit( const TQString &msg, TQWidget *parent, const char* name ) :
- KLineEdit( parent, name )
+ClickLineEdit::ClickLineEdit( const TQString &msg, TQWidget *tqparent, const char* name ) :
+ KLineEdit( tqparent, name )
{
mDrawClickMsg = true;
setClickMessage( msg );
@@ -40,14 +40,14 @@ ClickLineEdit::ClickLineEdit( const TQString &msg, TQWidget *parent, const char*
void ClickLineEdit::setClickMessage( const TQString &msg )
{
mClickMessage = msg;
- repaint();
+ tqrepaint();
}
void ClickLineEdit::setText( const TQString &txt )
{
mDrawClickMsg = txt.isEmpty();
- repaint();
+ tqrepaint();
KLineEdit::setText( txt );
}
@@ -86,7 +86,7 @@ void ClickLineEdit::focusInEvent( TQFocusEvent *ev )
{
if ( mDrawClickMsg == true ) {
mDrawClickMsg = false;
- repaint();
+ tqrepaint();
}
TQLineEdit::focusInEvent( ev );
}
@@ -96,7 +96,7 @@ void ClickLineEdit::focusOutEvent( TQFocusEvent *ev )
{
if ( text().isEmpty() ) {
mDrawClickMsg = true;
- repaint();
+ tqrepaint();
}
TQLineEdit::focusOutEvent( ev );
}
diff --git a/amarok/src/clicklineedit.h b/amarok/src/clicklineedit.h
index 5dc02a1f..9881ab3f 100644
--- a/amarok/src/clicklineedit.h
+++ b/amarok/src/clicklineedit.h
@@ -33,9 +33,10 @@
class ClickLineEdit : public KLineEdit
{
Q_OBJECT
- Q_PROPERTY( TQString clickMessage READ clickMessage WRITE setClickMessage )
+ TQ_OBJECT
+ TQ_PROPERTY( TQString clickMessage READ clickMessage WRITE setClickMessage )
public:
- ClickLineEdit( const TQString &msg, TQWidget *parent, const char* name = 0 );
+ ClickLineEdit( const TQString &msg, TQWidget *tqparent, const char* name = 0 );
void setClickMessage( const TQString &msg );
TQString clickMessage() const { return mClickMessage; }
diff --git a/amarok/src/collectionbrowser.cpp b/amarok/src/collectionbrowser.cpp
index ce777298..c5ef7cde 100644
--- a/amarok/src/collectionbrowser.cpp
+++ b/amarok/src/collectionbrowser.cpp
@@ -128,7 +128,7 @@ CollectionBrowser::CollectionBrowser( const char* name )
m_timeFilter = new KComboBox( m_ipodHbox, "timeFilter" );
m_ipodHbox->setStretchFactor( m_timeFilter, 1 );
// Allow the combobox to shrink so the iPod buttons are still visible
- m_timeFilter->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed );
+ m_timeFilter->tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed );
m_timeFilter->insertItem( i18n( "Entire Collection" ) );
m_timeFilter->insertItem( i18n( "Added Today" ) );
m_timeFilter->insertItem( i18n( "Added Within One Week" ) );
@@ -149,10 +149,10 @@ CollectionBrowser::CollectionBrowser( const char* name )
m_view = new CollectionView( this );
m_view->installEventFilter( this );
- m_configureAction = new KAction( i18n( "Configure Folders" ), Amarok::icon( "configure" ), 0, this, TQT_SLOT( setupDirs() ), ac, "Configure" );
- m_treeViewAction = new KRadioAction( i18n( "Tree View" ), "view_tree", 0, m_view, TQT_SLOT( setTreeMode() ), ac, "Tree View" );
- m_flatViewAction = new KRadioAction( i18n( "Flat View" ), "view_detailed", 0, m_view, TQT_SLOT( setFlatMode() ), ac, "Flat View" );
- m_ipodViewAction = new KRadioAction( i18n( "iPod View" ), Amarok::icon("device"), 0, m_view, TQT_SLOT( setIpodMode() ), ac, "iPod View" );
+ m_configureAction = new KAction( i18n( "Configure Folders" ), Amarok::icon( "configure" ), 0, TQT_TQOBJECT(this), TQT_SLOT( setupDirs() ), ac, "Configure" );
+ m_treeViewAction = new KRadioAction( i18n( "Tree View" ), "view_tree", 0, TQT_TQOBJECT(m_view), TQT_SLOT( setTreeMode() ), ac, "Tree View" );
+ m_flatViewAction = new KRadioAction( i18n( "Flat View" ), "view_detailed", 0, TQT_TQOBJECT(m_view), TQT_SLOT( setFlatMode() ), ac, "Flat View" );
+ m_ipodViewAction = new KRadioAction( i18n( "iPod View" ), Amarok::icon("device"), 0, TQT_TQOBJECT(m_view), TQT_SLOT( setIpodMode() ), ac, "iPod View" );
m_treeViewAction->setExclusiveGroup("view mode");
m_flatViewAction->setExclusiveGroup("view mode");
m_ipodViewAction->setExclusiveGroup("view mode");
@@ -169,7 +169,7 @@ CollectionBrowser::CollectionBrowser( const char* name )
break;
}
- m_showDividerAction = new KToggleAction( i18n( "Show Divider" ), "leftjust", 0, this, TQT_SLOT( toggleDivider() ), ac, "Show Divider" );
+ m_showDividerAction = new KToggleAction( i18n( "Show Divider" ), "leftjust", 0, TQT_TQOBJECT(this), TQT_SLOT( toggleDivider() ), ac, "Show Divider" );
m_showDividerAction->setChecked(m_view->m_showDivider);
@@ -178,11 +178,11 @@ CollectionBrowser::CollectionBrowser( const char* name )
// browser window; see the "For iPod-style navigation" comments below.
m_ipodDecrement = new KAction( i18n( "Browse backward" ),
TQIconSet( m_view->ipodDecrementIcon(), TQIconSet::Small ),
- 0, m_view, TQT_SLOT( decrementDepth() ), ac,
+ 0, TQT_TQOBJECT(m_view), TQT_SLOT( decrementDepth() ), ac,
"iPod Decrement" );
m_ipodIncrement = new KAction( i18n( "Browse forward" ),
TQIconSet( m_view->ipodIncrementIcon(), TQIconSet::Small ),
- 0, m_view, TQT_SLOT( incrementDepth() ), ac,
+ 0, TQT_TQOBJECT(m_view), TQT_SLOT( incrementDepth() ), ac,
"iPod Increment" );
m_ipodDecrement->plug( m_ipodToolbar );
m_ipodIncrement->plug( m_ipodToolbar );
@@ -197,7 +197,7 @@ CollectionBrowser::CollectionBrowser( const char* name )
//m_tagfilterMenuButton->setEnabled( m_view->m_viewMode == CollectionView::modeTreeView );
//connect ( m_treeViewAction, TQT_SIGNAL ( toggled(bool) ), m_tagfilterMenuButton, TQT_SLOT( setEnabled (bool) ) );
- layoutToolbar();
+ tqlayoutToolbar();
m_categoryMenu = m_tagfilterMenuButton->popupMenu();
m_categoryMenu->insertItem( i18n( "Artist" ), m_view, TQT_SLOT( presetMenu( int ) ), 0, IdArtist );
@@ -334,9 +334,9 @@ CollectionBrowser::eventFilter( TQObject *o, TQEvent *e )
//there are a few keypresses that we intercept
- #define e static_cast(e)
+ #define e TQT_TQKEYEVENT(e)
- if( o == m_searchEdit ) //the search lineedit
+ if( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_searchEdit) ) //the search lineedit
{
switch( e->key() )
{
@@ -395,7 +395,7 @@ CollectionBrowser::eventFilter( TQObject *o, TQEvent *e )
}
void
-CollectionBrowser::layoutToolbar()
+CollectionBrowser::tqlayoutToolbar()
{
if ( !m_toolbar ) return;
@@ -415,7 +415,7 @@ CollectionBrowser::layoutToolbar()
m_configureAction->plug( m_toolbar );
//This would break things if the toolbar is too big, see bug #121915
- //setMinimumWidth( m_toolbar->sizeHint().width() + 2 ); //set a reasonable minWidth
+ //setMinimumWidth( m_toolbar->tqsizeHint().width() + 2 ); //set a reasonable minWidth
}
@@ -440,9 +440,9 @@ CollectionBrowser::ipodToolbar( bool activate )
CollectionView* CollectionView::m_instance = 0;
-CollectionView::CollectionView( CollectionBrowser* parent )
- : KListView( parent )
- , m_parent( parent )
+CollectionView::CollectionView( CollectionBrowser* tqparent )
+ : KListView( tqparent )
+ , m_tqparent( tqparent )
, m_timeFilter( 0 )
, m_currentDepth( 0 )
, m_ipodIncremented ( 1 )
@@ -494,7 +494,7 @@ CollectionView::CollectionView( CollectionBrowser* parent )
//
KActionCollection* ac = new KActionCollection( this );
- KStdAction::selectAll( this, TQT_SLOT( selectAll() ), ac, "collectionview_select_all" );
+ KStdAction::selectAll( TQT_TQOBJECT(this), TQT_SLOT( selectAll() ), ac, "collectionview_select_all" );
connect( CollectionDB::instance(), TQT_SIGNAL( scanStarted() ),
this, TQT_SLOT( scanStarted() ) );
@@ -570,7 +570,7 @@ CollectionView::keyPressEvent( TQKeyEvent *e )
// This rewritten code is more faithful to the ordinary moving
// behavior, even when looping around. (For instance, it behaves
// correctly if control-up is pressed at the top of the screen.)
- // It sends fake keypress events to the parent instead of programatically
+ // It sends fake keypress events to the tqparent instead of programatically
// selecting items.
if( (e->key() == Key_Up || e->key() == Key_Down ) && currentItem() )
{
@@ -610,7 +610,7 @@ CollectionView::keyPressEvent( TQKeyEvent *e )
TQKeyEvent e2 ( e->type(),
(e->key() == Key_Up ? Key_End : Key_Home),
0, e->state(),
- TQString::null, e->isAutoRepeat(), e->count() );
+ TQString(), e->isAutoRepeat(), e->count() );
TQApplication::sendEvent( this, &e2 );
cur = currentItem();
@@ -637,10 +637,10 @@ CollectionView::keyPressEvent( TQKeyEvent *e )
&& m_viewMode == modeIpodView )
{
if( e->key() == Key_Right )
- m_parent->m_ipodIncrement->activate();
+ m_tqparent->m_ipodIncrement->activate();
else if( e->key() == Key_Left )
- m_parent->m_ipodDecrement->activate();
+ m_tqparent->m_ipodDecrement->activate();
}
@@ -660,7 +660,7 @@ CollectionView::renderView(bool force /* = false */) //SLOT
if(!force && !m_dirty )
return;
- if( BrowserBar::instance()->currentBrowser() != m_parent )
+ if( BrowserBar::instance()->currentBrowser() != m_tqparent )
{
// the collectionbrowser is intensive for sql, so we only renderView() if the tab
// is currently active. else, wait until user focuses it.
@@ -784,23 +784,23 @@ CollectionView::slotEnsureSelectedItemVisible() //SLOT
if ( lastChild() )
ensureItemVisible( lastChild() );
- //Create a reverse list of parents, grandparents etc.
- //Later we try to make the grandparents in view, then their children etc.
+ //Create a reverse list of tqparents, grandtqparents etc.
+ //Later we try to make the grandtqparents in view, then their tqchildren etc.
//This means that the selected item has the most priority as it is done last.
- TQValueStack parents;
+ TQValueStack tqparents;
while ( r )
{
- parents.push( r );
- r = r->parent();
+ tqparents.push( r );
+ r = r->tqparent();
}
- while ( !parents.isEmpty() )
+ while ( !tqparents.isEmpty() )
{
//We would prefer the next item to be visible.
- if ( parents.top()->nextSibling() )
- ensureItemVisible( parents.top()->nextSibling() );
+ if ( tqparents.top()->nextSibling() )
+ ensureItemVisible( tqparents.top()->nextSibling() );
//It's even more important the actual item is visible than the next one.
- ensureItemVisible( parents.top() );
- parents.pop();
+ ensureItemVisible( tqparents.top() );
+ tqparents.pop();
}
}
}
@@ -864,14 +864,14 @@ CollectionView::slotExpand( TQListViewItem* item ) //SLOT
}
if ( translateTimeFilter( timeFilter() ) > 0 )
- qb.addFilter( QueryBuilder::tabSong, QueryBuilder::valCreateDate, TQString().setNum( TQDateTime::currentDateTime().toTime_t() - translateTimeFilter( timeFilter() ) ), QueryBuilder::modeGreater );
+ qb.addFilter( QueryBuilder::tabSong, QueryBuilder::valCreateDate, TQString().setNum( TQDateTime::tqcurrentDateTime().toTime_t() - translateTimeFilter( timeFilter() ) ), QueryBuilder::modeGreater );
TQString itemText;
bool isUnknown;
if ( dynamic_cast( item ) )
{
- itemText = static_cast( item )->getSQLText( 0 );
+ itemText = static_cast( item )->getSTQLText( 0 );
}
else
{
@@ -891,7 +891,7 @@ CollectionView::slotExpand( TQListViewItem* item ) //SLOT
if( VisYearAlbum == 1 )
{
tmptext = item->text( 0 );
- TQString year = tmptext.left( tmptext.find( i18n(" - ") ) );
+ TQString year = tmptext.left( tmptext.tqfind( i18n(" - ") ) );
yearAlbumCalc( year, tmptext );
qb.addMatch( QueryBuilder::tabYear, year, false, true );
if ( isUnknown )
@@ -939,19 +939,19 @@ CollectionView::slotExpand( TQListViewItem* item ) //SLOT
break;
case 1:
- tmptext = dynamic_cast( item->parent() ) ?
- static_cast( item->parent() )->getSQLText( 0 ) :
- item->parent()->text( 0 );
+ tmptext = dynamic_cast( item->tqparent() ) ?
+ static_cast( item->tqparent() )->getSTQLText( 0 ) :
+ item->tqparent()->text( 0 );
isUnknown = tmptext.isEmpty();
- if( !static_cast( item->parent() )->isSampler() )
+ if( !static_cast( item->tqparent() )->isSampler() )
{
if ( m_cat1 == IdArtist )
qb.setOptions( QueryBuilder::optNoCompilations );
if( VisYearAlbum == 1 )
{
- tmptext = item->parent()->text( 0 );
- TQString year = tmptext.left( tmptext.find( i18n(" - ") ) );
+ tmptext = item->tqparent()->text( 0 );
+ TQString year = tmptext.left( tmptext.tqfind( i18n(" - ") ) );
yearAlbumCalc( year, tmptext );
qb.addMatch( QueryBuilder::tabYear, year, false, true );
if ( isUnknown )
@@ -972,7 +972,7 @@ CollectionView::slotExpand( TQListViewItem* item ) //SLOT
if( VisYearAlbum == 2 )
{
tmptext = item->text( 0 );
- TQString year = tmptext.left( tmptext.find( i18n(" - ") ) );
+ TQString year = tmptext.left( tmptext.tqfind( i18n(" - ") ) );
yearAlbumCalc( year, tmptext );
qb.addMatch( QueryBuilder::tabYear, year, false, true );
if ( isUnknown )
@@ -1014,19 +1014,19 @@ CollectionView::slotExpand( TQListViewItem* item ) //SLOT
break;
case 2:
- tmptext = dynamic_cast ( item->parent()->parent() ) ?
- static_cast( item->parent()->parent() )->getSQLText( 0 ) :
- item->parent()->parent()->text( 0 );
+ tmptext = dynamic_cast ( item->tqparent()->tqparent() ) ?
+ static_cast( item->tqparent()->tqparent() )->getSTQLText( 0 ) :
+ item->tqparent()->tqparent()->text( 0 );
isUnknown = tmptext.isEmpty();
- if ( !static_cast( item->parent()->parent() )->isSampler() )
+ if ( !static_cast( item->tqparent()->tqparent() )->isSampler() )
{
if ( m_cat1 == IdArtist )
qb.setOptions( QueryBuilder::optNoCompilations );
if( VisYearAlbum == 1 )
{
- tmptext = item->parent()->parent()->text( 0 );
- TQString year = tmptext.left( tmptext.find( i18n(" - ") ) );
+ tmptext = item->tqparent()->tqparent()->text( 0 );
+ TQString year = tmptext.left( tmptext.tqfind( i18n(" - ") ) );
yearAlbumCalc( year, tmptext );
qb.addMatch( QueryBuilder::tabYear, year, false, true );
if ( isUnknown )
@@ -1041,15 +1041,15 @@ CollectionView::slotExpand( TQListViewItem* item ) //SLOT
c = true;
}
- tmptext = dynamic_cast( item->parent() ) ?
- static_cast( item->parent() )->getSQLText( 0 ) :
- item->parent()->text( 0 );
+ tmptext = dynamic_cast( item->tqparent() ) ?
+ static_cast( item->tqparent() )->getSTQLText( 0 ) :
+ item->tqparent()->text( 0 );
isUnknown = tmptext.isEmpty();
if( VisYearAlbum == 2 )
{
- tmptext = item->parent()->text( 0 );
- TQString year = tmptext.left( tmptext.find( i18n(" - ") ) );
+ tmptext = item->tqparent()->text( 0 );
+ TQString year = tmptext.left( tmptext.tqfind( i18n(" - ") ) );
yearAlbumCalc( year, tmptext );
qb.addMatch( QueryBuilder::tabYear, year, false, true );
if ( isUnknown )
@@ -1064,7 +1064,7 @@ CollectionView::slotExpand( TQListViewItem* item ) //SLOT
if( VisYearAlbum == 3 )
{
tmptext = item->text( 0 );
- TQString year = tmptext.left( tmptext.find( i18n(" - ") ) );
+ TQString year = tmptext.left( tmptext.tqfind( i18n(" - ") ) );
yearAlbumCalc( year, tmptext );
qb.addMatch( QueryBuilder::tabYear, year, false, true );
if ( isUnknown )
@@ -1151,7 +1151,7 @@ CollectionView::slotExpand( TQListViewItem* item ) //SLOT
child->setExpandable( expandable );
}
- //Display the album cover for the parent item now it is expanded
+ //Display the album cover for the tqparent item now it is expanded
if ( dynamic_cast( item ) )
{
CollectionItem *i = static_cast( item );
@@ -1175,7 +1175,7 @@ CollectionView::slotCollapse( TQListViewItem* item ) //SLOT
TQListViewItem* child = item->firstChild();
TQListViewItem* childTmp;
- //delete all children
+ //delete all tqchildren
while ( child )
{
childTmp = child;
@@ -1235,29 +1235,29 @@ CollectionView::presetMenu( int id ) //SLOT
void
CollectionView::cat1Menu( int id, bool rerender ) //SLOT
{
- m_parent->m_cat1Menu->setItemChecked( m_cat1, false ); //uncheck old item
- m_parent->m_cat2Menu->setItemEnabled( m_cat1, true ); //enable old items
- m_parent->m_cat3Menu->setItemEnabled( m_cat1, true );
+ m_tqparent->m_cat1Menu->setItemChecked( m_cat1, false ); //uncheck old item
+ m_tqparent->m_cat2Menu->setItemEnabled( m_cat1, true ); //enable old items
+ m_tqparent->m_cat3Menu->setItemEnabled( m_cat1, true );
m_cat1 = id;
updateColumnHeader();
resetIpodDepth();
- m_parent->m_cat1Menu->setItemChecked( m_cat1, true );
+ m_tqparent->m_cat1Menu->setItemChecked( m_cat1, true );
//prevent choosing the same category in both menus
- m_parent->m_cat2Menu->setItemEnabled( id , false );
- m_parent->m_cat3Menu->setItemEnabled( id , false );
+ m_tqparent->m_cat2Menu->setItemEnabled( id , false );
+ m_tqparent->m_cat3Menu->setItemEnabled( id , false );
//if this item is checked in second menu, uncheck it
- if ( m_parent->m_cat2Menu->isItemChecked( id ) ) {
- m_parent->m_cat2Menu->setItemChecked( id, false );
- m_parent->m_cat2Menu->setItemChecked( IdNone, true );
+ if ( m_tqparent->m_cat2Menu->isItemChecked( id ) ) {
+ m_tqparent->m_cat2Menu->setItemChecked( id, false );
+ m_tqparent->m_cat2Menu->setItemChecked( IdNone, true );
m_cat2 = IdNone;
enableCat3Menu( false );
}
//if this item is checked in third menu, uncheck it
- if ( m_parent->m_cat3Menu->isItemChecked( id ) ) {
- m_parent->m_cat3Menu->setItemChecked( id, false );
- m_parent->m_cat3Menu->setItemChecked( IdNone, true );
+ if ( m_tqparent->m_cat3Menu->isItemChecked( id ) ) {
+ m_tqparent->m_cat3Menu->setItemChecked( id, false );
+ m_tqparent->m_cat3Menu->setItemChecked( IdNone, true );
m_cat3 = IdNone;
}
updateTrackDepth();
@@ -1271,23 +1271,23 @@ CollectionView::cat1Menu( int id, bool rerender ) //SLOT
void
CollectionView::cat2Menu( int id, bool rerender ) //SLOT
{
- m_parent->m_cat2Menu->setItemChecked( m_cat2, false ); //uncheck old item
- m_parent->m_cat3Menu->setItemEnabled( m_cat3, true ); //enable old item
+ m_tqparent->m_cat2Menu->setItemChecked( m_cat2, false ); //uncheck old item
+ m_tqparent->m_cat3Menu->setItemEnabled( m_cat3, true ); //enable old item
m_cat2 = id;
- m_parent->m_cat2Menu->setItemChecked( m_cat2, true );
+ m_tqparent->m_cat2Menu->setItemChecked( m_cat2, true );
updateColumnHeader();
resetIpodDepth();
enableCat3Menu( id != IdNone );
//prevent choosing the same category in both menus
- m_parent->m_cat3Menu->setItemEnabled( m_cat1 , false );
+ m_tqparent->m_cat3Menu->setItemEnabled( m_cat1 , false );
if( id != IdNone )
- m_parent->m_cat3Menu->setItemEnabled( id , false );
+ m_tqparent->m_cat3Menu->setItemEnabled( id , false );
//if this item is checked in third menu, uncheck it
- if ( m_parent->m_cat3Menu->isItemChecked( id ) ) {
- m_parent->m_cat3Menu->setItemChecked( id, false );
+ if ( m_tqparent->m_cat3Menu->isItemChecked( id ) ) {
+ m_tqparent->m_cat3Menu->setItemChecked( id, false );
enableCat3Menu( false );
}
updateTrackDepth();
@@ -1301,9 +1301,9 @@ CollectionView::cat2Menu( int id, bool rerender ) //SLOT
void
CollectionView::cat3Menu( int id, bool rerender ) //SLOT
{
- m_parent->m_cat3Menu->setItemChecked( m_cat3, false ); //uncheck old item
+ m_tqparent->m_cat3Menu->setItemChecked( m_cat3, false ); //uncheck old item
m_cat3 = id;
- m_parent->m_cat3Menu->setItemChecked( m_cat3, true );
+ m_tqparent->m_cat3Menu->setItemChecked( m_cat3, true );
updateColumnHeader();
resetIpodDepth();
updateTrackDepth();
@@ -1317,17 +1317,17 @@ CollectionView::cat3Menu( int id, bool rerender ) //SLOT
void
CollectionView::enableCat3Menu( bool enable )
{
- m_parent->m_cat3Menu->setItemEnabled( IdAlbum, enable );
- m_parent->m_cat3Menu->setItemEnabled( IdVisYearAlbum, enable );
- m_parent->m_cat3Menu->setItemEnabled( IdArtist, enable );
- m_parent->m_cat3Menu->setItemEnabled( IdComposer, enable );
- m_parent->m_cat3Menu->setItemEnabled( IdGenre, enable );
- m_parent->m_cat3Menu->setItemEnabled( IdYear, enable );
- m_parent->m_cat3Menu->setItemEnabled( IdLabel, enable );
+ m_tqparent->m_cat3Menu->setItemEnabled( IdAlbum, enable );
+ m_tqparent->m_cat3Menu->setItemEnabled( IdVisYearAlbum, enable );
+ m_tqparent->m_cat3Menu->setItemEnabled( IdArtist, enable );
+ m_tqparent->m_cat3Menu->setItemEnabled( IdComposer, enable );
+ m_tqparent->m_cat3Menu->setItemEnabled( IdGenre, enable );
+ m_tqparent->m_cat3Menu->setItemEnabled( IdYear, enable );
+ m_tqparent->m_cat3Menu->setItemEnabled( IdLabel, enable );
if( !enable ) {
- m_parent->m_cat3Menu->setItemChecked( m_cat3, false );
- m_parent->m_cat3Menu->setItemChecked( IdNone, true );
+ m_tqparent->m_cat3Menu->setItemChecked( m_cat3, false );
+ m_tqparent->m_cat3Menu->setItemChecked( IdNone, true );
m_cat3 = IdNone;
}
updateTrackDepth();
@@ -1373,8 +1373,8 @@ CollectionView::ipodItemClicked( TQListViewItem *item, const TQPoint&, int c )
if( m_viewMode != modeIpodView )
return;
- // The Qt manual says NOT to delete items from within this slot
- TQTimer::singleShot( 0, m_parent->m_ipodIncrement, TQT_SLOT( activate() ) );
+ // The TQt manual says NOT to delete items from within this slot
+ TQTimer::singleShot( 0, m_tqparent->m_ipodIncrement, TQT_SLOT( activate() ) );
}
@@ -1416,7 +1416,7 @@ CollectionView::rmbPressed( TQListViewItem* item, const TQPoint& point, int ) //
cat = catArr[m_currentDepth];
}
- enum Actions { APPEND, QUEUE, MAKE, SAVE, MEDIA_DEVICE, BURN_ARTIST,
+ enum Actions { APPEND, TQUEUE, MAKE, SAVE, MEDIA_DEVICE, BURN_ARTIST,
BURN_COMPOSER, BURN_ALBUM, BURN_CD, FETCH, INFO,
COMPILATION_SET, COMPILATION_UNSET, ORGANIZE, DELETE, TRASH,
FILE_MENU };
@@ -1428,7 +1428,7 @@ CollectionView::rmbPressed( TQListViewItem* item, const TQPoint& point, int ) //
menu.insertItem( SmallIconSet( Amarok::icon( "files" ) ), i18n( "&Load" ), MAKE );
menu.insertItem( SmallIconSet( Amarok::icon( "add_playlist" ) ), i18n( "&Append to Playlist" ), APPEND );
menu.insertItem( SmallIconSet( Amarok::icon( "queue_track" ) ), selection.count() == 1 ? i18n( "&Queue Track" )
- : i18n( "&Queue Tracks" ), QUEUE );
+ : i18n( "&Queue Tracks" ), TQUEUE );
if( selection.count() > 1 || item->isExpandable() )
menu.insertItem( SmallIconSet( Amarok::icon( "save" ) ), i18n( "&Save as Playlist..." ), SAVE );
@@ -1471,7 +1471,7 @@ CollectionView::rmbPressed( TQListViewItem* item, const TQPoint& point, int ) //
if( (cat == IdAlbum || cat == IdVisYearAlbum) && siblingSelection.count() == 1 ) // cover fetch isn't multiselection capable
{
- menu.insertItem( SmallIconSet( Amarok::icon( "download" ) ), i18n( "&Fetch Cover From amazon.%1" ).arg( CoverManager::amazonTld() ), this, TQT_SLOT( fetchCover() ), 0, FETCH );
+ menu.insertItem( SmallIconSet( Amarok::icon( "download" ) ), i18n( "&Fetch Cover From amazon.%1" ).tqarg( CoverManager::amazonTld() ), this, TQT_SLOT( fetchCover() ), 0, FETCH );
#ifndef AMAZON_SUPPORT
menu.setItemEnabled( FETCH, false );
#endif
@@ -1504,7 +1504,7 @@ CollectionView::rmbPressed( TQListViewItem* item, const TQPoint& point, int ) //
case SAVE:
playlistFromURLs( selection );
break;
- case QUEUE:
+ case TQUEUE:
Playlist::instance()->insertMedia( selection, Playlist::Queue );
break;
case MEDIA_DEVICE:
@@ -1525,11 +1525,11 @@ CollectionView::rmbPressed( TQListViewItem* item, const TQPoint& point, int ) //
{
TQString artist;
if( item->depth() - artistLevel == 1 )
- artist = item->parent()->text( 0 );
+ artist = item->tqparent()->text( 0 );
else if( item->depth() - artistLevel == 2 )
- artist = item->parent()->parent()->text( 0 );
+ artist = item->tqparent()->tqparent()->text( 0 );
else if( item->depth() - artistLevel == 3 )
- artist = item->parent()->parent()->parent()->text( 0 );
+ artist = item->tqparent()->tqparent()->tqparent()->text( 0 );
K3bExporter::instance()->exportAlbum( artist, trueItemText );
}
break;
@@ -1579,15 +1579,15 @@ CollectionView::setViewMode( int mode, bool rerender /*=true*/ )
#if KDE_VERSION >= KDE_MAKE_VERSION(3,4,0)
setShadeSortColumn( false );
#endif
- m_parent->m_ipodDecrement->setEnabled( m_currentDepth > 0 );
- m_parent->ipodToolbar( true );
+ m_tqparent->m_ipodDecrement->setEnabled( m_currentDepth > 0 );
+ m_tqparent->ipodToolbar( true );
}
else
{
#if KDE_VERSION >= KDE_MAKE_VERSION(3,4,0)
setShadeSortColumn( true );
#endif
- m_parent->ipodToolbar( false );
+ m_tqparent->ipodToolbar( false );
}
if ( rerender )
@@ -1628,9 +1628,9 @@ CollectionItem::setPixmap(int column, const TQPixmap & pix)
//Now work out the artist
CollectionItem *p = this;
- while ( p->parent() && dynamic_cast( p->parent() ) )
+ while ( p->tqparent() && dynamic_cast( p->tqparent() ) )
{
- p = static_cast( p->parent() );
+ p = static_cast( p->tqparent() );
if ( IdArtist == p->m_cat )
{
artist = p->text( 0 );
@@ -1687,9 +1687,9 @@ CollectionView::fetchCover() //SLOT
TQString album = item->text(0);
if( cat == IdVisYearAlbum )
{
- // we can't use findRev since an album may have " - " within it.
+ // we can't use tqfindRev since an album may have " - " within it.
TQString sep = i18n(" - ");
- album = album.right( album.length() - sep.length() - album.find( sep ) );
+ album = album.right( album.length() - sep.length() - album.tqfind( sep ) );
}
// find the first artist's name
@@ -1698,7 +1698,7 @@ CollectionView::fetchCover() //SLOT
"SELECT DISTINCT artist.name FROM artist, album, tags "
"WHERE artist.id = tags.artist AND tags.album = album.id "
"AND album.name = '%1';" )
- .arg( CollectionDB::instance()->escapeString( album ) ) );
+ .tqarg( CollectionDB::instance()->escapeString( album ) ) );
if ( !values.isEmpty() )
CollectionDB::instance()->fetchCover( this, values[0], album, false, static_cast(item) );
@@ -1761,7 +1761,7 @@ CollectionView::organizeFiles( const KURL::List &urls, const TQString &caption,
else
{
m_organizeURLs += Amarok::recursiveUrlExpand( urls );
- Amarok::StatusBar::instance()->incrementProgressTotalSteps( this, urls.count() );
+ Amarok::StatusBar::instance()->incrementProgressTotalSteps( TQT_TQOBJECT(this), urls.count() );
return;
}
}
@@ -1774,7 +1774,7 @@ CollectionView::organizeFiles( const KURL::List &urls, const TQString &caption,
return;
}
- OrganizeCollectionDialogBase base( m_parent, "OrganizeFiles", true, caption,
+ OrganizeCollectionDialogBase base( m_tqparent, "OrganizeFiles", true, caption,
KDialogBase::Ok|KDialogBase::Cancel|KDialogBase::Details );
TQVBox* page = base.makeVBoxMainWidget();
@@ -1833,9 +1833,9 @@ CollectionView::organizeFiles( const KURL::List &urls, const TQString &caption,
m_organizeURLs = Amarok::recursiveUrlExpand( urls );
m_organizeCopyMode = copy;
CollectionDB::instance()->createTables( true ); // create temp tables
- Amarok::StatusBar::instance()->newProgressOperation( this )
+ Amarok::StatusBar::instance()->newProgressOperation( TQT_TQOBJECT(this) )
.setDescription( caption )
- .setAbortSlot( this, TQT_SLOT( cancelOrganizingFiles() ) )
+ .setAbortSlot( TQT_TQOBJECT(this), TQT_SLOT( cancelOrganizingFiles() ) )
.setTotalSteps( m_organizeURLs.count() );
while( !m_organizeURLs.empty() && !m_organizingFileCancelled )
@@ -1848,7 +1848,7 @@ CollectionView::organizeFiles( const KURL::List &urls, const TQString &caption,
}
m_organizeURLs.pop_front();
- Amarok::StatusBar::instance()->incrementProgress( this );
+ Amarok::StatusBar::instance()->incrementProgress( TQT_TQOBJECT(this) );
if( m_organizingFileCancelled ) m_organizeURLs.clear();
}
@@ -1889,7 +1889,7 @@ CollectionView::organizeFiles( const KURL::List &urls, const TQString &caption,
m_dirty = true;
TQTimer::singleShot( 0, CollectionView::instance(), TQT_SLOT( renderView() ) );
- Amarok::StatusBar::instance()->endProgressOperation( this );
+ Amarok::StatusBar::instance()->endProgressOperation( TQT_TQOBJECT(this) );
}
}
@@ -1979,7 +1979,7 @@ CollectionView::safeClear()
TQListViewItem *n;
itemCoverMapMutex->lock();
while( c ) {
- if( itemCoverMap->contains( c ) )
+ if( itemCoverMap->tqcontains( c ) )
itemCoverMap->erase( c );
n = c->nextSibling();
delete c;
@@ -2069,13 +2069,13 @@ CollectionView::updateColumnHeader()
}
}
- setColumnAlignment( Track, Qt::AlignCenter );
- setColumnAlignment( DiscNumber, Qt::AlignCenter );
- setColumnAlignment( Length, Qt::AlignRight );
- setColumnAlignment( Bitrate, Qt::AlignCenter );
- setColumnAlignment( Score, Qt::AlignCenter );
- setColumnAlignment( Playcount, Qt::AlignCenter );
- setColumnAlignment( BPM, Qt::AlignRight );
+ setColumnAlignment( Track, TQt::AlignCenter );
+ setColumnAlignment( DiscNumber, TQt::AlignCenter );
+ setColumnAlignment( Length, TQt::AlignRight );
+ setColumnAlignment( Bitrate, TQt::AlignCenter );
+ setColumnAlignment( Score, TQt::AlignCenter );
+ setColumnAlignment( Playcount, TQt::AlignCenter );
+ setColumnAlignment( BPM, TQt::AlignRight );
//TQListView allows invisible columns to be resized, so we disable resizing for them
for ( int i = 0; i < columns(); ++i ) {
@@ -2142,12 +2142,12 @@ CollectionView::updateColumnHeader()
TQResizeEvent rev( size(), TQSize() );
viewportResizeEvent( &rev );
- m_parent->m_categoryMenu->setItemChecked( IdArtist, m_cat1 == IdArtist && m_cat2 == IdNone );
- m_parent->m_categoryMenu->setItemChecked( IdAlbum, m_cat1 == IdAlbum && m_cat2 == IdNone );
- m_parent->m_categoryMenu->setItemChecked( IdArtistAlbum, m_cat1 == IdArtist && m_cat2 == IdAlbum && m_cat3 == IdNone );
- m_parent->m_categoryMenu->setItemChecked( IdArtistVisYearAlbum, m_cat1 == IdArtist && m_cat2 == IdVisYearAlbum && m_cat3 == IdNone );
- m_parent->m_categoryMenu->setItemChecked( IdGenreArtist, m_cat1 == IdGenre && m_cat2 == IdArtist && m_cat3 == IdNone );
- m_parent->m_categoryMenu->setItemChecked( IdGenreArtistAlbum, m_cat1 == IdGenre && m_cat2 == IdArtist && m_cat3 == IdAlbum );
+ m_tqparent->m_categoryMenu->setItemChecked( IdArtist, m_cat1 == IdArtist && m_cat2 == IdNone );
+ m_tqparent->m_categoryMenu->setItemChecked( IdAlbum, m_cat1 == IdAlbum && m_cat2 == IdNone );
+ m_tqparent->m_categoryMenu->setItemChecked( IdArtistAlbum, m_cat1 == IdArtist && m_cat2 == IdAlbum && m_cat3 == IdNone );
+ m_tqparent->m_categoryMenu->setItemChecked( IdArtistVisYearAlbum, m_cat1 == IdArtist && m_cat2 == IdVisYearAlbum && m_cat3 == IdNone );
+ m_tqparent->m_categoryMenu->setItemChecked( IdGenreArtist, m_cat1 == IdGenre && m_cat2 == IdArtist && m_cat3 == IdNone );
+ m_tqparent->m_categoryMenu->setItemChecked( IdGenreArtistAlbum, m_cat1 == IdGenre && m_cat2 == IdArtist && m_cat3 == IdAlbum );
}
@@ -2162,7 +2162,7 @@ CollectionView::startDrag()
d->dragCopy();
}
-QString
+TQString
CollectionView::getTrueItemText( int cat, TQListViewItem* item ) const
{
//Work out the true name of the album ( where Unknown is "" ) , and the
@@ -2175,9 +2175,9 @@ CollectionView::getTrueItemText( int cat, TQListViewItem* item ) const
if ( dynamic_cast( item ) )
{
CollectionItem* collectItem = static_cast( item );
- trueItemText = collectItem->getSQLText( 0 );
+ trueItemText = collectItem->getSTQLText( 0 );
if ( cat == IdVisYearAlbum && !collectItem->isUnknown() )
- trueItemText = trueItemText.right( trueItemText.length() - trueItemText.find( i18n( " - " ) ) - i18n( " - " ).length() );
+ trueItemText = trueItemText.right( trueItemText.length() - trueItemText.tqfind( i18n( " - " ) ) - i18n( " - " ).length() );
}
else
{
@@ -2187,7 +2187,7 @@ CollectionView::getTrueItemText( int cat, TQListViewItem* item ) const
return trueItemText;
}
-QStringList
+TQStringList
CollectionView::listSelectedSiblingsOf( int cat, TQListViewItem* item )
{
// notice that using the nextSibling()-axis does not work in this case as this
@@ -2219,8 +2219,8 @@ CollectionView::listSelectedSiblingsOf( int cat, TQListViewItem* item )
KURL::List
CollectionView::listSelected()
{
- //Here we determine the URLs of all selected items. We use two passes, one for the parent items,
- //and another one for the children.
+ //Here we determine the URLs of all selected items. We use two passes, one for the tqparent items,
+ //and another one for the tqchildren.
KURL::List list;
TQListViewItem* item;
@@ -2266,7 +2266,7 @@ CollectionView::listSelected()
// The iPod selection code is written to resemble the tree mode
// selection logic, as well as what happens on an actual iPod. If
// we're in track mode, just return the list of tracks selected.
- // Otherwise select all children of all currently selected items,
+ // Otherwise select all tqchildren of all currently selected items,
// sorting first by m_cat1, then m_cat2, then m_cat3. Sort by
// track first if one of the categories is Id(VisYear)Album.
// There is a difficulty with compilation albums -- if we're
@@ -2335,7 +2335,7 @@ CollectionView::listSelected()
buildIpodQuery( qb, trackDepth(), filters, filterYear, true, true );
if ( translateTimeFilter( timeFilter() ) > 0 )
- qb.addFilter( QueryBuilder::tabSong, QueryBuilder::valCreateDate, TQString().setNum( TQDateTime::currentDateTime().toTime_t() - translateTimeFilter( timeFilter() ) ), QueryBuilder::modeGreater );
+ qb.addFilter( QueryBuilder::tabSong, QueryBuilder::valCreateDate, TQString().setNum( TQDateTime::tqcurrentDateTime().toTime_t() - translateTimeFilter( timeFilter() ) ), QueryBuilder::modeGreater );
qb.setOptions( QueryBuilder::optOnlyCompilations );
qb.setGoogleFilter( tables | QueryBuilder::tabSong, m_filter );
@@ -2350,7 +2350,7 @@ CollectionView::listSelected()
buildIpodQuery( qb, trackDepth(), filters, filterYear, true, false );
if ( translateTimeFilter( timeFilter() ) > 0 )
- qb.addFilter( QueryBuilder::tabSong, QueryBuilder::valCreateDate, TQString().setNum( TQDateTime::currentDateTime().toTime_t() - translateTimeFilter( timeFilter() ) ), QueryBuilder::modeGreater );
+ qb.addFilter( QueryBuilder::tabSong, QueryBuilder::valCreateDate, TQString().setNum( TQDateTime::tqcurrentDateTime().toTime_t() - translateTimeFilter( timeFilter() ) ), QueryBuilder::modeGreater );
if( sortByTrackFirst )
qb.setOptions( QueryBuilder::optNoCompilations );
@@ -2378,18 +2378,18 @@ CollectionView::listSelected()
}
- //first pass: parents
+ //first pass: tqparents
for ( item = firstChild(); item; item = item->nextSibling() )
if ( item->isSelected() )
{
const bool sampler = static_cast( item )->isSampler();
qb.clear();
if ( translateTimeFilter( timeFilter() ) > 0 )
- qb.addFilter( QueryBuilder::tabSong, QueryBuilder::valCreateDate, TQString().setNum( TQDateTime::currentDateTime().toTime_t() - translateTimeFilter( timeFilter() ) ), QueryBuilder::modeGreater );
+ qb.addFilter( QueryBuilder::tabSong, QueryBuilder::valCreateDate, TQString().setNum( TQDateTime::tqcurrentDateTime().toTime_t() - translateTimeFilter( timeFilter() ) ), QueryBuilder::modeGreater );
qb.addReturnValue( QueryBuilder::tabSong, QueryBuilder::valURL );
- tmptext = static_cast( item )->getSQLText( 0 );
+ tmptext = static_cast( item )->getSTQLText( 0 );
unknownText = tmptext.isEmpty();
if ( !sampler )
@@ -2399,7 +2399,7 @@ CollectionView::listSelected()
if( VisYearAlbum == 1 )
{
tmptext = item->text( 0 );
- TQString year = tmptext.left( tmptext.find( i18n(" - ") ) );
+ TQString year = tmptext.left( tmptext.tqfind( i18n(" - ") ) );
yearAlbumCalc( year, tmptext );
qb.addMatch( QueryBuilder::tabYear, year, false, true );
if ( unknownText )
@@ -2450,18 +2450,18 @@ CollectionView::listSelected()
{
for ( item = firstChild(); item; item = item->nextSibling() )
for ( TQListViewItem* child = item->firstChild(); child; child = child->nextSibling() )
- if ( child->isSelected() && !child->parent()->isSelected() )
+ if ( child->isSelected() && !child->tqparent()->isSelected() )
list << static_cast( child ) ->url();
}
else {
for ( item = firstChild(); item; item = item->nextSibling() )
for ( TQListViewItem* child = item->firstChild(); child; child = child->nextSibling() )
- if ( child->isSelected() && !child->parent()->isSelected() )
+ if ( child->isSelected() && !child->tqparent()->isSelected() )
{
const bool sampler = static_cast( item )->isSampler();
qb.clear();
if ( translateTimeFilter( timeFilter() ) > 0 )
- qb.addFilter( QueryBuilder::tabSong, QueryBuilder::valCreateDate, TQString().setNum( TQDateTime::currentDateTime().toTime_t() - translateTimeFilter( timeFilter() ) ), QueryBuilder::modeGreater );
+ qb.addFilter( QueryBuilder::tabSong, QueryBuilder::valCreateDate, TQString().setNum( TQDateTime::tqcurrentDateTime().toTime_t() - translateTimeFilter( timeFilter() ) ), QueryBuilder::modeGreater );
qb.addReturnValue( QueryBuilder::tabSong, QueryBuilder::valURL );
@@ -2470,13 +2470,13 @@ CollectionView::listSelected()
if ( q_cat1 == IdArtist )
qb.setOptions( QueryBuilder::optNoCompilations );
- tmptext = static_cast( item )->getSQLText( 0 );
+ tmptext = static_cast( item )->getSTQLText( 0 );
unknownText = tmptext.isEmpty();
if( VisYearAlbum == 1 )
{
tmptext = item->text( 0 );
- TQString year = tmptext.left( tmptext.find( i18n(" - ") ) );
+ TQString year = tmptext.left( tmptext.tqfind( i18n(" - ") ) );
yearAlbumCalc( year, tmptext );
qb.addMatch( QueryBuilder::tabYear, year, false, true );
if ( unknownText )
@@ -2489,13 +2489,13 @@ CollectionView::listSelected()
qb.setOptions( QueryBuilder::optOnlyCompilations );
- tmptext = static_cast( child )->getSQLText( 0 );
+ tmptext = static_cast( child )->getSTQLText( 0 );
unknownText = tmptext.isEmpty();
if( VisYearAlbum == 2 )
{
tmptext = child->text( 0 );
- TQString year = tmptext.left( tmptext.find( i18n(" - ") ) );
+ TQString year = tmptext.left( tmptext.tqfind( i18n(" - ") ) );
yearAlbumCalc( year, tmptext );
qb.addMatch( QueryBuilder::tabYear, year, false, true );
if ( unknownText )
@@ -2543,7 +2543,7 @@ CollectionView::listSelected()
for ( item = firstChild(); item; item = item->nextSibling() )
for ( TQListViewItem* child = item->firstChild(); child; child = child->nextSibling() )
for ( TQListViewItem* grandChild = child->firstChild(); grandChild; grandChild = grandChild->nextSibling() )
- if ( grandChild->isSelected() && !grandChild->isExpandable() && !child->parent()->isSelected() && !child->isSelected() )
+ if ( grandChild->isSelected() && !grandChild->isExpandable() && !child->tqparent()->isSelected() && !child->isSelected() )
list << static_cast( grandChild ) ->url();
//category 3
@@ -2553,19 +2553,19 @@ CollectionView::listSelected()
for ( TQListViewItem* child = item->firstChild(); child; child = child->nextSibling() )
for ( TQListViewItem* grandChild = child->firstChild(); grandChild; grandChild = grandChild->nextSibling() )
for ( TQListViewItem* grandChild2 = grandChild->firstChild(); grandChild2; grandChild2 = grandChild2->nextSibling() )
- if ( grandChild2->isSelected() && !child->parent()->isSelected() && !child->isSelected() && !grandChild->isSelected() )
+ if ( grandChild2->isSelected() && !child->tqparent()->isSelected() && !child->isSelected() && !grandChild->isSelected() )
list << static_cast( grandChild2 ) ->url();
}
else {
for ( item = firstChild(); item; item = item->nextSibling() )
for ( TQListViewItem* child = item->firstChild(); child; child = child->nextSibling() )
for ( TQListViewItem* grandChild = child->firstChild(); grandChild; grandChild = grandChild->nextSibling() )
- if ( grandChild->isSelected() && !grandChild->parent()->isSelected() )
+ if ( grandChild->isSelected() && !grandChild->tqparent()->isSelected() )
{
const bool sampler = static_cast( item )->isSampler();
qb.clear();
if ( translateTimeFilter( timeFilter() ) > 0 )
- qb.addFilter( QueryBuilder::tabSong, QueryBuilder::valCreateDate, TQString().setNum( TQDateTime::currentDateTime().toTime_t() - translateTimeFilter( timeFilter() ) ), QueryBuilder::modeGreater );
+ qb.addFilter( QueryBuilder::tabSong, QueryBuilder::valCreateDate, TQString().setNum( TQDateTime::tqcurrentDateTime().toTime_t() - translateTimeFilter( timeFilter() ) ), QueryBuilder::modeGreater );
qb.addReturnValue( QueryBuilder::tabSong, QueryBuilder::valURL );
@@ -2574,13 +2574,13 @@ CollectionView::listSelected()
if ( q_cat1 == IdArtist )
qb.setOptions( QueryBuilder::optNoCompilations );
- tmptext = static_cast( item )->getSQLText( 0 );
+ tmptext = static_cast( item )->getSTQLText( 0 );
unknownText = tmptext.isEmpty();
if( VisYearAlbum == 1 )
{
tmptext = item->text( 0 );
- TQString year = tmptext.left( tmptext.find( i18n(" - ") ) );
+ TQString year = tmptext.left( tmptext.tqfind( i18n(" - ") ) );
yearAlbumCalc( year, tmptext );
qb.addMatch( QueryBuilder::tabYear, year, false, true );
if ( unknownText )
@@ -2592,13 +2592,13 @@ CollectionView::listSelected()
else
qb.setOptions( QueryBuilder::optOnlyCompilations );
- tmptext = static_cast( child )->getSQLText( 0 );
+ tmptext = static_cast( child )->getSTQLText( 0 );
unknownText = tmptext.isEmpty();
if( VisYearAlbum == 2 )
{
tmptext = child->text( 0 );
- TQString year = tmptext.left( tmptext.find( i18n(" - ") ) );
+ TQString year = tmptext.left( tmptext.tqfind( i18n(" - ") ) );
yearAlbumCalc( year, tmptext );
qb.addMatch( QueryBuilder::tabYear, year, false, true );
if ( unknownText )
@@ -2607,13 +2607,13 @@ CollectionView::listSelected()
qb.addMatch( q_cat2, tmptext, false, true );
- tmptext = static_cast( grandChild )->getSQLText( 0 );
+ tmptext = static_cast( grandChild )->getSTQLText( 0 );
unknownText = tmptext.isEmpty();
if( VisYearAlbum == 3 )
{
tmptext = grandChild->text( 0 );
- TQString year = tmptext.left( tmptext.find( i18n(" - ") ) );
+ TQString year = tmptext.left( tmptext.tqfind( i18n(" - ") ) );
yearAlbumCalc( year, tmptext );
qb.addMatch( QueryBuilder::tabYear, year, false, true );
if ( unknownText )
@@ -2661,7 +2661,7 @@ CollectionView::listSelected()
for ( TQListViewItem* child = item->firstChild(); child; child = child->nextSibling() )
for ( TQListViewItem* grandChild = child->firstChild(); grandChild; grandChild = grandChild->nextSibling() )
for ( TQListViewItem* grandChild2 = grandChild->firstChild(); grandChild2; grandChild2 = grandChild2->nextSibling() )
- if ( grandChild2->isSelected() && !child->parent()->isSelected() && !child->isSelected() && !grandChild->isSelected() )
+ if ( grandChild2->isSelected() && !child->tqparent()->isSelected() && !child->isSelected() && !grandChild->isSelected() )
list << static_cast( grandChild2 ) ->url();
return list;
@@ -2693,7 +2693,7 @@ CollectionView::playlistFromURLs( const KURL::List &urls )
KURL rpath;
MountPointManager::instance()->getRelativePath( deviceid, *it, rpath );
const TQString query = TQString("SELECT title, length FROM tags WHERE url = '%1' AND deviceid = %2;")
- .arg( db->escapeString( rpath.path() ) ).arg( deviceid );
+ .tqarg( db->escapeString( rpath.path() ) ).tqarg( deviceid );
debug() << "media id: " << deviceid << " rpath: " << rpath.path() << endl;
TQStringList result = db->query( query );
titles << result[0];
@@ -2704,7 +2704,7 @@ CollectionView::playlistFromURLs( const KURL::List &urls )
PlaylistWindow::self()->showBrowser( "PlaylistBrowser" );
}
-QPixmap
+TQPixmap
CollectionView::iconForCategory( const int cat ) const
{
TQString icon;
@@ -2739,7 +2739,7 @@ CollectionView::iconForCategory( const int cat ) const
return KGlobal::iconLoader()->loadIcon( icon, KIcon::Toolbar, KIcon::SizeSmall );
}
-QString
+TQString
CollectionView::captionForCategory( const int cat ) const
{
switch( cat )
@@ -2773,7 +2773,7 @@ CollectionView::captionForCategory( const int cat ) const
}
-QString
+TQString
CollectionView::captionForTag( const Tag tag) const
{
TQString caption;
@@ -2894,7 +2894,7 @@ CollectionView::captionForTag( const Tag tag) const
// Returns the text for the "All" filter option for the given category
// and the number of items in that category.
-QString
+TQString
CollectionView::allForCategory( const int cat, const int num ) const
{
switch( cat )
@@ -2957,7 +2957,7 @@ CollectionView::incrementDepth( bool rerender /*= true*/ )
return;
}
- m_parent->m_ipodDecrement->setEnabled( true );
+ m_tqparent->m_ipodDecrement->setEnabled( true );
// We're not in track mode
int catArr[3] = {m_cat1, m_cat2, m_cat3};
@@ -2969,8 +2969,8 @@ CollectionView::incrementDepth( bool rerender /*= true*/ )
m_ipodFilterYear.clear();
m_ipodSelected[m_currentDepth].clear();
- m_ipodCurrent[m_currentDepth] = TQString::null;
- m_ipodTopItem[m_currentDepth] = TQString::null;
+ m_ipodCurrent[m_currentDepth] = TQString();
+ m_ipodTopItem[m_currentDepth] = TQString();
// Save the current item
if( currentItem() )
@@ -3003,7 +3003,7 @@ CollectionView::incrementDepth( bool rerender /*= true*/ )
// selection, since All will then be reselected automatically
// in selectIpodItems()
m_ipodSelected[m_currentDepth].clear();
- m_ipodCurrent[m_currentDepth] = TQString::null;
+ m_ipodCurrent[m_currentDepth] = TQString();
break;
}
@@ -3011,7 +3011,7 @@ CollectionView::incrementDepth( bool rerender /*= true*/ )
if( cat == IdVisYearAlbum )
{
TQString tmptext = item->text( 0 );
- TQString year = tmptext.left( tmptext.find( i18n(" - ") ) );
+ TQString year = tmptext.left( tmptext.tqfind( i18n(" - ") ) );
yearAlbumCalc( year, tmptext );
if( !item->isUnknown() )
m_ipodFilters[m_currentDepth] << tmptext;
@@ -3021,7 +3021,7 @@ CollectionView::incrementDepth( bool rerender /*= true*/ )
}
else
- m_ipodFilters[m_currentDepth] << item->getSQLText( 0 );
+ m_ipodFilters[m_currentDepth] << item->getSTQLText( 0 );
// Save the selection
m_ipodSelected[m_currentDepth] << item->text( 0 );
@@ -3051,7 +3051,7 @@ CollectionView::decrementDepth ( bool rerender /*= true*/ )
return;
m_currentDepth--;
- m_parent->m_ipodDecrement->setEnabled( m_currentDepth > 0 );
+ m_tqparent->m_ipodDecrement->setEnabled( m_currentDepth > 0 );
m_ipodFilters[m_currentDepth].clear();
int catArr[3] = {m_cat1, m_cat2, m_cat3};
int cat = catArr[m_currentDepth];
@@ -3062,8 +3062,8 @@ CollectionView::decrementDepth ( bool rerender /*= true*/ )
for( int i = m_currentDepth + 1; i < 3; ++i )
{
m_ipodSelected[i].clear();
- m_ipodCurrent[i] = TQString::null;
- m_ipodTopItem[i] = TQString::null;
+ m_ipodCurrent[i] = TQString();
+ m_ipodTopItem[i] = TQString();
}
if( rerender )
@@ -3086,7 +3086,7 @@ CollectionView::resetIpodDepth ( void )
m_ipodFilters[1].clear();
m_ipodFilters[2].clear();
m_ipodIncremented = 1;
- m_parent->m_ipodDecrement->setEnabled( false );
+ m_tqparent->m_ipodDecrement->setEnabled( false );
}
@@ -3189,7 +3189,7 @@ CollectionView::buildIpodQuery ( QueryBuilder &qb, int depth, TQStringList filte
qb.sortBy( q_cat, QueryBuilder::valName );
// ensure we don't get empty genres/albums/etc due to tag changes
- qb.addFilter( QueryBuilder::tabSong, TQString::null );
+ qb.addFilter( QueryBuilder::tabSong, TQString() );
}
@@ -3256,7 +3256,7 @@ CollectionView::selectIpodItems ( void )
TQStringList::iterator it = m_ipodSelected[m_currentDepth].begin();
while( it != m_ipodSelected[m_currentDepth].end() )
{
- TQListViewItem *item = findItem( *it, 0 );
+ TQListViewItem *item = tqfindItem( *it, 0 );
++it;
if( !item )
@@ -3281,7 +3281,7 @@ CollectionView::selectIpodItems ( void )
!m_ipodTopItem[m_currentDepth].isNull() )
{
//scroll to previous viewport top item
- TQListViewItem* item = findItem( m_ipodTopItem[m_currentDepth], 0 );
+ TQListViewItem* item = tqfindItem( m_ipodTopItem[m_currentDepth], 0 );
if ( item )
setContentsPos( 0, itemPos( item ) );
}
@@ -3289,7 +3289,7 @@ CollectionView::selectIpodItems ( void )
if( !m_ipodCurrent[m_currentDepth].isEmpty() &&
!m_ipodCurrent[m_currentDepth].isNull() )
{
- TQListViewItem *item = findItem( m_ipodCurrent[m_currentDepth], 0);
+ TQListViewItem *item = tqfindItem( m_ipodCurrent[m_currentDepth], 0);
if( item )
setCurrentItem( item );
}
@@ -3327,13 +3327,13 @@ CollectionView::selectIpodItems ( void )
// Convenience methods for returning the correct (small version of)
// the browse forward / backward buttons
-QPixmap
+TQPixmap
CollectionView::ipodIncrementIcon ( void )
{
return SmallIcon( Amarok::icon( "fastforward" ) );
}
-QPixmap
+TQPixmap
CollectionView::ipodDecrementIcon ( void )
{
return SmallIcon( Amarok::icon( "rewind" ) );
@@ -3384,7 +3384,7 @@ CollectionView::cacheView()
if ( item->isOpen() ) {
//construct path to item
TQStringList itemPath;
- for( const TQListViewItem *i = item; i; i = i->parent() )
+ for( const TQListViewItem *i = item; i; i = i->tqparent() )
itemPath.prepend( i->text( 0 ) );
m_cacheOpenItemPaths.append ( itemPath );
@@ -3405,7 +3405,7 @@ CollectionView::restoreView()
if ( m_viewMode == modeTreeView ) {
TQValueList::const_iterator it;
for ( it = m_cacheOpenItemPaths.begin(); it != m_cacheOpenItemPaths.end(); ++it ) {
- TQListViewItem* item = findItem( (*it)[0], 0 );
+ TQListViewItem* item = tqfindItem( (*it)[0], 0 );
if ( item )
item->setOpen ( true );
@@ -3441,11 +3441,11 @@ CollectionView::restoreView()
m_cacheCurrentItem = TQStringList();
}
-QStringList
+TQStringList
CollectionView::makeStructuredNameList( TQListViewItem *item ) const
{
TQStringList nameList;
- for ( TQListViewItem *current = item; current; current = current->parent() )
+ for ( TQListViewItem *current = item; current; current = current->tqparent() )
nameList.push_front( current->text( 0 ) );
return nameList;
}
@@ -3483,7 +3483,7 @@ CollectionView::manipulateThe( TQString &str, bool reverse )
if( reverse )
{
TQString begin = str.left( 3 );
- str = str.append( ", %1" ).arg( begin );
+ str = TQString(str.append( ", %1" )).tqarg( begin );
str = str.mid( 4 );
return;
}
@@ -3492,7 +3492,7 @@ CollectionView::manipulateThe( TQString &str, bool reverse )
return;
TQString end = str.right( 3 );
- str = str.prepend( "%1 " ).arg( end );
+ str = TQString(str.prepend( "%1 " )).tqarg( end );
uint newLen = str.length() - end.length() - 2;
@@ -3502,7 +3502,7 @@ CollectionView::manipulateThe( TQString &str, bool reverse )
bool
CollectionView::endsInThe( const TQString & text )
{
- return text.endsWith( ", the", false );
+ return text.tqendsWith( ", the", false );
}
// avoid code duplication
@@ -3513,7 +3513,7 @@ CollectionView::yearAlbumCalc( TQString &year, TQString &text )
year = "";
text = text.right( text.length() -
- text.find( i18n(" - ") ) -
+ text.tqfind( i18n(" - ") ) -
i18n(" - ").length() );
}
@@ -3539,9 +3539,9 @@ CollectionView::viewportPaintEvent( TQPaintEvent *e )
const uint w = t.width() + 20;
const uint h = t.height() + 20;
- p.setBrush( colorGroup().background() );
+ p.setBrush( tqcolorGroup().background() );
p.drawRoundRect( 15, 15, w, h, (8*200)/w, (8*200)/h );
- t.draw( &p, 20, 20, TQRect(), colorGroup() );
+ t.draw( &p, 20, 20, TQRect(), tqcolorGroup() );
}
}
@@ -3621,9 +3621,9 @@ CollectionView::viewportResizeEvent( TQResizeEvent* e)
bool
CollectionView::eventFilter( TQObject* o, TQEvent* e )
{
- if( o == header()
+ if( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(header())
&& e->type() == TQEvent::MouseButtonPress
- && static_cast( e )->button() == Qt::RightButton
+ && TQT_TQMOUSEEVENT( e )->button() == Qt::RightButton
&& m_viewMode == modeFlatView )
{
KPopupMenu popup;
@@ -3641,7 +3641,7 @@ CollectionView::eventFilter( TQObject* o, TQEvent* e )
popup.setItemVisible( Score, AmarokConfig::useScores() );
popup.setItemVisible( Rating, AmarokConfig::useRatings() );
- const int returnID = popup.exec( static_cast(e)->globalPos() );
+ const int returnID = popup.exec( TQT_TQMOUSEEVENT(e)->globalPos() );
if ( returnID != -1 )
{
@@ -3710,10 +3710,10 @@ CollectionView::renderFlatModeView( bool /*=false*/ )
QueryBuilder qb;
if ( translateTimeFilter( timeFilter() ) > 0 )
- qb.addFilter( QueryBuilder::tabSong, QueryBuilder::valCreateDate, TQString().setNum( TQDateTime::currentDateTime().toTime_t() - translateTimeFilter( timeFilter() ) ), QueryBuilder::modeGreater );
+ qb.addFilter( QueryBuilder::tabSong, QueryBuilder::valCreateDate, TQString().setNum( TQDateTime::tqcurrentDateTime().toTime_t() - translateTimeFilter( timeFilter() ) ), QueryBuilder::modeGreater );
if ( translateTimeFilter( timeFilter() ) <= 0
- && (m_filter.length() < 3 || (!m_filter.contains( " " ) && m_filter.endsWith( ":" ) ) ) )
+ && (m_filter.length() < 3 || (!m_filter.tqcontains( " " ) && m_filter.endsWith( ":" ) ) ) )
{
// Redraw bubble help
triggerUpdate();
@@ -3820,7 +3820,7 @@ CollectionView::renderFlatModeView( bool /*=false*/ )
//we leftjoin the query so it can return mysql NULL cells, i.e. for score and playcount
//this is an ugly hack - should be integrated in querybuilder itself instead.
TQString leftQuery = qb.query();
- leftQuery.replace( "INNER JOIN", "LEFT JOIN" );
+ leftQuery.tqreplace( "INNER JOIN", "LEFT JOIN" );
values = CollectionDB::instance()->query( leftQuery );
//construct items
@@ -3883,7 +3883,7 @@ CollectionView::renderTreeModeView( bool /*=false*/ )
QueryBuilder qb;
if ( translateTimeFilter( timeFilter() ) > 0 )
- qb.addFilter( QueryBuilder::tabSong, QueryBuilder::valCreateDate, TQString().setNum( TQDateTime::currentDateTime().toTime_t() - translateTimeFilter( timeFilter() ) ), QueryBuilder::modeGreater );
+ qb.addFilter( QueryBuilder::tabSong, QueryBuilder::valCreateDate, TQString().setNum( TQDateTime::tqcurrentDateTime().toTime_t() - translateTimeFilter( timeFilter() ) ), QueryBuilder::modeGreater );
setSorting( 0 );
int VisYearAlbum = -1;
@@ -3941,7 +3941,7 @@ CollectionView::renderTreeModeView( bool /*=false*/ )
qb.setOptions( QueryBuilder::optNoCompilations );
// ensure we don't get empty genres/albums/etc due to tag changes
- qb.addFilter( QueryBuilder::tabSong, TQString::null );
+ qb.addFilter( QueryBuilder::tabSong, TQString() );
values = qb.run();
@@ -3985,7 +3985,7 @@ CollectionView::renderTreeModeView( bool /*=false*/ )
//Dividers for "The Who" should be created as "W", not "T", because
//that's how we sort it
TQString actualStr = *it;
- if ( m_cat1 == IdArtist && actualStr.startsWith( "the ", false ) )
+ if ( m_cat1 == IdArtist && actualStr.tqstartsWith( "the ", false ) )
manipulateThe( actualStr, true );
TQString headerStr = DividerItem::createGroup( actualStr, m_cat1);
@@ -4020,7 +4020,7 @@ CollectionView::renderTreeModeView( bool /*=false*/ )
qb.clear();
if ( translateTimeFilter( timeFilter() ) > 0 )
qb.addFilter( QueryBuilder::tabSong, QueryBuilder::valCreateDate,
- TQString().setNum( TQDateTime::currentDateTime().toTime_t() -
+ TQString().setNum( TQDateTime::tqcurrentDateTime().toTime_t() -
translateTimeFilter( timeFilter() ) ), QueryBuilder::modeGreater );
qb.addReturnValue( q_cat1, QueryBuilder::valName, true );
@@ -4061,7 +4061,7 @@ CollectionView::renderTreeModeView( bool /*=false*/ )
continue;
couldOpen.push_back( top );
}
- //Expand suggested items and expand or enqueue their children until we run out of
+ //Expand suggested items and expand or enqueue their tqchildren until we run out of
//rows or have expanded everything
for ( TQValueList::iterator it = couldOpen.begin(); it != couldOpen.end() && totalCount < maxRows; ++it )
{
@@ -4080,7 +4080,7 @@ CollectionView::renderTreeModeView( bool /*=false*/ )
}
else
{
- //Prioritize expanding its children - add it immediately next
+ //Prioritize expanding its tqchildren - add it immediately next
TQValueList::iterator next = it;
++next;
couldOpen.insert( next, j );
@@ -4131,9 +4131,9 @@ CollectionView::removeDuplicatedHeaders()
{
if ( empty )
{
- if ( !current->text(0).at(0).isLetterOrNumber()
- || ( last->text(0).at(0).isLetterOrNumber()
- && current->text(0).at(0).unicode() > last->text(0).at(0).unicode() ) )
+ if ( !current->text(0).tqat(0).isLetterOrNumber()
+ || ( last->text(0).tqat(0).isLetterOrNumber()
+ && current->text(0).tqat(0).tqunicode() > last->text(0).tqat(0).tqunicode() ) )
toDelete += current;
else
{
@@ -4174,7 +4174,7 @@ CollectionView::renderIpodModeView( bool /*=false*/ )
QueryBuilder qb;
if ( translateTimeFilter( timeFilter() ) > 0 )
- qb.addFilter( QueryBuilder::tabSong, QueryBuilder::valCreateDate, TQString().setNum( TQDateTime::currentDateTime().toTime_t() - translateTimeFilter( timeFilter() ) ), QueryBuilder::modeGreater );
+ qb.addFilter( QueryBuilder::tabSong, QueryBuilder::valCreateDate, TQString().setNum( TQDateTime::tqcurrentDateTime().toTime_t() - translateTimeFilter( timeFilter() ) ), QueryBuilder::modeGreater );
int catArr[3] = {m_cat1, m_cat2, m_cat3};
// stillFiltering is true when we're not viewing tracks
@@ -4300,7 +4300,7 @@ CollectionView::renderIpodModeView( bool /*=false*/ )
//because that's how we sort it
TQString actualStr = item->text( 0 );
if ( m_cat == IdArtist &&
- actualStr.startsWith( "the ", false ) )
+ actualStr.tqstartsWith( "the ", false ) )
manipulateThe( actualStr, true );
TQString headerStr = DividerItem::createGroup( actualStr, m_cat );
@@ -4366,7 +4366,7 @@ CollectionItem::paintCell ( TQPainter * painter, const TQColorGroup & cg,
TQPixmap buf( width, height() );
TQPainter p( &buf, true );
- const TQColorGroup _cg = listView()->palette().active();
+ const TQColorGroup _cg = listView()->tqpalette().active();
TQColor bg = isSelected() ? _cg.highlight()
: isAlternate() ? listView()->alternateBackground()
@@ -4378,7 +4378,7 @@ CollectionItem::paintCell ( TQPainter * painter, const TQColorGroup & cg,
Copyright (C) 2000 Reginald Stadlbauer
Copyright (C) 2000,2003 Charles Samuels
Copyright (C) 2000 Peter Putzer */
- if ( bg == Qt::black )
+ if ( bg == TQt::black )
bg = TQColor(55, 55, 55); // dark gray
else
{
@@ -4491,8 +4491,8 @@ CollectionItem::compare( TQListViewItem* i, int col, bool ascending ) const
switch( m_cat ) {
case IdVisYearAlbum:
- a = a.left( a.find( i18n(" - ") ) );
- b = b.left( b.find( i18n(" - ") ) );
+ a = a.left( a.tqfind( i18n(" - ") ) );
+ b = b.left( b.tqfind( i18n(" - ") ) );
// "?" are the last ones
if ( a == "?" )
return 1;
@@ -4510,9 +4510,9 @@ CollectionItem::compare( TQListViewItem* i, int col, bool ascending ) const
return -1;
//For artists, we sort by ignoring "The" eg "The Who" sorts as if it were "Who"
case IdArtist:
- if ( a.startsWith( "the ", false ) )
+ if ( a.tqstartsWith( "the ", false ) )
CollectionView::manipulateThe( a, true );
- if ( b.startsWith( "the ", false ) )
+ if ( b.tqstartsWith( "the ", false ) )
CollectionView::manipulateThe( b, true );
break;
}
@@ -4538,8 +4538,8 @@ CollectionItem::sortChildItems ( int column, bool ascending ) {
//
// DividerItem
-DividerItem::DividerItem( TQListView* parent, TQString txt, int cat/*, bool sortYearsInverted*/)
-: KListViewItem( parent), m_blockText(false), m_text(txt), m_cat(cat)/*, m_sortYearsInverted(sortYearsInverted)*/
+DividerItem::DividerItem( TQListView* tqparent, TQString txt, int cat/*, bool sortYearsInverted*/)
+: KListViewItem( tqparent), m_blockText(false), m_text(txt), m_cat(cat)/*, m_sortYearsInverted(sortYearsInverted)*/
{
setExpandable(false);
setDropEnabled(false);
@@ -4572,7 +4572,7 @@ DividerItem::paintCell ( TQPainter * p, const TQColorGroup & cg,
}
//draw the baseline
- p->setPen( TQPen(Qt::gray, 2) );
+ p->setPen( TQPen(TQt::gray, 2) );
p->drawLine(0, height() -2 , width, height() -2 );
p->restore();
@@ -4586,7 +4586,7 @@ DividerItem::paintFocus ( TQPainter* /*p*/, const TQColorGroup& /*cg*/, const TQ
//to draw the text on my own I have to be able to block the text, otherwise I could
// not use TQListViewItem::paintCell() to draw the basic cell
-QString
+TQString
DividerItem::text(int column) const
{
if (column == 0) {
@@ -4622,13 +4622,13 @@ DividerItem::compare( TQListViewItem* i, int col, bool ascending ) const
return TQString::localeAwareCompare( text(col).lower(), i->text(col).lower() );
}
-QString
+TQString
DividerItem::createGroup(const TQString& src, int cat)
{
TQString ret;
switch (cat) {
case IdVisYearAlbum: {
- ret = src.left( src.find(" - ") );
+ ret = src.left( src.tqfind(" - ") );
break;
}
case IdYear: {
@@ -4675,8 +4675,8 @@ DividerItem::shareTheSameGroup(const TQString& itemStr, const TQString& divStr,
switch (cat) {
case IdVisYearAlbum: {
- TQString sa = itemStr.left( itemStr.find( i18n(" - ") ) );
- TQString sb = divStr.left( divStr.find( i18n(" - ") ) );
+ TQString sa = itemStr.left( itemStr.tqfind( i18n(" - ") ) );
+ TQString sb = divStr.left( divStr.tqfind( i18n(" - ") ) );
if (sa == sb) {
inGroup = true;
}
@@ -4698,7 +4698,7 @@ DividerItem::shareTheSameGroup(const TQString& itemStr, const TQString& divStr,
}
case IdArtist:
//"The Who" should count as being in "W" and not "T"
- if ( tmp.startsWith( "the ", false ) )
+ if ( tmp.tqstartsWith( "the ", false ) )
CollectionView::manipulateThe( tmp, true );
//Fall through
default:
@@ -4706,7 +4706,7 @@ DividerItem::shareTheSameGroup(const TQString& itemStr, const TQString& divStr,
if (divStr == "0-9" && TQChar(tmp.at(0)).isDigit()) {
inGroup = true;
}
- else if (tmp.startsWith(divStr, 0)) {
+ else if (tmp.tqstartsWith(divStr, 0)) {
inGroup = true;
}
}
diff --git a/amarok/src/collectionbrowser.h b/amarok/src/collectionbrowser.h
index f4325ba5..dd09facc 100644
--- a/amarok/src/collectionbrowser.h
+++ b/amarok/src/collectionbrowser.h
@@ -56,9 +56,10 @@ namespace CollectionBrowserIds
};
}
-class CollectionBrowser: public QVBox
+class CollectionBrowser: public TQVBox
{
Q_OBJECT
+ TQ_OBJECT
friend class CollectionView;
public:
@@ -79,7 +80,7 @@ class CollectionBrowser: public QVBox
void slotEditFilter();
private:
- void layoutToolbar();
+ void tqlayoutToolbar();
void ipodToolbar( bool activate );
void appendSearchResults();
@@ -123,7 +124,7 @@ public:
static bool shareTheSameGroup(const TQString& a, const TQString& b, int cat);
public:
- DividerItem( TQListView* parent, TQString txt, int cat);
+ DividerItem( TQListView* tqparent, TQString txt, int cat);
virtual void paintCell ( TQPainter * p, const TQColorGroup & cg, int column, int width, int align );
virtual void paintFocus ( TQPainter * p, const TQColorGroup & cg, const TQRect & r );
@@ -145,13 +146,13 @@ private:
class CollectionItem : public KListViewItem {
public:
- CollectionItem( TQListView* parent, int cat = 0, bool unknown = false, bool sampler=false )
- : KListViewItem( parent )
+ CollectionItem( TQListView* tqparent, int cat = 0, bool unknown = false, bool sampler=false )
+ : KListViewItem( tqparent )
, m_cat( cat )
, m_isUnknown( unknown )
, m_isSampler( sampler ) {};
- CollectionItem( TQListViewItem* parent, int cat = 0, bool unknown = false, bool sampler=false )
- : KListViewItem( parent )
+ CollectionItem( TQListViewItem* tqparent, int cat = 0, bool unknown = false, bool sampler=false )
+ : KListViewItem( tqparent )
, m_cat( cat )
, m_isUnknown( unknown )
, m_isSampler( sampler ) {};
@@ -160,7 +161,7 @@ class CollectionItem : public KListViewItem {
virtual void sortChildItems ( int column, bool ascending ); //reimplemented
- inline TQString getSQLText( int column )
+ inline TQString getSTQLText( int column )
{
return ( !column && m_isUnknown ) ? "" : text( column );
}
@@ -191,6 +192,7 @@ class CollectionItem : public KListViewItem {
class CollectionView : public KListView, public DropProxyTarget
{
Q_OBJECT
+ TQ_OBJECT
friend class CollectionBrowser;
public:
@@ -199,7 +201,7 @@ class CollectionView : public KListView, public DropProxyTarget
friend class CollectionItem; // for access to m_cat2
friend class ContextBrowser; // for setupDirs()
- CollectionView( CollectionBrowser* parent );
+ CollectionView( CollectionBrowser* tqparent );
~CollectionView();
LIBAMAROK_EXPORT static CollectionView* instance() { return m_instance; }
@@ -313,8 +315,8 @@ class CollectionView : public KListView, public DropProxyTarget
void cacheView();
void restoreView();
- //Used to store the name of an item (and its parents), so it can be recalled later
- //even if the pointer to the item has been invalidated.
+ //Used to store the name of an item (and its tqparents), so it can be recalled later
+ //even if the pointer to the item has been tqinvalidated.
TQStringList makeStructuredNameList( TQListViewItem* ) const;
TQListViewItem* findFromStructuredNameList( const TQStringList& ) const;
@@ -341,7 +343,7 @@ class CollectionView : public KListView, public DropProxyTarget
//attributes:
LIBAMAROK_EXPORT static CollectionView* m_instance;
- CollectionBrowser* m_parent;
+ CollectionBrowser* m_tqparent;
TQString m_filter;
uint m_timeFilter;
@@ -379,11 +381,12 @@ class CollectionView : public KListView, public DropProxyTarget
class OrganizeCollectionDialogBase : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- OrganizeCollectionDialogBase( TQWidget *parent=0, const char *name=0, bool modal=true,
- const TQString &caption=TQString::null,
+ OrganizeCollectionDialogBase( TQWidget *tqparent=0, const char *name=0, bool modal=true,
+ const TQString &caption=TQString(),
int buttonMask=Ok|Apply|Cancel )
- : KDialogBase( parent, name, modal, caption, buttonMask )
+ : KDialogBase( tqparent, name, modal, caption, buttonMask )
{
}
diff --git a/amarok/src/collectiondb.cpp b/amarok/src/collectiondb.cpp
index 1db531e7..5d1f6b8d 100644
--- a/amarok/src/collectiondb.cpp
+++ b/amarok/src/collectiondb.cpp
@@ -90,7 +90,7 @@
#include "inotify/inotify-syscalls.h"
#endif
-using Amarok::QStringx;
+using Amarok::TQStringx;
#define DEBUG 0
@@ -100,9 +100,9 @@ using Amarok::QStringx;
INotify* INotify::s_instance = 0;
-INotify::INotify( CollectionDB *parent, int fd )
- : DependentJob( parent, "INotify" )
- , m_parent( parent )
+INotify::INotify( CollectionDB *tqparent, int fd )
+ : DependentJob( tqparent, "INotify" )
+ , m_tqparent( tqparent )
, m_fd( fd )
{
s_instance = this;
@@ -144,8 +144,8 @@ INotify::doJob()
if ( !deviceIds.isEmpty() ) deviceIds += ',';
deviceIds += TQString::number(*it);
}
- const TQStringList values = m_parent->query( TQString( "SELECT dir, deviceid FROM directories WHERE deviceid IN (%1);" )
- .arg( deviceIds ) );
+ const TQStringList values = m_tqparent->query( TQString( "SELECT dir, deviceid FROM directories WHERE deviceid IN (%1);" )
+ .tqarg( deviceIds ) );
foreach( values )
{
TQString rpath = *it;
@@ -185,7 +185,7 @@ INotify::doJob()
i += EVENT_SIZE + event->len;
}
- TQTimer::singleShot( 0, m_parent, TQT_SLOT( scanMonitor() ) );
+ TQTimer::singleShot( 0, m_tqparent, TQT_SLOT( scanMonitor() ) );
}
}
}
@@ -203,7 +203,7 @@ INotify::doJob()
TQMutex* CollectionDB::connectionMutex = new TQMutex();
TQMutex* CollectionDB::itemCoverMapMutex = new TQMutex();
//we don't have to worry about this map leaking memory since ThreadManager limits the total
-//number of QThreads ever created
+//number of TQThreads ever created
TQMap *CollectionDB::threadConnections = new TQMap();
TQMap *CollectionDB::itemCoverMap = new TQMap();
@@ -258,7 +258,7 @@ CollectionDB::CollectionDB()
connect( this, TQT_SIGNAL(uniqueIdChanged(const TQString&, const TQString&, const TQString&)),
this, TQT_SLOT(aftMigratePermanentTablesUniqueId(const TQString&, const TQString&, const TQString&)) );
- connect( qApp, TQT_SIGNAL( aboutToQuit() ), this, TQT_SLOT( disableAutoScoring() ) );
+ connect( tqApp, TQT_SIGNAL( aboutToQuit() ), this, TQT_SLOT( disableAutoScoring() ) );
connect( this, TQT_SIGNAL( coverRemoved( const TQString&, const TQString& ) ),
TQT_SIGNAL( coverChanged( const TQString&, const TQString& ) ) );
@@ -286,7 +286,7 @@ CollectionDB::~CollectionDB()
}
-inline QString
+inline TQString
CollectionDB::exactCondition( const TQString &right )
{
if ( DbConnection::mysql == instance()->getDbConnectionType() )
@@ -296,11 +296,11 @@ CollectionDB::exactCondition( const TQString &right )
}
-QString
+TQString
CollectionDB::likeCondition( const TQString &right, bool anyBegin, bool anyEnd )
{
TQString escaped = right;
- escaped.replace( '/', "//" ).replace( '%', "/%" ).replace( '_', "/_" );
+ escaped.tqreplace( '/', "//" ).tqreplace( '%', "/%" ).tqreplace( '_', "/_" );
escaped = instance()->escapeString( escaped );
TQString ret;
@@ -343,7 +343,7 @@ CollectionDB::initDirOperations()
if ( inotify_fd < 0 )
#endif
{
-// debug() << "INotify not available, using QTimer!" << endl;
+// debug() << "INotify not available, using TQTimer!" << endl;
startTimer( MONITOR_INTERVAL * 1000 );
}
#ifdef HAVE_INOTIFY
@@ -362,7 +362,7 @@ CollectionDB::initDirOperations()
* @param statement SQL program to execute. Only one SQL statement is allowed.
* @return The queried data, or TQStringList() on error.
*/
-QStringList
+TQStringList
CollectionDB::query( const TQString& statement, bool suppressDebug )
{
m_mutex.lock();
@@ -424,7 +424,7 @@ CollectionDB::insert( const TQString& statement, const TQString& table )
return id;
}
-QString
+TQString
CollectionDB::deviceidSelection( const bool showAll )
{
if ( !showAll )
@@ -441,7 +441,7 @@ CollectionDB::deviceidSelection( const bool showAll )
else return "";
}
-QStringList
+TQStringList
CollectionDB::URLsFromQuery( const TQStringList &result ) const
{
TQStringList values;
@@ -505,11 +505,11 @@ CollectionDB::isValid( )
}
-QString
+TQString
CollectionDB::adminValue( TQString noption ) {
TQStringList values;
values = query (
- TQString( "SELECT value FROM admin WHERE noption = '%1';").arg(noption)
+ TQString( "SELECT value FROM admin WHERE noption = '%1';").tqarg(noption)
);
return values.isEmpty() ? "" : values.first();
}
@@ -518,14 +518,14 @@ CollectionDB::adminValue( TQString noption ) {
void
CollectionDB::setAdminValue( TQString noption, TQString value ) {
- TQStringList values = query( TQString( "SELECT value FROM admin WHERE noption = '%1';").arg( noption ));
+ TQStringList values = query( TQString( "SELECT value FROM admin WHERE noption = '%1';").tqarg( noption ));
if(values.count() > 0)
{
- query( TQString( "UPDATE admin SET value = '%1' WHERE noption = '%2';" ).arg( value, noption ) );
+ query( TQString( "UPDATE admin SET value = '%1' WHERE noption = '%2';" ).tqarg( value, noption ) );
}
else
{
- insert( TQString( "INSERT INTO admin (value, noption) values ( '%1', '%2' );" ).arg( value, noption ),
+ insert( TQString( "INSERT INTO admin (value, noption) values ( '%1', '%2' );" ).tqarg( value, noption ),
NULL );
}
}
@@ -560,8 +560,8 @@ CollectionDB::createTables( const bool temporary )
"sampler BOOL,"
"bpm FLOAT,"
"deviceid INTEGER);" )
- .arg( temporary ? "TEMPORARY" : "" )
- .arg( temporary ? "_temp" : "" ) );
+ .tqarg( temporary ? "TEMPORARY" : "" )
+ .tqarg( temporary ? "_temp" : "" ) );
TQString albumAutoIncrement = "";
TQString artistAutoIncrement = "";
@@ -598,41 +598,41 @@ CollectionDB::createTables( const bool temporary )
query( TQString( "CREATE %1 TABLE album%2 ("
"id INTEGER PRIMARY KEY %3,"
"name " + textColumnType() + ");" )
- .arg( temporary ? "TEMPORARY" : "" )
- .arg( temporary ? "_temp" : "" )
- .arg( albumAutoIncrement ) );
+ .tqarg( temporary ? "TEMPORARY" : "" )
+ .tqarg( temporary ? "_temp" : "" )
+ .tqarg( albumAutoIncrement ) );
//create artist table
query( TQString( "CREATE %1 TABLE artist%2 ("
"id INTEGER PRIMARY KEY %3,"
"name " + textColumnType() + ");" )
- .arg( temporary ? "TEMPORARY" : "" )
- .arg( temporary ? "_temp" : "" )
- .arg( artistAutoIncrement ) );
+ .tqarg( temporary ? "TEMPORARY" : "" )
+ .tqarg( temporary ? "_temp" : "" )
+ .tqarg( artistAutoIncrement ) );
//create composer table
query( TQString( "CREATE %1 TABLE composer%2 ("
"id INTEGER PRIMARY KEY %3,"
"name " + textColumnType() + ");" )
- .arg( temporary ? "TEMPORARY" : "" )
- .arg( temporary ? "_temp" : "" )
- .arg( composerAutoIncrement ) );
+ .tqarg( temporary ? "TEMPORARY" : "" )
+ .tqarg( temporary ? "_temp" : "" )
+ .tqarg( composerAutoIncrement ) );
//create genre table
query( TQString( "CREATE %1 TABLE genre%2 ("
"id INTEGER PRIMARY KEY %3,"
"name " + textColumnType() +");" )
- .arg( temporary ? "TEMPORARY" : "" )
- .arg( temporary ? "_temp" : "" )
- .arg( genreAutoIncrement ) );
+ .tqarg( temporary ? "TEMPORARY" : "" )
+ .tqarg( temporary ? "_temp" : "" )
+ .tqarg( genreAutoIncrement ) );
//create year table
query( TQString( "CREATE %1 TABLE year%2 ("
"id INTEGER PRIMARY KEY %3,"
"name " + textColumnType() + ");" )
- .arg( temporary ? "TEMPORARY" : "" )
- .arg( temporary ? "_temp" : "" )
- .arg( yearAutoIncrement ) );
+ .tqarg( temporary ? "TEMPORARY" : "" )
+ .tqarg( temporary ? "_temp" : "" )
+ .tqarg( yearAutoIncrement ) );
//create images table
query( TQString( "CREATE %1 TABLE images%2 ("
@@ -640,8 +640,8 @@ CollectionDB::createTables( const bool temporary )
"deviceid INTEGER,"
"artist " + textColumnType() + ","
"album " + textColumnType() + ");" )
- .arg( temporary ? "TEMPORARY" : "" )
- .arg( temporary ? "_temp" : "" ) );
+ .tqarg( temporary ? "TEMPORARY" : "" )
+ .tqarg( temporary ? "_temp" : "" ) );
//create embed table
query( TQString( "CREATE %1 TABLE embed%2 ("
@@ -649,37 +649,37 @@ CollectionDB::createTables( const bool temporary )
"deviceid INTEGER,"
"hash " + exactTextColumnType() + ","
"description " + textColumnType() + ");" )
- .arg( temporary ? "TEMPORARY" : "" )
- .arg( temporary ? "_temp" : "" ) );
+ .tqarg( temporary ? "TEMPORARY" : "" )
+ .tqarg( temporary ? "_temp" : "" ) );
// create directory statistics table
query( TQString( "CREATE %1 TABLE directories%2 ("
"dir " + exactTextColumnType() + ","
"deviceid INTEGER,"
"changedate INTEGER);" )
- .arg( temporary ? "TEMPORARY" : "" )
- .arg( temporary ? "_temp" : "" ) );
+ .tqarg( temporary ? "TEMPORARY" : "" )
+ .tqarg( temporary ? "_temp" : "" ) );
//create uniqueid table
query( TQString( "CREATE %1 TABLE uniqueid%2 ("
"url " + exactTextColumnType() + ","
"deviceid INTEGER,"
- "uniqueid " + exactTextColumnType(32) + " UNIQUE,"
+ "uniqueid " + exactTextColumnType(32) + " UNITQUE,"
"dir " + exactTextColumnType() + ");" )
- .arg( temporary ? "TEMPORARY" : "" )
- .arg( temporary ? "_temp" : "" ) );
+ .tqarg( temporary ? "TEMPORARY" : "" )
+ .tqarg( temporary ? "_temp" : "" ) );
//create indexes
query( TQString( "CREATE INDEX album_idx%1 ON album%2( name );" )
- .arg( temporary ? "_temp" : "" ).arg( temporary ? "_temp" : "" ) );
+ .tqarg( temporary ? "_temp" : "" ).tqarg( temporary ? "_temp" : "" ) );
query( TQString( "CREATE INDEX artist_idx%1 ON artist%2( name );" )
- .arg( temporary ? "_temp" : "" ).arg( temporary ? "_temp" : "" ) );
+ .tqarg( temporary ? "_temp" : "" ).tqarg( temporary ? "_temp" : "" ) );
query( TQString( "CREATE INDEX composer_idx%1 ON composer%2( name );" )
- .arg( temporary ? "_temp" : "" ).arg( temporary ? "_temp" : "" ) );
+ .tqarg( temporary ? "_temp" : "" ).tqarg( temporary ? "_temp" : "" ) );
query( TQString( "CREATE INDEX genre_idx%1 ON genre%2( name );" )
- .arg( temporary ? "_temp" : "" ).arg( temporary ? "_temp" : "" ) );
+ .tqarg( temporary ? "_temp" : "" ).tqarg( temporary ? "_temp" : "" ) );
query( TQString( "CREATE INDEX year_idx%1 ON year%2( name );" )
- .arg( temporary ? "_temp" : "" ).arg( temporary ? "_temp" : "" ) );
+ .tqarg( temporary ? "_temp" : "" ).tqarg( temporary ? "_temp" : "" ) );
if ( !temporary )
{
@@ -698,9 +698,9 @@ CollectionDB::createTables( const bool temporary )
}
else
{
- query( "CREATE UNIQUE INDEX url_tagtemp ON tags_temp( url, deviceid );" );
- query( "CREATE UNIQUE INDEX embed_urltemp ON embed_temp( url, deviceid );" );
- query( "CREATE UNIQUE INDEX dir_temp_dir ON directories_temp( dir, deviceid );" );
+ query( "CREATE UNITQUE INDEX url_tagtemp ON tags_temp( url, deviceid );" );
+ query( "CREATE UNITQUE INDEX embed_urltemp ON embed_temp( url, deviceid );" );
+ query( "CREATE UNITQUE INDEX dir_temp_dir ON directories_temp( dir, deviceid );" );
query( "CREATE INDEX album_tagtemp ON tags_temp( album );" );
query( "CREATE INDEX artist_tagtemp ON tags_temp( artist );" );
query( "CREATE INDEX sampler_tagtemp ON tags_temp( sampler );" );
@@ -716,7 +716,7 @@ CollectionDB::createIndices()
//tables which are not created in that function.
debug() << "Creating indices, ignore errors about already existing indices" << endl;
- query( "CREATE UNIQUE INDEX url_tag ON tags( url, deviceid );" );
+ query( "CREATE UNITQUE INDEX url_tag ON tags( url, deviceid );" );
query( "CREATE INDEX album_tag ON tags( album );" );
query( "CREATE INDEX artist_tag ON tags( artist );" );
query( "CREATE INDEX composer_tag ON tags( composer );" );
@@ -729,10 +729,10 @@ CollectionDB::createIndices()
query( "CREATE INDEX images_url ON images( path, deviceid );" );
- query( "CREATE UNIQUE INDEX embed_url ON embed( url, deviceid );" );
+ query( "CREATE UNITQUE INDEX embed_url ON embed( url, deviceid );" );
query( "CREATE INDEX embed_hash ON embed( hash );" );
- query( "CREATE UNIQUE INDEX directories_dir ON directories( dir, deviceid );" );
+ query( "CREATE UNITQUE INDEX directories_dir ON directories( dir, deviceid );" );
query( "CREATE INDEX uniqueid_uniqueid ON uniqueid( uniqueid );");
query( "CREATE INDEX uniqueid_url ON uniqueid( url, deviceid );");
@@ -764,16 +764,16 @@ CollectionDB::createPermanentIndices()
//already exist, but these can be ignored
debug() << "Creating permanent indices, ignore errors about already existing indices" << endl;
- query( "CREATE UNIQUE INDEX lyrics_url ON lyrics( url, deviceid );" );
+ query( "CREATE UNITQUE INDEX lyrics_url ON lyrics( url, deviceid );" );
query( "CREATE INDEX lyrics_uniqueid ON lyrics( uniqueid );" );
query( "CREATE INDEX playlist_playlists ON playlists( playlist );" );
query( "CREATE INDEX url_playlists ON playlists( url );" );
- query( "CREATE UNIQUE INDEX labels_name ON labels( name, type );" );
- query( "CREATE INDEX tags_labels_uniqueid ON tags_labels( uniqueid );" ); //m:n relationship, DO NOT MAKE UNIQUE!
- query( "CREATE INDEX tags_labels_url ON tags_labels( url, deviceid );" ); //m:n relationship, DO NOT MAKE UNIQUE!
- query( "CREATE INDEX tags_labels_labelid ON tags_labels( labelid );" ); //m:n relationship, DO NOT MAKE UNIQUE!
+ query( "CREATE UNITQUE INDEX labels_name ON labels( name, type );" );
+ query( "CREATE INDEX tags_labels_uniqueid ON tags_labels( uniqueid );" ); //m:n relationship, DO NOT MAKE UNITQUE!
+ query( "CREATE INDEX tags_labels_url ON tags_labels( url, deviceid );" ); //m:n relationship, DO NOT MAKE UNITQUE!
+ query( "CREATE INDEX tags_labels_labelid ON tags_labels( labelid );" ); //m:n relationship, DO NOT MAKE UNITQUE!
- query( "CREATE UNIQUE INDEX url_stats ON statistics( deviceid, url );" );
+ query( "CREATE UNITQUE INDEX url_stats ON statistics( deviceid, url );" );
query( "CREATE INDEX percentage_stats ON statistics( percentage );" );
query( "CREATE INDEX rating_stats ON statistics( rating );" );
query( "CREATE INDEX playcounter_stats ON statistics( playcounter );" );
@@ -791,16 +791,16 @@ CollectionDB::createPermanentIndices()
void
CollectionDB::dropTables( const bool temporary )
{
- query( TQString( "DROP TABLE tags%1;" ).arg( temporary ? "_temp" : "" ) );
- query( TQString( "DROP TABLE album%1;" ).arg( temporary ? "_temp" : "" ) );
- query( TQString( "DROP TABLE artist%1;" ).arg( temporary ? "_temp" : "" ) );
- query( TQString( "DROP TABLE composer%1;" ).arg( temporary ? "_temp" : "" ) );
- query( TQString( "DROP TABLE genre%1;" ).arg( temporary ? "_temp" : "" ) );
- query( TQString( "DROP TABLE year%1;" ).arg( temporary ? "_temp" : "" ) );
- query( TQString( "DROP TABLE images%1;" ).arg( temporary ? "_temp" : "" ) );
- query( TQString( "DROP TABLE embed%1;" ).arg( temporary ? "_temp" : "" ) );
- query( TQString( "DROP TABLE directories%1;" ).arg( temporary ? "_temp" : "" ) );
- query( TQString( "DROP TABLE uniqueid%1;" ).arg( temporary ? "_temp" : "" ) );
+ query( TQString( "DROP TABLE tags%1;" ).tqarg( temporary ? "_temp" : "" ) );
+ query( TQString( "DROP TABLE album%1;" ).tqarg( temporary ? "_temp" : "" ) );
+ query( TQString( "DROP TABLE artist%1;" ).tqarg( temporary ? "_temp" : "" ) );
+ query( TQString( "DROP TABLE composer%1;" ).tqarg( temporary ? "_temp" : "" ) );
+ query( TQString( "DROP TABLE genre%1;" ).tqarg( temporary ? "_temp" : "" ) );
+ query( TQString( "DROP TABLE year%1;" ).tqarg( temporary ? "_temp" : "" ) );
+ query( TQString( "DROP TABLE images%1;" ).tqarg( temporary ? "_temp" : "" ) );
+ query( TQString( "DROP TABLE embed%1;" ).tqarg( temporary ? "_temp" : "" ) );
+ query( TQString( "DROP TABLE directories%1;" ).tqarg( temporary ? "_temp" : "" ) );
+ query( TQString( "DROP TABLE uniqueid%1;" ).tqarg( temporary ? "_temp" : "" ) );
if ( !temporary )
{
query( TQString( "DROP TABLE related_artists;" ) );
@@ -830,21 +830,21 @@ CollectionDB::clearTables( const bool temporary )
clearCommand = "TRUNCATE TABLE";
}
- query( TQString( "%1 tags%2;" ).arg( clearCommand ).arg( temporary ? "_temp" : "" ) );
- query( TQString( "%1 album%2;" ).arg( clearCommand ).arg( temporary ? "_temp" : "" ) );
- query( TQString( "%1 artist%2;" ).arg( clearCommand ).arg( temporary ? "_temp" : "" ) );
- query( TQString( "%1 composer%2;" ).arg( clearCommand ).arg( temporary ? "_temp" : "" ) );
- query( TQString( "%1 genre%2;" ).arg( clearCommand ).arg( temporary ? "_temp" : "" ) );
- query( TQString( "%1 year%2;" ).arg( clearCommand ).arg( temporary ? "_temp" : "" ) );
- query( TQString( "%1 images%2;" ).arg( clearCommand ).arg( temporary ? "_temp" : "" ) );
- query( TQString( "%1 embed%2;" ).arg( clearCommand ).arg( temporary ? "_temp" : "" ) );
- query( TQString( "%1 directories%2;" ).arg( clearCommand ).arg( temporary ? "_temp" : "" ) );
- query( TQString( "%1 uniqueid%2;" ).arg( clearCommand ).arg( temporary ? "_temp" : "" ) );
+ query( TQString( "%1 tags%2;" ).tqarg( clearCommand ).tqarg( temporary ? "_temp" : "" ) );
+ query( TQString( "%1 album%2;" ).tqarg( clearCommand ).tqarg( temporary ? "_temp" : "" ) );
+ query( TQString( "%1 artist%2;" ).tqarg( clearCommand ).tqarg( temporary ? "_temp" : "" ) );
+ query( TQString( "%1 composer%2;" ).tqarg( clearCommand ).tqarg( temporary ? "_temp" : "" ) );
+ query( TQString( "%1 genre%2;" ).tqarg( clearCommand ).tqarg( temporary ? "_temp" : "" ) );
+ query( TQString( "%1 year%2;" ).tqarg( clearCommand ).tqarg( temporary ? "_temp" : "" ) );
+ query( TQString( "%1 images%2;" ).tqarg( clearCommand ).tqarg( temporary ? "_temp" : "" ) );
+ query( TQString( "%1 embed%2;" ).tqarg( clearCommand ).tqarg( temporary ? "_temp" : "" ) );
+ query( TQString( "%1 directories%2;" ).tqarg( clearCommand ).tqarg( temporary ? "_temp" : "" ) );
+ query( TQString( "%1 uniqueid%2;" ).tqarg( clearCommand ).tqarg( temporary ? "_temp" : "" ) );
if ( !temporary )
{
- query( TQString( "%1 related_artists;" ).arg( clearCommand ) );
+ query( TQString( "%1 related_artists;" ).tqarg( clearCommand ) );
//debug() << "Clearing media table" << endl;
- //query( TQString( "%1 media;" ).arg( clearCommand ) );
+ //query( TQString( "%1 media;" ).tqarg( clearCommand ) );
}
}
@@ -866,7 +866,7 @@ CollectionDB::copyTempTables( )
albumIds += ',';
albumIds += *it;
}
- insert( TQString ( "INSERT INTO album SELECT * FROM album_temp WHERE album_temp.id NOT IN ( %1 );" ).arg( albumIds ), NULL );
+ insert( TQString ( "INSERT INTO album SELECT * FROM album_temp WHERE album_temp.id NOT IN ( %1 );" ).tqarg( albumIds ), NULL );
TQStringList artistIdList = query( "SELECT artist.id FROM artist;" );
TQString artistIds = "-1";
@@ -875,7 +875,7 @@ CollectionDB::copyTempTables( )
artistIds += ',';
artistIds += *it;
}
- insert( TQString ( "INSERT INTO artist SELECT * FROM artist_temp WHERE artist_temp.id NOT IN ( %1 );" ).arg( artistIds ), NULL );
+ insert( TQString ( "INSERT INTO artist SELECT * FROM artist_temp WHERE artist_temp.id NOT IN ( %1 );" ).tqarg( artistIds ), NULL );
TQStringList composerIdList = query( "SELECT composer.id FROM composer;" );
TQString composerIds = "-1";
@@ -884,7 +884,7 @@ CollectionDB::copyTempTables( )
composerIds += ',';
composerIds += *it;
}
- insert( TQString ( "INSERT INTO composer SELECT * FROM composer_temp WHERE composer_temp.id NOT IN ( %1 );" ).arg( composerIds ), NULL );
+ insert( TQString ( "INSERT INTO composer SELECT * FROM composer_temp WHERE composer_temp.id NOT IN ( %1 );" ).tqarg( composerIds ), NULL );
TQStringList genreIdList = query( "SELECT genre.id FROM genre;" );
TQString genreIds = "-1";
@@ -893,7 +893,7 @@ CollectionDB::copyTempTables( )
genreIds += ',';
genreIds += *it;
}
- insert( TQString ( "INSERT INTO genre SELECT * FROM genre_temp WHERE genre_temp.id NOT IN ( %1 );" ).arg( genreIds ), NULL );
+ insert( TQString ( "INSERT INTO genre SELECT * FROM genre_temp WHERE genre_temp.id NOT IN ( %1 );" ).tqarg( genreIds ), NULL );
TQStringList yearIdList = query( "SELECT year.id FROM year;" );
TQString yearIds = "-1";
@@ -902,7 +902,7 @@ CollectionDB::copyTempTables( )
yearIds += ',';
yearIds += *it;
}
- insert( TQString ( "INSERT INTO year SELECT * FROM year_temp WHERE year_temp.id NOT IN ( %1 );" ).arg( yearIds ), NULL );
+ insert( TQString ( "INSERT INTO year SELECT * FROM year_temp WHERE year_temp.id NOT IN ( %1 );" ).tqarg( yearIds ), NULL );
insert( "INSERT INTO images SELECT * FROM images_temp;", NULL );
insert( "INSERT INTO embed SELECT * FROM embed_temp;", NULL );
@@ -943,7 +943,7 @@ CollectionDB::createDevicesTable()
"uuid " + textColumnType() + ","
"servername " + textColumnType() + ","
"sharename " + textColumnType() + ");" )
- .arg( deviceAutoIncrement ) );
+ .tqarg( deviceAutoIncrement ) );
query( "CREATE INDEX devices_type ON devices( type );" );
query( "CREATE INDEX devices_uuid ON devices( uuid );" );
query( "CREATE INDEX devices_rshare ON devices( servername, sharename );" );
@@ -961,7 +961,7 @@ CollectionDB::createStatsTable()
"percentage FLOAT,"
"rating INTEGER DEFAULT 0,"
"playcounter INTEGER,"
- "uniqueid " + exactTextColumnType(32) + " UNIQUE,"
+ "uniqueid " + exactTextColumnType(32) + " UNITQUE,"
"deleted BOOL DEFAULT " + boolF() + ","
"PRIMARY KEY(url, deviceid) );" ) );
@@ -973,13 +973,13 @@ CollectionDB::createStatsTableV8()
{
// create music statistics database - old form, for upgrade code.
query( TQString( "CREATE TABLE statistics ("
- "url " + textColumnType() + " UNIQUE,"
+ "url " + textColumnType() + " UNITQUE,"
"createdate INTEGER,"
"accessdate INTEGER,"
"percentage FLOAT,"
"rating INTEGER DEFAULT 0,"
"playcounter INTEGER,"
- "uniqueid " + textColumnType(8) + " UNIQUE,"
+ "uniqueid " + textColumnType(8) + " UNITQUE,"
"deleted BOOL DEFAULT " + boolF() + ");" ) );
query( "CREATE INDEX url_stats ON statistics( url );" );
@@ -1002,15 +1002,15 @@ CollectionDB::createStatsTableV10( bool temp )
"percentage FLOAT,"
"rating INTEGER DEFAULT 0,"
"playcounter INTEGER,"
- "uniqueid " + exactTextColumnType(32) + " UNIQUE,"
+ "uniqueid " + exactTextColumnType(32) + " UNITQUE,"
"deleted BOOL DEFAULT " + boolF() + ","
"PRIMARY KEY(url, deviceid) );"
- ).arg( temp ? "TEMPORARY" : "" )
- .arg( temp ? "_fix_ten" : "" ) );
+ ).tqarg( temp ? "TEMPORARY" : "" )
+ .tqarg( temp ? "_fix_ten" : "" ) );
if ( !temp )
{
- query( "CREATE UNIQUE INDEX url_stats ON statistics( deviceid, url );" );
+ query( "CREATE UNITQUE INDEX url_stats ON statistics( deviceid, url );" );
query( "CREATE INDEX percentage_stats ON statistics( percentage );" );
query( "CREATE INDEX rating_stats ON statistics( rating );" );
query( "CREATE INDEX playcounter_stats ON statistics( playcounter );" );
@@ -1074,7 +1074,7 @@ CollectionDB::createPersistentTables()
query( TQString( "CREATE TABLE tags_labels ("
"deviceid INTEGER,"
"url " + exactTextColumnType() + ", "
- "uniqueid " + exactTextColumnType(32) + ", " //m:n relationship, DO NOT MAKE UNIQUE!
+ "uniqueid " + exactTextColumnType(32) + ", " //m:n relationship, DO NOT MAKE UNITQUE!
"labelid INTEGER REFERENCES labels( id ) ON DELETE CASCADE );" ) );
}
@@ -1120,22 +1120,22 @@ CollectionDB::createPersistentTablesV14( bool temp )
"asin " + textColumnType(20) + ", "
"locale " + textColumnType(2) + ", "
"filename " + exactTextColumnType(33) + ", "
- "refetchdate INTEGER );" ).arg( a,b ) );
+ "refetchdate INTEGER );" ).tqarg( a,b ) );
// create lyrics table
query( TQString( "CREATE %1 TABLE lyrics%2 ("
"url " + exactTextColumnType() + ", "
"deviceid INTEGER,"
- "lyrics " + longTextColumnType() + ");" ).arg( a,b ) );
+ "lyrics " + longTextColumnType() + ");" ).tqarg( a,b ) );
query( TQString( "CREATE %1 TABLE playlists%2 ("
"playlist " + textColumnType() + ", "
"url " + exactTextColumnType() + ", "
- "tracknum INTEGER );" ).arg( a,b ) );
+ "tracknum INTEGER );" ).tqarg( a,b ) );
if ( !temp )
{
- query( "CREATE UNIQUE INDEX lyrics_url ON lyrics( url, deviceid );" );
+ query( "CREATE UNITQUE INDEX lyrics_url ON lyrics( url, deviceid );" );
query( "CREATE INDEX playlist_playlists ON playlists( playlist );" );
query( "CREATE INDEX url_playlists ON playlists( url );" );
}
@@ -1163,13 +1163,13 @@ CollectionDB::createPodcastTables()
// create podcast channels table
query( TQString( "CREATE TABLE podcastchannels ("
- "url " + exactTextColumnType() + " UNIQUE,"
+ "url " + exactTextColumnType() + " UNITQUE,"
"title " + textColumnType() + ","
"weblink " + exactTextColumnType() + ","
"image " + exactTextColumnType() + ","
"comment " + longTextColumnType() + ","
"copyright " + textColumnType() + ","
- "parent INTEGER,"
+ "tqparent INTEGER,"
"directory " + textColumnType() + ","
"autoscan BOOL, fetchtype INTEGER, "
"autotransfer BOOL, haspurge BOOL, purgecount INTEGER );" ) );
@@ -1177,9 +1177,9 @@ CollectionDB::createPodcastTables()
// create podcast episodes table
query( TQString( "CREATE TABLE podcastepisodes ("
"id INTEGER PRIMARY KEY %1, "
- "url " + exactTextColumnType() + " UNIQUE,"
+ "url " + exactTextColumnType() + " UNITQUE,"
"localurl " + exactTextColumnType() + ","
- "parent " + exactTextColumnType() + ","
+ "tqparent " + exactTextColumnType() + ","
"guid " + exactTextColumnType() + ","
"title " + textColumnType() + ","
"subtitle " + textColumnType() + ","
@@ -1190,14 +1190,14 @@ CollectionDB::createPodcastTables()
"length INTEGER,"
"size INTEGER,"
"isNew BOOL );" )
- .arg( podcastAutoIncrement ) );
+ .tqarg( podcastAutoIncrement ) );
// create podcast folders table
query( TQString( "CREATE TABLE podcastfolders ("
"id INTEGER PRIMARY KEY %1, "
"name " + textColumnType() + ","
- "parent INTEGER, isOpen BOOL );" )
- .arg( podcastFolderAutoInc ) );
+ "tqparent INTEGER, isOpen BOOL );" )
+ .tqarg( podcastFolderAutoInc ) );
query( "CREATE INDEX url_podchannel ON podcastchannels( url );" );
query( "CREATE INDEX url_podepisode ON podcastepisodes( url );" );
@@ -1230,23 +1230,23 @@ CollectionDB::createPodcastTablesV2( bool temp )
// create podcast channels table
query( TQString( "CREATE %1 TABLE podcastchannels%2 ("
- "url " + exactTextColumnType() + " UNIQUE,"
+ "url " + exactTextColumnType() + " UNITQUE,"
"title " + textColumnType() + ","
"weblink " + exactTextColumnType() + ","
"image " + exactTextColumnType() + ","
"comment " + longTextColumnType() + ","
"copyright " + textColumnType() + ","
- "parent INTEGER,"
+ "tqparent INTEGER,"
"directory " + textColumnType() + ","
"autoscan BOOL, fetchtype INTEGER, "
- "autotransfer BOOL, haspurge BOOL, purgecount INTEGER );" ).arg( a,b ) );
+ "autotransfer BOOL, haspurge BOOL, purgecount INTEGER );" ).tqarg( a,b ) );
// create podcast episodes table
query( TQString( "CREATE %2 TABLE podcastepisodes%3 ("
"id INTEGER PRIMARY KEY %1, "
- "url " + exactTextColumnType() + " UNIQUE,"
+ "url " + exactTextColumnType() + " UNITQUE,"
"localurl " + exactTextColumnType() + ","
- "parent " + exactTextColumnType() + ","
+ "tqparent " + exactTextColumnType() + ","
"guid " + exactTextColumnType() + ","
"title " + textColumnType() + ","
"subtitle " + textColumnType() + ","
@@ -1257,14 +1257,14 @@ CollectionDB::createPodcastTablesV2( bool temp )
"length INTEGER,"
"size INTEGER,"
"isNew BOOL );" )
- .arg( podcastAutoIncrement, a, b ) );
+ .tqarg( podcastAutoIncrement, a, b ) );
// create podcast folders table
query( TQString( "CREATE %2 TABLE podcastfolders%3 ("
"id INTEGER PRIMARY KEY %1, "
"name " + textColumnType() + ","
- "parent INTEGER, isOpen BOOL );" )
- .arg( podcastFolderAutoInc, a, b ) );
+ "tqparent INTEGER, isOpen BOOL );" )
+ .tqarg( podcastFolderAutoInc, a, b ) );
if ( !temp )
{
@@ -1339,7 +1339,7 @@ CollectionDB::artistID( TQString value, bool autocreate, const bool temporary, b
}
-QString
+TQString
CollectionDB::artistValue( uint id )
{
// lookup cache
@@ -1378,7 +1378,7 @@ CollectionDB::composerID( TQString value, bool autocreate, const bool temporary,
}
-QString
+TQString
CollectionDB::composerValue( uint id )
{
// lookup cache
@@ -1416,7 +1416,7 @@ CollectionDB::albumID( TQString value, bool autocreate, const bool temporary, bo
return id;
}
-QString
+TQString
CollectionDB::albumValue( uint id )
{
// lookup cache
@@ -1440,7 +1440,7 @@ CollectionDB::genreID( TQString value, bool autocreate, const bool temporary, bo
IDFromValue( "genre", value, autocreate, temporary );
}
-QString
+TQString
CollectionDB::genreValue( uint id )
{
return valueFromID( "genre", id );
@@ -1456,7 +1456,7 @@ CollectionDB::yearID( TQString value, bool autocreate, const bool temporary, boo
}
-QString
+TQString
CollectionDB::yearValue( uint id )
{
return valueFromID( "year", id );
@@ -1475,16 +1475,16 @@ CollectionDB::IDFromValue( TQString name, TQString value, bool autocreate, const
TQStringList values =
query( TQString(
"SELECT id, name FROM %1 WHERE name %2;" )
- .arg( name )
- .arg( CollectionDB::likeCondition( value ) ) );
+ .tqarg( name )
+ .tqarg( CollectionDB::likeCondition( value ) ) );
//check if item exists. if not, should we autocreate it?
uint id;
if ( values.isEmpty() && autocreate )
{
id = insert( TQString( "INSERT INTO %1 ( name ) VALUES ( '%2' );" )
- .arg( name )
- .arg( CollectionDB::instance()->escapeString( value ) ), name );
+ .tqarg( name )
+ .tqarg( CollectionDB::instance()->escapeString( value ) ), name );
return id;
}
@@ -1493,28 +1493,28 @@ CollectionDB::IDFromValue( TQString name, TQString value, bool autocreate, const
}
-QString
+TQString
CollectionDB::valueFromID( TQString table, uint id )
{
TQStringList values =
query( TQString(
"SELECT name FROM %1 WHERE id=%2;" )
- .arg( table )
- .arg( id ) );
+ .tqarg( table )
+ .tqarg( id ) );
return values.isEmpty() ? 0 : values.first();
}
-QString
+TQString
CollectionDB::albumSongCount( const TQString &artist_id, const TQString &album_id )
{
TQStringList values =
query( TQString(
"SELECT COUNT( url ) FROM tags WHERE album = %1 AND artist = %2;" )
- .arg( album_id )
- .arg( artist_id ) );
+ .tqarg( album_id )
+ .tqarg( artist_id ) );
return values.first();
}
@@ -1524,13 +1524,13 @@ CollectionDB::albumIsCompilation( const TQString &album_id )
TQStringList values =
query( TQString(
"SELECT sampler FROM tags WHERE sampler=%1 AND album=%2" )
- .arg( CollectionDB::instance()->boolT() )
- .arg( album_id ) );
+ .tqarg( CollectionDB::instance()->boolT() )
+ .tqarg( album_id ) );
return (values.count() != 0);
}
-QStringList
+TQStringList
CollectionDB::albumTracks( const TQString &artist_id, const TQString &album_id )
{
QueryBuilder qb;
@@ -1555,16 +1555,16 @@ CollectionDB::albumTracks( const TQString &artist_id, const TQString &album_id )
return ret;
}
-QStringList
+TQStringList
CollectionDB::albumDiscTracks( const TQString &artist_id, const TQString &album_id, const TQString &discNumber)
{
TQStringList rs;
rs = query( TQString( "SELECT tags.deviceid, tags.url FROM tags, year WHERE tags.album = %1 AND "
"tags.artist = %2 AND year.id = tags.year AND tags.discnumber = %3 "
+ deviceidSelection() + " ORDER BY tags.track;" )
- .arg( album_id )
- .arg( artist_id )
- .arg( discNumber ) );
+ .tqarg( album_id )
+ .tqarg( artist_id )
+ .tqarg( discNumber ) );
TQStringList result;
foreach( rs )
{
@@ -1574,13 +1574,13 @@ CollectionDB::albumDiscTracks( const TQString &artist_id, const TQString &album_
return result;
}
-QStringList
+TQStringList
CollectionDB::artistTracks( const TQString &artist_id )
{
TQStringList rs = query( TQString( "SELECT tags.deviceid, tags.url FROM tags, album "
"WHERE tags.artist = '%1' AND album.id = tags.album " + deviceidSelection() +
"ORDER BY album.name, tags.discnumber, tags.track;" )
- .arg( artist_id ) );
+ .tqarg( artist_id ) );
TQStringList result = TQStringList();
foreach( rs )
{
@@ -1592,21 +1592,21 @@ CollectionDB::artistTracks( const TQString &artist_id )
void
-CollectionDB::addImageToAlbum( const TQString& image, TQValueList< QPair > info, const bool temporary )
+CollectionDB::addImageToAlbum( const TQString& image, TQValueList< TQPair > info, const bool temporary )
{
int deviceid = MountPointManager::instance()->getIdForUrl( image );
TQString rpath = MountPointManager::instance()->getRelativePath( deviceid, image );
- for ( TQValueList< QPair >::ConstIterator it = info.begin(); it != info.end(); ++it )
+ for ( TQValueList< TQPair >::ConstIterator it = info.begin(); it != info.end(); ++it )
{
if ( (*it).first.isEmpty() || (*it).second.isEmpty() )
continue;
TQString sql = TQString( "INSERT INTO images%1 ( path, deviceid, artist, album ) VALUES ( '%3', %2" )
- .arg( temporary ? "_temp" : "" )
- .arg( deviceid )
- .arg( escapeString( rpath ) );
- sql += TQString( ", '%1'" ).arg( escapeString( (*it).first ) );
- sql += TQString( ", '%1' );" ).arg( escapeString( (*it).second ) );
+ .tqarg( temporary ? "_temp" : "" )
+ .tqarg( deviceid )
+ .tqarg( escapeString( rpath ) );
+ sql += TQString( ", '%1'" ).tqarg( escapeString( (*it).first ) );
+ sql += TQString( ", '%1' );" ).tqarg( escapeString( (*it).second ) );
// debug() << "Added image for album: " << (*it).first << " - " << (*it).second << ": " << image << endl;
insert( sql, NULL );
@@ -1622,8 +1622,8 @@ CollectionDB::addEmbeddedImage( const TQString& path, const TQString& hash, cons
int deviceid = MountPointManager::instance()->getIdForUrl( path );
TQString rpath = MountPointManager::instance()->getRelativePath(deviceid, path );
insert( TQString( "INSERT INTO embed_temp ( url, deviceid, hash, description ) VALUES ( '%2', %1, '%3', '%4' );" )
- .arg( deviceid )
- .arg( escapeString( rpath ), escapeString( hash ), escapeString( description ) ), NULL );
+ .tqarg( deviceid )
+ .tqarg( escapeString( rpath ), escapeString( hash ), escapeString( description ) ), NULL );
}
void
@@ -1636,11 +1636,11 @@ CollectionDB::removeOrphanedEmbeddedImages()
TQString deviceid = *it;
TQString rpath = *(++it);
query( TQString( "DELETE FROM embed WHERE embed.deviceid = %1 AND embed.url = '%2';" )
- .arg( deviceid, escapeString( rpath ) ) );
+ .tqarg( deviceid, escapeString( rpath ) ) );
}
}
-QPixmap
+TQPixmap
CollectionDB::createDragPixmapFromSQL( const TQString &sql, TQString textOverRide )
{
// it is too slow to check if the url is actually in the colleciton.
@@ -1656,7 +1656,7 @@ CollectionDB::createDragPixmapFromSQL( const TQString &sql, TQString textOverRid
return createDragPixmap( list, textOverRide );
}
-QPixmap
+TQPixmap
CollectionDB::createDragPixmap( const KURL::List &urls, TQString textOverRide )
{
// settings
@@ -1710,7 +1710,7 @@ CollectionDB::createDragPixmap( const KURL::List &urls, TQString textOverRide )
if( mb.compilation() == MetaBundle::CompilationYes )
artist = TQString( "Various_AMAROK_Artists" ); // magic key for the albumMap!
- if( !albumMap.contains( artist + album ) )
+ if( !albumMap.tqcontains( artist + album ) )
{
albumMap[ artist + album ] = 1;
TQString coverName = CollectionDB::instance()->albumImage( mb.artist(), album, false, coverW );
@@ -1722,7 +1722,7 @@ CollectionDB::createDragPixmap( const KURL::List &urls, TQString textOverRide )
else
{
MetaBundle mb( *it );
- if( !albumMap.contains( mb.artist() + mb.album() ) )
+ if( !albumMap.tqcontains( mb.artist() + mb.album() ) )
{
albumMap[ mb.artist() + mb.album() ] = 1;
TQString coverName = CollectionDB::instance()->podcastImage( mb, false, coverW );
@@ -1752,11 +1752,11 @@ CollectionDB::createDragPixmap( const KURL::List &urls, TQString textOverRide )
{
if( correctAlbumCount ) {
text = i18n( "X songs from X albums", "%2 from %1" );
- text = text.arg( albums == 1 && !album.isEmpty() ? album : i18n( "one album", "%n albums",albums ) );
+ text = text.tqarg( albums == 1 && !album.isEmpty() ? album : i18n( "one album", "%n albums",albums ) );
}
else
text = "%1";
- text = text.arg( songs == 1 && !song.isEmpty() ? song : i18n( "One song", "%n songs", songs ) );
+ text = text.tqarg( songs == 1 && !song.isEmpty() ? song : i18n( "One song", "%n songs", songs ) );
}
else if( playlists > 0 )
text = i18n( "One playlist", "%n playlists", playlists );
@@ -1780,7 +1780,7 @@ CollectionDB::createDragPixmap( const KURL::List &urls, TQString textOverRide )
coverPm[i] = coverPm[i-1];
TQImage im( locate( "data","amarok/images/more_albums.png" ) );
- coverPm[0].convertFromImage( im.smoothScale( coverW, coverH, TQImage::ScaleMin ) );
+ coverPm[0].convertFromImage( im.smoothScale( coverW, coverH, TQ_ScaleMin ) );
}
pixmapH = coverPm[0].height();
@@ -1813,7 +1813,7 @@ CollectionDB::createDragPixmap( const KURL::List &urls, TQString textOverRide )
TQPainter p;
p.begin( &pmtext );
- p.fillRect( 0, 0, pixmapW, fontH, TQBrush( Qt::black ) ); // border
+ p.fillRect( 0, 0, pixmapW, fontH, TQBrush( TQt::black ) ); // border
p.fillRect( 1, 1, pixmapW-margin, fontH-margin, palette.brush( TQPalette::Normal, TQColorGroup::Background ) );
p.setBrush( palette.color( TQPalette::Normal, TQColorGroup::Text ) );
p.setFont( font );
@@ -1821,7 +1821,7 @@ CollectionDB::createDragPixmap( const KURL::List &urls, TQString textOverRide )
p.end();
TQBitmap pmtextMask(pixmapW, fontH);
- pmtextMask.fill( Qt::color1 );
+ pmtextMask.fill( TQt::color1 );
// when we have found no covers, just display the text message
if( !covers )
@@ -1834,25 +1834,25 @@ CollectionDB::createDragPixmap( const KURL::List &urls, TQString textOverRide )
p.begin( &pmdrag );
p.setBackgroundMode( Qt::TransparentMode );
for ( int i = 0; i < covers; i++ )
- bitBlt( &pmdrag, i * coverSpacing, i * coverSpacing, &coverPm[i], 0, Qt::CopyROP );
+ bitBlt( &pmdrag, i * coverSpacing, i * coverSpacing, &coverPm[i], 0, TQt::CopyROP );
- bitBlt( &pmdrag, 0, pixmapH - fontH, &pmtext, 0, Qt::CopyROP );
+ bitBlt( &pmdrag, 0, pixmapH - fontH, &pmtext, 0, TQt::CopyROP );
p.end();
TQBitmap pmdragMask( pmdrag.size(), true );
for ( int i = 0; i < covers; i++ )
{
TQBitmap coverMask( coverPm[i].width(), coverPm[i].height() );
- coverMask.fill( Qt::color1 );
- bitBlt( &pmdragMask, i * coverSpacing, i * coverSpacing, &coverMask, 0, Qt::CopyROP );
+ coverMask.fill( TQt::color1 );
+ bitBlt( &pmdragMask, i * coverSpacing, i * coverSpacing, &coverMask, 0, TQt::CopyROP );
}
- bitBlt( &pmdragMask, 0, pixmapH - fontH, &pmtextMask, 0, Qt::CopyROP );
+ bitBlt( &pmdragMask, 0, pixmapH - fontH, &pmtextMask, 0, TQt::CopyROP );
pmdrag.setMask( pmdragMask );
return pmdrag;
}
-QImage
+TQImage
CollectionDB::fetchImage( const KURL& url, TQString &/*tmpFile*/ )
{
if ( url.protocol() != "file" )
@@ -1901,7 +1901,7 @@ CollectionDB::setAlbumImage( const TQString& artist, const TQString& album, TQIm
}
-QString
+TQString
CollectionDB::podcastImage( const MetaBundle &bundle, const bool withShadow, uint width )
{
PodcastEpisodeBundle peb;
@@ -1911,7 +1911,7 @@ CollectionDB::podcastImage( const MetaBundle &bundle, const bool withShadow, uin
if( getPodcastEpisodeBundle( url, &peb ) )
{
- url = peb.parent().url();
+ url = peb.tqparent().url();
}
if( getPodcastChannelBundle( url, &pcb ) )
@@ -1924,7 +1924,7 @@ CollectionDB::podcastImage( const MetaBundle &bundle, const bool withShadow, uin
}
-QString
+TQString
CollectionDB::podcastImage( const TQString &remoteURL, const bool withShadow, uint width )
{
// we aren't going to need a 1x1 size image. this is just a quick hack to be able to show full size images.
@@ -1991,7 +1991,7 @@ CollectionDB::podcastImageResult( KIO::Job *gjob )
}
-QString
+TQString
CollectionDB::albumImage( const TQString &artist, const TQString &album, bool withShadow, uint width, bool* embedded )
{
TQString s;
@@ -2027,14 +2027,14 @@ CollectionDB::albumImage( const TQString &artist, const TQString &album, bool wi
}
-QString
+TQString
CollectionDB::albumImage( const uint artist_id, const uint album_id, bool withShadow, uint width, bool* embedded )
{
return albumImage( artistValue( artist_id ), albumValue( album_id ), withShadow, width, embedded );
}
-QString
+TQString
CollectionDB::albumImage( const MetaBundle &trackInformation, bool withShadow, uint width, bool* embedded )
{
TQString s;
@@ -2062,12 +2062,12 @@ CollectionDB::albumImage( const MetaBundle &trackInformation, bool withShadow, u
return s;
}
-QString
+TQString
CollectionDB::makeShadowedImage( const TQString& albumImage, bool cache )
{
- qApp->lock();
+ tqApp->lock();
const TQImage original( albumImage, "PNG" );
- qApp->unlock();
+ tqApp->unlock();
if( original.hasAlphaBuffer() )
return albumImage;
@@ -2082,11 +2082,11 @@ CollectionDB::makeShadowedImage( const TQString& albumImage, bool cache )
TQImage shadow;
const TQString folder = Amarok::saveLocation( "covershadow-cache/" );
- const TQString file = TQString( "shadow_albumcover%1x%2.png" ).arg( original.width() + shadowSize ).arg( original.height() + shadowSize );
+ const TQString file = TQString( "shadow_albumcover%1x%2.png" ).tqarg( original.width() + shadowSize ).tqarg( original.height() + shadowSize );
if ( TQFile::exists( folder + file ) ) {
- qApp->lock();
+ tqApp->lock();
shadow.load( folder + file, "PNG" );
- qApp->unlock();
+ tqApp->unlock();
}
else {
shadow = TQDeepCopy(instance()->m_shadowImage);
@@ -2108,7 +2108,7 @@ CollectionDB::makeShadowedImage( const TQString& albumImage, bool cache )
// Amazon Image
-QString
+TQString
CollectionDB::findAmazonImage( const TQString &artist, const TQString &album, uint width )
{
TQCString widthKey = makeWidthKey( width );
@@ -2129,7 +2129,7 @@ CollectionDB::findAmazonImage( const TQString &artist, const TQString &album, ui
if ( width > 1 )
{
TQImage img( imageDir.filePath( key ) );
- img.smoothScale( width, width, TQImage::ScaleMin ).save( cacheCoverDir().filePath( widthKey + key ), "PNG" );
+ img.smoothScale( width, width, TQ_ScaleMin ).save( cacheCoverDir().filePath( widthKey + key ), "PNG" );
return cacheCoverDir().filePath( widthKey + key );
}
@@ -2141,7 +2141,7 @@ CollectionDB::findAmazonImage( const TQString &artist, const TQString &album, ui
}
-QString
+TQString
CollectionDB::findDirectoryImage( const TQString& artist, const TQString& album, uint width )
{
if ( width == 1 )
@@ -2168,17 +2168,17 @@ CollectionDB::findDirectoryImage( const TQString& artist, const TQString& album,
"AND tags.sampler = %1 "
"AND images.album %2 "
"AND images.deviceid IN (%3) " )
- .arg( boolT() )
- .arg( CollectionDB::likeCondition( album ) )
- .arg( deviceIds ) );
+ .tqarg( boolT() )
+ .tqarg( CollectionDB::likeCondition( album ) )
+ .tqarg( deviceIds ) );
}
else
{
rs = query( TQString(
"SELECT distinct images.deviceid,images.path FROM images WHERE artist %1 AND album %2 AND deviceid IN (%3) ORDER BY path;" )
- .arg( CollectionDB::likeCondition( artist ) )
- .arg( CollectionDB::likeCondition( album ) )
- .arg( deviceIds ) );
+ .tqarg( CollectionDB::likeCondition( artist ) )
+ .tqarg( CollectionDB::likeCondition( album ) )
+ .tqarg( deviceIds ) );
}
TQStringList values = URLsFromQuery( rs );
if ( !values.isEmpty() )
@@ -2189,7 +2189,7 @@ CollectionDB::findDirectoryImage( const TQString& artist, const TQString& album,
TQRegExp iTunesArt( "^AlbumArt_.*Large" );
for ( uint i = 0; i < values.count(); i++ )
{
- matches = values[i].contains( "front", false ) + values[i].contains( "cover", false ) + values[i].contains( "folder", false ) + values[i].contains( iTunesArt );
+ matches = values[i].tqcontains( "front", false ) + values[i].tqcontains( "cover", false ) + values[i].tqcontains( "folder", false ) + values[i].tqcontains( iTunesArt );
if ( matches > maxmatches )
{
image = values[i];
@@ -2205,7 +2205,7 @@ CollectionDB::findDirectoryImage( const TQString& artist, const TQString& album,
if ( !TQFile::exists( path ) )
{
TQImage img( image );
- img.smoothScale( width, width, TQImage::ScaleMin ).save( path, "PNG" );
+ img.smoothScale( width, width, TQ_ScaleMin ).save( path, "PNG" );
}
return path;
}
@@ -2216,7 +2216,7 @@ CollectionDB::findDirectoryImage( const TQString& artist, const TQString& album,
}
-QString
+TQString
CollectionDB::findEmbeddedImage( const TQString& artist, const TQString& album, uint width )
{
// In the case of multiple embedded images, we arbitrarily choose one from the newest file
@@ -2234,8 +2234,8 @@ CollectionDB::findEmbeddedImage( const TQString& artist, const TQString& album,
"album.name = '%1' "
"AND tags.sampler = %2 "
"ORDER BY modifydate DESC LIMIT 1;" )
- .arg( escapeString( album ) )
- .arg( boolT() ) );
+ .tqarg( escapeString( album ) )
+ .tqarg( boolT() ) );
} else {
rs = query( TQString(
"SELECT embed.hash, embed.deviceid, embed.url FROM "
@@ -2246,8 +2246,8 @@ CollectionDB::findEmbeddedImage( const TQString& artist, const TQString& album,
"artist.name = '%1' "
"AND album.name = '%2' "
"ORDER BY modifydate DESC LIMIT 1;" )
- .arg( escapeString( artist ) )
- .arg( escapeString( album ) ) );
+ .tqarg( escapeString( artist ) )
+ .tqarg( escapeString( album ) ) );
}
TQStringList values = TQStringList();
@@ -2273,7 +2273,7 @@ CollectionDB::findEmbeddedImage( const TQString& artist, const TQString& album,
}
-QString
+TQString
CollectionDB::findMetaBundleImage( const MetaBundle& trackInformation, uint width )
{
int deviceid = MountPointManager::instance()->getIdForUrl( trackInformation.url() );
@@ -2282,7 +2282,7 @@ CollectionDB::findMetaBundleImage( const MetaBundle& trackInformation, uint widt
query( TQString(
"SELECT embed.hash FROM tags LEFT JOIN embed ON tags.url = embed.url "
" AND tags.deviceid = embed.deviceid WHERE tags.url = '%2' AND tags.deviceid = %1 ORDER BY hash DESC LIMIT 1;" )
- .arg( deviceid ).arg( escapeString( rpath ) ) );
+ .tqarg( deviceid ).tqarg( escapeString( rpath ) ) );
if ( values.empty() || !values.first().isEmpty() ) {
TQCString hash;
@@ -2304,7 +2304,7 @@ CollectionDB::findMetaBundleImage( const MetaBundle& trackInformation, uint widt
}
-QCString
+TQCString
CollectionDB::makeWidthKey( uint width )
{
return TQString::number( width ).local8Bit() + '@';
@@ -2321,7 +2321,7 @@ CollectionDB::removeAlbumImage( const TQString &artist, const TQString &album )
query( "DELETE FROM amazon WHERE filename='" + key + '\'' );
// remove scaled versions of images (and add the asterisk for the shadow-caches)
- TQStringList scaledList = cacheCoverDir().entryList( widthKey + key + '*' );
+ TQStringList scaledList = cacheCoverDir().entryList( TQString(widthKey + key + '*') );
if ( scaledList.count() > 0 )
for ( uint i = 0; i < scaledList.count(); i++ )
TQFile::remove( cacheCoverDir().filePath( scaledList[ i ] ) );
@@ -2359,7 +2359,7 @@ CollectionDB::removeAlbumImage( const uint artist_id, const uint album_id )
}
-QString
+TQString
CollectionDB::notAvailCover( const bool withShadow, int width )
{
if ( width <= 1 )
@@ -2371,7 +2371,7 @@ CollectionDB::notAvailCover( const bool withShadow, int width )
s = cacheCoverDir().filePath( widthKey + "nocover.png" );
else
{
- m_noCover.smoothScale( width, width, TQImage::ScaleMin ).save( cacheCoverDir().filePath( widthKey + "nocover.png" ), "PNG" );
+ m_noCover.smoothScale( width, width, TQ_ScaleMin ).save( cacheCoverDir().filePath( widthKey + "nocover.png" ), "PNG" );
s = cacheCoverDir().filePath( widthKey + "nocover.png" );
}
@@ -2382,7 +2382,7 @@ CollectionDB::notAvailCover( const bool withShadow, int width )
}
-QStringList
+TQStringList
CollectionDB::artistList( bool withUnknowns, bool withCompilations )
{
QueryBuilder qb;
@@ -2400,7 +2400,7 @@ CollectionDB::artistList( bool withUnknowns, bool withCompilations )
}
-QStringList
+TQStringList
CollectionDB::composerList( bool withUnknowns, bool withCompilations )
{
DEBUG_BLOCK
@@ -2419,7 +2419,7 @@ CollectionDB::composerList( bool withUnknowns, bool withCompilations )
}
-QStringList
+TQStringList
CollectionDB::albumList( bool withUnknowns, bool withCompilations )
{
QueryBuilder qb;
@@ -2437,7 +2437,7 @@ CollectionDB::albumList( bool withUnknowns, bool withCompilations )
}
-QStringList
+TQStringList
CollectionDB::genreList( bool withUnknowns, bool withCompilations )
{
QueryBuilder qb;
@@ -2458,7 +2458,7 @@ CollectionDB::genreList( bool withUnknowns, bool withCompilations )
}
-QStringList
+TQStringList
CollectionDB::yearList( bool withUnknowns, bool withCompilations )
{
QueryBuilder qb;
@@ -2475,7 +2475,7 @@ CollectionDB::yearList( bool withUnknowns, bool withCompilations )
return qb.run();
}
-QStringList
+TQStringList
CollectionDB::labelList()
{
QueryBuilder qb;
@@ -2486,7 +2486,7 @@ CollectionDB::labelList()
return qb.run();
}
-QStringList
+TQStringList
CollectionDB::albumListOfArtist( const TQString &artist, bool withUnknown, bool withCompilations )
{
if (getDbConnectionType() == DbConnection::postgresql)
@@ -2494,8 +2494,8 @@ CollectionDB::albumListOfArtist( const TQString &artist, bool withUnknown, bool
return query( "SELECT DISTINCT album.name, lower( album.name ) AS __discard FROM tags, album, artist WHERE "
"tags.album = album.id AND tags.artist = artist.id "
"AND lower(artist.name) = lower('" + escapeString( artist ) + "') " +
- ( withUnknown ? TQString::null : "AND album.name <> '' " ) +
- ( withCompilations ? TQString::null : "AND tags.sampler = " + boolF() ) + deviceidSelection() +
+ ( withUnknown ? TQString() : "AND album.name <> '' " ) +
+ ( withCompilations ? TQString() : "AND tags.sampler = " + boolF() ) + deviceidSelection() +
" ORDER BY lower( album.name );" );
}
// mysql is case insensitive and lower() is very slow
@@ -2504,8 +2504,8 @@ CollectionDB::albumListOfArtist( const TQString &artist, bool withUnknown, bool
return query( "SELECT DISTINCT album.name FROM tags, album, artist WHERE "
"tags.album = album.id AND tags.artist = artist.id "
"AND artist.name = '" + escapeString( artist ) + "' " +
- ( withUnknown ? TQString::null : "AND album.name <> '' " ) +
- ( withCompilations ? TQString::null : "AND tags.sampler = " + boolF() ) + deviceidSelection() +
+ ( withUnknown ? TQString() : "AND album.name <> '' " ) +
+ ( withCompilations ? TQString() : "AND tags.sampler = " + boolF() ) + deviceidSelection() +
" ORDER BY album.name;" );
}
else // sqlite
@@ -2513,46 +2513,46 @@ CollectionDB::albumListOfArtist( const TQString &artist, bool withUnknown, bool
return query( "SELECT DISTINCT album.name FROM tags, album, artist WHERE "
"tags.album = album.id AND tags.artist = artist.id "
"AND lower(artist.name) = lower('" + escapeString( artist ) + "') " +
- ( withUnknown ? TQString::null : "AND album.name <> '' " ) +
- ( withCompilations ? TQString::null : "AND tags.sampler = " + boolF() ) + deviceidSelection() +
+ ( withUnknown ? TQString() : "AND album.name <> '' " ) +
+ ( withCompilations ? TQString() : "AND tags.sampler = " + boolF() ) + deviceidSelection() +
" ORDER BY lower( album.name );" );
}
}
-QStringList
+TQStringList
CollectionDB::artistAlbumList( bool withUnknown, bool withCompilations )
{
if (getDbConnectionType() == DbConnection::postgresql)
{
return query( "SELECT DISTINCT artist.name, album.name, lower( album.name ) AS __discard FROM tags, album, artist WHERE "
"tags.album = album.id AND tags.artist = artist.id " +
- ( withUnknown ? TQString::null : "AND album.name <> '' AND artist.name <> '' " ) +
- ( withCompilations ? TQString::null : "AND tags.sampler = " + boolF() ) + deviceidSelection() +
+ ( withUnknown ? TQString() : "AND album.name <> '' AND artist.name <> '' " ) +
+ ( withCompilations ? TQString() : "AND tags.sampler = " + boolF() ) + deviceidSelection() +
" ORDER BY lower( album.name );" );
}
else
{
return query( "SELECT DISTINCT artist.name, album.name FROM tags, album, artist WHERE "
"tags.album = album.id AND tags.artist = artist.id " +
- ( withUnknown ? TQString::null : "AND album.name <> '' AND artist.name <> '' " ) +
- ( withCompilations ? TQString::null : "AND tags.sampler = " + boolF() ) + deviceidSelection() +
+ ( withUnknown ? TQString() : "AND album.name <> '' AND artist.name <> '' " ) +
+ ( withCompilations ? TQString() : "AND tags.sampler = " + boolF() ) + deviceidSelection() +
" ORDER BY lower( album.name );" );
}
}
bool
-CollectionDB::addPodcastChannel( const PodcastChannelBundle &pcb, const bool &replace )
+CollectionDB::addPodcastChannel( const PodcastChannelBundle &pcb, const bool &tqreplace )
{
TQString command;
- if( replace ) {
+ if( tqreplace ) {
command = "REPLACE INTO podcastchannels "
- "( url, title, weblink, image, comment, copyright, parent, directory"
+ "( url, title, weblink, image, comment, copyright, tqparent, directory"
", autoscan, fetchtype, autotransfer, haspurge, purgecount ) "
"VALUES (";
} else {
command = "INSERT INTO podcastchannels "
- "( url, title, weblink, image, comment, copyright, parent, directory"
+ "( url, title, weblink, image, comment, copyright, tqparent, directory"
", autoscan, fetchtype, autotransfer, haspurge, purgecount ) "
"VALUES (";
}
@@ -2572,7 +2572,7 @@ CollectionDB::addPodcastChannel( const PodcastChannelBundle &pcb, const bool &re
command += ( image.isEmpty() ? "NULL" : '\'' + escapeString( image.url() ) + '\'' ) + ',';
command += ( description.isEmpty() ? "NULL" : '\'' + escapeString( description ) + '\'' ) + ',';
command += ( copyright.isEmpty() ? "NULL" : '\'' + escapeString( copyright ) + '\'' ) + ',';
- command += TQString::number( pcb.parentId() ) + ",'";
+ command += TQString::number( pcb.tqparentId() ) + ",'";
command += escapeString( pcb.saveLocation() ) + "',";
command += pcb.autoscan() ? boolT() + ',' : boolF() + ',';
command += TQString::number( pcb.fetchType() ) + ',';
@@ -2593,11 +2593,11 @@ CollectionDB::addPodcastEpisode( const PodcastEpisodeBundle &episode, const int
if( idToUpdate ) {
command = "REPLACE INTO podcastepisodes "
- "( id, url, localurl, parent, title, subtitle, composer, comment, filetype, createdate, guid, length, size, isNew ) "
+ "( id, url, localurl, tqparent, title, subtitle, composer, comment, filetype, createdate, guid, length, size, isNew ) "
"VALUES (";
} else {
command = "INSERT INTO podcastepisodes "
- "( url, localurl, parent, title, subtitle, composer, comment, filetype, createdate, guid, length, size, isNew ) "
+ "( url, localurl, tqparent, title, subtitle, composer, comment, filetype, createdate, guid, length, size, isNew ) "
"VALUES (";
}
@@ -2620,7 +2620,7 @@ CollectionDB::addPodcastEpisode( const PodcastEpisodeBundle &episode, const int
command += '\'' + escapeString( episode.url().url() ) + "',";
command += ( localurl.isEmpty() ? "NULL" : '\'' + escapeString( localurl ) + '\'' ) + ',';
- command += '\'' + escapeString( episode.parent().url()) + "',";
+ command += '\'' + escapeString( episode.tqparent().url()) + "',";
command += ( title.isEmpty() ? "NULL" : '\'' + escapeString( title ) + '\'' ) + ',';
command += ( subtitle.isEmpty() ? "NULL" : '\'' + escapeString( subtitle ) + '\'' ) + ',';
command += ( author.isEmpty() ? "NULL" : '\'' + escapeString( author ) + '\'' ) + ',';
@@ -2638,7 +2638,7 @@ CollectionDB::addPodcastEpisode( const PodcastEpisodeBundle &episode, const int
//This is a bit of a hack. We have just inserted an item, so it is going to be the one with the
//highest id. Change this if threaded insertions are used in the future.
TQStringList values = query( TQString("SELECT id FROM podcastepisodes WHERE url='%1' ORDER BY id DESC;")
- .arg( escapeString( episode.url().url() ) ) );
+ .tqarg( escapeString( episode.url().url() ) ) );
if( values.isEmpty() ) return -1;
return values[0].toInt();
@@ -2647,7 +2647,7 @@ CollectionDB::addPodcastEpisode( const PodcastEpisodeBundle &episode, const int
TQValueList
CollectionDB::getPodcastChannels()
{
- TQString command = "SELECT url, title, weblink, image, comment, copyright, parent, directory "
+ TQString command = "SELECT url, title, weblink, image, comment, copyright, tqparent, directory "
", autoscan, fetchtype, autotransfer, haspurge, purgecount FROM podcastchannels;";
TQStringList values = query( command );
@@ -2677,14 +2677,14 @@ CollectionDB::getPodcastChannels()
}
TQValueList
-CollectionDB::getPodcastEpisodes( const KURL &parent, bool onlyNew, int limit )
+CollectionDB::getPodcastEpisodes( const KURL &tqparent, bool onlyNew, int limit )
{
- TQString command = TQString( "SELECT id, url, localurl, parent, guid, title, subtitle, composer, comment, filetype, createdate, length, size, isNew FROM podcastepisodes WHERE ( parent='%1'" ).arg( parent.url() );
+ TQString command = TQString( "SELECT id, url, localurl, tqparent, guid, title, subtitle, composer, comment, filetype, createdate, length, size, isNew FROM podcastepisodes WHERE ( tqparent='%1'" ).tqarg( tqparent.url() );
if( onlyNew )
- command += TQString( " AND isNew='%1'" ).arg( boolT() );
+ command += TQString( " AND isNew='%1'" ).tqarg( boolT() );
command += " ) ORDER BY id";
if( limit != -1 )
- command += TQString( " DESC LIMIT %1 OFFSET 0" ).arg( limit );
+ command += TQString( " DESC LIMIT %1 OFFSET 0" ).tqarg( limit );
command += ';';
TQStringList values = query( command );
@@ -2722,7 +2722,7 @@ CollectionDB::getPodcastEpisodes( const KURL &parent, bool onlyNew, int limit )
PodcastEpisodeBundle
CollectionDB::getPodcastEpisodeById( int id )
{
- TQString command = TQString( "SELECT url, localurl, parent, guid, title, subtitle, composer, comment, filetype, createdate, length, size, isNew FROM podcastepisodes WHERE id=%1;").arg( id );
+ TQString command = TQString( "SELECT url, localurl, tqparent, guid, title, subtitle, composer, comment, filetype, createdate, length, size, isNew FROM podcastepisodes WHERE id=%1;").tqarg( id );
TQStringList values = query( command );
PodcastEpisodeBundle peb;
@@ -2759,7 +2759,7 @@ CollectionDB::getPodcastEpisodeBundle( const KURL &url, PodcastEpisodeBundle *pe
{
TQStringList values =
query( TQString( "SELECT id FROM podcastepisodes WHERE localurl = '%1';" )
- .arg( escapeString( url.url() ) ) );
+ .tqarg( escapeString( url.url() ) ) );
if( !values.isEmpty() )
id = values[0].toInt();
}
@@ -2767,7 +2767,7 @@ CollectionDB::getPodcastEpisodeBundle( const KURL &url, PodcastEpisodeBundle *pe
{
TQStringList values =
query( TQString( "SELECT id FROM podcastepisodes WHERE url = '%1';" )
- .arg( escapeString( url.url() ) ) );
+ .tqarg( escapeString( url.url() ) ) );
if( !values.isEmpty() )
id = values[0].toInt();
}
@@ -2785,9 +2785,9 @@ bool
CollectionDB::getPodcastChannelBundle( const KURL &url, PodcastChannelBundle *pcb )
{
TQStringList values = query( TQString(
- "SELECT url, title, weblink, image, comment, copyright, parent, directory "
+ "SELECT url, title, weblink, image, comment, copyright, tqparent, directory "
", autoscan, fetchtype, autotransfer, haspurge, purgecount FROM podcastchannels WHERE url = '%1';"
- ).arg( escapeString( url.url() ) ) );
+ ).tqarg( escapeString( url.url() ) ) );
foreach( values )
{
@@ -2812,17 +2812,17 @@ CollectionDB::getPodcastChannelBundle( const KURL &url, PodcastChannelBundle *pc
// return newly created folder id
int
-CollectionDB::addPodcastFolder( const TQString &name, const int parent_id, const bool isOpen )
+CollectionDB::addPodcastFolder( const TQString &name, const int tqparent_id, const bool isOpen )
{
- TQString command = TQString( "INSERT INTO podcastfolders ( name, parent, isOpen ) VALUES ('" );
+ TQString command = TQString( "INSERT INTO podcastfolders ( name, tqparent, isOpen ) VALUES ('" );
command += escapeString( name ) + "',";
- command += TQString::number( parent_id ) + ",";
+ command += TQString::number( tqparent_id ) + ",";
command += isOpen ? boolT() + ");" : boolF() + ");";
insert( command, NULL );
- command = TQString( "SELECT id FROM podcastfolders WHERE name = '%1' AND parent = '%2';" )
- .arg( name, TQString::number(parent_id) );
+ command = TQString( "SELECT id FROM podcastfolders WHERE name = '%1' AND tqparent = '%2';" )
+ .tqarg( name, TQString::number(tqparent_id) );
TQStringList values = query( command );
return values[0].toInt();
@@ -2833,15 +2833,15 @@ CollectionDB::updatePodcastChannel( const PodcastChannelBundle &b )
{
if( getDbConnectionType() == DbConnection::postgresql )
{
- query( QStringx( "UPDATE podcastchannels SET title='%1', weblink='%2', comment='%3', "
- "copyright='%4', parent=%5, directory='%6', autoscan=%7, fetchtype=%8, "
+ query( TQStringx( "UPDATE podcastchannels SET title='%1', weblink='%2', comment='%3', "
+ "copyright='%4', tqparent=%5, directory='%6', autoscan=%7, fetchtype=%8, "
"autotransfer=%9, haspurge=%10, purgecount=%11 WHERE url='%12';" )
.args ( TQStringList()
<< escapeString( b.title() )
<< escapeString( b.link().url() )
<< escapeString( b.description() )
<< escapeString( b.copyright() )
- << TQString::number( b.parentId() )
+ << TQString::number( b.tqparentId() )
<< escapeString( b.saveLocation() )
<< ( b.autoscan() ? boolT() : boolF() )
<< TQString::number( b.fetchType() )
@@ -2862,12 +2862,12 @@ CollectionDB::updatePodcastEpisode( const int id, const PodcastEpisodeBundle &b
{
if( getDbConnectionType() == DbConnection::postgresql )
{
- query( QStringx( "UPDATE podcastepisodes SET url='%1', localurl='%2', parent='%3', title='%4', subtitle='%5', composer='%6', comment='%7', "
+ query( TQStringx( "UPDATE podcastepisodes SET url='%1', localurl='%2', tqparent='%3', title='%4', subtitle='%5', composer='%6', comment='%7', "
"filetype='%8', createdate='%9', guid='%10', length=%11, size=%12, isNew=%13 WHERE id=%14;" )
.args( TQStringList()
<< escapeString( b.url().url() )
<< ( b.localUrl().isValid() ? escapeString( b.localUrl().url() ) : "NULL" )
- << escapeString( b.parent().url() )
+ << escapeString( b.tqparent().url() )
<< escapeString( b.title() )
<< escapeString( b.subtitle() )
<< escapeString( b.author() )
@@ -2888,25 +2888,25 @@ CollectionDB::updatePodcastEpisode( const int id, const PodcastEpisodeBundle &b
}
void
-CollectionDB::updatePodcastFolder( const int folder_id, const TQString &name, const int parent_id, const bool isOpen )
+CollectionDB::updatePodcastFolder( const int folder_id, const TQString &name, const int tqparent_id, const bool isOpen )
{
if( getDbConnectionType() == DbConnection::postgresql ) {
- query( QStringx( "UPDATE podcastfolders SET name='%1', parent=%2, isOpen=%3 WHERE id=%4;" )
+ query( TQStringx( "UPDATE podcastfolders SET name='%1', tqparent=%2, isOpen=%3 WHERE id=%4;" )
.args( TQStringList()
<< escapeString(name)
- << TQString::number(parent_id)
+ << TQString::number(tqparent_id)
<< ( isOpen ? boolT() : boolF() )
<< TQString::number(folder_id)
)
);
}
else {
- query( QStringx( "REPLACE INTO podcastfolders ( id, name, parent, isOpen ) "
+ query( TQStringx( "REPLACE INTO podcastfolders ( id, name, tqparent, isOpen ) "
"VALUES ( %1, '%2', %3, %4 );" )
.args( TQStringList()
<< TQString::number(folder_id)
<< escapeString(name)
- << TQString::number(parent_id)
+ << TQString::number(tqparent_id)
<< ( isOpen ? boolT() : boolF() )
)
);
@@ -2918,10 +2918,10 @@ CollectionDB::removePodcastChannel( const KURL &url )
{
//remove channel
query( TQString( "DELETE FROM podcastchannels WHERE url = '%1';" )
- .arg( escapeString( url.url() ) ) );
- //remove all children
- query( TQString( "DELETE FROM podcastepisodes WHERE parent = '%1';" )
- .arg( escapeString( url.url() ) ) );
+ .tqarg( escapeString( url.url() ) ) );
+ //remove all tqchildren
+ query( TQString( "DELETE FROM podcastepisodes WHERE tqparent = '%1';" )
+ .tqarg( escapeString( url.url() ) ) );
}
@@ -2931,7 +2931,7 @@ CollectionDB::removePodcastEpisode( const int id )
{
if( id < 0 ) return;
query( TQString( "DELETE FROM podcastepisodes WHERE id = '%1';" )
- .arg( TQString::number(id) ) );
+ .tqarg( TQString::number(id) ) );
}
void
@@ -2939,7 +2939,7 @@ CollectionDB::removePodcastFolder( const int id )
{
if( id < 0 ) return;
query( TQString("DELETE FROM podcastfolders WHERE id=%1;")
- .arg( TQString::number(id) ) );
+ .tqarg( TQString::number(id) ) );
}
bool
@@ -2958,15 +2958,15 @@ CollectionDB::addSong( MetaBundle* bundle, const bool incremental )
if ( title.isEmpty() )
{
title = bundle->url().fileName();
- if ( bundle->url().fileName().find( '-' ) > 0 )
+ if ( bundle->url().fileName().tqfind( '-' ) > 0 )
{
if ( artist.isEmpty() )
{
- artist = bundle->url().fileName().section( '-', 0, 0 ).stripWhiteSpace();
+ artist = TQString(bundle->url().fileName().section( '-', 0, 0 )).stripWhiteSpace();
bundle->setArtist( artist );
}
- title = bundle->url().fileName().section( '-', 1 ).stripWhiteSpace();
- title = title.left( title.findRev( '.' ) ).stripWhiteSpace();
+ title = TQString(bundle->url().fileName().section( '-', 1 )).stripWhiteSpace();
+ title = title.left( title.tqfindRev( '.' ) ).stripWhiteSpace();
if ( title.isEmpty() ) title = bundle->url().fileName();
}
bundle->setTitle( title );
@@ -3047,7 +3047,7 @@ CollectionDB::doAFTStuff( MetaBundle* bundle, const bool tempTables )
"SELECT url, uniqueid "
"FROM uniqueid%1 "
"WHERE deviceid = %2 AND url = '%3';" )
- .arg( tempTables ? "_temp" : ""
+ .tqarg( tempTables ? "_temp" : ""
, currdeviceid
, currurl ) );
@@ -3055,20 +3055,20 @@ CollectionDB::doAFTStuff( MetaBundle* bundle, const bool tempTables )
"SELECT url, uniqueid, deviceid "
"FROM uniqueid%1 "
"WHERE uniqueid = '%2';" )
- .arg( tempTables ? "_temp" : ""
+ .tqarg( tempTables ? "_temp" : ""
, currid ) );
TQStringList nonTempIDs = query( TQString(
"SELECT url, uniqueid, deviceid "
"FROM uniqueid "
"WHERE uniqueid = '%1';" )
- .arg( currid ) );
+ .tqarg( currid ) );
TQStringList nonTempURLs = query( TQString(
"SELECT url, uniqueid "
"FROM uniqueid "
"WHERE deviceid = %1 AND url = '%2';" )
- .arg( currdeviceid
+ .tqarg( currdeviceid
, currurl ) );
bool tempTablesAndInPermanent = false;
@@ -3090,7 +3090,7 @@ CollectionDB::doAFTStuff( MetaBundle* bundle, const bool tempTables )
if( !tempTablesAndInPermanent && urls.empty() && uniqueids.empty() )
{
//debug() << "first case" << endl;
- TQString insertline = QStringx( "INSERT INTO uniqueid%1 (deviceid, url, uniqueid, dir) "
+ TQString insertline = TQStringx( "INSERT INTO uniqueid%1 (deviceid, url, uniqueid, dir) "
"VALUES ( %2,'%3', '%4', '%5');" )
.args( TQStringList()
<< ( tempTables ? "_temp" : "" )
@@ -3122,8 +3122,8 @@ CollectionDB::doAFTStuff( MetaBundle* bundle, const bool tempTables )
else //it's a move, not a copy, or a copy and then both files were moved...can't detect that
{
//debug() << "stat was NOT successful, updating tables with: " << endl;
- //debug() << TQString( "UPDATE uniqueid%1 SET url='%2', dir='%3' WHERE uniqueid='%4';" ).arg( ( tempTables ? "_temp" : "" ), currurl, currdir, currid ) << endl;
- query( QStringx( "UPDATE uniqueid%1 SET deviceid = %2, url='%3', dir='%4' WHERE uniqueid='%5';" )
+ //debug() << TQString( "UPDATE uniqueid%1 SET url='%2', dir='%3' WHERE uniqueid='%4';" ).tqarg( ( tempTables ? "_temp" : "" ), currurl, currdir, currid ) << endl;
+ query( TQStringx( "UPDATE uniqueid%1 SET deviceid = %2, url='%3', dir='%4' WHERE uniqueid='%5';" )
.args( TQStringList()
<< ( tempTables ? "_temp" : "" )
<< currdeviceid
@@ -3142,7 +3142,7 @@ CollectionDB::doAFTStuff( MetaBundle* bundle, const bool tempTables )
{
//debug() << "file exists in same place as before, new uniqueid" << endl;
query( TQString( "UPDATE uniqueid%1 SET uniqueid='%2' WHERE deviceid = %3 AND url='%4';" )
- .arg( tempTables ? "_temp" : ""
+ .tqarg( tempTables ? "_temp" : ""
, currid
, currdeviceid
, currurl ) );
@@ -3161,9 +3161,9 @@ CollectionDB::doAFTStuff( MetaBundle* bundle, const bool tempTables )
{
TQString insertline = TQString( "INSERT INTO uniqueid_temp (deviceid, url, uniqueid, dir) "
"VALUES ( %1, '%2'" )
- .arg( currdeviceid
+ .tqarg( currdeviceid
, currurl );
- insertline += TQString( ", '%1', '%2');" ).arg( currid ).arg( currdir );
+ insertline += TQString( ", '%1', '%2');" ).tqarg( currid ).tqarg( currdir );
//debug() << "running command: " << insertline << endl;
insert( insertline, NULL );
//debug() << "aftCheckPermanentTables #2" << endl;
@@ -3187,10 +3187,10 @@ CollectionDB::doAFTStuff( MetaBundle* bundle, const bool tempTables )
{
//debug() << "stat part 2 was NOT successful, updating tables with: " << endl;
query( TQString( "DELETE FROM uniqueid WHERE uniqueid='%1';" )
- .arg( currid ) );
+ .tqarg( currid ) );
query( TQString( "INSERT INTO uniqueid_temp (deviceid, url, uniqueid, dir) "
"VALUES ( %1, '%2', '%3', '%4')" )
- .arg( currdeviceid
+ .tqarg( currdeviceid
, currurl
, currid
, currdir ) );
@@ -3202,10 +3202,10 @@ CollectionDB::doAFTStuff( MetaBundle* bundle, const bool tempTables )
{
//debug() << "file exists in same place as before, part 2, new uniqueid" << endl;
query( TQString( "DELETE FROM uniqueid WHERE deviceid = %1 AND url='%2';" )
- .arg( currdeviceid )
- .arg( currurl ) );
+ .tqarg( currdeviceid )
+ .tqarg( currurl ) );
query( TQString( "INSERT INTO uniqueid_temp (deviceid, url, uniqueid, dir) VALUES ( %1, '%2', '%3', '%4')" )
- .arg( currdeviceid
+ .tqarg( currdeviceid
, currurl
, currid
, currdir ) );
@@ -3234,7 +3234,7 @@ CollectionDB::emitFileAdded( const TQString &absPath, const TQString &uniqueid )
emit fileAdded( absPath, uniqueid );
}
-QString
+TQString
CollectionDB::urlFromUniqueId( const TQString &id )
{
bool scanning = ( ScanController::instance() && ScanController::instance()->tablesCreated() );
@@ -3242,15 +3242,15 @@ CollectionDB::urlFromUniqueId( const TQString &id )
"SELECT deviceid, url "
"FROM uniqueid%1 "
"WHERE uniqueid = '%2';" )
- .arg( scanning ? "_temp" : TQString::null )
- .arg( id ), true );
+ .tqarg( scanning ? "_temp" : TQString() )
+ .tqarg( id ), true );
if( urls.empty() && scanning )
urls = query( TQString(
"SELECT deviceid, url "
"FROM uniqueid "
"WHERE uniqueid = '%1';" )
- .arg( id ) );
+ .tqarg( id ) );
if( urls.empty() )
return TQString();
@@ -3258,7 +3258,7 @@ CollectionDB::urlFromUniqueId( const TQString &id )
return MountPointManager::instance()->getAbsolutePath( urls[0].toInt(), urls[1] );
}
-QString
+TQString
CollectionDB::uniqueIdFromUrl( const KURL &url )
{
MountPointManager *mpm = MountPointManager::instance();
@@ -3270,17 +3270,17 @@ CollectionDB::uniqueIdFromUrl( const KURL &url )
"SELECT uniqueid "
"FROM uniqueid%1 "
"WHERE deviceid = %2 AND url = '%3';" )
- .arg( scanning ? "_temp" : TQString::null )
- .arg( currdeviceid )
- .arg( currurl ), true );
+ .tqarg( scanning ? "_temp" : TQString() )
+ .tqarg( currdeviceid )
+ .tqarg( currurl ), true );
if( uid.empty() && scanning )
uid = query( TQString(
"SELECT uniqueid "
"FROM uniqueid "
"WHERE deviceid = %1 AND url = '%2';" )
- .arg( currdeviceid )
- .arg( currurl ) );
+ .tqarg( currdeviceid )
+ .tqarg( currurl ) );
if( uid.empty() )
return TQString();
@@ -3288,7 +3288,7 @@ CollectionDB::uniqueIdFromUrl( const KURL &url )
return uid[0];
}
-QString
+TQString
CollectionDB::getURL( const MetaBundle &bundle )
{
uint artID = artistID( bundle.artist(), false );
@@ -3303,10 +3303,10 @@ CollectionDB::getURL( const MetaBundle &bundle )
"FROM tags "
"WHERE tags.album = '%1' AND tags.artist = '%2' AND tags.track = '%3' AND tags.title = '%4'" +
deviceidSelection() + ';' )
- .arg( albID )
- .arg( artID )
- .arg( bundle.track() )
- .arg( escapeString( bundle.title() ) );
+ .tqarg( albID )
+ .tqarg( artID )
+ .tqarg( bundle.track() )
+ .tqarg( escapeString( bundle.title() ) );
TQStringList urls = URLsFromQuery( query( q ) );
@@ -3443,8 +3443,8 @@ CollectionDB::bundleForUrl( MetaBundle* bundle )
"album, artist, composer, genre, year "
"WHERE album.id = tags.album AND artist.id = tags.artist AND composer.id = tags.composer AND "
"genre.id = tags.genre AND year.id = tags.year AND tags.url = '%2' AND tags.deviceid = %1;" )
- .arg( deviceid )
- .arg( escapeString( rpath.path( ) ) ) );
+ .tqarg( deviceid )
+ .tqarg( escapeString( rpath.path( ) ) ) );
bool valid = false;
@@ -3577,7 +3577,7 @@ CollectionDB::bundlesByUrls( const KURL::List& urls )
b.setUrl( url );
// FIXME: more context for i18n after string freeze
b.setTitle( TQString( "%1 %2 %3%4" )
- .arg( url.filename(),
+ .tqarg( url.filename(),
i18n( "from" ),
url.hasHost() ? url.host() : TQString(),
url.directory( false ) ) );
@@ -3633,11 +3633,11 @@ CollectionDB::addAudioproperties( const MetaBundle& bundle )
KURL rpath;
MountPointManager::instance()->getRelativePath( deviceid, bundle.url(), rpath );
query( TQString( "UPDATE tags SET bitrate='%1', length='%2', samplerate='%3' WHERE url='%5' AND deviceid = %4;" )
- .arg( bundle.bitrate() )
- .arg( bundle.length() )
- .arg( bundle.sampleRate() )
- .arg( deviceid )
- .arg( escapeString( rpath.path() ) ) );
+ .tqarg( bundle.bitrate() )
+ .tqarg( bundle.length() )
+ .tqarg( bundle.sampleRate() )
+ .tqarg( deviceid )
+ .tqarg( escapeString( rpath.path() ) ) );
}
@@ -3655,7 +3655,7 @@ CollectionDB::addSongPercentage( const TQString &url, float percentage,
query( TQString(
"SELECT playcounter, createdate, percentage, rating FROM statistics "
"WHERE url = '%2' AND deviceid = %1;" )
- .arg( statDevId ).arg( escapeString( statRPath ) ) );
+ .tqarg( statDevId ).tqarg( escapeString( statRPath ) ) );
//handle corner case: deviceid!=-1 but there is a statistics row for that song with deviceid -1
if ( values.isEmpty() )
@@ -3664,7 +3664,7 @@ CollectionDB::addSongPercentage( const TQString &url, float percentage,
values = query( TQString(
"SELECT playcounter, createdate, percentage, rating FROM statistics "
"WHERE url = '%1' AND deviceid = -1;" )
- .arg( escapeString( rpath2 ) ) );
+ .tqarg( escapeString( rpath2 ) ) );
if ( !values.isEmpty() )
{
statRPath = rpath2;
@@ -3672,7 +3672,7 @@ CollectionDB::addSongPercentage( const TQString &url, float percentage,
}
}
- uint atime = playtime ? playtime->toTime_t() : TQDateTime::currentDateTime().toTime_t();
+ uint atime = playtime ? playtime->toTime_t() : TQDateTime::tqcurrentDateTime().toTime_t();
// check boundaries
if ( percentage > 100.f ) percentage = 100.f;
@@ -3683,21 +3683,21 @@ CollectionDB::addSongPercentage( const TQString &url, float percentage,
// increment playcounter and update accesstime
query( TQString( "UPDATE statistics SET playcounter=%1, accessdate=%2 WHERE url='%4' AND deviceid= %3;" )
- .arg( values[0] + " + 1" )
- .arg( atime )
- .arg( statDevId )
- .arg( escapeString( statRPath ) ) );
+ .tqarg( values[0] + " + 1" )
+ .tqarg( atime )
+ .tqarg( statDevId )
+ .tqarg( escapeString( statRPath ) ) );
}
else
{
insert( TQString( "INSERT INTO statistics ( url, deviceid, createdate, accessdate, percentage, playcounter, rating, uniqueid, deleted ) "
"VALUES ( '%6', %5, %1, %2, 0, 1, 0, %3, %4 );" )
- .arg( atime )
- .arg( atime )
- .arg( ( getUniqueId( url ).isNull() ? "NULL" : '\'' + escapeString( getUniqueId( url ) ) + '\'' ) )
- .arg( boolF() )
- .arg( statDevId )
- .arg( escapeString( statRPath ) ), 0 );
+ .tqarg( atime )
+ .tqarg( atime )
+ .tqarg( ( getUniqueId( url ).isNull() ? "NULL" : '\'' + escapeString( getUniqueId( url ) ) + '\'' ) )
+ .tqarg( boolF() )
+ .tqarg( statDevId )
+ .tqarg( escapeString( statRPath ) ), 0 );
}
double prevscore = 50;
@@ -3711,7 +3711,7 @@ CollectionDB::addSongPercentage( const TQString &url, float percentage,
prevscore = values[ 2 ].toDouble();
}
const TQStringList v = query( TQString( "SELECT length FROM tags WHERE url = '%2' AND deviceid = %1;" )
- .arg( deviceid ).arg( escapeString( rpath ) ) );
+ .tqarg( deviceid ).tqarg( escapeString( rpath ) ) );
const int length = v.isEmpty() ? 0 : v.first().toInt();
ScriptManager::instance()->requestNewScore( url, prevscore, playcount, length, percentage, reason );
@@ -3756,7 +3756,7 @@ CollectionDB::setSongPercentage( const TQString &url , float percentage)
TQStringList values =
query( TQString(
"SELECT playcounter, createdate, accessdate, rating FROM statistics WHERE url = '%2' AND deviceid = %1;" )
- .arg( deviceid ).arg( escapeString( rpath ) ) );
+ .tqarg( deviceid ).tqarg( escapeString( rpath ) ) );
//handle corner case: deviceid!=-1 but there is a statistics row for that song with deviceid -1
if ( values.isEmpty() )
@@ -3765,7 +3765,7 @@ CollectionDB::setSongPercentage( const TQString &url , float percentage)
values = query( TQString(
"SELECT playcounter, createdate, accessdate, rating FROM statistics "
"WHERE url = '%1' AND deviceid = -1;" )
- .arg( escapeString( rpath2 ) ) );
+ .tqarg( escapeString( rpath2 ) ) );
if ( !values.isEmpty() )
{
rpath = rpath2;
@@ -3780,20 +3780,20 @@ CollectionDB::setSongPercentage( const TQString &url , float percentage)
if ( !values.isEmpty() )
{
query( TQString( "UPDATE statistics SET percentage=%1 WHERE url='%3' AND deviceid = %2;" )
- .arg( percentage )
- .arg( deviceid ).arg( escapeString( rpath ) ) );
+ .tqarg( percentage )
+ .tqarg( deviceid ).tqarg( escapeString( rpath ) ) );
}
else
{
insert( TQString( "INSERT INTO statistics ( url, deviceid, createdate, accessdate, percentage, playcounter, rating, uniqueid, deleted ) "
"VALUES ( '%7', %6, %2, %3, %1, 0, 0, %3, %4 );" )
- .arg( percentage )
- .arg( TQDateTime::currentDateTime().toTime_t() )
- .arg( 0 )
- .arg( ( getUniqueId( url ).isNull() ? "NULL" : '\'' + escapeString( getUniqueId( url ) ) + '\'' ) )
- .arg( boolF() )
- .arg( deviceid )
- .arg( escapeString( rpath ) ),0 );
+ .tqarg( percentage )
+ .tqarg( TQDateTime::tqcurrentDateTime().toTime_t() )
+ .tqarg( 0 )
+ .tqarg( ( getUniqueId( url ).isNull() ? "NULL" : '\'' + escapeString( getUniqueId( url ) ) + '\'' ) )
+ .tqarg( boolF() )
+ .tqarg( deviceid )
+ .tqarg( escapeString( rpath ) ),0 );
}
emit scoreChanged( url, percentage );
@@ -3807,8 +3807,8 @@ CollectionDB::setSongRating( const TQString &url, int rating, bool toggleHalf )
TQStringList values =
query( TQString(
"SELECT playcounter, createdate, accessdate, percentage, rating FROM statistics WHERE url = '%2' AND deviceid = %1;" )
- .arg( deviceid )
- .arg( escapeString( rpath ) ) );
+ .tqarg( deviceid )
+ .tqarg( escapeString( rpath ) ) );
//handle corner case: deviceid!=-1 but there is a statistics row for that song with deviceid -1
if( values.isEmpty() )
@@ -3817,7 +3817,7 @@ CollectionDB::setSongRating( const TQString &url, int rating, bool toggleHalf )
values = query( TQString(
"SELECT playcounter, createdate, accessdate, percentage, rating FROM statistics "
"WHERE url = '%1' AND deviceid = -1;" )
- .arg( escapeString( rpath2 ) ) );
+ .tqarg( escapeString( rpath2 ) ) );
if ( !values.isEmpty() )
{
rpath = rpath2;
@@ -3847,21 +3847,21 @@ CollectionDB::setSongRating( const TQString &url, int rating, bool toggleHalf )
if ( !values.isEmpty() )
{
query( TQString( "UPDATE statistics SET rating=%1 WHERE url='%3' AND deviceid = %2;" )
- .arg( rating )
- .arg( deviceid )
- .arg( escapeString( rpath ) ) );
+ .tqarg( rating )
+ .tqarg( deviceid )
+ .tqarg( escapeString( rpath ) ) );
}
else
{
insert( TQString( "INSERT INTO statistics ( url, deviceid, createdate, accessdate, percentage, rating, playcounter, uniqueid, deleted ) "
"VALUES ( '%7', %6, %2, %3, 0, %1, 0, %4, %5 );" )
- .arg( rating )
- .arg( TQDateTime::currentDateTime().toTime_t() )
- .arg( 0 )
- .arg( ( getUniqueId( url ).isNull() ? "NULL" : '\'' + escapeString( getUniqueId( url ) ) + '\'' ) )
- .arg( boolF() )
- .arg( deviceid )
- .arg( escapeString( rpath ) ), NULL );
+ .tqarg( rating )
+ .tqarg( TQDateTime::tqcurrentDateTime().toTime_t() )
+ .tqarg( 0 )
+ .tqarg( ( getUniqueId( url ).isNull() ? "NULL" : '\'' + escapeString( getUniqueId( url ) ) + '\'' ) )
+ .tqarg( boolF() )
+ .tqarg( deviceid )
+ .tqarg( escapeString( rpath ) ), NULL );
}
emit ratingChanged( url, rating );
@@ -3880,7 +3880,7 @@ CollectionDB::getPlayCount( const TQString &url )
return 0;
}
-QDateTime
+TQDateTime
CollectionDB::getFirstPlay( const TQString &url )
{
QueryBuilder qb;
@@ -3893,7 +3893,7 @@ CollectionDB::getFirstPlay( const TQString &url )
return dt;
}
-QDateTime
+TQDateTime
CollectionDB::getLastPlay( const TQString &url )
{
QueryBuilder qb;
@@ -3923,43 +3923,43 @@ CollectionDB::migrateFile( const TQString &oldURL, const TQString &newURL )
// Ensure destination is clear.
query( TQString( "DELETE FROM tags WHERE url = '%2' AND deviceid = %1;" )
- .arg( newMediaid ).arg( escapeString( newRpath ) ) );
+ .tqarg( newMediaid ).tqarg( escapeString( newRpath ) ) );
query( TQString( "DELETE FROM statistics WHERE url = '%2' AND deviceid = %1;" )
- .arg( newMediaid ).arg( escapeString( newRpath ) ) );
+ .tqarg( newMediaid ).tqarg( escapeString( newRpath ) ) );
query( TQString( "DELETE FROM tags_labels WHERE url = '%2' and deviceid = %1;" )
- .arg( newMediaid).arg( escapeString( newRpath ) ) );
+ .tqarg( newMediaid).tqarg( escapeString( newRpath ) ) );
if ( !getLyrics( oldURL ).isEmpty() )
query( TQString( "DELETE FROM lyrics WHERE url = '%2' AND deviceid = %1;" )
- .arg( newMediaid ).arg( escapeString( newRpath ) ) );
+ .tqarg( newMediaid ).tqarg( escapeString( newRpath ) ) );
// Migrate
//code looks ugly but prevents problems when the URL contains HTTP escaped characters
query( TQString( "UPDATE tags SET url = '%3', deviceid = %1" )
- .arg( newMediaid ).arg( escapeString( newRpath ) )
+ .tqarg( newMediaid ).tqarg( escapeString( newRpath ) )
+ TQString( " WHERE deviceid=%1 AND url = '%2';" )
- .arg( oldMediaid ).arg( escapeString( oldRpath ) ) );
+ .tqarg( oldMediaid ).tqarg( escapeString( oldRpath ) ) );
query( TQString( "UPDATE statistics SET url = '%2', deviceid = %1" )
- .arg( newMediaid ).arg( escapeString( newRpath ) )
+ .tqarg( newMediaid ).tqarg( escapeString( newRpath ) )
+ TQString( " WHERE deviceid=%1 AND url = '%2';" )
- .arg( oldMediaid ).arg( escapeString( oldRpath ) ) );
+ .tqarg( oldMediaid ).tqarg( escapeString( oldRpath ) ) );
query( TQString( "UPDATE lyrics SET url = '%2', deviceid = %1" )
- .arg( newMediaid ).arg( escapeString( newRpath ) )
+ .tqarg( newMediaid ).tqarg( escapeString( newRpath ) )
+ TQString( " WHERE deviceid=%1 AND url = '%2';" )
- .arg( oldMediaid ).arg( escapeString( oldRpath ) ) );
+ .tqarg( oldMediaid ).tqarg( escapeString( oldRpath ) ) );
query( TQString( "UPDATE tags_labels SET url = '%2', deviceid = %1 WHERE deviceid = %3 AND url = '%4';" )
- .arg( TQString::number( newMediaid ), escapeString( newRpath ), TQString::number( oldMediaid ), escapeString( oldRpath ) ) );
+ .tqarg( TQString::number( newMediaid ), escapeString( newRpath ), TQString::number( oldMediaid ), escapeString( oldRpath ) ) );
query( TQString( "UPDATE uniqueid SET url = '%1', deviceid = %2 WHERE url = '%3' AND deviceid = %4;" )
- .arg( escapeString( newRpath ), TQString::number( newMediaid ),
+ .tqarg( escapeString( newRpath ), TQString::number( newMediaid ),
escapeString( oldRpath ), TQString::number( oldMediaid ) ) );
query( TQString( "UPDATE playlists SET url = '%1' WHERE url = '%2';" )
- .arg( escapeString( newURL ),
+ .tqarg( escapeString( newURL ),
escapeString( oldURL ) ) );
}
@@ -4002,7 +4002,7 @@ CollectionDB::organizeFile( const KURL &src, OrganizeCollectionDialog &dialog, b
int count = 0;
do
{
- tmp = TQString( dialog.folderCombo->currentText() + "/amarok-tmp-%1." + extension ).arg( count );
+ tmp = TQString( dialog.folderCombo->currentText() + "/amarok-tmp-%1." + extension ).tqarg( count );
count++;
} while( TQFile::exists( tmp ) );
tmpSrc = KURL::fromPathOrURL( tmp );
@@ -4024,7 +4024,7 @@ CollectionDB::organizeFile( const KURL &src, OrganizeCollectionDialog &dialog, b
{
disconnect( job, TQT_SIGNAL(result( KIO::Job * )), this, TQT_SLOT(fileOperationResult( KIO::Job * )) );
- TQString partFile = TQString( "%1.part" ).arg( (job->destURL()).path() );
+ TQString partFile = TQString( "%1.part" ).tqarg( (job->destURL()).path() );
job->kill();
TQFile file( partFile );
if( file.exists() ) file.remove();
@@ -4035,7 +4035,7 @@ CollectionDB::organizeFile( const KURL &src, OrganizeCollectionDialog &dialog, b
}
usleep( 10000 );
- kapp->processEvents( 100 );
+ kapp->tqprocessEvents( 100 );
}
if( m_fileOperationFailed )
@@ -4125,7 +4125,7 @@ CollectionDB::moveFile( const TQString &src, const TQString &dest, bool overwrit
// Get just the directory.
KURL dir = dstURL;
- dir.setFileName(TQString::null);
+ dir.setFileName(TQString());
// Create the directory.
if(!KStandardDirs::exists(dir.path()))
@@ -4151,7 +4151,7 @@ CollectionDB::moveFile( const TQString &src, const TQString &dest, bool overwrit
{
disconnect( job, TQT_SIGNAL(result( KIO::Job * )), this, TQT_SLOT(fileOperationResult( KIO::Job * )) );
- TQString partFile = TQString( "%1.part" ).arg( (job->destURL()).path() );
+ TQString partFile = TQString( "%1.part" ).tqarg( (job->destURL()).path() );
job->kill();
TQFile file( partFile );
if( file.exists() ) file.remove();
@@ -4162,7 +4162,7 @@ CollectionDB::moveFile( const TQString &src, const TQString &dest, bool overwrit
}
usleep( 10000 );
- kapp->processEvents( 100 );
+ kapp->tqprocessEvents( 100 );
}
if( !m_fileOperationFailed )
@@ -4215,35 +4215,35 @@ CollectionDB::updateDirStats( TQString path, const long datetime, const bool tem
// REPLACE INTO is not valid SQL for postgres, so we need to check whether we
// should UPDATE() or INSERT()
TQStringList values = query( TQString("SELECT * FROM directories%1 WHERE dir='%3' AND deviceid=%2;")
- .arg( temporary ? "_temp" : "")
- .arg( deviceid )
- .arg( escapeString( rpath ) ) );
+ .tqarg( temporary ? "_temp" : "")
+ .tqarg( deviceid )
+ .tqarg( escapeString( rpath ) ) );
if(values.count() > 0 )
{
query( TQString( "UPDATE directories%1 SET changedate=%2 WHERE dir='%4'AND deviceid=%3;")
- .arg( temporary ? "_temp" : "" )
- .arg( datetime )
- .arg( deviceid )
- .arg( escapeString( rpath ) ) );
+ .tqarg( temporary ? "_temp" : "" )
+ .tqarg( datetime )
+ .tqarg( deviceid )
+ .tqarg( escapeString( rpath ) ) );
}
else
{
query( TQString( "INSERT INTO directories%1 (dir, deviceid,changedate) VALUES ('%4', %3, '%2');")
- .arg( temporary ? "_temp" : "")
- .arg( datetime )
- .arg( deviceid )
- .arg( escapeString( rpath ) ) );
+ .tqarg( temporary ? "_temp" : "")
+ .tqarg( datetime )
+ .tqarg( deviceid )
+ .tqarg( escapeString( rpath ) ) );
}
}
else
{
query( TQString( "REPLACE INTO directories%1 ( dir, deviceid, changedate ) VALUES ( '%4', %3, %2 );" )
- .arg( temporary ? "_temp" : "" )
- .arg( datetime )
- .arg( deviceid )
- .arg( escapeString( rpath ) ) );
+ .tqarg( temporary ? "_temp" : "" )
+ .tqarg( datetime )
+ .tqarg( deviceid )
+ .tqarg( escapeString( rpath ) ) );
}
INotify::instance()->watchDir( path );
@@ -4266,8 +4266,8 @@ CollectionDB::removeSongsInDir( TQString path, TQMap *tagsRem
"LEFT JOIN uniqueid ON uniqueid.url = tags.url "
"AND uniqueid.deviceid = tags.deviceid "
"WHERE tags.dir = '%2' AND tags.deviceid = %1" )
- .arg( deviceid )
- .arg( escapeString( rpath ) ) );
+ .tqarg( deviceid )
+ .tqarg( escapeString( rpath ) ) );
TQStringList::ConstIterator it = result.begin(), end = result.end();
while( it != end )
{
@@ -4280,12 +4280,12 @@ CollectionDB::removeSongsInDir( TQString path, TQMap *tagsRem
}
query( TQString( "DELETE FROM tags WHERE dir = '%2' AND deviceid = %1;" )
- .arg( deviceid )
- .arg( escapeString( rpath ) ) );
+ .tqarg( deviceid )
+ .tqarg( escapeString( rpath ) ) );
query( TQString( "DELETE FROM uniqueid WHERE dir = '%2' AND deviceid = %1;" )
- .arg( deviceid )
- .arg( escapeString( rpath ) ) );
+ .tqarg( deviceid )
+ .tqarg( escapeString( rpath ) ) );
}
@@ -4299,8 +4299,8 @@ CollectionDB::isDirInCollection( TQString path )
TQStringList values =
query( TQString( "SELECT changedate FROM directories WHERE dir = '%2' AND deviceid = %1;" )
- .arg( deviceid )
- .arg( escapeString( rpath ) ) );
+ .tqarg( deviceid )
+ .tqarg( escapeString( rpath ) ) );
return !values.isEmpty();
}
@@ -4313,8 +4313,8 @@ CollectionDB::isFileInCollection( const TQString &url )
TQString rpath = MountPointManager::instance()->getRelativePath( deviceid, url );
TQString sql = TQString( "SELECT url FROM tags WHERE url = '%2' AND deviceid = %1" )
- .arg( deviceid )
- .arg( escapeString( rpath ) );
+ .tqarg( deviceid )
+ .tqarg( escapeString( rpath ) );
if ( deviceid == -1 )
{
sql += ';';
@@ -4323,7 +4323,7 @@ CollectionDB::isFileInCollection( const TQString &url )
{
TQString rpath2 = '.' + url;
sql += TQString( " OR url = '%1' AND deviceid = -1;" )
- .arg( escapeString( rpath2 ) );
+ .tqarg( escapeString( rpath2 ) );
}
TQStringList values = query( sql );
@@ -4340,26 +4340,26 @@ CollectionDB::removeSongs( const KURL::List& urls )
TQString rpath = MountPointManager::instance()->getRelativePath( deviceid, (*it).path() );
query( TQString( "DELETE FROM tags WHERE url = '%2' AND deviceid = %1;" )
- .arg( deviceid )
- .arg( escapeString( rpath ) ) );
+ .tqarg( deviceid )
+ .tqarg( escapeString( rpath ) ) );
query( TQString( "DELETE FROM uniqueid WHERE url = '%2' AND deviceid = %1;" )
- .arg( deviceid )
- .arg( escapeString( rpath ) ) );
+ .tqarg( deviceid )
+ .tqarg( escapeString( rpath ) ) );
query( TQString( "UPDATE statistics SET deleted = %1 WHERE url = '%3' AND deviceid = %2;" )
- .arg( boolT() )
- .arg( deviceid )
- .arg( escapeString( rpath ) ) );
+ .tqarg( boolT() )
+ .tqarg( deviceid )
+ .tqarg( escapeString( rpath ) ) );
}
}
-QStringList
+TQStringList
CollectionDB::similarArtists( const TQString &artist, uint count )
{
TQStringList values;
values = query( TQString( "SELECT suggestion FROM related_artists WHERE artist = '%1' ORDER BY %2 LIMIT %3 OFFSET 0;" )
- .arg( escapeString( artist ), randomFunc(), TQString::number( count ) ) );
+ .tqarg( escapeString( artist ), randomFunc(), TQString::number( count ) ) );
if ( values.isEmpty() )
Scrobbler::instance()->similarArtists( artist );
@@ -4371,7 +4371,7 @@ CollectionDB::similarArtists( const TQString &artist, uint count )
void
CollectionDB::sanitizeCompilations()
{
- query( TQString( "UPDATE tags_temp SET sampler = %1 WHERE sampler IS NULL;").arg( boolF() ) );
+ query( TQString( "UPDATE tags_temp SET sampler = %1 WHERE sampler IS NULL;").tqarg( boolF() ) );
}
void
@@ -4385,9 +4385,9 @@ CollectionDB::checkCompilations( const TQString &path, const bool temporary )
TQString rpath = MountPointManager::instance()->getRelativePath( deviceid, path );
albums = query( TQString( "SELECT DISTINCT album.name FROM tags_temp, album%1 AS album WHERE tags_temp.dir = '%3' AND tags_temp.deviceid = %2 AND album.id = tags_temp.album AND tags_temp.sampler IS NULL;" )
- .arg( temporary ? "_temp" : "" )
- .arg( deviceid )
- .arg( escapeString( rpath ) ) );
+ .tqarg( temporary ? "_temp" : "" )
+ .tqarg( deviceid )
+ .tqarg( escapeString( rpath ) ) );
for ( uint i = 0; i < albums.count(); i++ )
{
@@ -4395,17 +4395,17 @@ CollectionDB::checkCompilations( const TQString &path, const bool temporary )
const uint album_id = albumID( albums[ i ], false, temporary, true );
artists = query( TQString( "SELECT DISTINCT artist.name FROM tags_temp, artist%1 AS artist WHERE tags_temp.album = '%2' AND tags_temp.artist = artist.id;" )
- .arg( temporary ? "_temp" : "" )
- .arg( album_id ) );
+ .tqarg( temporary ? "_temp" : "" )
+ .tqarg( album_id ) );
dirs = query( TQString( "SELECT DISTINCT dir FROM tags_temp WHERE album = '%1';" )
- .arg( album_id ) );
+ .tqarg( album_id ) );
if ( artists.count() > dirs.count() )
{
debug() << "Detected compilation: " << albums[ i ] << " - " << artists.count() << ':' << dirs.count() << endl;
}
query( TQString( "UPDATE tags_temp SET sampler = %1 WHERE album = '%2' AND sampler IS NULL;" )
- .arg(artists.count() > dirs.count() ? boolT() : boolF()).arg( album_id ) );
+ .tqarg(artists.count() > dirs.count() ? boolT() : boolF()).tqarg( album_id ) );
}
}
@@ -4420,7 +4420,7 @@ CollectionDB::setCompilation( const KURL::List &urls, bool enabled, bool updateV
TQString rpath = MountPointManager::instance()->getRelativePath( deviceid, url );
query( TQString( "UPDATE tags SET sampler = %1 WHERE tags.url = '%2' AND tags.deviceid = %3;" )
- .arg( ( enabled ? boolT() : boolF() ), escapeString( rpath ), TQString::number( deviceid ) ) );
+ .tqarg( ( enabled ? boolT() : boolF() ), escapeString( rpath ), TQString::number( deviceid ) ) );
}
// Update the Collection-Browser view,
@@ -4439,12 +4439,12 @@ CollectionDB::removeDirFromCollection( TQString path )
TQString rpath = MountPointManager::instance()->getRelativePath( deviceid, path );
query( TQString( "DELETE FROM directories WHERE dir = '%2' AND deviceid = %1;" )
- .arg( deviceid )
- .arg( escapeString( rpath ) ) );
+ .tqarg( deviceid )
+ .tqarg( escapeString( rpath ) ) );
}
-QString
+TQString
CollectionDB::IDFromExactValue( TQString table, TQString value, bool autocreate, bool temporary /* = false */ )
{
if ( temporary )
@@ -4452,14 +4452,14 @@ CollectionDB::IDFromExactValue( TQString table, TQString value, bool autocreate,
table.append( "_temp" );
}
- TQString querystr( TQString( "SELECT id FROM %1 WHERE name " ).arg( table ) );
+ TQString querystr( TQString( "SELECT id FROM %1 WHERE name " ).tqarg( table ) );
querystr += exactCondition( value ) + ';';
TQStringList result = query( querystr );
if ( result.isEmpty() )
{
if ( autocreate )
return TQString::number( insert( TQString( "INSERT INTO %1 ( name ) VALUES ( '%2' );" )
- .arg( table, escapeString( value ) ),
+ .tqarg( table, escapeString( value ) ),
table ) );
else
return 0;
@@ -4475,17 +4475,17 @@ CollectionDB::IDFromExactValue( TQString table, TQString value, bool autocreate,
void
CollectionDB::deleteRedundantName( const TQString &table, const TQString &id )
{
- TQString querystr( TQString( "SELECT %1 FROM tags WHERE tags.%1 = %2 LIMIT 1;" ).arg( table, id ) );
+ TQString querystr( TQString( "SELECT %1 FROM tags WHERE tags.%1 = %2 LIMIT 1;" ).tqarg( table, id ) );
TQStringList result = query( querystr );
if ( result.isEmpty() )
- query( TQString( "DELETE FROM %1 WHERE id = %2;" ).arg( table,id ) );
+ query( TQString( "DELETE FROM %1 WHERE id = %2;" ).tqarg( table,id ) );
}
void
CollectionDB::deleteAllRedundant( const TQString &table )
{
//This works with MySQL4. I thought it might not do, due to the comment in copyTempTables
- query( TQString( "DELETE FROM %1 WHERE id NOT IN ( SELECT %2 FROM tags )" ).arg( table, table ) );
+ query( TQString( "DELETE FROM %1 WHERE id NOT IN ( SELECT %2 FROM tags )" ).tqarg( table, table ) );
}
@@ -4624,14 +4624,14 @@ CollectionDB::updateURL( const TQString &url, const bool updateView )
doAFTStuff( &bundle, false );
}
-QString
+TQString
CollectionDB::getUniqueId( const TQString &url )
{
int deviceid = MountPointManager::instance()->getIdForUrl( url );
TQString rpath = MountPointManager::instance()->getRelativePath( deviceid, url );
TQStringList values = query( TQString( "SELECT uniqueid FROM uniqueid WHERE deviceid = %1 AND url = '%2';" )
- .arg( deviceid )
- .arg( escapeString( rpath ) ));
+ .tqarg( deviceid )
+ .tqarg( escapeString( rpath ) ));
if( !values.empty() )
return values[0];
else
@@ -4645,65 +4645,65 @@ CollectionDB::setLyrics( const TQString &url, const TQString &lyrics, const TQSt
TQString rpath = MountPointManager::instance()->getRelativePath( deviceid, url );
TQStringList values = query(TQString("SELECT lyrics FROM lyrics WHERE url = '%2' AND deviceid = %1;")
- .arg( deviceid ).arg( escapeString( rpath ) ) );
+ .tqarg( deviceid ).tqarg( escapeString( rpath ) ) );
if(values.count() > 0)
{
if ( !lyrics.isEmpty() )
query( TQString( "UPDATE lyrics SET lyrics = '%1' WHERE url = '%3' AND deviceid = %2;" )
- .arg( escapeString( lyrics), TQString::number(deviceid), escapeString( rpath ) ) );
+ .tqarg( escapeString( lyrics), TQString::number(deviceid), escapeString( rpath ) ) );
else
query( TQString( "DELETE FROM lyrics WHERE url = '%2' AND deviceid = %1;" )
- .arg( deviceid).arg( escapeString( rpath ) ) );
+ .tqarg( deviceid).tqarg( escapeString( rpath ) ) );
}
else
{
insert( TQString( "INSERT INTO lyrics (deviceid, url, lyrics, uniqueid) values ( %1, '%2', '%3', '%4' );" )
- .arg( TQString::number(deviceid), escapeString( rpath ), escapeString( lyrics ), escapeString( uniqueid ) ), NULL);
+ .tqarg( TQString::number(deviceid), escapeString( rpath ), escapeString( lyrics ), escapeString( uniqueid ) ), NULL);
}
}
-QString
+TQString
CollectionDB::getLyrics( const TQString &url )
{
int deviceid = MountPointManager::instance()->getIdForUrl( url );
TQString rpath = MountPointManager::instance()->getRelativePath( deviceid, url );
TQStringList values = query( TQString( "SELECT lyrics FROM lyrics WHERE url = '%2' AND deviceid = %1;" )
- .arg( deviceid ).arg( escapeString( rpath ) ) );
+ .tqarg( deviceid ).tqarg( escapeString( rpath ) ) );
return values[0];
}
void CollectionDB::removeInvalidAmazonInfo( const TQString& md5sum )
{
- query( TQString( "DELETE FROM amazon WHERE filename='%1'" ).arg( md5sum ) );
+ query( TQString( "DELETE FROM amazon WHERE filename='%1'" ).tqarg( md5sum ) );
}
void CollectionDB::newAmazonReloadDate( const TQString& asin, const TQString& locale, const TQString& md5sum)
{
TQStringList values = query(TQString("SELECT filename FROM amazon WHERE filename = '%1'")
- .arg(md5sum));
+ .tqarg(md5sum));
if(values.count() > 0)
{
query( TQString("UPDATE amazon SET asin = '%1', locale = '%2', refetchdate = '%3' WHERE filename = '%4'")
- .arg(asin)
- .arg(locale)
- .arg(TQDateTime::currentDateTime().addDays(80).toTime_t())
- .arg(md5sum));
+ .tqarg(asin)
+ .tqarg(locale)
+ .tqarg(TQDateTime::tqcurrentDateTime().addDays(80).toTime_t())
+ .tqarg(md5sum));
}
else
{
insert( TQString( "INSERT INTO amazon ( asin, locale, filename, refetchdate ) VALUES ( '%1', '%2', '%3', '%4');" )
- .arg(asin)
- .arg(locale)
- .arg(md5sum)
- .arg(TQDateTime::currentDateTime().addDays(80).toTime_t()), NULL );
+ .tqarg(asin)
+ .tqarg(locale)
+ .tqarg(md5sum)
+ .tqarg(TQDateTime::tqcurrentDateTime().addDays(80).toTime_t()), NULL );
}
}
TQStringList CollectionDB::staleImages()
{
return query(TQString("SELECT asin, locale, filename FROM amazon WHERE refetchdate < %1 ;")
- .arg(TQDateTime::currentDateTime().toTime_t() ));
+ .tqarg(TQDateTime::tqcurrentDateTime().toTime_t() ));
}
void
@@ -4795,9 +4795,9 @@ DbConnection * CollectionDB::getMyConnection()
DbConnection *dbConn;
TQThread *currThread = ThreadManager::Thread::getRunning();
- if (threadConnections->contains(currThread))
+ if (threadConnections->tqcontains(currThread))
{
- TQMap::Iterator it = threadConnections->find(currThread);
+ TQMap::Iterator it = threadConnections->tqfind(currThread);
dbConn = it.data();
connectionMutex->unlock();
return dbConn;
@@ -4834,9 +4834,9 @@ CollectionDB::releasePreviousConnection(TQThread *currThread)
//if something already exists, delete the object, and erase knowledge of it from the TQMap.
connectionMutex->lock();
DbConnection *dbConn;
- if (threadConnections->contains(currThread))
+ if (threadConnections->tqcontains(currThread))
{
- TQMap::Iterator it = threadConnections->find(currThread);
+ TQMap::Iterator it = threadConnections->tqfind(currThread);
dbConn = it.data();
delete dbConn;
threadConnections->erase(currThread);
@@ -4854,7 +4854,7 @@ CollectionDB::isConnected()
// PROTECTED
//////////////////////////////////////////////////////////////////////////////////////////
-QCString
+TQCString
CollectionDB::md5sum( const TQString& artist, const TQString& album, const TQString& file )
{
KMD5 context( artist.lower().local8Bit() + album.lower().local8Bit() + file.local8Bit() );
@@ -4880,7 +4880,7 @@ void CollectionDB::engineTrackEnded( int finalPosition, int trackLength, const T
PodcastEpisodeBundle peb;
if( getPodcastEpisodeBundle( url.url(), &peb ) )
{
- PodcastEpisode *p = PlaylistBrowser::instance()->findPodcastEpisode( peb.url(), peb.parent() );
+ PodcastEpisode *p = PlaylistBrowser::instance()->findPodcastEpisode( peb.url(), peb.tqparent() );
if ( p )
p->setListened();
@@ -4913,7 +4913,7 @@ CollectionDB::timerEvent( TQTimerEvent* )
//////////////////////////////////////////////////////////////////////////////////////////
void
-CollectionDB::fetchCover( TQWidget* parent, const TQString& artist, const TQString& album, bool noedit, TQListViewItem* item ) //SLOT
+CollectionDB::fetchCover( TQWidget* tqparent, const TQString& artist, const TQString& album, bool noedit, TQListViewItem* item ) //SLOT
{
#ifdef AMAZON_SUPPORT
debug() << "Fetching cover for " << artist << " - " << album << endl;
@@ -4922,9 +4922,9 @@ CollectionDB::fetchCover( TQWidget* parent, const TQString& artist, const TQStri
CoverFetcher* fetcher;
if( isCompilation )
// avoid putting various artists in front of album title. this causes problems for locales other than US.
- fetcher = new CoverFetcher( parent, "", album );
+ fetcher = new CoverFetcher( tqparent, "", album );
else
- fetcher = new CoverFetcher( parent, artist, album );
+ fetcher = new CoverFetcher( tqparent, artist, album );
if( item )
{
itemCoverMapMutex->lock();
@@ -5022,12 +5022,12 @@ class SimilarArtistsInsertionJob : public ThreadManager::DependentJob
{
virtual bool doJob()
{
- CollectionDB::instance()->query( TQString( "DELETE FROM related_artists WHERE artist = '%1';" ).arg( escapedArtist ) );
+ CollectionDB::instance()->query( TQString( "DELETE FROM related_artists WHERE artist = '%1';" ).tqarg( escapedArtist ) );
const TQString sql = "INSERT INTO related_artists ( artist, suggestion, changedate ) VALUES ( '%1', '%2', 0 );";
foreach( suggestions )
CollectionDB::instance()->insert( sql
- .arg( escapedArtist,
+ .tqarg( escapedArtist,
CollectionDB::instance()->escapeString( *it ) ), NULL);
return true;
@@ -5040,10 +5040,10 @@ class SimilarArtistsInsertionJob : public ThreadManager::DependentJob
const TQStringList suggestions;
public:
- SimilarArtistsInsertionJob( CollectionDB *parent, const TQString &s, const TQStringList &list )
- : ThreadManager::DependentJob( parent, "SimilarArtistsInsertionJob" )
+ SimilarArtistsInsertionJob( CollectionDB *tqparent, const TQString &s, const TQStringList &list )
+ : ThreadManager::DependentJob( tqparent, "SimilarArtistsInsertionJob" )
, artist( TQDeepCopy(s) )
- , escapedArtist( parent->escapeString( TQDeepCopy(s) ) )
+ , escapedArtist( tqparent->escapeString( TQDeepCopy(s) ) )
, suggestions( TQDeepCopy(list) )
{}
};
@@ -5071,23 +5071,23 @@ CollectionDB::aftCheckPermanentTables( const TQString &currdeviceid, const TQStr
"SELECT url, deviceid "
"FROM %1 "
"WHERE uniqueid = '%2';" )
- .arg( escapeString( *it ) )
- .arg( currid ) );
+ .tqarg( escapeString( *it ) )
+ .tqarg( currid ) );
check2 = query( TQString(
"SELECT url, uniqueid "
"FROM %1 "
"WHERE deviceid = %2 AND url = '%3';" )
- .arg( escapeString( *it ) )
- .arg( currdeviceid
+ .tqarg( escapeString( *it ) )
+ .tqarg( currdeviceid
, currurl ) );
if( !check1.empty() )
{
//debug() << "uniqueid found, updating url" << endl;
query( TQString( "UPDATE %1 SET deviceid = %2, url = '%4' WHERE uniqueid = '%3';" )
- .arg( escapeString( *it ) )
- .arg( currdeviceid
+ .tqarg( escapeString( *it ) )
+ .tqarg( currdeviceid
, currid
, currurl ) );
}
@@ -5095,8 +5095,8 @@ CollectionDB::aftCheckPermanentTables( const TQString &currdeviceid, const TQStr
{
//debug() << "url found, updating uniqueid" << endl;
query( TQString( "UPDATE %1 SET uniqueid = '%2' WHERE deviceid = %3 AND url = '%4';" )
- .arg( escapeString( *it ) )
- .arg( currid
+ .tqarg( escapeString( *it ) )
+ .tqarg( currid
, currdeviceid
, currurl ) );
}
@@ -5115,14 +5115,14 @@ CollectionDB::aftMigratePermanentTablesUrl( const TQString& /*oldUrl*/, const TQ
foreach( m_aftEnabledPersistentTables )
{
query( TQString( "DELETE FROM %1 WHERE deviceid = %2 AND url = '%3';" )
- .arg( escapeString( *it ) )
- .arg( deviceid )
- .arg( escapeString( rpath ) ) );
+ .tqarg( escapeString( *it ) )
+ .tqarg( deviceid )
+ .tqarg( escapeString( rpath ) ) );
query( TQString( "UPDATE %1 SET deviceid = %2, url = '%4' WHERE uniqueid = '%3';" )
- .arg( escapeString( *it ) )
- .arg( deviceid )
- .arg( escapeString( uniqueid ) )
- .arg( escapeString( rpath ) ) );
+ .tqarg( escapeString( *it ) )
+ .tqarg( deviceid )
+ .tqarg( escapeString( uniqueid ) )
+ .tqarg( escapeString( rpath ) ) );
}
}
@@ -5136,12 +5136,12 @@ CollectionDB::aftMigratePermanentTablesUniqueId( const TQString& /*url*/, const
foreach( m_aftEnabledPersistentTables )
{
query( TQString( "DELETE FROM %1 WHERE uniqueid = '%2';" )
- .arg( escapeString( *it ) )
- .arg( escapeString( newid ) ) );
+ .tqarg( escapeString( *it ) )
+ .tqarg( escapeString( newid ) ) );
query( TQString( "UPDATE %1 SET uniqueid = '%1' WHERE uniqueid = '%2';" )
- .arg( escapeString( *it ) )
- .arg( escapeString( newid ) )
- .arg( escapeString( oldid ) ) );
+ .tqarg( escapeString( *it ) )
+ .tqarg( escapeString( newid ) )
+ .tqarg( escapeString( oldid ) ) );
}
}
@@ -5202,8 +5202,8 @@ CollectionDB::initialize()
AmarokConfig::setPostgresqlPassword2( passwd );
}
else if( appVersion.startsWith( "1.4" ) &&
- ( appVersion.contains( "beta", false ) ||
- appVersion.contains( "svn", false ) ) )
+ ( appVersion.tqcontains( "beta", false ) ||
+ appVersion.tqcontains( "svn", false ) ) )
{
passwd = Amarok::config( "Postgresql" )->readEntry( "PostgresqlPassword" );
AmarokConfig::setPostgresqlPassword2( passwd );
@@ -5265,7 +5265,7 @@ CollectionDB::initialize()
// We should rmeove this before 1.4.5
if ( m_dbConnType == DbConnection::sqlite ) {
TQStringList indices = query( "SELECT name FROM sqlite_master WHERE type='index' ORDER BY name;" );
- if (!indices.contains("url_tag")) {
+ if (!indices.tqcontains("url_tag")) {
createIndices();
}
}
@@ -5343,7 +5343,7 @@ CollectionDB::checkDatabase()
{
KDialogBase *dialog = new KDialogBase( KDialogBase::Swallow,
- Qt::WType_TopLevel|Qt::WStyle_Customize|Qt::WStyle_DialogBorder,
+ TQt::WType_TopLevel|TQt::WStyle_Customize|TQt::WStyle_DialogBorder,
0,
"Update database warning dialog",
false,
@@ -5462,11 +5462,11 @@ CollectionDB::updateStatsTables()
//pre somewhere in the 1.3-1.4 timeframe, the version wasn't stored in the DB, so try to guess it
const TQString q = "SELECT COUNT( %1 ) FROM statistics;";
- if( !prev && query( q.arg( "url" ) ).first().toInt()
- && query( q.arg( "createdate" ) ).first().toInt()
- && query( q.arg( "accessdate" ) ).first().toInt()
- && query( q.arg( "percentage" ) ).first().toInt()
- && query( q.arg( "playcounter" ) ).first().toInt() )
+ if( !prev && query( q.tqarg( "url" ) ).first().toInt()
+ && query( q.tqarg( "createdate" ) ).first().toInt()
+ && query( q.tqarg( "accessdate" ) ).first().toInt()
+ && query( q.tqarg( "percentage" ) ).first().toInt()
+ && query( q.tqarg( "playcounter" ) ).first().toInt() )
{
prev = 3;
}
@@ -5494,7 +5494,7 @@ CollectionDB::updateStatsTables()
if( prev < 8 ) //Versions 6, 7 and 8 all were all attempts to add columns for ATF. his code should do it all.
{
query( TQString( "CREATE TABLE statistics_fix ("
- "url " + textColumnType() + " UNIQUE,"
+ "url " + textColumnType() + " UNITQUE,"
"createdate INTEGER,"
"accessdate INTEGER,"
"percentage FLOAT,"
@@ -5533,9 +5533,9 @@ CollectionDB::updateStatsTables()
int deviceid = exists ? MountPointManager::instance()->getIdForUrl( *it ) : -2;
TQString rpath = exists ? MountPointManager::instance()->getRelativePath( deviceid, *it ) : *it;
TQString update = TQString( "UPDATE statistics SET deviceid = %1, url = '%2' WHERE " )
- .arg( deviceid )
- .arg( escapeString( rpath ) );
- update += TQString( "url = '%1';" ).arg( escapeString( *it ) );
+ .tqarg( deviceid )
+ .tqarg( escapeString( rpath ) );
+ update += TQString( "url = '%1';" ).tqarg( escapeString( *it ) );
query ( update );
}
}
@@ -5642,9 +5642,9 @@ CollectionDB::updatePersistentTables()
int deviceid = MountPointManager::instance()->getIdForUrl( *it );
TQString rpath = MountPointManager::instance()->getRelativePath( deviceid, *it );
TQString update = TQString( "UPDATE lyrics SET deviceid = %1, url = '%2' WHERE " )
- .arg( deviceid )
- .arg( escapeString( rpath ) );
- update += TQString( "url = '%1';" ).arg( escapeString( *it ) );
+ .tqarg( deviceid )
+ .tqarg( escapeString( rpath ) );
+ update += TQString( "url = '%1';" ).tqarg( escapeString( *it ) );
query ( update );
}
}
@@ -5687,12 +5687,12 @@ CollectionDB::updatePersistentTables()
query( TQString( "CREATE TABLE tags_labels ("
"deviceid INTEGER,"
"url " + exactTextColumnType() + ", "
- "uniqueid " + exactTextColumnType(32) + ", " //m:n relationship, DO NOT MAKE UNIQUE!
+ "uniqueid " + exactTextColumnType(32) + ", " //m:n relationship, DO NOT MAKE UNITQUE!
"labelid INTEGER REFERENCES labels( id ) ON DELETE CASCADE );" ) );
- query( "CREATE UNIQUE INDEX labels_name ON labels( name, type );" );
- query( "CREATE INDEX tags_labels_uniqueid ON tags_labels( uniqueid );" ); //m:n relationship, DO NOT MAKE UNIQUE!
- query( "CREATE INDEX tags_labels_url ON tags_labels( url, deviceid );" ); //m:n relationship, DO NOT MAKE UNIQUE!
+ query( "CREATE UNITQUE INDEX labels_name ON labels( name, type );" );
+ query( "CREATE INDEX tags_labels_uniqueid ON tags_labels( uniqueid );" ); //m:n relationship, DO NOT MAKE UNITQUE!
+ query( "CREATE INDEX tags_labels_url ON tags_labels( url, deviceid );" ); //m:n relationship, DO NOT MAKE UNITQUE!
}
if ( PersistentVersion.toInt() < 18 )
{
@@ -5701,7 +5701,7 @@ CollectionDB::updatePersistentTables()
}
if ( PersistentVersion.toInt() < 19 )
{
- query( "CREATE INDEX tags_labels_labelid ON tags_labels( labelid );" ); //m:n relationship, DO NOT MAKE UNIQUE!
+ query( "CREATE INDEX tags_labels_labelid ON tags_labels( labelid );" ); //m:n relationship, DO NOT MAKE UNITQUE!
}
//Up to date. Keep this number \/ in sync!
if ( PersistentVersion.toInt() > 19 || PersistentVersion.toInt() < 0 )
@@ -5729,12 +5729,12 @@ CollectionDB::updatePodcastTables()
{
createPodcastTablesV2( true );
query( "INSERT INTO podcastchannels_fix SELECT url,title,weblink,image,comment,"
- "copyright,parent,directory,autoscan,fetchtype,autotransfer,haspurge,"
+ "copyright,tqparent,directory,autoscan,fetchtype,autotransfer,haspurge,"
"purgecount FROM podcastchannels;" );
- query( "INSERT INTO podcastepisodes_fix SELECT id,url,localurl,parent,guid,title,"
+ query( "INSERT INTO podcastepisodes_fix SELECT id,url,localurl,tqparent,guid,title,"
"subtitle,composer,comment,filetype,createdate,length,size,isNew FROM "
"podcastepisodes;" );
- query( "INSERT INTO podcastfolders_fix SELECT id,name,parent,isOpen FROM podcastfolders;" );
+ query( "INSERT INTO podcastfolders_fix SELECT id,name,tqparent,isOpen FROM podcastfolders;" );
dropPodcastTablesV2();
createPodcastTablesV2( false );
query( "INSERT INTO podcastchannels SELECT * FROM podcastchannels_fix;" );
@@ -5767,8 +5767,8 @@ CollectionDB::vacuum()
void
CollectionDB::destroy()
{
- //do we need or want to delete the actual connection objects as well as clearing them from the QMap?
- //or does QMap's clear function delete them?
+ //do we need or want to delete the actual connection objects as well as clearing them from the TQMap?
+ //or does TQMap's clear function delete them?
//this situation is not at all likely to happen often, so leaving them might be okay to prevent a
//thread from having its connection torn out from under it...not likely, but possible
//and leaving it should not end up eating much memory at all
@@ -5830,7 +5830,7 @@ CollectionDB::customEvent( TQCustomEvent *e )
}
-QString
+TQString
CollectionDB::loadHashFile( const TQCString& hash, uint width )
{
//debug() << "loadHashFile: " << hash << " - " << width << endl;
@@ -5853,7 +5853,7 @@ CollectionDB::loadHashFile( const TQCString& hash, uint width )
} else if ( TQFileInfo( full ).isReadable() ) {
//debug() << "loadHashFile: scaling: " << full << endl;
TQImage image( full );
- if ( image.smoothScale( width, width, TQImage::ScaleMin ).save( path, "PNG" ) ) {
+ if ( image.smoothScale( width, width, TQ_ScaleMin ).save( path, "PNG" ) ) {
//debug() << "loadHashFile: scaled: " << path << endl;
return path;
}
@@ -5882,7 +5882,7 @@ CollectionDB::extractEmbeddedImage( const MetaBundle &trackInformation, TQCStrin
return false;
}
-QStringList
+TQStringList
CollectionDB::getLabels( const TQString &url, const uint type )
{
int deviceid = MountPointManager::instance()->getIdForUrl( url );
@@ -5890,7 +5890,7 @@ CollectionDB::getLabels( const TQString &url, const uint type )
return query( TQString( "SELECT labels.name FROM labels "
"LEFT JOIN tags_labels ON labels.id = tags_labels.labelid "
"WHERE labels.type = %1 AND tags_labels.deviceid = %2 AND tags_labels.url = '%3';" )
- .arg( type ).arg( deviceid ).arg( escapeString( rpath ) ) );
+ .tqarg( type ).tqarg( deviceid ).tqarg( escapeString( rpath ) ) );
}
void
@@ -5911,7 +5911,7 @@ CollectionDB::cleanLabels()
}
query( TQString( "DELETE FROM labels "
"WHERE labels.id IN ( %1 );" )
- .arg( ids ) );
+ .tqarg( ids ) );
}
}
@@ -5921,7 +5921,7 @@ CollectionDB::setLabels( const TQString &url, const TQStringList &labels, const
DEBUG_BLOCK
int deviceid = MountPointManager::instance()->getIdForUrl( url );
TQString rpath = escapeString( MountPointManager::instance()->getRelativePath( deviceid, url ) );
- TQStringList labelIds = query( TQString( "SELECT id FROM labels WHERE type = %1;" ).arg( type ) );
+ TQStringList labelIds = query( TQString( "SELECT id FROM labels WHERE type = %1;" ).tqarg( type ) );
TQString ids;
if ( !labelIds.isEmpty() )
{
@@ -5934,20 +5934,20 @@ CollectionDB::setLabels( const TQString &url, const TQStringList &labels, const
//TODO: max: add uniqueid handling
query( TQString( "DELETE FROM tags_labels "
"WHERE tags_labels.labelid IN (%1) AND tags_labels.deviceid = %2 AND tags_labels.url = '%3';" )
- .arg( ids, TQString::number(deviceid), rpath ) );
+ .tqarg( ids, TQString::number(deviceid), rpath ) );
}
foreach( labels )
{
int id = query( TQString( "SELECT id FROM labels WHERE type = %1 AND name = '%2';" )
- .arg( type ).arg( escapeString( *it ) ) ).first().toInt();
+ .tqarg( type ).tqarg( escapeString( *it ) ) ).first().toInt();
if ( !id )
{
id = insert( TQString( "INSERT INTO labels( name, type ) VALUES ( '%2', %1 );" )
- .arg( type ).arg( escapeString( *it ) ), "labels" );
+ .tqarg( type ).tqarg( escapeString( *it ) ), "labels" );
}
insert( TQString( "INSERT INTO tags_labels( labelid, deviceid, url, uniqueid ) VALUES ( %1, %2, '%3', '%4' );" )
- .arg( TQString::number(id), TQString::number(deviceid), rpath, escapeString( uid ) ), 0 );
+ .tqarg( TQString::number(id), TQString::number(deviceid), rpath, escapeString( uid ) ), 0 );
}
emit labelsChanged( url );
@@ -5962,10 +5962,10 @@ CollectionDB::removeLabels( const TQString &url, const TQStringList &labels, con
TQString sql = TQString( "DELETE FROM tags_labels "
"FROM tags_labels AS t LEFT JOIN labels AS l ON t.labelid = l.id "
"WHERE l.type = %1 AND t.deviceid = %2 AND t.url = '%3' AND ( 0" )
- .arg( type ).arg( deviceid ).arg( rpath );
+ .tqarg( type ).tqarg( deviceid ).tqarg( rpath );
foreach( labels )
{
- sql += TQString( " OR l.name = '%1'" ).arg( escapeString( *it ) );
+ sql += TQString( " OR l.name = '%1'" ).tqarg( escapeString( *it ) );
}
sql += ");";
query( sql );
@@ -5981,53 +5981,53 @@ CollectionDB::addLabel( const TQString &url, const TQString &label, const TQStri
TQString rpath = escapeString( MountPointManager::instance()->getRelativePath( deviceid, url ) );
int id = query( TQString( "SELECT id FROM labels WHERE type = %1 AND name = '%2';" )
- .arg( type ).arg( escapeString( label ) ) ).first().toInt();
+ .tqarg( type ).tqarg( escapeString( label ) ) ).first().toInt();
bool labelAlreadyExists = id > 0;
if ( !id )
{
id = insert( TQString( "INSERT INTO labels( name, type ) VALUES ( '%2', %1 );" )
- .arg( type ).arg( escapeString( label ) ), "labels" );
+ .tqarg( type ).tqarg( escapeString( label ) ), "labels" );
}
if ( labelAlreadyExists )
{
//we can return if the link between the tags row and the labels row already exists
int count = query( TQString( "SELECT COUNT(*) FROM tags_labels WHERE labelid = %1 AND deviceid = %2 AND url = '%3';" )
- .arg( id ).arg( deviceid ).arg( rpath ) ).first().toInt();
+ .tqarg( id ).tqarg( deviceid ).tqarg( rpath ) ).first().toInt();
if ( count )
return false;
}
insert( TQString( "INSERT INTO tags_labels( labelid, deviceid, url, uniqueid ) VALUES ( %1, %2, '%3', '%4' );" )
- .arg( TQString::number(id), TQString::number(deviceid), rpath, escapeString( uid ) ), "tags_labels" );
+ .tqarg( TQString::number(id), TQString::number(deviceid), rpath, escapeString( uid ) ), "tags_labels" );
emit labelsChanged( url );
return true;
}
-QStringList
+TQStringList
CollectionDB::favoriteLabels( int type, int count )
{
return query( TQString( "SELECT labels.name, count( tags_labels.labelid ) "
"FROM labels LEFT JOIN tags_labels ON labels.id = tags_labels.labelid "
"WHERE labels.type = %1 GROUP BY labels.name "
"ORDER BY count(tags_labels.labelid) DESC LIMIT %2;" )
- .arg( TQString::number( type ), TQString::number( count ) ) );
+ .tqarg( TQString::number( type ), TQString::number( count ) ) );
}
-QDir
+TQDir
CollectionDB::largeCoverDir() //static
{
return TQDir( Amarok::saveLocation( "albumcovers/large/" ) );
}
-QDir
+TQDir
CollectionDB::tagCoverDir() //static
{
return TQDir( Amarok::saveLocation( "albumcovers/tagcover/" ) );
}
-QDir
+TQDir
CollectionDB::cacheCoverDir() //static
{
return TQDir( Amarok::saveLocation( "albumcovers/cache/" ) );
@@ -6062,11 +6062,11 @@ SqliteConnection::SqliteConnection( const SqliteConfig* config )
{
TQString format;
file.readLine( format, 50 );
- if ( !format.startsWith( "SQLite format 3" ) )
+ if ( !format.startsWith( "STQLite format 3" ) )
{
warning() << "Database versions incompatible. Removing and rebuilding database.\n";
}
- else if ( sqlite3_open( path, &m_db ) != SQLITE_OK )
+ else if ( sqlite3_open( path, &m_db ) != STQLITE_OK )
{
warning() << "Database file corrupt. Removing and rebuilding database.\n";
sqlite3_close( m_db );
@@ -6079,24 +6079,24 @@ SqliteConnection::SqliteConnection( const SqliteConfig* config )
{
// Remove old db file; create new
TQFile::remove( path );
- if ( sqlite3_open( path, &m_db ) == SQLITE_OK )
+ if ( sqlite3_open( path, &m_db ) == STQLITE_OK )
{
m_initialized = true;
}
}
if ( m_initialized )
{
- if( sqlite3_create_function(m_db, "rand", 0, SQLITE_UTF8, NULL, sqlite_rand, NULL, NULL) != SQLITE_OK )
+ if( sqlite3_create_function(m_db, "rand", 0, STQLITE_UTF8, NULL, sqlite_rand, NULL, NULL) != STQLITE_OK )
m_initialized = false;
- if( sqlite3_create_function(m_db, "power", 2, SQLITE_UTF8, NULL, sqlite_power, NULL, NULL) != SQLITE_OK )
+ if( sqlite3_create_function(m_db, "power", 2, STQLITE_UTF8, NULL, sqlite_power, NULL, NULL) != STQLITE_OK )
m_initialized = false;
- if ( sqlite3_create_function(m_db, "like", 2, SQLITE_UTF8, NULL, sqlite_like_new, NULL, NULL) != SQLITE_OK )
+ if ( sqlite3_create_function(m_db, "like", 2, STQLITE_UTF8, NULL, sqlite_like_new, NULL, NULL) != STQLITE_OK )
m_initialized = false;
- if ( sqlite3_create_function(m_db, "like", 3, SQLITE_UTF8, NULL, sqlite_like_new, NULL, NULL) != SQLITE_OK )
+ if ( sqlite3_create_function(m_db, "like", 3, STQLITE_UTF8, NULL, sqlite_like_new, NULL, NULL) != STQLITE_OK )
m_initialized = false;
}
- //optimization for speeding up SQLite
+ //optimization for speeding up STQLite
query( "PRAGMA default_synchronous = OFF;" );
}
@@ -6128,11 +6128,11 @@ TQStringList SqliteConnection::query( const TQString& statement, bool /*suppress
}
error = sqlite3_prepare( m_db, statement.utf8(), -1, &stmt, &tail );
}
- while ( SQLITE_BUSY==error && busyCnt++ < 120 );
+ while ( STQLITE_BUSY==error && busyCnt++ < 120 );
- if ( error != SQLITE_OK )
+ if ( error != STQLITE_OK )
{
- if ( SQLITE_BUSY==error )
+ if ( STQLITE_BUSY==error )
Debug::error() << "Gave up waiting for lock to clear" << endl;
Debug::error() << k_funcinfo << " sqlite3_compile error:" << endl;
Debug::error() << sqlite3_errmsg( m_db ) << endl;
@@ -6149,7 +6149,7 @@ TQStringList SqliteConnection::query( const TQString& statement, bool /*suppress
{
error = sqlite3_step( stmt );
- if ( error == SQLITE_BUSY )
+ if ( error == STQLITE_BUSY )
{
if ( busyCnt++ > 120 ) {
Debug::error() << "Busy-counter has reached maximum. Aborting this sql statement!\n";
@@ -6159,9 +6159,9 @@ TQStringList SqliteConnection::query( const TQString& statement, bool /*suppress
debug() << "sqlite3_step: BUSY counter: " << busyCnt << endl;
continue;
}
- if ( error == SQLITE_MISUSE )
+ if ( error == STQLITE_MISUSE )
debug() << "sqlite3_step: MISUSE" << endl;
- if ( error == SQLITE_DONE || error == SQLITE_ERROR )
+ if ( error == STQLITE_DONE || error == STQLITE_ERROR )
break;
//iterate over columns
@@ -6173,17 +6173,17 @@ TQStringList SqliteConnection::query( const TQString& statement, bool /*suppress
//deallocate vm resources
rc = sqlite3_finalize( stmt );
- if ( error != SQLITE_DONE && rc != SQLITE_SCHEMA )
+ if ( error != STQLITE_DONE && rc != STQLITE_SCHEMA )
{
Debug::error() << k_funcinfo << "sqlite_step error.\n";
Debug::error() << sqlite3_errmsg( m_db ) << endl;
Debug::error() << "on query: " << statement << endl;
values = TQStringList();
}
- if ( rc == SQLITE_SCHEMA )
+ if ( rc == STQLITE_SCHEMA )
{
retryCnt++;
- debug() << "SQLITE_SCHEMA error occurred on query: " << statement << endl;
+ debug() << "STQLITE_SCHEMA error occurred on query: " << statement << endl;
if ( retryCnt < 10 )
debug() << "Retrying now." << endl;
else
@@ -6195,7 +6195,7 @@ TQStringList SqliteConnection::query( const TQString& statement, bool /*suppress
}
}
}
- while ( rc == SQLITE_SCHEMA && retryCnt < 10 );
+ while ( rc == STQLITE_SCHEMA && retryCnt < 10 );
return values;
}
@@ -6220,11 +6220,11 @@ int SqliteConnection::insert( const TQString& statement, const TQString& /* tabl
}
error = sqlite3_prepare( m_db, statement.utf8(), -1, &stmt, &tail );
}
- while ( SQLITE_BUSY==error && busyCnt++ < 120 );
+ while ( STQLITE_BUSY==error && busyCnt++ < 120 );
- if ( error != SQLITE_OK )
+ if ( error != STQLITE_OK )
{
- if ( SQLITE_BUSY==error )
+ if ( STQLITE_BUSY==error )
Debug::error() << "Gave up waiting for lock to clear" << endl;
Debug::error() << k_funcinfo << " sqlite3_compile error:" << endl;
Debug::error() << sqlite3_errmsg( m_db ) << endl;
@@ -6239,7 +6239,7 @@ int SqliteConnection::insert( const TQString& statement, const TQString& /* tabl
{
error = sqlite3_step( stmt );
- if ( error == SQLITE_BUSY )
+ if ( error == STQLITE_BUSY )
{
if ( busyCnt++ > 120 ) {
Debug::error() << "Busy-counter has reached maximum. Aborting this sql statement!\n";
@@ -6248,24 +6248,24 @@ int SqliteConnection::insert( const TQString& statement, const TQString& /* tabl
::usleep( 100000 ); // Sleep 100 msec
debug() << "sqlite3_step: BUSY counter: " << busyCnt << endl;
}
- if ( error == SQLITE_MISUSE )
+ if ( error == STQLITE_MISUSE )
debug() << "sqlite3_step: MISUSE" << endl;
- if ( error == SQLITE_DONE || error == SQLITE_ERROR )
+ if ( error == STQLITE_DONE || error == STQLITE_ERROR )
break;
}
//deallocate vm resources
rc = sqlite3_finalize( stmt );
- if ( error != SQLITE_DONE && rc != SQLITE_SCHEMA)
+ if ( error != STQLITE_DONE && rc != STQLITE_SCHEMA)
{
Debug::error() << k_funcinfo << "sqlite_step error.\n";
Debug::error() << sqlite3_errmsg( m_db ) << endl;
Debug::error() << "on insert: " << statement << endl;
}
- if ( rc == SQLITE_SCHEMA )
+ if ( rc == STQLITE_SCHEMA )
{
retryCnt++;
- debug() << "SQLITE_SCHEMA error occurred on insert: " << statement << endl;
+ debug() << "STQLITE_SCHEMA error occurred on insert: " << statement << endl;
if ( retryCnt < 10 )
debug() << "Retrying now." << endl;
else
@@ -6276,7 +6276,7 @@ int SqliteConnection::insert( const TQString& statement, const TQString& /* tabl
}
}
}
- while ( SQLITE_SCHEMA == rc && retryCnt < 10 );
+ while ( STQLITE_SCHEMA == rc && retryCnt < 10 );
return sqlite3_last_insert_rowid( m_db );
}
@@ -6291,7 +6291,7 @@ void SqliteConnection::sqlite_rand(sqlite3_context *context, int /*argc*/, sqlit
void SqliteConnection::sqlite_power(sqlite3_context *context, int argc, sqlite3_value **argv)
{
Q_ASSERT( argc==2 );
- if( sqlite3_value_type(argv[0])==SQLITE_NULL || sqlite3_value_type(argv[1])==SQLITE_NULL ) {
+ if( sqlite3_value_type(argv[0])==STQLITE_NULL || sqlite3_value_type(argv[1])==STQLITE_NULL ) {
sqlite3_result_null(context);
return;
}
@@ -6318,12 +6318,12 @@ void SqliteConnection::sqlite_like_new( sqlite3_context *context, int argc, sqli
pattern = pattern.left( pattern.length() - 1 );
if( argc == 3 ) // The function is given an escape character. In likeCondition() it defaults to '/'
- pattern.replace( "/%", "%" ).replace( "/_", "_" ).replace( "//", "/" );
+ pattern.tqreplace( "/%", "%" ).tqreplace( "/_", "_" ).tqreplace( "//", "/" );
int result = 0;
- if ( begin && end ) result = ( text.find( pattern, 0, 0 ) != -1);
- else if ( begin ) result = text.endsWith( pattern, 0 );
- else if ( end ) result = text.startsWith( pattern, 0 );
+ if ( begin && end ) result = ( text.tqfind( pattern, 0, 0 ) != -1);
+ else if ( begin ) result = text.tqendsWith( pattern, 0 );
+ else if ( end ) result = text.tqstartsWith( pattern, 0 );
else result = ( text.lower() == pattern.lower() );
sqlite3_result_int( context, result );
@@ -6356,7 +6356,7 @@ MySqlConnection::MySqlConnection( const MySqlConfig* config )
{
m_initialized = true;
-#if MYSQL_VERSION_ID >= 40113
+#if MYSTQL_VERSION_ID >= 40113
// now set the right charset for the connection
TQStringList my_qslist = query( "SHOW VARIABLES LIKE 'character_set_database'" );
if( !my_qslist.isEmpty() && !mysql_set_character_set( m_db, const_cast( my_qslist[1].latin1() ) ) )
@@ -6409,11 +6409,11 @@ TQStringList MySqlConnection::query( const TQString& statement, bool suppressDeb
if ( !mysql_query( m_db, statement.utf8() ) )
{
- MYSQL_RES* result;
+ MYSTQL_RES* result;
if ( ( result = mysql_use_result( m_db ) ) )
{
int number = mysql_field_count( m_db );
- MYSQL_ROW row;
+ MYSTQL_ROW row;
while ( ( row = mysql_fetch_row( result ) ) )
{
for ( int i = 0; i < number; i++ )
@@ -6427,7 +6427,7 @@ TQStringList MySqlConnection::query( const TQString& statement, bool suppressDeb
if ( mysql_field_count( m_db ) != 0 )
{
if ( !suppressDebug )
- debug() << "MYSQL QUERY FAILED: " << mysql_error( m_db ) << "\n" << "FAILED QUERY: " << statement << "\n";
+ debug() << "MYSQL TQUERY FAILED: " << mysql_error( m_db ) << "\n" << "FAILED TQUERY: " << statement << "\n";
values = TQStringList();
}
}
@@ -6436,7 +6436,7 @@ TQStringList MySqlConnection::query( const TQString& statement, bool suppressDeb
else
{
if ( !suppressDebug )
- debug() << "MYSQL QUERY FAILED: " << mysql_error( m_db ) << "\n" << "FAILED QUERY: " << statement << "\n";
+ debug() << "MYSQL TQUERY FAILED: " << mysql_error( m_db ) << "\n" << "FAILED TQUERY: " << statement << "\n";
values = TQStringList();
}
@@ -6526,15 +6526,15 @@ TQStringList PostgresqlConnection::query( const TQString& statement, bool suppre
if (result == NULL)
{
if ( !suppressDebug )
- debug() << "POSTGRESQL QUERY FAILED: " << PQerrorMessage( m_db ) << "\n" << "FAILED QUERY: " << statement << "\n";
+ debug() << "POSTGRESQL TQUERY FAILED: " << PQerrorMessage( m_db ) << "\n" << "FAILED TQUERY: " << statement << "\n";
return values;
}
- status = PQresultStatus(result);
+ status = PQresulttqStatus(result);
if ((status != PGRES_COMMAND_OK) && (status != PGRES_TUPLES_OK))
{
if ( !suppressDebug )
- debug() << "POSTGRESQL QUERY FAILED: " << PQerrorMessage( m_db ) << "\n" << "FAILED QUERY: " << statement << "\n";
+ debug() << "POSTGRESQL TQUERY FAILED: " << PQerrorMessage( m_db ) << "\n" << "FAILED TQUERY: " << statement << "\n";
PQclear(result);
return values;
}
@@ -6579,7 +6579,7 @@ int PostgresqlConnection::insert( const TQString& statement, const TQString& tab
return 0;
}
- status = PQresultStatus(result);
+ status = PQresulttqStatus(result);
if (status != PGRES_COMMAND_OK)
{
debug() << "POSTGRESQL INSERT FAILED: " << PQerrorMessage( m_db ) << "\n" << "FAILED SQL: " << statement << "\n";
@@ -6591,9 +6591,9 @@ int PostgresqlConnection::insert( const TQString& statement, const TQString& tab
if (table == NULL) return 0;
TQString _table = table;
- if (table.find("_temp") > 0) _table = table.left(table.find("_temp"));
+ if (table.tqfind("_temp") > 0) _table = table.left(table.tqfind("_temp"));
- curvalSql = TQString("SELECT currval('%1_seq');").arg(_table);
+ curvalSql = TQString("SELECT currval('%1_seq');").tqarg(_table);
result = PQexec(m_db, curvalSql.utf8());
if (result == NULL)
{
@@ -6601,7 +6601,7 @@ int PostgresqlConnection::insert( const TQString& statement, const TQString& tab
return 0;
}
- status = PQresultStatus(result);
+ status = PQresulttqStatus(result);
if (status != PGRES_TUPLES_OK)
{
debug() << "POSTGRESQL INSERT FAILED: " << PQerrorMessage( m_db ) << "\n" << "FAILED SQL: " << curvalSql << "\n";
@@ -6733,7 +6733,7 @@ QueryBuilder::linkTables( int tables )
//if ( !m_url.isEmpty() ) {
// TQString url = TQString( '.' ) + m_url;
// m_tables += TQString( " OR statistics.deviceid = -1 AND statistics.url = '%1'" )
- // .arg( CollectionDB::instance()->escapeString( url ) );
+ // .tqarg( CollectionDB::instance()->escapeString( url ) );
//}
}
if ( tables & tabLyrics )
@@ -6750,7 +6750,7 @@ QueryBuilder::linkTables( int tables )
void
-QueryBuilder::addReturnValue( int table, Q_INT64 value, bool caseSensitive /* = false, unless value refers to a string */ )
+QueryBuilder::addReturnValue( int table, TQ_INT64 value, bool caseSensitive /* = false, unless value refers to a string */ )
{
caseSensitive |= value == valName || value == valTitle || value == valComment;
@@ -6780,7 +6780,7 @@ QueryBuilder::addReturnValue( int table, Q_INT64 value, bool caseSensitive /* =
}
void
-QueryBuilder::addReturnFunctionValue( int function, int table, Q_INT64 value)
+QueryBuilder::addReturnFunctionValue( int function, int table, TQ_INT64 value)
{
// translate NULL and 0 values into the default value for percentage/rating
// First translate 0 to NULL via NULLIF, then NULL to default via COALESCE
@@ -6827,7 +6827,7 @@ QueryBuilder::addURLFilters( const TQStringList& filter )
int deviceid = MountPointManager::instance()->getIdForUrl( filter[i] );
TQString rpath = MountPointManager::instance()->getRelativePath( deviceid , filter[i] );
m_where += "OR (tags.url = '" + CollectionDB::instance()->escapeString( rpath ) + "' ";
- m_where += TQString( "AND tags.deviceid = %1 ) " ).arg( TQString::number( deviceid ) );
+ m_where += TQString( "AND tags.deviceid = %1 ) " ).tqarg( TQString::number( deviceid ) );
//TODO MountPointManager fix this
}
@@ -6862,7 +6862,7 @@ QueryBuilder::setGoogleFilter( int defaultTables, TQString query )
bool exact = false; // enable for numeric values
int table = -1;
- Q_INT64 value = -1;
+ TQ_INT64 value = -1;
if( e.field == "artist" )
table = tabArtist;
else if( e.field == "composer" )
@@ -7028,7 +7028,7 @@ QueryBuilder::addFilter( int tables, const TQString& filter )
if ( tables & tabLabels )
m_where += "OR labels.name " + CollectionDB::likeCondition( filter, true, true );
- if ( i18n( "Unknown" ).contains( filter, false ) )
+ if ( i18n( "Unknown" ).tqcontains( filter, false ) )
{
if ( tables & tabAlbum )
m_where += "OR album.name = '' ";
@@ -7043,8 +7043,8 @@ QueryBuilder::addFilter( int tables, const TQString& filter )
if ( tables & tabSong )
m_where += "OR tags.title = '' ";
}
- if ( ( tables & tabArtist ) && i18n( "Various Artists" ).contains( filter, false ) )
- m_where += TQString( "OR tags.sampler = %1 " ).arg( CollectionDB::instance()->boolT() );
+ if ( ( tables & tabArtist ) && i18n( "Various Artists" ).tqcontains( filter, false ) )
+ m_where += TQString( "OR tags.sampler = %1 " ).tqarg( CollectionDB::instance()->boolT() );
m_where += " ) ";
}
@@ -7052,9 +7052,9 @@ QueryBuilder::addFilter( int tables, const TQString& filter )
}
void
-QueryBuilder::addFilter( int tables, Q_INT64 value, const TQString& filter, int mode, bool exact )
+QueryBuilder::addFilter( int tables, TQ_INT64 value, const TQString& filter, int mode, bool exact )
{
- //true for INTEGER fields (see comment of coalesceField(int, Q_INT64)
+ //true for INTEGER fields (see comment of coalesceField(int, TQ_INT64)
bool useCoalesce = coalesceField( tables, value );
m_where += ANDslashOR() + " ( ";
@@ -7080,12 +7080,12 @@ QueryBuilder::addFilter( int tables, Q_INT64 value, const TQString& filter, int
}
if( coalesceField( tables, value ) )
- m_where += TQString( "COALESCE(%1.%2,0) " ).arg( tableName( tables ) ).arg( valueName( value ) ) + s;
+ m_where += TQString( "COALESCE(%1.%2,0) " ).tqarg( tableName( tables ) ).tqarg( valueName( value ) ) + s;
else
- m_where += TQString( "%1.%2 " ).arg( tableName( tables ) ).arg( valueName( value ) ) + s;
+ m_where += TQString( "%1.%2 " ).tqarg( tableName( tables ) ).tqarg( valueName( value ) ) + s;
- if ( !exact && (value & valName) && mode == modeNormal && i18n( "Unknown").contains( filter, false ) )
- m_where += TQString( "OR %1.%2 = '' " ).arg( tableName( tables ) ).arg( valueName( value ) );
+ if ( !exact && (value & valName) && mode == modeNormal && i18n( "Unknown").tqcontains( filter, false ) )
+ m_where += TQString( "OR %1.%2 = '' " ).tqarg( tableName( tables ) ).tqarg( valueName( value ) );
m_where += " ) ";
@@ -7118,7 +7118,7 @@ QueryBuilder::addFilters( int tables, const TQStringList& filter )
if ( tables & tabLabels )
m_where += "OR labels.name " + CollectionDB::likeCondition( filter[i], true, true );
- if ( i18n( "Unknown" ).contains( filter[i], false ) )
+ if ( i18n( "Unknown" ).tqcontains( filter[i], false ) )
{
if ( tables & tabAlbum )
m_where += "OR album.name = '' ";
@@ -7133,7 +7133,7 @@ QueryBuilder::addFilters( int tables, const TQStringList& filter )
if ( tables & tabSong )
m_where += "OR tags.title = '' ";
}
- if ( i18n( "Various Artists" ).contains( filter[ i ], false ) && ( tables & tabArtist ) )
+ if ( i18n( "Various Artists" ).tqcontains( filter[ i ], false ) && ( tables & tabArtist ) )
m_where += "OR tags.sampler = " + CollectionDB::instance()->boolT() + ' ';
m_where += " ) ";
}
@@ -7167,7 +7167,7 @@ QueryBuilder::excludeFilter( int tables, const TQString& filter )
if ( tables & tabLabels )
m_where += "AND labels.name NOT " + CollectionDB::likeCondition( filter, true, true );
- if ( i18n( "Unknown" ).contains( filter, false ) )
+ if ( i18n( "Unknown" ).tqcontains( filter, false ) )
{
if ( tables & tabAlbum )
m_where += "AND album.name <> '' ";
@@ -7183,7 +7183,7 @@ QueryBuilder::excludeFilter( int tables, const TQString& filter )
m_where += "AND tags.title <> '' ";
}
- if ( i18n( "Various Artists" ).contains( filter, false ) && ( tables & tabArtist ) )
+ if ( i18n( "Various Artists" ).tqcontains( filter, false ) && ( tables & tabArtist ) )
m_where += "AND tags.sampler = " + CollectionDB::instance()->boolF() + ' ';
@@ -7194,7 +7194,7 @@ QueryBuilder::excludeFilter( int tables, const TQString& filter )
}
void
-QueryBuilder::excludeFilter( int tables, Q_INT64 value, const TQString& filter, int mode, bool exact )
+QueryBuilder::excludeFilter( int tables, TQ_INT64 value, const TQString& filter, int mode, bool exact )
{
m_where += ANDslashOR() + " ( ";
@@ -7217,12 +7217,12 @@ QueryBuilder::excludeFilter( int tables, Q_INT64 value, const TQString& filter,
}
if( coalesceField( tables, value ) )
- m_where += TQString( "COALESCE(%1.%2,0) " ).arg( tableName( tables ) ).arg( valueName( value ) ) + s;
+ m_where += TQString( "COALESCE(%1.%2,0) " ).tqarg( tableName( tables ) ).tqarg( valueName( value ) ) + s;
else
- m_where += TQString( "%1.%2 " ).arg( tableName( tables ) ).arg( valueName( value ) ) + s;
+ m_where += TQString( "%1.%2 " ).tqarg( tableName( tables ) ).tqarg( valueName( value ) ) + s;
- if ( !exact && (value & valName) && mode == modeNormal && i18n( "Unknown").contains( filter, false ) )
- m_where += TQString( "AND %1.%2 <> '' " ).arg( tableName( tables ) ).arg( valueName( value ) );
+ if ( !exact && (value & valName) && mode == modeNormal && i18n( "Unknown").tqcontains( filter, false ) )
+ m_where += TQString( "AND %1.%2 <> '' " ).tqarg( tableName( tables ) ).tqarg( valueName( value ) );
m_where += " ) ";
@@ -7269,7 +7269,7 @@ QueryBuilder::addMatch( int tables, const TQString& match, bool interpretUnknown
void
-QueryBuilder::addMatch( int tables, Q_INT64 value, const TQString& match, bool interpretUnknown /* = true */, bool caseSensitive /* = true */ )
+QueryBuilder::addMatch( int tables, TQ_INT64 value, const TQString& match, bool interpretUnknown /* = true */, bool caseSensitive /* = true */ )
{
m_where += ANDslashOR() + " ( " + CollectionDB::instance()->boolF() + ' ';
if ( value & valURL )
@@ -7283,27 +7283,27 @@ QueryBuilder::addMatch( int tables, Q_INT64 value, const TQString& match, bool i
//which is automatially appended if m_showAll = false
m_showAll = true;
m_where += TQString( "OR %1.%2 " )
- .arg( tableName( tables ) )
- .arg( valueName( value ) );
+ .tqarg( tableName( tables ) )
+ .tqarg( valueName( value ) );
m_where += caseSensitive ? CollectionDB::exactCondition( rpath ) : CollectionDB::likeCondition( rpath );
- m_where += TQString( " AND %1.deviceid = %2 " ).arg( tableName( tables ) ).arg( deviceid );
+ m_where += TQString( " AND %1.deviceid = %2 " ).tqarg( tableName( tables ) ).tqarg( deviceid );
if ( deviceid != -1 )
{
//handle corner case
TQString rpath2( '.' + match );
- m_where += TQString( " OR %1.%2 " ).arg( tableName( tables ) ).arg( valueName( value ) );
+ m_where += TQString( " OR %1.%2 " ).tqarg( tableName( tables ) ).tqarg( valueName( value ) );
m_where += caseSensitive ? CollectionDB::exactCondition( rpath2 ) : CollectionDB::likeCondition( rpath2 );
- m_where += TQString( " AND %1.deviceid = -1 " ).arg( tableName( tables ) );
+ m_where += TQString( " AND %1.deviceid = -1 " ).tqarg( tableName( tables ) );
}
}
else
{
- m_where += TQString( "OR %1.%2 " ).arg( tableName( tables ) ).arg( valueName( value ) );
+ m_where += TQString( "OR %1.%2 " ).tqarg( tableName( tables ) ).tqarg( valueName( value ) );
m_where += caseSensitive ? CollectionDB::exactCondition( match ) : CollectionDB::likeCondition( match );
}
if ( ( value & valName ) && interpretUnknown && match == i18n( "Unknown" ) )
- m_where += TQString( "OR %1.%2 = '' " ).arg( tableName( tables ) ).arg( valueName( value ) );
+ m_where += TQString( "OR %1.%2 = '' " ).tqarg( tableName( tables ) ).tqarg( valueName( value ) );
m_where += " ) ";
@@ -7383,7 +7383,7 @@ QueryBuilder::excludeMatch( int tables, const TQString& match )
void
-QueryBuilder::exclusiveFilter( int tableMatching, int tableNotMatching, Q_INT64 value )
+QueryBuilder::exclusiveFilter( int tableMatching, int tableNotMatching, TQ_INT64 value )
{
m_where += " AND ";
m_where += tableName( tableNotMatching ) + '.';
@@ -7396,9 +7396,9 @@ QueryBuilder::exclusiveFilter( int tableMatching, int tableNotMatching, Q_INT64
void
-QueryBuilder::addNumericFilter(int tables, Q_INT64 value, const TQString &n,
+QueryBuilder::addNumericFilter(int tables, TQ_INT64 value, const TQString &n,
int mode /* = modeNormal */,
- const TQString &endRange /* = TQString::null */ )
+ const TQString &endRange /* = TQString() */ )
{
m_where.append( ANDslashOR() ).append( " ( " );
@@ -7442,8 +7442,8 @@ QueryBuilder::setOptions( int options )
if ( options & optNoCompilations || options & optOnlyCompilations )
m_linkTables |= tabSong;
- if ( options & optNoCompilations ) m_where += TQString("AND tags.sampler = %1 ").arg(CollectionDB::instance()->boolF());
- if ( options & optOnlyCompilations ) m_where += TQString("AND tags.sampler = %1 ").arg(CollectionDB::instance()->boolT());
+ if ( options & optNoCompilations ) m_where += TQString("AND tags.sampler = %1 ").tqarg(CollectionDB::instance()->boolF());
+ if ( options & optOnlyCompilations ) m_where += TQString("AND tags.sampler = %1 ").tqarg(CollectionDB::instance()->boolT());
if (CollectionDB::instance()->getType() == DbConnection::postgresql && options & optRemoveDuplicates && options & optRandomize)
{
@@ -7468,7 +7468,7 @@ QueryBuilder::setOptions( int options )
void
-QueryBuilder::sortBy( int table, Q_INT64 value, bool descending )
+QueryBuilder::sortBy( int table, TQ_INT64 value, bool descending )
{
//shall we sort case-sensitively? (not for integer columns!)
bool b = true;
@@ -7509,7 +7509,7 @@ QueryBuilder::sortBy( int table, Q_INT64 value, bool descending )
}
void
-QueryBuilder::sortByFunction( int function, int table, Q_INT64 value, bool descending )
+QueryBuilder::sortByFunction( int function, int table, TQ_INT64 value, bool descending )
{
// This function should be used with the equivalent addReturnFunctionValue (with the same function on same values)
// since it uses the "func(table.value) AS functablevalue" definition.
@@ -7569,7 +7569,7 @@ QueryBuilder::sortByFunction( int function, int table, Q_INT64 value, bool desce
}
void
-QueryBuilder::groupBy( int table, Q_INT64 value )
+QueryBuilder::groupBy( int table, TQ_INT64 value )
{
if ( !m_group.isEmpty() ) m_group += ',';
@@ -7587,7 +7587,7 @@ QueryBuilder::groupBy( int table, Q_INT64 value )
}
void
-QueryBuilder::having( int table, Q_INT64 value, int function, int mode, const TQString& match )
+QueryBuilder::having( int table, TQ_INT64 value, int function, int mode, const TQString& match )
{
if( !m_having.isEmpty() ) m_having += " AND ";
@@ -7617,11 +7617,11 @@ QueryBuilder::having( int table, Q_INT64 value, int function, int mode, const TQ
void
QueryBuilder::setLimit( int startPos, int length )
{
- m_limit = TQString( " LIMIT %2 OFFSET %1 " ).arg( startPos ).arg( length );
+ m_limit = TQString( " LIMIT %2 OFFSET %1 " ).tqarg( startPos ).tqarg( length );
}
void
-QueryBuilder::shuffle( int table, Q_INT64 value )
+QueryBuilder::shuffle( int table, TQ_INT64 value )
{
if ( !m_sort.isEmpty() ) m_sort += " , ";
if ( table == 0 || value == 0 ) {
@@ -7645,9 +7645,9 @@ QueryBuilder::shuffle( int table, Q_INT64 value )
// non-zero), and finally POWER(...) is used instead of 1-POWER(...) because it
// only changes the order type.
m_sort += TQString("POWER( %1, 1.0 / (%2.%3 + 1) ) DESC")
- .arg( CollectionDB::instance()->randomFunc() )
- .arg( tableName( table ) )
- .arg( valueName( value ) );
+ .tqarg( CollectionDB::instance()->randomFunc() )
+ .tqarg( tableName( table ) )
+ .tqarg( valueName( value ) );
m_linkTables |= table;
}
@@ -7659,8 +7659,8 @@ QueryBuilder::shuffle( int table, Q_INT64 value )
const int
QueryBuilder::dragFieldCount = 21;
-QString
-QueryBuilder::dragSQLFields()
+TQString
+QueryBuilder::dragSTQLFields()
{
return "tags.url, tags.deviceid, album.name, artist.name, composer.name, "
"genre.name, tags.title, year.name, "
@@ -7672,7 +7672,7 @@ QueryBuilder::dragSQLFields()
}
void
-QueryBuilder::initSQLDrag()
+QueryBuilder::initSTQLDrag()
{
clear();
addReturnValue( QueryBuilder::tabSong, QueryBuilder::valURL );
@@ -7715,7 +7715,7 @@ QueryBuilder::buildQuery( bool withDeviceidPlaceholder )
m_query += CollectionDB::instance()->boolT();
m_query += ' ';
m_query += m_where;
- if ( !m_showAll && ( m_linkTables & tabSong || m_tables.contains( tableName( tabSong) ) ) ) //Only stuff on mounted devices, unless you use optShowAll
+ if ( !m_showAll && ( m_linkTables & tabSong || m_tables.tqcontains( tableName( tabSong) ) ) ) //Only stuff on mounted devices, unless you use optShowAll
{
if ( withDeviceidPlaceholder )
m_query += "(*MountedDeviceSelection*)";
@@ -7743,7 +7743,7 @@ QueryBuilder::buildQuery( bool withDeviceidPlaceholder )
}
// get the builded SQL-Query (used in smartplaylisteditor soon)
-QString
+TQString
QueryBuilder::getQuery()
{
if ( m_query.isEmpty())
@@ -7753,7 +7753,7 @@ QueryBuilder::getQuery()
return m_query;
}
-QStringList
+TQStringList
QueryBuilder::run()
{
buildQuery();
@@ -7788,9 +7788,9 @@ QueryBuilder::clear()
}
-Q_INT64
+TQ_INT64
QueryBuilder::valForFavoriteSorting() {
- Q_INT64 favSortBy = valRating;
+ TQ_INT64 favSortBy = valRating;
if ( !AmarokConfig::useScores() && !AmarokConfig::useRatings() )
favSortBy = valPlayCounter;
else if( !AmarokConfig::useRatings() )
@@ -7829,9 +7829,9 @@ QueryBuilder::sortByFavoriteAvg() {
m_having += " (";
if (AmarokConfig::useRatings() )
m_having += TQString("%1(%2.%3) > 0 OR ")
- .arg( functionName( funcAvg ), tableName(tabStats), valueName(valRating) );
+ .tqarg( functionName( funcAvg ), tableName(tabStats), valueName(valRating) );
m_having += TQString("%1(%2.%3) > 0")
- .arg( functionName( funcAvg ), tableName(tabStats), valueName(valPlayCounter) );
+ .tqarg( functionName( funcAvg ), tableName(tabStats), valueName(valPlayCounter) );
m_having += ")";
}
@@ -7853,7 +7853,7 @@ searchBit( ValueType value, int numBits ) {
return -1;
}
-QString
+TQString
QueryBuilder::tableName( int table )
{
// optimize for 1 table which is by far the most frequent case
@@ -7908,7 +7908,7 @@ QueryBuilder::tableName( int table )
const TQString &
-QueryBuilder::valueName( Q_INT64 value )
+QueryBuilder::valueName( TQ_INT64 value )
{
static const TQString values[] = {
"id",
@@ -7939,7 +7939,7 @@ QueryBuilder::valueName( Q_INT64 value )
"sampler",
"bpm",
"copyright",
- "parent",
+ "tqparent",
"weblink",
"autoscan",
"fetchtype",
@@ -7964,12 +7964,12 @@ QueryBuilder::valueName( Q_INT64 value )
/*
* Return true if we should call COALESCE(..,0) for this DB field
* (field names sourced from the old smartplaylistbrowser.cpp code)
- * Warning: addFilter( int, Q_INT64, const TQString&, int bool )
+ * Warning: addFilter( int, TQ_INT64, const TQString&, int bool )
* expects this method to return true for all statistics table clomuns of type INTEGER
* Sqlite doesn't like comparing strings to an INTEGER column.
*/
bool
-QueryBuilder::coalesceField( int table, Q_INT64 value )
+QueryBuilder::coalesceField( int table, TQ_INT64 value )
{
if( tableName( table ) == "statistics" &&
( valueName( value ) == "playcounter" ||
@@ -7983,7 +7983,7 @@ QueryBuilder::coalesceField( int table, Q_INT64 value )
return false;
}
-QString
+TQString
QueryBuilder::functionName( int function )
{
TQString functions;
@@ -8009,10 +8009,10 @@ QueryBuilder::getTableByName(const TQString &name)
return -1;
}
-Q_INT64
+TQ_INT64
QueryBuilder::getValueByName(const TQString &name)
{
- for ( Q_INT64 i = 1; i <= valType; i <<= 1 ) {
+ for ( TQ_INT64 i = 1; i <= valType; i <<= 1 ) {
if (valueName(i) == name) return i;
}
@@ -8020,12 +8020,12 @@ QueryBuilder::getValueByName(const TQString &name)
}
bool
-QueryBuilder::getField(const TQString &tableValue, int *table, Q_INT64 *value)
+QueryBuilder::getField(const TQString &tableValue, int *table, TQ_INT64 *value)
{
- int dotIndex = tableValue.find( '.' ) ;
+ int dotIndex = tableValue.tqfind( '.' ) ;
if ( dotIndex < 0 ) return false;
int tmpTable = getTableByName( tableValue.left(dotIndex) );
- Q_UINT64 tmpValue = getValueByName( tableValue.mid( dotIndex + 1 ) );
+ TQ_UINT64 tmpValue = getValueByName( tableValue.mid( dotIndex + 1 ) );
if ( tmpTable >= 0 && value ) {
*table = tmpTable;
*value = tmpValue;
@@ -8040,7 +8040,7 @@ QueryBuilder::getField(const TQString &tableValue, int *table, Q_INT64 *value)
-QStringList
+TQStringList
QueryBuilder::cleanURL( TQStringList result )
{
//this method replaces the fields for relative path and devive/media id with a
diff --git a/amarok/src/collectiondb.h b/amarok/src/collectiondb.h
index ab38b6cb..3c96538c 100644
--- a/amarok/src/collectiondb.h
+++ b/amarok/src/collectiondb.h
@@ -195,6 +195,7 @@ class PostgresqlConnection : public DbConnection
class LIBAMAROK_EXPORT CollectionDB : public TQObject, public EngineObserver
{
Q_OBJECT
+ TQ_OBJECT
friend class SimilarArtistsInsertionJob;
@@ -246,9 +247,9 @@ class LIBAMAROK_EXPORT CollectionDB : public TQObject, public EngineObserver
#ifdef USE_MYSQL
// We have to escape "\" for mysql, but can't do so for sqlite
( m_dbConnType == DbConnection::mysql )
- ? string.replace("\\", "\\\\").replace( '\'', "''" ) :
+ ? string.tqreplace("\\", "\\\\").tqreplace( '\'', "''" ) :
#endif
- string.replace( '\'', "''" );
+ string.tqreplace( '\'', "''" );
}
TQString boolT() const { if (getDbConnectionType() == DbConnection::postgresql) return "true"; else return "1"; }
@@ -256,13 +257,13 @@ class LIBAMAROK_EXPORT CollectionDB : public TQObject, public EngineObserver
inline bool boolFromSql( const TQString &b ) { return ( b == boolT() || b == "t" ); }
//textColumnType should be used for normal strings, which need to be compared
//either case-sensitively or -insensitively
- TQString textColumnType( int length=255 ) const { if ( getDbConnectionType() == DbConnection::postgresql ) return "TEXT"; else return TQString("VARCHAR(%1)").arg(length); }
+ TQString textColumnType( int length=255 ) const { if ( getDbConnectionType() == DbConnection::postgresql ) return "TEXT"; else return TQString("VARCHAR(%1)").tqarg(length); }
//exactTextColumnType should be used for strings that must be stored exactly, such
//as URLs (necessary for holding control chars etc. if present in URL), except for
//trailing spaces. Comparisions should always be done case-sensitively.
//As we create indices on these columns, we have to restrict them to
//<= 255 chars for mysql < 5.0.3
- TQString exactTextColumnType( int length=1024 ) const { if ( getDbConnectionType() == DbConnection::mysql ) return TQString( "VARBINARY(%1)" ).arg( length>255 ? 255 : length ); else return textColumnType( length ); }
+ TQString exactTextColumnType( int length=1024 ) const { if ( getDbConnectionType() == DbConnection::mysql ) return TQString( "VARBINARY(%1)" ).tqarg( length>255 ? 255 : length ); else return textColumnType( length ); }
// We might consider using LONGTEXT type, as some lyrics could be VERY long..???
TQString longTextColumnType() const { if ( getDbConnectionType() == DbConnection::postgresql ) return "TEXT"; else return "TEXT"; }
TQString randomFunc() const { if ( getDbConnectionType() == DbConnection::postgresql ) return "random()"; else return "RAND()"; }
@@ -328,10 +329,10 @@ class LIBAMAROK_EXPORT CollectionDB : public TQObject, public EngineObserver
void aftCheckPermanentTables( const TQString &currdeviceid, const TQString &currid, const TQString &currurl );
void doAFTStuff( MetaBundle *bundle, const bool tempTables = true );
void emitFileAdded( const TQString &absPath,
- const TQString &uniqueid = TQString::null );
+ const TQString &uniqueid = TQString() );
void emitFilesAdded( const TQMap &map ) { emit filesAdded( map ); }
void emitFileDeleted( const TQString &absPath,
- const TQString &uniqueid = TQString::null );
+ const TQString &uniqueid = TQString() );
bool newUniqueIdForFile( const TQString &path );
bool removeUniqueIdFromFile( const TQString &path );
TQString urlFromUniqueId( const TQString &id );
@@ -340,20 +341,20 @@ class LIBAMAROK_EXPORT CollectionDB : public TQObject, public EngineObserver
//podcast methods
/// Insert a podcast channel into the database. If @param replace is true, replace the row
/// use updatePodcastChannel() always in preference
- bool addPodcastChannel( const PodcastChannelBundle &pcb, const bool &replace=false );
+ bool addPodcastChannel( const PodcastChannelBundle &pcb, const bool &tqreplace=false );
/// Insert a podcast episode into the database. If @param idToUpdate is provided, replace the row
/// use updatePodcastEpisode() always in preference
int addPodcastEpisode( const PodcastEpisodeBundle &episode, const int idToUpdate=0 );
- int addPodcastFolder( const TQString &name, const int parent_id=0, const bool isOpen=false );
+ int addPodcastFolder( const TQString &name, const int tqparent_id=0, const bool isOpen=false );
TQValueList getPodcastChannels();
PodcastEpisodeBundle getPodcastEpisodeById( int id );
- TQValueList getPodcastEpisodes( const KURL &parent, bool newOnly=false, int limit=-1 );
+ TQValueList getPodcastEpisodes( const KURL &tqparent, bool newOnly=false, int limit=-1 );
void removePodcastChannel( const KURL &url ); // will remove all episodes too
void removePodcastEpisode( const int id );
void removePodcastFolder( const int id );
void updatePodcastChannel( const PodcastChannelBundle &b );
void updatePodcastEpisode( const int id, const PodcastEpisodeBundle &b );
- void updatePodcastFolder( const int folder_id, const TQString &name, const int parent_id=0, const bool isOpen=false );
+ void updatePodcastFolder( const int folder_id, const TQString &name, const int tqparent_id=0, const bool isOpen=false );
// these return false when no bundle was available
bool getPodcastChannelBundle( const KURL &url, PodcastChannelBundle *channel );
bool getPodcastEpisodeBundle( const KURL &url, PodcastEpisodeBundle *channel );
@@ -434,7 +435,7 @@ class LIBAMAROK_EXPORT CollectionDB : public TQObject, public EngineObserver
/** Saves images located on the user's filesystem */
bool setAlbumImage( const TQString& artist, const TQString& album, const KURL& url );
/** Saves images obtained from CoverFetcher */
- bool setAlbumImage( const TQString& artist, const TQString& album, TQImage img, const TQString& amazonUrl = TQString::null, const TQString& asin = TQString::null );
+ bool setAlbumImage( const TQString& artist, const TQString& album, TQImage img, const TQString& amazonUrl = TQString(), const TQString& asin = TQString() );
TQString findAmazonImage( const TQString &artist, const TQString &album, const uint width = 1 );
TQString findDirectoryImage( const TQString& artist, const TQString& album, uint width = 0 );
@@ -442,8 +443,8 @@ class LIBAMAROK_EXPORT CollectionDB : public TQObject, public EngineObserver
TQString findMetaBundleImage( const MetaBundle &trackInformation, const uint = 1 );
/// ensure the sql only return urls to tracks for efficiency
- static TQPixmap createDragPixmapFromSQL( const TQString &sql, TQString textOverRide=TQString::null );
- static TQPixmap createDragPixmap( const KURL::List &urls, TQString textOverRide=TQString::null );
+ static TQPixmap createDragPixmapFromSQL( const TQString &sql, TQString textOverRide=TQString() );
+ static TQPixmap createDragPixmap( const KURL::List &urls, TQString textOverRide=TQString() );
static const int DRAGPIXMAP_OFFSET_X = -12;
static const int DRAGPIXMAP_OFFSET_Y = -28;
@@ -472,7 +473,7 @@ class LIBAMAROK_EXPORT CollectionDB : public TQObject, public EngineObserver
static TQString makeShadowedImage( const TQString& albumImage, bool cache = true );
//local cover methods
- void addImageToAlbum( const TQString& image, TQValueList< QPair > info, const bool temporary );
+ void addImageToAlbum( const TQString& image, TQValueList< TQPair > info, const bool temporary );
TQString notAvailCover( const bool withShadow = false, int width = 1 );
//embedded cover methods
@@ -481,7 +482,7 @@ class LIBAMAROK_EXPORT CollectionDB : public TQObject, public EngineObserver
void applySettings();
- void setLyrics( const TQString& url, const TQString& lyrics, const TQString &uniqueid = TQString::null );
+ void setLyrics( const TQString& url, const TQString& lyrics, const TQString &uniqueid = TQString() );
TQString getLyrics( const TQString& url );
/** Remove from the amazon table the item with the specified md5sum **/
@@ -493,7 +494,7 @@ class LIBAMAROK_EXPORT CollectionDB : public TQObject, public EngineObserver
bool isConnected();
void releasePreviousConnection(TQThread *currThread);
- void invalidateArtistAlbumCache() { m_validArtistCache=false; m_validComposerCache=false; m_validAlbumCache=false; };
+ void tqinvalidateArtistAlbumCache() { m_validArtistCache=false; m_validComposerCache=false; m_validAlbumCache=false; };
void vacuum();
@@ -503,13 +504,13 @@ class LIBAMAROK_EXPORT CollectionDB : public TQObject, public EngineObserver
void cancelMovingFileJob();
protected:
- TQCString md5sum( const TQString& artist, const TQString& album, const TQString& file = TQString::null );
+ TQCString md5sum( const TQString& artist, const TQString& album, const TQString& file = TQString() );
void engineTrackEnded( int finalPosition, int trackLength, const TQString &reason );
/** Manages regular folder monitoring scan */
void timerEvent( TQTimerEvent* e );
public slots:
- void fetchCover( TQWidget* parent, const TQString& artist, const TQString& album, bool noedit, TQListViewItem* item = 0 );
+ void fetchCover( TQWidget* tqparent, const TQString& artist, const TQString& album, bool noedit, TQListViewItem* item = 0 );
void scanMonitor();
void startScan();
void stopScan();
@@ -645,12 +646,19 @@ class LIBAMAROK_EXPORT CollectionDB : public TQObject, public EngineObserver
TQMutex m_mutex;
};
+#ifdef Q_MOC_RUN
+// MOC_SKIP_BEGIN
+class INotify : public JobBase
+// MOC_SKIP_END
+#else // Q_MOC_RUN
class INotify : public ThreadManager::DependentJob
+#endif // Q_MOC_RUN
{
Q_OBJECT
+ TQ_OBJECT
public:
- INotify( CollectionDB *parent, int fd );
+ INotify( CollectionDB *tqparent, int fd );
~INotify();
static INotify *instance() { return s_instance; }
@@ -661,7 +669,7 @@ class INotify : public ThreadManager::DependentJob
private:
virtual bool doJob();
- CollectionDB* m_parent;
+ CollectionDB* m_tqparent;
int m_fd;
static INotify* s_instance;
@@ -681,53 +689,53 @@ class QueryBuilder
optRandomize = 8,
optShowAll = 16 /* get all songs, not just mounted ones */ };
/* This has been an enum in the past, but 32 bits wasn't enough anymore :-( */
- static const Q_INT64 valDummy = 0;
- static const Q_INT64 valID = 1LL << 0;
- static const Q_INT64 valName = 1LL << 1;
- static const Q_INT64 valURL = 1LL << 2;
- static const Q_INT64 valTitle = 1LL << 3;
- static const Q_INT64 valTrack = 1LL << 4;
- static const Q_INT64 valScore = 1LL << 5;
- static const Q_INT64 valComment = 1LL << 6;
- static const Q_INT64 valBitrate = 1LL << 7;
- static const Q_INT64 valLength = 1LL << 8;
- static const Q_INT64 valSamplerate = 1LL << 9;
- static const Q_INT64 valPlayCounter = 1LL << 10;
- static const Q_INT64 valCreateDate = 1LL << 11;
- static const Q_INT64 valAccessDate = 1LL << 12;
- //static const Q_INT64 valPercentage = 1LL << 13; // same as valScore
- static const Q_INT64 valArtistID = 1LL << 14;
- static const Q_INT64 valAlbumID = 1LL << 15;
- static const Q_INT64 valYearID = 1LL << 16;
- static const Q_INT64 valGenreID = 1LL << 17;
- static const Q_INT64 valDirectory = 1LL << 18;
- static const Q_INT64 valLyrics = 1LL << 19;
- static const Q_INT64 valRating = 1LL << 20;
- static const Q_INT64 valComposerID = 1LL << 21;
- static const Q_INT64 valDiscNumber = 1LL << 22;
- static const Q_INT64 valFilesize = 1LL << 23;
- static const Q_INT64 valFileType = 1LL << 24;
- static const Q_INT64 valIsCompilation = 1LL << 25;
- static const Q_INT64 valBPM = 1LL << 26;
+ static const TQ_INT64 valDummy = 0;
+ static const TQ_INT64 valID = 1LL << 0;
+ static const TQ_INT64 valName = 1LL << 1;
+ static const TQ_INT64 valURL = 1LL << 2;
+ static const TQ_INT64 valTitle = 1LL << 3;
+ static const TQ_INT64 valTrack = 1LL << 4;
+ static const TQ_INT64 valScore = 1LL << 5;
+ static const TQ_INT64 valComment = 1LL << 6;
+ static const TQ_INT64 valBitrate = 1LL << 7;
+ static const TQ_INT64 valLength = 1LL << 8;
+ static const TQ_INT64 valSamplerate = 1LL << 9;
+ static const TQ_INT64 valPlayCounter = 1LL << 10;
+ static const TQ_INT64 valCreateDate = 1LL << 11;
+ static const TQ_INT64 valAccessDate = 1LL << 12;
+ //static const TQ_INT64 valPercentage = 1LL << 13; // same as valScore
+ static const TQ_INT64 valArtistID = 1LL << 14;
+ static const TQ_INT64 valAlbumID = 1LL << 15;
+ static const TQ_INT64 valYearID = 1LL << 16;
+ static const TQ_INT64 valGenreID = 1LL << 17;
+ static const TQ_INT64 valDirectory = 1LL << 18;
+ static const TQ_INT64 valLyrics = 1LL << 19;
+ static const TQ_INT64 valRating = 1LL << 20;
+ static const TQ_INT64 valComposerID = 1LL << 21;
+ static const TQ_INT64 valDiscNumber = 1LL << 22;
+ static const TQ_INT64 valFilesize = 1LL << 23;
+ static const TQ_INT64 valFileType = 1LL << 24;
+ static const TQ_INT64 valIsCompilation = 1LL << 25;
+ static const TQ_INT64 valBPM = 1LL << 26;
// podcast relevant:
- static const Q_INT64 valCopyright = 1LL << 27;
- static const Q_INT64 valParent = 1LL << 28;
- static const Q_INT64 valWeblink = 1LL << 29;
- static const Q_INT64 valAutoscan = 1LL << 30;
- static const Q_INT64 valFetchtype = 1LL << 31;
- static const Q_INT64 valAutotransfer = 1LL << 32;
- static const Q_INT64 valPurge = 1LL << 33;
- static const Q_INT64 valPurgeCount = 1LL << 34;
- static const Q_INT64 valIsNew = 1LL << 35;
+ static const TQ_INT64 valCopyright = 1LL << 27;
+ static const TQ_INT64 valParent = 1LL << 28;
+ static const TQ_INT64 valWeblink = 1LL << 29;
+ static const TQ_INT64 valAutoscan = 1LL << 30;
+ static const TQ_INT64 valFetchtype = 1LL << 31;
+ static const TQ_INT64 valAutotransfer = 1LL << 32;
+ static const TQ_INT64 valPurge = 1LL << 33;
+ static const TQ_INT64 valPurgeCount = 1LL << 34;
+ static const TQ_INT64 valIsNew = 1LL << 35;
// dynamic collection relevant:
- static const Q_INT64 valDeviceId = 1LL << 36;
- static const Q_INT64 valRelativePath = 1LL << 37;
- static const Q_INT64 valDeviceLabel = 1LL << 38;
- static const Q_INT64 valMountPoint = 1LL << 39;
+ static const TQ_INT64 valDeviceId = 1LL << 36;
+ static const TQ_INT64 valRelativePath = 1LL << 37;
+ static const TQ_INT64 valDeviceLabel = 1LL << 38;
+ static const TQ_INT64 valMountPoint = 1LL << 39;
//label relevant
- static const Q_INT64 valType = 1LL << 40;
+ static const TQ_INT64 valType = 1LL << 40;
- static Q_INT64 valForFavoriteSorting();
+ static TQ_INT64 valForFavoriteSorting();
void sortByFavorite();
// sortByFavoriteAvg() add the average rating, if enabled, the average score, if enabled,
@@ -742,8 +750,8 @@ class QueryBuilder
QueryBuilder();
- void addReturnValue( int table, Q_INT64 value, bool caseSensitive = false /* unless value refers to a string */ );
- void addReturnFunctionValue( int function, int table, Q_INT64 value);
+ void addReturnValue( int table, TQ_INT64 value, bool caseSensitive = false /* unless value refers to a string */ );
+ void addReturnFunctionValue( int function, int table, TQ_INT64 value);
uint countReturnValues();
// Note: the filter chain begins in AND mode
@@ -757,30 +765,30 @@ class QueryBuilder
void addURLFilters( const TQStringList& filter );
void addFilter( int tables, const TQString& filter);
- void addFilter( int tables, Q_INT64 value, const TQString& filter, int mode = modeNormal, bool exact = false );
+ void addFilter( int tables, TQ_INT64 value, const TQString& filter, int mode = modeNormal, bool exact = false );
void addFilters( int tables, const TQStringList& filter );
void excludeFilter( int tables, const TQString& filter );
- void excludeFilter( int tables, Q_INT64 value, const TQString& filter, int mode = modeNormal, bool exact = false );
+ void excludeFilter( int tables, TQ_INT64 value, const TQString& filter, int mode = modeNormal, bool exact = false );
void addMatch( int tables, const TQString& match, bool interpretUnknown = true, bool caseSensitive = true );
- void addMatch( int tables, Q_INT64 value, const TQString& match, bool interpretUnknown = true, bool caseSensitive = true );
+ void addMatch( int tables, TQ_INT64 value, const TQString& match, bool interpretUnknown = true, bool caseSensitive = true );
void addMatches( int tables, const TQStringList& match, bool interpretUnknown = true, bool caseSensitive = true );
void excludeMatch( int tables, const TQString& match );
- void having( int table, Q_INT64 value, int function, int mode, const TQString& match );
+ void having( int table, TQ_INT64 value, int function, int mode, const TQString& match );
- void exclusiveFilter( int tableMatching, int tableNotMatching, Q_INT64 value );
+ void exclusiveFilter( int tableMatching, int tableNotMatching, TQ_INT64 value );
// For numeric filters:
// modeNormal means strict equality; modeBeginMatch and modeEndMatch are not
// allowed; modeBetween needs a second value endRange
- void addNumericFilter(int tables, Q_INT64 value, const TQString &n,
+ void addNumericFilter(int tables, TQ_INT64 value, const TQString &n,
int mode = modeNormal,
- const TQString &endRange = TQString::null);
+ const TQString &endRange = TQString());
void setOptions( int options );
- void sortBy( int table, Q_INT64 value, bool descending = false );
- void sortByFunction( int function, int table, Q_INT64 value, bool descending = false );
- void groupBy( int table, Q_INT64 value );
+ void sortBy( int table, TQ_INT64 value, bool descending = false );
+ void sortByFunction( int function, int table, TQ_INT64 value, bool descending = false );
+ void groupBy( int table, TQ_INT64 value );
void setLimit( int startPos, int length );
// Returns the results in random order.
@@ -788,16 +796,16 @@ class QueryBuilder
// that field.
// The shuffle is cumulative with other sorts, but any sorts after this are
// pointless because of the precision of the random function.
- void shuffle( int table = 0, Q_INT64 value = 0 );
+ void shuffle( int table = 0, TQ_INT64 value = 0 );
static const int dragFieldCount;
- static TQString dragSQLFields();
- void initSQLDrag();
+ static TQString dragSTQLFields();
+ void initSTQLDrag();
void buildQuery( bool withDeviceidPlaceholder = false );
TQString getQuery();
//use withDeviceidPlaceholder = false if the query isn't run immediately (*CurrentTimeT*)
- //and replace (*MountedDeviceSelection*) with CollectionDB::instance()->deviceIdSelection()
+ //and tqreplace (*MountedDeviceSelection*) with CollectionDB::instance()->deviceIdSelection()
TQString query( bool withDeviceidPlaceholder = false ) { buildQuery( withDeviceidPlaceholder ); return m_query; };
void clear();
@@ -805,16 +813,16 @@ class QueryBuilder
// Transform a string table.value "field" into enum values
// @return true if we succeeded
- bool getField(const TQString &tableValue, int *table, Q_INT64 *value);
+ bool getField(const TQString &tableValue, int *table, TQ_INT64 *value);
private:
TQString tableName( int table );
- const TQString &valueName( Q_INT64 value );
+ const TQString &valueName( TQ_INT64 value );
TQString functionName( int functions );
- bool coalesceField( int table, Q_INT64 value );
+ bool coalesceField( int table, TQ_INT64 value );
int getTableByName(const TQString &name);
- Q_INT64 getValueByName(const TQString &field);
+ TQ_INT64 getValueByName(const TQString &field);
TQStringList cleanURL( TQStringList result );
diff --git a/amarok/src/collectionscanner/collectionscanner.cpp b/amarok/src/collectionscanner/collectionscanner.cpp
index a609eaca..fd9a88e7 100644
--- a/amarok/src/collectionscanner/collectionscanner.cpp
+++ b/amarok/src/collectionscanner/collectionscanner.cpp
@@ -56,7 +56,7 @@ CollectionScanner::CollectionScanner( const TQStringList& folders,
, m_recursively( recursive )
, m_incremental( incremental )
, m_restart( restart )
- , m_logfile( Amarok::saveLocation( TQString::null ) + "collection_scan.log" )
+ , m_logfile( Amarok::saveLocation( TQString() ) + "collection_scan.log" )
, m_pause( false )
{
DcopCollectionScannerHandler* dcsh = new DcopCollectionScannerHandler();
@@ -108,31 +108,31 @@ CollectionScanner::doJob() //SLOT
<< endl;
else {
TQTextStream logStream;
- logStream.setDevice(&logFile);
+ logStream.setDevice(TQT_TQIODEVICE(&logFile));
logStream.setEncoding(TQTextStream::UnicodeUTF8);
lastFile = logStream.read();
logFile.close();
}
- TQFile folderFile( Amarok::saveLocation( TQString::null ) + "collection_scan.files" );
+ TQFile folderFile( Amarok::saveLocation( TQString() ) + "collection_scan.files" );
if ( !folderFile.open( IO_ReadOnly ) )
warning() << "Failed to open folder file " << folderFile.name()
<< " read-only" << endl;
else {
TQTextStream folderStream;
- folderStream.setDevice(&folderFile);
+ folderStream.setDevice(TQT_TQIODEVICE(&folderFile));
folderStream.setEncoding(TQTextStream::UnicodeUTF8);
entries = TQStringList::split( "\n", folderStream.read() );
}
- for( int count = entries.findIndex( lastFile ) + 1; count; --count )
+ for( int count = entries.tqfindIndex( lastFile ) + 1; count; --count )
entries.pop_front();
}
else {
foreachType( TQStringList, m_folders ) {
if( (*it).isEmpty() )
- //apparently somewhere empty strings get into the mix
+ //aptqparently somewhere empty strings get into the mix
//which results in a full-system scan! Which we can't allow
continue;
@@ -143,7 +143,7 @@ CollectionScanner::doJob() //SLOT
readDir( dir, entries );
}
- TQFile folderFile( Amarok::saveLocation( TQString::null ) + "collection_scan.files" );
+ TQFile folderFile( Amarok::saveLocation( TQString() ) + "collection_scan.files" );
if ( !folderFile.open( IO_WriteOnly ) )
warning() << "Failed to open folder file " << folderFile.name()
<< " read-only" << endl;
@@ -213,7 +213,7 @@ CollectionScanner::readDir( const TQString& dir, TQStringList& entries )
f = i; break;
}
#else
- f = m_processedDirs.find( de );
+ f = m_processedDirs.tqfind( de );
#endif
if ( ! S_ISDIR( statBuf.st_mode ) || f != -1 ) {
@@ -280,7 +280,7 @@ CollectionScanner::scanFiles( const TQStringList& entries )
{
DEBUG_BLOCK
- typedef QPair CoverBundle;
+ typedef TQPair CoverBundle;
TQStringList validImages; validImages << "jpg" << "png" << "gif" << "jpeg";
TQStringList validPlaylists; validPlaylists << "m3u" << "pls";
@@ -309,10 +309,10 @@ CollectionScanner::scanFiles( const TQStringList& entries )
}
}
- if( validImages.contains( ext ) )
+ if( validImages.tqcontains( ext ) )
images += path;
- else if( m_importPlaylists && validPlaylists.contains( ext ) ) {
+ else if( m_importPlaylists && validPlaylists.tqcontains( ext ) ) {
AttributeMap attributes;
attributes["path"] = path;
writeElement( "playlist", attributes );
@@ -328,7 +328,7 @@ CollectionScanner::scanFiles( const TQStringList& entries )
CoverBundle cover( attributes["artist"], attributes["album"] );
- if( !covers.contains( cover ) )
+ if( !covers.tqcontains( cover ) )
covers += cover;
foreachType( MetaBundle::EmbeddedImageList, images ) {
@@ -447,7 +447,7 @@ CollectionScanner::writeElement( const TQString& name, const AttributeMap& attri
foreachType( AttributeMap, attributes )
{
- // There are at least some characters that Qt cannot categorize which make the resulting
+ // There are at least some characters that TQt cannot categorize which make the resulting
// xml document ill-formed and prevent the parser from processing the remaining document.
// Because of this we skip attributes containing characters not belonging to any category.
TQString data = it.data();
@@ -472,7 +472,7 @@ CollectionScanner::writeElement( const TQString& name, const AttributeMap& attri
TQTextStream stream( &text, IO_WriteOnly );
element.save( stream, 0 );
- std::cout << text.utf8() << std::endl;
+ std::cout << text.utf8().data() << std::endl;
}
diff --git a/amarok/src/collectionscanner/collectionscanner.h b/amarok/src/collectionscanner/collectionscanner.h
index 49ae6a41..2130a1c8 100644
--- a/amarok/src/collectionscanner/collectionscanner.h
+++ b/amarok/src/collectionscanner/collectionscanner.h
@@ -42,6 +42,7 @@ typedef TQMap AttributeMap;
class CollectionScanner : public KApplication
{
Q_OBJECT
+ TQ_OBJECT
public:
CollectionScanner( const TQStringList& folders,
@@ -84,7 +85,7 @@ private:
*/
inline TQString extension( const TQString &fileName )
{
- return fileName.contains( '.' ) ? fileName.mid( fileName.findRev( '.' ) + 1 ).lower() : "";
+ return fileName.tqcontains( '.' ) ? fileName.mid( fileName.tqfindRev( '.' ) + 1 ).lower() : "";
}
/**
diff --git a/amarok/src/collectionscanner/collectionscannerdcophandler.h b/amarok/src/collectionscanner/collectionscannerdcophandler.h
index 3973f31a..bc010106 100644
--- a/amarok/src/collectionscanner/collectionscannerdcophandler.h
+++ b/amarok/src/collectionscanner/collectionscannerdcophandler.h
@@ -27,6 +27,7 @@
class DcopCollectionScannerHandler : public TQObject, virtual public CollectionScannerInterface
{
Q_OBJECT
+ TQ_OBJECT
public:
DcopCollectionScannerHandler();
diff --git a/amarok/src/colorgenerator.h b/amarok/src/colorgenerator.h
index b7ab81eb..1ca9e0a7 100644
--- a/amarok/src/colorgenerator.h
+++ b/amarok/src/colorgenerator.h
@@ -27,7 +27,7 @@
namespace Amarok {
-class Color : public QColor
+class Color : public TQColor
{
static const int CONTRAST = 130;
static const int SATURATION_TARGET = 30;
diff --git a/amarok/src/columnlist.cpp b/amarok/src/columnlist.cpp
index deaaf984..9d1eb698 100644
--- a/amarok/src/columnlist.cpp
+++ b/amarok/src/columnlist.cpp
@@ -31,7 +31,7 @@
#include "columnlist.h"
-class MyCheckListItem: public QCheckListItem
+class MyCheckListItem: public TQCheckListItem
{
typedef TQCheckListItem super;
ColumnList *m_list;
@@ -56,18 +56,18 @@ public:
MyCheckListItem *itemBelow() { return static_cast( TQCheckListItem::itemBelow() ); }
};
-ColumnList::ColumnList( TQWidget *parent, const char *name )
- : TQHBox( parent, name ), m_changed( true )
+ColumnList::ColumnList( TQWidget *tqparent, const char *name )
+ : TQHBox( tqparent, name ), m_changed( true )
{
setSpacing( 5 );
TQVBox *buttonbox = new TQVBox( this );
- m_up = new KPushButton( KGuiItem( TQString::null, "up" ), buttonbox );
+ m_up = new KPushButton( KGuiItem( TQString(), "up" ), buttonbox );
TQToolTip::add( m_up, i18n( "Move column up" ) );
connect( m_up, TQT_SIGNAL( clicked() ), this, TQT_SLOT( moveUp() ) );
- m_down = new KPushButton( KGuiItem( TQString::null, "down" ), buttonbox );
+ m_down = new KPushButton( KGuiItem( TQString(), "down" ), buttonbox );
TQToolTip::add( m_down, i18n( "Move column down" ) );
connect( m_down, TQT_SIGNAL( clicked() ), this, TQT_SLOT( moveDown() ) );
diff --git a/amarok/src/columnlist.h b/amarok/src/columnlist.h
index d28c9be7..efc59b06 100644
--- a/amarok/src/columnlist.h
+++ b/amarok/src/columnlist.h
@@ -27,11 +27,12 @@ class KListView;
class KPushButton;
template class TQValueList;
-class ColumnList: public QHBox
+class ColumnList: public TQHBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- ColumnList( TQWidget *parent = 0, const char *name = 0 );
+ ColumnList( TQWidget *tqparent = 0, const char *name = 0 );
TQValueList visibleColumns() const;
TQValueList columnOrder() const;
bool isChanged() const;
@@ -56,6 +57,7 @@ private:
class ColumnsDialog: public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
static void display();
diff --git a/amarok/src/configdialog.cpp b/amarok/src/configdialog.cpp
index 2a76839f..e364a2a2 100644
--- a/amarok/src/configdialog.cpp
+++ b/amarok/src/configdialog.cpp
@@ -79,8 +79,8 @@ int AmarokConfigDialog::s_currentPage = 0;
// PUBLIC
//////////////////////////////////////////////////////////////////////////////////////////
-AmarokConfigDialog::AmarokConfigDialog( TQWidget *parent, const char* name, KConfigSkeleton *config )
- : KConfigDialog( parent, name, config )
+AmarokConfigDialog::AmarokConfigDialog( TQWidget *tqparent, const char* name, KConfigSkeleton *config )
+ : KConfigDialog( tqparent, name, config )
, m_engineConfig( 0 )
, m_opt4( 0 )
{
@@ -88,7 +88,7 @@ AmarokConfigDialog::AmarokConfigDialog( TQWidget *parent, const char* name, KCon
// IMPORTANT Don't simply change the page names, they are used as identifiers in other parts of the app.
m_opt1 = new Options1( 0, "General" );
-#ifdef Q_WS_MAC
+#ifdef TQ_WS_MAC
m_opt1->kcfg_ShowSplashscreen->setEnabled(false);
m_opt1->kcfg_ShowTrayIcon->setEnabled(false);
m_opt1->kcfg_AnimateTrayIcon->setEnabled(false);
@@ -96,7 +96,7 @@ AmarokConfigDialog::AmarokConfigDialog( TQWidget *parent, const char* name, KCon
#endif
m_opt2 = new Options2( 0, "Appearance" );
m_opt4 = new Options4( 0, "Playback" );
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
Options5 *opt5 = new Options5( 0, "OSD" );
#endif
TQVBox *opt6 = new TQVBox;
@@ -153,29 +153,29 @@ AmarokConfigDialog::AmarokConfigDialog( TQWidget *parent, const char* name, KCon
TQVBox *topbox = new TQVBox( opt9 );
topbox->setSpacing( KDialog::spacingHint() );
TQGroupBox *mediaBox = new TQGroupBox( 2, Qt::Horizontal, i18n("Media Devices"), topbox );
- mediaBox->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Minimum );
+ mediaBox->tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Minimum );
TQVBox *vbox = new TQVBox( mediaBox );
vbox->setSpacing( KDialog::spacingHint() );
m_deviceManager = new MediumPluginManager( vbox );
TQHBox *hbox = new TQHBox( topbox );
hbox->setSpacing( KDialog::spacingHint() );
- hbox->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Minimum );
+ hbox->tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Minimum );
KPushButton *autodetect = new KPushButton( i18n( "Autodetect Devices" ), hbox );
- autodetect->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
+ autodetect->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
connect( autodetect, TQT_SIGNAL(clicked()), m_deviceManager, TQT_SLOT(redetectDevices()) );
KPushButton *add = new KPushButton( i18n( "Add Device..." ), hbox );
- add->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
+ add->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
connect( add, TQT_SIGNAL(clicked()), m_deviceManager, TQT_SLOT(newDevice()) );
TQFrame *frame = new TQFrame( topbox );
- frame->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding );
+ frame->tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding );
// add pages
addPage( m_opt1, i18n( "General" ), Amarok::icon( "settings_general" ), i18n( "Configure General Options" ) );
addPage( m_opt2, i18n( "Appearance" ), Amarok::icon( "settings_view" ), i18n( "Configure Amarok's Appearance" ) );
addPage( m_opt4, i18n( "Playback" ), Amarok::icon( "settings_playback" ), i18n( "Configure Playback" ) );
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
addPage( opt5, i18n( "OSD" ), Amarok::icon( "settings_indicator" ), i18n( "Configure On-Screen-Display" ) );
#endif
addPage( opt6, i18n( "Engine" ), Amarok::icon( "settings_engine" ), i18n( "Configure Engine" ) );
@@ -187,19 +187,19 @@ AmarokConfigDialog::AmarokConfigDialog( TQWidget *parent, const char* name, KCon
TQObjectList *list = queryList( TQLABEL_OBJECT_NAME_STRING, "infoPixmap" );
TQPixmap const info = KGlobal::iconLoader()->iconPath( "messagebox_info", -KIcon::SizeHuge );
for( TQObject *label = list->first(); label; label = list->next() )
- static_cast(label)->setPixmap( info );
+ static_cast(TQT_TQWIDGET(label))->setPixmap( info );
delete list;
//stop KFont Requesters getting stupidly large
list = queryList( TQLABEL_OBJECT_NAME_STRING, "m_sampleLabel" );
for( TQObject *label = list->first(); label; label = list->next() )
- static_cast(label)->setMaximumWidth( 250 );
+ static_cast(TQT_TQWIDGET(label))->setMaximumWidth( 250 );
delete list;
connect( m_deviceManager, TQT_SIGNAL(changed()), TQT_SLOT(updateButtons()) );
connect( m_soundSystem, TQT_SIGNAL(activated( int )), TQT_SLOT(updateButtons()) );
connect( aboutEngineButton, TQT_SIGNAL(clicked()), TQT_SLOT(aboutEngine()) );
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
connect( opt5, TQT_SIGNAL(settingsChanged()), TQT_SLOT(updateButtons()) ); //see options5.ui.h
#endif
connect( m_opt2->styleComboBox, TQT_SIGNAL( activated( int ) ), TQT_SLOT( updateButtons() ) );
@@ -262,14 +262,14 @@ void AmarokConfigDialog::updateButtons()
*/
void AmarokConfigDialog::updateSettings()
{
-#ifdef Q_WS_X11
- OSDPreviewWidget *osd = static_cast( child( "osdpreview" ) );
- AmarokConfig::setOsdAlignment( osd->alignment() );
+#ifdef TQ_WS_X11
+ OSDPreviewWidget *osd = static_cast( TQT_TQWIDGET(child( "osdpreview" )) );
+ AmarokConfig::setOsdAlignment( osd->tqalignment() );
AmarokConfig::setOsdYOffset( osd->y() );
Amarok::OSD::instance()->applySettings();
#endif
- static_cast(child("CollectionSetup"))->writeConfig();
+ static_cast(TQT_TQWIDGET(child("CollectionSetup")))->writeConfig();
if ( m_engineConfig ) m_engineConfig->save();
@@ -351,14 +351,14 @@ void AmarokConfigDialog::updateWidgetsDefault()
*/
bool AmarokConfigDialog::hasChanged()
{
-#ifdef Q_WS_X11
- OSDPreviewWidget *osd = static_cast( child( "osdpreview" ) );
+#ifdef TQ_WS_X11
+ OSDPreviewWidget *osd = static_cast( TQT_TQWIDGET(child( "osdpreview" )) );
#endif
return m_soundSystem->currentText() != m_pluginAmarokName[AmarokConfig::soundSystem()] ||
-#ifdef Q_WS_X11
- osd->alignment() != AmarokConfig::osdAlignment() ||
- osd->alignment() != OSDWidget::Center && osd->y() != AmarokConfig::osdYOffset() ||
+#ifdef TQ_WS_X11
+ osd->tqalignment() != AmarokConfig::osdAlignment() ||
+ osd->tqalignment() != OSDWidget::Center && osd->y() != AmarokConfig::osdYOffset() ||
#endif
m_opt2->styleComboBox->currentText() != AmarokConfig::contextBrowserStyleSheet() ||
Amarok::databaseTypeCode( m_opt7->dbSetupFrame->databaseEngine->currentText() ) != AmarokConfig::databaseEngine().toInt() ||
@@ -385,7 +385,7 @@ bool AmarokConfigDialog::isDefault()
void AmarokConfigDialog::aboutEngine() //SLOT
{
- PluginManager::showAbout( TQString( "Name == '%1'" ).arg( m_soundSystem->currentText() ) );
+ PluginManager::showAbout( TQString( "Name == '%1'" ).tqarg( m_soundSystem->currentText() ) );
}
@@ -407,7 +407,7 @@ void AmarokConfigDialog::soundSystemChanged()
m_engineConfig = EngineController::engine()->configure();
m_engineConfig->view()->reparent( m_engineConfigFrame, TQPoint() );
m_engineConfig->view()->show();
- m_engineConfigFrame->setTitle( i18n( "to change settings", "Configure %1" ).arg( m_soundSystem->currentText() ) );
+ m_engineConfigFrame->setTitle( i18n( "to change settings", "Configure %1" ).tqarg( m_soundSystem->currentText() ) );
m_engineConfigFrame->show();
connect( m_engineConfig, TQT_SIGNAL(viewChanged()), TQT_SLOT(updateButtons()) );
@@ -434,7 +434,7 @@ void AmarokConfigDialog::soundSystemChanged()
TQString AmarokConfigDialog::externalBrowser() const
{
return m_opt1->kComboBox_browser->isEnabled() ?
-#ifdef Q_WS_MAC
+#ifdef TQ_WS_MAC
m_opt1->kComboBox_browser->currentText() == i18n( "Default Browser" ) ?
"open" :
#else
diff --git a/amarok/src/configdialog.h b/amarok/src/configdialog.h
index bd29cc6a..ba0f284a 100644
--- a/amarok/src/configdialog.h
+++ b/amarok/src/configdialog.h
@@ -34,13 +34,14 @@ class MediumPluginManager;
class AmarokConfigDialog : public KConfigDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- AmarokConfigDialog( TQWidget *parent, const char* name, KConfigSkeleton *config );
+ AmarokConfigDialog( TQWidget *tqparent, const char* name, KConfigSkeleton *config );
~AmarokConfigDialog();
void addPage( TQWidget *page, const TQString &itemName, const TQString &pixmapName,
- const TQString &header=TQString::null, bool manage=true);
+ const TQString &header=TQString(), bool manage=true);
void showPageByName( const TQCString& page );
diff --git a/amarok/src/contextbrowser.cpp b/amarok/src/contextbrowser.cpp
index b03685fa..ee3b30bc 100644
--- a/amarok/src/contextbrowser.cpp
+++ b/amarok/src/contextbrowser.cpp
@@ -75,29 +75,29 @@ namespace Amarok
{
TQString escapeHTML( const TQString &s )
{
- return TQString(s).replace( "&", "&" ).replace( "<", "<" ).replace( ">", ">" );
- // .replace( "%", "%25" ) has to be the first(!) one, otherwise we would do things like converting spaces into %20 and then convert them into %25%20
+ return TQString(s).tqreplace( "&", "&" ).tqreplace( "<", "<" ).tqreplace( ">", ">" );
+ // .tqreplace( "%", "%25" ) has to be the first(!) one, otherwise we would do things like converting spaces into %20 and then convert them into %25%20
}
TQString escapeHTMLAttr( const TQString &s )
{
- return TQString(s).replace( "%", "%25" ).replace( "'", "%27" ).replace( "\"", "%22" ).replace( "#", "%23" ).replace( "?", "%3F" );
+ return TQString(s).tqreplace( "%", "%25" ).tqreplace( "'", "%27" ).tqreplace( "\"", "%22" ).tqreplace( "#", "%23" ).tqreplace( "?", "%3F" );
}
TQString unescapeHTMLAttr( const TQString &s )
{
- return TQString(s).replace( "%3F", "?" ).replace( "%23", "#" ).replace( "%22", "\"" ).replace( "%27", "'" ).replace( "%25", "%" );
+ return TQString(s).tqreplace( "%3F", "?" ).tqreplace( "%23", "#" ).tqreplace( "%22", "\"" ).tqreplace( "%27", "'" ).tqreplace( "%25", "%" );
}
TQString verboseTimeSince( const TQDateTime &datetime )
{
- const TQDateTime now = TQDateTime::currentDateTime();
+ const TQDateTime now = TQDateTime::tqcurrentDateTime();
const int datediff = datetime.daysTo( now );
if( datediff >= 6*7 /*six weeks*/ ) { // return absolute month/year
const KCalendarSystem *cal = KGlobal::locale()->calendar();
const TQDate date = datetime.date();
- return i18n( "monthname year", "%1 %2" ).arg( cal->monthName(date), cal->yearString(date, false) );
+ return i18n( "monthname year", "%1 %2" ).tqarg( cal->monthName(date), cal->yearString(date, false) );
}
//TODO "last week" = maybe within 7 days, but prolly before last sunday
@@ -146,7 +146,7 @@ namespace Amarok
*/
void albumArtistTrackFromUrl( TQString url, TQString &artist, TQString &album, TQString &detail )
{
- if ( !url.contains("@@@") ) return;
+ if ( !url.tqcontains("@@@") ) return;
//KHTML removes the trailing space!
if ( url.endsWith( " @@@" ) )
url += ' ';
@@ -165,7 +165,7 @@ namespace Amarok
}
-using Amarok::QStringx;
+using Amarok::TQStringx;
using Amarok::escapeHTML;
using Amarok::escapeHTMLAttr;
using Amarok::unescapeHTMLAttr;
@@ -175,7 +175,7 @@ static
TQString albumImageTooltip( const TQString &albumImage, int size )
{
if ( albumImage == CollectionDB::instance()->notAvailCover( false, size ) )
- return escapeHTMLAttr( i18n( "Click to fetch cover from amazon.%1, right-click for menu." ).arg( CoverManager::amazonTld() ) );
+ return escapeHTMLAttr( i18n( "Click to fetch cover from amazon.%1, right-click for menu." ).tqarg( CoverManager::amazonTld() ) );
return escapeHTMLAttr( i18n( "Click for information from Amazon, right-click for menu." ) );
}
@@ -259,7 +259,7 @@ ContextBrowser::ContextBrowser( const char *name )
connect ( m_lyricsSearchText, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(lyricsSearchText(const TQString & )) );
connect ( m_lyricsSearchText, TQT_SIGNAL(returnPressed()), this, (TQT_SLOT(lyricsSearchTextNext())) );
Amarok::actionCollection()->setAutoConnectShortcuts ( true );
- new KAction( i18n("Search text in lyrics"), KShortcut("/"), this,TQT_SLOT( lyricsSearchTextShow() ), Amarok::actionCollection(), "search_text_lyric");
+ new KAction( i18n("Search text in lyrics"), KShortcut("/"), TQT_TQOBJECT(this),TQT_SLOT( lyricsSearchTextShow() ), Amarok::actionCollection(), "search_text_lyric");
Amarok::actionCollection()->setAutoConnectShortcuts ( false );
}
@@ -267,7 +267,7 @@ ContextBrowser::ContextBrowser( const char *name )
m_lyricsPage = new HTMLView( m_lyricsTab, "lyrics_page", true /* DNDEnabled */, false /* JScriptEnabled*/ );
m_lyricsTextEdit = new KTextEdit ( m_lyricsTab, "lyrics_text_edit");
- m_lyricsTextEdit->setTextFormat( Qt::PlainText );
+ m_lyricsTextEdit->setTextFormat( TQt::PlainText );
m_lyricsTextEdit->hide();
m_wikiTab = new TQVBox(this, "wiki_tab");
@@ -429,7 +429,7 @@ void ContextBrowser::openURLRequest( const KURL &url )
if ( url.hasHTMLRef() )
{
KURL base = url;
- base.setRef(TQString::null);
+ base.setRef(TQString());
// Wikipedia also has links to otherpages with Anchors, so we have to check if it's for the current one
if ( m_wikiCurrentUrl == base.url() ) {
m_wikiPage->gotoAnchor( url.htmlRef() );
@@ -438,14 +438,14 @@ void ContextBrowser::openURLRequest( const KURL &url )
}
// new page
m_dirtyWikiPage = true;
- m_wikiCurrentEntry = TQString::null;
+ m_wikiCurrentEntry = TQString();
showWikipedia( url.url() );
}
else if ( url.protocol() == "show" )
{
- if ( url.path().contains( "suggestLyric-" ) )
+ if ( url.path().tqcontains( "suggestLyric-" ) )
{
- TQString _url = url.url().mid( url.url().find( TQString( "-" ) ) +1 );
+ TQString _url = url.url().mid( url.url().tqfind( TQString( "-" ) ) +1 );
debug() << "Clicked lyrics URL: " << _url << endl;
m_dirtyLyricsPage = true;
showLyrics( _url );
@@ -497,13 +497,13 @@ void ContextBrowser::openURLRequest( const KURL &url )
else if ( url.protocol() == "musicbrainz" )
{
const TQString url = "http://www.musicbrainz.org/taglookup.html?artist=%1&album=%2&track=%3";
- Amarok::invokeBrowser( url.arg( KURL::encode_string_no_slash( artist, 106 /*utf-8*/ ),
+ Amarok::invokeBrowser( url.tqarg( KURL::encode_string_no_slash( artist, 106 /*utf-8*/ ),
KURL::encode_string_no_slash( album, 106 /*utf-8*/ ),
KURL::encode_string_no_slash( track, 106 /*utf-8*/ ) ) );
}
else if ( url.protocol() == "externalurl" )
- Amarok::invokeBrowser( url.url().replace( TQRegExp( "^externalurl:" ), "http:") );
+ Amarok::invokeBrowser( url.url().tqreplace( TQRegExp( "^externalurl:" ), "http:") );
else if ( url.protocol() == "lastfm" )
{
@@ -547,7 +547,7 @@ void ContextBrowser::openURLRequest( const KURL &url )
else if( url.protocol() == "ggartist" )
{
const TQString url2 = TQString( "http://www.google.com/musicsearch?q=%1&res=artist" )
- .arg( KURL::encode_string_no_slash( unescapeHTMLAttr( url.path() ).replace( " ", "+" ), 106 /*utf-8*/ ) );
+ .tqarg( KURL::encode_string_no_slash( unescapeHTMLAttr( url.path() ).tqreplace( " ", "+" ), 106 /*utf-8*/ ) );
Amarok::invokeBrowser( url2 );
}
@@ -558,7 +558,7 @@ void ContextBrowser::openURLRequest( const KURL &url )
else if( url.protocol() == "stream" )
{
- Playlist::instance()->insertMedia( KURL::fromPathOrURL( url.url().replace( TQRegExp( "^stream:" ), "http:" ) ), Playlist::DefaultOptions );
+ Playlist::instance()->insertMedia( KURL::fromPathOrURL( url.url().tqreplace( TQRegExp( "^stream:" ), "http:" ) ), Playlist::DefaultOptions );
}
else if( url.protocol() == "compilationdisc" || url.protocol() == "albumdisc" )
@@ -639,10 +639,10 @@ void ContextBrowser::engineNewMetaData( const MetaBundle& bundle, bool trackChan
if ( MetaBundle( m_currentURL ).artist() != bundle.artist() )
m_dirtyWikiPage = true;
// Prepend stream metadata history item to list
- if ( !m_metadataHistory.first().contains( bundle.prettyTitle() ) )
+ if ( !m_metadataHistory.first().tqcontains( bundle.prettyTitle() ) )
{
newMetaData = true;
- const TQString timeString = KGlobal::locale()->formatTime( TQTime::currentTime() ).replace(" ", " "); // don't break over lines
+ const TQString timeString = KGlobal::locale()->formatTime( TQTime::currentTime() ).tqreplace(" ", " "); // don't break over lines
m_metadataHistory.prepend( TQString( "