Format code using clang-format

This commit is contained in:
Luis Ángel San Martín
2019-05-30 19:46:37 +02:00
parent e0eb94e3ae
commit e3ec56aa43
356 changed files with 19824 additions and 21874 deletions

View File

@ -4,7 +4,7 @@
#include "reading_list_model.h"
YACReaderReadingListsView::YACReaderReadingListsView(QWidget *parent)
:YACReaderTreeView(parent)
: YACReaderTreeView(parent)
{
setItemDelegate(new YACReaderReadingListsViewItemDeletegate(this));
setUniformRowHeights(false);
@ -19,38 +19,34 @@ void YACReaderReadingListsView::dragEnterEvent(QDragEnterEvent *event)
/*QModelIndex destinationIndex = indexAt(event->pos());
if(model()->canDropMimeData(event->mimeData(), event->proposedAction(), destinationIndex.row(), destinationIndex.column(), destinationIndex.parent()))*/
event->acceptProposedAction();
event->acceptProposedAction();
}
void YACReaderReadingListsView::dragMoveEvent(QDragMoveEvent *event)
{
YACReaderTreeView::dragMoveEvent(event);
QModelIndex destinationIndex = indexAt(event->pos());
if(model()->canDropMimeData(event->mimeData(), event->proposedAction(), destinationIndex.row(), destinationIndex.column(), destinationIndex.parent()))
if (model()->canDropMimeData(event->mimeData(), event->proposedAction(), destinationIndex.row(), destinationIndex.column(), destinationIndex.parent()))
event->acceptProposedAction();
}
void YACReaderReadingListsView::dropEvent(QDropEvent *event)
{
YACReaderTreeView::dropEvent(event);
}
//----------------------------------------------------------------------
YACReaderReadingListsViewItemDeletegate::YACReaderReadingListsViewItemDeletegate(QObject *parent)
:QStyledItemDelegate(parent)
: QStyledItemDelegate(parent)
{
}
void YACReaderReadingListsViewItemDeletegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
{
ReadingListModel::TypeList typeList = (ReadingListModel::TypeList)index.data(ReadingListModel::TypeListsRole).toInt();
if(typeList == ReadingListModel::Separator)
{
if (typeList == ReadingListModel::Separator) {
return;
}
@ -61,8 +57,7 @@ QSize YACReaderReadingListsViewItemDeletegate::sizeHint(const QStyleOptionViewIt
{
ReadingListModel::TypeList typeList = (ReadingListModel::TypeList)index.data(ReadingListModel::TypeListsRole).toInt();
if(typeList == ReadingListModel::Separator)
{
if (typeList == ReadingListModel::Separator) {
QSize newSize = QStyledItemDelegate::sizeHint(option, index);
newSize.setHeight(7);
return newSize;