Skip to content

Commit

Permalink
Bugfix: SingleApplication passing a copy of argc instead of reference
Browse files Browse the repository at this point in the history
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.
#1
  • Loading branch information
itay-grudev committed Apr 7, 2015
1 parent f170f1c commit d33b4c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion singleapplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion singleapplication.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class SingleApplication : public QApplication
{
Q_OBJECT
public:
explicit SingleApplication(int, char *[]);
explicit SingleApplication(int&, char *[]);
~SingleApplication();

signals:
Expand Down

0 comments on commit d33b4c1

Please sign in to comment.