Rename KUniqueApplication to TDEUniqueApplication and remove obsolete kapp.h and kuniqueapp.h headers

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
master
Michele Calgaro 2 weeks ago
parent 87ad1e6c4d
commit 1711870a07
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -74,7 +74,7 @@ instead, everything else is source compatible.
<H4>Header file names</H4>
<UL>
<LI>kapp.h is now tdeapplication.h</LI>
<LI>kuniqueapp.h is now kuniqueapplication.h</LI>
<LI>kuniqueapp.h is now tdeuniqueapplication.h</LI>
<LI>kstddirs.h is now kstandarddirs.h</LI>
<LI>kcolorbtn.h is now kcolorbutton.h</LI>
<LI>kxmlgui.h is now kxmlguifactory.h</LI>

@ -17,7 +17,7 @@
*/
#include <kdebug.h>
#include <kuniqueapplication.h>
#include <tdeuniqueapplication.h>
#include <tdeaboutdata.h>
#include <tdecmdlineargs.h>
#include <tdelocale.h>
@ -54,15 +54,15 @@ int main(int argc, char **argv)
aboutdata.addAuthor("Nikolas Zimmermann", I18N_NOOP("Author"), "wildfox@kde.org");
TDECmdLineArgs::init(argc, argv, &aboutdata);
KUniqueApplication::addCmdLineOptions();
TDEUniqueApplication::addCmdLineOptions();
if(!KUniqueApplication::start())
if(!TDEUniqueApplication::start())
{
kdDebug() << "Running kmcop found" << endl;
return 0;
}
KUniqueApplication app;
TDEUniqueApplication app;
app.disableSessionManagement();
KArtsDispatcher dispatcher;

@ -64,7 +64,7 @@
#endif
#include <kprocess.h>
#include <kstandarddirs.h>
#include <kuniqueapplication.h>
#include <tdeuniqueapplication.h>
#include <twin.h>
#include "knotify.h"
@ -112,15 +112,15 @@ extern "C"{
aboutdata.addAuthor("Charles Samuels",I18N_NOOP("Previous Maintainer"),"charles@kde.org");
TDECmdLineArgs::init( argc, argv, &aboutdata );
KUniqueApplication::addCmdLineOptions();
TDEUniqueApplication::addCmdLineOptions();
// initialize application
if ( !KUniqueApplication::start() ) {
if ( !TDEUniqueApplication::start() ) {
kdDebug() << "Running knotify found" << endl;
return 0;
}
KUniqueApplication app;
TDEUniqueApplication app;
app.disableSessionManagement();
// KNotify is started on KDE startup and on demand (using

@ -108,8 +108,8 @@ If you wish to attach again you will need to re-register as well. If
you only wish to change the ID under which you are registered, simply
call DCOPClient::registerAs() with the new name.
KUniqueApplication automatically registers itself to DCOP. If you
are using KUniqueApplication you should not attach or register
TDEUniqueApplication automatically registers itself to DCOP. If you
are using TDEUniqueApplication you should not attach or register
yourself, this is already done. The appId is by definition
equal to kapp->name(). You can retrieve the registered DCOP client
by calling kapp->dcopClient().

@ -70,8 +70,8 @@ If you wish to attach again you will need to re-register as well. If
you only wish to change the ID under which you are registered, simply
call DCOPClient::registerAs() with the new name.
KUniqueApplication automatically registers itself to DCOP. If you
are using KUniqueApplication you should not attach or register
TDEUniqueApplication automatically registers itself to DCOP. If you
are using TDEUniqueApplication you should not attach or register
yourself, this is already done. The appId is by definition
equal to \p kapp->name(). You can retrieve the registered DCOP client
by calling \p kapp->dcopClient().

@ -111,7 +111,7 @@ class DCOP_EXPORT DCOPClient : public TQObject
/**
* @internal
* Internal function for KUniqueApplication to register the DCOPClient
* Internal function for TDEUniqueApplication to register the DCOPClient
* with the application in case the application didn't exist at the
* time the DCOPClient was created.
*/

@ -35,7 +35,7 @@
#include <dcopclient.h>
#include <kuniqueapplication.h>
#include <tdeuniqueapplication.h>
#include <tdecmdlineargs.h>
#include <tdeaboutdata.h>
#include <tdelocale.h>
@ -768,10 +768,10 @@ public:
}
};
class KDEDApplication : public KUniqueApplication
class KDEDApplication : public TDEUniqueApplication
{
public:
KDEDApplication() : KUniqueApplication( )
KDEDApplication() : TDEUniqueApplication( )
{
startup = true;
dcopClient()->connectDCOPSignal( "DCOPServer", "", "terminateTDE()",
@ -794,7 +794,7 @@ public:
QCStringList functions()
{
QCStringList res = KUniqueApplication::functions();
QCStringList res = TDEUniqueApplication::functions();
res += "bool loadModule(TQCString)";
res += "bool unloadModule(TQCString)";
res += "void registerWindowId(long int)";
@ -869,7 +869,7 @@ public:
replyType = "void";
return true;
}
return KUniqueApplication::process(fun, data, replyType, replyData);
return TDEUniqueApplication::process(fun, data, replyType, replyData);
}
bool startup;
@ -886,7 +886,7 @@ extern "C" TDE_EXPORT int kdemain(int argc, char *argv[])
TDECmdLineArgs::init(argc, argv, &aboutData);
KUniqueApplication::addCmdLineOptions();
TDEUniqueApplication::addCmdLineOptions();
TDECmdLineArgs::addCmdLineOptions( options );
@ -922,13 +922,13 @@ extern "C" TDE_EXPORT int kdemain(int argc, char *argv[])
exit(0);
}
if (!KUniqueApplication::start())
if (!TDEUniqueApplication::start())
{
fprintf(stderr, "[kded] Daemon (kded) is already running.\n");
exit(0);
}
KUniqueApplication::dcopClient()->setQtBridgeEnabled(false);
TDEUniqueApplication::dcopClient()->setQtBridgeEnabled(false);
config->setGroup("General");
int HostnamePollInterval = config->readNumEntry("HostnamePollInterval", 5000);

@ -52,7 +52,7 @@ install( FILES
tdeconfig.h tdeconfigskeleton.h tdeconfigdata.h ksimpleconfig.h
tdeconfigdialogmanager.h tdeconfigbase.h kdesktopfile.h
kurl.h ksock.h tdeaboutdata.h tdecmdlineargs.h tdeconfigbackend.h
kapp.h tdeapplication.h kuniqueapp.h kuniqueapplication.h
tdeapplication.h tdeuniqueapplication.h
kcharsets.h tdeversion.h kpty.h kprocess.h kprocctrl.h
tdelocale.h kicontheme.h kiconloader.h kdebug.h twinmodule.h
twin.h krootprop.h tdeshortcut.h kkeynative.h tdeaccel.h
@ -117,7 +117,7 @@ set( ${target}_SRCS
kcrash.cpp kurl.cpp kregexp.cpp tdeglobal.cpp tdeglobalsettings.cpp
kallocator.cpp kvmallocator.cpp kmimesourcefactory.cpp
kinstance.cpp kpalette.cpp kipc.cpp klibloader.cpp tdetempfile.cpp
kuniqueapplication.cpp tdeaccelmanager.cpp ksavefile.cpp
tdeuniqueapplication.cpp tdeaccelmanager.cpp ksavefile.cpp
krandomsequence.cpp kstringhandler.cpp kcompletion.cpp
tdecmdlineargs.cpp tdeaboutdata.cpp kcompletionbase.cpp knotifyclient.cpp
kaudioplayer.cpp kdcoppropertyproxy.cpp ksockaddr.cpp

@ -68,7 +68,7 @@ tdesycoca.cpp Waldo Bastian <bastian@kde.org>
tdesycocadict.cpp Waldo Bastian <bastian@kde.org>
tdesycocafactory.cpp Waldo Bastian <bastian@kde.org>
tdetempfile.cpp Waldo Bastian <bastian@kde.org>
kuniqueapplication.cpp Waldo Bastian <bastian@kde.org>
tdeuniqueapplication.cpp Waldo Bastian <bastian@kde.org>
kurl.cpp Waldo Bastian <bastian@kde.org>
kurldrag.cpp David Faure <faure@kde.org>
twin.cpp Lubos Lunak <l.lunak@kde.org>

@ -39,8 +39,8 @@ lib_LIBRARIES = libtdefakes_nonpic.a libtdefakes_pic.a
include_HEADERS = tdeconfig.h tdeconfigskeleton.h \
tdeconfigdata.h ksimpleconfig.h tdeconfigdialogmanager.h \
tdeconfigbase.h kdesktopfile.h kurl.h ksock.h tdeaboutdata.h \
tdecmdlineargs.h tdeconfigbackend.h kapp.h tdeapplication.h kuniqueapp.h \
kuniqueapplication.h kcharsets.h tdeversion.h kpty.h kprocess.h \
tdecmdlineargs.h tdeconfigbackend.h tdeapplication.h \
tdeuniqueapplication.h kcharsets.h tdeversion.h kpty.h kprocess.h \
kprocctrl.h tdelocale.h kicontheme.h kiconloader.h kdebug.h \
twinmodule.h twin.h krootprop.h tdeshortcut.h kkeynative.h tdeaccel.h \
kglobalaccel.h tdestdaccel.h tdeshortcutlist.h kcatalogue.h \
@ -101,7 +101,7 @@ libtdecore_la_SOURCES = libintl.cpp tdeapplication.cpp \
kcrash.cpp kurl.cpp kregexp.cpp tdeglobal.cpp tdeglobalsettings.cpp \
kallocator.cpp kvmallocator.cpp kmimesourcefactory.cpp \
kinstance.cpp kpalette.cpp kipc.cpp klibloader.cpp tdetempfile.cpp \
kuniqueapplication.cpp tdeaccelmanager.cpp \
tdeuniqueapplication.cpp tdeaccelmanager.cpp \
ksavefile.cpp krandomsequence.cpp kstringhandler.cpp kcompletion.cpp \
tdecmdlineargs.cpp tdeaboutdata.cpp kcompletionbase.cpp knotifyclient.cpp \
kaudioplayer.cpp kdcoppropertyproxy.cpp \

@ -119,7 +119,7 @@ Sending the application startup notification information :
it's done by classes like KRun ). See e.g. KRun sources for details.
During the starting of the application, the info may need some updating
( e.g. right after starting the app, the PID with hostname may be sent,
or a PID change when KUniqueApplication forks into background ).
or a PID change when TDEUniqueApplication forks into background ).
When it's detected that the started process exited, it an ASN info
about the finished process should be sent. Since the application may
have forked into background, the finish info should include the PID
@ -143,7 +143,7 @@ Ideally, the application should read it, and set a window property
called _TDE_STARTUP_ID ( type XA_STRING ) at least on its first mapped
toplevel window to this value. It should also unset it, so it doesn't get
propagated to other applications started from it. It should also
update the ASN info when necessary, e.g. when KUniqueApplication
update the ASN info when necessary, e.g. when TDEUniqueApplication
forks into background, it sends the PID change. That's how compliant
applications should work, and this support for ASN should be provided
by toolkits. All TDE application should be compliant by now, since
@ -192,7 +192,7 @@ There are 3 types of messages :
- change: message
- this message is like new: message, but it's only for updating existing
ASN info, if there's no ASN info for the given identification, it won't
be created. This is used e.g. in KUniqueApplication when it forks
be created. This is used e.g. in TDEUniqueApplication when it forks
into background and sends info about the PID change - it should update
any existing ASN info, but mustn't create a new one, otherwise there
could appear ASN even for applications which shouldn't have ASN

@ -1,6 +0,0 @@
// kapp.h is the old name. Use #include <tdeapplication.h> from now on
#ifdef KDE_NO_COMPAT
#error include <tdeapplication.h> instead of <kapp.h>
#else
#include <tdeapplication.h>
#endif

@ -1,6 +0,0 @@
// kuniqueapp.h is the old name. Use #include <kuniqueapplication.h> from now on
#ifdef KDE_NO_COMPAT
#error kuniqueapp.h is the old name. Use #include <kuniqueapplication.h> from now on
#else
#include <kuniqueapplication.h>
#endif

@ -1256,13 +1256,13 @@ public slots:
protected:
/**
* @internal Used by KUniqueApplication
* @internal Used by TDEUniqueApplication
*/
TDEApplication( bool allowStyles, bool GUIenabled, TDEInstance* _instance );
#ifdef TQ_WS_X11
/**
* @internal Used by KUniqueApplication
* @internal Used by TDEUniqueApplication
*/
TDEApplication( Display *display, TQt::HANDLE visual, TQt::HANDLE colormap,
bool allowStyles, TDEInstance* _instance );

@ -69,7 +69,7 @@ struct TDECORE_EXPORT TDECmdLineOptions
class TDECmdLineArgsList;
class TDEApplication;
class KUniqueApplication;
class TDEUniqueApplication;
class TDECmdLineParsedOptions;
class TDECmdLineParsedArgs;
class TDEAboutData;
@ -97,19 +97,19 @@ class TDECmdLineArgsPrivate;
* TDECmdLineArgs::addCmdLineOptions( options );
*
* // Add options from other components
* KUniqueApplication::addCmdLineOptions();
* TDEUniqueApplication::addCmdLineOptions();
*
* ....
*
* // Create application object without passing 'argc' and 'argv' again.
* KUniqueApplication app;
* TDEUniqueApplication app;
*
* ....
*
* // Handle our own options/arguments
* // A TDEApplication will usually do this in main but this is not
* // necessary.
* // A KUniqueApplication might want to handle it in newInstance().
* // A TDEUniqueApplication might want to handle it in newInstance().
*
* TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
*
@ -222,7 +222,7 @@ class TDECmdLineArgsPrivate;
class TDECORE_EXPORT TDECmdLineArgs
{
friend class TDEApplication;
friend class KUniqueApplication;
friend class TDEUniqueApplication;
friend class TQPtrList<TDECmdLineArgs>;
public:
// Static functions:
@ -373,7 +373,7 @@ public:
* Get the CWD (Current Working Directory) associated with the
* current command line arguments.
*
* Typically this is needed in KUniqueApplication::newInstance()
* Typically this is needed in TDEUniqueApplication::newInstance()
* since the CWD of the process may be different from the CWD
* where the user started a second instance.
* @return the current working directory
@ -606,7 +606,7 @@ private:
static void removeArgs(const char *id);
/**
* @internal for KUniqueApplication only:
* @internal for TDEUniqueApplication only:
*
* Save all but the Qt and KDE arguments to a stream.
*/

@ -94,7 +94,7 @@ class TDECORE_EXPORT TDEStartupInfo
/**
* Use this function if the application got a request with startup
* notification from outside (for example, when KUniqueApplication::newInstance()
* notification from outside (for example, when TDEUniqueApplication::newInstance()
* is called, or e.g. when khelpcenter opens new URL in its window).
* The window can be either an already existing and visible window,
* or a new one, before being shown. Note that this function is usually

@ -45,7 +45,7 @@
#include <tdeconfig.h>
#include "kdebug.h"
#include "kuniqueapplication.h"
#include "tdeuniqueapplication.h"
#if defined TQ_WS_X11
#include <netwm.h>
@ -59,12 +59,12 @@
# endif
#endif
bool KUniqueApplication::s_nofork = false;
bool KUniqueApplication::s_multipleInstances = false;
bool KUniqueApplication::s_uniqueTestDone = false;
bool KUniqueApplication::s_handleAutoStarted = false;
bool TDEUniqueApplication::s_nofork = false;
bool TDEUniqueApplication::s_multipleInstances = false;
bool TDEUniqueApplication::s_uniqueTestDone = false;
bool TDEUniqueApplication::s_handleAutoStarted = false;
static TDECmdLineOptions kunique_options[] =
static TDECmdLineOptions tdeunique_options[] =
{
{ "nofork", "Don't run in the background.", 0 },
TDECmdLineLastOption
@ -76,7 +76,7 @@ struct DCOPRequest {
DCOPClientTransaction *transaction;
};
class KUniqueApplicationPrivate {
class TDEUniqueApplicationPrivate {
public:
TQPtrList <DCOPRequest> requestList;
bool processingRequest;
@ -84,13 +84,13 @@ public:
};
void
KUniqueApplication::addCmdLineOptions()
TDEUniqueApplication::addCmdLineOptions()
{
TDECmdLineArgs::addCmdLineOptions(kunique_options, 0, "kuniqueapp", "tde" );
TDECmdLineArgs::addCmdLineOptions(tdeunique_options, 0, "tdeuniqueapp", "tde" );
}
bool
KUniqueApplication::start()
TDEUniqueApplication::start()
{
if( s_uniqueTestDone )
return true;
@ -99,7 +99,7 @@ KUniqueApplication::start()
#ifdef TQ_WS_WIN
s_nofork = true;
#else
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs("kuniqueapp");
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs("tdeuniqueapp");
s_nofork = !args->isSet("fork");
delete args;
#endif
@ -122,7 +122,7 @@ KUniqueApplication::start()
if(dcopClient()->registerAs(appName, false).isEmpty()) {
startKdeinit();
if(dcopClient()->registerAs(appName, false).isEmpty()) {
kdError() << "KUniqueApplication: Can't setup DCOP communication." << endl;
kdError() << "TDEUniqueApplication: Can't setup DCOP communication." << endl;
::exit(255);
}
}
@ -136,13 +136,13 @@ KUniqueApplication::start()
signed char result;
if (0 > pipe(fd))
{
kdError() << "KUniqueApplication: pipe() failed!" << endl;
kdError() << "TDEUniqueApplication: pipe() failed!" << endl;
::exit(255);
}
int fork_result = fork();
switch(fork_result) {
case -1:
kdError() << "KUniqueApplication: fork() failed!" << endl;
kdError() << "TDEUniqueApplication: fork() failed!" << endl;
::exit(255);
break;
case 0:
@ -158,7 +158,7 @@ KUniqueApplication::start()
// Check DISPLAY
if (TQCString(getenv(DISPLAY)).isEmpty())
{
kdError() << "KUniqueApplication: Can't determine DISPLAY. Aborting." << endl;
kdError() << "TDEUniqueApplication: Can't determine DISPLAY. Aborting." << endl;
result = -1; // Error
::write(fd[1], &result, 1);
::exit(255);
@ -169,7 +169,7 @@ KUniqueApplication::start()
regName = dc->registerAs(appName, false);
if (regName.isEmpty())
{
kdError() << "KUniqueApplication: Can't setup DCOP communication." << endl;
kdError() << "TDEUniqueApplication: Can't setup DCOP communication." << endl;
result = -1;
delete dc; // Clean up DCOP commmunication
::write(fd[1], &result, 1);
@ -246,12 +246,12 @@ KUniqueApplication::start()
if (n == 1) break;
if (n == 0)
{
kdError() << "KUniqueApplication: Pipe closed unexpectedly." << endl;
kdError() << "TDEUniqueApplication: Pipe closed unexpectedly." << endl;
::exit(255);
}
if (errno != EINTR)
{
kdError() << "KUniqueApplication: Error reading from pipe." << endl;
kdError() << "TDEUniqueApplication: Error reading from pipe." << endl;
::exit(255);
}
}
@ -263,12 +263,12 @@ KUniqueApplication::start()
dc = new DCOPClient();
if (!dc->attach())
{
kdError() << "KUniqueApplication: Parent process can't attach to DCOP." << endl;
kdError() << "TDEUniqueApplication: Parent process can't attach to DCOP." << endl;
delete dc; // Clean up DCOP commmunication
::exit(255);
}
if (!dc->isApplicationRegistered(appName)) {
kdError() << "KUniqueApplication: Registering failed!" << endl;
kdError() << "TDEUniqueApplication: Registering failed!" << endl;
}
TQCString new_asn_id;
@ -299,7 +299,7 @@ KUniqueApplication::start()
dc->setPriorityCall(false);
if (replyType != "int")
{
kdError() << "KUniqueApplication: DCOP communication error!" << endl;
kdError() << "TDEUniqueApplication: DCOP communication error!" << endl;
delete dc; // Clean up DCOP commmunication
::exit(255);
}
@ -314,11 +314,11 @@ KUniqueApplication::start()
}
KUniqueApplication::KUniqueApplication(bool allowStyles, bool GUIenabled, bool configUnique)
TDEUniqueApplication::TDEUniqueApplication(bool allowStyles, bool GUIenabled, bool configUnique)
: TDEApplication( allowStyles, GUIenabled, initHack( configUnique )),
DCOPObject(TDECmdLineArgs::about->appName())
{
d = new KUniqueApplicationPrivate;
d = new TDEUniqueApplicationPrivate;
d->processingRequest = false;
d->firstInstance = true;
@ -334,12 +334,12 @@ KUniqueApplication::KUniqueApplication(bool allowStyles, bool GUIenabled, bool c
#ifdef TQ_WS_X11
KUniqueApplication::KUniqueApplication(Display *display, TQt::HANDLE visual,
TDEUniqueApplication::TDEUniqueApplication(Display *display, TQt::HANDLE visual,
TQt::HANDLE colormap, bool allowStyles, bool configUnique)
: TDEApplication( display, visual, colormap, allowStyles, initHack( configUnique )),
DCOPObject(TDECmdLineArgs::about->appName())
{
d = new KUniqueApplicationPrivate;
d = new TDEUniqueApplicationPrivate;
d->processingRequest = false;
d->firstInstance = true;
@ -355,13 +355,13 @@ KUniqueApplication::KUniqueApplication(Display *display, TQt::HANDLE visual,
#endif
KUniqueApplication::~KUniqueApplication()
TDEUniqueApplication::~TDEUniqueApplication()
{
delete d;
}
// this gets called before even entering TQApplication::TQApplication()
TDEInstance* KUniqueApplication::initHack( bool configUnique )
TDEInstance* TDEUniqueApplication::initHack( bool configUnique )
{
TDEInstance* inst = new TDEInstance( TDECmdLineArgs::about );
if (configUnique)
@ -375,7 +375,7 @@ TDEInstance* KUniqueApplication::initHack( bool configUnique )
return inst;
}
void KUniqueApplication::newInstanceNoFork()
void TDEUniqueApplication::newInstanceNoFork()
{
if (dcopClient()->isSuspended())
{
@ -400,7 +400,7 @@ void KUniqueApplication::newInstanceNoFork()
// What to do with the return value ?
}
bool KUniqueApplication::process(const TQCString &fun, const TQByteArray &data,
bool TDEUniqueApplication::process(const TQCString &fun, const TQByteArray &data,
TQCString &replyType, TQByteArray &replyData)
{
if (fun == "newInstance()")
@ -412,7 +412,7 @@ bool KUniqueApplication::process(const TQCString &fun, const TQByteArray &data,
}
void
KUniqueApplication::delayRequest(const TQCString &fun, const TQByteArray &data)
TDEUniqueApplication::delayRequest(const TQCString &fun, const TQByteArray &data)
{
DCOPRequest *request = new DCOPRequest;
request->fun = fun;
@ -426,7 +426,7 @@ KUniqueApplication::delayRequest(const TQCString &fun, const TQByteArray &data)
}
void
KUniqueApplication::processDelayed()
TDEUniqueApplication::processDelayed()
{
if (dcopClient()->isSuspended())
{
@ -468,12 +468,12 @@ KUniqueApplication::processDelayed()
d->processingRequest = false;
}
bool KUniqueApplication::restoringSession()
bool TDEUniqueApplication::restoringSession()
{
return d->firstInstance && isRestored();
}
int KUniqueApplication::newInstance()
int TDEUniqueApplication::newInstance()
{
if (!d->firstInstance)
{
@ -493,13 +493,13 @@ int KUniqueApplication::newInstance()
return 0; // do nothing in default implementation
}
void KUniqueApplication::setHandleAutoStarted()
void TDEUniqueApplication::setHandleAutoStarted()
{
s_handleAutoStarted = false;
}
void KUniqueApplication::virtual_hook( int id, void* data )
void TDEUniqueApplication::virtual_hook( int id, void* data )
{ TDEApplication::virtual_hook( id, data );
DCOPObject::virtual_hook( id, data ); }
#include "kuniqueapplication.moc"
#include "tdeuniqueapplication.moc"

@ -18,13 +18,13 @@
Boston, MA 02110-1301, USA.
*/
#ifndef _KUNIQUEAPP_H
#define _KUNIQUEAPP_H
#ifndef _TDEUNIQUEAPP_H
#define _TDEUNIQUEAPP_H
#include <tdeapplication.h>
#include <dcopobject.h>
class KUniqueApplicationPrivate;
class TDEUniqueApplicationPrivate;
/**
* Maintains only a single
@ -45,7 +45,7 @@ class KUniqueApplicationPrivate;
* @see TDEApplication DCOPObject
* @author Preston Brown <pbrown@kde.org>
*/
class TDECORE_EXPORT KUniqueApplication : public TDEApplication, public DCOPObject
class TDECORE_EXPORT TDEUniqueApplication : public TDEApplication, public DCOPObject
{
TQ_OBJECT
public:
@ -64,7 +64,7 @@ public:
* depend on the value of the "MultipleInstances"
* key in the "KDE" group of the application config file.
*/
KUniqueApplication( bool allowStyles=true,
TDEUniqueApplication( bool allowStyles=true,
bool GUIenabled=true,
bool configUnique=false);
@ -89,7 +89,7 @@ public:
* key in the "KDE" group of the application config file.
* @since KDE 3.3
*/
KUniqueApplication( Display *display,
TDEUniqueApplication( Display *display,
TQt::HANDLE visual=0,
TQt::HANDLE colormap=0,
bool allowStyles=true,
@ -97,9 +97,9 @@ public:
#endif
/**
* Adds command line options specific for KUniqueApplication.
* Adds command line options specific for TDEUniqueApplication.
*
* Should be called before calling KUniqueApplication constructor
* Should be called before calling TDEUniqueApplication constructor
* and / or start().
*/
static void addCmdLineOptions();
@ -116,18 +116,18 @@ public:
* TDEAboutData about("myappname", "myAppName", .....);
* TDECmdLineArgs::init(argc, argv, &about);
* TDECmdLineArgs::addCmdLineOptions( myCmdOptions );
* KUniqueApplication::addCmdLineOptions();
* TDEUniqueApplication::addCmdLineOptions();
*
* if (!KUniqueApplication::start()) {
* if (!TDEUniqueApplication::start()) {
* fprintf(stderr, "myAppName is already running!\n");
* exit(0);
* }
* KUniqueApplication a;
* TDEUniqueApplication a;
* a.exec();
* }
* \endcode
* Note that it's not necessary to call start() explicitly. It will be
* called automatically before creating KUniqueApplication if it hasn't
* called automatically before creating TDEUniqueApplication if it hasn't
* been called yet, without any performance impact.
*
* @return true if registration is successful.
@ -138,7 +138,7 @@ public:
/**
* Destructor
*/
virtual ~KUniqueApplication();
virtual ~TDEUniqueApplication();
/**
* Dispatches any incoming DCOP message for a new instance.
@ -215,7 +215,7 @@ private:
protected:
virtual void virtual_hook( int id, void* data );
private:
KUniqueApplicationPrivate *d;
TDEUniqueApplicationPrivate *d;
};
#endif

@ -32,7 +32,7 @@ tde_add_library( tdeconfigtest SHARED AUTOMOC
set( CHECKS
tdeconfigtestgui klocaletest kprocesstest ksimpleconfigtest kstddirstest
kuniqueapptest ktempfiletest krandomsequencetest kdebugtest
tdeuniqueapptest ktempfiletest krandomsequencetest kdebugtest
ksocktest kstringhandlertest kcmdlineargstest kapptest kmemtest
dcopkonqtest kipctest cplusplustest kiconloadertest kresolvertest
kmdcodectest knotifytest ksortablevaluelisttest krfcdatetest testqtargs

@ -22,7 +22,7 @@ INCLUDES = -I$(top_srcdir)/tdecore $(all_includes)
AM_LDFLAGS = $(QT_LDFLAGS) $(X_LDFLAGS) $(KDE_RPATH)
check_PROGRAMS = tdeconfigtestgui klocaletest kprocesstest ksimpleconfigtest \
kstddirstest kurltest kuniqueapptest ktempfiletest krandomsequencetest \
kstddirstest kurltest tdeuniqueapptest ktempfiletest krandomsequencetest \
kdebugtest ksocktest kstringhandlertest kcmdlineargstest kapptest \
kmemtest kidlservertest kidlclienttest dcopkonqtest kipctest \
cplusplustest kiconloadertest kresolvertest kmdcodectest knotifytest \
@ -47,7 +47,7 @@ ksimpleconfigtest_SOURCES = ksimpleconfigtest.cpp
kurltest_SOURCES = kurltest.cpp
kstddirstest_SOURCES = kstddirstest.cpp
kprocesstest_SOURCES = kprocesstest.cpp
kuniqueapptest_SOURCES = kuniqueapptest.cpp
tdeuniqueapptest_SOURCES = tdeuniqueapptest.cpp
kapptest_SOURCES = kapptest.cpp
ksocktest_SOURCES = ksocktest.cpp
ktempfiletest_SOURCES = ktempfiletest.cpp

@ -36,7 +36,7 @@
#include <tqptrlist.h>
#include <tqstring.h>
#include <kuniqueapplication.h>
#include <tdeuniqueapplication.h>
#include <ksocks.h>
#include <ksockaddr.h>
#include <kextsock.h>
@ -62,11 +62,11 @@ namespace KDE
extern const int resolverFlags;
}
class TestApp : public KUniqueApplication
class TestApp : public TDEUniqueApplication
{
public:
TestApp() :
KUniqueApplication()
TDEUniqueApplication()
{ }
int newInstance(TQValueList<TQCString> params);
@ -412,7 +412,7 @@ int main(int argc, char **argv)
{
TDEAboutData about("socktest2", "SockTest", "1.0");
TDECmdLineArgs::init(argc, argv, &about);
KUniqueApplication::addCmdLineOptions();
TDEUniqueApplication::addCmdLineOptions();
/* TestApp a;
a.exec();*/

@ -16,7 +16,7 @@
Boston, MA 02110-1301, USA.
*/
#include "kuniqueapplication.h"
#include "tdeuniqueapplication.h"
#include "tdeglobal.h"
#include "kdebug.h"
#include "ksock.h"

@ -16,7 +16,7 @@
Boston, MA 02110-1301, USA.
*/
#include "kuniqueapplication.h"
#include "tdeuniqueapplication.h"
#include "tdeglobalsettings.h"
#include <unistd.h>
@ -25,10 +25,10 @@
#include <tdecmdlineargs.h>
#include <tdeaboutdata.h>
class TestApp : public KUniqueApplication
class TestApp : public TDEUniqueApplication
{
public:
TestApp() : KUniqueApplication("TestApp") { }
TestApp() : TDEUniqueApplication("TestApp") { }
virtual int newInstance( );
};
@ -43,9 +43,9 @@ TestApp::newInstance( )
int
main(int argc, char *argv[])
{
TDEAboutData about("kuniqueapptest", "kuniqueapptest", "version");
TDEAboutData about("tdeuniqueapptest", "tdeuniqueapptest", "version");
TDECmdLineArgs::init(argc, argv, &about);
KUniqueApplication::addCmdLineOptions();
TDEUniqueApplication::addCmdLineOptions();
if (!TestApp::start())
{

@ -26,7 +26,7 @@
#include <sysent.h>
#endif
#include <kuniqueapplication.h>
#include <tdeuniqueapplication.h>
#include <tqbitmap.h>
#include <tqimage.h>
#include <tqwhatsthis.h>
@ -243,7 +243,7 @@ void KWin::activateWindow( WId win, long time )
info.setActiveWindow( win, NET::FromApplication, time,
kapp->activeWindow() ? kapp->activeWindow()->winId() : 0 );
#endif // TQ_WS_X11 ...
KUniqueApplication::setHandleAutoStarted();
TDEUniqueApplication::setHandleAutoStarted();
}
void KWin::forceActiveWindow( WId win, long time )
@ -254,7 +254,7 @@ void KWin::forceActiveWindow( WId win, long time )
time = get_tqt_x_time();
info.setActiveWindow( win, NET::FromTool, time, 0 );
#endif // TQ_WS_X11
KUniqueApplication::setHandleAutoStarted();
TDEUniqueApplication::setHandleAutoStarted();
}
void KWin::setActiveWindow( WId win )
@ -263,7 +263,7 @@ void KWin::setActiveWindow( WId win )
NETRootInfo info( tqt_xdisplay(), 0 );
info.setActiveWindow( win, NET::FromUnknown, 0, 0 );
#endif
KUniqueApplication::setHandleAutoStarted();
TDEUniqueApplication::setHandleAutoStarted();
}
void KWin::demandAttention( WId win, bool set )

@ -53,10 +53,10 @@ contain the following optional entries to control its autostart:
Disables autostarting the application.
KUniqueApplication and session restoration
TDEUniqueApplication and session restoration
------------------------------------------
If KUniqueApplication applications are autostarted before they are restored
If TDEUniqueApplication applications are autostarted before they are restored
from the previous session, they will never see the session restoration command.
So if you need to autostart a KUniqueApplication which may also be restored
So if you need to autostart a TDEUniqueApplication which may also be restored
in session restoration, you should schedule it for autostart in phase 2.

@ -33,7 +33,7 @@
#include <tdeio/connection.h>
#include <ksock.h>
#include <kurl.h>
#include <kuniqueapplication.h>
#include <tdeuniqueapplication.h>
#include <kservice.h>

@ -27,7 +27,7 @@
#include <ksqueezedtextlabel.h>
#include <tdeconfig.h>
#include <kstandarddirs.h>
#include <kuniqueapplication.h>
#include <tdeuniqueapplication.h>
#include <tdeaboutdata.h>
#include <tdecmdlineargs.h>
#include <tdeglobal.h>
@ -1388,15 +1388,15 @@ extern "C" TDE_EXPORT int kdemain(int argc, char **argv)
TDECmdLineArgs::init( argc, argv, &aboutdata );
// TDECmdLineArgs::addCmdLineOptions( options );
KUniqueApplication::addCmdLineOptions();
TDEUniqueApplication::addCmdLineOptions();
if (!KUniqueApplication::start())
if (!TDEUniqueApplication::start())
{
kdDebug(7024) << "tdeio_uiserver is already running!" << endl;
return (0);
}
KUniqueApplication app;
TDEUniqueApplication app;
// This app is started automatically, no need for session management
app.disableSessionManagement();

@ -9,12 +9,12 @@ For this it does the following:
(because the file was modified) then it offers re-uploading the modified version.
This is how you offer network transparency to apps that don't have it.
BUT: with KUniqueApplication, this breaks, because the app returns at once,
BUT: with TDEUniqueApplication, this breaks, because the app returns at once,
so we have no way to know when the user finished editing the file...
Conclusion: if the application has network transparency built-in, it should
put "%u" in its desktop file - and kfmexec isn't used -. If it doesn't, either
it's a TDEApplication and kfmexec does its job, or it's a KUniqueApplication
it's a TDEApplication and kfmexec does its job, or it's a TDEUniqueApplication
and... kfmexec can't see modifications to the file. Be warned.
From Waldo: "The program doesn't return _at once_. It returns

@ -23,7 +23,7 @@
#include <tdeapplication.h>
#include <tdestartupinfo.h>
#include <tdecmdlineargs.h>
#include <kuniqueapplication.h>
#include <tdeuniqueapplication.h>
#include <tdeaboutdata.h>
#include "libisofs/iso_fs.h"
@ -53,7 +53,7 @@ int main(int argc, char *argv[])
aboutData.addAuthor("Timothy Pearson",0, "kb9vqf@pearsoncomputing.net");
TDECmdLineArgs::init(argc, argv, &aboutData);
TDECmdLineArgs::addCmdLineOptions(options);
KUniqueApplication::addCmdLineOptions();
TDEUniqueApplication::addCmdLineOptions();
TDEApplication::disableAutoDcopRegistration();
TDEApplication app(false, false, false);

@ -55,7 +55,7 @@ class TQPopupMenu;
*
* \b X-TDE-UniqueApplet \n
*
* Similar to TDEApplication and KUniqueApplication there are
* Similar to TDEApplication and TDEUniqueApplication there are
* two types of panel applets. Use unique applets when it makes no
* sence to run more than one instance of a applet in the panel. A
* good example for unique applets is the taskbar applet. Use normal

@ -56,7 +56,7 @@ class KPanelExtensionPrivate;
*
* \b X-TDE-UniqueExtension \n
*
* Similar to TDEApplication and KUniqueApplication there are
* Similar to TDEApplication and TDEUniqueApplication there are
* two types of panel extensions. Use unique extensions when it makes no
* sence to run more than one instance of an extension in the panel. A
* good example for unique extensions is the taskbar extension. Use normal

@ -79,7 +79,7 @@ kckey.cpp \
kglobalaccel.cpp \
kglobalaccel_win.cpp \
tdeaccelaction.cpp \
kuniqueapplication.cpp \
tdeuniqueapplication.cpp \
tdesycoca.cpp \
tdesycocadict.cpp \
tdesycocafactory.cpp \

Loading…
Cancel
Save