detect recovery devices, cleanup code , use const pointers wherever possible, refactor img thumbnail loading, refactor gallery widget

This commit is contained in:
uncor3
2026-03-02 23:25:06 +00:00
parent df0f0f32a7
commit 35c5985f47
64 changed files with 1490 additions and 1260 deletions
+3 -15
View File
@@ -31,11 +31,8 @@
#include <QUrl>
#include <qrencode.h>
PhotoImportDialog::PhotoImportDialog(const QStringList &files,
bool hasDirectories, QWidget *parent)
: QDialog(parent), selectedFiles(files),
containsDirectories(hasDirectories), m_httpServer(nullptr),
m_mediaPlayer(nullptr)
PhotoImportDialog::PhotoImportDialog(const QStringList &files, QWidget *parent)
: QDialog(parent), selectedFiles(files)
{
setupUI();
setModal(true);
@@ -59,16 +56,6 @@ void PhotoImportDialog::setupUI()
{
QVBoxLayout *mainLayout = new QVBoxLayout(this);
// Warning label for directories
if (containsDirectories) {
warningLabel =
new QLabel("⚠️ Warning: Selected items contain directories. All "
"gallery-compatible files will be included.",
this);
warningLabel->setWordWrap(true);
mainLayout->addWidget(warningLabel);
}
// File list
QLabel *listLabel = new QLabel(
QString("Files to be served (%1 items):").arg(selectedFiles.size()),
@@ -230,6 +217,7 @@ void PhotoImportDialog::onServerStarted()
void PhotoImportDialog::onDownloadProgress(const QString &fileName,
int bytesDownloaded, int totalBytes)
{
// TODO: bring in a progress bar each item
m_progressLabel->setText(QString("Downloaded: %1 (%2 KB)")
.arg(fileName)
.arg(bytesDownloaded / 1024));