mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-10-25 11:42:20 +08:00
Merge branch 'dev' of gitee.com:deepin-community-store/spark-store into dev
This commit is contained in:
commit
d5248f4c1b
@ -71,12 +71,11 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
// Check UOS developer mode.
|
// Check UOS developer mode.
|
||||||
QFile UOSDevelopFile(UOSCheckFile);
|
QFile UOSDevelopFile(UOSCheckFile);
|
||||||
if (UOSDevelopFile.exists() && isDeepinOS)
|
if (isDeepinOS && UOSDevelopFile.exists() && UOSDevelopFile.open(QFile::ReadOnly | QFile::Text))
|
||||||
{
|
{
|
||||||
config.setValue("UOS/isUOS", true);
|
config.setValue("UOS/isUOS", true);
|
||||||
QTextStream UOStextStream(&UOSDevelopFile);
|
QString lineData = UOSDevelopFile.readLine();
|
||||||
QString lineData = UOStextStream.readLine();
|
bool devmode = lineData.trimmed().toInt();
|
||||||
bool devmode = lineData.toInt();
|
|
||||||
qDebug() << "UOS Developer Mode Status:" << devmode;
|
qDebug() << "UOS Developer Mode Status:" << devmode;
|
||||||
config.setValue("UOS/EnableDeveloperMode", devmode);
|
config.setValue("UOS/EnableDeveloperMode", devmode);
|
||||||
}
|
}
|
||||||
@ -88,6 +87,7 @@ int main(int argc, char *argv[])
|
|||||||
config.remove("UOS/EnableDeveloperMode");
|
config.remove("UOS/EnableDeveloperMode");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
UOSDevelopFile.close();
|
||||||
config.sync(); // 写入更改至 config.ini,并同步最新内容
|
config.sync(); // 写入更改至 config.ini,并同步最新内容
|
||||||
|
|
||||||
// 龙芯机器配置,使得 DApplication 能正确加载 QTWEBENGINE
|
// 龙芯机器配置,使得 DApplication 能正确加载 QTWEBENGINE
|
||||||
|
|||||||
@ -363,7 +363,7 @@ void AppIntoPage::on_pushButton_3_clicked()
|
|||||||
|
|
||||||
if (check.readAllStandardOutput().isEmpty())
|
if (check.readAllStandardOutput().isEmpty())
|
||||||
{
|
{
|
||||||
ui->downloadButton->setText(tr("Install"));
|
ui->downloadButton->setText(tr("Download"));
|
||||||
ui->pushButton_3->hide();
|
ui->pushButton_3->hide();
|
||||||
|
|
||||||
updatesEnabled();
|
updatesEnabled();
|
||||||
@ -386,11 +386,11 @@ void AppIntoPage::on_shareButton_clicked()
|
|||||||
void AppIntoPage::on_updateButton_clicked()
|
void AppIntoPage::on_updateButton_clicked()
|
||||||
{
|
{
|
||||||
QString feedbackSpk = "spk://store/chat/store.spark-app.feedback";
|
QString feedbackSpk = "spk://store/chat/store.spark-app.feedback";
|
||||||
QFile actionSubmissionClientStatus("/opt/durapps/store.spark-app.feedback");
|
QFileInfo actionSubmissionClientStatus("/opt/durapps/store.spark-app.feedback");
|
||||||
if (actionSubmissionClientStatus.exists())
|
if (actionSubmissionClientStatus.exists() && actionSubmissionClientStatus.isDir())
|
||||||
{
|
{
|
||||||
qDebug() << "反馈器存在";
|
qDebug() << "反馈器存在";
|
||||||
QProcess::startDetached("sh /opt/durapps/store.spark-app.feedback/launch.sh", QStringList());
|
QProcess::startDetached("sh", QStringList() << "/opt/durapps/store.spark-app.feedback/launch.sh");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -22,6 +22,8 @@ DownloadItem::DownloadItem(QWidget *parent) : QWidget(parent),
|
|||||||
ui->pushButton_3->hide();
|
ui->pushButton_3->hide();
|
||||||
ui->widget_spinner->start();
|
ui->widget_spinner->start();
|
||||||
ui->widget_spinner->hide();
|
ui->widget_spinner->hide();
|
||||||
|
|
||||||
|
ui->label->setElideMode(Qt::TextElideMode::ElideRight);
|
||||||
}
|
}
|
||||||
|
|
||||||
DownloadItem::~DownloadItem()
|
DownloadItem::~DownloadItem()
|
||||||
@ -48,6 +50,7 @@ void DownloadItem::setMax(qint64 max)
|
|||||||
void DownloadItem::setName(QString name)
|
void DownloadItem::setName(QString name)
|
||||||
{
|
{
|
||||||
ui->label->setText(name);
|
ui->label->setText(name);
|
||||||
|
ui->label->setToolTip(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString DownloadItem::getName()
|
QString DownloadItem::getName()
|
||||||
|
|||||||
@ -7,13 +7,25 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>666</width>
|
<width>666</width>
|
||||||
<height>54</height>
|
<height>56</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>56</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>16777215</width>
|
<width>16777215</width>
|
||||||
<height>54</height>
|
<height>56</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -40,10 +52,22 @@
|
|||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_3">
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>48</width>
|
||||||
|
<height>48</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>48</width>
|
<width>48</width>
|
||||||
<height>16777215</height>
|
<height>48</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -52,6 +76,9 @@
|
|||||||
<property name="scaledContents">
|
<property name="scaledContents">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -70,6 +97,31 @@
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="DLabel" name="label">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>80</width>
|
||||||
|
<height>48</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>120</width>
|
||||||
|
<height>48</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Name</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_filename">
|
<widget class="QLabel" name="label_filename">
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
@ -83,33 +135,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>80</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>13</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Name</string>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer_2">
|
<spacer name="horizontalSpacer_2">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
@ -153,11 +178,14 @@
|
|||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>8</number>
|
||||||
|
</property>
|
||||||
<property name="rightMargin">
|
<property name="rightMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="bottomMargin">
|
<property name="bottomMargin">
|
||||||
<number>0</number>
|
<number>8</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QProgressBar" name="progressBar">
|
<widget class="QProgressBar" name="progressBar">
|
||||||
@ -297,6 +325,11 @@
|
|||||||
<header location="global">dspinner.h</header>
|
<header location="global">dspinner.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>DLabel</class>
|
||||||
|
<extends>QLabel</extends>
|
||||||
|
<header>dlabel.h</header>
|
||||||
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
|||||||
@ -91,7 +91,7 @@ void DownloadListWidget::addItem(QString name, QString fileName, QString pkgName
|
|||||||
di->pkgName = pkgName;
|
di->pkgName = pkgName;
|
||||||
di->seticon(icon);
|
di->seticon(icon);
|
||||||
QListWidgetItem *pItem = new QListWidgetItem();
|
QListWidgetItem *pItem = new QListWidgetItem();
|
||||||
pItem->setSizeHint(QSize(240, 50));
|
pItem->setSizeHint(QSize(240, 56)); // ui 中单个 downloaditem 高度固定 56px(上下 margin 8px,图片固定 48x48)
|
||||||
ui->listWidget->addItem(pItem);
|
ui->listWidget->addItem(pItem);
|
||||||
ui->listWidget->setItemWidget(pItem, di);
|
ui->listWidget->setItemWidget(pItem, di);
|
||||||
if (!isBusy)
|
if (!isBusy)
|
||||||
|
|||||||
@ -85,7 +85,7 @@ QListWidget::item::selected
|
|||||||
}</string>
|
}</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
<enum>QFrame::StyledPanel</enum>
|
<enum>QFrame::NoFrame</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="verticalScrollBarPolicy">
|
<property name="verticalScrollBarPolicy">
|
||||||
<enum>Qt::ScrollBarAsNeeded</enum>
|
<enum>Qt::ScrollBarAsNeeded</enum>
|
||||||
@ -99,9 +99,15 @@ QListWidget::item::selected
|
|||||||
<property name="autoScrollMargin">
|
<property name="autoScrollMargin">
|
||||||
<number>10</number>
|
<number>10</number>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="editTriggers">
|
||||||
|
<set>QAbstractItemView::NoEditTriggers</set>
|
||||||
|
</property>
|
||||||
<property name="resizeMode">
|
<property name="resizeMode">
|
||||||
<enum>QListView::Fixed</enum>
|
<enum>QListView::Fixed</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="spacing">
|
||||||
|
<number>4</number>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user