Code cleanup

Comprehensive code cleanup:
- formatting
- comments
- obsolete code
This commit is contained in:
Fonic 2018-01-16 13:20:45 +01:00
parent 9ff648177c
commit 8c78aca69e
11 changed files with 220 additions and 657 deletions

View file

@ -28,11 +28,6 @@ class EntryModel : public QAbstractTableModel
Q_OBJECT
public:
/**
* @author Fonic <https://github.com/fonic>
* Add entries for additional columns 'Password', 'Notes', 'Expires',
* 'Created', 'Modified', 'Accessed' and 'Attachments'
*/
enum ModelColumn
{
ParentGroup = 0,
@ -65,42 +60,21 @@ public:
void setEntryList(const QList<Entry*>& entries);
/**
* @author Fonic <https://github.com/fonic>
* Methods to get/set state of 'Hide Usernames' and 'Hide Passwords'
* settings
*/
bool hideUsernames() const;
void setHideUsernames(const bool hide);
bool hidePasswords() const;
void setHidePasswords(const bool hide);
bool isUsernamesHidden() const;
void setUsernamesHidden(const bool hide);
bool isPasswordsHidden() const;
void setPasswordsHidden(const bool hide);
signals:
/**
* @author Fonic <https://github.com/fonic>
* Signals to notify about list/search mode switches (NOTE: previously
* named 'switchedToGroupMode'/'switchedToEntryListMode')
*/
void switchedToListMode();
void switchedToSearchMode();
/**
* @author Fonic <https://github.com/fonic>
* Signals to notify about state changes of 'Hide Usernames' and 'Hide
* Passwords' settings
*/
void hideUsernamesChanged();
void hidePasswordsChanged();
void usernamesHiddenChanged();
void passwordsHiddenChanged();
public slots:
void setGroup(Group* group);
/**
* @author Fonic <https://github.com/fonic>
* Slots to toggle state of 'Hide Usernames' and 'Hide Passwords' settings
*/
void toggleHideUsernames(const bool hide);
void toggleHidePasswords(const bool hide);
void toggleUsernamesHidden(const bool hide);
void togglePasswordsHidden(const bool hide);
private slots:
void entryAboutToAdd(Entry* entry);
@ -118,33 +92,11 @@ private:
QList<Entry*> m_orgEntries;
QList<const Group*> m_allGroups;
/**
* @author Fonic <https://github.com/fonic>
* Properties to store state of 'Hide Usernames' and 'Hide Passwords'
* settings
*/
bool m_hideUsernames;
bool m_hidePasswords;
/**
* @author Fonic <https://github.com/fonic>
* Constant string used to display hidden content in columns 'Username'
* and 'Password'
*/
static const QString HiddenContentDisplay;
/**
* @author Fonic <https://github.com/fonic>
* Date format used to display dates in columns 'Expires', 'Created',
* 'Modified' and 'Accessed'
*/
static const Qt::DateFormat DateFormat;
/**
* @author Fonic <https://github.com/fonic>
* Constant string used to display header and data of column 'Paper-
* clip'
*/
static const QString PaperClipDisplay;
};