summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--playerwidget.cpp5
-rw-r--r--playerwidget.h1
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