From: Jinhyung Jo Date: Mon, 12 Sep 2016 05:29:16 +0000 (+0900) Subject: Merge branch 'features/newscreen' into develop X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.2~26^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a572eb13164d46afb24394022c166a19cd552d70;p=sdk%2Femulator%2Fqemu.git Merge branch 'features/newscreen' into develop Conflicts: tizen/src/ui/qt5_supplement.cpp Change-Id: Icd310f98594684aa96142b1a7c1af767d3cb16c5 Signed-off-by: Jinhyung Jo --- a572eb13164d46afb24394022c166a19cd552d70 diff --cc tizen/src/ui/qt5_supplement.cpp index 639b9dac74,50e8e1c468..016a2ec98c --- a/tizen/src/ui/qt5_supplement.cpp +++ b/tizen/src/ui/qt5_supplement.cpp @@@ -52,8 -49,14 +53,10 @@@ bool is_display_off(void) } //using namespace std; -void qMessageOutput(QtMsgType, const QMessageLogContext &, const QString &); -void loadMainFormFromXML(QString, UiInformation *); -void loadConFormFromXML(QFile *, UiInformation *); - bool qt5IsOnscreen; QApplication *qt5App = NULL; + QOpenGLContext *qt5GLContext; + bool isForceLegacy; static int argc = 0; static char *argv[0]; @@@ -549,3 -459,127 +580,10 @@@ void qt5_process_captured(bool captured mainwindow->processCaptured(captured, pixels, width, height); } } + + void qt5_update_texture(unsigned int tex_id) + { + if (mainwindow) { + mainwindow->updateTexture(tex_id); + } + } - -void qMessageOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg) -{ - QByteArray localMsg = msg.toLocal8Bit(); - QByteArray dateMsg = QDateTime::currentDateTime().toString("hh:mm:ss.zzz").toLocal8Bit(); - - QString path = context.file; - QByteArray fname = NULL; - int posFname = path.lastIndexOf('/') + 1; - int posDot = path.lastIndexOf('.'); - - if (( posFname != 0 ) && ( posDot != -1)) { - int fnameLen = path.length() - posFname; - path = path.right(fnameLen); - fnameLen = posDot - posFname; - path.truncate(fnameLen); - } - fname = path.toLocal8Bit(); - - switch (type) { - case QtDebugMsg: - fprintf(stdout, "%s|%5d|I|%10.10s|%4u|%s\n", dateMsg.constData(), - qemu_get_thread_id(), fname.trimmed().constData(), context.line, - localMsg.trimmed().constData()); - break; - case QtWarningMsg: - fprintf(stdout, "%s|%5d|W|%10.10s|%4u|%s\n", dateMsg.constData(), - qemu_get_thread_id(), fname.trimmed().constData(), context.line, - localMsg.trimmed().constData()); - break; - case QtCriticalMsg: - fprintf(stderr, "%s|%5d|S|%10.10s|%4u|%s\n", dateMsg.constData(), - qemu_get_thread_id(), fname.trimmed().constData(), context.line, - localMsg.trimmed().constData()); - break; - case QtFatalMsg: - fprintf(stderr, "%s|%5d|S|%10.10s|%4u|%s\n", dateMsg.constData(), - qemu_get_thread_id(), fname.trimmed().constData(), context.line, - localMsg.trimmed().constData()); - { - QString err; - QMessageBox::critical(0, EMULATOR_TITLE, - QString(MSG_INTERNAL_ERR) + - err.sprintf("%s", (localMsg.trimmed()).constData()) + - MSG_EMULATOR_EXIT); - } - - abort(); - default: - qFatal("invalid message type"); - break; - } -} - -void loadMainFormFromXML(QString xmlPath, UiInformation *uiInfo/* out */) -{ - QFile file(xmlPath); - - if (file.exists() == false || - file.open(QIODevice::ReadOnly | QIODevice::Text) == false) { - qFatal("Failed to load the emulator skin. %s%s", MSG_CHECK_PATH, - qPrintable(xmlPath)); - return; - } - - qDebug("main form is loaded from %s", qPrintable(file.fileName())); - - /* read xml */ - QXmlStreamReader xml(&file); - - /* parse xml */ - QFileInfo fileInfo(xmlPath); - XmlLayoutParser parser(fileInfo.absolutePath(), uiInfo); - QString version = parser.parseEmulatorUI(xml); - qDebug() << "* main layout version:" << version; - - const bool hasError = xml.hasError(); - xml.clear(); - file.close(); - - if (hasError == true) { - qFatal("%s %s%s", MSG_INVALID_XML_FORMAT, MSG_CHECK_PATH, - qPrintable(xmlPath)); - return; - } -} - -void loadConFormFromXML(QFile *file, UiInformation *uiInfo/* out */) -{ - if (file->exists() == false || - file->open(QIODevice::ReadOnly | QIODevice::Text) == false) { - qWarning() << "Failed to load the controller skin:" << - file->fileName(); - return; - } - - qDebug("controller form is loaded from %s", qPrintable(file->fileName())); - - /* read xml */ - QXmlStreamReader xml(file); - - /* parse xml */ - QFileInfo fileInfo(*file); - XmlLayoutParser parser(fileInfo.absolutePath(), uiInfo); - QString version = parser.parseControllerUI(xml); - qDebug() << "* con layout version:" << version; - - const bool hasError = xml.hasError(); - xml.clear(); - file->close(); - - if (hasError == true) { - qFatal("%s %s%s", MSG_INVALID_XML_FORMAT, MSG_CHECK_PATH, - qPrintable(fileInfo.absoluteFilePath())); - return; - } -}