ui: fix timeout typo (#28905)
tim is out -> timeout old-commit-hash: d68bd905fc9440352007e115c0f46dc9c0b4e402
This commit is contained in:
@@ -38,7 +38,7 @@ MainWindow::MainWindow(QWidget *parent) : QWidget(parent) {
|
||||
closeSettings();
|
||||
}
|
||||
});
|
||||
QObject::connect(&device, &Device::interactiveTimout, [=]() {
|
||||
QObject::connect(&device, &Device::interactiveTimeout, [=]() {
|
||||
if (main_layout->currentWidget() == settingsWindow) {
|
||||
closeSettings();
|
||||
}
|
||||
@@ -90,9 +90,9 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *event) {
|
||||
case QEvent::TouchEnd:
|
||||
case QEvent::MouseButtonPress:
|
||||
case QEvent::MouseMove: {
|
||||
// ignore events when device is awakened by resetInteractiveTimout
|
||||
// ignore events when device is awakened by resetInteractiveTimeout
|
||||
ignore = !uiState()->awake;
|
||||
device.resetInteractiveTimout();
|
||||
device.resetInteractiveTimeout();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
||||
@@ -275,7 +275,7 @@ void UIState::setPrimeType(int type) {
|
||||
|
||||
Device::Device(QObject *parent) : brightness_filter(BACKLIGHT_OFFROAD, BACKLIGHT_TS, BACKLIGHT_DT), QObject(parent) {
|
||||
setAwake(true);
|
||||
resetInteractiveTimout();
|
||||
resetInteractiveTimeout();
|
||||
|
||||
QObject::connect(uiState(), &UIState::uiUpdate, this, &Device::update);
|
||||
}
|
||||
@@ -297,7 +297,7 @@ void Device::setAwake(bool on) {
|
||||
}
|
||||
}
|
||||
|
||||
void Device::resetInteractiveTimout() {
|
||||
void Device::resetInteractiveTimeout() {
|
||||
interactive_timeout = (ignition_on ? 10 : 30) * UI_FREQ;
|
||||
}
|
||||
|
||||
@@ -335,9 +335,9 @@ void Device::updateWakefulness(const UIState &s) {
|
||||
ignition_on = s.scene.ignition;
|
||||
|
||||
if (ignition_just_turned_off) {
|
||||
resetInteractiveTimout();
|
||||
resetInteractiveTimeout();
|
||||
} else if (interactive_timeout > 0 && --interactive_timeout == 0) {
|
||||
emit interactiveTimout();
|
||||
emit interactiveTimeout();
|
||||
}
|
||||
|
||||
setAwake(s.scene.ignition || interactive_timeout > 0);
|
||||
|
||||
@@ -203,10 +203,10 @@ private:
|
||||
|
||||
signals:
|
||||
void displayPowerChanged(bool on);
|
||||
void interactiveTimout();
|
||||
void interactiveTimeout();
|
||||
|
||||
public slots:
|
||||
void resetInteractiveTimout();
|
||||
void resetInteractiveTimeout();
|
||||
void update(const UIState &s);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user