mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-09-23 03:22:20 +08:00
adjust: disable os detect in hjhk
This commit is contained in:
parent
c9e77022b1
commit
f515c0ab08
@ -398,47 +398,47 @@ void AppIntoPage::setAppinfoTags(const QStringList &tagList)
|
|||||||
|
|
||||||
void AppIntoPage::notifyUserUnsupportedTags(bool ubuntuSupport, bool deepinSupport, bool uosSupport)
|
void AppIntoPage::notifyUserUnsupportedTags(bool ubuntuSupport, bool deepinSupport, bool uosSupport)
|
||||||
{
|
{
|
||||||
if (!SettingsPage::needUncompatibleNotification) {
|
// if (!SettingsPage::needUncompatibleNotification) {
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
bool isDeepin = Dtk::Core::DSysInfo::productType() == Dtk::Core::DSysInfo::Deepin;
|
// bool isDeepin = Dtk::Core::DSysInfo::productType() == Dtk::Core::DSysInfo::Deepin;
|
||||||
bool isUOS = Dtk::Core::DSysInfo::productType() == Dtk::Core::DSysInfo::Uos;
|
// bool isUOS = Dtk::Core::DSysInfo::productType() == Dtk::Core::DSysInfo::Uos;
|
||||||
bool checkdeepin = (isDeepin && !deepinSupport);
|
// bool checkdeepin = (isDeepin && !deepinSupport);
|
||||||
bool checkuos = (isUOS && !uosSupport);
|
// bool checkuos = (isUOS && !uosSupport);
|
||||||
bool isUbuntu = false;
|
// bool isUbuntu = false;
|
||||||
if (!checkdeepin && !checkuos)
|
// if (!checkdeepin && !checkuos)
|
||||||
{
|
// {
|
||||||
// 检查是否为 ubuntu 系统
|
// // 检查是否为 ubuntu 系统
|
||||||
QFile lsb("/etc/lsb-release");
|
// QFile lsb("/etc/lsb-release");
|
||||||
if (!lsb.open(QIODevice::ReadOnly))
|
// if (!lsb.open(QIODevice::ReadOnly))
|
||||||
{
|
// {
|
||||||
qDebug() << "打开 /etc/lsb-release 失败";
|
// qDebug() << "打开 /etc/lsb-release 失败";
|
||||||
}
|
// }
|
||||||
else if (lsb.readAll().contains("Ubuntu"))
|
// else if (lsb.readAll().contains("Ubuntu"))
|
||||||
{
|
// {
|
||||||
isUbuntu = true;
|
// isUbuntu = true;
|
||||||
lsb.close();
|
// lsb.close();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
bool checkubuntu = (isUbuntu && !ubuntuSupport);
|
// bool checkubuntu = (isUbuntu && !ubuntuSupport);
|
||||||
|
|
||||||
if (checkdeepin)
|
// if (checkdeepin)
|
||||||
{
|
// {
|
||||||
Utils::sendNotification("spark-store", tr("Warning"), tr("The current application does not support deepin, there may be problems"));
|
// Utils::sendNotification("spark-store", tr("Warning"), tr("The current application does not support deepin, there may be problems"));
|
||||||
}
|
// }
|
||||||
else if (checkuos)
|
// else if (checkuos)
|
||||||
{
|
// {
|
||||||
Utils::sendNotification("spark-store", tr("Warning"), tr("The current application does not support UOS, there may be problems"));
|
// Utils::sendNotification("spark-store", tr("Warning"), tr("The current application does not support UOS, there may be problems"));
|
||||||
}
|
// }
|
||||||
else if (checkubuntu)
|
// else if (checkubuntu)
|
||||||
{
|
// {
|
||||||
Utils::sendNotification("spark-store", tr("Warning"), tr("The current application does not support Ubuntu, there may be problems"));
|
// Utils::sendNotification("spark-store", tr("Warning"), tr("The current application does not support Ubuntu, there may be problems"));
|
||||||
}
|
// }
|
||||||
else if (!isUbuntu && !isDeepin && !isUOS)
|
// else if (!isUbuntu && !isDeepin && !isUOS)
|
||||||
{
|
// {
|
||||||
Utils::sendNotification("spark-store", tr("Warning"), tr("The current application does not support current platform, there may be problems"));
|
// Utils::sendNotification("spark-store", tr("Warning"), tr("The current application does not support current platform, there may be problems"));
|
||||||
}
|
// }
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user