[BUG] -131087,解决音乐点击收藏和播放,再进收藏歌单点击收藏歌曲播放,取消收藏,音乐闪退问题

This commit is contained in:
chenchen1 2023-06-06 14:42:31 +08:00
parent 919329ab00
commit 089f046601
4 changed files with 34 additions and 6 deletions

View File

@ -223,12 +223,13 @@ bool AllPupWindow::nameIsValid(QString textName)
}
MusicInfoDialog::MusicInfoDialog(musicDataStruct date)
MusicInfoDialog::MusicInfoDialog(QWidget *parent)
:QDialog(parent)
{
this->setAutoFillBackground(true);
this->setBackgroundRole(QPalette::Base);
this->setWindowTitle(tr("Music Player"));
musicDate = date;
// musicDate = date;
initStyle();
}
@ -237,6 +238,22 @@ MusicInfoDialog::~MusicInfoDialog()
}
void MusicInfoDialog::setMusicDataStruct(musicDataStruct data)
{
musicDate = data;
if(musicDate.title != "")
{
songNameLabel->setText(tr("Song Name : ") + musicDate.title);
singerLabel ->setText(tr("Singer : ") + musicDate.singer);
albumLabel ->setText(tr("Album : ") + musicDate.album);
fileTypeLabel->setText(tr("File Type : ") + musicDate.filetype);
fileSizeLable->setText(tr("File Size : ") + musicDate.size);
fileTimeLabel->setText(tr("File Time : ") + musicDate.time);
filePathLabel->setText(tr("File Path : ") + musicDate.filepath);
}
}
void MusicInfoDialog::initStyle()
{

View File

@ -76,9 +76,10 @@ class MusicInfoDialog : public QDialog
Q_OBJECT
public:
explicit MusicInfoDialog(musicDataStruct date);
explicit MusicInfoDialog(QWidget *parent = nullptr);
~MusicInfoDialog();
musicDataStruct musicDate;
void setMusicDataStruct(musicDataStruct data);
public Q_SLOTS:
//字体
void slotLableSetFontSize(int size);

View File

@ -365,7 +365,7 @@ void TableOne::showRightMenu(const QPoint &pos)
void TableOne::isDeleteSongs()
{
//确认将选中的歌曲从歌单中删除?
QMessageBox *warn = new QMessageBox(QMessageBox::Warning,tr("Prompt information"),tr("Confirm that the selected song will be deleted from the song list?"),QMessageBox::Yes | QMessageBox::No);
QMessageBox *warn = new QMessageBox(QMessageBox::Warning,tr("Prompt information"),tr("Confirm that the selected song will be deleted from the song list?"),QMessageBox::Yes | QMessageBox::No,Widget::mutual);
warn->setWindowTitle(tr("kylin-music"));
warn->button(QMessageBox::Yes)->setText(tr("Yes"));
warn->button(QMessageBox::No)->setText(tr("No"));
@ -392,7 +392,7 @@ void TableOne::isDeleteLocalSongs()
}
//歌曲从本地删除后不可恢复,是否确定删除?
QMessageBox *warn = new QMessageBox(QMessageBox::Warning,tr("Prompt information"),tr("After the song is deleted from the local, it cannot be resumed. Is it sure to delete?"),QMessageBox::Yes | QMessageBox::No);
QMessageBox *warn = new QMessageBox(QMessageBox::Warning,tr("Prompt information"),tr("After the song is deleted from the local, it cannot be resumed. Is it sure to delete?"),QMessageBox::Yes | QMessageBox::No,Widget::mutual);
warn->button(QMessageBox::Yes)->setText(tr("Yes"));
warn->button(QMessageBox::No)->setText(tr("No"));
int result = warn->exec();
@ -681,7 +681,8 @@ void TableOne::showInfo()
{
int index = tableView->currentIndex().row();
musicDataStruct date = m_model->getItem(index);
infoDialog = new MusicInfoDialog(date);
infoDialog = new MusicInfoDialog(Widget::mutual);
infoDialog->setMusicDataStruct(date);
// connect(infoDialog,&MusicInfoDialog::accepted,infoDialog,&MusicInfoDialog::deleteLater);
// connect(infoDialog,&MusicInfoDialog::rejected,infoDialog,&MusicInfoDialog::deleteLater);
//将弹窗应用居中显示

9
debian/changelog vendored
View File

@ -1,3 +1,12 @@
kylin-music (1.1.0.47-ok6~0719) yangtze; urgency=medium
* [BUG]
- close-cd: #131087, 解决音乐点击收藏和播放,再进收藏歌单点击收藏歌曲播放,取消收藏,音乐闪退问题
* 其他: 无
-- chenchen1 <chenchen1@kylinos.cn> Tue, 06 Jun 2023 14:10:08 +0800
kylin-music (1.1.0.47-ok6~0718) yangtze; urgency=medium
* [BUG]