From: GiWoong Kim Date: Mon, 26 Oct 2015 02:40:16 +0000 (+0900) Subject: ui: initialize class-member variables X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.2~200 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=40802012a9069f4bcce4e330ad637ad244184fa6;p=sdk%2Femulator%2Fqemu.git ui: initialize class-member variables 1. initialize class-member variables 2. delete unnecessary null checking Change-Id: Ie20dfc5789f7d9be8cb08487c7bfe460507bcb2c Signed-off-by: GiWoong Kim --- diff --git a/tizen/src/ui/displaybase.cpp b/tizen/src/ui/displaybase.cpp index 1ae658787a..9532f1f64f 100644 --- a/tizen/src/ui/displaybase.cpp +++ b/tizen/src/ui/displaybase.cpp @@ -57,15 +57,16 @@ DisplayBase::DisplayBase(DisplayType *displayForm, QSize resolution, qreal scale this->offGuide = NULL; this->offGuideShown = false; + this->isTouch = is_touchscreen_enabled(); + + /* touch screen */ this->tsHelper = new TouchScreenHelper(this); - isTouch = is_touchscreen_enabled(); - if (!isTouch) { - prevX = 0; - prevY = 0; - lastMouseTime.tv_sec = 0; - mouseStatus = MOUSE_LEAVE; - } + /* mouse */ + this->prevX = 0; + this->prevY = 0; + this->lastMouseTime.tv_sec = 0; + this->mouseStatus = MOUSE_LEAVE; win->getMainView()->getKbdHelper()->setMtTracker(tsHelper->getMtTracker()); diff --git a/tizen/src/ui/menu/menuitem.h b/tizen/src/ui/menu/menuitem.h index f7859ebb12..30f7fec3e2 100644 --- a/tizen/src/ui/menu/menuitem.h +++ b/tizen/src/ui/menu/menuitem.h @@ -59,7 +59,7 @@ class MenuItem { public: MenuItem(int type, QString name); - ~MenuItem(); + virtual ~MenuItem(); int getType(); QString getName(); diff --git a/tizen/src/ui/qt5_supplement.cpp b/tizen/src/ui/qt5_supplement.cpp index 184e8b91c3..3bc303a376 100644 --- a/tizen/src/ui/qt5_supplement.cpp +++ b/tizen/src/ui/qt5_supplement.cpp @@ -299,16 +299,14 @@ void qt5_destroy() qt5App->processEvents(QEventLoop::ExcludeUserInputEvents); qt5App->quit(); - if (mainwindow) { -// FIXME: It causes SIGSEGV now... -// delete mainwindow; - mainwindow = NULL; - } +#if 0 + //FIXME: It causes SIGSEGV now... + delete mainwindow; + mainwindow = NULL; +#endif - if (uiInfo) { - delete uiInfo; - uiInfo = NULL; - } + delete uiInfo; + uiInfo = NULL; } void qt5_early_prepare(bool isOnscreen)