diff options
Diffstat (limited to 'tizen/src/ui/qt5_supplement.cpp')
-rw-r--r-- | tizen/src/ui/qt5_supplement.cpp | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/tizen/src/ui/qt5_supplement.cpp b/tizen/src/ui/qt5_supplement.cpp index 639b9dac74..81202fe124 100644 --- a/tizen/src/ui/qt5_supplement.cpp +++ b/tizen/src/ui/qt5_supplement.cpp @@ -54,6 +54,7 @@ bool is_display_off(void); //using namespace std; bool qt5IsOnscreen; QApplication *qt5App = NULL; +bool isForceLegacy; static int argc = 0; static char *argv[0]; @@ -181,6 +182,7 @@ static void qMessageOutput(QtMsgType type, const QMessageLogContext &context, case QtCriticalMsg: case QtFatalMsg: typeChar = 'S'; + break; default: qFatal("invalid message type"); break; @@ -442,23 +444,17 @@ void qt5_destroy() uiInfo = NULL; } +void qt5_set_force_legacy(bool isLegacy) +{ + isForceLegacy = isLegacy; +} + void qt5_early_prepare(bool isOnscreen) { qt5IsOnscreen = isOnscreen; Q_INIT_RESOURCE(resource); -#ifdef CONFIG_LINUX - /* QGLWidget threading: Note that under X11 it is necessary to set the - * Qt::AA_X11InitThreads application attribute to make the X11 library - * and GLX calls thread safe, otherwise the above scenarios will fail. */ - - /* Calls XInitThreads() as part of the QApplication construction in order - * to make Xlib calls thread-safe. This attribute must be set before - * QApplication is constructed. */ - QCoreApplication::setAttribute(Qt::AA_X11InitThreads); -#endif - qt5App = new QApplication(argc, argv); /* add the path in the application's main() function, right after the @@ -482,11 +478,11 @@ void qt5_prepare(void) void qt5_update_internal(void *data, int width, int height) { - QImage image((uchar *)data, width, height, QImage::Format_RGB32); + QImage image((uchar *)data, width, height, QImage::Format_ARGB32); - mainwindow->getScreenWidget()->setPixmap( - QPixmap::fromImage(image.transformed( - mainwindow->getDisplayMatrix(), Qt::SmoothTransformation))); + mainwindow->getScreenWidget()->setPixmap(QPixmap::fromImage( + image.convertToFormat(QImage::Format_RGB32).transformed( + mainwindow->getDisplayTransform(), Qt::SmoothTransformation))); } void qt5_switch_internal(void) |