Merge remote-tracking branch 'origin/5.7' into dev
Conflicts: configure configure.json Change-Id: Iba032d9a29c273da2585632bc6e22bbafb961808
This commit is contained in:
commit
200fdd96f0
@ -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;
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
SOURCES = libpng.cpp
|
||||
CONFIG -= qt dylib
|
||||
!contains(QT_CONFIG, no-pkg-config) {
|
||||
CONFIG += link_pkgconfig
|
||||
PKGCONFIG += libpng
|
||||
} else {
|
||||
LIBS += -lpng
|
||||
}
|
||||
|
@ -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 **)
|
||||
{
|
||||
|
@ -41,5 +41,6 @@
|
||||
|
||||
int main(int, char **)
|
||||
{
|
||||
sqlite3_open_v2(0, 0, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
|
@ -104,6 +104,7 @@
|
||||
"mysql_config": "string",
|
||||
"nomake": { "type": "addString", "values": [ "examples", "tests", "tools" ] },
|
||||
"opengl": { "type": "optionalString", "values": [ "no", "yes", "desktop", "es2" ] },
|
||||
"opengles3": "boolean",
|
||||
"opensource": { "type": "void", "name": "commercial", "value": "no" },
|
||||
"openssl": "boolean",
|
||||
"openssl-linked": { "type": "void", "name": "openssl", "value": "linked" },
|
||||
|
@ -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" \
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -57,22 +57,22 @@ for(group, groups) {
|
||||
}
|
||||
|
||||
$${group}_header.commands = $$QMAKE_QDBUSXML2CPP $$hdr_flags $$qdbusxml2cpp_option ${QMAKE_FILE_OUT}: ${QMAKE_FILE_IN}
|
||||
$${group}_header.depends = $$QMAKE_QDBUSXML2CPP_EXE
|
||||
$${group}_header.depends += $$QMAKE_QDBUSXML2CPP_EXE
|
||||
$${group}_header.output = ${QMAKE_FUNC_FILE_IN_qdbusOutputBasename}_$${dbus_type}.h
|
||||
$${group}_header.name = DBUSXML2CPP $${dbus_TYPE} HEADER ${QMAKE_FILE_IN}
|
||||
$${group}_header.variable_out = $${GROUP}_HEADERS
|
||||
$${group}_header.input = $$input_list
|
||||
|
||||
$${group}_source.commands = $$QMAKE_QDBUSXML2CPP -i ${QMAKE_FILE_OUT_BASE}.h $$src_flags $$qdbusxml2cpp_option :${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
|
||||
$${group}_source.depends = $$QMAKE_QDBUSXML2CPP_EXE
|
||||
$${group}_source.depends += $$QMAKE_QDBUSXML2CPP_EXE
|
||||
$${group}_source.output = ${QMAKE_FUNC_FILE_IN_qdbusOutputBasename}_$${dbus_type}.cpp
|
||||
$${group}_source.name = DBUSXML2CPP $${dbus_TYPE} SOURCE ${QMAKE_FILE_IN}
|
||||
$${group}_source.variable_out = SOURCES
|
||||
$${group}_source.input = $$input_list
|
||||
$${group}_source.depends = $$eval($${group}_header.output) # this actually belongs to the object file
|
||||
$${group}_source.depends += $$eval($${group}_header.output) # this actually belongs to the object file
|
||||
|
||||
$${group}_moc.commands = $$moc_header.commands
|
||||
$${group}_moc.depends = $$QMAKE_MOC_EXE
|
||||
$${group}_moc.depends += $$QMAKE_MOC_EXE
|
||||
$${group}_moc.output = $$moc_header.output
|
||||
$${group}_moc.input = $${GROUP}_HEADERS
|
||||
$${group}_moc.variable_out = GENERATED_SOURCES
|
||||
|
@ -30,7 +30,7 @@ isEmpty(QMAKE_DEFAULT_INCDIRS):!host_build {
|
||||
# Get default include and library paths from compiler
|
||||
#
|
||||
gcc {
|
||||
equals(QMAKE_DIR_SEP, /) {
|
||||
!equals(QMAKE_HOST.os, Windows) {
|
||||
cmd_prefix = "LC_ALL=C"
|
||||
cmd_suffix = "</dev/null >/dev/null"
|
||||
} else {
|
||||
|
@ -5,7 +5,7 @@ isEmpty(QGLTF_DIR): QGLTF_DIR = .
|
||||
qgltf.input = QT3D_MODELS
|
||||
qgltf.output = $$QGLTF_DIR/${QMAKE_FILE_BASE}.qrc
|
||||
qgltf.variable_out += RESOURCES
|
||||
qgltf.depends = $$QMAKE_QGLTF_EXE
|
||||
qgltf.depends += $$QMAKE_QGLTF_EXE
|
||||
qgltf.commands = $$QMAKE_QGLTF -d $$QGLTF_DIR $$QGLTF_PARAMS ${QMAKE_FILE_NAME}
|
||||
silent: qgltf.commands = @echo qgltf ${QMAKE_FILE_IN} && $$qgltf.commands -s
|
||||
qgltf.CONFIG += no_link
|
||||
|
@ -23,7 +23,7 @@ for (s, QLALRSOURCES) {
|
||||
$${base}.input = $$invar
|
||||
$${base}.output = $$QLALR_DIR/$${parser}.cpp
|
||||
$${base}.variable_out = GENERATED_SOURCES
|
||||
$${base}.depends = $$QMAKE_QLALR_EXE
|
||||
$${base}.depends += $$QMAKE_QLALR_EXE
|
||||
$${base}.commands = $$QMAKE_QLALR $$QMAKE_QLALRFLAGS ${QMAKE_FILE_IN}
|
||||
silent: $${base}.commands = @echo qlalr ${QMAKE_FILE_IN} && $${base}.commands
|
||||
$${base}.name = QLALR ${QMAKE_FILE_IN}
|
||||
@ -31,19 +31,19 @@ for (s, QLALRSOURCES) {
|
||||
$${base}_h.input = $$invar
|
||||
$${base}_h.output = $$QLALR_DIR/$${parser}_p.h
|
||||
$${base}_h.CONFIG = no_link
|
||||
$${base}_h.depends = $$QLALR_DIR/$${parser}.cpp
|
||||
$${base}_h.depends += $$QLALR_DIR/$${parser}.cpp
|
||||
$${base}_h.commands = $$escape_expand(\\n) # force creation of rule
|
||||
|
||||
$${base}_decl.input = $$invar
|
||||
$${base}_decl.output = $$QLALR_DIR/$${decl}
|
||||
$${base}_decl.CONFIG = no_link
|
||||
$${base}_decl.depends = $$QLALR_DIR/$${parser}.cpp
|
||||
$${base}_decl.depends += $$QLALR_DIR/$${parser}.cpp
|
||||
$${base}_decl.commands = $$escape_expand(\\n) # force creation of rule
|
||||
|
||||
$${base}_impl.input = $$invar
|
||||
$${base}_impl.output = $$QLALR_DIR/$${impl}
|
||||
$${base}_impl.variable_out = GENERATED_SOURCES
|
||||
$${base}_impl.depends = $$QLALR_DIR/$${parser}.cpp
|
||||
$${base}_impl.depends += $$QLALR_DIR/$${parser}.cpp
|
||||
$${base}_impl.commands = $$escape_expand(\\n) # force creation of rule
|
||||
|
||||
QMAKE_EXTRA_COMPILERS += $$base $${base}_h $${base}_decl $${base}_impl
|
||||
|
@ -103,7 +103,7 @@ rcc.clean += $$RCC_CPP $$RCC_TMP
|
||||
|
||||
}
|
||||
|
||||
rcc.depends = $$QMAKE_RCC_EXE
|
||||
rcc.depends += $$QMAKE_RCC_EXE
|
||||
silent:rcc.commands = @echo rcc ${QMAKE_FILE_IN} && $$rcc.commands
|
||||
else:rcc.commands ~= s/&&/$$escape_expand(\\n\\t)/g
|
||||
QMAKE_EXTRA_COMPILERS += rcc
|
||||
|
@ -3,7 +3,7 @@ qtPrepareTool(QMAKE_UIC, uic, _DEP)
|
||||
isEmpty(UI_DIR):UI_DIR = .
|
||||
isEmpty(QMAKE_MOD_UIC):QMAKE_MOD_UIC = ui_
|
||||
|
||||
uic.depends = $$QMAKE_UIC_EXE
|
||||
uic.depends += $$QMAKE_UIC_EXE
|
||||
uic.commands = $$QMAKE_UIC ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
|
||||
uic.depend_command = $$QMAKE_UIC_DEP -d ${QMAKE_FILE_IN}
|
||||
uic.output = $$UI_DIR/$${QMAKE_MOD_UIC}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
|
||||
|
@ -78,7 +78,7 @@ qtPrepareTool(QMAKE_QTWAYLANDSCANNER, qtwaylandscanner)
|
||||
qtwayland_client_header.name = qtwayland ${QMAKE_FILE_BASE}
|
||||
qtwayland_client_header.input = WAYLANDCLIENTSOURCES
|
||||
qtwayland_client_header.variable_out = HEADERS
|
||||
qtwayland_client_header.depends = $$QMAKE_QTWAYLANDSCANNER_EXE $${WAYLAND_CLIENT_HEADER_DEST}wayland-${QMAKE_FILE_BASE}-client-protocol$${first(QMAKE_EXT_H)}
|
||||
qtwayland_client_header.depends += $$QMAKE_QTWAYLANDSCANNER_EXE $${WAYLAND_CLIENT_HEADER_DEST}wayland-${QMAKE_FILE_BASE}-client-protocol$${first(QMAKE_EXT_H)}
|
||||
qtwayland_client_header.output = $${WAYLAND_CLIENT_HEADER_DEST}qwayland-${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
|
||||
qtwayland_client_header.commands = $$QMAKE_QTWAYLANDSCANNER client-header ${QMAKE_FILE_IN} $$WAYLAND_CLIENT_INCLUDE_DIR > ${QMAKE_FILE_OUT}
|
||||
silent:qtwayland_client_header.commands = @echo QtWayland client header ${QMAKE_FILE_IN} && $$qtwayland_client_header.commands
|
||||
@ -87,7 +87,7 @@ QMAKE_EXTRA_COMPILERS += qtwayland_client_header
|
||||
qtwayland_client_code.name = qtwayland ${QMAKE_FILE_BASE}
|
||||
qtwayland_client_code.input = WAYLANDCLIENTSOURCES
|
||||
qtwayland_client_code.variable_out = SOURCES
|
||||
qtwayland_client_code.depends = $$QMAKE_QTWAYLANDSCANNER_EXE $${WAYLAND_CLIENT_HEADER_DEST}qwayland-${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
|
||||
qtwayland_client_code.depends += $$QMAKE_QTWAYLANDSCANNER_EXE $${WAYLAND_CLIENT_HEADER_DEST}qwayland-${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
|
||||
qtwayland_client_code.output = qwayland-${QMAKE_FILE_BASE}.cpp
|
||||
qtwayland_client_code.commands = $$QMAKE_QTWAYLANDSCANNER client-code ${QMAKE_FILE_IN} $$WAYLAND_CLIENT_INCLUDE_DIR > ${QMAKE_FILE_OUT}
|
||||
silent:qtwayland_client_code.commands = @echo QtWayland client code ${QMAKE_FILE_IN} && $$qtwayland_client_code.commands
|
||||
@ -96,7 +96,7 @@ QMAKE_EXTRA_COMPILERS += qtwayland_client_code
|
||||
qtwayland_server_header.name = qtwayland ${QMAKE_FILE_BASE}
|
||||
qtwayland_server_header.input = WAYLANDSERVERSOURCES
|
||||
qtwayland_server_header.variable_out = HEADERS
|
||||
qtwayland_server_header.depends = $$QMAKE_QTWAYLANDSCANNER_EXE $${WAYLAND_SERVER_HEADER_DEST}wayland-${QMAKE_FILE_BASE}-server-protocol$${first(QMAKE_EXT_H)}
|
||||
qtwayland_server_header.depends += $$QMAKE_QTWAYLANDSCANNER_EXE $${WAYLAND_SERVER_HEADER_DEST}wayland-${QMAKE_FILE_BASE}-server-protocol$${first(QMAKE_EXT_H)}
|
||||
qtwayland_server_header.output = $${WAYLAND_SERVER_HEADER_DEST}qwayland-server-${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
|
||||
qtwayland_server_header.commands = $$QMAKE_QTWAYLANDSCANNER server-header ${QMAKE_FILE_IN} $$WAYLAND_SERVER_INCLUDE_DIR > ${QMAKE_FILE_OUT}
|
||||
silent:qtwayland_server_header.commands = @echo QtWayland server header ${QMAKE_FILE_IN} && $$qtwayland_server_header.commands
|
||||
@ -105,7 +105,7 @@ QMAKE_EXTRA_COMPILERS += qtwayland_server_header
|
||||
qtwayland_server_code.name = qtwayland ${QMAKE_FILE_BASE}
|
||||
qtwayland_server_code.input = WAYLANDSERVERSOURCES
|
||||
qtwayland_server_code.variable_out = SOURCES
|
||||
qtwayland_server_code.depends = $$QMAKE_QTWAYLANDSCANNER_EXE $${WAYLAND_SERVER_HEADER_DEST}qwayland-server-${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
|
||||
qtwayland_server_code.depends += $$QMAKE_QTWAYLANDSCANNER_EXE $${WAYLAND_SERVER_HEADER_DEST}qwayland-server-${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
|
||||
qtwayland_server_code.output = qwayland-server-${QMAKE_FILE_BASE}.cpp
|
||||
qtwayland_server_code.commands = $$QMAKE_QTWAYLANDSCANNER server-code ${QMAKE_FILE_IN} $$WAYLAND_SERVER_INCLUDE_DIR > ${QMAKE_FILE_OUT}
|
||||
silent:qtwayland_server_code.commands = @echo QtWayland server code ${QMAKE_FILE_IN} && $$qtwayland_server_code.commands
|
||||
|
@ -1,6 +1,6 @@
|
||||
qtPrepareTool(QMAKE_DUMPCPP, dumpcpp)
|
||||
|
||||
dumpcpp_decl.depends = $$QMAKE_DUMPCPP_EXE
|
||||
dumpcpp_decl.depends += $$QMAKE_DUMPCPP_EXE
|
||||
dumpcpp_decl.commands = $$QMAKE_DUMPCPP ${QMAKE_FILE_IN} -o ${QMAKE_FILE_BASE}
|
||||
qaxcontainer_compat: dumpcpp_decl.commands += -compat
|
||||
dumpcpp_decl.output = ${QMAKE_FILE_BASE}.h
|
||||
@ -17,7 +17,7 @@ dumpcpp_impl.output = ${QMAKE_FILE_BASE}.cpp
|
||||
dumpcpp_impl.input = TYPELIBS
|
||||
dumpcpp_impl.variable_out = SOURCES
|
||||
dumpcpp_impl.name = CPP
|
||||
dumpcpp_impl.depends = ${QMAKE_FILE_BASE}.h
|
||||
dumpcpp_impl.depends += ${QMAKE_FILE_BASE}.h
|
||||
|
||||
QMAKE_EXTRA_COMPILERS += dumpcpp_impl
|
||||
|
||||
@ -31,6 +31,6 @@ if(isEmpty(BUILDS)|build_pass):have_target:!contains(TEMPLATE, vc.*) {
|
||||
}
|
||||
|
||||
objtgt.target = $(OBJECTS)
|
||||
objtgt.depends = $$TYPELIB_HEADERS
|
||||
objtgt.depends += $$TYPELIB_HEADERS
|
||||
QMAKE_EXTRA_TARGETS += objtgt
|
||||
}
|
||||
|
@ -36,7 +36,7 @@
|
||||
yacc_impl.input = YACCSOURCES
|
||||
yacc_impl.variable_out = GENERATED_SOURCES
|
||||
yacc_impl.commands = $$escape_expand(\\n) # We don't want any commands where, but if command is empty no rules are created
|
||||
yacc_impl.depends = $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_MOD_YACC}$${first(QMAKE_EXT_H)} # Make sure we depend on the step above
|
||||
yacc_impl.depends += $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_MOD_YACC}$${first(QMAKE_EXT_H)} # Make sure we depend on the step above
|
||||
yacc_impl.output = $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_MOD_YACC}$${first(QMAKE_EXT_CPP)} # Faked output from this step, output really created in step above
|
||||
QMAKE_EXTRA_COMPILERS += yacc_impl
|
||||
}
|
||||
|
12
src/3rdparty/png_dependency.pri
vendored
12
src/3rdparty/png_dependency.pri
vendored
@ -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()
|
||||
|
@ -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(),
|
||||
|
@ -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));
|
||||
|
@ -2102,6 +2102,15 @@ void QXcbWindow::handleConfigureNotifyEvent(const xcb_configure_notify_event_t *
|
||||
// will make the comparison later.
|
||||
QWindowSystemInterface::handleWindowScreenChanged(window(), newScreen->screen());
|
||||
|
||||
// Send the synthetic expose event on resize only when the window is shrinked,
|
||||
// because the "XCB_GRAVITY_NORTH_WEST" flag doesn't send it automatically.
|
||||
if (!m_oldWindowSize.isEmpty()
|
||||
&& (actualGeometry.width() < m_oldWindowSize.width()
|
||||
|| actualGeometry.height() < m_oldWindowSize.height())) {
|
||||
QWindowSystemInterface::handleExposeEvent(window(), QRegion(0, 0, actualGeometry.width(), actualGeometry.height()));
|
||||
}
|
||||
m_oldWindowSize = actualGeometry.size();
|
||||
|
||||
if (m_usingSyncProtocol && m_syncState == SyncReceived)
|
||||
m_syncState = SyncAndConfigureReceived;
|
||||
|
||||
|
@ -256,6 +256,7 @@ protected:
|
||||
mutable QMargins m_frameMargins;
|
||||
|
||||
QRegion m_exposeRegion;
|
||||
QSize m_oldWindowSize;
|
||||
|
||||
xcb_visualid_t m_visualId;
|
||||
int m_lastWindowStateEvent;
|
||||
|
@ -2604,12 +2604,11 @@ QModelIndexList QAbstractItemView::selectedIndexes() const
|
||||
QModelIndexList indexes;
|
||||
if (d->selectionModel) {
|
||||
indexes = d->selectionModel->selectedIndexes();
|
||||
QList<QModelIndex>::iterator it = indexes.begin();
|
||||
while (it != indexes.end())
|
||||
if (isIndexHidden(*it))
|
||||
it = indexes.erase(it);
|
||||
else
|
||||
++it;
|
||||
auto isHidden = [this](const QModelIndex &idx) {
|
||||
return isIndexHidden(idx);
|
||||
};
|
||||
const auto end = indexes.end();
|
||||
indexes.erase(std::remove_if(indexes.begin(), end, isHidden), end);
|
||||
}
|
||||
return indexes;
|
||||
}
|
||||
|
@ -277,7 +277,8 @@ public:
|
||||
|
||||
const QEditorInfo &editorForIndex(const QModelIndex &index) const;
|
||||
inline bool hasEditor(const QModelIndex &index) const {
|
||||
return indexEditorHash.find(index) != indexEditorHash.constEnd();
|
||||
// Search's implicit cast (QModelIndex to QPersistentModelIndex) is slow; use cheap pre-test to avoid when we can.
|
||||
return !indexEditorHash.isEmpty() && indexEditorHash.contains(index);
|
||||
}
|
||||
|
||||
QModelIndex indexForEditor(QWidget *editor) const;
|
||||
|
@ -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)
|
||||
|
@ -750,6 +750,7 @@ public:
|
||||
#endif
|
||||
#ifndef QT_NO_OPENGL
|
||||
uint renderToTextureReallyDirty : 1;
|
||||
uint renderToTextureComposeActive : 1;
|
||||
#endif
|
||||
|
||||
// *************************** Platform specific ************************************
|
||||
|
@ -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);
|
||||
@ -970,8 +986,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) {
|
||||
|
@ -1418,7 +1418,7 @@ QStyle::SubControl QAbstractSpinBoxPrivate::newHoverControl(const QPoint &pos)
|
||||
|
||||
QString QAbstractSpinBoxPrivate::stripped(const QString &t, int *pos) const
|
||||
{
|
||||
QString text = t;
|
||||
QStringRef text(&t);
|
||||
if (specialValueText.size() == 0 || text != specialValueText) {
|
||||
int from = 0;
|
||||
int size = text.size();
|
||||
@ -1440,7 +1440,7 @@ QString QAbstractSpinBoxPrivate::stripped(const QString &t, int *pos) const
|
||||
text = text.trimmed();
|
||||
if (pos)
|
||||
(*pos) -= (s - text.size());
|
||||
return text;
|
||||
return text.toString();
|
||||
|
||||
}
|
||||
|
||||
|
@ -2168,6 +2168,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;
|
||||
}
|
||||
|
@ -1390,8 +1390,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;
|
||||
@ -1481,9 +1479,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:
|
||||
|
@ -1413,13 +1413,13 @@ static QString computeElidedText(Qt::TextElideMode mode, const QString &text)
|
||||
QString ret;
|
||||
switch (mode) {
|
||||
case Qt::ElideRight:
|
||||
ret = text.left(2) + Ellipses;
|
||||
ret = text.leftRef(2) + Ellipses;
|
||||
break;
|
||||
case Qt::ElideMiddle:
|
||||
ret = text.left(1) + Ellipses + text.right(1);
|
||||
ret = text.leftRef(1) + Ellipses + text.rightRef(1);
|
||||
break;
|
||||
case Qt::ElideLeft:
|
||||
ret = Ellipses + text.right(2);
|
||||
ret = Ellipses + text.rightRef(2);
|
||||
break;
|
||||
case Qt::ElideNone:
|
||||
ret = text;
|
||||
|
@ -302,7 +302,7 @@ void QTextBrowserPrivate::setSource(const QUrl &url)
|
||||
qWarning("QTextBrowser: No document for %s", url.toString().toLatin1().constData());
|
||||
|
||||
if (q->isVisible()) {
|
||||
QString firstTag = txt.left(txt.indexOf(QLatin1Char('>')) + 1);
|
||||
const QStringRef firstTag = txt.leftRef(txt.indexOf(QLatin1Char('>')) + 1);
|
||||
if (firstTag.startsWith(QLatin1String("<qt")) && firstTag.contains(QLatin1String("type")) && firstTag.contains(QLatin1String("detail"))) {
|
||||
#ifndef QT_NO_CURSOR
|
||||
QApplication::restoreOverrideCursor();
|
||||
|
@ -58,6 +58,7 @@ private slots:
|
||||
void setVisible();
|
||||
void eventOrderOnShow();
|
||||
void resizeEventAfterResize();
|
||||
void exposeEventOnShrink_QTBUG54040();
|
||||
void mapGlobal();
|
||||
void positioning_data();
|
||||
void positioning();
|
||||
@ -370,6 +371,24 @@ void tst_QWindow::resizeEventAfterResize()
|
||||
QTRY_COMPARE(window.received(QEvent::Resize), 2);
|
||||
}
|
||||
|
||||
void tst_QWindow::exposeEventOnShrink_QTBUG54040()
|
||||
{
|
||||
Window window;
|
||||
window.setGeometry(QRect(m_availableTopLeft + QPoint(80, 80), m_testWindowSize));
|
||||
window.setTitle(QTest::currentTestFunction());
|
||||
window.showNormal();
|
||||
|
||||
QVERIFY(QTest::qWaitForWindowExposed(&window));
|
||||
|
||||
const int initialExposeCount = window.received(QEvent::Expose);
|
||||
window.resize(window.width(), window.height() - 5);
|
||||
QTRY_COMPARE(window.received(QEvent::Expose), initialExposeCount + 1);
|
||||
window.resize(window.width() - 5, window.height());
|
||||
QTRY_COMPARE(window.received(QEvent::Expose), initialExposeCount + 2);
|
||||
window.resize(window.width() - 5, window.height() - 5);
|
||||
QTRY_COMPARE(window.received(QEvent::Expose), initialExposeCount + 3);
|
||||
}
|
||||
|
||||
void tst_QWindow::positioning_data()
|
||||
{
|
||||
QTest::addColumn<int>("windowflags");
|
||||
|
Loading…
x
Reference in New Issue
Block a user