Skip to content

Commit 1f2f422

Browse files
author
Olivier ROMAN
committed
format code
1 parent c94f55f commit 1f2f422

9 files changed

+21
-17
lines changed

src/autotype/AutoTypeMatchView.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class CustomSortFilterProxyModel : public QSortFilterProxyModel
2828
{
2929
public:
3030
explicit CustomSortFilterProxyModel(QObject* parent = nullptr)
31-
: QSortFilterProxyModel(parent){};
31+
: QSortFilterProxyModel(parent) {};
3232
~CustomSortFilterProxyModel() override = default;
3333

3434
// Only search the first three columns (ie, ignore sequence column)

src/gui/ApplicationSettingsWidget.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class MouseWheelEventFilter : public QObject
7070
{
7171
public:
7272
explicit MouseWheelEventFilter(QObject* parent)
73-
: QObject(parent){};
73+
: QObject(parent) {};
7474

7575
protected:
7676
bool eventFilter(QObject* obj, QEvent* event) override

src/gui/entry/EntryView.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class PasswordStrengthItemDelegate : public QStyledItemDelegate
3939
{
4040
public:
4141
explicit PasswordStrengthItemDelegate(QObject* parent)
42-
: QStyledItemDelegate(parent){};
42+
: QStyledItemDelegate(parent) {};
4343

4444
void initStyleOption(QStyleOptionViewItem* option, const QModelIndex& index) const override
4545
{

src/gui/group/GroupModel.h

+4-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ class GroupModel : public QAbstractItemModel
2929

3030
public:
3131
explicit GroupModel(Database* db, QObject* parent = nullptr);
32-
const Database* database() const {return m_db;}
32+
const Database* database() const
33+
{
34+
return m_db;
35+
}
3336
void changeDatabase(Database* newDb);
3437
QModelIndex index(Group* group) const;
3538
Group* groupFromIndex(const QModelIndex& index) const;

src/gui/group/GroupView.cpp

+10-9
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ void GroupView::dragMoveEvent(QDragMoveEvent* event)
9898
{
9999
QTreeView::dragMoveEvent(event);
100100

101-
if(event->isAccepted() ){
101+
if (event->isAccepted()) {
102102
// we need to fix the drop action to have the correct cursor icon
103103
fixDropAction(event);
104-
if(event->dropAction() != event->proposedAction()){
104+
if (event->dropAction() != event->proposedAction()) {
105105
event->accept();
106106
}
107107

@@ -113,7 +113,7 @@ void GroupView::dragMoveEvent(QDragMoveEvent* event)
113113
}
114114
}
115115

116-
void GroupView::dropEvent(QDropEvent *event)
116+
void GroupView::dropEvent(QDropEvent* event)
117117
{
118118
fixDropAction(event);
119119
QTreeView::dropEvent(event);
@@ -156,11 +156,12 @@ void GroupView::recInitExpanded(Group* group)
156156
}
157157
}
158158

159-
void GroupView::fixDropAction(QDropEvent *event)
159+
void GroupView::fixDropAction(QDropEvent* event)
160160
{
161161
if (event->keyboardModifiers().testFlag(Qt::ControlModifier) && event->possibleActions().testFlag(Qt::CopyAction)) {
162162
event->setDropAction(Qt::CopyAction);
163-
} else if (event->keyboardModifiers().testFlag(Qt::ShiftModifier) && event->possibleActions().testFlag(Qt::MoveAction)) {
163+
} else if (event->keyboardModifiers().testFlag(Qt::ShiftModifier)
164+
&& event->possibleActions().testFlag(Qt::MoveAction)) {
164165
event->setDropAction(Qt::MoveAction);
165166
} else {
166167
static const QString groupMimeDataType = "application/x-keepassx-group";
@@ -169,18 +170,18 @@ void GroupView::fixDropAction(QDropEvent *event)
169170
bool isGroup = event->mimeData()->hasFormat(groupMimeDataType);
170171
bool isEntry = event->mimeData()->hasFormat(entryMimeDataType);
171172

172-
if(isGroup || isEntry){
173+
if (isGroup || isEntry) {
173174
QByteArray encoded = event->mimeData()->data(isGroup ? groupMimeDataType : entryMimeDataType);
174175
QDataStream stream(&encoded, QIODevice::ReadOnly);
175176

176177
QUuid dbUuid;
177178
QUuid itemUuid;
178179
stream >> dbUuid >> itemUuid;
179180

180-
if(dbUuid != m_model->database()->uuid()){
181-
if(event->possibleActions().testFlag(Qt::CopyAction)){
181+
if (dbUuid != m_model->database()->uuid()) {
182+
if (event->possibleActions().testFlag(Qt::CopyAction)) {
182183
event->setDropAction(Qt::CopyAction);
183-
} else if(event->possibleActions().testFlag(Qt::MoveAction)){
184+
} else if (event->possibleActions().testFlag(Qt::MoveAction)) {
184185
event->setDropAction(Qt::MoveAction);
185186
}
186187
}

src/gui/reports/ReportsWidgetHealthcheck.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ namespace
8080
{
8181
public:
8282
ReportSortProxyModel(QObject* parent)
83-
: QSortFilterProxyModel(parent){};
83+
: QSortFilterProxyModel(parent) {};
8484
~ReportSortProxyModel() override = default;
8585

8686
protected:

src/gui/reports/ReportsWidgetHibp.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ namespace
3737
{
3838
public:
3939
ReportSortProxyModel(QObject* parent)
40-
: QSortFilterProxyModel(parent){};
40+
: QSortFilterProxyModel(parent) {};
4141
~ReportSortProxyModel() override = default;
4242

4343
protected:

src/gui/tag/TagView.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class TagItemDelegate : public QStyledItemDelegate
3131
{
3232
public:
3333
explicit TagItemDelegate(QObject* parent)
34-
: QStyledItemDelegate(parent){};
34+
: QStyledItemDelegate(parent) {};
3535

3636
void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override
3737
{

src/keys/Key.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class Key
2525
{
2626
public:
2727
explicit Key(const QUuid& uuid)
28-
: m_uuid(uuid){};
28+
: m_uuid(uuid) {};
2929
Q_DISABLE_COPY(Key);
3030
virtual ~Key() = default;
3131
virtual QByteArray rawKey() const = 0;

0 commit comments

Comments
 (0)