tux3/qTox — pull request #947 by novist (2014-12-18 14:42:21+00:00)
Title: Autorun on OS startup

Adds autorun on OS startup behaviour when "Start in tray" option is checked. Supported platforms are windows and xfreedesktop-compatible unixes. It works with multiple profiles although after creating/switching profile checkbox in settings is not updated. I am unsure how to go about it. Maybe it is another problem of not updating settings UI after switching profile?

OSX support is missing - someone please contribute. I added warning about missing implementation [here](https://github.com/novist/qTox/compare/tux3:master...novist:autorun?expand=1#diff-a095c041ed4fe02895e04ee7e2ddff6fR473). When it is implemented entire #ifdef / #endif block should be removed. With these changes behaviour on OSX does not change.

I hijacked "Start in tray" option because in code its called like get**Autostart**InTray(). This implied intention to use that option for autorun functionality in the future and so i did.

Windows implementation used std::wstring / QString::toStdWString(). While most likely it is not a problem im mentioning it here in case it is required to work with Qt compiled without stl support. Non-stl solution would be rather ugly so i opted in for tiny bit stl.