mirror of
https://github.com/itay-grudev/SingleApplication.git
synced 2025-01-15 08:52:08 +08:00
Style and explanation improvements
This commit is contained in:
parent
a30128bef2
commit
6aa2d348e5
@ -147,12 +147,12 @@ void SingleApplicationPrivate::genBlockServerName()
|
|||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
appData.addData( SingleApplication::app_t::applicationFilePath().toLower().toUtf8() );
|
appData.addData( SingleApplication::app_t::applicationFilePath().toLower().toUtf8() );
|
||||||
#else
|
#else
|
||||||
|
// If the application is running as an AppImage then the APPIMAGE env var should be used
|
||||||
|
// instead of applicationPath() as each instance is launched with its own executable path
|
||||||
const QByteArray appImagePath = qgetenv( "APPIMAGE" );
|
const QByteArray appImagePath = qgetenv( "APPIMAGE" );
|
||||||
if ( appImagePath.isEmpty() ) {
|
if( appImagePath.isEmpty() ){ // Not running as AppImage: use path to executable file
|
||||||
// Not running as AppImage: use path to executable file
|
|
||||||
appData.addData( SingleApplication::app_t::applicationFilePath().toUtf8() );
|
appData.addData( SingleApplication::app_t::applicationFilePath().toUtf8() );
|
||||||
} else {
|
} else { // Running as AppImage: Use absolute path to AppImage file
|
||||||
// Running as AppImage: Use absolute path to AppImage file
|
|
||||||
appData.addData( appImagePath );
|
appData.addData( appImagePath );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user