fix console line
This commit is contained in:
@@ -28,15 +28,30 @@ QStringList ConsoleManager::update_log() const { return m_update_log; }
|
||||
|
||||
void ConsoleManager::append_update_log(const QByteArray& chunk)
|
||||
{
|
||||
m_update_log_buffer += QString::fromUtf8(chunk);
|
||||
m_update_log_buffer.replace(QLatin1Char('\r'), QLatin1Char('\n'));
|
||||
const QString text = QString::fromUtf8(chunk);
|
||||
|
||||
qsizetype new_line;
|
||||
while ((new_line = m_update_log_buffer.indexOf(QLatin1Char('\n'))) >= 0)
|
||||
for (const QChar ch : text)
|
||||
{
|
||||
const QString line = m_update_log_buffer.left(new_line);
|
||||
m_update_log_buffer.remove(0, new_line + 1);
|
||||
if (!line.trimmed().isEmpty()) add_log_line(m_package_manager + QStringLiteral(": ") + line);
|
||||
if (ch == QLatin1Char('\r'))
|
||||
{
|
||||
m_pending_cr = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ch == QLatin1Char('\n'))
|
||||
{
|
||||
commit_line();
|
||||
m_pending_cr = false;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (m_pending_cr)
|
||||
{
|
||||
m_update_log_buffer.clear();
|
||||
m_pending_cr = false;
|
||||
}
|
||||
|
||||
m_update_log_buffer += ch;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,3 +74,10 @@ void ConsoleManager::add_log_line(const QString& line)
|
||||
emit update_log_changed();
|
||||
}
|
||||
|
||||
void ConsoleManager::commit_line()
|
||||
{
|
||||
const QString line = m_update_log_buffer;
|
||||
m_update_log_buffer.clear();
|
||||
if (!line.trimmed().isEmpty())
|
||||
add_log_line(m_package_manager + QStringLiteral(": ") + line);
|
||||
}
|
||||
|
||||
@@ -16,10 +16,14 @@ class ConsoleManager : public QObject
|
||||
void add_log_line(const QString& line);
|
||||
void clear();
|
||||
|
||||
private:
|
||||
void commit_line();
|
||||
|
||||
private:
|
||||
QString m_package_manager = "yay";
|
||||
QStringList m_update_log;
|
||||
QString m_update_log_buffer;
|
||||
bool m_pending_cr = false;
|
||||
|
||||
signals:
|
||||
void update_log_changed();
|
||||
|
||||
14
hdr.txt
Normal file
14
hdr.txt
Normal file
@@ -0,0 +1,14 @@
|
||||
HTTP/2 302
|
||||
server: nginx
|
||||
date: Tue, 24 Nov 2026 07:51:53 GMT
|
||||
content-type: text/html; charset=utf-8
|
||||
cache-control: max-age=0, must-revalidate, private
|
||||
location: /ru/user/auth/login/
|
||||
expires: Tue, 24 Nov 2026 07:51:53 GMT
|
||||
set-cookie: site_lang=ru; expires=Wed, 24 Nov 2027 07:51:53 GMT; Max-Age=31536000; path=/; secure; httponly; samesite=lax
|
||||
set-cookie: REMEMBERME=deleted; expires=Mon, 24 Nov 2025 07:51:52 GMT; Max-Age=0; path=/; secure; httponly; samesite=lax
|
||||
referrer-policy: no-referrer
|
||||
content-security-policy: frame-src 'self' *.google.com app.getbee.io intercom-sheets.com *.intercom-sheets.com *.helpdeskeddy.com *.yandex.ru yandex.ru app.getbee.unisender.ru; frame-ancestors 'self'
|
||||
x-robots-tag: noindex,nofollow
|
||||
x-powered-by: Unisender
|
||||
|
||||
12
resp.html
Normal file
12
resp.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="refresh" content="0;url='/ru/user/auth/login/'" />
|
||||
|
||||
<title>Redirecting to /ru/user/auth/login/</title>
|
||||
</head>
|
||||
<body>
|
||||
Redirecting to <a href="/ru/user/auth/login/">/ru/user/auth/login/</a>.
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user