diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-06-28 19:18:10 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-06-28 19:18:10 +0200 |
commit | cb6fec851507e9e2a53e8b4b7d70e7e4ac165348 (patch) | |
tree | e9c455888b4539a3d36028ed33d9dfba6ce5dd55 | |
parent | 37351bbecf806dfed36a5558a38f502c9cec7d84 (diff) | |
parent | cb79be2076e3ba02b603f4ab65ca12cd99fa2eba (diff) |
Merge remote-tracking branch 'origin/release' into stable
Change-Id: I53112e20a65b7d706755b4a22622979f3b91a2c2
-rw-r--r-- | doc/global/externalsites/qt-webpages.qdoc | 2 | ||||
-rw-r--r-- | mkspecs/features/qt_module.prf | 9 | ||||
-rw-r--r-- | mkspecs/macx-clang-libc++-32/qmake.conf | 2 | ||||
-rw-r--r-- | mkspecs/macx-clang-libc++/qmake.conf | 2 | ||||
-rw-r--r-- | mkspecs/win32-icc/qplatformdefs.h | 108 | ||||
-rw-r--r-- | src/corelib/global/qcompilerdetection.h | 2 | ||||
-rw-r--r-- | src/corelib/kernel/qvariant_p.h | 2 | ||||
-rw-r--r-- | src/gui/kernel/qwindow.cpp | 5 | ||||
-rw-r--r-- | src/gui/kernel/qwindow.h | 30 | ||||
-rw-r--r-- | src/gui/opengl/qopenglvertexarrayobject.cpp | 27 | ||||
-rw-r--r-- | src/gui/opengl/qopenglvertexarrayobject.h | 1 | ||||
-rw-r--r-- | src/plugins/platforms/android/src/qandroidplatformintegration.cpp | 10 | ||||
-rw-r--r-- | src/plugins/platforms/android/src/qandroidplatformintegration.h | 2 | ||||
-rw-r--r-- | src/plugins/platforms/cocoa/qnsview.mm | 6 |
14 files changed, 71 insertions, 137 deletions
diff --git a/doc/global/externalsites/qt-webpages.qdoc b/doc/global/externalsites/qt-webpages.qdoc index f7bb9b1b89..1bb6228ed1 100644 --- a/doc/global/externalsites/qt-webpages.qdoc +++ b/doc/global/externalsites/qt-webpages.qdoc @@ -33,7 +33,7 @@ \title Qt Bug Tracker */ /*! - \externalpage http://qt.digia.com/downloads + \externalpage http://qt-project.org/downloads \title Downloads */ /*! diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf index 46f8e56ad5..da4de5fa1e 100644 --- a/mkspecs/features/qt_module.prf +++ b/mkspecs/features/qt_module.prf @@ -90,16 +90,17 @@ else: \ #mac frameworks mac:CONFIG(shared, static|shared):contains(QT_CONFIG, qt_framework) { #QMAKE_FRAMEWORK_VERSION = 4.0 - CONFIG += lib_bundle qt_no_framework_direct_includes qt_framework + CONFIG += lib_bundle qt_framework CONFIG -= qt_install_headers #no need to install these as well !debug_and_release|if(build_all:CONFIG(release, debug|release)) { FRAMEWORK_HEADERS.version = Versions FRAMEWORK_HEADERS.files = $$SYNCQT.HEADER_FILES $$SYNCQT.HEADER_CLASSES FRAMEWORK_HEADERS.path = Headers - FRAMEWORK_PRIVATE_HEADERS.version = Versions FRAMEWORK_PRIVATE_HEADERS.files = $$SYNCQT.PRIVATE_HEADER_FILES - FRAMEWORK_PRIVATE_HEADERS.path = Headers/$$VERSION/$$MODULE_INCNAME - QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS FRAMEWORK_PRIVATE_HEADERS + FRAMEWORK_PRIVATE_HEADERS.path = Headers/$$VERSION/$$MODULE_INCNAME/private + FRAMEWORK_QPA_HEADERS.files = $$SYNCQT.QPA_HEADER_FILES + FRAMEWORK_QPA_HEADERS.path = Headers/$$VERSION/$$MODULE_INCNAME/qpa + QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS FRAMEWORK_PRIVATE_HEADERS FRAMEWORK_QPA_HEADERS } } diff --git a/mkspecs/macx-clang-libc++-32/qmake.conf b/mkspecs/macx-clang-libc++-32/qmake.conf index aea19a4bc3..3f7342da0b 100644 --- a/mkspecs/macx-clang-libc++-32/qmake.conf +++ b/mkspecs/macx-clang-libc++-32/qmake.conf @@ -2,6 +2,8 @@ # qmake configuration for 32-bit Clang on OS X # +warning("QMakespec macx-clang-libc++-32 is deprecated. Use macx-clang-32 instead.") + MAKEFILE_GENERATOR = UNIX CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname QMAKE_INCREMENTAL_STYLE = sublib diff --git a/mkspecs/macx-clang-libc++/qmake.conf b/mkspecs/macx-clang-libc++/qmake.conf index 94cc0036d2..7f4151e81b 100644 --- a/mkspecs/macx-clang-libc++/qmake.conf +++ b/mkspecs/macx-clang-libc++/qmake.conf @@ -2,6 +2,8 @@ # qmake configuration for Clang on OS X # +warning("QMakespec macx-clang-libc++ is deprecated. Use macx-clang instead.") + MAKEFILE_GENERATOR = UNIX CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname QMAKE_INCREMENTAL_STYLE = sublib diff --git a/mkspecs/win32-icc/qplatformdefs.h b/mkspecs/win32-icc/qplatformdefs.h index b1950cd71f..e03bce8e6c 100644 --- a/mkspecs/win32-icc/qplatformdefs.h +++ b/mkspecs/win32-icc/qplatformdefs.h @@ -39,110 +39,4 @@ ** ****************************************************************************/ -#ifndef QPLATFORMDEFS_H -#define QPLATFORMDEFS_H - -#ifdef UNICODE -#ifndef _UNICODE -#define _UNICODE -#endif -#endif - -// Get Qt defines/settings - -#include "qglobal.h" - -#define _POSIX_ -#include <limits.h> -#undef _POSIX_ - -#include <tchar.h> -#include <io.h> -#include <direct.h> -#include <stdio.h> -#include <fcntl.h> -#include <errno.h> -#include <sys/stat.h> -#include <stdlib.h> -#include <windows.h> - -#ifdef QT_LARGEFILE_SUPPORT -#define QT_STATBUF struct _stati64 // non-ANSI defs -#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs -#define QT_STAT ::_stati64 -#define QT_FSTAT ::_fstati64 -#else -#define QT_STATBUF struct _stat // non-ANSI defs -#define QT_STATBUF4TSTAT struct _stat // non-ANSI defs -#define QT_STAT ::_stat -#define QT_FSTAT ::_fstat -#endif -#define QT_STAT_REG _S_IFREG -#define QT_STAT_DIR _S_IFDIR -#define QT_STAT_MASK _S_IFMT -#if defined(_S_IFLNK) -# define QT_STAT_LNK _S_IFLNK -#endif -#define QT_FILENO _fileno -#define QT_OPEN ::_open -#define QT_CLOSE ::_close -#ifdef QT_LARGEFILE_SUPPORT -#define QT_LSEEK ::_lseeki64 -#define QT_TSTAT ::_tstati64 -#else -#define QT_LSEEK ::_lseek -#define QT_TSTAT ::_tstat -#endif -#define QT_READ ::_read -#define QT_WRITE ::_write -#define QT_ACCESS ::_access -#define QT_GETCWD ::_getcwd -#define QT_CHDIR ::_chdir -#define QT_MKDIR ::_mkdir -#define QT_RMDIR ::_rmdir -#define QT_OPEN_LARGEFILE 0 -#define QT_OPEN_RDONLY _O_RDONLY -#define QT_OPEN_WRONLY _O_WRONLY -#define QT_OPEN_RDWR _O_RDWR -#define QT_OPEN_CREAT _O_CREAT -#define QT_OPEN_TRUNC _O_TRUNC -#define QT_OPEN_APPEND _O_APPEND -#if defined(O_TEXT) -# define QT_OPEN_TEXT _O_TEXT -# define QT_OPEN_BINARY _O_BINARY -#endif - -#include "../common/c89/qplatformdefs.h" - -#if defined(QT_LARGEFILE_SUPPORT) && _MSC_VER > 1310 -#undef QT_FSEEK -#undef QT_FTELL - -#define QT_FSEEK ::_fseeki64 -#define QT_FTELL ::_ftelli64 -#endif - -#if defined(QT_LARGEFILE_SUPPORT) -#undef QT_OFF_T -#define QT_OFF_T __int64 -#endif - -#define QT_SIGNAL_ARGS int - -#if _MSC_VER>=1400 -# define QT_VSNPRINTF(buffer, count, format, arg) \ - ::vsnprintf_s(buffer, count, count-1, format, arg) -#else -# define QT_VSNPRINTF ::_vsnprintf -#endif -#define QT_SNPRINTF ::_snprintf - -# define F_OK 0 -# define X_OK 1 -# define W_OK 2 -# define R_OK 4 - -typedef int mode_t; - - -#endif // QPLATFORMDEFS_H +#include "../win32-msvc2005/qplatformdefs.h" diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index 548eebd3ad..b685c1fe0d 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -467,7 +467,7 @@ # if __INTEL_COMPILER < 1200 # define Q_NO_TEMPLATE_FRIENDS # endif -# if defined(_CHAR16T) || __cplusplus >= 201103L +# if __cplusplus >= 201103L # define Q_COMPILER_VARIADIC_MACROS # if __INTEL_COMPILER >= 1200 # define Q_COMPILER_AUTO_TYPE diff --git a/src/corelib/kernel/qvariant_p.h b/src/corelib/kernel/qvariant_p.h index 04b9d92f55..4ec049e20d 100644 --- a/src/corelib/kernel/qvariant_p.h +++ b/src/corelib/kernel/qvariant_p.h @@ -224,7 +224,7 @@ class QVariantIsNull public: static const bool Value = (sizeof(test<T>(0)) == sizeof(Yes)); }; -#elif defined(Q_CC_MSVC) && _MSC_VER >= 1400 // MSVC 2005, 2008 version: no decltype, but 'sealed' classes (>=2010 has decltype) +#elif defined(Q_CC_MSVC) && _MSC_VER >= 1400 && !defined(Q_CC_INTEL) // MSVC 2005, 2008 version: no decltype, but 'sealed' classes (>=2010 has decltype) template<typename T> class HasIsNullMethod { struct Yes { char unused[1]; }; diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index eff057c4cb..392407d86d 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -933,7 +933,6 @@ bool QWindow::isActive() const /*! \property QWindow::contentOrientation \brief the orientation of the window's contents - \since 5.1 This is a hint to the window manager in case it needs to display additional content like popups, dialogs, status bars, or similar @@ -1190,7 +1189,6 @@ void QWindow::setHeight(int arg) /*! \property QWindow::minimumWidth \brief the minimum width of the window's geometry - \since 5.1 */ void QWindow::setMinimumWidth(int w) { @@ -1200,7 +1198,6 @@ void QWindow::setMinimumWidth(int w) /*! \property QWindow::minimumHeight \brief the minimum height of the window's geometry - \since 5.1 */ void QWindow::setMinimumHeight(int h) { @@ -1233,7 +1230,6 @@ void QWindow::setMaximumSize(const QSize &size) /*! \property QWindow::maximumWidth \brief the maximum width of the window's geometry - \since 5.1 */ void QWindow::setMaximumWidth(int w) { @@ -1243,7 +1239,6 @@ void QWindow::setMaximumWidth(int w) /*! \property QWindow::maximumHeight \brief the maximum height of the window's geometry - \since 5.1 */ void QWindow::setMaximumHeight(int h) { diff --git a/src/gui/kernel/qwindow.h b/src/gui/kernel/qwindow.h index efdfd497a6..ca261ff7ce 100644 --- a/src/gui/kernel/qwindow.h +++ b/src/gui/kernel/qwindow.h @@ -110,14 +110,14 @@ class Q_GUI_EXPORT QWindow : public QObject, public QSurface Q_PROPERTY(int y READ y WRITE setY NOTIFY yChanged) Q_PROPERTY(int width READ width WRITE setWidth NOTIFY widthChanged) Q_PROPERTY(int height READ height WRITE setHeight NOTIFY heightChanged) - Q_PROPERTY(int minimumWidth READ minimumWidth WRITE setMinimumWidth NOTIFY minimumWidthChanged REVISION 1) - Q_PROPERTY(int minimumHeight READ minimumHeight WRITE setMinimumHeight NOTIFY minimumHeightChanged REVISION 1) - Q_PROPERTY(int maximumWidth READ maximumWidth WRITE setMaximumWidth NOTIFY maximumWidthChanged REVISION 1) - Q_PROPERTY(int maximumHeight READ maximumHeight WRITE setMaximumHeight NOTIFY maximumHeightChanged REVISION 1) + Q_PROPERTY(int minimumWidth READ minimumWidth WRITE setMinimumWidth NOTIFY minimumWidthChanged) + Q_PROPERTY(int minimumHeight READ minimumHeight WRITE setMinimumHeight NOTIFY minimumHeightChanged) + Q_PROPERTY(int maximumWidth READ maximumWidth WRITE setMaximumWidth NOTIFY maximumWidthChanged) + Q_PROPERTY(int maximumHeight READ maximumHeight WRITE setMaximumHeight NOTIFY maximumHeightChanged) Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged) Q_PROPERTY(bool active READ isActive NOTIFY activeChanged REVISION 1) Q_PROPERTY(Visibility visibility READ visibility WRITE setVisibility NOTIFY visibilityChanged REVISION 1) - Q_PROPERTY(Qt::ScreenOrientation contentOrientation READ contentOrientation WRITE reportContentOrientationChange NOTIFY contentOrientationChanged REVISION 1) + Q_PROPERTY(Qt::ScreenOrientation contentOrientation READ contentOrientation WRITE reportContentOrientationChange NOTIFY contentOrientationChanged) Q_PROPERTY(qreal opacity READ opacity WRITE setOpacity NOTIFY opacityChanged REVISION 1) public: @@ -286,12 +286,12 @@ public Q_SLOTS: void setWidth(int arg); void setHeight(int arg); - Q_REVISION(1) void setMinimumWidth(int w); - Q_REVISION(1) void setMinimumHeight(int h); - Q_REVISION(1) void setMaximumWidth(int w); - Q_REVISION(1) void setMaximumHeight(int h); + void setMinimumWidth(int w); + void setMinimumHeight(int h); + void setMaximumWidth(int w); + void setMaximumHeight(int h); - void alert(int msec); + Q_REVISION(1) void alert(int msec); Q_SIGNALS: void screenChanged(QScreen *screen); @@ -304,15 +304,15 @@ Q_SIGNALS: void widthChanged(int arg); void heightChanged(int arg); - Q_REVISION(1) void minimumWidthChanged(int arg); - Q_REVISION(1) void minimumHeightChanged(int arg); - Q_REVISION(1) void maximumWidthChanged(int arg); - Q_REVISION(1) void maximumHeightChanged(int arg); + void minimumWidthChanged(int arg); + void minimumHeightChanged(int arg); + void maximumWidthChanged(int arg); + void maximumHeightChanged(int arg); void visibleChanged(bool arg); Q_REVISION(1) void visibilityChanged(QWindow::Visibility visibility); Q_REVISION(1) void activeChanged(); - Q_REVISION(1) void contentOrientationChanged(Qt::ScreenOrientation orientation); + void contentOrientationChanged(Qt::ScreenOrientation orientation); void focusObjectChanged(QObject *object); diff --git a/src/gui/opengl/qopenglvertexarrayobject.cpp b/src/gui/opengl/qopenglvertexarrayobject.cpp index e450fe708f..eb7a42f749 100644 --- a/src/gui/opengl/qopenglvertexarrayobject.cpp +++ b/src/gui/opengl/qopenglvertexarrayobject.cpp @@ -118,6 +118,9 @@ public: void destroy(); void bind(); void release(); + void _q_contextAboutToBeDestroyed(); + + Q_DECLARE_PUBLIC(QOpenGLVertexArrayObject) GLuint vao; @@ -141,12 +144,22 @@ public: bool QOpenGLVertexArrayObjectPrivate::create() { + if (vao) { + qWarning("QOpenGLVertexArrayObject::create() VAO is already created"); + return false; + } + + Q_Q(QOpenGLVertexArrayObject); + if (context) + QObject::disconnect(context, SIGNAL(aboutToBeDestroyed()), q, SLOT(_q_contextAboutToBeDestroyed())); + QOpenGLContext *ctx = QOpenGLContext::currentContext(); if (!ctx) { qWarning("QOpenGLVertexArrayObject::create() requires a valid current OpenGL context"); return false; } context = ctx; + QObject::connect(context, SIGNAL(aboutToBeDestroyed()), q, SLOT(_q_contextAboutToBeDestroyed())); #if defined(QT_OPENGL_ES_2) if (ctx->hasExtension("GL_OES_vertex_array_object")) { @@ -197,8 +210,16 @@ void QOpenGLVertexArrayObjectPrivate::destroy() case NotSupported: break; } - vao = 0; #endif + vao = 0; +} + +/*! + \internal +*/ +void QOpenGLVertexArrayObjectPrivate::_q_contextAboutToBeDestroyed() +{ + destroy(); } void QOpenGLVertexArrayObjectPrivate::bind() @@ -327,7 +348,7 @@ QOpenGLVertexArrayObject::~QOpenGLVertexArrayObject() Q_D(QOpenGLVertexArrayObject); QOpenGLContext *oldContext = 0; - if (d->context && d->context != ctx) { + if (d->context && ctx && d->context != ctx) { oldContext = ctx; if (d->context->makeCurrent(oldContext->surface())) { ctx = d->context; @@ -471,3 +492,5 @@ void QOpenGLVertexArrayObject::release() */ QT_END_NAMESPACE + +#include "moc_qopenglvertexarrayobject.cpp" diff --git a/src/gui/opengl/qopenglvertexarrayobject.h b/src/gui/opengl/qopenglvertexarrayobject.h index 569aeea730..8369497660 100644 --- a/src/gui/opengl/qopenglvertexarrayobject.h +++ b/src/gui/opengl/qopenglvertexarrayobject.h @@ -102,6 +102,7 @@ public: private: Q_DISABLE_COPY(QOpenGLVertexArrayObject) Q_DECLARE_PRIVATE(QOpenGLVertexArrayObject) + Q_PRIVATE_SLOT(d_func(), void _q_contextAboutToBeDestroyed()) QOpenGLVertexArrayObject(QOpenGLVertexArrayObjectPrivate &dd); }; diff --git a/src/plugins/platforms/android/src/qandroidplatformintegration.cpp b/src/plugins/platforms/android/src/qandroidplatformintegration.cpp index f0630b5224..91ad2b368f 100644 --- a/src/plugins/platforms/android/src/qandroidplatformintegration.cpp +++ b/src/plugins/platforms/android/src/qandroidplatformintegration.cpp @@ -216,6 +216,16 @@ QPlatformServices *QAndroidPlatformIntegration::services() const return m_androidPlatformServices; } +QVariant QAndroidPlatformIntegration::styleHint(StyleHint hint) const +{ + switch (hint) { + case ShowIsFullScreen: + return true; + default: + return QPlatformIntegration::styleHint(hint); + } +} + static const QLatin1String androidThemeName("android"); QStringList QAndroidPlatformIntegration::themeNames() const { diff --git a/src/plugins/platforms/android/src/qandroidplatformintegration.h b/src/plugins/platforms/android/src/qandroidplatformintegration.h index 8da9fb2ff4..6cc191701d 100644 --- a/src/plugins/platforms/android/src/qandroidplatformintegration.h +++ b/src/plugins/platforms/android/src/qandroidplatformintegration.h @@ -112,6 +112,8 @@ public: QPlatformNativeInterface *nativeInterface() const; QPlatformServices *services() const; + QVariant styleHint(StyleHint hint) const; + QStringList themeNames() const; QPlatformTheme *createPlatformTheme(const QString &name) const; diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index f811c0e9b4..66a1b95ad8 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -916,6 +916,7 @@ static QTouchDevice *touchDevice = 0; ulong timestamp = [nsevent timestamp] * 1000; ulong nativeModifiers = [nsevent modifierFlags]; Qt::KeyboardModifiers modifiers = [QNSView convertKeyModifiers: nativeModifiers]; + NSString *charactersIgnoringModifiers = [nsevent charactersIgnoringModifiers]; NSString *characters = [nsevent characters]; // [from Qt 4 impl] There is no way to get the scan code from carbon. But we cannot @@ -930,7 +931,10 @@ static QTouchDevice *touchDevice = 0; QChar ch = QChar::ReplacementCharacter; int keyCode = Qt::Key_unknown; if ([characters length] != 0) { - ch = QChar([characters characterAtIndex:0]); + if ((modifiers & Qt::MetaModifier) && ([charactersIgnoringModifiers length] != 0)) + ch = QChar([charactersIgnoringModifiers characterAtIndex:0]); + else + ch = QChar([characters characterAtIndex:0]); keyCode = [self convertKeyCode:ch]; } |