Rename KApplication to TDEApplication to avoid conflicts with KDE4

feat/lzip-support
Timothy Pearson 12 years ago
parent 31e5489c29
commit a77783a1a5

@ -1979,20 +1979,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");

@ -278,12 +278,12 @@ void UserActionPage::slotToClip() {
return;
TQDomDocument doc = actionTree->dumpSelectedActions();
KApplication::clipboard()->setText( doc.toString() );
TDEApplication::clipboard()->setText( doc.toString() );
}
void UserActionPage::slotFromClip() {
TQDomDocument doc( ACTION_DOCTYPE );
if ( doc.setContent( KApplication::clipboard()->text() ) ) {
if ( doc.setContent( TDEApplication::clipboard()->text() ) ) {
TQDomElement root = doc.documentElement();
UserAction::KrActionList newActions;
krUserAction->readFromElement( root, UserAction::renameDoublicated, &newActions );

@ -635,16 +635,16 @@ exp_Clipboard::exp_Clipboard() {
addParameter( exp_parameter( i18n("Append to current clipboard content with this separator (optional):"), "", false ) );
}
TagString exp_Clipboard::expFunc( const ListPanel*, const TagStringList& parameter, const bool&, Expander& exp ) const {
// kdDebug() << "Expander::exp_Clipboard, parameter[0]: '" << parameter[0] << "', Clipboard: " << KApplication::clipboard()->text() << endl;
// kdDebug() << "Expander::exp_Clipboard, parameter[0]: '" << parameter[0] << "', Clipboard: " << TDEApplication::clipboard()->text() << endl;
TQStringList lst=splitEach(parameter[0]);
if(!parameter[1].isSimple()) {
setError(exp,Error(Error::S_FATAL,Error::C_SYNTAX,i18n("Expander: %Each% may not be in the second argument of %Clipboard%")));
return TQString();
}
if ( parameter.count() <= 1 || parameter[1].string().isEmpty() || KApplication::clipboard()->text().isEmpty() )
KApplication::clipboard()->setText( lst.join("\n") );
if ( parameter.count() <= 1 || parameter[1].string().isEmpty() || TDEApplication::clipboard()->text().isEmpty() )
TDEApplication::clipboard()->setText( lst.join("\n") );
else
KApplication::clipboard()->setText( KApplication::clipboard()->text() + parameter[1].string() + lst.join("\n") );
TDEApplication::clipboard()->setText( TDEApplication::clipboard()->text() + parameter[1].string() + lst.join("\n") );
return TQString(); // this doesn't return anything, that's normal!
}

@ -923,7 +923,7 @@ bool Krusader::queryClose() {
{
saveSettings();
kapp->dcopClient()->registerAs( KApplication::kApplication()->name(), true );
kapp->dcopClient()->registerAs( TDEApplication::kApplication()->name(), true );
kapp->deref(); // FIX: krusader exits at closing the viewer when minimized to tray
kapp->deref(); // and close the application
@ -1002,7 +1002,7 @@ bool Krusader::queryClose() {
// Changes the name of the application. Single instance mode requires unique appid.
// As Krusader is exiting, we release that unique appid, so new Krusader instances
// can be started.
kapp->dcopClient()->registerAs( KApplication::kApplication()->name(), true );
kapp->dcopClient()->registerAs( TDEApplication::kApplication()->name(), true );
kapp->deref(); // FIX: krusader exits at closing the viewer when minimized to tray
kapp->deref(); // and close the application

@ -5,11 +5,11 @@
#include "X11/Xlib.h"
// declare a dummy kapplication, just to get the X focusin focusout events
class KrusaderApp: public KApplication {
class KrusaderApp: public TDEApplication {
Q_OBJECT
public:
KrusaderApp(): KApplication() {}
KrusaderApp(): TDEApplication() {}
bool x11EventFilter ( XEvent *e ) {
switch (e->type) {
case FocusIn:
@ -21,7 +21,7 @@ public:
}
//return false; // event should be processed normally
return KApplication::x11EventFilter(e);
return TDEApplication::x11EventFilter(e);
}
signals:
void windowActive();

@ -65,7 +65,7 @@ static void sigterm_handler(int i)
fprintf(stderr,"Signal: %d\n",i);
TQApplication::eventLoop()->wakeUp();
KApplication::exit( - 15 );
TDEApplication::exit( - 15 );
}
int main(int argc, char *argv[]) {
@ -194,14 +194,14 @@ int main(int argc, char *argv[]) {
bool singleInstanceMode = app.config()->readBoolEntry( "Single Instance Mode", _SingleInstanceMode );
// register with the dcop server
DCOPClient* client = KApplication::kApplication() ->dcopClient();
DCOPClient* client = TDEApplication::kApplication() ->dcopClient();
if ( !client->attach() )
exit( 0 );
TQCString regName = client->registerAs( KApplication::kApplication() ->name(), !singleInstanceMode );
if( singleInstanceMode && regName != KApplication::kApplication()->name() ) {
TQCString regName = client->registerAs( TDEApplication::kApplication() ->name(), !singleInstanceMode );
if( singleInstanceMode && regName != TDEApplication::kApplication()->name() ) {
fprintf( stderr, "%s", i18n( "Application already running!\n" ).ascii() );
DCOPClient::mainClient()->send( KApplication::kApplication() ->name(), "Krusader-Interface",
DCOPClient::mainClient()->send( TDEApplication::kApplication() ->name(), "Krusader-Interface",
"moveToTop()", TQByteArray() );
KStartupInfo::appStarted();

Loading…
Cancel
Save