sync with Thunder

This commit is contained in:
2025-11-18 10:10:27 +08:00
parent deac84fe14
commit 4708086e36
65 changed files with 2374 additions and 1024 deletions

View File

@@ -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);

View File

@@ -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);
}
}

View File

@@ -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();

View File

@@ -168,7 +168,7 @@ void DownloadListWidget::httpFinished() // 完成下载
isdownload = false;
isBusy = false;
QtConcurrent::run([=]()
auto future = QtConcurrent::run([=]()
{
while (downloaditemlist[nowDownload - 1]->readyInstall() == -1) // 安装当前应用堵塞安装后面的下载suspend
{