完成V4.8.0支持

This commit is contained in:
shenmo 2025-06-11 22:14:51 +08:00
parent 0964ae5cc7
commit 6ef7bb9e5e
2 changed files with 115 additions and 28 deletions

View File

@ -234,6 +234,9 @@ void AppIntoPage::clear()
ui->tag_debian->hide();
ui->tag_ubuntu->hide();
ui->tag_community->hide();
ui->tag_native->hide();
ui->tag_amber_ce_bookworm->hide();
ui->tag_amber_ce_trixie->hide();
ui->icon->clear();
ui->title->clear();
ui->version->clear();
@ -404,33 +407,17 @@ void AppIntoPage::setAppinfoTags(const QStringList &tagList)
bool deepinSupport = false;
bool uosSupport = false;
bool debianSupport = false;
bool hasAmberTag = false;
foreach (const QString &tag, tagList)
{
if (tag == "community")
if (tag.isEmpty()) {
continue;
}
else if (tag == "community")
{
ui->tag_community->show();
}
else if (tag == "debian")
{
ui->tag_debian->show();
debianSupport = true;
}
else if (tag == "ubuntu")
{
ui->tag_ubuntu->show();
ubuntuSupport = true;
}
else if (tag == "deepin")
{
ui->tag_deepin->show();
deepinSupport = true;
}
else if (tag == "uos")
{
ui->tag_uos->show();
uosSupport = true;
}
else if (tag == "dtk5")
{
ui->tag_dtk5->show();
@ -447,10 +434,53 @@ void AppIntoPage::setAppinfoTags(const QStringList &tagList)
{
ui->tag_a2d->show();
}
else if (tag == "native")
{
ui->tag_native->show();
}
else if (tag == "amber-ce-bookworm")
{
ui->tag_amber_ce_bookworm->show();
hasAmberTag = true;
}
else if (tag == "amber-ce-trixie")
{
ui->tag_amber_ce_trixie->show();
hasAmberTag = true;
}
else if (!hasAmberTag) // Only process distro tags if we haven't found an amber tag
{
if (tag == "debian")
{
ui->tag_debian->show();
debianSupport = true;
}
else if (tag == "ubuntu")
{
ui->tag_ubuntu->show();
ubuntuSupport = true;
}
else if (tag == "deepin")
{
ui->tag_deepin->show();
deepinSupport = true;
}
else if (tag == "uos")
{
ui->tag_uos->show();
uosSupport = true;
}
}
}
if (!hasAmberTag)
{
notifyUserUnsupportedTags(ubuntuSupport, deepinSupport, uosSupport, debianSupport);
}
notifyUserUnsupportedTags(ubuntuSupport, deepinSupport, uosSupport ,debianSupport);
}
void AppIntoPage::notifyUserUnsupportedTags(bool ubuntuSupport, bool deepinSupport, bool uosSupport, bool debianSupport)
{
if (!SettingsPage::needUncompatibleNotification) {

View File

@ -385,8 +385,8 @@
</property>
<property name="sizeHint" stdset="0">
<size>
<width>184</width>
<height>20</height>
<width>20</width>
<height>37</height>
</size>
</property>
</spacer>
@ -467,6 +467,63 @@
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="tag_native">
<property name="maximumSize">
<size>
<width>40</width>
<height>40</height>
</size>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This app can only be installed natively&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This app can only be installed natively&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="pixmap">
<pixmap resource="../assets/assets.qrc">:/tags/native.svg</pixmap>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="tag_amber_ce_bookworm">
<property name="maximumSize">
<size>
<width>40</width>
<height>40</height>
</size>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This app will be installed to debian12 ACE&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This app will be installed to debian12 ACE&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="pixmap">
<pixmap resource="../assets/assets.qrc">:/tags/amber-ce-bookworm.svg</pixmap>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="tag_amber_ce_trixie">
<property name="maximumSize">
<size>
<width>40</width>
<height>40</height>
</size>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This app will be installed to debian13 ACE&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This app will be installed to debian13 ACE&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="pixmap">
<pixmap resource="../assets/assets.qrc">:/tags/amber-ce-trixie.svg</pixmap>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_5">
<property name="orientation">
@ -474,8 +531,8 @@
</property>
<property name="sizeHint" stdset="0">
<size>
<width>184</width>
<height>20</height>
<width>20</width>
<height>37</height>
</size>
</property>
</spacer>
@ -718,7 +775,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>524</width>
<width>482</width>
<height>601</height>
</rect>
</property>