Changeset View
Changeset View
Standalone View
Standalone View
part/part.cpp
Show First 20 Lines • Show All 1329 Lines • ▼ Show 20 Line(s) | |||||
1330 | void Part::slotAddFiles() | 1330 | void Part::slotAddFiles() | ||
1331 | { | 1331 | { | ||
1332 | // If compression options are already set, we don't use the values from CreateDialog. | 1332 | // If compression options are already set, we don't use the values from CreateDialog. | ||
1333 | CompressionOptions opts; | 1333 | CompressionOptions opts; | ||
1334 | if (m_model->archive()->compressionOptions().isEmpty()) { | 1334 | if (m_model->archive()->compressionOptions().isEmpty()) { | ||
1335 | if (arguments().metaData().contains(QStringLiteral("compressionLevel"))) { | 1335 | if (arguments().metaData().contains(QStringLiteral("compressionLevel"))) { | ||
1336 | opts[QStringLiteral("CompressionLevel")] = arguments().metaData()[QStringLiteral("compressionLevel")]; | 1336 | opts[QStringLiteral("CompressionLevel")] = arguments().metaData()[QStringLiteral("compressionLevel")]; | ||
1337 | } | 1337 | } | ||
1338 | if (arguments().metaData().contains(QStringLiteral("compressionMethod"))) { | ||||
1339 | opts[QStringLiteral("CompressionMethod")] = arguments().metaData()[QStringLiteral("compressionMethod")]; | ||||
1340 | } | ||||
1338 | if (arguments().metaData().contains(QStringLiteral("volumeSize"))) { | 1341 | if (arguments().metaData().contains(QStringLiteral("volumeSize"))) { | ||
1339 | opts[QStringLiteral("VolumeSize")] = arguments().metaData()[QStringLiteral("volumeSize")]; | 1342 | opts[QStringLiteral("VolumeSize")] = arguments().metaData()[QStringLiteral("volumeSize")]; | ||
1340 | } | 1343 | } | ||
1341 | m_model->archive()->setCompressionOptions(opts); | 1344 | m_model->archive()->setCompressionOptions(opts); | ||
1342 | } else { | 1345 | } else { | ||
1343 | opts = m_model->archive()->compressionOptions(); | 1346 | opts = m_model->archive()->compressionOptions(); | ||
1344 | } | 1347 | } | ||
1345 | 1348 | | |||
1349 | if (m_model->archive()->property("compressionMethods").toStringList().size() == 1) { | ||||
1350 | opts[QStringLiteral("CompressionMethod")] = m_model->archive()->property("compressionMethods").toStringList().first(); | ||||
1351 | } | ||||
1352 | | ||||
1346 | QString dialogTitle = i18nc("@title:window", "Add Files"); | 1353 | QString dialogTitle = i18nc("@title:window", "Add Files"); | ||
1347 | const Archive::Entry *destination = Q_NULLPTR; | 1354 | const Archive::Entry *destination = Q_NULLPTR; | ||
1348 | if (m_view->selectionModel()->selectedRows().count() == 1) { | 1355 | if (m_view->selectionModel()->selectedRows().count() == 1) { | ||
1349 | destination = m_model->entryForIndex(m_view->selectionModel()->currentIndex()); | 1356 | destination = m_model->entryForIndex(m_view->selectionModel()->currentIndex()); | ||
1350 | if (destination->isDir()) { | 1357 | if (destination->isDir()) { | ||
1351 | dialogTitle = i18nc("@title:window", "Add Files to %1", destination->fullPath());; | 1358 | dialogTitle = i18nc("@title:window", "Add Files to %1", destination->fullPath());; | ||
1352 | } | 1359 | } | ||
1353 | else { | 1360 | else { | ||
▲ Show 20 Lines • Show All 355 Lines • Show Last 20 Lines |