Using the typedef ModelItemValues for "QHash<int, QVariant>".
This commit is contained in:
@ -40,8 +40,8 @@ QByteArray FileHandler::loadJSONDataFromFile(const QString fileName) {
|
||||
return fileContent.second;
|
||||
}
|
||||
|
||||
QList<QHash<int, QVariant>> FileHandler::getItemValuesFromCSVFile(const QString& filePath) {
|
||||
QList<QHash<int, QVariant>> result;
|
||||
QList<ModelItemValues> FileHandler::getItemValuesFromCSVFile(const QString& filePath) {
|
||||
QList<ModelItemValues> result;
|
||||
QFile file;
|
||||
file.setFileName(filePath);
|
||||
if (file.exists()) {
|
||||
|
||||
@ -3,6 +3,8 @@
|
||||
|
||||
#include <QVariant>
|
||||
|
||||
typedef QHash<int, QVariant> ModelItemValues;
|
||||
|
||||
class QJsonDocument;
|
||||
class QString;
|
||||
class QByteArray;
|
||||
@ -14,7 +16,7 @@ class FileHandler {
|
||||
static QByteArray loadJSONDataFromFile(const QString fileName);
|
||||
|
||||
/// CSV
|
||||
static QList<QHash<int, QVariant>> getItemValuesFromCSVFile(const QString& filePath);
|
||||
static QList<ModelItemValues> getItemValuesFromCSVFile(const QString& filePath);
|
||||
|
||||
private:
|
||||
explicit FileHandler();
|
||||
|
||||
Reference in New Issue
Block a user