diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-19 23:53:00 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-19 23:53:00 -0600 |
commit | 0d44d32a5b8a9dff508eac81e27fb2d4d646e7ff (patch) | |
tree | 9a6e711c7eca7355c96bc420f75d14be7f8da0bd | |
parent | 6af316310b09b2b54606556f5ae0b7e96be845f9 (diff) | |
download | amarok-0d44d32a5b8a9dff508eac81e27fb2d4d646e7ff.tar.gz amarok-0d44d32a5b8a9dff508eac81e27fb2d4d646e7ff.zip |
Rename KApplication to TDEApplication to avoid conflicts with KDE4
23 files changed, 50 insertions, 50 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 5cbd21b0..216e05cc 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -2003,20 +2003,20 @@ cat > conftest.$ac_ext <<EOF #include <kapp.h> int main() { - printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data()); - printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data()); - printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data()); - printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data()); - printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data()); - printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data()); - printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data()); - printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data()); - printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data()); - printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data()); + printf("kde_htmldir=\\"%s\\"\n", TDEApplication::kde_htmldir().data()); + printf("kde_appsdir=\\"%s\\"\n", TDEApplication::kde_appsdir().data()); + printf("kde_icondir=\\"%s\\"\n", TDEApplication::kde_icondir().data()); + printf("kde_sounddir=\\"%s\\"\n", TDEApplication::kde_sounddir().data()); + printf("kde_datadir=\\"%s\\"\n", TDEApplication::kde_datadir().data()); + printf("kde_locale=\\"%s\\"\n", TDEApplication::kde_localedir().data()); + printf("kde_cgidir=\\"%s\\"\n", TDEApplication::kde_cgidir().data()); + printf("kde_confdir=\\"%s\\"\n", TDEApplication::kde_configdir().data()); + printf("kde_mimedir=\\"%s\\"\n", TDEApplication::kde_mimedir().data()); + printf("kde_toolbardir=\\"%s\\"\n", TDEApplication::kde_toolbardir().data()); printf("kde_wallpaperdir=\\"%s\\"\n", - KApplication::kde_wallpaperdir().data()); - printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data()); - printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data()); + TDEApplication::kde_wallpaperdir().data()); + printf("kde_bindir=\\"%s\\"\n", TDEApplication::kde_bindir().data()); + printf("kde_partsdir=\\"%s\\"\n", TDEApplication::kde_partsdir().data()); printf("kde_servicesdir=\\"/tmp/dummy\\"\n"); printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n"); printf("kde_moduledir=\\"/tmp/dummy\\"\n"); diff --git a/amarok/src/amarok.h b/amarok/src/amarok.h index be527630..984b5709 100644 --- a/amarok/src/amarok.h +++ b/amarok/src/amarok.h @@ -54,7 +54,7 @@ namespace Amarok inline TQString xmlVersion() { return "2.4"; } /** - * Convenience function to return the KApplication instance KConfig object + * Convenience function to return the TDEApplication instance KConfig object * pre-set to a specific group. * @param group Will pre-set the KConfig object to this group. */ diff --git a/amarok/src/app.cpp b/amarok/src/app.cpp index f9354b87..af239ca8 100644 --- a/amarok/src/app.cpp +++ b/amarok/src/app.cpp @@ -125,7 +125,7 @@ LIBAMAROK_EXPORT KAboutData aboutData( "amarok", ( "http://amarok.kde.org" ) ); App::App() - : KApplication(KApplication::openX11RGBADisplay()) + : TDEApplication(TDEApplication::openX11RGBADisplay()) , m_pPlayerWindow( 0 ) //will be created in applySettings() { DEBUG_BLOCK @@ -422,7 +422,7 @@ void App::initCliArgs( int argc, char *argv[] ) //static }; TDECmdLineArgs::reset(); - TDECmdLineArgs::init( argc, argv, &::aboutData ); //calls KApplication::addCmdLineOptions() + TDECmdLineArgs::init( argc, argv, &::aboutData ); //calls TDEApplication::addCmdLineOptions() TDECmdLineArgs::addCmdLineOptions( options ); //add our own options } @@ -1285,7 +1285,7 @@ void App::quit() TQTimer::singleShot( 100, this, TQT_SLOT( quit() ) ); return; } - KApplication::quit(); + TDEApplication::quit(); } namespace Amarok diff --git a/amarok/src/app.h b/amarok/src/app.h index 60236bce..ee42d6c0 100644 --- a/amarok/src/app.h +++ b/amarok/src/app.h @@ -39,7 +39,7 @@ class Playlist; class PlaylistWindow; class MediaDeviceManager; -class LIBAMAROK_EXPORT App : public KApplication, public EngineObserver +class LIBAMAROK_EXPORT App : public TDEApplication, public EngineObserver { Q_OBJECT diff --git a/amarok/src/collectiondb.cpp b/amarok/src/collectiondb.cpp index 19433777..a579464f 100644 --- a/amarok/src/collectiondb.cpp +++ b/amarok/src/collectiondb.cpp @@ -6284,7 +6284,7 @@ int SqliteConnection::insert( const TQString& statement, const TQString& /* tabl // this implements a RAND() function compatible with the MySQL RAND() (0-param-form without seed) void SqliteConnection::sqlite_rand(sqlite3_context *context, int /*argc*/, sqlite3_value ** /*argv*/) { - sqlite3_result_double( context, static_cast<double>(KApplication::random()) / (RAND_MAX+1.0) ); + sqlite3_result_double( context, static_cast<double>(TDEApplication::random()) / (RAND_MAX+1.0) ); } // this implements a POWER() function compatible with the MySQL POWER() diff --git a/amarok/src/collectionscanner/collectionscanner.cpp b/amarok/src/collectionscanner/collectionscanner.cpp index ad869a4a..5e3d4d5c 100644 --- a/amarok/src/collectionscanner/collectionscanner.cpp +++ b/amarok/src/collectionscanner/collectionscanner.cpp @@ -50,7 +50,7 @@ CollectionScanner::CollectionScanner( const TQStringList& folders, bool incremental, bool importPlaylists, bool restart ) - : KApplication( /*allowStyles*/ false, /*GUIenabled*/ false ) + : TDEApplication( /*allowStyles*/ false, /*GUIenabled*/ false ) , m_importPlaylists( importPlaylists ) , m_folders( folders ) , m_recursively( recursive ) diff --git a/amarok/src/collectionscanner/collectionscanner.h b/amarok/src/collectionscanner/collectionscanner.h index 24e9fe87..7517374f 100644 --- a/amarok/src/collectionscanner/collectionscanner.h +++ b/amarok/src/collectionscanner/collectionscanner.h @@ -39,7 +39,7 @@ typedef TQMap<TQString, TQString> AttributeMap; * @short Scans directories and builds the Collection */ -class CollectionScanner : public KApplication +class CollectionScanner : public TDEApplication { Q_OBJECT diff --git a/amarok/src/collectionscanner/main.cpp b/amarok/src/collectionscanner/main.cpp index f2b90524..dd15d9d0 100644 --- a/amarok/src/collectionscanner/main.cpp +++ b/amarok/src/collectionscanner/main.cpp @@ -53,7 +53,7 @@ int main( int argc, char *argv[] ) TDECmdLineArgs::reset(); - TDECmdLineArgs::init( argc, argv, &about ); //calls KApplication::addCmdLineOptions() + TDECmdLineArgs::init( argc, argv, &about ); //calls TDEApplication::addCmdLineOptions() TDECmdLineArgs::addCmdLineOptions( options ); //add our own options const TDECmdLineArgs* const args = TDECmdLineArgs::parsedArgs(); @@ -68,7 +68,7 @@ int main( int argc, char *argv[] ) const bool importplaylists = args->isSet( "importplaylists" ); const bool restart = args->isSet( "restart" ); - KApplication::disableAutoDcopRegistration(); + TDEApplication::disableAutoDcopRegistration(); CollectionScanner scanner( folders, recursive, incremental, importplaylists, restart ); diff --git a/amarok/src/database_refactor/sqlite/sqlite_dbengine.cpp b/amarok/src/database_refactor/sqlite/sqlite_dbengine.cpp index c8dd911f..5e1d4477 100644 --- a/amarok/src/database_refactor/sqlite/sqlite_dbengine.cpp +++ b/amarok/src/database_refactor/sqlite/sqlite_dbengine.cpp @@ -200,7 +200,7 @@ int SqliteDbEngine::insert( const TQString& statement, const TQString& /* table // this implements a RAND() function compatible with the MySQL RAND() (0-param-form without seed) void SqliteDbEngine::sqlite_rand(sqlite3_context *context, int /*argc*/, sqlite3_value ** /*argv*/) { - //sqlite3_result_double( context, static_cast<double>(KApplication::random()) / (RAND_MAX+1.0) ); + //sqlite3_result_double( context, static_cast<double>(TDEApplication::random()) / (RAND_MAX+1.0) ); } // this implements a POWER() function compatible with the MySQL POWER() diff --git a/amarok/src/debug.h b/amarok/src/debug.h index 6a17ccd9..c9163a36 100644 --- a/amarok/src/debug.h +++ b/amarok/src/debug.h @@ -52,7 +52,7 @@ namespace Debug // we can't use a statically instantiated TQCString for the indent, because // static namespaces are unique to each dlopened library. So we piggy back - // the TQCString on the KApplication instance + // the TQCString on the TDEApplication instance #define tqtApp reinterpret_cast<TQObject*>(tqApp) class Indent : TQObject diff --git a/amarok/src/devicemanager.cpp b/amarok/src/devicemanager.cpp index 797688be..b6d40816 100644 --- a/amarok/src/devicemanager.cpp +++ b/amarok/src/devicemanager.cpp @@ -39,7 +39,7 @@ DeviceManager* DeviceManager::instance() DeviceManager::DeviceManager() { DEBUG_BLOCK - m_dc = KApplication::dcopClient(); + m_dc = TDEApplication::dcopClient(); m_dc->setNotifications(true); m_valid = false; diff --git a/amarok/src/dynamicmode.cpp b/amarok/src/dynamicmode.cpp index 1bc8aa7b..a0825782 100644 --- a/amarok/src/dynamicmode.cpp +++ b/amarok/src/dynamicmode.cpp @@ -134,7 +134,7 @@ DEBUG_BLOCK if( suggestions.isEmpty() ) break; - TQString chosen = suggestions[ KApplication::random() % suggestions.count() ]; + TQString chosen = suggestions[ TDEApplication::random() % suggestions.count() ]; debug() << "found similar artist: " << chosen << endl; @@ -144,7 +144,7 @@ DEBUG_BLOCK if( newSuggestions.isEmpty() ) break; - TQString s = newSuggestions[ KApplication::random() % newSuggestions.count() ]; + TQString s = newSuggestions[ TDEApplication::random() % newSuggestions.count() ]; debug() << "found extended similar artist: " << s << endl; newChosen += s; @@ -241,7 +241,7 @@ DEBUG_BLOCK if( trackList.isEmpty() ) break; - KURL::List::Iterator urlIt = trackList.at( KApplication::random() % trackList.count() ); + KURL::List::Iterator urlIt = trackList.at( TDEApplication::random() % trackList.count() ); if( (*urlIt).isValid() ) { returnList << (*urlIt).path(); @@ -319,7 +319,7 @@ DEBUG_BLOCK songCount = limit; else // Let's get a random limit, repecting the original one. - offset += KApplication::random() % (limit - songCount); + offset += TDEApplication::random() % (limit - songCount); if( findLocation == -1 ) // there is no limit { @@ -361,7 +361,7 @@ DEBUG_BLOCK { for( uint i=0; i < songCount && urls.count(); i++ ) { - KURL::List::iterator newItem = urls.at( KApplication::random() % urls.count() ); + KURL::List::iterator newItem = urls.at( TDEApplication::random() % urls.count() ); addMe << (*newItem); urls.remove( newItem ); } @@ -388,7 +388,7 @@ DEBUG_BLOCK { if( m_cachedItemSet.isEmpty() ) break; - const int pos = KApplication::random() % m_cachedItemSet.count(); + const int pos = TDEApplication::random() % m_cachedItemSet.count(); KURL::List::iterator newItem = m_cachedItemSet.at( pos ); if( TQFile::exists( (*newItem).path() ) ) retrieval << (*newItem); diff --git a/amarok/src/konquisidebar/universalamarok.cpp b/amarok/src/konquisidebar/universalamarok.cpp index 9b634be5..c82b4e64 100644 --- a/amarok/src/konquisidebar/universalamarok.cpp +++ b/amarok/src/konquisidebar/universalamarok.cpp @@ -283,7 +283,7 @@ void UniversalAmarok::noAmarokRunning() { } void UniversalAmarok::runAmarok() { - KApplication::tdeinitExecWait("amarok"); + TDEApplication::tdeinitExecWait("amarok"); } diff --git a/amarok/src/ktrm.cpp b/amarok/src/ktrm.cpp index 57d3a545..8419db89 100644 --- a/amarok/src/ktrm.cpp +++ b/amarok/src/ktrm.cpp @@ -252,7 +252,7 @@ class KTRMEventHandler : public TQObject public: static void send(int fileId, KTRMEvent::Status status) { - KApplication::postEvent(instance(), new KTRMEvent(fileId, status)); + TDEApplication::postEvent(instance(), new KTRMEvent(fileId, status)); } protected: diff --git a/amarok/src/main.cpp b/amarok/src/main.cpp index 562f0107..6df169a6 100644 --- a/amarok/src/main.cpp +++ b/amarok/src/main.cpp @@ -99,7 +99,7 @@ int main( int argc, char *argv[] ) registerTaglibPlugins(); - KApplication::disableAutoDcopRegistration(); + TDEApplication::disableAutoDcopRegistration(); App::initCliArgs( argc, argv ); App app; diff --git a/amarok/src/pixmapviewer.cpp b/amarok/src/pixmapviewer.cpp index a710c254..7d421831 100644 --- a/amarok/src/pixmapviewer.cpp +++ b/amarok/src/pixmapviewer.cpp @@ -59,7 +59,7 @@ void PixmapViewer::contentsMouseMoveEvent(TQMouseEvent *event) { } TQSize PixmapViewer::maximalSize() { - return m_pixmap.size().boundedTo( KApplication::desktop()->size() ) + size() - viewport()->size(); + return m_pixmap.size().boundedTo( TDEApplication::desktop()->size() ) + size() - viewport()->size(); } #include "pixmapviewer.moc" diff --git a/amarok/src/playlist.cpp b/amarok/src/playlist.cpp index 81b36e49..70cddfea 100644 --- a/amarok/src/playlist.cpp +++ b/amarok/src/playlist.cpp @@ -1079,7 +1079,7 @@ Playlist::playNextTrack( bool forceNext ) else { if( Amarok::favorNone() ) - item = tracks.at( KApplication::random() % tracks.count() ); //is O(1) + item = tracks.at( TDEApplication::random() % tracks.count() ); //is O(1) else { const uint currenttime_t = TQDateTime::currentDateTime().toTime_t(); @@ -1115,12 +1115,12 @@ Playlist::playNextTrack( bool forceNext ) TQ_INT64 random; if( Amarok::favorLastPlay() ) //really big huge numbers { - TQ_INT64 r = TQ_INT64( ( KApplication::random() / pow( 2, sizeof( int ) * 8 ) ) + TQ_INT64 r = TQ_INT64( ( TDEApplication::random() / pow( 2, sizeof( int ) * 8 ) ) * pow( 2, 64 ) ); random = r % total; } else - random = KApplication::random() % total; + random = TDEApplication::random() % total; int i = 0; for( int n = tracks.count(); i < n && random >= 0; ++i ) random -= weights.at( i ); @@ -2395,9 +2395,9 @@ Playlist::contentsDragMoveEvent( TQDragMoveEvent* e ) if( !e->isAccepted() ) return; #if KDE_IS_VERSION( 3, 3, 91 ) - const bool ctrlPressed = KApplication::keyboardMouseState() & TQt::ControlButton; + const bool ctrlPressed = TDEApplication::keyboardMouseState() & TQt::ControlButton; #else - const bool ctrlPressed = KApplication::keyboardModifiers() & ControlMask; + const bool ctrlPressed = TDEApplication::keyboardModifiers() & ControlMask; #endif //Get the closest item _before_ the cursor @@ -3370,7 +3370,7 @@ Playlist::shuffle() //SLOT takeItem( item ); //shuffle - KRandomSequence( (long)KApplication::random() ).randomize( &list ); + KRandomSequence( (long)TDEApplication::random() ).randomize( &list ); //reinsert in new order for( TQListViewItem *item = list.first(); item; item = list.next() ) diff --git a/amarok/src/playlistbrowseritem.cpp b/amarok/src/playlistbrowseritem.cpp index d3a36869..b2401e41 100644 --- a/amarok/src/playlistbrowseritem.cpp +++ b/amarok/src/playlistbrowseritem.cpp @@ -3487,7 +3487,7 @@ void ShoutcastBrowser::setOpen( bool open ) TQStringList tmpdirs = KGlobal::dirs()->resourceDirs( "tmp" ); TQString tmpfile = tmpdirs[0]; - tmpfile += "/amarok-genres-" + KApplication::randomString(10) + ".xml-"; + tmpfile += "/amarok-genres-" + TDEApplication::randomString(10) + ".xml-"; //get the genre list if ( !m_downloading ) @@ -3659,7 +3659,7 @@ void ShoutcastGenre::setOpen( bool open ) void ShoutcastGenre::startGenreDownload( TQString genre, TQString tmppath ) { - TQString tmpfile = tmppath + "/amarok-list-" + genre + "-" + KApplication::randomString(10) + ".xml"; + TQString tmpfile = tmppath + "/amarok-list-" + genre + "-" + TDEApplication::randomString(10) + ".xml"; KIO::CopyJob *cj = KIO::copy( "http://www.shoutcast.com/sbin/newxml.phtml?genre=" + genre, tmpfile, false ); connect( cj, TQT_SIGNAL( copyingDone ( KIO::Job*, const KURL&, const KURL&, bool, bool ) ), this, TQT_SLOT( doneListDownload( KIO::Job*, const KURL&, const KURL&, bool, bool ) ) ); diff --git a/amarok/src/scripts/graphequalizer/eqdialog.ui.h b/amarok/src/scripts/graphequalizer/eqdialog.ui.h index 244422cb..7d0e661d 100644 --- a/amarok/src/scripts/graphequalizer/eqdialog.ui.h +++ b/amarok/src/scripts/graphequalizer/eqdialog.ui.h @@ -25,7 +25,7 @@ void EqDialog::init() TQByteArray send_data, reply_data; TQCString reply_type; //kdDebug() << "continue" << endl; - if(!KApplication::dcopClient()->call("amarok","player","equalizerEnabled()", send_data, reply_type, reply_data,true,1000)); + if(!TDEApplication::dcopClient()->call("amarok","player","equalizerEnabled()", send_data, reply_type, reply_data,true,1000)); //kdDebug() << "called" << endl; TQDataStream answer(reply_data, IO_ReadOnly); //kdDebug() << "answer created" << answer << endl; @@ -42,5 +42,5 @@ void EqDialog::eqGroupBox_toggled( bool eqEnabled) TQByteArray data; TQDataStream arg(data, IO_WriteOnly); arg << eqEnabled; - KApplication::dcopClient()->send("amarok", "player", "setEqualizerEnabled(bool)" , data); + TDEApplication::dcopClient()->send("amarok", "player", "setEqualizerEnabled(bool)" , data); } diff --git a/amarok/src/scripts/graphequalizer/equalizercanvasview.cpp b/amarok/src/scripts/graphequalizer/equalizercanvasview.cpp index a377b88e..68423ddb 100644 --- a/amarok/src/scripts/graphequalizer/equalizercanvasview.cpp +++ b/amarok/src/scripts/graphequalizer/equalizercanvasview.cpp @@ -280,7 +280,7 @@ void CallAmarok::updateEq() TQValueList<int>::iterator it; for ( it = cs.begin(); it != cs.end(); ++it ) arg << (*it); - KApplication::dcopClient()->send("amarok", "player", + TDEApplication::dcopClient()->send("amarok", "player", "setEqualizer(int,int,int,int,int,int,int,int,int,int,int)" , data); } diff --git a/amarok/src/scripts/graphequalizer/main.cpp b/amarok/src/scripts/graphequalizer/main.cpp index 4f5fcb3b..29ed4906 100644 --- a/amarok/src/scripts/graphequalizer/main.cpp +++ b/amarok/src/scripts/graphequalizer/main.cpp @@ -31,7 +31,7 @@ int main(int argc, char **argv) KAboutData::License_GPL, "(C) 2005 Ian Monroe", 0, 0, "ian@monroe.nu"); about.addAuthor( "Ian Monroe", 0, "ian@monroe.nu" ); TDECmdLineArgs::init( argc, argv, &about ); - KApplication app; + TDEApplication app; EqDialog *mainWin = new EqDialog(); // mainWin = new EqualizerGraph(0,"equalizerdialog"); // TQCanvas canvas; diff --git a/amarok/src/tagguesserconfigdialog.ui.h b/amarok/src/tagguesserconfigdialog.ui.h index dac41fac..07033c7b 100644 --- a/amarok/src/tagguesserconfigdialog.ui.h +++ b/amarok/src/tagguesserconfigdialog.ui.h @@ -76,7 +76,7 @@ void TagGuesserConfigDialog::accept() { if(lvSchemes->renameLineEdit()) { TQKeyEvent returnKeyPress(TQEvent::KeyPress, Key_Return, 0, 0); - KApplication::sendEvent( lvSchemes->renameLineEdit(), &returnKeyPress ); + TDEApplication::sendEvent( lvSchemes->renameLineEdit(), &returnKeyPress ); } TQStringList schemes; diff --git a/doc/pt/develop.docbook b/doc/pt/develop.docbook index 203456c4..71183b7f 100644 --- a/doc/pt/develop.docbook +++ b/doc/pt/develop.docbook @@ -61,7 +61,7 @@ <entry >app.cpp</entry> <entry ->Esta é a classe derivada da KApplication e que é mãe de vários objectos fundamentais para a execução do &amarok;, ⪚ o motor, o DCOP, a bandeja do sistema, os elementos gráficos de topo, etc.</entry> +>Esta é a classe derivada da TDEApplication e que é mãe de vários objectos fundamentais para a execução do &amarok;, ⪚ o motor, o DCOP, a bandeja do sistema, os elementos gráficos de topo, etc.</entry> </row> <row> |