mirror of
https://gitlab.com/eql/lqml.git
synced 2026-01-25 05:50:47 -08:00
make example work on android; revisions
This commit is contained in:
parent
113386fdae
commit
99ea5a081d
49 changed files with 637 additions and 133 deletions
25
src/cpp/single_shot.cpp
Normal file
25
src/cpp/single_shot.cpp
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#include "single_shot.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
SingleShot::SingleShot(int msec, void* fun)
|
||||
: function(fun) {
|
||||
id = startTimer(msec);
|
||||
}
|
||||
|
||||
void SingleShot::timerEvent(QTimerEvent*) {
|
||||
killTimer(id);
|
||||
const cl_env_ptr l_env = ecl_process_env();
|
||||
CL_CATCH_ALL_BEGIN(l_env) {
|
||||
CL_UNWIND_PROTECT_BEGIN(l_env) {
|
||||
cl_funcall(1, (cl_object)function);
|
||||
}
|
||||
CL_UNWIND_PROTECT_EXIT {}
|
||||
CL_UNWIND_PROTECT_END;
|
||||
}
|
||||
CL_CATCH_ALL_END;
|
||||
deleteLater();
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue