KDEUI
kuniqueapplication.cpp
Go to the documentation of this file.
102 kError() << "KUniqueApplication: Cannot find the D-Bus session server: " << sessionBus.lastError().message() << endl;
129 const QStringList parts = KCmdLineArgs::aboutData()->organizationDomain().split(QLatin1Char('.'), QString::SkipEmptyParts);
156 bool registered = dbusService->registerService(appName) == QDBusConnectionInterface::ServiceRegistered;
291 QDBusMessage msg = QDBusMessage::createMethodCall(appName, "/MainApplication", "org.kde.KUniqueApplication",
299 kError() << "Communication problem with " << KCmdLineArgs::aboutData()->appName() << ", it probably crashed." << endl
431 const int index = parent()->metaObject()->indexOfMethod("loadCommandLineOptionsForNewInstance");
Controls and provides information to all KDE applications.
Definition: kapplication.h:82
static void setNewStartupId(QWidget *window, const QByteArray &startup_id)
Use this function if the application got a request with startup notification from outside (for exampl...
Definition: kstartupinfo.cpp:643
static void addCmdLineOptions(const KCmdLineOptions &options, const KLocalizedString &name=KLocalizedString(), const QByteArray &id=QByteArray(), const QByteArray &afterId=QByteArray())
QString organizationDomain() const
QString appName() const
KCmdLineOptions & add(const QByteArray &name, const KLocalizedString &description=KLocalizedString(), const QByteArray &defaultValue=QByteArray())
static const KAboutData * aboutData()
static void handleAutoAppStartedSending()
Definition: kstartupinfo.cpp:637
KLocalizedString ki18n(const char *msg)
static KCmdLineArgs * parsedArgs(const QByteArray &id=QByteArray())
static QDebug kError(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
Class representing an identification of application startup notification.
Definition: kstartupinfo.h:368
static void setHandleAutoStarted()
Definition: kuniqueapplication.cpp:418
friend class KUniqueApplicationAdaptor
Definition: kuniqueapplication.h:223
static void forceActiveWindow(WId win, long time=0)
Sets window win to be the active window.
Definition: kwindowsystem_mac.cpp:366
void mac_fork_and_reexec_self()
void KApplication_activateWindowForProcess(const QString &executableName)
Definition: kapplication_win.cpp:242
bool isSet(const QByteArray &option) const
static void loadAppArgs(QDataStream &)
bool restoringSession()
Returns whether newInstance() is being called while session restoration is in progress.
Definition: kuniqueapplication.cpp:385
static QDBusConnectionInterface * tryToInitDBusConnection()
Definition: kuniqueapplication.cpp:95
Class representing data about an application startup notification.
Definition: kstartupinfo.h:439
QByteArray startupId() const
Returns the app startup notification identifier for this running application.
Definition: kapplication.cpp:1075
virtual int newInstance()
Creates a new "instance" of the application.
Definition: kuniqueapplication.cpp:390
static void addCmdLineOptions()
Adds command line options specific for KUniqueApplication.
Definition: kuniqueapplication.cpp:85
static void saveAppArgs(QDataStream &)
static KStartupInfoId currentStartupIdEnv()
Returns the current startup notification identification for the current startup notification environm...
Definition: kstartupinfo.cpp:1090
Create a new instance of the application in a new process and do not attempt to re-use an existing pr...
Definition: kuniqueapplication.h:119
bool s_kuniqueapplication_startCalled
Definition: kuniqueapplication.cpp:75
static bool sendChangeX(Display *dpy, const KStartupInfoId &id, const KStartupInfoData &data)
Like sendChange , uses dpy instead of qt_x11display() for sending the info.
Definition: kstartupinfo.cpp:510
KUniqueApplication(bool GUIenabled=true, bool configUnique=false)
Constructor.
Definition: kuniqueapplication.cpp:312
void mac_initialize_dbus()
void initId(const QByteArray &id="")
Initializes this object with the given identification ( which may be also "0" for no notification )...
Definition: kstartupinfo.cpp:1058
T readEntry(const QString &key, const T &aDefault) const
void addPid(pid_t pid)
Adds a PID to the list of processes that belong to the startup notification.
Definition: kstartupinfo.cpp:1446
KAction * close(const QObject *recvr, const char *slot, QObject *parent)
Close the current document.
Definition: kstandardaction.cpp:269
static QList< KMainWindow * > memberList()
List of members of KMainWindow class.
Definition: kmainwindow.cpp:1176
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:16 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:16 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.