Commit 88b43b2c authored by Paweł Wegner's avatar Paweł Wegner
Browse files

Cloudbrowser: window manages pause.

parent e5a78c5d
...@@ -178,11 +178,15 @@ void Window::onPlayFileFromUrl(QString url) { ...@@ -178,11 +178,15 @@ void Window::onPlayFileFromUrl(QString url) {
} }
void Window::keyPressEvent(QKeyEvent* e) { void Window::keyPressEvent(QKeyEvent* e) {
QQuickView::keyPressEvent(e);
if (e->isAccepted() && contentItem()->hasFocus()) return;
if (e->key() == Qt::Key_Q) { if (e->key() == Qt::Key_Q) {
stop(); stop();
e->accept(); e->accept();
} else if (e->key() == Qt::Key_P) {
media_player_.pause();
e->accept();
} }
QQuickView::keyPressEvent(e);
} }
void Window::clearCurrentDirectoryList() { void Window::clearCurrentDirectoryList() {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment