Commit 185678c7 authored by Elvis Angelaccio's avatar Elvis Angelaccio

Stop defining empty DEPENDENCY_TOOL_ARGS

On !APPLE systems we were defining an empty DEPENDENCY_TOOL_ARGS macro,
resulting in a clazy warning due to `QStringLiteral(DEPENDENCY_TOOL_ARGS)`.

Now we define this macro only when needed, and we check with an #ifdef if we
need to use it. As a bonus point, we avoid to pass to QProcess::setArguments()
a list whose first element is empty.
parent 80a059d4
......@@ -53,7 +53,6 @@ if (APPLE)
target_compile_definitions(kerfuffle PRIVATE -DDEPENDENCY_TOOL_ARGS="-L")
target_compile_definitions(kerfuffle PRIVATE -DDEPENDENCY_TOOL="ldd")
target_compile_definitions(kerfuffle PRIVATE -DDEPENDENCY_TOOL_ARGS="")
......@@ -271,7 +271,10 @@ bool PluginManager::libarchiveHasLzo()
// Step 2: process the libarchive plugin dependencies to figure out the absolute libarchive path.
QProcess dependencyTool;
const QStringList args = {QStringLiteral(DEPENDENCY_TOOL_ARGS)};
QStringList args;
args << QStringLiteral(DEPENDENCY_TOOL_ARGS);
dependencyTool.setArguments(args + QStringList(pluginPath));
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