diff options
author | Chris Xiong <chirs241097@gmail.com> | 2017-01-15 22:08:35 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2017-01-15 22:08:35 +0800 |
commit | 8a0d671e1a77c58142d0cbe82f40ee64bcae2be5 (patch) | |
tree | cb7ce958d02f2bb9e00581a56c28120800521a93 /qmidiplayer-desktop/qmpplistwindow.cpp | |
parent | b7842ae90b28618affdad6977c9c814aa573a3fe (diff) | |
download | QMidiPlayer-8a0d671e1a77c58142d0cbe82f40ee64bcae2be5.tar.xz |
A little code refactoring.
Diffstat (limited to 'qmidiplayer-desktop/qmpplistwindow.cpp')
-rw-r--r-- | qmidiplayer-desktop/qmpplistwindow.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qmidiplayer-desktop/qmpplistwindow.cpp b/qmidiplayer-desktop/qmpplistwindow.cpp index 00eec59..75e2e44 100644 --- a/qmidiplayer-desktop/qmpplistwindow.cpp +++ b/qmidiplayer-desktop/qmpplistwindow.cpp @@ -285,7 +285,7 @@ void qmpPlistWindow::on_pbLoad_clicked() QSettings* plist=new QSettings(QFileDialog::getOpenFileName(this,tr("Load playlist"),""), QSettings::IniFormat); int fc=plist->value("Playlist/FileCount",0).toInt(); - if(!fc)return; + if(!fc){delete plist;return;} ui->lwFiles->clear();for(int i=1;i<=fc;++i) ui->lwFiles->addItem(plist->value("Playlist/File"+QString("%1").arg(i,5,10,QChar('0')),"").toString()); repeat=plist->value("Playlist/Repeat",0).toInt(); |