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,34 +22,34 @@
#include <QKeyEvent>
namespace olive {
FocusableLineEdit::FocusableLineEdit(QWidget *parent) :
QLineEdit(parent)
namespace olive
{
FocusableLineEdit::FocusableLineEdit(QWidget *parent)
: QLineEdit(parent)
{
}
void FocusableLineEdit::keyPressEvent(QKeyEvent *e)
{
switch (e->key()) {
case Qt::Key_Return:
case Qt::Key_Enter:
emit Confirmed();
break;
case Qt::Key_Escape:
emit Cancelled();
break;
default:
QLineEdit::keyPressEvent(e);
}
switch (e->key()) {
case Qt::Key_Return:
case Qt::Key_Enter:
emit Confirmed();
break;
case Qt::Key_Escape:
emit Cancelled();
break;
default:
QLineEdit::keyPressEvent(e);
}
}
void FocusableLineEdit::focusOutEvent(QFocusEvent *e)
{
QLineEdit::focusOutEvent(e);
QLineEdit::focusOutEvent(e);
emit Confirmed();
emit Confirmed();
}
}
@@ -25,25 +25,23 @@
#include "common/define.h"
namespace olive {
class FocusableLineEdit : public QLineEdit
namespace olive
{
Q_OBJECT
class FocusableLineEdit : public QLineEdit {
Q_OBJECT
public:
FocusableLineEdit(QWidget* parent = nullptr);
FocusableLineEdit(QWidget *parent = nullptr);
signals:
void Confirmed();
void Confirmed();
void Cancelled();
void Cancelled();
protected:
void keyPressEvent(QKeyEvent *) override;
void focusOutEvent(QFocusEvent *) override;
void keyPressEvent(QKeyEvent *) override;
void focusOutEvent(QFocusEvent *) override;
};
}