Use application name instead of domain as app identifier.

To make sure the user do not see the name Nextcloud when the client is branded.

Signed-off-by: Camila Ayres <hello@camilasan.com>
bugfix/login-items-notification
Camila Ayres 2024-03-06 19:58:42 +01:00
parent 1b9fbb03bb
commit bb9cc8bbfb
No known key found for this signature in database
GPG Key ID: 7A4A6121E88E2AD4
1 changed files with 2 additions and 2 deletions

View File

@ -114,7 +114,7 @@ bool Utility::hasLaunchOnStartup(const QString &appName)
@autoreleasepool {
NSFileManager *fileManager = [NSFileManager defaultManager];
NSString *appIdentifier = QCoreApplication::organizationDomain().toNSString();
NSString const *appIdentifier = QCoreApplication::applicationName().toNSString();
NSString *plistFile = [NSHomeDirectory() stringByAppendingFormat:@"/Library/LaunchAgents/%@.plist", appIdentifier];
if ([fileManager fileExistsAtPath:plistFile]) {
@ -187,7 +187,7 @@ void Utility::setLaunchOnStartup(const QString &appName, const QString &guiName,
@autoreleasepool {
NSFileManager *fileManager = [NSFileManager defaultManager];
NSString *fullPath = QCoreApplication::applicationFilePath().toNSString();
NSString *appIdentifier = QCoreApplication::organizationDomain().toNSString();
NSString *const appIdentifier = QCoreApplication::applicationName().toNSString();
NSString *plistFile = [NSHomeDirectory() stringByAppendingFormat:@"/Library/LaunchAgents/%@.plist", appIdentifier];
// An error might occur in the code below, but we cannot report anything, so we just ignore them.