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 c2d7a1c..307a1e2 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 ed39643..12d4f4f 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 89cbf7f..836af47 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 c3e318e..cbea320 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);