From e90d99a2ea23dbe826c520625c66e84bd856f244 Mon Sep 17 00:00:00 2001 From: egisz Date: Sat, 31 Oct 2020 06:12:46 +0000 Subject: [PATCH] fix building warnings --- src/autoapp/UI/MainWindow.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/autoapp/UI/MainWindow.cpp b/src/autoapp/UI/MainWindow.cpp index 03895c8..f97f195 100644 --- a/src/autoapp/UI/MainWindow.cpp +++ b/src/autoapp/UI/MainWindow.cpp @@ -765,7 +765,6 @@ void f1x::openauto::autoapp::ui::MainWindow::on_horizontalSliderBrightness_value void f1x::openauto::autoapp::ui::MainWindow::on_horizontalSliderVolume_valueChanged(int value) { - int n = snprintf(this->volume_str, 5, "%d", value); QString vol=QString::number(value); ui_->volumeValueLabel->setText(vol+"%"); system(("/usr/local/bin/autoapp_helper setvolume " + std::to_string(value) + "&").c_str()); @@ -1259,7 +1258,7 @@ void f1x::openauto::autoapp::ui::MainWindow::on_mp3List_itemClicked(QListWidgetI void f1x::openauto::autoapp::ui::MainWindow::metaDataChanged() { - QString fullpathplaying = player->currentMedia().canonicalUrl().toString(); + QString fullpathplaying = player->currentMedia().request().url().toString(); QString filename = QFileInfo(fullpathplaying).fileName(); QImage img = player->metaData(QMediaMetaData::CoverArtImage).value(); @@ -1688,8 +1687,9 @@ void f1x::openauto::autoapp::ui::MainWindow::keyPressEvent(QKeyEvent *event) on_pushButtonPlayerNextAlbum_clicked(); } } - if (event->key() == Qt::Key_Return || event->key() == Qt::Key_Return) { + if (event->key() == Qt::Key_Return) { QApplication::postEvent (QApplication::focusWidget(), new QKeyEvent ( QEvent::KeyPress, Qt::Key_Space, Qt::NoModifier)); + QApplication::postEvent (QApplication::focusWidget(), new QKeyEvent ( QEvent::KeyRelease, Qt::Key_Space, Qt::NoModifier)); } if (event->key() == Qt::Key_1) { QApplication::postEvent (QApplication::focusWidget(), new QKeyEvent ( QEvent::KeyPress, Qt::Key_Tab, Qt::ShiftModifier));