aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--qmidiplayer-desktop/qmpcustomizewindow.cpp1
-rw-r--r--qmidiplayer-desktop/qmpmainwindow.cpp5
-rw-r--r--qmidiplayer-desktop/qmpmainwindow.hpp6
3 files changed, 6 insertions, 6 deletions
diff --git a/qmidiplayer-desktop/qmpcustomizewindow.cpp b/qmidiplayer-desktop/qmpcustomizewindow.cpp
index b7017b7..a2ff19c 100644
--- a/qmidiplayer-desktop/qmpcustomizewindow.cpp
+++ b/qmidiplayer-desktop/qmpcustomizewindow.cpp
@@ -44,6 +44,7 @@ void qmpCustomizeWindow::launch(int w)
std::set<std::string> s;
for(auto i=v.begin();i!=v.end();++i)
{
+ if(m.find(*i)==m.end())continue;
s.insert(*i);
QListWidgetItem* it=new QListWidgetItem(
m[*i].icon(),
diff --git a/qmidiplayer-desktop/qmpmainwindow.cpp b/qmidiplayer-desktop/qmpmainwindow.cpp
index 1715539..1df2d8e 100644
--- a/qmidiplayer-desktop/qmpmainwindow.cpp
+++ b/qmidiplayer-desktop/qmpmainwindow.cpp
@@ -625,10 +625,9 @@ void qmpMainWindow::setupWidget()
i->second.setAssignedControl((QReflectiveAction*)nullptr),
i->second.setAssignedControl((QReflectivePushButton*)nullptr);
QList<QWidget*>w=ui->buttonwidget->findChildren<QWidget*>("",Qt::FindDirectChildrenOnly);
- for(unsigned i=0;i<w.size();++i)
- delete w[i];
+ qDeleteAll(w);
QList<QAction*>a=ui->lbFileName->actions();
- for(unsigned i=0;i<a.size();++i)
+ for(int i=0;i<a.size();++i)
{
ui->lbFileName->removeAction(a[i]);
delete a[i];
diff --git a/qmidiplayer-desktop/qmpmainwindow.hpp b/qmidiplayer-desktop/qmpmainwindow.hpp
index ea5209c..c8f3827 100644
--- a/qmidiplayer-desktop/qmpmainwindow.hpp
+++ b/qmidiplayer-desktop/qmpmainwindow.hpp
@@ -86,12 +86,12 @@ class QReflectivePushButton:public QPushButton
class qmpFuncPrivate
{
private:
- qmpFuncBaseIntf* _i;
+ qmpFuncBaseIntf* _i=nullptr;
QIcon _icon;
std::string des;
bool _checkable,checked;
- QReflectiveAction* asgna;
- QReflectivePushButton* asgnb;
+ QReflectiveAction* asgna=nullptr;
+ QReflectivePushButton* asgnb=nullptr;
public:
qmpFuncPrivate(){}
qmpFuncPrivate(qmpFuncBaseIntf* i,std::string _desc,const char* icon,int iconlen,bool checkable);