diff options
author | UnavailableDev <69792062+UnavailableDev@users.noreply.github.com> | 2022-10-29 14:19:51 +0200 |
---|---|---|
committer | UnavailableDev <69792062+UnavailableDev@users.noreply.github.com> | 2022-10-29 14:19:51 +0200 |
commit | 6d9df6fe97502a852b68c8c8e6781d7208170cae (patch) | |
tree | 2485788cf73e7ccaaa02288285cd2f536d65f600 /client/csv_import.cpp | |
parent | 28af8ed412224bd8969db98521b67e0f4027ddf7 (diff) |
test version
Diffstat (limited to 'client/csv_import.cpp')
-rw-r--r-- | client/csv_import.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/client/csv_import.cpp b/client/csv_import.cpp new file mode 100644 index 0000000..5507754 --- /dev/null +++ b/client/csv_import.cpp @@ -0,0 +1,32 @@ +#include "csv_import.h" + +CSV_Import::CSV_Import() +{ + +} + + +#include <QString> +#include <QVector> + +QString CSV_Import::csvToSql(QString input){ + + QVector<QString> data; + QString output = "("; + + data = input.split(","); + + for (int i = 1; i < data.size(); ++i) { + + bool valid; + output.append(QString::number(data[i].toInt(&valid, 16))); + + if (i <= data[i].size()) { + output.append(","); + } + + } + output.append(")"); + + return output; +} |