1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix(macos): Fix macOS autorun not loading at start

macOS system.log was reporting "Unknown key for integer: RunAtLoad" and
not loading qTox at start despite
 ~/Library/LaunchAgents/chat.tox.qtox.autorun.plist being present.

Changing the type from an int to a bool causes it to load successfully
on boot.

Fix #2814
This commit is contained in:
Anthony Bilinski 2022-03-17 03:59:59 -07:00
parent 4c969a9277
commit 009369118f
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C

View File

@ -25,11 +25,12 @@
#include <QStandardPaths>
namespace {
int state;
bool state;
} // namespace
bool Platform::setAutorun(const Settings&, bool on)
bool Platform::setAutorun(const Settings& settings, bool on)
{
std::ignore = settings;
QString qtoxPlist =
QDir::cleanPath(QStandardPaths::writableLocation(QStandardPaths::HomeLocation)
+ QDir::separator() + "Library" + QDir::separator() + "LaunchAgents"
@ -45,7 +46,8 @@ bool Platform::setAutorun(const Settings&, bool on)
return true;
}
bool Platform::getAutorun(const Settings&)
bool Platform::getAutorun(const Settings& settings)
{
std::ignore = settings;
return state;
}