| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix send message example
If a secondary instance sends a message immediately after connecting, the
message follows the init message. This causes the slotConnectionEstablished to
read and consume the tail of the message and interpret it as the checksum. The
checksum fails and the connection becomes invalid.
To avoid this race, we prefix the init message with its length. This way, we
consume only the data relevant to the init message.
This patch fixes the sending_arguments example.
Signed-off-by: Francis Giraldeau <francis.giraldeau@gmail.com>
* Fix include file case
Signed-off-by: Francis Giraldeau <francis.giraldeau@nrc-cnrc.gc.ca>
|
|
|
|
|
|
| |
* removed c style casts and eliminated all clang warnings, fixed instanceId reading from only one byte in deserialization of message, cleaned up serialization code using QDataStream, changed connection type to use quint8 enum rather than char
* renamed SingleAppConnectionType to ConnectionType, added initialization values to all ConnectionType enum cases
|
|
|
|
|
|
|
|
|
|
|
| |
* 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()
|
|
|
|
| |
Bug fix - changed QApplication to macro QCoreApplication when invoking QApplication::instance()
|
|
|
|
|
| |
SingleApplication instances
Problem raised by @retmas in #24
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Added back support for getting username on Windows
* Fixed typo in singleapplication.pri
* Compiler specific Advapi32.lib links
* Removed username debug statement
|
|
|
|
|
| |
Deleted the separate cleanUp method as it’s not used from anywhere but
the destructor.
|
|
|
| |
The issue is non critical as if the library is used properly this destructor is not called until the end of the program anyway.
|
| |
|
|
|
|
| |
On the absolute path to the home directory is now explicitly used.
|
|
|
|
|
| |
The code is now shorter and easier to understand. Fixed an
uninitialised variable warning as reported in #20.
|
|
|
|
|
| |
* Fixed bug on Windows with username containing wide characters causing the
library to crash.
_Le Liu_
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
New handled signals are:
SIGHUP, SIGQUIT, SIGBUS, SIGSYS, SIGPIPE, SIGALRM, SIGXCPU, SIGXFSZ
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
| |
As described in issue #2 each new socket is not deallocated and creates a memory leak
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
|
|