Formatting the code.
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user