NOISSUE tabs -> spaces

This commit is contained in:
Petr Mrázek
2018-07-15 14:51:05 +02:00
parent 03280cc62e
commit bbb3b3e6f6
577 changed files with 51938 additions and 51938 deletions

View File

@ -50,51 +50,51 @@ class LockedFile;
class ApplicationId
{
public: /* methods */
// traditional app = installed system wide and used in a multi-user environment
static ApplicationId fromTraditionalApp();
// ID based on a path with all the application data (no two instances with the same data path should run)
static ApplicationId fromPathAndVersion(const QString & dataPath, const QString & version);
// custom ID
static ApplicationId fromCustomId(const QString & id);
// custom ID, based on a raw string previously acquired from 'toString'
static ApplicationId fromRawString(const QString & id);
// traditional app = installed system wide and used in a multi-user environment
static ApplicationId fromTraditionalApp();
// ID based on a path with all the application data (no two instances with the same data path should run)
static ApplicationId fromPathAndVersion(const QString & dataPath, const QString & version);
// custom ID
static ApplicationId fromCustomId(const QString & id);
// custom ID, based on a raw string previously acquired from 'toString'
static ApplicationId fromRawString(const QString & id);
QString toString()
{
return m_id;
}
QString toString()
{
return m_id;
}
private: /* methods */
ApplicationId(const QString & value)
{
m_id = value;
}
ApplicationId(const QString & value)
{
m_id = value;
}
private: /* data */
QString m_id;
QString m_id;
};
class LocalPeer : public QObject
{
Q_OBJECT
Q_OBJECT
public:
LocalPeer(QObject *parent, const ApplicationId &appId);
~LocalPeer();
bool isClient();
bool sendMessage(const QString &message, int timeout);
ApplicationId applicationId() const;
LocalPeer(QObject *parent, const ApplicationId &appId);
~LocalPeer();
bool isClient();
bool sendMessage(const QString &message, int timeout);
ApplicationId applicationId() const;
Q_SIGNALS:
void messageReceived(const QString &message);
void messageReceived(const QString &message);
protected Q_SLOTS:
void receiveConnection();
void receiveConnection();
protected:
ApplicationId id;
QString socketName;
std::unique_ptr<QLocalServer> server;
std::unique_ptr<LockedFile> lockFile;
ApplicationId id;
QString socketName;
std::unique_ptr<QLocalServer> server;
std::unique_ptr<LockedFile> lockFile;
};