nowrep/QupZilla — Issue #124: Ignore -psn_* arguments Mac OS X passes
Author: ryandesign
Created: 2012-01-04 23:39:09+00:00
State: open

When compiled on Mac OS X, QupZilla 1.1.0 does not open when you double-click it in the Finder, or click it in the Dock. Instead, if you look in Console, you will see that a usage message has been printed:

```
2012-01-04 17:00:46	[0x0-0x246045e].com.yourcompany.qupzilla[59958]	Used bad arguments! Please see help below.
2012-01-04 17:00:46	[0x0-0x246045e].com.yourcompany.qupzilla[59958]	Usage: qupzilla [options] URL
2012-01-04 17:00:46	[0x0-0x246045e].com.yourcompany.qupzilla[59958]	QupZilla options:
2012-01-04 17:00:46	[0x0-0x246045e].com.yourcompany.qupzilla[59958]	-h or --help print this message
2012-01-04 17:00:46	[0x0-0x246045e].com.yourcompany.qupzilla[59958]	-a or --authors print QupZilla authors
2012-01-04 17:00:46	[0x0-0x246045e].com.yourcompany.qupzilla[59958]	-v or --version print QupZilla version
2012-01-04 17:00:46	[0x0-0x246045e].com.yourcompany.qupzilla[59958]	-p or --profile=PROFILE start with specified profile
2012-01-04 17:00:46	[0x0-0x246045e].com.yourcompany.qupzilla[59958]	-np or --no-plugins start without plugins
2012-01-04 17:00:46	[0x0-0x246045e].com.yourcompany.qupzilla[59958]	-nt or --new-tab open new tab
2012-01-04 17:00:46	[0x0-0x246045e].com.yourcompany.qupzilla[59958]	-nw or --new-window open new window
2012-01-04 17:00:46	[0x0-0x246045e].com.yourcompany.qupzilla[59958]	-dm or --download-manager show download manager
2012-01-04 17:00:46	[0x0-0x246045e].com.yourcompany.qupzilla[59958]	QupZilla is a new, fast and secure web browser
2012-01-04 17:00:46	[0x0-0x246045e].com.yourcompany.qupzilla[59958]	based on WebKit core (http://webkit.org) and
2012-01-04 17:00:46	[0x0-0x246045e].com.yourcompany.qupzilla[59958]	written in Qt Framework (http://qt.nokia.com)
2012-01-04 17:00:46	[0x0-0x246045e].com.yourcompany.qupzilla[59958]	For more informations please visit wiki at
2012-01-04 17:00:46	[0x0-0x246045e].com.yourcompany.qupzilla[59958]	https://github.com/nowrep/QupZilla/wiki
2012-01-04 17:00:46	[0x0-0x246045e].com.yourcompany.qupzilla[59958]	> http://qupzilla.co.cc
```

This is because whenever OS X launches a GUI app, it passes it an argument like -psn_0_12345 containing its process serial number. QupZilla should silently accept and ignore such arguments. Here is the patch we are using to successfully accomplish this in MacPorts:

http://trac.macports.org/browser/trunk/dports/www/QupZilla/files/patch-src-app-commandlineoptions.cpp.diff?rev=88587