fix error warnings
This commit is contained in:
@@ -14,7 +14,8 @@ void CheckUpdateManager::check_update()
|
||||
const QString program = QStandardPaths::findExecutable(QStringLiteral("checkupdates"));
|
||||
if (program.isEmpty())
|
||||
{
|
||||
emit finished(false, "checkupdates not found: install pacman-contrib");
|
||||
emit add_log_line("checkupdates not found: install pacman-contrib");
|
||||
emit finished();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -49,16 +50,13 @@ void CheckUpdateManager::on_process_finished(int exit_code, QProcess::ExitStatus
|
||||
}
|
||||
|
||||
set_packages(package_list);
|
||||
emit finished(true);
|
||||
emit finished();
|
||||
}
|
||||
|
||||
void CheckUpdateManager::on_process_error(QProcess::ProcessError error)
|
||||
{
|
||||
QString reason;
|
||||
if (error == QProcess::FailedToStart)
|
||||
{
|
||||
reason = QStringLiteral("failed to start: ") + m_process.errorString();
|
||||
}
|
||||
if (error == QProcess::FailedToStart) reason = QStringLiteral("failed to start: ") + m_process.errorString();
|
||||
else
|
||||
{
|
||||
reason = QStringLiteral("failed, exit code %1").arg(m_process.exitCode());
|
||||
@@ -66,5 +64,6 @@ void CheckUpdateManager::on_process_error(QProcess::ProcessError error)
|
||||
if (!errText.isEmpty()) reason += QStringLiteral(": ") + errText;
|
||||
}
|
||||
|
||||
emit finished(false, reason);
|
||||
emit add_log_line(reason);
|
||||
emit finished();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user