mirror of
https://github.com/itay-grudev/SingleApplication.git
synced 2025-01-15 17:02:06 +08:00
Code style improvements
This commit is contained in:
parent
fd8004c706
commit
5e67bf9751
@ -22,7 +22,7 @@ class SingleApplicationPrivate {
|
||||
public:
|
||||
Q_DECLARE_PUBLIC(SingleApplication)
|
||||
|
||||
SingleApplicationPrivate(SingleApplication *q_ptr) : q_ptr(q_ptr) {
|
||||
SingleApplicationPrivate( SingleApplication *q_ptr ) : q_ptr( q_ptr ) {
|
||||
server = NULL;
|
||||
}
|
||||
|
||||
@ -84,7 +84,7 @@ public:
|
||||
socket.connectToServer( memory->key() );
|
||||
|
||||
// Notify the parent that a new instance had been started;
|
||||
socket.waitForConnected(100);
|
||||
socket.waitForConnected( 100 );
|
||||
socket.close();
|
||||
}
|
||||
|
||||
@ -118,7 +118,7 @@ public:
|
||||
signal( SIGXFSZ, SingleApplicationPrivate::terminate ); // 25
|
||||
}
|
||||
|
||||
static void terminate(int signum)
|
||||
static void terminate( int signum )
|
||||
{
|
||||
while( ! sharedMem.empty() ) {
|
||||
delete sharedMem.back();
|
||||
@ -161,8 +161,8 @@ public:
|
||||
* @param argc
|
||||
* @param argv
|
||||
*/
|
||||
SingleApplication::SingleApplication(int &argc, char *argv[], uint8_t secondaryInstances)
|
||||
: app_t(argc, argv), d_ptr(new SingleApplicationPrivate(this))
|
||||
SingleApplication::SingleApplication( int &argc, char *argv[], uint8_t secondaryInstances )
|
||||
: app_t( argc, argv ), d_ptr( new SingleApplicationPrivate( this ) )
|
||||
{
|
||||
Q_D(SingleApplication);
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
#ifndef SINGLE_APPLICATION_H
|
||||
#define SINGLE_APPLICATION_H
|
||||
|
||||
#include <QtCore/QtGlobal>
|
||||
|
||||
#ifndef QAPPLICATION_CLASS
|
||||
@ -22,7 +23,7 @@ class SingleApplication : public QAPPLICATION_CLASS
|
||||
typedef QAPPLICATION_CLASS app_t;
|
||||
|
||||
public:
|
||||
explicit SingleApplication(int &argc, char *argv[], uint8_t secondaryInstances = 0);
|
||||
explicit SingleApplication( int &argc, char *argv[], uint8_t secondaryInstances = 0 );
|
||||
~SingleApplication();
|
||||
|
||||
bool isPrimary();
|
||||
@ -36,8 +37,6 @@ private Q_SLOTS:
|
||||
|
||||
private:
|
||||
SingleApplicationPrivate *d_ptr;
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif // SINGLE_APPLICATION_H
|
||||
|
Loading…
Reference in New Issue
Block a user