diff options
-rw-r--r-- | config.tests/unix/cloexec/cloexec.cpp | 4 | ||||
-rw-r--r-- | config.tests/unix/libpng/libpng.pro | 7 | ||||
-rw-r--r-- | config.tests/unix/posix_fallocate/posix_fallocate.cpp | 4 | ||||
-rw-r--r-- | config.tests/unix/sqlite/sqlite.cpp | 1 | ||||
-rwxr-xr-x | configure | 10 | ||||
-rw-r--r-- | doc/global/manifest-meta.qdocconf | 10 | ||||
-rw-r--r-- | examples/widgets/mainwindows/mainwindow/mainwindow.cpp | 2 | ||||
-rw-r--r-- | src/3rdparty/png_dependency.pri | 12 | ||||
-rw-r--r-- | src/corelib/io/qloggingcategory.cpp | 9 | ||||
-rw-r--r-- | src/network/socket/qnet_unix_p.h | 4 | ||||
-rw-r--r-- | src/widgets/kernel/qwidget.cpp | 1 | ||||
-rw-r--r-- | src/widgets/kernel/qwidget_p.h | 1 | ||||
-rw-r--r-- | src/widgets/kernel/qwidgetbackingstore.cpp | 18 | ||||
-rw-r--r-- | src/widgets/widgets/qdockarealayout.cpp | 3 | ||||
-rw-r--r-- | src/widgets/widgets/qdockwidget.cpp | 5 |
15 files changed, 72 insertions, 19 deletions
diff --git a/config.tests/unix/cloexec/cloexec.cpp b/config.tests/unix/cloexec/cloexec.cpp index 2cd62c925d..cc6948a280 100644 --- a/config.tests/unix/cloexec/cloexec.cpp +++ b/config.tests/unix/cloexec/cloexec.cpp @@ -50,6 +50,10 @@ int main() (void) pipe2(pipes, O_CLOEXEC | O_NONBLOCK); (void) fcntl(0, F_DUPFD_CLOEXEC, 0); (void) dup3(0, 3, O_CLOEXEC); +#if defined(__NetBSD__) + (void) paccept(0, 0, 0, NULL, SOCK_CLOEXEC | SOCK_NONBLOCK); +#else (void) accept4(0, 0, 0, SOCK_CLOEXEC | SOCK_NONBLOCK); +#endif return 0; } diff --git a/config.tests/unix/libpng/libpng.pro b/config.tests/unix/libpng/libpng.pro index 4e50fe26e5..cdca43171c 100644 --- a/config.tests/unix/libpng/libpng.pro +++ b/config.tests/unix/libpng/libpng.pro @@ -1,3 +1,8 @@ SOURCES = libpng.cpp CONFIG -= qt dylib -LIBS += -lpng +!contains(QT_CONFIG, no-pkg-config) { + CONFIG += link_pkgconfig + PKGCONFIG += libpng +} else { + LIBS += -lpng +} diff --git a/config.tests/unix/posix_fallocate/posix_fallocate.cpp b/config.tests/unix/posix_fallocate/posix_fallocate.cpp index dd39eec7b9..ce1286813a 100644 --- a/config.tests/unix/posix_fallocate/posix_fallocate.cpp +++ b/config.tests/unix/posix_fallocate/posix_fallocate.cpp @@ -38,6 +38,10 @@ ****************************************************************************/ #include <fcntl.h> +// NetBSD 7 has posix_fallocate, but in unistd.h instead of fcntl.h +#ifdef __NetBSD__ +# include <unistd.h> +#endif int main(int, char **) { diff --git a/config.tests/unix/sqlite/sqlite.cpp b/config.tests/unix/sqlite/sqlite.cpp index 6ea2386a48..dd17f74101 100644 --- a/config.tests/unix/sqlite/sqlite.cpp +++ b/config.tests/unix/sqlite/sqlite.cpp @@ -41,5 +41,6 @@ int main(int, char **) { + sqlite3_open_v2(0, 0, 0, 0); return 0; } @@ -646,6 +646,7 @@ CFG_XRANDR=runtime CFG_XRENDER=auto CFG_MITSHM=auto CFG_OPENGL=auto +CFG_OPENGLES3=yes # still depends on CFG_OPENGL, so auto in practice CFG_OPENVG=auto CFG_OPENVG_LC_INCLUDES=no CFG_OPENVG_SHIVA=auto @@ -1293,6 +1294,13 @@ while [ "$#" -gt 0 ]; do UNKNOWN_OPT=yes fi ;; + opengles3) + if [ "$VAL" = "no" ]; then + CFG_OPENGLES3="no" + else + UNKNOWN_OPT=yes + fi + ;; openvg) if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_OPENVG="$VAL" @@ -5419,7 +5427,7 @@ fi # compile-time differentiation and including the version specific (but backwards # compatible) ES headers (for example, GLES3/gl31.h). Other than that, there is # no difference in the configuration, even the library is the same. -if [ "$CFG_OPENGL" = "es2" ]; then +if [ "$CFG_OPENGL" = "es2" ] && [ "$CFG_OPENGLES3" = "yes" ]; then if compileTestWithPkgConfig glesv2 unix/opengles3 "OpenGL ES 3.0" ""; then # Add a define for ES3, in addition to ES and ES2. QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_3" diff --git a/doc/global/manifest-meta.qdocconf b/doc/global/manifest-meta.qdocconf index 1e7313711b..bb242eb98f 100644 --- a/doc/global/manifest-meta.qdocconf +++ b/doc/global/manifest-meta.qdocconf @@ -14,10 +14,9 @@ # Note: You cannot use operators (+, =, -) in the names. # # Examples: add a 'isHighlighted' attribute for two 'Analog Clock' examples, -# add a 'database' tag for QtSql all examples, a 'webkit' tag for QtWebKit -# examples, and a 'qt5' tag for all examples +# add a 'database' tag for QtSql examples, and a 'qt5' tag for all examples # -# manifestmeta.filters = highlighted sql webkit global +# manifestmeta.filters = highlighted sql global # # manifestmeta.highlighted.names = "QtGui/Analog Clock Window Example" \ # "QtWidgets/Analog Clock Example" @@ -26,13 +25,10 @@ # manifestmeta.sql.names = "QtSql/*" # manifestmeta.sql.tags = database # -# manifestmeta.webkit.names = "QtWebKitExamples/*" -# manifestmeta.webkit.tags = webkit -# # manifestmeta.global.names = * # manifestmeta.global.tags = qt5 -manifestmeta.filters = highlighted webkit1 webkit2 android thumbnail ios +manifestmeta.filters = highlighted android thumbnail ios manifestmeta.highlighted.names = "QtQuick/Qt Quick Demo - Same Game" \ "QtQuick/Qt Quick Demo - Photo Surface" \ diff --git a/examples/widgets/mainwindows/mainwindow/mainwindow.cpp b/examples/widgets/mainwindows/mainwindow/mainwindow.cpp index a0aedb6f24..a21a64bdd4 100644 --- a/examples/widgets/mainwindows/mainwindow/mainwindow.cpp +++ b/examples/widgets/mainwindows/mainwindow/mainwindow.cpp @@ -429,7 +429,7 @@ CreateDockWidgetDialog::CreateDockWidgetDialog(QWidget *parent) QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this); connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject); - connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::reject); + connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept); layout->addWidget(buttonBox, 2, 0, 1, 2); } diff --git a/src/3rdparty/png_dependency.pri b/src/3rdparty/png_dependency.pri index eb32432b49..2ec2e8929d 100644 --- a/src/3rdparty/png_dependency.pri +++ b/src/3rdparty/png_dependency.pri @@ -1,6 +1,14 @@ contains(QT_CONFIG, system-png) { - unix|mingw: LIBS_PRIVATE += -lpng - else: LIBS += libpng.lib + unix|mingw { + !contains(QT_CONFIG, no-pkg-config) { + CONFIG += link_pkgconfig + PKGCONFIG_PRIVATE += libpng + } else { + LIBS_PRIVATE += -lpng + } + } else { + LIBS += libpng.lib + } } else: contains(QT_CONFIG, png) { INCLUDEPATH += $$PWD/libpng LIBS_PRIVATE += -L$$QT_BUILD_TREE/lib -lqtpng$$qtPlatformTargetSuffix() diff --git a/src/corelib/io/qloggingcategory.cpp b/src/corelib/io/qloggingcategory.cpp index 519cec507a..afdf0d0312 100644 --- a/src/corelib/io/qloggingcategory.cpp +++ b/src/corelib/io/qloggingcategory.cpp @@ -86,6 +86,15 @@ static void setBoolLane(QBasicAtomicInt *atomic, bool enable, int shift) \snippet qloggingcategory/main.cpp 1 + \note Category names are free text. However, to allow easy configuration + of the categories using \l{Logging Rules} the names should follow some rules: + \list + \li Use letters and numbers only. + \li Further structure categories into common areas by using dots. + \li Avoid the category names \c{debug}, \c{info}, \c{warning}, and \c{critical}. + \li Category names starting with \c{qt} are reserved for Qt modules. + \endlist + \section1 Checking Category Configuration QLoggingCategory provides \l isDebugEnabled(), \l isInfoEnabled(), diff --git a/src/network/socket/qnet_unix_p.h b/src/network/socket/qnet_unix_p.h index 9d17c6dd33..8d2a4ae852 100644 --- a/src/network/socket/qnet_unix_p.h +++ b/src/network/socket/qnet_unix_p.h @@ -115,7 +115,11 @@ static inline int qt_safe_accept(int s, struct sockaddr *addr, QT_SOCKLEN_T *add int sockflags = SOCK_CLOEXEC; if (flags & O_NONBLOCK) sockflags |= SOCK_NONBLOCK; +# if defined(Q_OS_NETBSD) + fd = ::paccept(s, addr, static_cast<QT_SOCKLEN_T *>(addrlen), NULL, sockflags); +# else fd = ::accept4(s, addr, static_cast<QT_SOCKLEN_T *>(addrlen), sockflags); +# endif return fd; #else fd = ::accept(s, addr, static_cast<QT_SOCKLEN_T *>(addrlen)); diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 3544382944..a4830130f1 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -281,6 +281,7 @@ QWidgetPrivate::QWidgetPrivate(int version) #endif #ifndef QT_NO_OPENGL , renderToTextureReallyDirty(1) + , renderToTextureComposeActive(0) #endif #if defined(Q_OS_WIN) , noPaintOnScreen(0) diff --git a/src/widgets/kernel/qwidget_p.h b/src/widgets/kernel/qwidget_p.h index 838236536a..71691a4afa 100644 --- a/src/widgets/kernel/qwidget_p.h +++ b/src/widgets/kernel/qwidget_p.h @@ -750,6 +750,7 @@ public: #endif #ifndef QT_NO_OPENGL uint renderToTextureReallyDirty : 1; + uint renderToTextureComposeActive : 1; #endif // *************************** Platform specific ************************************ diff --git a/src/widgets/kernel/qwidgetbackingstore.cpp b/src/widgets/kernel/qwidgetbackingstore.cpp index bb6f3316d6..03211b4e4c 100644 --- a/src/widgets/kernel/qwidgetbackingstore.cpp +++ b/src/widgets/kernel/qwidgetbackingstore.cpp @@ -67,6 +67,8 @@ QT_BEGIN_NAMESPACE extern QRegion qt_dirtyRegion(QWidget *); +Q_GLOBAL_STATIC(QPlatformTextureList, qt_dummy_platformTextureList) + /** * Flushes the contents of the \a backingStore into the screen area of \a widget. * \a tlwOffset is the position of the top level widget relative to the window surface. @@ -109,6 +111,20 @@ void QWidgetBackingStore::qt_flush(QWidget *widget, const QRegion ®ion, QBack offset += widget->mapTo(tlw, QPoint()); #ifndef QT_NO_OPENGL + const bool compositionWasActive = widget->d_func()->renderToTextureComposeActive; + if (!widgetTextures) { + widget->d_func()->renderToTextureComposeActive = false; + // Detect the case of falling back to the normal flush path when no + // render-to-texture widgets are visible anymore. We will force one + // last flush to go through the OpenGL-based composition to prevent + // artifacts. The next flush after this one will use the normal path. + if (compositionWasActive) + widgetTextures = qt_dummy_platformTextureList; + } else { + widget->d_func()->renderToTextureComposeActive = true; + } + + // re-test since we may have been forced to this path via the dummy texture list above if (widgetTextures) { qt_window_private(tlw->windowHandle())->compositing = true; widget->window()->d_func()->sendComposeStatus(widget->window(), false); @@ -984,8 +1000,6 @@ static void findAllTextureWidgetsRecursively(QWidget *tlw, QWidget *widget) } } -Q_GLOBAL_STATIC(QPlatformTextureList, qt_dummy_platformTextureList) - static QPlatformTextureList *widgetTexturesFor(QWidget *tlw, QWidget *widget) { foreach (QPlatformTextureList *tl, QWidgetPrivate::get(tlw)->topData()->widgetTextures) { diff --git a/src/widgets/widgets/qdockarealayout.cpp b/src/widgets/widgets/qdockarealayout.cpp index c14fd5a942..ed630913e7 100644 --- a/src/widgets/widgets/qdockarealayout.cpp +++ b/src/widgets/widgets/qdockarealayout.cpp @@ -2161,6 +2161,9 @@ bool QDockAreaLayoutInfo::updateTabBar() const if (oldCurrentId > 0 && currentTabId() != oldCurrentId) that->setCurrentTabId(oldCurrentId); + if (QDockWidgetGroupWindow *dwgw = qobject_cast<QDockWidgetGroupWindow *>(tabBar->parent())) + dwgw->adjustFlags(); + //returns if the tabbar is visible or not return ( (gap ? 1 : 0) + tabBar->count()) > 1; } diff --git a/src/widgets/widgets/qdockwidget.cpp b/src/widgets/widgets/qdockwidget.cpp index 19444f8315..8229028dac 100644 --- a/src/widgets/widgets/qdockwidget.cpp +++ b/src/widgets/widgets/qdockwidget.cpp @@ -1392,8 +1392,6 @@ void QDockWidget::changeEvent(QEvent *event) if (QDockAreaLayoutInfo *info = winLayout->layoutState.dockAreaLayout.info(this)) info->updateTabBar(); } - if (QDockWidgetGroupWindow *p = qobject_cast<QDockWidgetGroupWindow *>(parent())) - p->adjustFlags(); } #endif // QT_NO_TABBAR break; @@ -1483,9 +1481,6 @@ bool QDockWidget::event(QEvent *event) } if (!isFloating() && layout != 0 && onTop) layout->raise(this); - if (QDockWidgetGroupWindow *p = qobject_cast<QDockWidgetGroupWindow *>(parent())) - p->adjustFlags(); - break; } case QEvent::WindowActivate: |