Commit 363cb422 authored by Leander Schulten's avatar Leander Schulten
Browse files

Delete User when Usermanagment gets destroyed

parent 5e67427a
......@@ -11,6 +11,12 @@ UserManagment::UserManagment():readUser(new User("Default","")),currentUser(read
}*/
}
UserManagment::~UserManagment(){
while (!IDBase<User>::getAllIDBases().empty()) {
delete *IDBase<User>::getAllIDBases().cbegin();
}
}
void UserManagment::addUser(const QString &name, const QString &password){
......
......@@ -19,8 +19,9 @@ class UserManagment : public QObject
private:
User * readUser;
User * currentUser;
public:
UserManagment();
public:
~UserManagment();
Q_INVOKABLE User * getDefaultUser()const{return readUser;}
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment