aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client/HandleMessage.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/client/HandleMessage.cpp b/client/HandleMessage.cpp
index 84f561b..d719157 100644
--- a/client/HandleMessage.cpp
+++ b/client/HandleMessage.cpp
@@ -24,9 +24,8 @@ void HandleMessage::ParseToSQL(QString input) {
QSqlQuery queryInsertData;
QString output = "INSERT INTO `tblMain` (`temperature`, `humidity`, `pressure`) VALUES ";
QStringList data;
- QStringList list = input.split("\n");
+ QStringList list = input.split("\n",Qt::SkipEmptyParts);
for (int i = 0; i < list.size(); ++i) {
- if (list[i].size() == 0) continue;
data=list[i].split(",");
bool valid;
@@ -44,5 +43,3 @@ void HandleMessage::ParseToSQL(QString input) {
queryInsertData.exec(output);
}
-
-