diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-05-05 09:22:53 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-05-05 09:22:53 +0200 |
commit | 1f278c6e1126a41e83aec83e2eeacb96ee08e74b (patch) | |
tree | c544d6d79205bf77ae9aefe860a88965bceff995 /src | |
parent | a5bba1f9da376840d92f2008d8ba8433753b1847 (diff) | |
parent | e6286ca289db11463d13ec4d31055995b32ad258 (diff) |
Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable
Diffstat (limited to 'src')
30 files changed, 123 insertions, 84 deletions
diff --git a/src/3rdparty/harfbuzz-ng/harfbuzz-ng.pro b/src/3rdparty/harfbuzz-ng/harfbuzz-ng.pro index d505c30aa6..bd0475fc05 100644 --- a/src/3rdparty/harfbuzz-ng/harfbuzz-ng.pro +++ b/src/3rdparty/harfbuzz-ng/harfbuzz-ng.pro @@ -1,16 +1,11 @@ TARGET = qtharfbuzzng -TEMPLATE = lib CONFIG += \ static \ hide_symbols \ exceptions_off rtti_off -CONFIG -= qt -contains(QT_CONFIG, debug_and_release):CONFIG += debug_and_release -contains(QT_CONFIG, build_all):CONFIG += build_all - -DESTDIR = $$QT_BUILD_TREE/lib +load(qt_helper_lib) DEFINES += HAVE_CONFIG_H HEADERS += $$PWD/src/config.h @@ -133,5 +128,3 @@ mac { # even in 10.8 where they were also made available stand-alone. LIBS_PRIVATE += -framework ApplicationServices } - -TARGET = $$TARGET$$qtPlatformTargetSuffix() diff --git a/src/3rdparty/harfbuzz-ng/src/hb-coretext.cc b/src/3rdparty/harfbuzz-ng/src/hb-coretext.cc index 4a905ee189..4fef861acc 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-coretext.cc +++ b/src/3rdparty/harfbuzz-ng/src/hb-coretext.cc @@ -690,13 +690,10 @@ _hb_coretext_shape (hb_shape_plan_t *shape_plan, */ CFDictionaryRef attributes = CTRunGetAttributes (run); CTFontRef run_ct_font = static_cast<CTFontRef>(CFDictionaryGetValue (attributes, kCTFontAttributeName)); - CGFontRef run_cg_font = CTFontCopyGraphicsFont (run_ct_font, 0); CFRange range = CTRunGetStringRange (run); - if (!CFEqual (run_cg_font, face_data->cg_font)) + if (!CFEqual (run_ct_font, font_data->ct_font)) { - CFRelease (run_cg_font); - buffer->ensure (buffer->len + range.length); if (buffer->in_error) FAIL ("Buffer resize failed"); @@ -731,7 +728,6 @@ _hb_coretext_shape (hb_shape_plan_t *shape_plan, } continue; } - CFRelease (run_cg_font); /* CoreText throws away the PDF token, while the OpenType backend will add a zero-advance * glyph for this. We need to make sure the two produce the same output. */ diff --git a/src/angle/src/common/common.pri b/src/angle/src/common/common.pri index 58ad88673a..0943b3f299 100644 --- a/src/angle/src/common/common.pri +++ b/src/angle/src/common/common.pri @@ -1,3 +1,4 @@ +CONFIG += installed include (../config.pri) INCLUDEPATH += \ diff --git a/src/angle/src/compiler/preprocessor/preprocessor.pro b/src/angle/src/compiler/preprocessor/preprocessor.pro index 74cd97c5a4..420cb90b36 100644 --- a/src/angle/src/compiler/preprocessor/preprocessor.pro +++ b/src/angle/src/compiler/preprocessor/preprocessor.pro @@ -1,7 +1,4 @@ -TEMPLATE = lib CONFIG += static -TARGET = $$qtLibraryTarget(preprocessor) - include(../../config.pri) INCLUDEPATH = $$ANGLE_DIR/src/compiler/preprocessor diff --git a/src/angle/src/compiler/translator.pro b/src/angle/src/compiler/translator.pro index 0051486f82..18c3978e0f 100644 --- a/src/angle/src/compiler/translator.pro +++ b/src/angle/src/compiler/translator.pro @@ -1,7 +1,4 @@ -TEMPLATE = lib CONFIG += static -TARGET = $$qtLibraryTarget(translator) - include(../config.pri) # Mingw 4.7 chokes on implicit move semantics, so disable C++11 here diff --git a/src/angle/src/config.pri b/src/angle/src/config.pri index 8e0f6b7f42..aa777c356f 100644 --- a/src/angle/src/config.pri +++ b/src/angle/src/config.pri @@ -59,17 +59,10 @@ CONFIG(debug, debug|release) { } # c++11 is needed by MinGW to get support for unordered_map. -CONFIG -= qt CONFIG += stl exceptions c++11 -contains(QT_CONFIG, debug_and_release):CONFIG += debug_and_release -contains(QT_CONFIG, build_all):CONFIG += build_all - INCLUDEPATH += . .. $$PWD/../include -DESTDIR = $$QT_BUILD_TREE/lib -DLLDESTDIR = $$QT_BUILD_TREE/bin - msvc { # Disabled Warnings: # 4100: 'identifier' : unreferenced formal parameter @@ -107,3 +100,5 @@ gcc { QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE + +load(qt_helper_lib) diff --git a/src/angle/src/d3dcompiler/d3dcompiler.pro b/src/angle/src/d3dcompiler/d3dcompiler.pro index 4d22080185..04b1de895d 100644 --- a/src/angle/src/d3dcompiler/d3dcompiler.pro +++ b/src/angle/src/d3dcompiler/d3dcompiler.pro @@ -1,9 +1,8 @@ -TEMPLATE = lib -TARGET = $$qtLibraryTarget(d3dcompiler_qt) - +TARGET = d3dcompiler_qt +CONFIG += installed include(../config.pri) -CONFIG += qt +CONFIG += qt QT = core DEFINES += QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII SOURCES += main.cpp @@ -16,5 +15,3 @@ winrt:equals(WINSDK_VER, 8.1) { # __stdcall exports get mangled, so use a def file DEF_FILE += $${TARGET}.def - -load(qt_installs) diff --git a/src/angle/src/libEGL/libEGL.pro b/src/angle/src/libEGL/libEGL.pro index 4f10583fc0..dc286ca11d 100644 --- a/src/angle/src/libEGL/libEGL.pro +++ b/src/angle/src/libEGL/libEGL.pro @@ -1,6 +1,4 @@ -TEMPLATE = lib -TARGET = $$qtLibraryTarget(libEGL) - +CONFIG += installed include(../common/common.pri) angle_d3d11: \ @@ -30,8 +28,6 @@ SOURCES += \ mingw:equals(QT_ARCH, i386): DEF_FILE = $$ANGLE_DIR/src/libEGL/$${TARGET}_mingw32.def } -load(qt_installs) - egl_headers.files = \ $$ANGLE_DIR/include/EGL/egl.h \ $$ANGLE_DIR/include/EGL/eglext.h \ diff --git a/src/angle/src/libGLESv2/libGLESv2.pro b/src/angle/src/libGLESv2/libGLESv2.pro index 6176016f13..70c58dc5a4 100644 --- a/src/angle/src/libGLESv2/libGLESv2.pro +++ b/src/angle/src/libGLESv2/libGLESv2.pro @@ -1,7 +1,4 @@ -TEMPLATE = lib -TARGET = $$qtLibraryTarget(libGLESv2) -CONFIG += simd - +CONFIG += simd installed include(../common/common.pri) INCLUDEPATH += $$OUT_PWD/.. $$ANGLE_DIR/src/libGLESv2 @@ -13,8 +10,8 @@ angle_d3d11: \ LIBS_PRIVATE += -ld3d9 LIBS_PRIVATE += -ldxguid -STATICLIBS = translator preprocessor +STATICLIBS = translator preprocessor for(libname, STATICLIBS) { # Appends 'd' to the library for debug builds and builds up the fully # qualified path to pass to the linker. @@ -238,8 +235,6 @@ for (vs, VERTEX_SHADERS_CLEAR) { angle_d3d11: QMAKE_EXTRA_COMPILERS += fxc_vs_$${vs} } -load(qt_installs) - khr_headers.files = $$ANGLE_DIR/include/KHR/khrplatform.h khr_headers.path = $$[QT_INSTALL_HEADERS]/QtANGLE/KHR gles2_headers.files = \ @@ -248,5 +243,3 @@ gles2_headers.files = \ $$ANGLE_DIR/include/GLES2/gl2platform.h gles2_headers.path = $$[QT_INSTALL_HEADERS]/QtANGLE/GLES2 INSTALLS += khr_headers gles2_headers - - diff --git a/src/corelib/doc/qtcore.qdocconf b/src/corelib/doc/qtcore.qdocconf index c8eb15a7f7..c9c8f1da54 100644 --- a/src/corelib/doc/qtcore.qdocconf +++ b/src/corelib/doc/qtcore.qdocconf @@ -26,7 +26,8 @@ qhp.QtCore.subprojects.classes.sortPages = true tagfile = ../../../doc/qtcore/qtcore.tags -depends += activeqt qtdbus qtgui qtwidgets qtnetwork qtdoc qtmacextras qtqml qtquick qtlinguist qtdesigner qtconcurrent qtxml qmake +depends += activeqt qtdbus qtgui qtwidgets qtnetwork qtdoc qtmacextras qtquick qtlinguist qtdesigner qtconcurrent qtxml qmake +# depends += qtqml # Qt namespace collides with QtQml::Qt, see QTBUG-38630 headerdirs += .. diff --git a/src/corelib/io/qloggingcategory.cpp b/src/corelib/io/qloggingcategory.cpp index 08ecd67dc8..518052e537 100644 --- a/src/corelib/io/qloggingcategory.cpp +++ b/src/corelib/io/qloggingcategory.cpp @@ -62,6 +62,12 @@ Q_GLOBAL_STATIC_WITH_ARGS(QLoggingCategory, qtDefaultCategory, by a string - at runtime. Whether a category should be actually logged or not can be checked with the \l isEnabled() methods. + All objects are meant to be configured by a common registry (see also + \l{Configuring Categories}). Different objects can also represent the same + category. It's therefore not recommended to export objects across module + boundaries, nor to manipulate the objects directly, nor to inherit from + QLoggingCategory. + \section1 Creating category objects The Q_LOGGING_CATEGORY() and the Q_DECLARE_LOGGING_CATEGORY() macros diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h index 80567d6a71..3b35a51e2c 100644 --- a/src/corelib/kernel/qmetatype.h +++ b/src/corelib/kernel/qmetatype.h @@ -777,6 +777,7 @@ struct VariantData const void *data; const uint flags; private: + // copy constructor allowed to be implicit to silence level 4 warning from MSVC VariantData &operator=(const VariantData &) Q_DECL_EQ_DELETE; }; diff --git a/src/corelib/tools/qtimezoneprivate_mac.mm b/src/corelib/tools/qtimezoneprivate_mac.mm index 49930490ff..7985b78712 100644 --- a/src/corelib/tools/qtimezoneprivate_mac.mm +++ b/src/corelib/tools/qtimezoneprivate_mac.mm @@ -89,7 +89,7 @@ QTimeZonePrivate *QMacTimeZonePrivate::clone() void QMacTimeZonePrivate::init(const QByteArray &ianaId) { if (availableTimeZoneIds().contains(ianaId)) { - m_nstz = [NSTimeZone timeZoneWithName:QCFString::toNSString(QString::fromUtf8(ianaId))]; + m_nstz = [[NSTimeZone timeZoneWithName:QCFString::toNSString(QString::fromUtf8(ianaId))] retain]; if (m_nstz) m_id = ianaId; } @@ -142,7 +142,6 @@ QString QMacTimeZonePrivate::displayName(QTimeZone::TimeType timeType, NSString *macLocaleCode = QCFString::toNSString(locale.name()); NSLocale *macLocale = [[NSLocale alloc] initWithLocaleIdentifier:macLocaleCode]; const QString result = QCFString::toQString([m_nstz localizedName:style locale:macLocale]); - [macLocaleCode release]; [macLocale release]; return result; } @@ -192,7 +191,6 @@ QTimeZonePrivate::Data QMacTimeZonePrivate::data(qint64 forMSecsSinceEpoch) cons data.daylightTimeOffset = [m_nstz daylightSavingTimeOffsetForDate:date]; data.standardTimeOffset = data.offsetFromUtc - data.daylightTimeOffset; data.abbreviation = QCFString::toQString([m_nstz abbreviationForDate:date]); - [date release]; return data; } @@ -203,8 +201,6 @@ bool QMacTimeZonePrivate::hasTransitions() const NSDate *epoch = [NSDate dateWithTimeIntervalSince1970:0]; const NSDate *date = [m_nstz nextDaylightSavingTimeTransitionAfterDate:epoch]; const bool result = ([date timeIntervalSince1970] > [epoch timeIntervalSince1970]); - [epoch release]; - [date release]; return result; } @@ -224,7 +220,6 @@ QTimeZonePrivate::Data QMacTimeZonePrivate::nextTransition(qint64 afterMSecsSinc tran.daylightTimeOffset = [m_nstz daylightSavingTimeOffsetForDate:nextDate]; tran.standardTimeOffset = tran.offsetFromUtc - tran.daylightTimeOffset; tran.abbreviation = QCFString::toQString([m_nstz abbreviationForDate:nextDate]); - [nextDate release]; return tran; } @@ -246,7 +241,6 @@ QTimeZonePrivate::Data QMacTimeZonePrivate::previousTransition(qint64 beforeMSec nextDate = [m_nstz nextDaylightSavingTimeTransitionAfterDate:nextDate]; nextSecs = [nextDate timeIntervalSince1970]; } - [nextDate release]; } if (secsList.size() >= 1) return data(qint64(secsList.last()) * 1000); diff --git a/src/gui/kernel/qopenglcontext.h b/src/gui/kernel/qopenglcontext.h index c422d008c1..19aecee75a 100644 --- a/src/gui/kernel/qopenglcontext.h +++ b/src/gui/kernel/qopenglcontext.h @@ -196,19 +196,13 @@ public: enum OpenGLModuleType { LibGL, - LibGLES, - - // ### - DesktopGL = LibGL, - GLES2 = LibGLES + LibGLES }; static OpenGLModuleType openGLModuleType(); bool isOpenGLES() const; - bool isES() const { return isOpenGLES(); } // ### - Q_SIGNALS: void aboutToBeDestroyed(); diff --git a/src/gui/kernel/qwindow.h b/src/gui/kernel/qwindow.h index 3278b7233c..0d13cfa648 100644 --- a/src/gui/kernel/qwindow.h +++ b/src/gui/kernel/qwindow.h @@ -297,7 +297,7 @@ Q_SIGNALS: void screenChanged(QScreen *screen); void modalityChanged(Qt::WindowModality modality); void windowStateChanged(Qt::WindowState windowState); - void windowTitleChanged(const QString &title); + Q_REVISION(2) void windowTitleChanged(const QString &title); void xChanged(int arg); void yChanged(int arg); diff --git a/src/gui/text/qtextcursor.cpp b/src/gui/text/qtextcursor.cpp index ac9762b183..731b6adde8 100644 --- a/src/gui/text/qtextcursor.cpp +++ b/src/gui/text/qtextcursor.cpp @@ -132,7 +132,7 @@ QTextCursorPrivate::AdjustResult QTextCursorPrivate::adjustPosition(int position void QTextCursorPrivate::setX() { - if (priv->isInEditBlock()) { + if (priv->isInEditBlock() || priv->inContentsChange) { x = -1; // mark dirty return; } diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index 34788dc4dc..67dedca760 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -2057,7 +2057,7 @@ void QTextEngine::justify(const QScriptLine &line) // subtract one char more, as we can't justfy after the last character --line_length; - if (!line_length) + if (line_length <= 0) return; int firstItem = findItem(line.from); diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index dd3b6ee2d3..5d4ca42dc2 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -224,7 +224,7 @@ void QGL2PaintEngineExPrivate::updateBrushTexture() currentBrushPixmap = currentBrushPixmap.scaled(max_texture_size, max_texture_size, Qt::KeepAspectRatio); GLuint wrapMode = GL_REPEAT; - if (ctx->contextHandle()->isES()) { + if (ctx->contextHandle()->isOpenGLES()) { // OpenGL ES does not support GL_REPEAT wrap modes for NPOT textures. So instead, // we emulate GL_REPEAT by only taking the fractional part of the texture coords // in the qopenglslTextureBrushSrcFragmentShader program. diff --git a/src/platformsupport/eglconvenience/qeglplatformcursor.cpp b/src/platformsupport/eglconvenience/qeglplatformcursor.cpp index 70e7c4e4db..e99581183e 100644 --- a/src/platformsupport/eglconvenience/qeglplatformcursor.cpp +++ b/src/platformsupport/eglconvenience/qeglplatformcursor.cpp @@ -69,7 +69,8 @@ QEGLPlatformCursor::QEGLPlatformCursor(QPlatformScreen *screen) m_vertexCoordEntry(0), m_textureCoordEntry(0), m_textureEntry(0), - m_deviceListener(0) + m_deviceListener(0), + m_updater(screen) { QByteArray hideCursorVal = qgetenv("QT_QPA_EGLFS_HIDECURSOR"); if (!hideCursorVal.isEmpty()) @@ -270,12 +271,32 @@ bool QEGLPlatformCursor::setCurrentCursor(QCursor *cursor) } #endif -void QEGLPlatformCursor::update(const QRegion &rgn) +void QEGLPlatformCursorUpdater::update(const QPoint &pos, const QRegion &rgn) { - QWindowSystemInterface::handleExposeEvent(m_screen->topLevelAt(m_cursor.pos), rgn); + m_active = false; + QWindowSystemInterface::handleExposeEvent(m_screen->topLevelAt(pos), rgn); QWindowSystemInterface::flushWindowSystemEvents(); } +void QEGLPlatformCursorUpdater::scheduleUpdate(const QPoint &pos, const QRegion &rgn) +{ + if (m_active) + return; + + m_active = true; + + // Must not flush the window system events directly from here since we are likely to + // be a called directly from QGuiApplication's processMouseEvents. Flushing events + // could cause reentering by dispatching more queued mouse events. + QMetaObject::invokeMethod(this, "update", Qt::QueuedConnection, + Q_ARG(QPoint, pos), Q_ARG(QRegion, rgn)); +} + +void QEGLPlatformCursor::update(const QRegion &rgn) +{ + m_updater.scheduleUpdate(m_cursor.pos, rgn); +} + QRect QEGLPlatformCursor::cursorRect() const { return QRect(m_cursor.pos - m_cursor.hotSpot, m_cursor.size); diff --git a/src/platformsupport/eglconvenience/qeglplatformcursor_p.h b/src/platformsupport/eglconvenience/qeglplatformcursor_p.h index c9ff9a1198..6f4216874a 100644 --- a/src/platformsupport/eglconvenience/qeglplatformcursor_p.h +++ b/src/platformsupport/eglconvenience/qeglplatformcursor_p.h @@ -68,6 +68,24 @@ private: int m_mouseCount; }; +class QEGLPlatformCursorUpdater : public QObject +{ + Q_OBJECT + +public: + QEGLPlatformCursorUpdater(QPlatformScreen *screen) + : m_screen(screen), m_active(false) { } + + void scheduleUpdate(const QPoint &pos, const QRegion &rgn); + +private slots: + void update(const QPoint &pos, const QRegion &rgn); + +private: + QPlatformScreen *m_screen; + bool m_active; +}; + class QEGLPlatformCursor : public QPlatformCursor { public: @@ -130,6 +148,7 @@ private: int m_textureCoordEntry; int m_textureEntry; QEGLPlatformCursorDeviceListener *m_deviceListener; + QEGLPlatformCursorUpdater m_updater; }; QT_END_NAMESPACE diff --git a/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm b/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm index dc22da0983..a18f721e04 100644 --- a/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm +++ b/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm @@ -92,16 +92,20 @@ static QFont qfontForCocoaFont(NSFont *cocoaFont, const QFont &resolveFont) QFont newFont; if (cocoaFont) { int pSize = qRound([cocoaFont pointSize]); - CTFontDescriptorRef font = CTFontCopyFontDescriptor((CTFontRef)cocoaFont); - // QCoreTextFontDatabase::populateFontDatabase() is using localized names - QString family = QCFString::toQString((CFStringRef) CTFontDescriptorCopyLocalizedAttribute(font, kCTFontFamilyNameAttribute, NULL)); - QString style = QCFString::toQString((CFStringRef) CTFontDescriptorCopyLocalizedAttribute(font, kCTFontStyleNameAttribute, NULL)); + QString family(QCFString::toQString([cocoaFont familyName])); + QString typeface(QCFString::toQString([cocoaFont fontName])); + + int hyphenPos = typeface.indexOf(QLatin1Char('-')); + if (hyphenPos != -1) { + typeface.remove(0, hyphenPos + 1); + } else { + typeface = QLatin1String("Normal"); + } - newFont = QFontDatabase().font(family, style, pSize); + newFont = QFontDatabase().font(family, typeface, pSize); newFont.setUnderline(resolveFont.underline()); newFont.setStrikeOut(resolveFont.strikeOut()); - CFRelease(font); } return newFont; } diff --git a/src/plugins/platforms/cocoa/qcocoamenu.mm b/src/plugins/platforms/cocoa/qcocoamenu.mm index 44bc3b8f69..a89979a8ea 100644 --- a/src/plugins/platforms/cocoa/qcocoamenu.mm +++ b/src/plugins/platforms/cocoa/qcocoamenu.mm @@ -234,6 +234,10 @@ QCocoaMenu::QCocoaMenu() : QCocoaMenu::~QCocoaMenu() { + foreach (QCocoaMenuItem *item, m_menuItems) { + if (COCOA_MENU_ANCESTOR(item) == this) + SET_COCOA_MENU_ANCESTOR(item, 0); + } QCocoaAutoReleasePool pool; [m_nativeItem setSubmenu:nil]; [m_nativeMenu release]; diff --git a/src/plugins/platforms/cocoa/qcocoamenuitem.mm b/src/plugins/platforms/cocoa/qcocoamenuitem.mm index 99d26034bf..9e748bff72 100644 --- a/src/plugins/platforms/cocoa/qcocoamenuitem.mm +++ b/src/plugins/platforms/cocoa/qcocoamenuitem.mm @@ -106,6 +106,8 @@ QCocoaMenuItem::QCocoaMenuItem() : QCocoaMenuItem::~QCocoaMenuItem() { + if (m_menu && COCOA_MENU_ANCESTOR(m_menu) == this) + SET_COCOA_MENU_ANCESTOR(m_menu, 0); if (m_merged) { [m_native setHidden:YES]; } else { diff --git a/src/plugins/platforms/cocoa/qcocoaprintdevice.mm b/src/plugins/platforms/cocoa/qcocoaprintdevice.mm index 57d5c800e0..7322025df6 100644 --- a/src/plugins/platforms/cocoa/qcocoaprintdevice.mm +++ b/src/plugins/platforms/cocoa/qcocoaprintdevice.mm @@ -463,7 +463,11 @@ bool QCocoaPrintDevice::openPpdFile() ppdClose(m_ppd); m_ppd = 0; CFURLRef ppdURL = NULL; +#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 + char ppdPath[PATH_MAX]; +#else char ppdPath[MAXPATHLEN]; +#endif if (PMPrinterCopyDescriptionURL(m_printer, kPMPPDDescriptionType, &ppdURL) == noErr && ppdURL != NULL && CFURLGetFileSystemRepresentation(ppdURL, true, (UInt8*)ppdPath, sizeof(ppdPath))) { diff --git a/src/plugins/platforms/ios/qiosapplicationstate.mm b/src/plugins/platforms/ios/qiosapplicationstate.mm index 8d77e608e5..afa3ecb21f 100644 --- a/src/plugins/platforms/ios/qiosapplicationstate.mm +++ b/src/plugins/platforms/ios/qiosapplicationstate.mm @@ -150,6 +150,7 @@ break; } QWindowSystemInterface::handleApplicationStateChanged(state); + QWindowSystemInterface::flushWindowSystemEvents(); } @end diff --git a/src/plugins/platforms/ios/qioswindow.h b/src/plugins/platforms/ios/qioswindow.h index fc99543aa6..6b6892e6e4 100644 --- a/src/plugins/platforms/ios/qioswindow.h +++ b/src/plugins/platforms/ios/qioswindow.h @@ -88,6 +88,7 @@ public: WId winId() const { return WId(m_view); }; private: + void applicationStateChanged(Qt::ApplicationState state); void applyGeometry(const QRect &rect); QUIView *m_view; diff --git a/src/plugins/platforms/ios/qioswindow.mm b/src/plugins/platforms/ios/qioswindow.mm index 7d5c507972..ebff2c25a1 100644 --- a/src/plugins/platforms/ios/qioswindow.mm +++ b/src/plugins/platforms/ios/qioswindow.mm @@ -192,12 +192,25 @@ - (void)displayLayer:(CALayer *)layer { - QSize bounds = fromCGRect(layer.bounds).toRect().size(); + Q_UNUSED(layer); + Q_ASSERT(layer == self.layer); - Q_ASSERT(m_qioswindow->geometry().size() == bounds); - Q_ASSERT(self.hidden == !m_qioswindow->window()->isVisible()); + [self sendUpdatedExposeEvent]; +} + +- (void)sendUpdatedExposeEvent +{ + QRegion region; + + if (m_qioswindow->isExposed()) { + QSize bounds = fromCGRect(self.layer.bounds).toRect().size(); + + Q_ASSERT(m_qioswindow->geometry().size() == bounds); + Q_ASSERT(self.hidden == !m_qioswindow->window()->isVisible()); + + region = QRect(QPoint(), bounds); + } - QRegion region = self.hidden ? QRegion() : QRect(QPoint(), bounds); QWindowSystemInterface::handleExposeEvent(m_qioswindow->window(), region); QWindowSystemInterface::flushWindowSystemEvents(); } @@ -334,6 +347,8 @@ QIOSWindow::QIOSWindow(QWindow *window) , m_view([[QUIView alloc] initWithQIOSWindow:this]) , m_windowLevel(0) { + connect(qGuiApp, &QGuiApplication::applicationStateChanged, this, &QIOSWindow::applicationStateChanged); + setParent(QPlatformWindow::parent()); // Resolve default window geometry in case it was not set before creating the @@ -471,7 +486,8 @@ void QIOSWindow::applyGeometry(const QRect &rect) bool QIOSWindow::isExposed() const { - return window()->isVisible() && !window()->geometry().isEmpty(); + return qApp->applicationState() > Qt::ApplicationHidden + && window()->isVisible() && !window()->geometry().isEmpty(); } void QIOSWindow::setWindowState(Qt::WindowState state) @@ -593,6 +609,12 @@ void QIOSWindow::handleContentOrientationChange(Qt::ScreenOrientation orientatio [[UIApplication sharedApplication] setStatusBarOrientation:uiOrientation animated:NO]; } +void QIOSWindow::applicationStateChanged(Qt::ApplicationState) +{ + if (window()->isExposed() != isExposed()) + [m_view sendUpdatedExposeEvent]; +} + qreal QIOSWindow::devicePixelRatio() const { return m_view.contentScaleFactor; diff --git a/src/plugins/platforms/xcb/xcb-static/xcb-static.pro b/src/plugins/platforms/xcb/xcb-static/xcb-static.pro index 19852b74b1..dfdcb2e83a 100644 --- a/src/plugins/platforms/xcb/xcb-static/xcb-static.pro +++ b/src/plugins/platforms/xcb/xcb-static/xcb-static.pro @@ -3,9 +3,8 @@ # libxcb-fixes, libxcb-randr, libxcb-shm, libxcb-sync, libxcb-image, # libxcb-keysyms, libxcb-icccm, libxcb-renderutil, libxcb-xkb # -TEMPLATE = lib -TARGET = xcb-static -CONFIG += staticlib +CONFIG += static +load(qt_helper_lib) XCB_DIR = ../../../../3rdparty/xcb diff --git a/src/plugins/printsupport/printsupport.pro b/src/plugins/printsupport/printsupport.pro index 93f3d65bc5..ed201f0744 100644 --- a/src/plugins/printsupport/printsupport.pro +++ b/src/plugins/printsupport/printsupport.pro @@ -1,5 +1,5 @@ TEMPLATE = subdirs -mac: SUBDIRS += cocoa +osx: SUBDIRS += cocoa win32: SUBDIRS += windows unix:!mac:contains(QT_CONFIG, cups): SUBDIRS += cups diff --git a/src/sql/models/qsqltablemodel.cpp b/src/sql/models/qsqltablemodel.cpp index 5c73705d4c..0eed6ea4d3 100644 --- a/src/sql/models/qsqltablemodel.cpp +++ b/src/sql/models/qsqltablemodel.cpp @@ -448,9 +448,10 @@ bool QSqlTableModel::selectRow(int row) // Look for changed values. Primary key fields are customarily first // and probably change less often than other fields, so start at the end. for (int f = curValues.count() - 1; f >= 0; --f) { - if (curValues.value(f) != newValues.value(f)) + if (curValues.value(f) != newValues.value(f)) { needsAddingToCache = true; break; + } } } } |