Refactored code and possibly fixed a bug
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
#include <QJsonArray>
|
||||
#include <QJsonObject>
|
||||
|
||||
UserList&& loadUserList(const QString &file)
|
||||
UserList loadUserList(const QString &file)
|
||||
{
|
||||
QFile doc{std::filesystem::path{file.toStdString()}};
|
||||
QString fileContents = doc.readAll();
|
||||
@ -23,10 +23,7 @@ UserList&& loadUserList(const QString &file)
|
||||
container.append(newUser);
|
||||
}
|
||||
|
||||
UserList returnObj;
|
||||
returnObj.setList(container);
|
||||
|
||||
return std::move(returnObj);
|
||||
return container;
|
||||
}
|
||||
|
||||
void saveUserList(const UserList &list)
|
||||
|
Reference in New Issue
Block a user