diff options
-rwxr-xr-x | configure | 4 | ||||
-rw-r--r-- | qmake/generators/mac/pbuilder_pbx.cpp | 2 | ||||
-rw-r--r-- | qmake/generators/unix/unixmake2.cpp | 4 | ||||
-rw-r--r-- | src/corelib/io/qfilesystemengine_unix.cpp | 11 | ||||
-rw-r--r-- | src/corelib/io/qfilesystemwatcher_fsevents.cpp | 24 | ||||
-rw-r--r-- | src/corelib/io/qfilesystemwatcher_fsevents_p.h | 4 | ||||
-rw-r--r-- | src/gui/egl/qegl_p.h | 10 | ||||
-rw-r--r-- | src/gui/kernel/qapplication_qws.cpp | 5 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_qpa.cpp | 10 | ||||
-rw-r--r-- | src/network/kernel/kernel.pri | 2 | ||||
-rw-r--r-- | src/network/ssl/qsslsocket_openssl.cpp | 6 | ||||
-rw-r--r-- | src/network/ssl/qsslsocket_p.h | 4 | ||||
-rw-r--r-- | src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 33 |
13 files changed, 95 insertions, 24 deletions
@@ -3272,14 +3272,14 @@ fi # process CFG_MAC_ARCHS if [ "$PLATFORM_MAC" = "yes" ]; then # check -arch arguments for validity. - ALLOWED="x86 ppc x86_64 ppc64 i386" + ALLOWED="x86 ppc x86_64 ppc64 i386 arm armv6 armv7" # Save the list so we can re-write it using only valid values CFG_MAC_ARCHS_IN="$CFG_MAC_ARCHS" CFG_MAC_ARCHS= for i in $CFG_MAC_ARCHS_IN do if echo "$ALLOWED" | grep -w -v "$i" > /dev/null 2>&1; then - echo "Unknown architecture: \"$i\". Supported architectures: x86[i386] ppc x86_64 ppc64"; + echo "Unknown architecture: \"$i\". Supported architectures: x86[i386] ppc x86_64 ppc64 arm armv6 armv7"; exit 2; fi if [ "$i" = "i386" -o "$i" = "x86" ]; then diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp index b7aec00..9a87eb6 100644 --- a/qmake/generators/mac/pbuilder_pbx.cpp +++ b/qmake/generators/mac/pbuilder_pbx.cpp @@ -1324,6 +1324,8 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) t << "\t\t\t\t" << writeSettings("DYLIB_COMPATIBILITY_VERSION", project->first("COMPAT_VERSION")) << ";" << "\n"; if(!project->isEmpty("QMAKE_MACOSX_DEPLOYMENT_TARGET")) t << "\t\t\t\t" << writeSettings("MACOSX_DEPLOYMENT_TARGET", project->first("QMAKE_MACOSX_DEPLOYMENT_TARGET")) << ";" << "\n"; + if(!project->isEmpty("QMAKE_IPHONEOS_DEPLOYMENT_TARGET")) + t << "\t\t\t\t" << writeSettings("IPHONEOS_DEPLOYMENT_TARGET", project->first("QMAKE_IPHONEOS_DEPLOYMENT_TARGET")) << ";" << "\n"; if(pbVersion >= 38) { if(!project->isEmpty("OBJECTS_DIR")) t << "\t\t\t\t" << writeSettings("OBJROOT", fixForOutput(project->first("OBJECTS_DIR"))) << ";" << "\n"; diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index 30d7822..fc951b1 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -179,6 +179,10 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) t << "export MACOSX_DEPLOYMENT_TARGET = " //exported to children processes << project->first("QMAKE_MACOSX_DEPLOYMENT_TARGET") << endl; + if(!project->isEmpty("QMAKE_IPHONEOS_DEPLOYMENT_TARGET")) + t << "export IPHONEOS_DEPLOYMENT_TARGET = " //exported to children processes + << project->first("QMAKE_IPHONEOS_DEPLOYMENT_TARGET") << endl; + if (!project->isEmpty("QMAKE_SYMBIAN_SHLIB")) { t << "vpath %.dso " << project->values("QMAKE_LIBDIR").join(":") << endl; t << "vpath %.lib " << project->values("QMAKE_LIBDIR").join(":") << endl; diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp index f1e0758..b0ebfbd 100644 --- a/src/corelib/io/qfilesystemengine_unix.cpp +++ b/src/corelib/io/qfilesystemengine_unix.cpp @@ -180,7 +180,8 @@ QFileSystemEntry QFileSystemEngine::canonicalName(const QFileSystemEntry &entry, return QFileSystemEntry(slowCanonicalized(absoluteName(entry).filePath())); #else char *ret = 0; -# if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES) +# if defined(Q_OS_MAC) +# if !defined(QT_NO_CORESERVICES) // Mac OS X 10.5.x doesn't support the realpath(X,0) extension we use here. if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_6) { ret = realpath(entry.nativeFilePath().constData(), (char*)0); @@ -197,9 +198,13 @@ QFileSystemEntry QFileSystemEngine::canonicalName(const QFileSystemEntry &entry, return QFileSystemEntry(ret); } } -# else +# else + ret = (char*)malloc(PATH_MAX); + realpath(entry.nativeFilePath().constData(), (char*)ret); +# endif //!defined(QT_NO_CORESERVICES) +# else ret = realpath(entry.nativeFilePath().constData(), (char*)0); -# endif +# endif //defined(Q_OS_MAC) if (ret) { data.knownFlagsMask |= QFileSystemMetaData::ExistsAttribute; data.entryFlags |= QFileSystemMetaData::ExistsAttribute; diff --git a/src/corelib/io/qfilesystemwatcher_fsevents.cpp b/src/corelib/io/qfilesystemwatcher_fsevents.cpp index 6ae6e38..4ae7cf8 100644 --- a/src/corelib/io/qfilesystemwatcher_fsevents.cpp +++ b/src/corelib/io/qfilesystemwatcher_fsevents.cpp @@ -57,13 +57,15 @@ #include <sys/types.h> #include <CoreFoundation/CFRunLoop.h> #include <CoreFoundation/CFUUID.h> +#if !defined( QT_NO_CORESERVICES ) #include <CoreServices/CoreServices.h> +#endif #include <AvailabilityMacros.h> #include <private/qcore_mac_p.h> QT_BEGIN_NAMESPACE -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 && !defined( QT_NO_CORESERVICES ) // Static operator overloading so for the sake of some convieniece. // They only live in this compilation unit to avoid polluting Qt in general. static bool operator==(const struct ::timespec &left, const struct ::timespec &right) @@ -152,7 +154,7 @@ QFSEventsFileSystemWatcherEngine::QFSEventsFileSystemWatcherEngine() QFSEventsFileSystemWatcherEngine::~QFSEventsFileSystemWatcherEngine() { -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 && !defined( QT_NO_CORESERVICES ) // I assume that at this point, QFileSystemWatcher has already called stop // on me, so I don't need to invalidate or stop my stream, simply // release it. @@ -171,7 +173,7 @@ QStringList QFSEventsFileSystemWatcherEngine::addPaths(const QStringList &paths, QStringList *files, QStringList *directories) { -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 && !defined( QT_NO_CORESERVICES ) stop(); wait(); QMutexLocker locker(&mutex); @@ -257,7 +259,7 @@ QStringList QFSEventsFileSystemWatcherEngine::addPaths(const QStringList &paths, void QFSEventsFileSystemWatcherEngine::warmUpFSEvents() { -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 && !defined( QT_NO_CORESERVICES ) // This function assumes that the mutex has already been grabbed before calling it. // It exits with the mutex still locked (Q_ASSERT(mutex.isLocked()) ;-). start(); @@ -269,7 +271,7 @@ QStringList QFSEventsFileSystemWatcherEngine::removePaths(const QStringList &pat QStringList *files, QStringList *directories) { -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 && !defined( QT_NO_CORESERVICES ) stop(); wait(); QMutexLocker locker(&mutex); @@ -336,7 +338,7 @@ QStringList QFSEventsFileSystemWatcherEngine::removePaths(const QStringList &pat #endif } -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 && !defined( QT_NO_CORESERVICES ) void QFSEventsFileSystemWatcherEngine::updateList(PathInfoList &list, bool directory, bool emitSignals) { PathInfoList::iterator End = list.end(); @@ -396,7 +398,7 @@ void QFSEventsFileSystemWatcherEngine::fseventsCallback(ConstFSEventStreamRef , const FSEventStreamEventFlags eventFlags[], const FSEventStreamEventId []) { -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 && !defined( QT_NO_CORESERVICES ) QFSEventsFileSystemWatcherEngine *watcher = static_cast<QFSEventsFileSystemWatcherEngine *>(clientCallBackInfo); QMutexLocker locker(&watcher->mutex); CFArrayRef paths = static_cast<CFArrayRef>(eventPaths); @@ -431,7 +433,7 @@ void QFSEventsFileSystemWatcherEngine::fseventsCallback(ConstFSEventStreamRef , void QFSEventsFileSystemWatcherEngine::stop() { -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 && !defined( QT_NO_CORESERVICES ) QMutexLocker locker(&mutex); stopFSStream(fsStream); if (threadsRunLoop) { @@ -443,13 +445,13 @@ void QFSEventsFileSystemWatcherEngine::stop() void QFSEventsFileSystemWatcherEngine::updateFiles() { -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 && !defined( QT_NO_CORESERVICES ) QMutexLocker locker(&mutex); updateHash(filePathInfoHash); updateHash(dirPathInfoHash); if (filePathInfoHash.isEmpty() && dirPathInfoHash.isEmpty()) { // Everything disappeared before we got to start, don't bother. -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 && !defined( QT_NO_CORESERVICES ) // Code duplicated from stop(), with the exception that we // don't wait on waitForStop here. Doing this will lead to // a deadlock since this function is called from the worker @@ -467,7 +469,7 @@ void QFSEventsFileSystemWatcherEngine::updateFiles() void QFSEventsFileSystemWatcherEngine::run() { -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 && !defined( QT_NO_CORESERVICES ) threadsRunLoop = CFRunLoopGetCurrent(); FSEventStreamScheduleWithRunLoop(fsStream, threadsRunLoop, kCFRunLoopDefaultMode); bool startedOK = FSEventStreamStart(fsStream); diff --git a/src/corelib/io/qfilesystemwatcher_fsevents_p.h b/src/corelib/io/qfilesystemwatcher_fsevents_p.h index 2466a6e..515c32e 100644 --- a/src/corelib/io/qfilesystemwatcher_fsevents_p.h +++ b/src/corelib/io/qfilesystemwatcher_fsevents_p.h @@ -74,7 +74,7 @@ typedef uint64_t FSEventStreamEventId; QT_BEGIN_NAMESPACE -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 && !defined(QT_NO_CORESERVICES) // Yes, I use a stat64 element here. QFileInfo requires too much knowledge about implementation // details to be used as a long-standing record. Since I'm going to have to store this information, I can // do the stat myself too. @@ -117,7 +117,7 @@ private: QMutex mutex; QWaitCondition waitCondition; QWaitCondition waitForStop; -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 && !defined( QT_NO_CORESERVICES ) PathHash filePathInfoHash; PathHash dirPathInfoHash; void updateHash(PathHash &pathHash); diff --git a/src/gui/egl/qegl_p.h b/src/gui/egl/qegl_p.h index 9b0d82e..15e7cab 100644 --- a/src/gui/egl/qegl_p.h +++ b/src/gui/egl/qegl_p.h @@ -165,13 +165,21 @@ typedef int EGLImageKHR; typedef void *EGLImageKHR; #endif +#if !defined(EGL_NO_IMAGE_KHR) #define EGL_NO_IMAGE_KHR ((EGLImageKHR)0) +#endif +#if !defined(EGL_IMAGE_PRESERVED_KHR) #define EGL_IMAGE_PRESERVED_KHR 0x30D2 +#endif +#if !defined(EGL_KHR_image_base) #define EGL_KHR_image_base #endif +#endif -#if !defined(EGL_KHR_image) && !defined(EGL_KHR_image_pixmap) +#if !defined(EGL_KHR_image) #define EGL_NATIVE_PIXMAP_KHR 0x30B0 +#endif +#if !defined(EGL_KHR_image_pixmap) #define EGL_KHR_image_pixmap #endif diff --git a/src/gui/kernel/qapplication_qws.cpp b/src/gui/kernel/qapplication_qws.cpp index 1197c77..abee361 100644 --- a/src/gui/kernel/qapplication_qws.cpp +++ b/src/gui/kernel/qapplication_qws.cpp @@ -2184,6 +2184,11 @@ void qt_init(QApplicationPrivate *priv, int type) qws_screen_is_interlaced = read_bool_env_var("QWS_INTERLACE",false); const char *display = ::getenv("QWS_DISPLAY"); + +#ifdef QT_QWS_DEFAULT_DRIVER_NAME + if (!display) display = QT_QWS_DEFAULT_DRIVER_NAME; +#endif + if (display) qws_display_spec = display; // since we setenv later! diff --git a/src/gui/kernel/qwidget_qpa.cpp b/src/gui/kernel/qwidget_qpa.cpp index 661120c..56c3010 100644 --- a/src/gui/kernel/qwidget_qpa.cpp +++ b/src/gui/kernel/qwidget_qpa.cpp @@ -129,6 +129,11 @@ void QWidget::destroy(bool destroyWindow, bool destroySubWindows) { Q_D(QWidget); + d->aboutToDestroy(); + if (!isWindow() && parentWidget()) + parentWidget()->d_func()->invalidateBuffer(d->effectiveRectFor(geometry())); + d->deactivateWidgetCleanup(); + if ((windowType() == Qt::Popup)) qApp->d_func()->closePopup(this); @@ -136,6 +141,8 @@ void QWidget::destroy(bool destroyWindow, bool destroySubWindows) if (this == QApplicationPrivate::active_window) QApplication::setActiveWindow(0); + setAttribute(Qt::WA_WState_Created, false); + if (windowType() != Qt::Desktop) { if (destroySubWindows) { QObjectList childList(children()); @@ -155,6 +162,8 @@ void QWidget::destroy(bool destroyWindow, bool destroySubWindows) d->hide_sys(); } } + + d->setWinId(0); } } @@ -412,6 +421,7 @@ void QWidgetPrivate::hide_sys() { Q_Q(QWidget); q->setAttribute(Qt::WA_Mapped, false); + deactivateWidgetCleanup(); if (!q->isWindow()) { QWidget *p = q->parentWidget(); if (p &&p->isVisible()) { diff --git a/src/network/kernel/kernel.pri b/src/network/kernel/kernel.pri index bb98305..e5d33bb 100644 --- a/src/network/kernel/kernel.pri +++ b/src/network/kernel/kernel.pri @@ -26,7 +26,7 @@ win32:SOURCES += kernel/qhostinfo_win.cpp kernel/qnetworkinterface_win.cpp integrity:SOURCES += kernel/qhostinfo_unix.cpp kernel/qnetworkinterface_unix.cpp mac:LIBS_PRIVATE += -framework SystemConfiguration -framework CoreFoundation -mac:SOURCES += kernel/qnetworkproxy_mac.cpp +mac:contains(QT_CONFIG, coreservices) SOURCES += kernel/qnetworkproxy_mac.cpp else:win32:SOURCES += kernel/qnetworkproxy_win.cpp else:symbian:SOURCES += kernel/qnetworkproxy_symbian.cpp else:SOURCES += kernel/qnetworkproxy_generic.cpp diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp index 599c3f6..4747f29 100644 --- a/src/network/ssl/qsslsocket_openssl.cpp +++ b/src/network/ssl/qsslsocket_openssl.cpp @@ -68,7 +68,7 @@ #endif QT_BEGIN_NAMESPACE -#if defined(Q_OS_MAC) +#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES) #define kSecTrustSettingsDomainSystem 2 // so we do not need to include the header file PtrSecCertificateGetData QSslSocketPrivate::ptrSecCertificateGetData = 0; PtrSecTrustSettingsCopyCertificates QSslSocketPrivate::ptrSecTrustSettingsCopyCertificates = 0; @@ -532,7 +532,7 @@ void QSslSocketPrivate::ensureCiphersAndCertsLoaded() resetDefaultCiphers(); //load symbols needed to receive certificates from system store -#if defined(Q_OS_MAC) +#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES) QLibrary securityLib("/System/Library/Frameworks/Security.framework/Versions/Current/Security"); if (securityLib.load()) { ptrSecCertificateGetData = (PtrSecCertificateGetData) securityLib.resolve("SecCertificateGetData"); @@ -813,7 +813,7 @@ QList<QSslCertificate> QSslSocketPrivate::systemCaCertificates() timer.start(); #endif QList<QSslCertificate> systemCerts; -#if defined(Q_OS_MAC) +#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES) CFArrayRef cfCerts; OSStatus status = 1; diff --git a/src/network/ssl/qsslsocket_p.h b/src/network/ssl/qsslsocket_p.h index 86ecba0..ee6361f 100644 --- a/src/network/ssl/qsslsocket_p.h +++ b/src/network/ssl/qsslsocket_p.h @@ -69,9 +69,11 @@ QT_BEGIN_NAMESPACE #if defined(Q_OS_MAC) #include <Security/SecCertificate.h> #include <CoreFoundation/CFArray.h> +#ifndef QT_NO_CORESERVICES typedef OSStatus (*PtrSecCertificateGetData)(SecCertificateRef, CSSM_DATA_PTR); typedef OSStatus (*PtrSecTrustSettingsCopyCertificates)(int, CFArrayRef*); typedef OSStatus (*PtrSecTrustCopyAnchorCertificates)(CFArrayRef*); +#endif #elif defined(Q_OS_WIN) #include <windows.h> #include <wincrypt.h> @@ -132,7 +134,7 @@ public: static void addDefaultCaCertificate(const QSslCertificate &cert); static void addDefaultCaCertificates(const QList<QSslCertificate> &certs); -#if defined(Q_OS_MAC) +#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES) static PtrSecCertificateGetData ptrSecCertificateGetData; static PtrSecTrustSettingsCopyCertificates ptrSecTrustSettingsCopyCertificates; static PtrSecTrustCopyAnchorCertificates ptrSecTrustCopyAnchorCertificates; diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index 3ac759c..9ce7d55 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -90,6 +90,12 @@ QT_BEGIN_NAMESPACE +inline static bool isPowerOfTwo(int x) +{ + // Assumption: x >= 1 + return x == (x & -x); +} + #if defined(Q_WS_WIN) extern Q_GUI_EXPORT bool qt_cleartype_enabled; #endif @@ -201,6 +207,15 @@ void QGL2PaintEngineExPrivate::updateBrushTexture() glActiveTexture(GL_TEXTURE0 + QT_BRUSH_TEXTURE_UNIT); ctx->d_func()->bindTexture(texImage, GL_TEXTURE_2D, GL_RGBA, QGLContext::InternalBindOption); +#if !defined(QT_NO_DEBUG) && defined(QT_OPENGL_ES_2) + QGLFunctions funcs(QGLContext::currentContext()); + bool npotSupported = funcs.hasOpenGLFeature(QGLFunctions::NPOTTextures); + bool isNpot = !isPowerOfTwo(texImage.size().width()) + || !isPowerOfTwo(texImage.size().height()); + if (isNpot && !npotSupported) { + qWarning("GL2 Paint Engine: This system does not support the REPEAT wrap mode for non-power-of-two textures."); + } +#endif updateTextureFilter(GL_TEXTURE_2D, GL_REPEAT, q->state()->renderHints & QPainter::SmoothPixmapTransform); } else if (style >= Qt::LinearGradientPattern && style <= Qt::ConicalGradientPattern) { @@ -233,6 +248,15 @@ void QGL2PaintEngineExPrivate::updateBrushTexture() QGLTexture *tex = ctx->d_func()->bindTexture(currentBrushPixmap, GL_TEXTURE_2D, GL_RGBA, QGLContext::InternalBindOption | QGLContext::CanFlipNativePixmapBindOption); +#if !defined(QT_NO_DEBUG) && defined(QT_OPENGL_ES_2) + QGLFunctions funcs(QGLContext::currentContext()); + bool npotSupported = funcs.hasOpenGLFeature(QGLFunctions::NPOTTextures); + bool isNpot = !isPowerOfTwo(currentBrushPixmap.size().width()) + || !isPowerOfTwo(currentBrushPixmap.size().height()); + if (isNpot && !npotSupported) { + qWarning("GL2 Paint Engine: This system does not support the REPEAT wrap mode for non-power-of-two textures."); + } +#endif updateTextureFilter(GL_TEXTURE_2D, GL_REPEAT, q->state()->renderHints & QPainter::SmoothPixmapTransform); textureInvertedY = tex->options & QGLContext::InvertedYBindOption ? -1 : 1; } @@ -1782,6 +1806,15 @@ void QGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngineGlyphCache::Type glyp glActiveTexture(GL_TEXTURE0 + QT_MASK_TEXTURE_UNIT); glBindTexture(GL_TEXTURE_2D, cache->texture()); +#if !defined(QT_NO_DEBUG) && defined(QT_OPENGL_ES_2) + QGLFunctions funcs(QGLContext::currentContext()); + bool npotSupported = funcs.hasOpenGLFeature(QGLFunctions::NPOTTextures); + bool isNpot = !isPowerOfTwo(cache->width()) + || !isPowerOfTwo(cache->height()); + if (isNpot && !npotSupported) { + qWarning("GL2 Paint Engine: This system does not support the REPEAT wrap mode for non-power-of-two textures."); + } +#endif updateTextureFilter(GL_TEXTURE_2D, GL_REPEAT, false); #if defined(QT_OPENGL_DRAWCACHEDGLYPHS_INDEX_ARRAY_VBO) |