mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-21 12:11:06 -05:00
Cleanup reference/pointer declarations.
This commit is contained in:
parent
75f0d132e5
commit
c98aad698a
@ -29,7 +29,7 @@
|
||||
#include "core/PasswordGenerator.h"
|
||||
|
||||
|
||||
Service::Service(DatabaseTabWidget *parent) :
|
||||
Service::Service(DatabaseTabWidget* parent) :
|
||||
KeepassHttpProtocol::Server(parent),
|
||||
m_dbTabWidget(parent)
|
||||
{
|
||||
@ -69,7 +69,7 @@ Entry* Service::getConfigEntry(bool create)
|
||||
|
||||
bool Service::isDatabaseOpened() const
|
||||
{
|
||||
if (DatabaseWidget * dbWidget = m_dbTabWidget->currentDatabaseWidget())
|
||||
if (DatabaseWidget* dbWidget = m_dbTabWidget->currentDatabaseWidget())
|
||||
switch(dbWidget->currentMode()) {
|
||||
case DatabaseWidget::None:
|
||||
case DatabaseWidget::LockedMode:
|
||||
@ -95,18 +95,18 @@ bool Service::openDatabase()
|
||||
|
||||
QString Service::getDatabaseRootUuid()
|
||||
{
|
||||
if (DatabaseWidget * dbWidget = m_dbTabWidget->currentDatabaseWidget())
|
||||
if (Database * db = dbWidget->database())
|
||||
if (Group * rootGroup = db->rootGroup())
|
||||
if (DatabaseWidget* dbWidget = m_dbTabWidget->currentDatabaseWidget())
|
||||
if (Database* db = dbWidget->database())
|
||||
if (Group* rootGroup = db->rootGroup())
|
||||
return rootGroup->uuid().toHex();
|
||||
return QString();
|
||||
}
|
||||
|
||||
QString Service::getDatabaseRecycleBinUuid()
|
||||
{
|
||||
if (DatabaseWidget * dbWidget = m_dbTabWidget->currentDatabaseWidget())
|
||||
if (Database * db = dbWidget->database())
|
||||
if (Group * recycleBin = db->metadata()->recycleBin())
|
||||
if (DatabaseWidget* dbWidget = m_dbTabWidget->currentDatabaseWidget())
|
||||
if (Database* db = dbWidget->database())
|
||||
if (Group* recycleBin = db->metadata()->recycleBin())
|
||||
return recycleBin->uuid().toHex();
|
||||
return QString();
|
||||
}
|
||||
@ -137,7 +137,7 @@ QString Service::storeKey(const QString &key)
|
||||
} while(config->attributes()->contains(QLatin1String(ASSOCIATE_KEY_PREFIX) + id) &&
|
||||
QMessageBox::warning(0, tr("KeyPassX/Http: Overwrite existing key?"),
|
||||
tr("A shared encryption-key with the name \"%1\" already exists.\nDo you want to overwrite it?").arg(id),
|
||||
QMessageBox::Yes|QMessageBox::No) == QMessageBox::No);
|
||||
QMessageBox::Yes | QMessageBox::No) == QMessageBox::No);
|
||||
|
||||
config->attributes()->set(QLatin1String(ASSOCIATE_KEY_PREFIX) + id, key, true);
|
||||
}
|
||||
@ -217,7 +217,7 @@ KeepassHttpProtocol::Entry Service::prepareEntry(const Entry* entry)
|
||||
return res;
|
||||
}
|
||||
|
||||
QList<KeepassHttpProtocol::Entry> Service::findMatchingEntries(const QString &id, const QString &url, const QString &submitUrl, const QString &realm)
|
||||
QList<KeepassHttpProtocol::Entry> Service::findMatchingEntries(const QString& /*id*/, const QString& url, const QString& submitUrl, const QString& realm)
|
||||
{
|
||||
QList<KeepassHttpProtocol::Entry> result;
|
||||
QList<Entry*> pwEntriesToConfirm;
|
||||
|
@ -23,19 +23,19 @@ class Service : public KeepassHttpProtocol::Server
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit Service(DatabaseTabWidget *parent = 0);
|
||||
explicit Service(DatabaseTabWidget* parent = 0);
|
||||
|
||||
virtual bool isDatabaseOpened() const;
|
||||
virtual bool openDatabase();
|
||||
virtual QString getDatabaseRootUuid();
|
||||
virtual QString getDatabaseRecycleBinUuid();
|
||||
virtual QString getKey(const QString &id);
|
||||
virtual QString storeKey(const QString &key);
|
||||
virtual QList<KeepassHttpProtocol::Entry> findMatchingEntries(const QString &id, const QString &url, const QString & submitUrl, const QString & realm);
|
||||
virtual int countMatchingEntries(const QString &id, const QString &url, const QString & submitUrl, const QString & realm);
|
||||
virtual QList<KeepassHttpProtocol::Entry> searchAllEntries(const QString &id);
|
||||
virtual void addEntry(const QString &id, const QString &login, const QString &password, const QString &url, const QString &submitUrl, const QString &realm);
|
||||
virtual void updateEntry(const QString &id, const QString &uuid, const QString &login, const QString &password, const QString &url);
|
||||
virtual QString getKey(const QString& id);
|
||||
virtual QString storeKey(const QString& key);
|
||||
virtual QList<KeepassHttpProtocol::Entry> findMatchingEntries(const QString& id, const QString& url, const QString& submitUrl, const QString& realm);
|
||||
virtual int countMatchingEntries(const QString& id, const QString& url, const QString& submitUrl, const QString& realm);
|
||||
virtual QList<KeepassHttpProtocol::Entry> searchAllEntries(const QString& id);
|
||||
virtual void addEntry(const QString& id, const QString& login, const QString& password, const QString& url, const QString& submitUrl, const QString& realm);
|
||||
virtual void updateEntry(const QString& id, const QString& uuid, const QString& login, const QString& password, const QString& url);
|
||||
virtual QString generatePassword();
|
||||
|
||||
public Q_SLOTS:
|
||||
@ -45,12 +45,12 @@ public Q_SLOTS:
|
||||
private:
|
||||
enum Access { Denied, Unknown, Allowed};
|
||||
Entry* getConfigEntry(bool create = false);
|
||||
bool matchUrlScheme(const QString &url);
|
||||
Access checkAccess(const Entry *entry, const QString & host, const QString & submitHost, const QString & realm);
|
||||
bool removeFirstDomain(QString &hostname);
|
||||
bool matchUrlScheme(const QString& url);
|
||||
Access checkAccess(const Entry* entry, const QString& host, const QString& submitHost, const QString& realm);
|
||||
bool removeFirstDomain(QString& hostname);
|
||||
Group *findCreateAddEntryGroup();
|
||||
KeepassHttpProtocol::Entry prepareEntry(const Entry *entry);
|
||||
QList<Entry *> searchEntries(const QString &text);
|
||||
KeepassHttpProtocol::Entry prepareEntry(const Entry* entry);
|
||||
QList<Entry*> searchEntries(const QString& text);
|
||||
|
||||
DatabaseTabWidget * const m_dbTabWidget;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user