mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-18 10:01:38 +08:00
sync with Thunder
This commit is contained in:
@@ -17,7 +17,7 @@ big_image::big_image(DBlurEffectWidget *parent) : DBlurEffectWidget(parent),
|
||||
QHBoxLayout *layout = new QHBoxLayout;
|
||||
setLayout(layout);
|
||||
layout->addWidget(m_image);
|
||||
layout->setMargin(0);
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
// Make sure the image has a parent so that it will be freed.
|
||||
m_image->setParent(this);
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
#include "customlabel.h"
|
||||
|
||||
#include <QGuiApplication>
|
||||
|
||||
CustomLabel::CustomLabel(QWidget *parent, Qt::WindowFlags f)
|
||||
CustomLabel::CustomLabel(QWidget *parent,
|
||||
Qt::WindowFlags f)
|
||||
: QLabel(parent, f)
|
||||
{
|
||||
}
|
||||
|
||||
QPixmap CustomLabel::pixmap() const
|
||||
{
|
||||
const QPixmap *p = QLabel::pixmap();
|
||||
const QPixmap* p = QLabel::pixmap();
|
||||
return p ? *p : QPixmap();
|
||||
}
|
||||
|
||||
@@ -21,4 +23,4 @@ void CustomLabel::setPixmap(const QPixmap &pixmap)
|
||||
Qt::SmoothTransformation);
|
||||
|
||||
QLabel::setPixmap(_pixmap);
|
||||
}
|
||||
}
|
||||
@@ -125,7 +125,7 @@ void DownloadItem::install(int t)
|
||||
ui->label_2->setText(tr("Installing"));
|
||||
ui->label_2->setToolTip(tr("Installing"));
|
||||
|
||||
QtConcurrent::run([=]()
|
||||
auto future = QtConcurrent::run([=]()
|
||||
{
|
||||
slotAsyncInstall(t);
|
||||
});
|
||||
@@ -158,7 +158,7 @@ void DownloadItem::on_pushButton_3_clicked()
|
||||
output_w->setMinimumHeight(600);
|
||||
output_w->setAttribute(Qt::WA_TranslucentBackground);
|
||||
output_w->setTitle(ui->label->text());
|
||||
output_w->layout()->setMargin(20);
|
||||
output_w->layout()->setContentsMargins(20, 20, 20, 20);
|
||||
output_w->layout()->addWidget(textbrowser);
|
||||
output_w->show();
|
||||
}
|
||||
@@ -216,7 +216,7 @@ void DownloadItem::slotAsyncInstall(int t)
|
||||
}
|
||||
}
|
||||
|
||||
// QProcess isInstall;
|
||||
QProcess isInstall;
|
||||
// isInstall.start("dpkg", QStringList() << "-s" << pkgName);
|
||||
// isInstall.waitForFinished(180 * 1000); // 默认超时 3 分钟
|
||||
// int error = QString::fromStdString(isInstall.readAllStandardError().toStdString()).length();
|
||||
|
||||
@@ -168,7 +168,7 @@ void DownloadListWidget::httpFinished() // 完成下载
|
||||
isdownload = false;
|
||||
isBusy = false;
|
||||
|
||||
QtConcurrent::run([=]()
|
||||
auto future = QtConcurrent::run([=]()
|
||||
{
|
||||
while (downloaditemlist[nowDownload - 1]->readyInstall() == -1) // 安装当前应用,堵塞安装,后面的下载suspend
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user