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