[graphics/kphotoalbum/remove_workaround] ImportExport: Remove workaround - KZip fix is now released.
Randall Rude <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 931f9ff89f8762999b6d527aeff8ede75a267000 by Randall Rude. Committed on 15/08/2026 at 16:16. Pushed by rsquared into branch 'remove_workaround'. Remove workaround - KZip fix is now released. M +5 -31 ImportExport/Export.cpp M +3 -4 ImportExport/Export.h https://invent.kde.org/graphics/kphotoalbum/-/commit/931f9ff89f8762999b6d527aeff8ede75a267000 diff --git a/ImportExport/Export.cpp b/ImportExport/Export.cpp index e06ec3369..b3878f733 100644 --- a/ImportExport/Export.cpp +++ b/ImportExport/Export.cpp @@ -13,12 +13,13 @@ // SPDX-FileCopyrightText: 2016 - 2019 Tobias Leupold <[email protected]> // SPDX-FileCopyrightText: 2018 Antoni Bella Pérez <[email protected]> // SPDX-FileCopyrightText: 2018 Yuri Chornoivan <[email protected]> -// SPDX-FileCopyrightText: 2025 Randall Rude <[email protected]> +// SPDX-FileCopyrightText: 2025 - 2026 Randall Rude <[email protected]> // // SPDX-License-Identifier: GPL-2.0-or-later #include "Export.h" +#include "Logging.h" #include "XMLHandler.h" #include <DB/ImageDB.h> @@ -29,7 +30,6 @@ #include <kpabase/FileNameList.h> #include <kpabase/FileNameUtil.h> #include <kpabase/FileUtil.h> -#include <kpabase/Logging.h> #include <KConfigGroup> #include <KHelpClient> @@ -62,18 +62,7 @@ bool isRAW(const DB::FileName &fileName) void Export::imageExport(const DB::FileNameList &list) { - quint64 totalSize = 0; - for (const auto &fileName : list) { - const auto fileInfo = QFileInfo(fileName.absolute()); - const auto size = fileInfo.size(); - if (size == 0) { - qCWarning(ImageManagerLog) << "Can't determine size for" - << fileName.relative(); - } - totalSize += size; - } - - ExportConfig config(list.size(), totalSize); + ExportConfig config(list.size()); if (config.exec() == QDialog::Rejected) return; @@ -100,7 +89,7 @@ void Export::imageExport(const DB::FileNameList &list) } // PENDING(blackie) add warning if images are to be copied into a non empty directory. -ExportConfig::ExportConfig(qsizetype numberOfFiles, quint64 totalSizeInBytes) +ExportConfig::ExportConfig(qsizetype numberOfFiles) { setWindowTitle(i18nc("@title:window", "Export Metadata / Copy Files")); QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::Help); @@ -115,7 +104,7 @@ ExportConfig::ExportConfig(qsizetype numberOfFiles, quint64 totalSizeInBytes) QVBoxLayout *lay1 = new QVBoxLayout(top); // Include images - QGroupBox *grp = new QGroupBox(i18n("How to export %1 files", numberOfFiles)); + QGroupBox *grp = new QGroupBox(i18np("How do you want to export one file?", "How do you want to export %1 files?", numberOfFiles)); lay1->addWidget(grp); QVBoxLayout *boxLay = new QVBoxLayout(grp); @@ -132,21 +121,6 @@ ExportConfig::ExportConfig(qsizetype numberOfFiles, quint64 totalSizeInBytes) boxLay->addWidget(m_link); boxLay->addWidget(m_symlink); - // KZip silently creates an broken zip file if the zip file size exceeds - // 4GB. This limit prevents the user from exporting a broken zip file. - // We can't predict the zip file size without creating it so keep the limit - // lower than 4GB. - const quint64 MAX_INLINE_BYTES = 4ULL * 1024 * 1024 * 1024 - // 4 GB - 100 * 1024 * 1024; // 100 MB - - qCWarning(ImageManagerLog) << "totalSizeInBytes=" << totalSizeInBytes - << "MAX_INLINE_BYTES=" << MAX_INLINE_BYTES; - - if (totalSizeInBytes > MAX_INLINE_BYTES) { - m_include->setEnabled(false); - m_include->setToolTip(i18n("The exported files are too large to fit in the .kim file.")); - } - // Compress mp_compress = new QCheckBox(i18n("Compress export file"), top); lay1->addWidget(mp_compress); diff --git a/ImportExport/Export.h b/ImportExport/Export.h index efbe67967..afba9e046 100644 --- a/ImportExport/Export.h +++ b/ImportExport/Export.h @@ -1,6 +1,6 @@ -// SPDX-FileCopyrightText: 2003-2010 Jesper K. Pedersen <[email protected]> +// SPDX-FileCopyrightText: 2003 - 2010 Jesper K. Pedersen <[email protected]> // SPDX-FileCopyrightText: 2022 Johannes Zarl-Zierl <[email protected]> -// SPDX-FileCopyrightText: 2025 Randall Rude <[email protected]> +// SPDX-FileCopyrightText: 2025 - 2026 Randall Rude <[email protected]> // // SPDX-License-Identifier: GPL-2.0-or-later @@ -80,9 +80,8 @@ class ExportConfig : public QDialog public: /** * @param numberOfFiles is the number of media files to export - * @param totalSizeInBytes is the combined size of the media files */ - ExportConfig(qsizetype numberOfFiles, quint64 totalSizeInBytes); + ExportConfig(qsizetype numberOfFiles); QCheckBox *mp_compress; QCheckBox *mp_generateThumbnails; QCheckBox *mp_enforeMaxSize;