Rename KApplication to TDEApplication to avoid conflicts with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent c705f8f061
commit 74f47aebb7

@ -51,7 +51,7 @@ int main(int argc, char *argv[])
TDECmdLineArgs::init( argc, argv, &aboutData );
TDECmdLineArgs::addCmdLineOptions( options );
KApplication app;
TDEApplication app;
KColorDialog dlg;

@ -44,7 +44,7 @@ class KColorEditView;
* KColorEditApp reimplements the methods that KMainWindow provides for main window handling and supports
* full session management as well as keyboard accelerator configuration by using KAccel.
* @see KMainWindow
* @see KApplication
* @see TDEApplication
* @see KConfig
* @see KAccel
*
@ -85,7 +85,7 @@ class KColorEditApp : public KMainWindow
void initActions();
/** initMenuBar creates the menubar and inserts the menupopups as well as creating the helpMenu.
* @see KApplication#getHelpMenu
* @see TDEApplication#getHelpMenu
*/
void initStatusBar();
/** initializes the document object of the main window that is connected to the view in initView().

@ -235,7 +235,7 @@ void KColorEditDoc::copyToClipboard(Palette& palette) {
TQString text;
TQTextOStream stream(&text);
palette.save(stream, 0, false);
KApplication::clipboard()->setText(text);
TDEApplication::clipboard()->setText(text);
emit clipboardChanged();
}
@ -260,7 +260,7 @@ void KColorEditDoc::paste() {
Palette palettePaste;
TQString text;
TQTextIStream stream(&text);
text = KApplication::clipboard()->text();
text = TDEApplication::clipboard()->text();
if(palettePaste.load( stream, false )) {
m_paletteHistory.paste(paletteCursorPos(), palettePaste);
setPaletteSelection(paletteCursorPos(), paletteCursorPos() +

@ -37,7 +37,7 @@ class KColorEditView;
/** KColorEditDoc provides a document object for a document-view model.
*
* The KColorEditDoc class provides a document object that can be used in conjunction with the classes KColorEditApp and KColorEditView
* to create a document-view model for standard TDE applications based on KApplication and KMainWindow. Thereby, the document object
* to create a document-view model for standard TDE applications based on TDEApplication and KMainWindow. Thereby, the document object
* is created by the KColorEditApp instance and contains the document structure with the according methods for manipulation of the document
* data by KColorEditView objects. Also, KColorEditDoc contains the methods for serialization of the document data from and to files.
*

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

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

@ -160,7 +160,7 @@ bool buttondown;
bool MyApp::x11EventFilter( XEvent * ev)
{
if (KApplication::x11EventFilter(ev))
if (TDEApplication::x11EventFilter(ev))
return TRUE;
if (ev->type == ButtonRelease){

@ -46,7 +46,7 @@ class TQScrollBar;
typedef KToolBar::BarPosition BarPosition;
class MyApp:public KApplication {
class MyApp:public TDEApplication {
public:
virtual bool x11EventFilter( XEvent * );
};

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

@ -47,7 +47,7 @@ int main( int argc, char** argv )
{
TDECmdLineArgs::init( argc, argv, KGVPart::createAboutData() );
TDECmdLineArgs::addCmdLineOptions( options );
KApplication app;
TDEApplication app;
TDECmdLineArgs* args = TDECmdLineArgs::parsedArgs();
if( kapp->isRestored() )

@ -57,7 +57,7 @@ int main(int argc, char **argv)
TDECmdLineArgs::init( argc, argv, &aboutData );
TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options.
KApplication a;
TDEApplication a;
// setSignalHandler(signalHandler);

@ -36,7 +36,7 @@ void IndexTest::slotProgress( int percent, const TQString& message )
int main( int argc, char **argv )
{
KApplication app( argc, argv, "indextest" );
TDEApplication app( argc, argv, "indextest" );
IndexTest *test = new IndexTest();
return app.exec();

@ -94,7 +94,7 @@ bool Config::sync()
return notifySlaves;
// This moved to kcontrol/MainPage::save() so we don't have to link against
// KIO and need a full KApplication instance to work (so that the tiny
// KIO and need a full TDEApplication instance to work (so that the tiny
// mrmlsearch binary can also use this class)
// tell the ioslaves about the new configuration
// if ( notifySlaves )

@ -284,7 +284,7 @@ bool MrmlPart::openURL( const KURL& url )
"kmrml_ask_configure_gift" )
== KMessageBox::Yes )
{
KApplication::tdeinitExec( "kcmshell",
TDEApplication::tdeinitExec( "kcmshell",
TQString::fromLatin1("kcmkmrml"));
setStatus( NeedCollection );
return false;

@ -34,15 +34,15 @@ Watcher::Watcher( const TQCString& name )
m_daemons.setAutoDelete( true );
// safety, for clients that die without unregistering
KApplication::dcopClient()->setNotifications( true );
connect( KApplication::dcopClient(),
TDEApplication::dcopClient()->setNotifications( true );
connect( TDEApplication::dcopClient(),
TQT_SIGNAL( applicationRemoved( const TQCString& )),
TQT_SLOT( slotAppUnregistered( const TQCString& )));
}
Watcher::~Watcher()
{
KApplication::dcopClient()->setNotifications( false );
TDEApplication::dcopClient()->setNotifications( false );
}
bool Watcher::requireDaemon( const TQCString& clientAppId,
@ -51,7 +51,7 @@ bool Watcher::requireDaemon( const TQCString& clientAppId,
uint timeout /* seconds */,
int restartOnFailure )
{
if ( !KApplication::dcopClient()->isApplicationRegistered( clientAppId ) )
if ( !TDEApplication::dcopClient()->isApplicationRegistered( clientAppId ) )
kdWarning() << "Watcher::requireDaemon: " << daemonKey
<< ": Client AppID is not registered with DCOP: "
<< clientAppId << endl;

@ -176,7 +176,7 @@ int main (int argc, char *argv [])
TDECmdLineArgs::init (argc, argv, &aboutData);
TDECmdLineArgs::addCmdLineOptions (cmdLineOptions);
KApplication app;
TDEApplication app;
// mainly for changing wallpaper :)

@ -1352,7 +1352,7 @@ void kpMainWindow::setAsWallpaper (bool centered)
// I'm going to all this trouble because the user might not have tdebase
// installed so tdebase/kdesktop/KBackgroundIface.h might not be around
// to be compiled in (where user == developer :))
if (!KApplication::dcopClient ()->send ("kdesktop", "KBackgroundIface",
if (!TDEApplication::dcopClient ()->send ("kdesktop", "KBackgroundIface",
"setWallpaper(TQString,int)", data))
{
KMessageBox::sorry (this, i18n ("Could not change wallpaper."));

@ -110,7 +110,7 @@ void kpMainWindow::slotHelpTakingScreenshots ()
// TODO: Totally bogus logic if twin not running under same user as KolourPaint.
// SYNC: KWin contains PrintScreen key logic
QCStringList dcopApps = KApplication::dcopClient ()->registeredApplications ();
QCStringList dcopApps = TDEApplication::dcopClient ()->registeredApplications ();
#if DEBUG_KP_MAIN_WINDOW
kdDebug () << "\tdcopApps=" << dcopApps << endl;
#endif

@ -499,12 +499,12 @@ void kpTool::beginInternal ()
m_beganDraw = false;
uint keyState = KApplication::keyboardModifiers ();
uint keyState = TDEApplication::keyboardModifiers ();
m_shiftPressed = (keyState & KApplication::ShiftModifier);
m_controlPressed = (keyState & KApplication::ControlModifier);
m_shiftPressed = (keyState & TDEApplication::ShiftModifier);
m_controlPressed = (keyState & TDEApplication::ControlModifier);
// TODO: Can't do much about ALT - unless it's always KApplication::Modifier1?
// TODO: Can't do much about ALT - unless it's always TDEApplication::Modifier1?
// Ditto for everywhere else where I set SHIFT & CTRL but not alt.
m_altPressed = false;
}
@ -1372,12 +1372,12 @@ void kpTool::keyUpdateModifierState (TQKeyEvent *e)
#if DEBUG_KP_TOOL && 0
kdDebug () << "\t\tmodifiers not changed - figure out the truth" << endl;
#endif
uint keyState = KApplication::keyboardModifiers ();
uint keyState = TDEApplication::keyboardModifiers ();
setShiftPressed (keyState & KApplication::ShiftModifier);
setControlPressed (keyState & KApplication::ControlModifier);
setShiftPressed (keyState & TDEApplication::ShiftModifier);
setControlPressed (keyState & TDEApplication::ControlModifier);
// TODO: Can't do much about ALT - unless it's always KApplication::Modifier1?
// TODO: Can't do much about ALT - unless it's always TDEApplication::Modifier1?
// Ditto for everywhere else where I set SHIFT & CTRL but not alt.
setAltPressed (e->stateAfter () & TQt::AltButton);
}

@ -84,7 +84,7 @@ int main( int argc, char *argv[] )
TDECmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::addCmdLineOptions( options ); // Add my own options.
KApplication app;
TDEApplication app;
KGlobal::locale()->insertCatalogue("libkscan");
KImageIO::registerFormats();
KIconLoader *loader = KGlobal::iconLoader();

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

@ -1192,7 +1192,7 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e )
if (!client->isApplicationRegistered("kttsd"))
{
TQString error;
if (KApplication::startServiceByDesktopName("kttsd", TQStringList(), &error))
if (TDEApplication::startServiceByDesktopName("kttsd", TQStringList(), &error))
{
d->messageWindow->display( i18n("Starting KTTSD Failed: %1").arg(error) );
KpdfSettings::setUseKTTSD(false);

@ -890,7 +890,7 @@ const KPDFPageTransition PresentationWidget::defaultTransition( int type ) const
}
case KpdfSettings::EnumSlidesTransition::Random:
{
return defaultTransition( KApplication::random() % 18 );
return defaultTransition( TDEApplication::random() % 18 );
break;
}
case KpdfSettings::EnumSlidesTransition::SplitHorizontalIn:

@ -42,7 +42,7 @@ int main( int argc, char* argv[] )
TDECmdLineArgs::init( argc, argv, PMFactory::aboutData( ) );
TDECmdLineArgs::addCmdLineOptions( options );
KApplication app;
TDEApplication app;
TDECmdLineArgs* args = TDECmdLineArgs::parsedArgs( );

@ -49,7 +49,7 @@ int main(int argc, char *argv[])
TDECmdLineArgs::init( argc, argv, &aboutData );
TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options.
KApplication a;
TDEApplication a;
if (a.isRestored()) {
RESTORE_RULERS(KLineal)

@ -56,7 +56,7 @@
#include <kglobal.h>
#define kApp KApplication::kApplication()
#define kApp TDEApplication::kApplication()
KSnapshot::KSnapshot(TQWidget *parent, const char *name, bool grabCurrent)
: DCOPObject("interface"),

@ -55,7 +55,7 @@ int main(int argc, char **argv)
TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options.
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
KApplication app;
TDEApplication app;
KImageIO::registerFormats();

@ -56,7 +56,7 @@ int main(int argc, char **argv)
return -1;
}
KApplication a(argc, argv);
TDEApplication a(argc, argv);
(void) new Worker(args->url(0));
return a.exec();
}

@ -23,7 +23,7 @@ int main(int argc, char **argv)
return 0;
}
KURL url = args->url(0);
KApplication a( argc, argv );
TDEApplication a( argc, argv );
SVGTestWidget *w = new SVGTestWidget(url);
a.setMainWidget(w);
w->show();

@ -52,7 +52,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
TDECmdLineArgs::init( argc, argv, &about );
TDECmdLineArgs::addCmdLineOptions( options );
KApplication app;
TDEApplication app;
if ( app.isRestored() ) {
(new KuickShow())->restore( 1, false ); // don't show automatically

@ -21,7 +21,7 @@ int main(int argc, char **argv)
about.addAuthor( "Matthias Kretz", 0, "kretz@kde.org" );
TDECmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::addCmdLineOptions( options );
KApplication app;
TDEApplication app;
if (app.isRestored())
RESTORE(KImageViewerTest)

@ -861,7 +861,7 @@ void KViewViewer::switchBlendEffect()
m_pCanvas->setBlendEffect( 0 );
else
{
unsigned int num = KApplication::random() % m_vEffects.size();
unsigned int num = TDEApplication::random() % m_vEffects.size();
m_pCanvas->setBlendEffect( m_vEffects[ num ] );
}
}

@ -21,7 +21,7 @@ int main(int argc, char **argv)
about.addAuthor( "Matthias Kretz", 0, "kretz@kde.org" );
TDECmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::addCmdLineOptions( options );
KApplication app;
TDEApplication app;
if (app.isRestored())
RESTORE(Test)

@ -42,7 +42,7 @@ extern "C" KDE_EXPORT int kdemain( int argc, char ** argv )
about.addAuthor( "Simon Hausmann", 0, "hausmann@kde.org" );
TDECmdLineArgs::init( argc, argv, &about );
TDECmdLineArgs::addCmdLineOptions( options );
KApplication app;
TDEApplication app;
if( app.isRestored() )
RESTORE( KView )

@ -391,7 +391,7 @@ void KViewPresenter::shuffle()
listview->takeItem( item );
}
while( ! items.isEmpty() )
listview->insertItem( items.take( KApplication::random() % items.count() ) );
listview->insertItem( items.take( TDEApplication::random() % items.count() ) );
}
void KViewPresenter::closeAll()

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

Loading…
Cancel
Save