diff options
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; +} |