fix: AppId gets error

AppId gets error when DTK_DISABLED_FALLBACK_APPID is set.

Log: 获取AppId时fallback错误
Influence: none
Change-Id: I27007980d0c95cdfce30b40fcb27a5f64e5eac08
This commit is contained in:
Ye ShanShan 2022-07-12 13:21:12 +08:00
parent 4fb186d57d
commit c313f308ea
1 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,7 @@ static inline QByteArray getSelfAppId() {
if (!selfId.isEmpty())
return selfId;
selfId = DSGApplication::getId(QCoreApplication::applicationPid());
if (!qEnvironmentVariableIsSet("DTK_DISABLED_FALLBACK_APPID")) {
if (selfId.isEmpty() && !qEnvironmentVariableIsSet("DTK_DISABLED_FALLBACK_APPID")) {
selfId = QCoreApplication::applicationName().toLocal8Bit();
}
Q_ASSERT(!selfId.isEmpty());