aboutsummaryrefslogtreecommitdiff
path: root/client/HandleMessage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'client/HandleMessage.cpp')
-rw-r--r--client/HandleMessage.cpp18
1 files changed, 0 insertions, 18 deletions
diff --git a/client/HandleMessage.cpp b/client/HandleMessage.cpp
index d719157..9599f86 100644
--- a/client/HandleMessage.cpp
+++ b/client/HandleMessage.cpp
@@ -3,23 +3,6 @@
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(",");
-// }
-//
-// output.append(")");
-// }
-
void HandleMessage::ParseToSQL(QString input) {
QSqlQuery queryInsertData;
QString output = "INSERT INTO `tblMain` (`temperature`, `humidity`, `pressure`) VALUES ";
@@ -39,7 +22,6 @@ void HandleMessage::ParseToSQL(QString input) {
if (i+1 < list.size()) output.append(",");
}
- printf("%s\n", output.toStdString().c_str());
queryInsertData.exec(output);
}