Changeset View
Changeset View
Standalone View
Standalone View
src/qt/splashscreen.cpp
Show First 20 Lines • Show All 161 Lines • ▼ Show 20 Lines | void SplashScreen::shutdown() { | ||||
if (m_node) { | if (m_node) { | ||||
m_node->startShutdown(); | m_node->startShutdown(); | ||||
} | } | ||||
} | } | ||||
bool SplashScreen::eventFilter(QObject *obj, QEvent *ev) { | bool SplashScreen::eventFilter(QObject *obj, QEvent *ev) { | ||||
if (ev->type() == QEvent::KeyPress) { | if (ev->type() == QEvent::KeyPress) { | ||||
QKeyEvent *keyEvent = static_cast<QKeyEvent *>(ev); | QKeyEvent *keyEvent = static_cast<QKeyEvent *>(ev); | ||||
if (keyEvent->text()[0] == 'q') { | if (keyEvent->key() == Qt::Key_Q) { | ||||
shutdown(); | shutdown(); | ||||
} | } | ||||
} | } | ||||
return QObject::eventFilter(obj, ev); | return QObject::eventFilter(obj, ev); | ||||
} | } | ||||
void SplashScreen::finish() { | void SplashScreen::finish() { | ||||
/* If the window is minimized, hide() will be ignored. */ | /* If the window is minimized, hide() will be ignored. */ | ||||
▲ Show 20 Lines • Show All 84 Lines • Show Last 20 Lines |