mirror of
https://github.com/debauchee/barrier.git
synced 2024-12-18 00:11:39 +03:00
#5657 Refresh UI when synergys reports trial expired
This commit is contained in:
parent
99dbdc5eb3
commit
5a34da3ce0
@ -411,12 +411,12 @@ void MainWindow::appendLogRaw(const QString& text)
|
||||
foreach(QString line, text.split(QRegExp("\r|\n|\r\n"))) {
|
||||
if (!line.isEmpty()) {
|
||||
m_pLogOutput->append(line);
|
||||
updateStateFromLogLine(line);
|
||||
updateFromLogLine(line);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::updateStateFromLogLine(const QString &line)
|
||||
void MainWindow::updateFromLogLine(const QString &line)
|
||||
{
|
||||
checkConnected(line);
|
||||
checkFingerprint(line);
|
||||
@ -444,6 +444,13 @@ void MainWindow::checkConnected(const QString& line)
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::checkLicense(const QString &line)
|
||||
{
|
||||
if (line.contains("trial has expired")) {
|
||||
m_SubscriptionManager->refresh();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::checkFingerprint(const QString& line)
|
||||
{
|
||||
QRegExp fingerprintRegex(".*server fingerprint: ([A-F0-9:]+)");
|
||||
|
@ -167,7 +167,7 @@ class MainWindow : public QMainWindow, public Ui::MainWindowBase
|
||||
void setStatus(const QString& status);
|
||||
void sendIpcMessage(qIpcMessageType type, const char* buffer, bool showErrors);
|
||||
void onModeChanged(bool startDesktop, bool applyService);
|
||||
void updateStateFromLogLine(const QString& line);
|
||||
void updateFromLogLine(const QString& line);
|
||||
QString getIPAddresses();
|
||||
void stopService();
|
||||
void stopDesktop();
|
||||
@ -183,6 +183,7 @@ class MainWindow : public QMainWindow, public Ui::MainWindowBase
|
||||
void promptAutoConfig();
|
||||
QString getProfileRootForArg();
|
||||
void checkConnected(const QString& line);
|
||||
void checkLicense(const QString& line);
|
||||
void checkFingerprint(const QString& line);
|
||||
bool autoHide();
|
||||
QString getTimeStamp();
|
||||
|
@ -456,7 +456,7 @@ Server::switchScreen(BaseClientProxy* dst,
|
||||
|
||||
// if trial is expired, exit the process
|
||||
if (!m_args.m_serial.isExpired(std::time(0))) {
|
||||
LOG((CLOG_ERR "trial is expired, aborting server"));
|
||||
LOG((CLOG_ERR "trial has expired, aborting server"));
|
||||
exit(kExitSuccess);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user