diff --git a/src/createavatarjob.h b/src/createavatarjob.h index 7022f29..cd6f2cc 100644 --- a/src/createavatarjob.h +++ b/src/createavatarjob.h @@ -1,44 +1,44 @@ /************************************************************************************* * Copyright (C) 2013 by Alejandro Fiestas Olivares * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * * as published by the Free Software Foundation; either version 2 * * of the License, or (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the Free Software * * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * *************************************************************************************/ #ifndef CREATE_AVATAR_JOB_H #define CREATE_AVATAR_JOB_H #include #include class CreateAvatarJob : public KJob { Q_OBJECT public: explicit CreateAvatarJob(QObject* parent = 0); - virtual void start(); + void start() Q_DECL_OVERRIDE; void setUrl(const QUrl &url); QString avatarPath() const; private Q_SLOTS: void doStart(); void copyDone(KJob* job); private: QUrl m_url; QString m_tmpFile; }; #endif //CREATE_AVATAR_JOB_H diff --git a/src/lib/accountmodel.h b/src/lib/accountmodel.h index fac31c2..b666239 100644 --- a/src/lib/accountmodel.h +++ b/src/lib/accountmodel.h @@ -1,96 +1,96 @@ /************************************************************************************* * Copyright (C) 2012 by Alejandro Fiestas Olivares * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * * as published by the Free Software Foundation; either version 2 * * of the License, or (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the Free Software * * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * *************************************************************************************/ #ifndef ACCOUNTMODEL_H #define ACCOUNTMODEL_H #include "user_manager_debug.h" #include #include #include #include #include class UserSession; class OrgFreedesktopAccountsInterface; class OrgFreedesktopAccountsUserInterface; class AutomaticLoginSettings { public: AutomaticLoginSettings(); QString autoLoginUser() const; bool setAutoLoginUser(const QString &username); private: QString m_autoLoginUser; }; class AccountModel : public QAbstractListModel { Q_OBJECT public: enum Role { FriendlyName = Qt::DisplayRole, Face = Qt::DecorationRole, RealName = Qt::UserRole, Username, Password, Email, Administrator, AutomaticLogin, Logged, Created }; AccountModel(QObject* parent); ~AccountModel(); - virtual int rowCount(const QModelIndex& parent = QModelIndex()) const; - virtual QVariant data(const QModelIndex& index, int role) const; - virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; - virtual bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole); - virtual bool removeRows(int row, int count, const QModelIndex& parent = QModelIndex()); + int rowCount(const QModelIndex& parent = QModelIndex()) const Q_DECL_OVERRIDE; + QVariant data(const QModelIndex& index, int role) const Q_DECL_OVERRIDE; + QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE; + bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole) Q_DECL_OVERRIDE; + bool removeRows(int row, int count, const QModelIndex& parent = QModelIndex()) Q_DECL_OVERRIDE; bool removeAccountKeepingFiles(int row, bool keepFile = false); QVariant newUserData(int role) const; bool newUserSetData(const QModelIndex& index, const QVariant& value, int roleInt); public Q_SLOTS: void UserAdded(const QDBusObjectPath &dbusPah); void UserDeleted(const QDBusObjectPath &path); void Changed(); void userLogged(uint uid, bool logged); private: const QString accountPathForUid(uint uid) const; void addAccount(const QString &path); void addAccountToCache(const QString &path, OrgFreedesktopAccountsUserInterface *acc, int pos = -1); void removeAccount(const QString &path); bool checkForErrors(QDBusPendingReply reply) const; QString cryptPassword(const QString &password) const; UserSession* m_sessions; QStringList m_userPath; OrgFreedesktopAccountsInterface* m_dbus; QHash m_newUserData; QHash m_users; QHash m_loggedAccounts; KEMailSettings m_kEmailSettings; AutomaticLoginSettings m_autoLoginSettings; }; QDebug operator<<(QDebug debug, AccountModel::Role role); #endif // ACCOUNTMODEL_H diff --git a/src/passwordedit.h b/src/passwordedit.h index 50fd8a1..b2e0830 100644 --- a/src/passwordedit.h +++ b/src/passwordedit.h @@ -1,34 +1,34 @@ /************************************************************************************* * Copyright (C) 2013 by Alejandro Fiestas Olivares * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * * as published by the Free Software Foundation; either version 2 * * of the License, or (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the Free Software * * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * *************************************************************************************/ #include #include class PasswordEdit : public QLineEdit { Q_OBJECT public: explicit PasswordEdit(QWidget* parent = 0); Q_SIGNALS: void focused(); protected: - virtual void focusInEvent(QFocusEvent* e); -}; \ No newline at end of file + void focusInEvent(QFocusEvent* e) Q_DECL_OVERRIDE; +}; diff --git a/src/usermanager.h b/src/usermanager.h index 92f74af..59b00fc 100644 --- a/src/usermanager.h +++ b/src/usermanager.h @@ -1,62 +1,62 @@ /************************************************************************************* * Copyright (C) 2012 by Alejandro Fiestas Olivares * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * * as published by the Free Software Foundation; either version 2 * * of the License, or (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the Free Software * * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * *************************************************************************************/ #ifndef USER_MANAGER_H #define USER_MANAGER_H #include "lib/accountmodel.h" #include namespace Ui { class KCMUserManager; }; class QModelIndex; class AccountInfo; class QItemSelection; class QStackedLayout; class KMessageWidget; class QItemSelectionModel; class UserManager : public KCModule { Q_OBJECT public: explicit UserManager(QWidget *parent, const QVariantList& args); virtual ~UserManager(); - virtual void load(); - virtual void save(); + void load() Q_DECL_OVERRIDE; + void save() Q_DECL_OVERRIDE; public Q_SLOTS: void currentChanged(const QModelIndex &selected, const QModelIndex &previous); void dataChanged(const QModelIndex &topLeft ,const QModelIndex &topRight); void addNewUser(); void removeUser(); private: bool m_saveNeeded; AccountModel* m_model; AccountInfo* m_widget; Ui::KCMUserManager* m_ui; QItemSelectionModel* m_selectionModel; QMap m_cachedInfo; }; #endif // USER-MANAGER_H_