emulator: print Qt version which is linked runtime
authorSeokYeon Hwang <syeon.hwang@samsung.com>
Sat, 14 Nov 2015 07:44:56 +0000 (16:44 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Mon, 16 Nov 2015 05:57:46 +0000 (14:57 +0900)
print_system_info() is called under any circumstances. So it should
contains runtime informataion as many as possible. Now we can
recognize Qt version which is linked runtime even though emulator
rashes before Qt GUI is initialized.

In addition, Logged version format is standardized.

Change-Id: I671861a350e2c2deedae366a7662bf382a00e60a
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
tizen/src/emulator.c
tizen/src/ui/qt5_supplement.cpp
tizen/src/ui/qt5_supplement.h
tizen/src/util/osutil-linux.c

index c2d7a1c0ee514b0a5e631d99dc64cc2d554a1a78..307a1e2f8858201fd02848abf082aae9ee8fe48a 100644 (file)
 #include "skin/maruskin_client.h"
 #endif
 
+#ifdef CONFIG_QT
+#include <qt5_supplement.h>
+#endif
+
 #ifdef CONFIG_SDL
 #include <SDL.h>
 #endif
@@ -196,9 +200,13 @@ void print_system_info(void)
         LOG_INFO("* Current time : %s\n", timeinfo);
     }
 
+#ifdef CONFIG_QT
+    LOG_INFO("* Host Qt version : %s\n", qt5_get_version());
+#endif
+
 #ifdef CONFIG_SDL
     /* Gets the version of the dynamically linked SDL library */
-    LOG_INFO("* Host sdl version : (%d, %d, %d)\n",
+    LOG_INFO("* Host SDL version : %d.%d.%d\n",
             SDL_Linked_Version()->major,
             SDL_Linked_Version()->minor,
             SDL_Linked_Version()->patch);
index ed39643b2497934ec47ff193bd38e1682a2273c4..12d4f4f0ea947040f0130edc6f2beac86ebc3eb7 100644 (file)
@@ -93,7 +93,12 @@ bool EventFilter::nativeEventFilter(const QByteArray &eventType, void *message,
 }
 #endif
 
-void qt5_gui_init(void)
+const char *qt5_get_version(void)
+{
+    return qVersion();
+}
+
+static void qt5_gui_init(void)
 {
     QCoreApplication::setApplicationName(EMULATOR_TITLE);
 
index 89cbf7f34c9b64f91fd00800078a1053f45d460d..836af47ce9e9e29459e216343017fbc6e171a139 100644 (file)
@@ -44,6 +44,8 @@ void qt5_destroy(void);
 void qt5_update_internal(void *data, int width, int height);
 void qt5_switch_internal(void);
 void qt5_refresh_internal(void);
+
+const char* qt5_get_version(void);
 #ifdef __cplusplus
 }
 #endif
index c3e318ee2f5e3c6ea91ff63c458eeda990d455a8..cbea320a34bbfd59b9fc450a9c8d6a8c96934ad3 100644 (file)
@@ -192,7 +192,7 @@ void print_system_info_os(void)
     INFO("* LibPNG Version : %s\n", PNG_LIBPNG_VER_STRING);
 
     /* depends on building */
-    INFO("* QEMU build machine linux kernel version : (%d, %d, %d)\n",
+    INFO("* QEMU build machine linux kernel version : %d.%d.%d\n",
         LINUX_VERSION_CODE >> 16,
         (LINUX_VERSION_CODE >> 8) & 0xff,
         LINUX_VERSION_CODE & 0xff);