aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2018-02-07 16:00:40 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2018-02-07 16:00:40 +0800
commita667b0719a31bfac32cff5f77bd1a52aee204ce3 (patch)
tree329232a020f37e03913d1ba6c9eb464041cc658a
parent6f222c24e3f3d53657afce3d252a6d3bce5f269a (diff)
downloadQMidiPlayer-a667b0719a31bfac32cff5f77bd1a52aee204ce3.tar.xz
Forgot to unregister UI hooks.
Seems that I've forgotten about the changelog too.
-rw-r--r--ChangeLog9
-rw-r--r--visualization/qmpvisualization.cpp12
-rw-r--r--visualization/qmpvisualization.hpp1
3 files changed, 18 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index a46c569..9750326 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2018-02-07 0.8.6 alpha
+Forgot to unregister UI hooks.
+
+2018-02-03 0.8.6 alpha
+Minor performance improvement to the 3D visualization.
+
+2018-01-29 0.8.6 alpha
+Fixed FTBFS with Qt 5.6.
+
2017-10-18 0.8.6 alpha
API changes:
- Lots of renaming.
diff --git a/visualization/qmpvisualization.cpp b/visualization/qmpvisualization.cpp
index b4a9b7f..c1208f2 100644
--- a/visualization/qmpvisualization.cpp
+++ b/visualization/qmpvisualization.cpp
@@ -759,10 +759,10 @@ void qmpVisualization::init()
memset(spectra,0,sizeof(spectra));
memset(spectrar,0,sizeof(spectrar));
api->registerFunctionality(this,"Visualization","Visualization",api->isDarkTheme()?":/img/visualization_i.svg":":/img/visualization.svg",0,true);
- api->registerUIHook("main.start",qmpVisualization::cbstart,(void*)this);
- api->registerUIHook("main.stop",qmpVisualization::cbstop,(void*)this);
- api->registerUIHook("main.pause",qmpVisualization::cbpause,(void*)this);
- api->registerUIHook("main.reset",qmpVisualization::cbreset,(void*)this);
+ uihb=api->registerUIHook("main.start",qmpVisualization::cbstart,(void*)this);
+ uihs=api->registerUIHook("main.stop",qmpVisualization::cbstop,(void*)this);
+ uihp=api->registerUIHook("main.pause",qmpVisualization::cbpause,(void*)this);
+ uihr=api->registerUIHook("main.reset",qmpVisualization::cbreset,(void*)this);
herif=api->registerEventReaderIntf(cb,NULL);
hehif=api->registerEventHandlerIntf(hcb,NULL);
hfrf=api->registerFileReadFinishedHandlerIntf(frcb,NULL);
@@ -836,6 +836,10 @@ void qmpVisualization::deinit()
{
if(!api)return;close();tspool.clear();
for(unsigned i=0;i<pool.size();++i)delete pool[i];pool.clear();
+ api->unregisterUIHook("main.start",uihb);
+ api->unregisterUIHook("main.stop",uihs);
+ api->unregisterUIHook("main.pause",uihp);
+ api->unregisterUIHook("main.reset",uihr);
api->unregisterFunctionality("Visualization");
api->unregisterEventReaderIntf(herif);
api->unregisterEventHandlerIntf(hehif);
diff --git a/visualization/qmpvisualization.hpp b/visualization/qmpvisualization.hpp
index 9d62397..23be1a9 100644
--- a/visualization/qmpvisualization.hpp
+++ b/visualization/qmpvisualization.hpp
@@ -70,6 +70,7 @@ class qmpVisualization:public qmpPluginIntf,public qmpFuncBaseIntf
double etps;
bool shouldclose,playing;
int herif,hehif,hfrf;
+ int uihb,uihs,uihp,uihr;
std::vector<std::pair<uint32_t,uint32_t>>tspool;
int traveld[16][128];bool notestatus[16][128],lastnotestatus[16][128];
int spectra[16][128],spectrar[16][128];