mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-07-16 10:32:21 +08:00
回退 'Pull Request !218 : 添加对LingmoOS的支持'
This commit is contained in:
parent
b715f1c54b
commit
5cf8b587ee
@ -85,8 +85,6 @@ QString tags=json["Tags"].toString(); //Read the Tags
|
||||
ui->tag_community->show();//Tags icon shows like this
|
||||
if(tagList[i]=="ubuntu")
|
||||
ui->tag_ubuntu->show();
|
||||
if(tagList[i]=="ubuntu")
|
||||
ui->tag_ubuntu->show();
|
||||
if(tagList[i]=="deepin")
|
||||
ui->tag_deepin->show();
|
||||
if(tagList[i]=="uos")
|
||||
|
@ -45,7 +45,7 @@ sudo apt install git qt5-default debhelper pkg-config qtchooser libqt5core5a lib
|
||||
|
||||
```
|
||||
|
||||
Debian 11.x/Lingmo OS/Ubuntu 22.04 系统下, 安装依赖
|
||||
Ubuntu 22.04 系统下, 安装依赖
|
||||
```shell
|
||||
sudo apt install git qtbase5-dev debhelper pkg-config qtchooser libqt5core5a libqt5gui5 libqt5widgets5 libqt5network5 libqt5concurrent5 libdtkcore-dev libdtkgui-dev libdtkwidget-dev qttools5-private-dev libnotify-dev qtwebengine5-dev qtwayland5 qtwayland5-dev-tools libqt5svg5*
|
||||
|
||||
|
@ -59,8 +59,6 @@
|
||||
<file>tags/logo_icon.svg</file>
|
||||
<file>tags/ubuntu-small.png</file>
|
||||
<file>tags/ubuntu.png</file>
|
||||
<file>tags/lingmo-small.png</file>
|
||||
<file>tags/lingmo.png</file>
|
||||
<file>tags/uos-authorize.svg</file>
|
||||
<file>tags/uos-small.png</file>
|
||||
<file>tags/uos.svg</file>
|
||||
|
Binary file not shown.
Before ![]() (image error) Size: 10 KiB |
Binary file not shown.
Before ![]() (image error) Size: 26 KiB |
@ -196,7 +196,6 @@ void AppIntoPage::clear()
|
||||
ui->tag_dwine2->hide();
|
||||
ui->tag_dwine5->hide();
|
||||
ui->tag_ubuntu->hide();
|
||||
// ui->tag_lingmo->hide();
|
||||
ui->tag_community->hide();
|
||||
ui->icon->clear();
|
||||
ui->title->clear();
|
||||
@ -335,7 +334,6 @@ void AppIntoPage::isDownloading(const QUrl &url)
|
||||
void AppIntoPage::setAppinfoTags(const QStringList &tagList)
|
||||
{
|
||||
bool ubuntuSupport = false;
|
||||
bool lingmoSupport = false;
|
||||
bool deepinSupport = false;
|
||||
bool uosSupport = false;
|
||||
foreach (const QString &tag, tagList)
|
||||
@ -349,11 +347,6 @@ 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 == "deepin")
|
||||
{
|
||||
ui->tag_deepin->show();
|
||||
@ -382,54 +375,31 @@ void AppIntoPage::setAppinfoTags(const QStringList &tagList)
|
||||
ui->tag_a2d->show();
|
||||
}
|
||||
}
|
||||
notifyUserUnsupportedTags(ubuntuSupport, lingmoSupport, deepinSupport, uosSupport);
|
||||
notifyUserUnsupportedTags(ubuntuSupport, deepinSupport, uosSupport);
|
||||
}
|
||||
|
||||
void AppIntoPage::notifyUserUnsupportedTags(bool ubuntuSupport, bool lingmoSupport, bool deepinSupport, bool uosSupport)
|
||||
void AppIntoPage::notifyUserUnsupportedTags(bool ubuntuSupport, bool deepinSupport, bool uosSupport)
|
||||
{
|
||||
bool isDeepin = Dtk::Core::DSysInfo::productType() == Dtk::Core::DSysInfo::Deepin;
|
||||
bool isUOS = Dtk::Core::DSysInfo::productType() == Dtk::Core::DSysInfo::Uos;
|
||||
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)
|
||||
{
|
||||
// 检查是否为 ubuntu 或LingmoOS
|
||||
// 检查是否为 ubuntu 系统
|
||||
QFile lsb("/etc/lsb-release");
|
||||
if (!lsb.open(QIODevice::ReadOnly))
|
||||
{
|
||||
qDebug() << "打开 /etc/lsb-release 失败";
|
||||
}
|
||||
else if (lsb.readAll().contains("Lingmo"))
|
||||
{
|
||||
isUbuntu = true;
|
||||
lsb.close();
|
||||
}
|
||||
else if (lsb.readAll().contains("Ubuntu"))
|
||||
{
|
||||
isUbuntu = true;
|
||||
lsb.close();
|
||||
}
|
||||
}
|
||||
bool checkubuntu = (isUbuntu && !ubuntuSupport && !isLingmo && lingmoSupport);
|
||||
bool checkubuntu = (isUbuntu && !ubuntuSupport);
|
||||
|
||||
if (checkdeepin)
|
||||
{
|
||||
@ -441,12 +411,8 @@ void AppIntoPage::notifyUserUnsupportedTags(bool ubuntuSupport, bool lingmoSuppo
|
||||
}
|
||||
else if (checkubuntu)
|
||||
{
|
||||
Utils::sendNotification("spark-store", tr("Warning"), tr("The current application does not support Ubuntu or LingmoOS, there may be problems"));
|
||||
Utils::sendNotification("spark-store", tr("Warning"), tr("The current application does not support Ubuntu, 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 && !isDeepin && !isUOS)
|
||||
{
|
||||
Utils::sendNotification("spark-store", tr("Warning"), tr("The current application does not support current platform, there may be problems"));
|
||||
|
@ -29,7 +29,7 @@ private:
|
||||
void initConnections();
|
||||
void isDownloading(const QUrl &url);
|
||||
void setAppinfoTags(const QStringList &tagList);
|
||||
void notifyUserUnsupportedTags(bool ubuntuSupport, bool lingmoSupport, bool deepinSupport, bool uosSupport);
|
||||
void notifyUserUnsupportedTags(bool ubuntuSupport, bool deepinSupport, bool uosSupport);
|
||||
|
||||
signals:
|
||||
void clickedDownloadBtn();
|
||||
|
@ -436,25 +436,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="tag_ubuntu">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Capable to Lingmo OS</p></body></html></string>
|
||||
</property>
|
||||
<property name="whatsThis">
|
||||
<string><html><head/><body><p>Capable to Lingmo OS</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><html><head/><body><p><img src=":/tags/lingmo-small.png"/></p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="tag_uos">
|
||||
<property name="maximumSize">
|
||||
|
@ -47,12 +47,6 @@
|
||||
<source><html><head/><body><p><img src=":/tags/ubuntu-small.png"/></p></body></html></source>
|
||||
<translation type="unfinished"></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 type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/pages/appintopage.ui" line="448"/>
|
||||
<location filename="../src/pages/appintopage.ui" line="451"/>
|
||||
|
@ -47,12 +47,6 @@
|
||||
<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"/>
|
||||
|
@ -47,12 +47,6 @@
|
||||
<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"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user