#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"))) {
|
foreach(QString line, text.split(QRegExp("\r|\n|\r\n"))) {
|
||||||
if (!line.isEmpty()) {
|
if (!line.isEmpty()) {
|
||||||
m_pLogOutput->append(line);
|
m_pLogOutput->append(line);
|
||||||
updateStateFromLogLine(line);
|
updateFromLogLine(line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::updateStateFromLogLine(const QString &line)
|
void MainWindow::updateFromLogLine(const QString &line)
|
||||||
{
|
{
|
||||||
checkConnected(line);
|
checkConnected(line);
|
||||||
checkFingerprint(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)
|
void MainWindow::checkFingerprint(const QString& line)
|
||||||
{
|
{
|
||||||
QRegExp fingerprintRegex(".*server fingerprint: ([A-F0-9:]+)");
|
QRegExp fingerprintRegex(".*server fingerprint: ([A-F0-9:]+)");
|
||||||
|
|
|
@ -167,7 +167,7 @@ class MainWindow : public QMainWindow, public Ui::MainWindowBase
|
||||||
void setStatus(const QString& status);
|
void setStatus(const QString& status);
|
||||||
void sendIpcMessage(qIpcMessageType type, const char* buffer, bool showErrors);
|
void sendIpcMessage(qIpcMessageType type, const char* buffer, bool showErrors);
|
||||||
void onModeChanged(bool startDesktop, bool applyService);
|
void onModeChanged(bool startDesktop, bool applyService);
|
||||||
void updateStateFromLogLine(const QString& line);
|
void updateFromLogLine(const QString& line);
|
||||||
QString getIPAddresses();
|
QString getIPAddresses();
|
||||||
void stopService();
|
void stopService();
|
||||||
void stopDesktop();
|
void stopDesktop();
|
||||||
|
@ -183,6 +183,7 @@ class MainWindow : public QMainWindow, public Ui::MainWindowBase
|
||||||
void promptAutoConfig();
|
void promptAutoConfig();
|
||||||
QString getProfileRootForArg();
|
QString getProfileRootForArg();
|
||||||
void checkConnected(const QString& line);
|
void checkConnected(const QString& line);
|
||||||
|
void checkLicense(const QString& line);
|
||||||
void checkFingerprint(const QString& line);
|
void checkFingerprint(const QString& line);
|
||||||
bool autoHide();
|
bool autoHide();
|
||||||
QString getTimeStamp();
|
QString getTimeStamp();
|
||||||
|
|
|
@ -456,7 +456,7 @@ Server::switchScreen(BaseClientProxy* dst,
|
||||||
|
|
||||||
// if trial is expired, exit the process
|
// if trial is expired, exit the process
|
||||||
if (!m_args.m_serial.isExpired(std::time(0))) {
|
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);
|
exit(kExitSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue