Commit Graph

30 Commits

Author SHA1 Message Date
Itay Grudev
6a4d89297b
Removed Windows specific code for getting username
On the absolute path to the home directory is now explicitly used.
2017-01-24 17:25:00 +00:00
Itay Grudev
60d30db837
Refactored slotConnectionEstablished()
The code is now shorter and easier to understand. Fixed an
uninitialised variable warning as reported in #20.
2017-01-24 16:54:53 +00:00
Le Liu
5aa7430f56 Fix crash when username contains Unicode characters on Windows (#17)
*   Fixed bug on Windows with username containing wide characters causing the
    library to crash.
    _Le Liu_
2016-11-27 11:09:42 +00:00
Le Liu
0f821d44f3 Allow data exclusion for the server name hash and Windows fixes (#16)
*   Allows the application path and version to be excluded from the server name
    hash. The following flags were added for this purpose:
      * `SingleApplication::Mode::ExcludeAppVersion`
      * `SingleApplication::Mode::ExcludeAppPath`
*   Allow a non elevated process to connect to a local server created by an
    elevated process run by the same user on Windows
*   Fixes a problem with upper case letters in paths on Windows
2016-11-26 17:40:47 +00:00
Svintsov Dmitry
06f5e17544 fix Windows warning about unused parameter 2016-08-24 16:04:49 +05:00
Svintsov Dmitry
ebcfabc3ae Added missing "QMutex" dependencies 2016-08-22 15:29:14 +05:00
Itay Grudev
5d867d77a5
Fix bug (and compiler error) on Windows - wchar username support 2016-08-18 18:28:57 +01:00
Itay Grudev
4e5c1647cc
SingleApplication v3.0a 2016-08-10 03:41:03 +01:00
Itay Grudev
b459c9247b Fixed signal formatting 2016-07-10 01:11:55 +01:00
Itay Grudev
1db662d0e6 Updated license dates. Explicit license statement in the header and source files 2016-07-04 18:19:48 +01:00
Itay Grudev
fe84b5663e SIGBUSS should be signal 10. Fixed comment 2016-05-14 20:38:15 +01:00
Itay Grudev
5e67bf9751 Code style improvements 2016-05-04 21:05:59 +01:00
Itay Grudev
6fe4403941 Bugfix no showUp notification. Some minor improvements 2016-05-04 20:51:06 +01:00
Itay Grudev
8bccf446e1 Improved restoring QSharedMemory after crash 2016-05-04 20:41:23 +01:00
Itay Grudev
84d86455e7 Secondary instance implementation 2016-05-04 19:59:07 +01:00
Itay Grudev
fc5ce4c335 Bug fix possible situation in which memory is detached 2016-05-04 17:36:32 +01:00
Itay Grudev
c5ea3f6d30 Now handling all relevant signals
New handled signals are:

SIGHUP, SIGQUIT, SIGBUS, SIGSYS, SIGPIPE, SIGALRM, SIGXCPU, SIGXFSZ
2016-05-04 14:36:51 +01:00
Vlad Pyatnichenko
8eb993a7f8 Ensure backward compatibility and some cosmetic changes. 2016-04-05 20:31:05 +03:00
Vlad Pyatnichenko
7a3858a214 HOTFIX: use Q_Q instead of q_ptr directly. 2016-03-22 01:32:20 +02:00
Vlad Pyatnichenko
27df0ec8d0 HOTFIX: added Qt's modules prefixes to #include statements. 2016-03-06 01:09:04 +02:00
Vlad Pyatnichenko
35ee984d72 Adaptation to Qt's pimpl idiom design. Improved inheritance safety.
Details:
* Improved unsafe C-style macros inheritance approach to the project-wide
DEFINES: it is unspecified in
which order source files are being preprocessed ones, so in
singleapplication.cpp the class might be inherent of default-specified
base, while in main.cpp this can be a user-provided QAPPLICATION_CLASS
definition.

* Replace Qt's pseudo-keywords to more library-independent counterparts
('emit -> Q_EMIT', etc)

* Indentation fixes (80 character column-width)

* Rearragned #include statements: from most platform-independen to more
app-specific.

* Fixed some grammar typos.

* README.md updated respectively.
2016-03-05 01:05:45 +02:00
Itay Grudev
219383657a QApplication inherit macro 2015-06-09 17:29:20 +03:00
Itay Grudev
2dd9a4e553 Fixed race condition #3! Library version 2.1; Explained implementation in README 2015-06-06 00:32:50 +03:00
Itay Grudev
bae14d8d45 Client disconnect is not required 2015-05-07 15:53:48 +01:00
Itay Grudev
41eb2c3499 Fixed memory leak
As described in issue #2 each new socket is not deallocated and creates a memory leak
2015-05-07 15:29:06 +01:00
Itay Grudev
d33b4c1c61 Bugfix: SingleApplication passing a copy of argc instead of reference
QApplication uses a reference of argc so it could modify it's value when
it substitutes known arguments for example.

Thanks to @Chocobozzz for reporting the issue.
https://github.com/itay-grudev/SingleApplication/issues/1
2015-04-07 22:17:57 +01:00
Itay Grudev
ff14d2b59d Fixed new line issue 2015-02-26 19:19:38 +00:00
Itay Grudev
e16742fe4e Using Regex to remove invalid Filename Charecters 2015-02-26 19:09:45 +00:00
Itay Grudev
5c89ab17cf Completly rewritten and simplified source 2015-02-26 19:00:11 +00:00
Itay Grudev
230b4ebe94 Add base files 2012-12-23 00:12:38 +02:00