Code style improvements

This commit is contained in:
Itay Grudev 2016-05-04 21:05:59 +01:00
parent fd8004c706
commit 5e67bf9751
2 changed files with 8 additions and 9 deletions

View File

@ -22,7 +22,7 @@ class SingleApplicationPrivate {
public: public:
Q_DECLARE_PUBLIC(SingleApplication) Q_DECLARE_PUBLIC(SingleApplication)
SingleApplicationPrivate(SingleApplication *q_ptr) : q_ptr(q_ptr) { SingleApplicationPrivate( SingleApplication *q_ptr ) : q_ptr( q_ptr ) {
server = NULL; server = NULL;
} }
@ -84,7 +84,7 @@ public:
socket.connectToServer( memory->key() ); socket.connectToServer( memory->key() );
// Notify the parent that a new instance had been started; // Notify the parent that a new instance had been started;
socket.waitForConnected(100); socket.waitForConnected( 100 );
socket.close(); socket.close();
} }
@ -118,7 +118,7 @@ public:
signal( SIGXFSZ, SingleApplicationPrivate::terminate ); // 25 signal( SIGXFSZ, SingleApplicationPrivate::terminate ); // 25
} }
static void terminate(int signum) static void terminate( int signum )
{ {
while( ! sharedMem.empty() ) { while( ! sharedMem.empty() ) {
delete sharedMem.back(); delete sharedMem.back();
@ -161,8 +161,8 @@ public:
* @param argc * @param argc
* @param argv * @param argv
*/ */
SingleApplication::SingleApplication(int &argc, char *argv[], uint8_t secondaryInstances) SingleApplication::SingleApplication( int &argc, char *argv[], uint8_t secondaryInstances )
: app_t(argc, argv), d_ptr(new SingleApplicationPrivate(this)) : app_t( argc, argv ), d_ptr( new SingleApplicationPrivate( this ) )
{ {
Q_D(SingleApplication); Q_D(SingleApplication);

View File

@ -1,5 +1,6 @@
#ifndef SINGLE_APPLICATION_H #ifndef SINGLE_APPLICATION_H
#define SINGLE_APPLICATION_H #define SINGLE_APPLICATION_H
#include <QtCore/QtGlobal> #include <QtCore/QtGlobal>
#ifndef QAPPLICATION_CLASS #ifndef QAPPLICATION_CLASS
@ -22,7 +23,7 @@ class SingleApplication : public QAPPLICATION_CLASS
typedef QAPPLICATION_CLASS app_t; typedef QAPPLICATION_CLASS app_t;
public: public:
explicit SingleApplication(int &argc, char *argv[], uint8_t secondaryInstances = 0); explicit SingleApplication( int &argc, char *argv[], uint8_t secondaryInstances = 0 );
~SingleApplication(); ~SingleApplication();
bool isPrimary(); bool isPrimary();
@ -36,8 +37,6 @@ private Q_SLOTS:
private: private:
SingleApplicationPrivate *d_ptr; SingleApplicationPrivate *d_ptr;
}; };
#endif // SINGLE_APPLICATION_H #endif // SINGLE_APPLICATION_H