add connect checkUpadage and package count show
This commit is contained in:
20
cpp/updatemanager/qinvokable.cpp
Normal file
20
cpp/updatemanager/qinvokable.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#include "updatemanager.hpp"
|
||||
#include <QStandardPaths>
|
||||
|
||||
void UpdateManager::checkUpdates()
|
||||
{
|
||||
if (m_isChecking || m_isInstalling || m_isRemoving) return;
|
||||
|
||||
set_packages({});
|
||||
set_is_checking(true);
|
||||
|
||||
const QString program = QStandardPaths::findExecutable(QStringLiteral("checkupdates"));
|
||||
if (program.isEmpty())
|
||||
{
|
||||
qWarning() << "checkupdates not found: install pacman-contrib";
|
||||
set_is_checking(false);
|
||||
return;
|
||||
}
|
||||
|
||||
m_process.start(program, {});
|
||||
}
|
||||
Reference in New Issue
Block a user