Formatting the code.

This commit is contained in:
Louis-Bertrand Varin
2018-03-31 16:01:30 -04:00
parent 74efc57369
commit 8324d03f0a
294 changed files with 3796 additions and 3740 deletions

View File

@@ -36,10 +36,10 @@ GroupView::GroupView(Database* db, QWidget* parent)
connect(this, SIGNAL(expanded(QModelIndex)), this, SLOT(expandedChanged(QModelIndex)));
connect(this, SIGNAL(collapsed(QModelIndex)), this, SLOT(expandedChanged(QModelIndex)));
connect(m_model, SIGNAL(rowsInserted(QModelIndex,int,int)), SLOT(syncExpandedState(QModelIndex,int,int)));
connect(m_model, SIGNAL(rowsInserted(QModelIndex, int, int)), SLOT(syncExpandedState(QModelIndex, int, int)));
connect(m_model, SIGNAL(modelReset()), SLOT(modelReset()));
connect(selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), SLOT(emitGroupChanged()));
connect(selectionModel(), SIGNAL(currentChanged(QModelIndex, QModelIndex)), SLOT(emitGroupChanged()));
connect(this, SIGNAL(clicked(QModelIndex)), SLOT(emitGroupPressed(QModelIndex)));
@@ -60,8 +60,7 @@ void GroupView::dragMoveEvent(QDragMoveEvent* event)
{
if (event->keyboardModifiers() & Qt::ControlModifier) {
event->setDropAction(Qt::CopyAction);
}
else {
} else {
event->setDropAction(Qt::MoveAction);
}
@@ -69,7 +68,7 @@ void GroupView::dragMoveEvent(QDragMoveEvent* event)
// entries may only be dropped on groups
if (event->isAccepted() && event->mimeData()->hasFormat("application/x-keepassx-entry")
&& (dropIndicatorPosition() == AboveItem || dropIndicatorPosition() == BelowItem)) {
&& (dropIndicatorPosition() == AboveItem || dropIndicatorPosition() == BelowItem)) {
event->ignore();
}
}
@@ -78,8 +77,7 @@ Group* GroupView::currentGroup()
{
if (currentIndex() == QModelIndex()) {
return nullptr;
}
else {
} else {
return m_model->groupFromIndex(currentIndex());
}
}