change: change code style to Linux style except indent.

This commit is contained in:
Mike Solar
2025-08-03 03:09:40 +08:00
parent 65ab76edc8
commit 74f73ab3be
789 changed files with 77113 additions and 68888 deletions
@@ -22,36 +22,37 @@
#include <QMouseEvent>
namespace olive {
ProjectExplorerListViewBase::ProjectExplorerListViewBase(QWidget *parent) :
QListView(parent)
namespace olive
{
// FIXME Is this necessary?
setMovement(QListView::Free);
// Set selection mode (allows multiple item selection)
setSelectionMode(QAbstractItemView::ExtendedSelection);
ProjectExplorerListViewBase::ProjectExplorerListViewBase(QWidget *parent)
: QListView(parent)
{
// FIXME Is this necessary?
setMovement(QListView::Free);
// Set resize mode
setResizeMode(QListView::Adjust);
// Set selection mode (allows multiple item selection)
setSelectionMode(QAbstractItemView::ExtendedSelection);
// Set widget to emit a signal on right click
setContextMenuPolicy(Qt::CustomContextMenu);
// Set resize mode
setResizeMode(QListView::Adjust);
// Set widget to emit a signal on right click
setContextMenuPolicy(Qt::CustomContextMenu);
}
void ProjectExplorerListViewBase::mouseDoubleClickEvent(QMouseEvent *event)
{
// Cache here so if the index becomes invalid after the base call, we still know the truth
bool item_at_location = indexAt(event->pos()).isValid();
// Cache here so if the index becomes invalid after the base call, we still know the truth
bool item_at_location = indexAt(event->pos()).isValid();
// Perform default double click functions
QListView::mouseDoubleClickEvent(event);
// Perform default double click functions
QListView::mouseDoubleClickEvent(event);
// QAbstractItemView already has a doubleClicked() signal, but we emit another here for double clicking empty space
if (!item_at_location) {
emit DoubleClickedEmptyArea();
}
// QAbstractItemView already has a doubleClicked() signal, but we emit another here for double clicking empty space
if (!item_at_location) {
emit DoubleClickedEmptyArea();
}
}
}