添加LingmoOS适配
This commit is contained in:
parent
0edf87c95c
commit
7513667c6e
|
@ -196,7 +196,7 @@ void AppIntoPage::clear()
|
|||
ui->tag_dwine2->hide();
|
||||
ui->tag_dwine5->hide();
|
||||
ui->tag_ubuntu->hide();
|
||||
ui->tag_lingmo->hide();
|
||||
// ui->tag_lingmo->hide();
|
||||
ui->tag_community->hide();
|
||||
ui->icon->clear();
|
||||
ui->title->clear();
|
||||
|
@ -349,11 +349,11 @@ void AppIntoPage::setAppinfoTags(const QStringList &tagList)
|
|||
ui->tag_ubuntu->show();
|
||||
ubuntuSupport = true;
|
||||
}
|
||||
else if (tag == "lingmo")
|
||||
{
|
||||
ui->tag_lingmo->show();
|
||||
lingmoSupport = true;
|
||||
}
|
||||
// else if (tag == "lingmo")
|
||||
// {
|
||||
// ui->tag_lingmo->show();
|
||||
// lingmoSupport = true;
|
||||
// }
|
||||
else if (tag == "deepin")
|
||||
{
|
||||
ui->tag_deepin->show();
|
||||
|
@ -392,39 +392,44 @@ void AppIntoPage::notifyUserUnsupportedTags(bool ubuntuSupport, bool lingmoSuppo
|
|||
bool checkdeepin = (isDeepin && !deepinSupport);
|
||||
bool checkuos = (isUOS && !uosSupport);
|
||||
bool isLingmo = false;
|
||||
// if (!checkdeepin && !checkuos)
|
||||
// {
|
||||
// // 检查是否为 Lingmo OS
|
||||
// QFile lsb("/etc/lsb-release");
|
||||
// //由于LingmoOS没有lsb-release,所以创建一个lsb,只供星火商店检测。
|
||||
// if (!lsb.open(QIODevice::ReadOnly))
|
||||
// {
|
||||
// qDebug() << "打开 /etc/lsb-release 失败";
|
||||
// }
|
||||
// else if (lsb.readAll().contains("Lingmo"))
|
||||
// {
|
||||
// isLingmo = true;
|
||||
// lsb.close();
|
||||
// }
|
||||
// }
|
||||
// bool checklingmo = (isLingmo && !lingmoSupport);
|
||||
|
||||
bool isUbuntu = false;
|
||||
if (!checkdeepin && !checkuos)
|
||||
{
|
||||
// 检查是否为 Lingmo OS
|
||||
// 检查是否为 ubuntu 或LingmoOS
|
||||
QFile lsb("/etc/lsb-release");
|
||||
//由于LingmoOS没有lsb-release,所以创建一个lsb,只供星火商店检测。
|
||||
if (!lsb.open(QIODevice::ReadOnly))
|
||||
{
|
||||
qDebug() << "打开 /etc/lsb-release 失败";
|
||||
}
|
||||
else if (lsb.readAll().contains("Lingmo"))
|
||||
{
|
||||
isLingmo = true;
|
||||
isUbuntu = true;
|
||||
lsb.close();
|
||||
}
|
||||
}
|
||||
bool checklingmo = (isLingmo && !lingmoSupport);
|
||||
|
||||
bool isUbuntu = false;
|
||||
if (!checkdeepin && !checkuos)
|
||||
{
|
||||
// 检查是否为 ubuntu 系统
|
||||
QFile lsb("/etc/lsb-release");
|
||||
if (!lsb.open(QIODevice::ReadOnly))
|
||||
{
|
||||
qDebug() << "打开 /etc/lsb-release 失败";
|
||||
}
|
||||
else if (lsb.readAll().contains("Ubuntu"))
|
||||
{
|
||||
isUbuntu = true;
|
||||
lsb.close();
|
||||
}
|
||||
}
|
||||
bool checkubuntu = (isUbuntu && !ubuntuSupport);
|
||||
bool checkubuntu = (isUbuntu && !ubuntuSupport && !isLingmo && lingmoSupport);
|
||||
|
||||
if (checkdeepin)
|
||||
{
|
||||
|
@ -436,13 +441,13 @@ void AppIntoPage::notifyUserUnsupportedTags(bool ubuntuSupport, bool lingmoSuppo
|
|||
}
|
||||
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 or LingmoOS, there may be problems"));
|
||||
}
|
||||
else if (checklingmo)
|
||||
{
|
||||
Utils::sendNotification("spark-store", tr("Warning"), tr("The current application does not support LingmoOS, there may be problems"));
|
||||
}
|
||||
else if (!isUbuntu && !isLingmo && !isDeepin && !isUOS)
|
||||
// else if (checklingmo)
|
||||
// {
|
||||
// Utils::sendNotification("spark-store", tr("Warning"), tr("The current application does not support LingmoOS, there may be problems"));
|
||||
// }
|
||||
else if (!isUbuntu && !isDeepin && !isUOS)
|
||||
{
|
||||
Utils::sendNotification("spark-store", tr("Warning"), tr("The current application does not support current platform, there may be problems"));
|
||||
}
|
||||
|
|
|
@ -437,7 +437,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="tag_lingmo">
|
||||
<widget class="QLabel" name="tag_ubuntu">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
|
|
|
@ -47,12 +47,12 @@
|
|||
<source><html><head/><body><p><img src=":/tags/ubuntu-small.png"/></p></body></html></source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.ui" line="448"/>
|
||||
<Location filename="../src/pages/appintopage.ui" line="451"/>
|
||||
<source><html><head/><body><p>Capable to Lingmo OS</p></body></html></source>
|
||||
<translation><html><head/><body><p>支持 Lingmo OS</p></body></html></translation>
|
||||
</message>
|
||||
// <message>
|
||||
// <location filename="../src/pages/appintopage.ui" line="448"/>
|
||||
// <Location filename="../src/pages/appintopage.ui" line="451"/>
|
||||
// <source><html><head/><body><p>Capable to Lingmo OS</p></body></html></source>
|
||||
// <translation><html><head/><body><p>支持 Lingmo OS</p></body></html></translation>
|
||||
// </message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.ui" line="448"/>
|
||||
<location filename="../src/pages/appintopage.ui" line="451"/>
|
||||
|
|
Loading…
Reference in New Issue