]> rtime.felk.cvut.cz Git - sojka/lightdm.git/commitdiff
Disable copy of QLightDM::User object as everyone is just passing pointers anyway
authorDavid Edmundson <david@davidedmundson.co.uk>
Sat, 21 May 2011 22:52:48 +0000 (23:52 +0100)
committerDavid Edmundson <david@davidedmundson.co.uk>
Sat, 21 May 2011 22:52:48 +0000 (23:52 +0100)
liblightdm-qt/QLightDM/user.cpp
liblightdm-qt/QLightDM/user.h

index 3a9d68e3dbaf705cf7dcf662ce5c22229070426f..e20a5fd23203bcbfde2b75a9fff27e983394ae4e 100644 (file)
@@ -27,23 +27,11 @@ User::User(const QString& name, const QString& realName, const QString& homeDire
     d->isLoggedIn = isLoggedIn;
 }
 
-User::User(const User &other)
-    :d(new UserPrivate(*other.d))
-{
-}
-
 User::~User()
 {
     delete d;
 }
 
-
-User& User::operator=(const User& other)
-{
-    *d = *other.d;
-    return *this;
-}
-
 bool User::update(const QString& realName, const QString& homeDirectory, const QString& image, bool isLoggedIn)
 {
     if (d->realName == realName && d->homeDirectory == homeDirectory && d->image == image && d->isLoggedIn == isLoggedIn)
index f17211b37dec8b57f581a4ba78ffc6371c4053bf..b42fe2dc0b8a4b151d60334ca894cf6b51cf5fd4 100644 (file)
@@ -14,9 +14,7 @@ namespace QLightDM
     public:
         explicit User();
         User(const QString &name, const QString &realName, const QString &homeDirectory, const QString &image, bool isLoggedIn);
-        User(const User& other);
         ~User();
-        User &operator=(const User& other);
 
         bool update(const QString &realName, const QString &homeDirectory, const QString &image, bool isLoggedIn);
 
@@ -37,13 +35,12 @@ namespace QLightDM
         /** Returns true if this user is already logged in on another session*/
         bool isLoggedIn() const;
 
-    //    LdmUser &operator=(const LdmUser user);
     private:
+        Q_DISABLE_COPY(User);
         UserPrivate* d;
     };
 }
 
-Q_DECLARE_METATYPE(QLightDM::User);
-Q_DECLARE_METATYPE(QList<QLightDM::User>);
+Q_DECLARE_METATYPE(QLightDM::User*);
 
 #endif // LDMUSER_H