diff options
Diffstat (limited to 'client/HandleMessage.cpp')
-rw-r--r-- | client/HandleMessage.cpp | 34 |
1 files changed, 17 insertions, 17 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; |