summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2018-07-27 11:22:57 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2018-07-31 13:33:14 +0200
commit23c9d4c98f3c6729b56700edc1d7144b444b16db (patch)
tree27b20ccbf3c101dbc7bcb1e509882b6c7fc75962 /src/corelib/kernel
parentf69a5857d115786f44d053e68c36f74526020e82 (diff)
parent0ef66e98ccf4946a0e4513ab5fc157df0f0aca4e (diff)
Merge branch '5.11' into dev
Conflicts: qmake/library/qmakebuiltins.cpp src/plugins/platforms/windows/qwindowstabletsupport.h src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/widgets/styles/qstylesheetstyle.cpp tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp Done-With: Gatis Paeglis <gatis.paeglis@qt.io> Change-Id: I000b0eb3cea2a5c7a99b95732bfdd41507cf916e
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r--src/corelib/kernel/qcore_unix.cpp20
-rw-r--r--src/corelib/kernel/qcore_unix_p.h8
-rw-r--r--src/corelib/kernel/qcoreevent.cpp6
3 files changed, 34 insertions, 0 deletions
diff --git a/src/corelib/kernel/qcore_unix.cpp b/src/corelib/kernel/qcore_unix.cpp
index eb98cbef8f..18c031f137 100644
--- a/src/corelib/kernel/qcore_unix.cpp
+++ b/src/corelib/kernel/qcore_unix.cpp
@@ -44,6 +44,12 @@
#include <stdlib.h>
+#ifdef __GLIBC__
+# include <sys/syscall.h>
+# include <pthread.h>
+# include <unistd.h>
+#endif
+
#ifdef Q_OS_MAC
#include <mach/mach_time.h>
#endif
@@ -79,6 +85,20 @@ QByteArray qt_readlink(const char *path)
return buf;
}
+#if defined(Q_PROCESSOR_X86_32) && defined(__GLIBC__)
+# if !__GLIBC_PREREQ(2, 22)
+// glibc prior to release 2.22 had a bug that suppresses the third argument to
+// open() / open64() / openat(), causing file creation with O_TMPFILE to have
+// the wrong permissions. So we bypass the glibc implementation and go straight
+// for the syscall. See
+// https://sourceware.org/git/?p=glibc.git;a=commit;h=65f6f938cd562a614a68e15d0581a34b177ec29d
+int qt_open64(const char *pathname, int flags, mode_t mode)
+{
+ return syscall(SYS_open, pathname, flags | O_LARGEFILE, mode);
+}
+# endif
+#endif
+
#ifndef QT_BOOTSTRAPPED
#if QT_CONFIG(poll_pollts)
diff --git a/src/corelib/kernel/qcore_unix_p.h b/src/corelib/kernel/qcore_unix_p.h
index e538a7e22b..cb98bef347 100644
--- a/src/corelib/kernel/qcore_unix_p.h
+++ b/src/corelib/kernel/qcore_unix_p.h
@@ -176,6 +176,14 @@ inline void qt_ignore_sigpipe()
}
}
+#if defined(Q_PROCESSOR_X86_32) && defined(__GLIBC__)
+# if !__GLIBC_PREREQ(2, 22)
+int qt_open64(const char *pathname, int flags, mode_t);
+# undef QT_OPEN
+# define QT_OPEN qt_open64
+# endif
+#endif
+
// don't call QT_OPEN or ::open
// call qt_safe_open
static inline int qt_safe_open(const char *pathname, int flags, mode_t mode = 0777)
diff --git a/src/corelib/kernel/qcoreevent.cpp b/src/corelib/kernel/qcoreevent.cpp
index e34fe3f955..cacbb1e495 100644
--- a/src/corelib/kernel/qcoreevent.cpp
+++ b/src/corelib/kernel/qcoreevent.cpp
@@ -204,6 +204,12 @@ QT_BEGIN_NAMESPACE
\value Scroll The object needs to scroll to the supplied position (QScrollEvent).
\value Shortcut Key press in child for shortcut key handling (QShortcutEvent).
\value ShortcutOverride Key press in child, for overriding shortcut key handling (QKeyEvent).
+ When a shortcut is about to trigger, \c ShortcutOverride
+ is sent to the active window. This allows clients (e.g. widgets)
+ to signal that they will handle the shortcut themselves, by
+ accepting the event. If the shortcut override is accepted, the
+ event is delivered as a normal key press to the focus widget.
+ Otherwise, it triggers the shortcut action, if one exists.
\value Show Widget was shown on screen (QShowEvent).
\value ShowToParent A child widget has been shown.
\value SockAct Socket activated, used to implement QSocketNotifier.