diff options
author | Arno <arno@disconnect.de> | 2017-03-07 08:32:53 +0100 |
---|---|---|
committer | Arno <arno@disconnect.de> | 2017-03-07 08:32:53 +0100 |
commit | fad486922aa8ac8a4e55bd154bd8817f759d7ebd (patch) | |
tree | d2066e64c7cc63d9be7eb1d7026122816428e8e7 | |
parent | f8029800e3564a194d6c13729620f1d2f450e5e0 (diff) | |
download | BeetPlayer-fad486922aa8ac8a4e55bd154bd8817f759d7ebd.tar.gz BeetPlayer-fad486922aa8ac8a4e55bd154bd8817f759d7ebd.tar.bz2 BeetPlayer-fad486922aa8ac8a4e55bd154bd8817f759d7ebd.zip |
Set correct window title when changing from pause to play
-rw-r--r-- | playerwidget.cpp | 5 | ||||
-rw-r--r-- | playerwidget.h | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/playerwidget.cpp b/playerwidget.cpp index d32d383..b454908 100644 --- a/playerwidget.cpp +++ b/playerwidget.cpp @@ -559,6 +559,7 @@ void PlayerWidget::doPlay(){ mPlayer->play(); mPlayA->setChecked(true); emit playModeChanged(tr("Playing")); + emit setWinTitle(mCurWinTitle); return; } int playListCount = mPlayListModel->rowCount(); @@ -849,8 +850,8 @@ void PlayerWidget::play(const QString &fullPath){ mCurrentTE->append(QString("%1 %2:%3").arg(tr("Length:"), -20).arg(minutes, 2, 10, QChar('0')).arg(seconds, 2, 10, QChar('0'))); QString msg = QString("File: %1").arg(fullPath); emit message(msg); - QString winTitle = QString(tr("%1 [%2 - %3 - %4]")).arg(qApp->applicationName()).arg(artist).arg(album).arg(title); - emit setWinTitle(winTitle); + mCurWinTitle = QString(tr("%1 [%2 - %3 - %4]")).arg(qApp->applicationName()).arg(artist).arg(album).arg(title); + emit setWinTitle(mCurWinTitle); mPlayer->play(); mPlayA->setChecked(true); emit playModeChanged(tr("Playing")); diff --git a/playerwidget.h b/playerwidget.h index 45c81ad..0218fde 100644 --- a/playerwidget.h +++ b/playerwidget.h @@ -102,6 +102,7 @@ class PlayerWidget : public QWidget { qint64 mDurSecs; quint64 mPlayListLength; QString mCurDir; + QString mCurWinTitle; }; #endif // PLAYERWIDGET_H |