Commit Graph

29 Commits

Author SHA1 Message Date
Itay Grudev
d15fa8feac WIP implementation 2024-05-20 20:14:38 +03:00
Itay Grudev
a5cc738641 MIT, but No Machine Learning Allowed 2023-03-24 12:09:12 +02:00
Hennadii Chernyshchyk
efdfa507dd
Switch to Doxygen to avoid documentation duplication
I also had to fix syntax a little in markdown and the header file.
Now checked on CI.
2022-04-06 00:32:30 +03:00
Christoph Cullmann
611e48abbb
Provide API for blocking sendMessage (#154) 2022-04-05 23:46:42 +03:00
Shatur95
4aeac8fa3e Mark getters as const 2021-01-25 01:36:36 +02:00
Shatur95
7bdb497a83 Pass usedData by const reference 2020-12-21 19:07:36 +02:00
Loren Burkholder
f236032cf9 Allow adding unique userdata to instances 2020-12-16 22:17:24 -05:00
Itay Grudev
e4282f2476 Mitigated possible race condition during app startup 2020-09-09 00:28:02 +01:00
Shatur95
fcd4fcab21 Fix Clang Tidy warnings 2020-05-17 17:50:27 +03:00
Leander Schulten
5fff2202b5 Add SingleApplication::currentUser() 2020-03-27 08:00:14 +01:00
Itay Grudev
81cc2719be v3.1.0a Added primaryUser()
Closes #95
2020-03-03 01:24:55 +00:00
Jonas Kvinge
791f6b1cae Fix spelling and typos (#70) 2019-08-23 22:57:28 +03:00
Itay Grudev
46b2204a3f
Proposed SA changes still containing a race condition (#48) 2018-07-27 04:29:55 +03:00
Itay Grudev
4f03651072 Primary PID support (#36)
* Added the ability to bring the primary application window to the foreground on Windows systems by adding an option flag. THis option can only be used in Windows development and in applications derived from QApplication with a QMainWindow object.
Because the primary application needs to be instructed to go to the foreground, the option SecondaryNotification must also be set to use this functionality

* Changed the ability to bring the primary application window to the front as discussed in itay-grudev/SingleApplication#31.

Now the process ID of the primary application get stored and is accessible for other instances of the application. It is to the developer to bring the applications windows to the front. For convenience the accompanying readme now contains a paragraph with example of how to do this on Windows systems.

* v3.0.9 Added SingleApplicationPrivate::primaryPid()
2017-10-02 12:17:41 +01: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
Itay Grudev
4e5c1647cc
SingleApplication v3.0a 2016-08-10 03:41:03 +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
6b78aefd28 QAPPLICATION_CLASS now defaults to QCoreApplication 2016-05-09 17:05:38 +01:00
Itay Grudev
5e67bf9751 Code style improvements 2016-05-04 21:05:59 +01:00
Itay Grudev
84d86455e7 Secondary instance implementation 2016-05-04 19:59:07 +01:00
Vlad Pyatnichenko
8eb993a7f8 Ensure backward compatibility and some cosmetic changes. 2016-04-05 20:31:05 +03: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
bf00721b9c Improved QAPPLICATION_CLASS macro
Now it can be defined in the cpp file that include it (usually
main.cpp).
2015-11-04 16:30:14 +00: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
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
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