Qt5 resource clean-up in exit handler cause several unexpected
behaviors include segmentation fault. So it is moved inside
main() function, then clean-up is done before main function exit.
Change-Id: I4f53d531261f376de869e9c286bd700f9acbf726
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
}
}
-static void maru_qt5_display_fini(void)
+// should be called before exit main()
+void maru_qt5_display_fini(void)
{
if (qt5_console) {
g_free(qt5_console);
if (full_screen) {
/* TODO */
}
- atexit(maru_qt5_display_fini);
/* TODO
mouse_mode_notifier.notify = qt2_mouse_mode_change;
void maru_early_qt5_display_init(bool isOnscreen);
void maru_qt5_display_init(DisplayState *ds, int full_screen);
+void maru_qt5_display_fini(void);
void set_display_pixel_density(int dpi);
int get_display_pixel_density(void);
qDebug("destroy rotary view");
timer->stop();
-
- scene()->clear();
}
tpm_cleanup();
#endif
+#if defined(CONFIG_MARU) && defined(CONFIG_QT)
+ switch (display_type) {
+ case DT_MARU_QT_ONSCREEN:
+ case DT_MARU_QT_OFFSCREEN:
+ maru_qt5_display_fini();
+ break;
+ default:
+ break;
+ }
+#endif
+
return 0;
}