From 5f67539d4b2eb2f1aaeb6f28f5f9cdc1847e2a58 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sat, 9 Nov 2024 22:08:03 +0900 Subject: [PATCH] Rename KUniqueApplication to TDEUniqueApplication Signed-off-by: Michele Calgaro --- kontact_plugin/uniqueapphandler.cpp | 4 ++-- src/application.cpp | 4 ++-- src/application.h | 4 ++-- src/main.cpp | 21 +-------------------- 4 files changed, 7 insertions(+), 26 deletions(-) diff --git a/kontact_plugin/uniqueapphandler.cpp b/kontact_plugin/uniqueapphandler.cpp index c72d8ef..ab1774e 100644 --- a/kontact_plugin/uniqueapphandler.cpp +++ b/kontact_plugin/uniqueapphandler.cpp @@ -70,7 +70,7 @@ using namespace Kontact; int UniqueAppHandler::newInstance() { - // This bit is duplicated from KUniqueApplication::newInstance() + // This bit is duplicated from TDEUniqueApplication::newInstance() if ( kapp->mainWidget() ) { kapp->mainWidget()->show(); KWin::forceActiveWindow( kapp->mainWidget()->winId() ); @@ -91,7 +91,7 @@ bool UniqueAppHandler::process( const TQCString &fun, const TQByteArray &data, TDECmdLineArgs::reset(); // forget options defined by other "applications" loadCommandLineOptions(); - // This bit is duplicated from KUniqueApplication::processDelayed() + // This bit is duplicated from TDEUniqueApplication::processDelayed() TQDataStream ds( data, IO_ReadOnly ); TDECmdLineArgs::loadAppArgs( ds ); if ( !ds.atEnd() ) { // backwards compatibility diff --git a/src/application.cpp b/src/application.cpp index 6393bd1..8b4aba8 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -33,7 +33,7 @@ #include "bnpview.h" Application::Application() - : KUniqueApplication() + : TDEUniqueApplication() { } @@ -43,7 +43,7 @@ Application::~Application() int Application::newInstance() { - KUniqueApplication::newInstance(); + TDEUniqueApplication::newInstance(); // Open the basket archive or template file supplied as argument: TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); diff --git a/src/application.h b/src/application.h index e6b9470..e072a68 100644 --- a/src/application.h +++ b/src/application.h @@ -21,13 +21,13 @@ #ifndef APPLICATION_H #define APPLICATION_H -#include +#include #include /** * @author Sébastien Laoût */ -class Application : public KUniqueApplication +class Application : public TDEUniqueApplication { public: Application(); diff --git a/src/main.cpp b/src/main.cpp index 336eb53..59d3141 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -50,24 +50,6 @@ #include "basket_options.h" #include "backup.h" -/* Thanks to JuK for this Application class */ -/*#if KDE_IS_VERSION( 3, 1, 90 ) -typedef KUniqueApplication Application; // KDE 3.2 and later already re-show the main window -#else -class Application : public KUniqueApplication -{ - public: - Application() : KUniqueApplication(true, true, false) {} - virtual ~Application() {} - virtual int newInstance() { - if (win) - win->setActive(true); - return KUniqueApplication::newInstance(); - } -}; -#endif -*/ - int main(int argc, char *argv[]) { // TDECmdLineArgs::init will modify argv[0] so we remember it: @@ -76,8 +58,7 @@ int main(int argc, char *argv[]) TDECmdLineArgs::init(argc, argv, Global::about()); TDECmdLineArgs::addCmdLineOptions(basket_options); - KUniqueApplication::addCmdLineOptions(); - //KUniqueApplication app; + TDEUniqueApplication::addCmdLineOptions(); Application app; Backup::figureOutBinaryPath(argv0, app);