summaryrefslogtreecommitdiffhomepage
path: root/csv/csv.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-06-14 11:41:43 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-06-14 18:14:46 +0200
commit81b09254eeb8970394cd564132d1d76fec687057 (patch)
treea10126b6474d46e1aac72e91d2279944e1c56f82 /csv/csv.h
parent2b02600171a88afa0c7ffdfa06ba61395df99341 (diff)
csv: code quality fixes
- use std::move where applicable - reformat more - make const stuff static, use QStringLiteral - fix regexes to make progress more - always move further into file even if regexes fail - apply less defensive coding, but still enough - remove stuff we don't use
Diffstat (limited to 'csv/csv.h')
-rw-r--r--csv/csv.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/csv/csv.h b/csv/csv.h
index e5a37793..940c02a6 100644
--- a/csv/csv.h
+++ b/csv/csv.h
@@ -17,17 +17,17 @@ class CSV_EXPORT CSV
{
public:
QString readLine();
- QStringList parseLine();
- static QStringList parseLine(QString line);
+ bool parseLine(QStringList& ret);
void setCodec(const char* codecName);
static bool getGameData(const int gameID, unsigned char* table, QString& gamename);
private:
- QIODevice *m_device;
- QTextCodec *m_codec;
+ CSV(QIODevice* device);
+
+ QIODevice* m_device;
QString m_string;
int m_pos;
- QRegExp m_rx;
- CSV(QIODevice * device);
- CSV(QString &string);
+
+ static const QTextCodec* m_codec;
+ static const QRegExp m_rx, m_rx2;
};