diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2011-08-26 07:54:33 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2011-08-26 07:54:33 (GMT) |
commit | 87136163dcd7ffb8759875bca2b4e559a32167cd (patch) | |
tree | 5c5467759ffdf69d5e62a052fb77fc64d5a54f45 /src/plugins | |
parent | 0c70be512bfc40e8a2a09f60a66b7ecb114e748e (diff) | |
parent | 8f389d20bc01a355a6a1885b5bd1d30bd2ff0c71 (diff) | |
download | Qt-87136163dcd7ffb8759875bca2b4e559a32167cd.zip Qt-87136163dcd7ffb8759875bca2b4e559a32167cd.tar.gz Qt-87136163dcd7ffb8759875bca2b4e559a32167cd.tar.bz2 |
Merge remote-tracking branch 'mainline/4.8'
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/bearer/icd/dbusdispatcher.cpp | 4 | ||||
-rw-r--r-- | src/plugins/bearer/icd/iapconf.cpp | 2 | ||||
-rw-r--r-- | src/plugins/platforms/uikit/README | 4 | ||||
-rw-r--r-- | src/plugins/platforms/uikit/phonon_av/avmediaobject.mm | 2 | ||||
-rw-r--r-- | src/plugins/platforms/uikit/quikitscreen.mm | 2 | ||||
-rw-r--r-- | src/plugins/platforms/uikit/quikitwindow.mm | 31 |
6 files changed, 33 insertions, 12 deletions
diff --git a/src/plugins/bearer/icd/dbusdispatcher.cpp b/src/plugins/bearer/icd/dbusdispatcher.cpp index 60e4640..62dec62 100644 --- a/src/plugins/bearer/icd/dbusdispatcher.cpp +++ b/src/plugins/bearer/icd/dbusdispatcher.cpp @@ -195,7 +195,7 @@ static bool appendVariantToDBusMessage(const QVariant& argument, break; case QVariant::String: { - QByteArray data = argument.toString().toLatin1(); + QByteArray data = argument.toString().toUtf8(); str_data = data.data(); dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_STRING, &str_data); @@ -363,7 +363,7 @@ static QVariant getVariantFromDBusMessage(DBusMessageIter *iter) { case DBUS_TYPE_STRING: { dbus_message_iter_get_basic(iter, &str_data); - QString str(str_data); + QString str(QString::fromUtf8(str_data)); QVariant variant(str); return variant; } diff --git a/src/plugins/bearer/icd/iapconf.cpp b/src/plugins/bearer/icd/iapconf.cpp index a29e326..e326edf 100644 --- a/src/plugins/bearer/icd/iapconf.cpp +++ b/src/plugins/bearer/icd/iapconf.cpp @@ -143,7 +143,7 @@ QVariant IAPConfPrivate::valueToVariant(ConnSettingsValue *value) return QVariant(value->value.bool_val ? true : false); case CONN_SETTINGS_VALUE_STRING: - return QVariant(QString(value->value.string_val)); + return QVariant(QString::fromUtf8(value->value.string_val)); case CONN_SETTINGS_VALUE_DOUBLE: return QVariant(value->value.double_val); diff --git a/src/plugins/platforms/uikit/README b/src/plugins/platforms/uikit/README index 81ef0bd..795e72a 100644 --- a/src/plugins/platforms/uikit/README +++ b/src/plugins/platforms/uikit/README @@ -37,11 +37,11 @@ After configuring and building Qt you need to also build src/plugins/platforms/u Simulator: ---------- -configure -qpa -xplatform qpa/macx-iphonesimulator-g++ -arch i386 -developer-build -release -opengl es2 -no-accessibility -no-qt3support -no-multimedia -no-phonon-backend -no-svg -no-webkit -no-scripttools -no-openssl -no-sql-mysql -no-sql-odbc -no-cups -no-iconv -no-dbus -static -nomake tools -nomake demos -nomake docs -nomake examples -nomake translations +configure -qpa -xplatform qpa/macx-iphonesimulator-g++ -arch i386 -developer-build -release -opengl es2 -no-accessibility -no-qt3support -no-multimedia -no-phonon-backend -no-webkit -no-scripttools -no-openssl -no-sql-mysql -no-sql-odbc -no-cups -no-iconv -no-dbus -static -nomake tools -nomake demos -nomake docs -nomake examples -nomake translations Device: ------- -configure -qpa -xplatform qpa/macx-iphonedevice-g++ -arch armv7 -no-neon -developer-build -release -opengl es2 -no-accessibility -no-qt3support -no-multimedia -no-phonon-backend -no-svg -no-webkit -no-scripttools -no-openssl -no-sql-mysql -no-sql-odbc -no-cups -no-iconv -no-dbus -static -nomake tools -nomake demos -nomake docs -nomake examples -nomake translations +configure -qpa -xplatform qpa/macx-iphonedevice-g++ -arch armv7 -no-neon -developer-build -release -opengl es2 -no-accessibility -no-qt3support -no-multimedia -no-phonon-backend -no-webkit -no-scripttools -no-openssl -no-sql-mysql -no-sql-odbc -no-cups -no-iconv -no-dbus -static -nomake tools -nomake demos -nomake docs -nomake examples -nomake translations 2) XCode setup: - there are examples in the examples subdirectory of the platform plugin diff --git a/src/plugins/platforms/uikit/phonon_av/avmediaobject.mm b/src/plugins/platforms/uikit/phonon_av/avmediaobject.mm index 388866f..9cbddc0 100644 --- a/src/plugins/platforms/uikit/phonon_av/avmediaobject.mm +++ b/src/plugins/platforms/uikit/phonon_av/avmediaobject.mm @@ -60,7 +60,7 @@ - (id)initWithMediaObject:(AVMediaObject *)obj { - if (self = [self init]) { + if ((self = [self init])) { mediaObject = obj; } return self; diff --git a/src/plugins/platforms/uikit/quikitscreen.mm b/src/plugins/platforms/uikit/quikitscreen.mm index d7d8207..3c1e360 100644 --- a/src/plugins/platforms/uikit/quikitscreen.mm +++ b/src/plugins/platforms/uikit/quikitscreen.mm @@ -56,7 +56,7 @@ QUIKitScreen::QUIKitScreen(int screenIndex) CGRect bounds = [uiScreen() bounds]; m_geometry = QRect(bounds.origin.x, bounds.origin.y, bounds.size.width, bounds.size.height); - m_format = QImage::Format_ARGB32; + m_format = QImage::Format_ARGB32_Premultiplied; m_depth = 24; diff --git a/src/plugins/platforms/uikit/quikitwindow.mm b/src/plugins/platforms/uikit/quikitwindow.mm index 6e018fe..640b92e 100644 --- a/src/plugins/platforms/uikit/quikitwindow.mm +++ b/src/plugins/platforms/uikit/quikitwindow.mm @@ -53,6 +53,23 @@ #include <QtDebug> +static GLint stencilBits() +{ + static GLint bits; + static bool initialized = false; + if (!initialized) { + glGetIntegerv(GL_STENCIL_BITS, &bits); + initialized = true; + } + return bits; +} + +static GLint depthBits() +{ + // we can choose between GL_DEPTH24_STENCIL8_OES and GL_DEPTH_COMPONENT16 + return stencilBits() > 0 ? 24 : 16; +} + class EAGLPlatformContext : public QPlatformGLContext { public: @@ -60,13 +77,13 @@ public: : mView(view) { mFormat.setWindowApi(QPlatformWindowFormat::OpenGL); - mFormat.setDepthBufferSize(24); + mFormat.setDepthBufferSize(depthBits()); mFormat.setAccumBufferSize(0); mFormat.setRedBufferSize(8); mFormat.setGreenBufferSize(8); mFormat.setBlueBufferSize(8); mFormat.setAlphaBufferSize(8); - mFormat.setStencilBufferSize(8); + mFormat.setStencilBufferSize(stencilBits()); mFormat.setSamples(0); mFormat.setSampleBuffers(false); mFormat.setDoubleBuffer(true); @@ -74,7 +91,7 @@ public: mFormat.setRgba(true); mFormat.setAlpha(true); mFormat.setAccum(false); - mFormat.setStencil(true); + mFormat.setStencil(stencilBits() > 0); mFormat.setStereo(false); mFormat.setDirectRendering(false); @@ -203,9 +220,13 @@ private: glGenRenderbuffers(1, &mDepthRenderbuffer); glBindRenderbuffer(GL_RENDERBUFFER, mDepthRenderbuffer); - glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8_OES, mFramebufferWidth, mFramebufferHeight); + if (stencilBits() > 0) { + glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8_OES, mFramebufferWidth, mFramebufferHeight); + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, mDepthRenderbuffer); + } else { + glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT16, mFramebufferWidth, mFramebufferHeight); + } glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, mDepthRenderbuffer); - glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, mDepthRenderbuffer); if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) NSLog(@"Failed to make complete framebuffer object %x", glCheckFramebufferStatus(GL_FRAMEBUFFER)); |