mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2025-12-19 13:42:51 +08:00
minor improvements
This commit is contained in:
parent
0d2f073069
commit
c83d3c7506
7
3rdparty/qv2ray/v2/ui/LogHighlighter.cpp
vendored
7
3rdparty/qv2ray/v2/ui/LogHighlighter.cpp
vendored
@ -76,13 +76,6 @@ namespace Qv2ray::ui {
|
||||
rule.format = v2rayComponentFormat;
|
||||
highlightingRules.append(rule);
|
||||
//
|
||||
failedFormat.setFontWeight(QFont::Bold);
|
||||
failedFormat.setBackground(Qt::red);
|
||||
failedFormat.setForeground(Qt::white);
|
||||
rule.pattern = QRegularExpression("failed");
|
||||
rule.format = failedFormat;
|
||||
highlightingRules.append(rule);
|
||||
//
|
||||
rule.pattern = QRegularExpression(">>>>+");
|
||||
rule.format = warningFormat;
|
||||
highlightingRules.append(rule);
|
||||
|
||||
1
3rdparty/qv2ray/v2/ui/LogHighlighter.hpp
vendored
1
3rdparty/qv2ray/v2/ui/LogHighlighter.hpp
vendored
@ -77,7 +77,6 @@ namespace Qv2ray {
|
||||
QTextCharFormat dateFormat;
|
||||
QTextCharFormat acceptedFormat;
|
||||
QTextCharFormat rejectedFormat;
|
||||
QTextCharFormat failedFormat;
|
||||
QTextCharFormat warningFormat;
|
||||
QTextCharFormat warningFormat2;
|
||||
QTextCharFormat infoFormat;
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <QElapsedTimer>
|
||||
#include <QProcess>
|
||||
|
||||
namespace NekoGui_sys {
|
||||
@ -10,7 +11,6 @@ namespace NekoGui_sys {
|
||||
QString tag;
|
||||
QString program;
|
||||
QStringList arguments;
|
||||
QStringList env;
|
||||
|
||||
~CoreProcess();
|
||||
|
||||
@ -31,6 +31,8 @@ namespace NekoGui_sys {
|
||||
bool failed_to_start = false;
|
||||
bool restarting = false;
|
||||
|
||||
QElapsedTimer coreRestartTimer;
|
||||
|
||||
protected:
|
||||
bool started = false;
|
||||
bool killed = false;
|
||||
|
||||
@ -4,7 +4,6 @@
|
||||
#include <QTimer>
|
||||
#include <QDir>
|
||||
#include <QApplication>
|
||||
#include <QElapsedTimer>
|
||||
|
||||
namespace NekoGui_sys {
|
||||
CoreProcess::~CoreProcess() {
|
||||
@ -20,12 +19,7 @@ namespace NekoGui_sys {
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
QElapsedTimer coreRestartTimer;
|
||||
|
||||
CoreProcess::CoreProcess(const QString &core_path, const QStringList &args) : QProcess() {
|
||||
this->env = QProcessEnvironment::systemEnvironment().toStringList();
|
||||
program = core_path;
|
||||
arguments = args;
|
||||
|
||||
@ -88,13 +82,11 @@ namespace NekoGui_sys {
|
||||
}
|
||||
|
||||
void CoreProcess::Start() {
|
||||
show_stderr = false;
|
||||
if (started) return;
|
||||
started = true;
|
||||
|
||||
setEnvironment(env);
|
||||
setEnvironment(QProcessEnvironment::systemEnvironment().toStringList());
|
||||
start(program, arguments);
|
||||
write((NekoGui::dataStore->core_token + "\n").toUtf8());
|
||||
}
|
||||
|
||||
void CoreProcess::Restart() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user