add base install and delete

This commit is contained in:
2026-12-06 09:38:29 +03:00
parent 8ecbcae4fc
commit fb24f66c04
13 changed files with 610 additions and 110 deletions

View File

@@ -16,6 +16,14 @@ namespace
ConsoleManager::ConsoleManager(QObject* parent) : QObject{ parent }
{
// QML получает не каждую строку, а накопленную пачку: иначе ListView
// сбрасывается на каждой строке и GUI-поток блокируется на больших логах.
m_notify_timer.setSingleShot(true);
m_notify_timer.setInterval(100);
connect(&m_notify_timer, &QTimer::timeout, this, [this] {
m_notify_pending = false;
emit update_log_changed();
});
}
void ConsoleManager::set_package_manager(const QString& pm)
@@ -56,6 +64,8 @@ void ConsoleManager::append_update_log(const QByteArray& chunk)
void ConsoleManager::clear()
{
m_notify_timer.stop();
m_notify_pending = false;
m_update_log.clear();
m_update_log_buffer.clear();
m_pending_cr = false;
@@ -73,7 +83,15 @@ void ConsoleManager::add_log_line(const QString& line)
if (m_update_log.size() >= kMaxLogLines) m_update_log.removeFirst();
m_update_log.append(clean);
emit update_log_changed();
schedule_log_changed();
}
void ConsoleManager::schedule_log_changed()
{
if (m_notify_pending) return;
m_notify_pending = true;
m_notify_timer.start();
}
void ConsoleManager::commit_line()