aboutsummaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/HandleMessage.cpp34
-rw-r--r--client/dbconnector.h4
2 files changed, 19 insertions, 19 deletions
diff --git a/client/HandleMessage.cpp b/client/HandleMessage.cpp
index 399abe8..02d7257 100644
--- a/client/HandleMessage.cpp
+++ b/client/HandleMessage.cpp
@@ -2,24 +2,24 @@
HandleMessage::HandleMessage(QObject *parent) : QObject(parent) { }
-void HandleMessage::ParseToSQL(QString input) {
- QSqlQuery queryInsertData;
- QString output = "insert into WSdb.tblMain (temperature, humidity, pressure) values ";
- QStringList data;
-
- output.append("(");
- data=input.split(",");
-
- for (int i = 1; i < data.size(); i++) {
- bool valid;
- output.append(QString::number(data[i].toInt(&valid, 16)));
- if (i + 1 < data.size()) output.append(",");
- }
+// void HandleMessage::ParseToSQL(QString input) {
+// QSqlQuery queryInsertData;
+// QString output = "insert into WSdb.tblMain (temperature, humidity, pressure) values ";
+// QStringList data;
+//
+// output.append("(");
+// data=input.split(",");
+//
+// for (int i = 1; i < data.size(); i++) {
+// bool valid;
+// output.append(QString::number(data[i].toInt(&valid, 16)));
+// if (i + 1 < data.size()) output.append(",");
+// }
+//
+// output.append(")");
+// }
- output.append(")");
-
-void HandleMessage::ParseToSQL(QString input)
-{
+void HandleMessage::ParseToSQL(QString input) {
QSqlQuery queryInsertData;
QString output = "INSERT INTO `tblMain` (`temperature`, `humidity`, `pressure`) VALUES ";
QStringList data;
diff --git a/client/dbconnector.h b/client/dbconnector.h
index 82b4f21..527acff 100644
--- a/client/dbconnector.h
+++ b/client/dbconnector.h
@@ -19,8 +19,8 @@ public:
explicit dbConnector(QWidget *parent = nullptr);
~dbConnector();
- static QString getdbName();
- static QString getEspHost();
+ QString getdbName();
+ QString getEspHost();
private slots: