mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-26 21:51:13 +01:00
helpers
remove network reply to fix
This commit is contained in:
@@ -68,22 +68,3 @@ void reset_widget_color(QWidget *widget)
|
|||||||
{
|
{
|
||||||
widget->setStyleSheet("");
|
widget->setStyleSheet("");
|
||||||
}
|
}
|
||||||
|
|
||||||
QString network_reply_to_fix(QNetworkReply::NetworkError error)
|
|
||||||
{
|
|
||||||
switch (error)
|
|
||||||
{
|
|
||||||
case QNetworkReply::NetworkError::ConnectionRefusedError:
|
|
||||||
return "Make sure the server is started ($ systemctl status unocan_server)";
|
|
||||||
break;
|
|
||||||
case QNetworkReply::NetworkError::HostNotFoundError:
|
|
||||||
return "Make sure the simulator is turned on";
|
|
||||||
break;
|
|
||||||
case QNetworkReply::NetworkError::InternalServerError:
|
|
||||||
return "Server had an oopsie, restart the client and if it fails again restart the server";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return "";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
#ifndef HELPERS_H
|
#ifndef HELPERS_H
|
||||||
#define HELPERS_H
|
#define HELPERS_H
|
||||||
|
|
||||||
#include <QNetworkReply>
|
|
||||||
#include <QtWidgets>
|
#include <QtWidgets>
|
||||||
#include <qwt_color_map.h>
|
#include <qwt_color_map.h>
|
||||||
#include <qwt_dial.h>
|
#include <qwt_dial.h>
|
||||||
@@ -19,6 +18,5 @@ void set_widget_color(QWidget *widget, QString color, QString bg);
|
|||||||
QColor widget_bg_color(QWidget *widget);
|
QColor widget_bg_color(QWidget *widget);
|
||||||
QColor widget_color(QWidget *widget);
|
QColor widget_color(QWidget *widget);
|
||||||
void reset_widget_color(QWidget *widget);
|
void reset_widget_color(QWidget *widget);
|
||||||
QString network_reply_to_fix(QNetworkReply::NetworkError error);
|
|
||||||
|
|
||||||
#endif // HELPERS_H
|
#endif // HELPERS_H
|
||||||
|
|||||||
Reference in New Issue
Block a user