Rename KApplication to TDEApplication to avoid conflicts with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent 479647c43c
commit 94c9dc3822

@ -111,7 +111,7 @@ CervisiaPart::CervisiaPart( TQWidget *parentWidget, const char *widgetName,
// start the cvs DCOP service // start the cvs DCOP service
TQString error; TQString error;
TQCString appId; TQCString appId;
if( KApplication::startServiceByDesktopName("cvsservice", TQStringList(), &error, &appId) ) if( TDEApplication::startServiceByDesktopName("cvsservice", TQStringList(), &error, &appId) )
{ {
KMessageBox::sorry(0, i18n("Starting cvsservice failed with message: ") + KMessageBox::sorry(0, i18n("Starting cvsservice failed with message: ") +
error, "Cervisia"); error, "Cervisia");
@ -1642,14 +1642,14 @@ void CervisiaPart::slotConfigure()
void CervisiaPart::slotHelp() void CervisiaPart::slotHelp()
{ {
emit setStatusBarText( i18n("Invoking help on Cervisia") ); emit setStatusBarText( i18n("Invoking help on Cervisia") );
KApplication::startServiceByDesktopName("khelpcenter", TQString("help:/cervisia/index.html")); TDEApplication::startServiceByDesktopName("khelpcenter", TQString("help:/cervisia/index.html"));
} }
void CervisiaPart::slotCVSInfo() void CervisiaPart::slotCVSInfo()
{ {
emit setStatusBarText( i18n("Invoking help on CVS") ); emit setStatusBarText( i18n("Invoking help on CVS") );
KApplication::startServiceByDesktopName("khelpcenter", TQString("info:/cvs/Top")); TDEApplication::startServiceByDesktopName("khelpcenter", TQString("info:/cvs/Top"));
} }

@ -30,7 +30,7 @@ How-to use this service in C++ applications:
QString error; QString error;
QCString appId; QCString appId;
KApplication::startServiceByDesktopName("cvsservice", QStringList(), &error, TDEApplication::startServiceByDesktopName("cvsservice", QStringList(), &error,
&appId); &appId);
// create stub for repository // create stub for repository

@ -46,8 +46,8 @@ extern "C" KDE_EXPORT int kdemain(int argc, char** argv)
TDECmdLineArgs::addCmdLineOptions(options); TDECmdLineArgs::addCmdLineOptions(options);
// no need to register with the dcop server // no need to register with the dcop server
KApplication::disableAutoDcopRegistration(); TDEApplication::disableAutoDcopRegistration();
KApplication app; TDEApplication app;
// no need for session management // no need for session management
app.disableSessionManagement(); app.disableSessionManagement();

@ -35,7 +35,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char** argv)
TDECmdLineArgs::init(argc, argv, &about); TDECmdLineArgs::init(argc, argv, &about);
KApplication app; TDEApplication app;
// This app is started automatically, no need for session management // This app is started automatically, no need for session management
app.disableSessionManagement(); app.disableSessionManagement();

@ -43,7 +43,7 @@ static CvsService_stub* StartDCOPService(const TQString& directory)
// start the cvs DCOP service // start the cvs DCOP service
TQString error; TQString error;
TQCString appId; TQCString appId;
if( KApplication::startServiceByDesktopName("cvsservice", TQStringList(), if( TDEApplication::startServiceByDesktopName("cvsservice", TQStringList(),
&error, &appId) ) &error, &appId) )
{ {
std::cerr << "Starting cvsservice failed with message: " std::cerr << "Starting cvsservice failed with message: "
@ -167,7 +167,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
TDECmdLineArgs::init(argc, argv, &about); TDECmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::addCmdLineOptions(options); TDECmdLineArgs::addCmdLineOptions(options);
KApplication app; TDEApplication app;
TQString resolvefile = TDECmdLineArgs::parsedArgs()->getOption("resolve"); TQString resolvefile = TDECmdLineArgs::parsedArgs()->getOption("resolve");
if (!resolvefile.isEmpty()) if (!resolvefile.isEmpty())

@ -7,7 +7,7 @@ cat << EOF > $LOCATION_ROOT/${APP_NAME_LC}/${APP_NAME_LC}_client.cpp
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
KApplication app(argc, argv, "${APP_NAME_LC}_client", false); TDEApplication app(argc, argv, "${APP_NAME_LC}_client", false);
// get our DCOP client and attach so that we may use it // get our DCOP client and attach so that we may use it
DCOPClient *client = app.dcopClient(); DCOPClient *client = app.dcopClient();

@ -24,7 +24,7 @@ int main(int argc, char **argv)
about.addAuthor( "${AUTHOR}", 0, "${EMAIL}" ); about.addAuthor( "${AUTHOR}", 0, "${EMAIL}" );
TDECmdLineArgs::init(argc, argv, &about); TDECmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::addCmdLineOptions(options); TDECmdLineArgs::addCmdLineOptions(options);
KApplication app; TDEApplication app;
// register ourselves as a dcop client // register ourselves as a dcop client
app.dcopClient()->registerAs(app.name(), false); app.dcopClient()->registerAs(app.name(), false);

@ -23,7 +23,7 @@ int main(int argc, char **argv)
about.addAuthor( "${AUTHOR}", 0, "${EMAIL}" ); about.addAuthor( "${AUTHOR}", 0, "${EMAIL}" );
TDECmdLineArgs::init(argc, argv, &about); TDECmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
KApplication app; TDEApplication app;
// see if we are starting with session management // see if we are starting with session management
if (app.isRestored()) if (app.isRestored())

@ -319,7 +319,7 @@ bool PoThumbCreator::create(const TQString &path, int width, int height, TQImage
// very very seldom a babelfish lives in po files and even // very very seldom a babelfish lives in po files and even
// in this seldom cases they are usually hidden ;-) // in this seldom cases they are usually hidden ;-)
if(pix.width() > 40 && KApplication::random()%2000 == 0) if(pix.width() > 40 && TDEApplication::random()%2000 == 0)
{ {
TQPixmap kbabelPix; TQPixmap kbabelPix;
if(pix.width() < 80) if(pix.width() < 80)

@ -53,7 +53,7 @@ public:
virtual void updatedFile( TQCString url ); virtual void updatedFile( TQCString url );
}; };
class CatalogManagerApp : public KApplication class CatalogManagerApp : public TDEApplication
{ {
public: public:
CatalogManagerApp(); CatalogManagerApp();

@ -379,7 +379,7 @@ void CVSHandler::processDiff( TQString output )
tmpFile.close(); tmpFile.close();
TQString error; TQString error;
if ( KApplication::startServiceByName( "Kompare", tmpFile.name(), &error ) ) if ( TDEApplication::startServiceByName( "Kompare", tmpFile.name(), &error ) )
KMessageBox::error( 0, error ); KMessageBox::error( 0, error );
} }

@ -487,7 +487,7 @@ void SVNHandler::processDiff( TQString output )
tmpFile.close(); tmpFile.close();
TQString error; TQString error;
if ( KApplication::startServiceByName( "Kompare", tmpFile.name(), &error ) ) if ( TDEApplication::startServiceByName( "Kompare", tmpFile.name(), &error ) )
KMessageBox::error( 0, error ); KMessageBox::error( 0, error );
} }

@ -61,7 +61,7 @@
CatalogManager *CatalogManagerApp::_view = 0; CatalogManager *CatalogManagerApp::_view = 0;
CatalogManagerApp::CatalogManagerApp() CatalogManagerApp::CatalogManagerApp()
: KApplication() : TDEApplication()
{ {
kbInterface = new CatalogManagerInterface; kbInterface = new CatalogManagerInterface;
_view = 0; _view = 0;
@ -222,7 +222,7 @@ int main(int argc, char **argv)
TDECmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
// Add options from other components // Add options from other components
KApplication::addCmdLineOptions(); TDEApplication::addCmdLineOptions();
CatalogManagerApp app; CatalogManagerApp app;

@ -1560,7 +1560,7 @@ void KBabelMW::enableStop(bool flag)
void KBabelMW::gettextHelp() void KBabelMW::gettextHelp()
{ {
TQString error; TQString error;
KApplication::startServiceByDesktopName("khelpcenter", TDEApplication::startServiceByDesktopName("khelpcenter",
TQString("info:/gettext"), &error); TQString("info:/gettext"), &error);
if(!error.isEmpty()) if(!error.isEmpty())

@ -203,7 +203,7 @@ int KBabelApp::newInstance()
} }
if(showSplash) if(showSplash)
{ {
KApplication::restoreOverrideCursor(); TDEApplication::restoreOverrideCursor();
/* /*
KMessageBox::information(0, KMessageBox::information(0,
"This is a development version of KBabel!\n" "This is a development version of KBabel!\n"

@ -1410,7 +1410,7 @@ void KBabelDictBox::copy()
} }
else else
{ {
TQClipboard *cb = KApplication::clipboard(); TQClipboard *cb = TDEApplication::clipboard();
cb->setText(translation()); cb->setText(translation());
} }
} }

@ -47,7 +47,7 @@
#include "kbabelsplash.h" #include "kbabelsplash.h"
#include <version.h> #include <version.h>
class KBabelDictApplication : public KApplication class KBabelDictApplication : public TDEApplication
{ {
public: public:
KBabelDictApplication(); KBabelDictApplication();
@ -58,7 +58,7 @@ private:
}; };
KBabelDictApplication::KBabelDictApplication() KBabelDictApplication::KBabelDictApplication()
: KApplication() : TDEApplication()
, topLevel(0) , topLevel(0)
{ {
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
@ -69,7 +69,7 @@ KBabelDictApplication::KBabelDictApplication()
if(showSplash) if(showSplash)
{ {
timer.start(2000,true); timer.start(2000,true);
KApplication::setOverrideCursor(KCursor::waitCursor()); TDEApplication::setOverrideCursor(KCursor::waitCursor());
splash = new KBabelSplash(); splash = new KBabelSplash();
splash->show(); splash->show();
} }
@ -88,7 +88,7 @@ KBabelDictApplication::KBabelDictApplication()
} }
if(showSplash) if(showSplash)
{ {
KApplication::restoreOverrideCursor(); TDEApplication::restoreOverrideCursor();
} }
TQObject::connect( topLevel, TQT_SIGNAL( destroyed() ), TQObject::connect( topLevel, TQT_SIGNAL( destroyed() ),
@ -128,7 +128,7 @@ int main(int argc, char **argv)
TDECmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
// Add options from other components // Add options from other components
KApplication::addCmdLineOptions(); TDEApplication::addCmdLineOptions();
KBabelDictApplication app; KBabelDictApplication app;

@ -54,7 +54,7 @@ int main(int argc, char *argv[])
TDECmdLineArgs::init( argc, argv, &aboutData ); TDECmdLineArgs::init( argc, argv, &aboutData );
TDECmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
KApplication app; TDEApplication app;
app.dcopClient()->attach(); app.dcopClient()->attach();

@ -46,7 +46,7 @@
#include <tqtextbrowser.h> #include <tqtextbrowser.h>
#include <tqtextcodec.h> #include <tqtextcodec.h>
SvnHelper::SvnHelper():KApplication() { SvnHelper::SvnHelper():TDEApplication() {
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
KWinModule wm ( TQT_TQOBJECT(this) ); KWinModule wm ( TQT_TQOBJECT(this) );
m_id = wm.activeWindow(); m_id = wm.activeWindow();
@ -279,11 +279,11 @@ int main(int argc, char **argv) {
TDECmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
KGlobal::locale()->setMainCatalogue("kio_svn"); KGlobal::locale()->setMainCatalogue("kio_svn");
KApplication::addCmdLineOptions(); TDEApplication::addCmdLineOptions();
if ( TDECmdLineArgs::parsedArgs()->count()==0 ) if ( TDECmdLineArgs::parsedArgs()->count()==0 )
TDECmdLineArgs::usage(); TDECmdLineArgs::usage();
KApplication *app = new SvnHelper(); TDEApplication *app = new SvnHelper();
// app->dcopClient()->attach(); // app->dcopClient()->attach();
app->exec(); app->exec();

@ -25,7 +25,7 @@
#include <twinmodule.h> #include <twinmodule.h>
#include <tqstringlist.h> #include <tqstringlist.h>
class SvnHelper:public KApplication { class SvnHelper:public TDEApplication {
Q_OBJECT Q_OBJECT

@ -18,7 +18,7 @@ There are two ways to activate memory usage loggings by ktrace :
1) The LD_PRELOAD way 1) The LD_PRELOAD way
This way, you can debug any application without having to recompile it, This way, you can debug any application without having to recompile it,
but you'll have to debug also the memory allocated by KApplication and but you'll have to debug also the memory allocated by TDEApplication and
friends. friends.
You can activate malloc logging by starting yourApplication as: You can activate malloc logging by starting yourApplication as:
@ -57,8 +57,8 @@ to add any commandline options.
TIPS TIPS
==== ====
* If you can't be bothered with the stuff that KApplication allocates for you * If you can't be bothered with the stuff that TDEApplication allocates for you
you might want to put the ktrace() call after the KApplication constructor. you might want to put the ktrace() call after the TDEApplication constructor.
This will lead to a lot of warnings like: This will lead to a lot of warnings like:
Freeing unalloacted memory: 0x08056108 Freeing unalloacted memory: 0x08056108

@ -60,7 +60,7 @@ int main(int argc, char *argv[])
TDECmdLineArgs::init(argc, argv, &aboutData); TDECmdLineArgs::init(argc, argv, &aboutData);
TDECmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
KApplication app; TDEApplication app;
bool difault = false; bool difault = false;
// see if we are starting with session management // see if we are starting with session management

@ -42,7 +42,7 @@ int main(int argc, char *argv[])
TDECmdLineArgs::init( argc, argv, &aboutData ); TDECmdLineArgs::init( argc, argv, &aboutData );
TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options. TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options.
KApplication a; TDEApplication a;
Spy *spy = new Spy(); Spy *spy = new Spy();
a.setMainWidget(spy); a.setMainWidget(spy);

@ -82,7 +82,7 @@ int main(int argc, char **argv)
TDECmdLineArgs::addCmdLineOptions(options); TDECmdLineArgs::addCmdLineOptions(options);
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
KApplication *app = new KApplication(false, false); TDEApplication *app = new TDEApplication(false, false);
// Check arguments // Check arguments

@ -50,7 +50,7 @@ int main(int argc, char **argv)
TDECmdLineArgs::init(argc, argv, &about); TDECmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
KApplication app; TDEApplication app;
// see if we are starting with session management // see if we are starting with session management
if (app.isRestored()) if (app.isRestored())

@ -50,7 +50,7 @@ int main( int argc, char** argv )
TDECmdLineArgs::init(argc, argv, &about); TDECmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
KApplication app; TDEApplication app;
KUnitTest::RunnerGUI runner(0); KUnitTest::RunnerGUI runner(0);
runner.show(); runner.show();

@ -62,7 +62,7 @@ int main( int argc, char **argv )
KUnitTest::Runner::loadModules(args->getOption("folder"), args->getOption("query")); KUnitTest::Runner::loadModules(args->getOption("folder"), args->getOption("query"));
KUnitTest::Runner::setDebugCapturingEnabled(args->isSet("enable-dbgcap")); KUnitTest::Runner::setDebugCapturingEnabled(args->isSet("enable-dbgcap"));
KApplication app; TDEApplication app;
KUnitTest::RunnerGUI runner(0); KUnitTest::RunnerGUI runner(0);
runner.show(); runner.show();

@ -1149,7 +1149,7 @@ CanvasEdgeLabel::CanvasEdgeLabel(CallGraphView* v, CanvasEdge* ce,
if (e->call() && (e->call()->isRecursion() || e->call()->inCycle())) { if (e->call() && (e->call()->isRecursion() || e->call()->inCycle())) {
TQString icon = "undo"; TQString icon = "undo";
KIconLoader* loader = KApplication::kApplication()->iconLoader(); KIconLoader* loader = TDEApplication::kApplication()->iconLoader();
TQPixmap p= loader->loadIcon(icon, KIcon::Small, 0, TQPixmap p= loader->loadIcon(icon, KIcon::Small, 0,
KIcon::DefaultState, 0, true); KIcon::DefaultState, 0, true);
setPixmap(0, p); setPixmap(0, p);

@ -146,7 +146,7 @@ void CallItem::updateCost()
if (sameCycle && !selectedIsCycle && !shownIsCycle) { if (sameCycle && !selectedIsCycle && !shownIsCycle) {
TQString icon = "undo"; TQString icon = "undo";
KIconLoader* loader = KApplication::kApplication()->iconLoader(); KIconLoader* loader = TDEApplication::kApplication()->iconLoader();
p= loader->loadIcon(icon, KIcon::Small, 0, p= loader->loadIcon(icon, KIcon::Small, 0,
KIcon::DefaultState, 0, true); KIcon::DefaultState, 0, true);
} }

@ -178,7 +178,7 @@ void InstrItem::updateCost()
TQPixmap p; TQPixmap p;
TQString icon = "undo"; TQString icon = "undo";
KIconLoader* loader = KApplication::kApplication()->iconLoader(); KIconLoader* loader = TDEApplication::kApplication()->iconLoader();
p= loader->loadIcon(icon, KIcon::Small, 0, p= loader->loadIcon(icon, KIcon::Small, 0,
KIcon::DefaultState, 0, true); KIcon::DefaultState, 0, true);
if (p.isNull()) if (p.isNull())

@ -56,7 +56,7 @@ int main( int argc, char ** argv )
TDECmdLineArgs::init(argc, argv, &aboutData); TDECmdLineArgs::init(argc, argv, &aboutData);
TDECmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
KApplication a; TDEApplication a;
TopLevel* t; TopLevel* t;
Loader::initLoaders(); Loader::initLoaders();

@ -162,7 +162,7 @@ void SourceItem::updateCost()
TQPixmap p; TQPixmap p;
TQString icon = "undo"; TQString icon = "undo";
KIconLoader* loader = KApplication::kApplication()->iconLoader(); KIconLoader* loader = TDEApplication::kApplication()->iconLoader();
p= loader->loadIcon(icon, KIcon::Small, 0, p= loader->loadIcon(icon, KIcon::Small, 0,
KIcon::DefaultState, 0, true); KIcon::DefaultState, 0, true);
if (p.isNull()) if (p.isNull())

@ -99,7 +99,7 @@ int main(int argc, char *argv[]) {
TDECmdLineArgs::init( argc, argv, &aboutData ); TDECmdLineArgs::init( argc, argv, &aboutData );
TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options. TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options.
KApplication app; TDEApplication app;
if( app.isRestored() ) { if( app.isRestored() ) {
RESTORE( UMLApp ); RESTORE( UMLApp );
} else { } else {

@ -150,7 +150,7 @@ Plugin::configure()
loadPlugins(conf, "Load"); loadPlugins(conf, "Load");
// only load GUI plugins if this is not a terminal app // only load GUI plugins if this is not a terminal app
if(KApplication::kApplication()->type() != TQApplication::Tty) { if(TDEApplication::kApplication()->type() != TQApplication::Tty) {
loadPlugins(conf, "LoadGUI"); loadPlugins(conf, "LoadGUI");
} }
} }

@ -68,7 +68,7 @@ class TQCustomEvent;
* UMLApp reimplements the methods that KMainWindow provides for main window handling and supports * UMLApp reimplements the methods that KMainWindow provides for main window handling and supports
* full session management as well as using KActions. * full session management as well as using KActions.
* @see KMainWindow * @see KMainWindow
* @see KApplication * @see TDEApplication
* @see KConfig * @see KConfig
* *
* @author Paul Hensgen <phensgen@techie.com> * @author Paul Hensgen <phensgen@techie.com>
@ -399,7 +399,7 @@ protected:
* Saves the window properties for each open window * Saves the window properties for each open window
* during session end to the session config file, * during session end to the session config file,
* including saving the currently opened file by a * including saving the currently opened file by a
* temporary filename provided by KApplication. * temporary filename provided by TDEApplication.
* @see KMainWindow#saveProperties * @see KMainWindow#saveProperties
*/ */
virtual void saveProperties(KConfig *_cfg); virtual void saveProperties(KConfig *_cfg);

@ -64,7 +64,7 @@ class UMLFolder;
* The UMLDoc class provides a document object that can be used * The UMLDoc class provides a document object that can be used
* in conjunction with the classes UMLApp and UMLView to create * in conjunction with the classes UMLApp and UMLView to create
* a document-view model for standard TDE applications based on * a document-view model for standard TDE applications based on
* KApplication and KMainWindow. Thereby, the document object * TDEApplication and KMainWindow. Thereby, the document object
* is created by the UMLApp instance and contains the document * is created by the UMLApp instance and contains the document
* structure with the according methods for manipulation of the * structure with the according methods for manipulation of the
* document data by UMLView objects. Also, UMLDoc contains the * document data by UMLView objects. Also, UMLDoc contains the

Loading…
Cancel
Save