mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-25 23:39:45 -05:00
Coding style fixes.
This commit is contained in:
parent
5de0ec94e0
commit
dff3fc0572
@ -66,7 +66,7 @@ public:
|
||||
class KEEPASSX_EXPORT AutoTypeClearField : public AutoTypeAction
|
||||
{
|
||||
public:
|
||||
explicit AutoTypeClearField();
|
||||
AutoTypeClearField();
|
||||
AutoTypeAction* clone();
|
||||
void accept(AutoTypeExecutor* executor);
|
||||
};
|
||||
|
@ -19,7 +19,8 @@
|
||||
|
||||
#include "core/Group.h"
|
||||
|
||||
QList<Entry*> EntrySearcher::search(const QString &searchTerm, const Group* group, Qt::CaseSensitivity caseSensitivity)
|
||||
QList<Entry*> EntrySearcher::search(const QString& searchTerm, const Group* group,
|
||||
Qt::CaseSensitivity caseSensitivity)
|
||||
{
|
||||
if (!group->resolveSearchingEnabled()) {
|
||||
return QList<Entry*>();
|
||||
@ -28,7 +29,8 @@ QList<Entry*> EntrySearcher::search(const QString &searchTerm, const Group* grou
|
||||
return searchEntries(searchTerm, group, caseSensitivity);
|
||||
}
|
||||
|
||||
QList<Entry*> EntrySearcher::searchEntries(const QString& searchTerm, const Group* group, Qt::CaseSensitivity caseSensitivity)
|
||||
QList<Entry*> EntrySearcher::searchEntries(const QString& searchTerm, const Group* group,
|
||||
Qt::CaseSensitivity caseSensitivity)
|
||||
{
|
||||
QList<Entry*> searchResult;
|
||||
|
||||
@ -44,7 +46,8 @@ QList<Entry*> EntrySearcher::searchEntries(const QString& searchTerm, const Grou
|
||||
return searchResult;
|
||||
}
|
||||
|
||||
QList<Entry*> EntrySearcher::matchEntry(const QString& searchTerm, Entry* entry, Qt::CaseSensitivity caseSensitivity)
|
||||
QList<Entry*> EntrySearcher::matchEntry(const QString& searchTerm, Entry* entry,
|
||||
Qt::CaseSensitivity caseSensitivity)
|
||||
{
|
||||
QStringList wordList = searchTerm.split(QRegExp("\\s"), QString::SkipEmptyParts);
|
||||
Q_FOREACH (const QString& word, wordList) {
|
||||
|
@ -28,10 +28,11 @@ class EntrySearcher
|
||||
{
|
||||
public:
|
||||
QList<Entry*> search(const QString& searchTerm, const Group* group, Qt::CaseSensitivity caseSensitivity);
|
||||
|
||||
private:
|
||||
QList<Entry*> searchEntries(const QString& searchTerm, const Group* group, Qt::CaseSensitivity caseSensitivity);
|
||||
QList<Entry*> matchEntry(const QString& searchTerm, Entry* entry, Qt::CaseSensitivity caseSensitivity);
|
||||
bool wordMatch(const QString &word, Entry *entry, Qt::CaseSensitivity caseSensitivity);
|
||||
bool wordMatch(const QString& word, Entry* entry, Qt::CaseSensitivity caseSensitivity);
|
||||
};
|
||||
|
||||
#endif // KEEPASSX_ENTRYSEARCHER_H
|
||||
|
@ -27,7 +27,7 @@
|
||||
class XcbEventFilter : public QAbstractNativeEventFilter
|
||||
{
|
||||
public:
|
||||
virtual bool nativeEventFilter(const QByteArray& eventType, void* message, long* result) override
|
||||
bool nativeEventFilter(const QByteArray& eventType, void* message, long* result) override
|
||||
{
|
||||
Q_UNUSED(result)
|
||||
|
||||
|
@ -16,8 +16,8 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef KEEPASSX_HEADERVIEWSYNC_H
|
||||
#define KEEPASSX_HEADERVIEWSYNC_H
|
||||
#ifndef KEEPASSX_DATABASEWIDGETSTATESYNC_H
|
||||
#define KEEPASSX_DATABASEWIDGETSTATESYNC_H
|
||||
|
||||
#include "gui/DatabaseWidget.h"
|
||||
|
||||
@ -51,4 +51,4 @@ private:
|
||||
QList<int> m_columnSizesSearch;
|
||||
};
|
||||
|
||||
#endif // KEEPASSX_HEADERVIEWSYNC_H
|
||||
#endif // KEEPASSX_DATABASEWIDGETSTATESYNC_H
|
||||
|
@ -29,7 +29,7 @@ public:
|
||||
explicit DialogyWidget(QWidget* parent = nullptr);
|
||||
|
||||
protected:
|
||||
virtual void keyPressEvent(QKeyEvent* e) override;
|
||||
void keyPressEvent(QKeyEvent* e) override;
|
||||
|
||||
private:
|
||||
bool clickButton(QDialogButtonBox::StandardButton standardButton);
|
||||
|
@ -41,8 +41,8 @@ class CustomIconModel : public QAbstractListModel
|
||||
public:
|
||||
explicit CustomIconModel(QObject* parent = nullptr);
|
||||
|
||||
virtual int rowCount(const QModelIndex& parent = QModelIndex()) const override;
|
||||
virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
|
||||
int rowCount(const QModelIndex& parent = QModelIndex()) const override;
|
||||
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
|
||||
void setIcons(const QHash<Uuid, QImage>& icons, const QList<Uuid>& iconsOrder);
|
||||
Uuid uuidFromIndex(const QModelIndex& index) const;
|
||||
QModelIndex indexFromUuid(const Uuid& uuid) const;
|
||||
|
@ -444,7 +444,7 @@ void MainWindow::closeEvent(QCloseEvent* event)
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::changeEvent(QEvent *event)
|
||||
void MainWindow::changeEvent(QEvent* event)
|
||||
{
|
||||
if ((event->type() == QEvent::WindowStateChange) && isMinimized()
|
||||
&& isTrayIconEnabled() && config()->get("GUI/MinimizeToTray").toBool())
|
||||
|
@ -51,7 +51,6 @@ void PasswordComboBox::setEcho(bool echo)
|
||||
#else
|
||||
setStyleSheet("QComboBox { font-family: monospace,Courier; }");
|
||||
#endif
|
||||
|
||||
}
|
||||
else {
|
||||
// clear items so the combobox indicates that no popup menu is available
|
||||
|
@ -74,7 +74,7 @@ void EntryView::setEntryList(const QList<Entry*>& entries)
|
||||
|
||||
void EntryView::setFirstEntryActive()
|
||||
{
|
||||
if(m_model->rowCount() > 0) {
|
||||
if (m_model->rowCount() > 0) {
|
||||
QModelIndex index = m_sortModel->mapToSource(m_sortModel->index(0, 0));
|
||||
setCurrentEntry(m_model->entryFromIndex(index));
|
||||
}
|
||||
|
@ -94,7 +94,8 @@ QByteArray CompositeKey::transform(const QByteArray& seed, quint64 rounds,
|
||||
|
||||
QByteArray key = rawKey();
|
||||
|
||||
QFuture<QByteArray> future = QtConcurrent::run(transformKeyRaw, key.left(16), seed, rounds, &okLeft, &errorStringLeft);
|
||||
QFuture<QByteArray> future = QtConcurrent::run(transformKeyRaw, key.left(16), seed, rounds,
|
||||
&okLeft, &errorStringLeft);
|
||||
QByteArray result2 = transformKeyRaw(key.right(16), seed, rounds, &okRight, &errorStringRight);
|
||||
|
||||
QByteArray transformed;
|
||||
|
@ -51,7 +51,7 @@ void TestCsvExporter::cleanUp()
|
||||
void TestCsvExporter::testExport()
|
||||
{
|
||||
Group* groupRoot = m_db->rootGroup();
|
||||
Group* group= new Group();
|
||||
Group* group = new Group();
|
||||
group->setName("Test Group Name");
|
||||
group->setParent(groupRoot);
|
||||
Entry* entry = new Entry();
|
||||
@ -83,10 +83,10 @@ void TestCsvExporter::testEmptyDatabase()
|
||||
void TestCsvExporter::testNestedGroups()
|
||||
{
|
||||
Group* groupRoot = m_db->rootGroup();
|
||||
Group* group= new Group();
|
||||
Group* group = new Group();
|
||||
group->setName("Test Group Name");
|
||||
group->setParent(groupRoot);
|
||||
Group* childGroup= new Group();
|
||||
Group* childGroup = new Group();
|
||||
childGroup->setName("Test Sub Group Name");
|
||||
childGroup->setParent(group);
|
||||
Entry* entry = new Entry();
|
||||
|
@ -42,7 +42,6 @@ private Q_SLOTS:
|
||||
private:
|
||||
Database* m_db;
|
||||
CsvExporter* m_csvExporter;
|
||||
|
||||
};
|
||||
|
||||
#endif // KEEPASSX_TESTCSVEXPORTER_H
|
||||
|
@ -76,6 +76,3 @@ void TestExporter::testToDbExporter()
|
||||
delete dbOrg;
|
||||
delete dbExp;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user