Commit 552f72b5 authored by Natsumi Higa's avatar Natsumi Higa Committed by Elvis Angelaccio
Browse files

cliunarchiverplugin: Add LHA support

unar supports reading LHA (also known as LZH) files.

FEATURE: 321951
FIXED-IN: 21.04
parent 722ccf9a
......@@ -54,25 +54,39 @@ void CliUnarchiverTest::testArchive_data()
QString archivePath = QFINDTESTDATA("data/one_toplevel_folder.rar");
QTest::newRow("archive with one top-level folder")
QTest::newRow("RAR archive with one top-level folder")
<< archivePath
<< QFileInfo(archivePath).fileName()
<< true << true << Archive::Unencrypted
<< QStringLiteral("A");
archivePath = QFINDTESTDATA("data/multiple_toplevel_entries.rar");
QTest::newRow("archive with multiple top-level entries")
QTest::newRow("RAR archive with multiple top-level entries")
<< archivePath
<< QFileInfo(archivePath).fileName()
<< true << false << Archive::Unencrypted
<< QStringLiteral("multiple_toplevel_entries");
archivePath = QFINDTESTDATA("data/encrypted_entries.rar");
QTest::newRow("archive with encrypted entries")
QTest::newRow("RAR archive with encrypted entries")
<< archivePath
<< QFileInfo(archivePath).fileName()
<< true << true << Archive::Encrypted
<< QStringLiteral("A");
archivePath = QFINDTESTDATA("data/one_toplevel_folder.lha");
QTest::newRow("LHA archive with one top-level folder")
<< archivePath
<< QFileInfo(archivePath).fileName()
<< true << true << Archive::Unencrypted
<< QStringLiteral("A");
archivePath = QFINDTESTDATA("data/multiple_toplevel_entries.lha");
QTest::newRow("LHA archive with multiple top-level entries")
<< archivePath
<< QFileInfo(archivePath).fileName()
<< true << false << Archive::Unencrypted
<< QStringLiteral("multiple_toplevel_entries");
}
void CliUnarchiverTest::testArchive()
......
########### next target ###############
# TODO: drop application/x-rar alias once distributions ship shared-mime-info 1.7
set(SUPPORTED_CLIUNARCHIVER_MIMETYPES "application/vnd.rar;application/x-rar;")
set(SUPPORTED_CLIUNARCHIVER_MIMETYPES "application/vnd.rar;application/x-rar;application/x-lha;")
set(kerfuffle_cliunarchiver_SRCS cliplugin.cpp)
......@@ -14,7 +14,8 @@ ecm_qt_declare_logging_category(kerfuffle_cliunarchiver_SRCS
# double-quotes of the last mime must NOT be escaped.
set(SUPPORTED_MIMETYPES
"application/vnd.rar\",
\"application/x-rar")
\"application/x-rar\",
\"application/x-lha")
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/kerfuffle_cliunarchiver.json.cmake
......
{
"KPlugin": {
"Description": "Open and extract RAR archives",
"Description": "Open and extract RAR and LHA archives",
"Description[ast]": "Abre y estrái ficheros RAR",
"Description[az]": "RAR arxivləri açmaq və çıxartmaq",
"Description[ca@valencia]": "Obri i extreu arxius RAR",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment