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
This commit is contained in:
Itay Grudev 2015-04-07 22:17:57 +01:00
parent f170f1c73a
commit d33b4c1c61
2 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@
* @param argc
* @param argv
*/
SingleApplication::SingleApplication(int argc, char *argv[])
SingleApplication::SingleApplication(int &argc, char *argv[])
: QApplication(argc, argv)
{
QString serverName = QApplication::organizationName() + QApplication::applicationName();

View File

@ -13,7 +13,7 @@ class SingleApplication : public QApplication
{
Q_OBJECT
public:
explicit SingleApplication(int, char *[]);
explicit SingleApplication(int&, char *[]);
~SingleApplication();
signals: