13#include <QtCore/QCoreApplication>
14#include <QtCore/QFileInfo>
17#include "kdsingleapplication_localsocket_p.h"
21class KDSingleApplicationPrivate
31 bool isPrimaryInstance()
const
33 return m_impl.isPrimaryInstance();
36 bool sendMessage(
const QByteArray &message,
int timeout)
38 return m_impl.sendMessage(message, timeout);
47 KDSingleApplicationLocalSocket m_impl;
56 qFatal(
"KDSingleApplication requires a non-empty application name");
58 if (isPrimaryInstance()) {
76 , d_ptr(new KDSingleApplicationPrivate(name, this))
89 return d->isPrimaryInstance();
102 return d->sendMessage(message, timeout);
bool sendMessage(const QByteArray &message)
bool sendMessageWithTimeout(const QByteArray &message, int timeout)
void messageReceived(const QByteArray &message)
KDSingleApplication(QObject *parent=nullptr)
static QString extractExecutableName(const QString &applicationFilePath)
QString fileName() const const
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
bool isEmpty() const const