aboutsummaryrefslogtreecommitdiff
path: root/src/session.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/session.cpp')
-rw-r--r--src/session.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/session.cpp b/src/session.cpp
index 4640786..14b6575 100644
--- a/src/session.cpp
+++ b/src/session.cpp
@@ -158,7 +158,8 @@ void Session::setStatus(QString status) {
emit _main_gui->showWindow();
- _main_gui->showToast(tr("Remote Support session was stopped ungracefully"), 5000);
+ _main_gui->showToast(tr("Remote Support session was "
+ "stopped ungracefully"), 5000);
} else if (status == "stopped") {
/* Session is stopped */
guiString = tr("Remote Support session was stopped");
@@ -183,24 +184,29 @@ void Session::setStatus(QString status) {
guiString = tr("Remote Support session couldn't be started!");
_main_gui->setStatusIndicator(true, QColor(255, 0, 0, 127));
- _main_gui->showToast(tr("An error occured while trying to start a session!"), 5000);
+ _main_gui->showToast(tr("An error occured while trying "
+ "to start a session!"), 5000);
} else if (status == "start_session_success") {
/* Session successfully started */
guiString = tr("Remote Support session successfully started!");
_main_gui->setStatusIndicator(true, QColor(255, 255, 0, 127));
- _main_gui->showToast(tr("Session was started successfully"));
+ _main_gui->showToast(QString(tr("Session was started "
+ "on '%0' successfully"))
+ .arg(_host->alias()));
} else if (status == "status_session_error") {
/* Session's status couldn't be refreshed */
_main_gui->showToast(tr("Session status could not be refreshed!"), 5000);
- guiString = tr("Session status could not be refreshed!") + "\n" + tr("remote support partner could still be connected!");
+ guiString = tr("Session status could not be refreshed!") + "\n" +
+ tr("remote support partner could still be connected!");
_main_gui->setStatusIndicator(true, QColor(255, 0, 0, 127));
emit _main_gui->showWindow();
} else if (status == "stop_session_error") {
/* Session couldn't be stopped */
_main_gui->showToast(tr("Session could not be stopped!"), 5000);
- guiString = tr("Session could not be stopped!") + "\n" + tr("remote support partner could still be connected!");
+ guiString = tr("Session could not be stopped!") + "\n" +
+ tr("remote support partner could still be connected!");
_main_gui->setStatusIndicator(true, QColor(255, 0, 0, 127));
emit _main_gui->showWindow();
@@ -353,6 +359,8 @@ void Session::status_response(QJsonDocument *doc) {
this->setStatus(new_status);
if (this->isSessionAliveOrRunning(new_status)) {
+ qDebug() << "Session is still alive or running. -> Restarting the status timer.";
+
// Ask status every 1000 millisecond
QTimer::singleShot(1000, this, &Session::statusTimerEvent);
}