summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-06-19 08:19:54 +0200
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-06-19 08:19:54 +0200
commitdd23ed3dbddcfd8a04b9fb63ba6ad62dce8ffa3b (patch)
treec8758b88b7079996760929e015f72a54c3a0dafd /src
parentbd263452cdb1b311c72fb3d6d05cbfa37b16f16e (diff)
parent97eec16e4ff6367c233f8ea6c4a343c286c3a514 (diff)
Merge 5.9 into 5.9.1
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/angle/src/libANGLE/formatutils.cpp2
-rw-r--r--src/3rdparty/angle/src/libANGLE/formatutils.h2
-rw-r--r--src/3rdparty/angle/src/libANGLE/validationES3.cpp18
-rw-r--r--src/android/jar/src/org/qtproject/qt5/android/CursorHandle.java12
-rw-r--r--src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java16
-rw-r--r--src/android/jar/src/org/qtproject/qt5/android/QtNative.java18
-rw-r--r--src/android/jar/src/org/qtproject/qt5/android/QtSurface.java7
-rw-r--r--src/angle/patches/0013-ANGLE-Fix-crash-with-ltcg-on-Visual-Studio-2015-Upda.patch110
-rw-r--r--src/corelib/configure.json18
-rw-r--r--src/corelib/doc/src/json.qdoc2
-rw-r--r--src/corelib/global/global.pri1
-rw-r--r--src/corelib/global/qglobalstatic.qdoc (renamed from src/corelib/global/qglobalstatic.cpp)2
-rw-r--r--src/corelib/global/qlogging.cpp2
-rw-r--r--src/corelib/io/qprocess.cpp36
-rw-r--r--src/corelib/io/qprocess_darwin.mm2
-rw-r--r--src/corelib/io/qprocess_p.h39
-rw-r--r--src/corelib/io/qprocess_unix.cpp12
-rw-r--r--src/corelib/io/qprocess_win.cpp12
-rw-r--r--src/corelib/json/qjson_p.h2
-rw-r--r--src/corelib/kernel/kernel.pri2
-rw-r--r--src/corelib/tools/qcollator.cpp2
-rw-r--r--src/corelib/tools/qcollator_macx.cpp2
-rw-r--r--src/corelib/tools/qsimd.cpp8
-rw-r--r--src/corelib/tools/qsimd_p.h6
-rw-r--r--src/gui/configure.json1
-rw-r--r--src/gui/kernel/qclipboard.cpp11
-rw-r--r--src/network/kernel/qhostaddress.cpp24
-rw-r--r--src/network/ssl/qsslsocket_mac.cpp6
-rw-r--r--src/platformsupport/themes/genericunix/qgenericunixthemes.cpp8
-rw-r--r--src/plugins/platforms/android/androidjniinput.cpp26
-rw-r--r--src/plugins/platforms/android/androidjniinput.h2
-rw-r--r--src/plugins/platforms/android/qandroidinputcontext.cpp5
-rw-r--r--src/plugins/platforms/cocoa/qnsview.mm5
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2ddevicecontext.cpp3
-rw-r--r--src/plugins/platforms/xcb/qxcbxsettings.cpp15
-rw-r--r--src/plugins/sqldrivers/.qmake.conf19
-rw-r--r--src/plugins/sqldrivers/configure.json (renamed from src/sql/configure.json)31
-rw-r--r--src/plugins/sqldrivers/configure.pri (renamed from src/sql/configure.pri)0
-rw-r--r--src/plugins/sqldrivers/qsqldriverbase.pri3
-rw-r--r--src/plugins/sqldrivers/sqldrivers.pro6
-rw-r--r--src/plugins/sqldrivers/sqlite/sqlite.pro5
-rw-r--r--src/tools/uic/cpp/cppwriteinitialization.cpp7
-rw-r--r--src/widgets/dialogs/dialogs.pri3
-rw-r--r--src/widgets/dialogs/qdialog.cpp2
-rw-r--r--src/widgets/dialogs/qfiledialog_embedded.ui353
-rw-r--r--src/widgets/itemviews/itemviews.pri16
-rw-r--r--src/widgets/itemviews/qcolumnview.h7
-rw-r--r--src/widgets/itemviews/qcolumnview_p.h8
-rw-r--r--src/widgets/itemviews/qcolumnviewgrip.cpp4
-rw-r--r--src/widgets/itemviews/qcolumnviewgrip_p.h4
-rw-r--r--src/widgets/styles/qcommonstyle.cpp4
51 files changed, 385 insertions, 526 deletions
diff --git a/src/3rdparty/angle/src/libANGLE/formatutils.cpp b/src/3rdparty/angle/src/libANGLE/formatutils.cpp
index 3a4df126c5..f8b9a8bab8 100644
--- a/src/3rdparty/angle/src/libANGLE/formatutils.cpp
+++ b/src/3rdparty/angle/src/libANGLE/formatutils.cpp
@@ -652,7 +652,7 @@ const Type &GetTypeInfo(GLenum type)
}
}
-const InternalFormat &GetInternalFormatInfo(GLenum internalFormat)
+const InternalFormat GetInternalFormatInfo(GLenum internalFormat)
{
const InternalFormatInfoMap &formatMap = GetInternalFormatMap();
InternalFormatInfoMap::const_iterator iter = formatMap.find(internalFormat);
diff --git a/src/3rdparty/angle/src/libANGLE/formatutils.h b/src/3rdparty/angle/src/libANGLE/formatutils.h
index 6863e4ddc4..2165e6badd 100644
--- a/src/3rdparty/angle/src/libANGLE/formatutils.h
+++ b/src/3rdparty/angle/src/libANGLE/formatutils.h
@@ -79,7 +79,7 @@ struct InternalFormat
GLint skipRows,
GLint skipPixels) const;
};
-const InternalFormat &GetInternalFormatInfo(GLenum internalFormat);
+const InternalFormat GetInternalFormatInfo(GLenum internalFormat);
GLenum GetSizedInternalFormat(GLenum internalFormat, GLenum type);
diff --git a/src/3rdparty/angle/src/libANGLE/validationES3.cpp b/src/3rdparty/angle/src/libANGLE/validationES3.cpp
index e08e5d261b..2db64ec4cc 100644
--- a/src/3rdparty/angle/src/libANGLE/validationES3.cpp
+++ b/src/3rdparty/angle/src/libANGLE/validationES3.cpp
@@ -775,20 +775,20 @@ static bool IsValidES3CopyTexImageCombination(GLenum textureInternalFormat, GLen
// with the values of the source buffer's [channel sizes]. Table 3.17 is used if the
// FRAMEBUFFER_ATTACHMENT_ENCODING is LINEAR and table 3.18 is used if the FRAMEBUFFER_ATTACHMENT_ENCODING
// is SRGB.
- const InternalFormat *sourceEffectiveFormat = NULL;
+ InternalFormat sourceEffectiveFormat;
if (readBufferHandle != 0)
{
// Not the default framebuffer, therefore the read buffer must be a user-created texture or renderbuffer
if (framebufferInternalFormatInfo.pixelBytes > 0)
{
- sourceEffectiveFormat = &framebufferInternalFormatInfo;
+ sourceEffectiveFormat = framebufferInternalFormatInfo;
}
else
{
// Renderbuffers cannot be created with an unsized internal format, so this must be an unsized-format
// texture. We can use the same table we use when creating textures to get its effective sized format.
GLenum sizedInternalFormat = GetSizedInternalFormat(framebufferInternalFormatInfo.format, framebufferInternalFormatInfo.type);
- sourceEffectiveFormat = &GetInternalFormatInfo(sizedInternalFormat);
+ sourceEffectiveFormat = GetInternalFormatInfo(sizedInternalFormat);
}
}
else
@@ -800,7 +800,7 @@ static bool IsValidES3CopyTexImageCombination(GLenum textureInternalFormat, GLen
GLenum effectiveFormat;
if (GetEffectiveInternalFormat(framebufferInternalFormatInfo, textureInternalFormatInfo, &effectiveFormat))
{
- sourceEffectiveFormat = &GetInternalFormatInfo(effectiveFormat);
+ sourceEffectiveFormat = GetInternalFormatInfo(effectiveFormat);
}
else
{
@@ -816,7 +816,7 @@ static bool IsValidES3CopyTexImageCombination(GLenum textureInternalFormat, GLen
(framebufferInternalFormatInfo.blueBits >= 1 && framebufferInternalFormatInfo.blueBits <= 8) &&
(framebufferInternalFormatInfo.alphaBits >= 1 && framebufferInternalFormatInfo.alphaBits <= 8))
{
- sourceEffectiveFormat = &GetInternalFormatInfo(GL_SRGB8_ALPHA8);
+ sourceEffectiveFormat = GetInternalFormatInfo(GL_SRGB8_ALPHA8);
}
else
{
@@ -834,10 +834,10 @@ static bool IsValidES3CopyTexImageCombination(GLenum textureInternalFormat, GLen
{
// Section 3.8.5 of the GLES 3.0.3 spec, pg 139, requires that, if the destination format is sized,
// component sizes of the source and destination formats must exactly match
- if (textureInternalFormatInfo.redBits != sourceEffectiveFormat->redBits ||
- textureInternalFormatInfo.greenBits != sourceEffectiveFormat->greenBits ||
- textureInternalFormatInfo.blueBits != sourceEffectiveFormat->blueBits ||
- textureInternalFormatInfo.alphaBits != sourceEffectiveFormat->alphaBits)
+ if (textureInternalFormatInfo.redBits != sourceEffectiveFormat.redBits ||
+ textureInternalFormatInfo.greenBits != sourceEffectiveFormat.greenBits ||
+ textureInternalFormatInfo.blueBits != sourceEffectiveFormat.blueBits ||
+ textureInternalFormatInfo.alphaBits != sourceEffectiveFormat.alphaBits)
{
return false;
}
diff --git a/src/android/jar/src/org/qtproject/qt5/android/CursorHandle.java b/src/android/jar/src/org/qtproject/qt5/android/CursorHandle.java
index 7d26b8fa04..e6814c202d 100644
--- a/src/android/jar/src/org/qtproject/qt5/android/CursorHandle.java
+++ b/src/android/jar/src/org/qtproject/qt5/android/CursorHandle.java
@@ -107,13 +107,14 @@ public class CursorHandle implements ViewTreeObserver.OnPreDrawListener
private int m_id;
private int m_attr;
private Activity m_activity;
- private int m_posX;
- private int m_posY;
+ private int m_posX = 0;
+ private int m_posY = 0;
private int m_lastX;
private int m_lastY;
int tolerance;
+ private boolean m_rtl;
- public CursorHandle(Activity activity, View layout, int id, int attr) {
+ public CursorHandle(Activity activity, View layout, int id, int attr, boolean rtl) {
m_activity = activity;
m_id = id;
m_attr = attr;
@@ -122,6 +123,7 @@ public class CursorHandle implements ViewTreeObserver.OnPreDrawListener
activity.getWindowManager().getDefaultDisplay().getMetrics(metrics);
tolerance = Math.round(2 * metrics.density);
m_lastX = m_lastY = -1 - tolerance;
+ m_rtl = rtl;
}
private boolean initOverlay(){
@@ -160,9 +162,9 @@ public class CursorHandle implements ViewTreeObserver.OnPreDrawListener
if (m_id == QtNative.IdCursorHandle) {
x2 -= m_cursorView.getWidth() / 2 ;
- } else if (m_id == QtNative.IdLeftHandle) {
+ } else if ((m_id == QtNative.IdLeftHandle && !m_rtl) || (m_id == QtNative.IdRightHandle && m_rtl)) {
x2 -= m_cursorView.getWidth() * 3 / 4;
- } else if (m_id == QtNative.IdRightHandle) {
+ } else {
x2 -= m_cursorView.getWidth() / 4;
}
diff --git a/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java b/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java
index 26f877235f..32d4abf43a 100644
--- a/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java
+++ b/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java
@@ -490,7 +490,7 @@ public class QtActivityDelegate
be adjusted.
mode is one of QAndroidInputContext::CursorHandleShowMode
*/
- public void updateHandles(int mode, int x1, int y1, int x2, int y2)
+ public void updateHandles(int mode, int x1, int y1, int x2, int y2, boolean rtl)
{
if (mode == CursorHandleNotShown) {
if (m_cursorHandle != null)
@@ -498,6 +498,8 @@ public class QtActivityDelegate
if (m_rightSelectionHandle != null) {
m_rightSelectionHandle.hide();
m_leftSelectionHandle.hide();
+ m_rightSelectionHandle = null;
+ m_leftSelectionHandle = null;
}
if (m_editMenu != null)
m_editMenu.hide();
@@ -506,19 +508,25 @@ public class QtActivityDelegate
} else if (mode == CursorHandleShowNormal || mode == CursorHandleShowPopup) {
if (m_cursorHandle == null) {
m_cursorHandle = new CursorHandle(m_activity, m_layout, QtNative.IdCursorHandle,
- android.R.attr.textSelectHandle);
+ android.R.attr.textSelectHandle, false);
}
m_cursorHandle.setPosition(x1, y1);
if (m_rightSelectionHandle != null) {
m_rightSelectionHandle.hide();
m_leftSelectionHandle.hide();
+ m_rightSelectionHandle = null;
+ m_leftSelectionHandle = null;
}
} else if (mode == CursorHandleShowSelection) {
if (m_rightSelectionHandle == null) {
m_leftSelectionHandle = new CursorHandle(m_activity, m_layout, QtNative.IdLeftHandle,
- android.R.attr.textSelectHandleLeft);
+ !rtl ? android.R.attr.textSelectHandleLeft :
+ android.R.attr.textSelectHandleRight,
+ rtl);
m_rightSelectionHandle = new CursorHandle(m_activity, m_layout, QtNative.IdRightHandle,
- android.R.attr.textSelectHandleRight);
+ !rtl ? android.R.attr.textSelectHandleRight :
+ android.R.attr.textSelectHandleLeft,
+ rtl);
}
m_leftSelectionHandle.setPosition(x1,y1);
m_rightSelectionHandle.setPosition(x2,y2);
diff --git a/src/android/jar/src/org/qtproject/qt5/android/QtNative.java b/src/android/jar/src/org/qtproject/qt5/android/QtNative.java
index ccd8ec410e..902e2f68e7 100644
--- a/src/android/jar/src/org/qtproject/qt5/android/QtNative.java
+++ b/src/android/jar/src/org/qtproject/qt5/android/QtNative.java
@@ -61,6 +61,7 @@ import android.view.KeyEvent;
import android.view.Menu;
import android.view.MotionEvent;
import android.view.View;
+import android.view.InputDevice;
import java.lang.reflect.Method;
import java.security.KeyStore;
@@ -470,6 +471,17 @@ public class QtNative
}
}
+ static public void sendGenericMotionEvent(MotionEvent event, int id)
+ {
+ if (event.getActionMasked() != MotionEvent.ACTION_SCROLL
+ || (event.getSource() & InputDevice.SOURCE_CLASS_POINTER) != InputDevice.SOURCE_CLASS_POINTER) {
+ return;
+ }
+
+ mouseWheel(id, (int) event.getX(), (int) event.getY(),
+ event.getAxisValue(MotionEvent.AXIS_HSCROLL), event.getAxisValue(MotionEvent.AXIS_VSCROLL));
+ }
+
public static Context getContext() {
if (m_activity != null)
return m_activity;
@@ -516,12 +528,13 @@ public class QtNative
final int x1,
final int y1,
final int x2,
- final int y2)
+ final int y2,
+ final boolean rtl)
{
runAction(new Runnable() {
@Override
public void run() {
- m_activityDelegate.updateHandles(mode, x1, y1, x2, y2);
+ m_activityDelegate.updateHandles(mode, x1, y1, x2, y2, rtl);
}
});
}
@@ -800,6 +813,7 @@ public class QtNative
public static native void mouseDown(int winId, int x, int y);
public static native void mouseUp(int winId, int x, int y);
public static native void mouseMove(int winId, int x, int y);
+ public static native void mouseWheel(int winId, int x, int y, float hdelta, float vdelta);
public static native void touchBegin(int winId);
public static native void touchAdd(int winId, int pointerId, int action, boolean primary, int x, int y, float major, float minor, float rotation, float pressure);
public static native void touchEnd(int winId, int action);
diff --git a/src/android/jar/src/org/qtproject/qt5/android/QtSurface.java b/src/android/jar/src/org/qtproject/qt5/android/QtSurface.java
index 4d8abb2117..e994002dd3 100644
--- a/src/android/jar/src/org/qtproject/qt5/android/QtSurface.java
+++ b/src/android/jar/src/org/qtproject/qt5/android/QtSurface.java
@@ -112,4 +112,11 @@ public class QtSurface extends SurfaceView implements SurfaceHolder.Callback
QtNative.sendTrackballEvent(event, getId());
return true;
}
+
+ @Override
+ public boolean onGenericMotionEvent(MotionEvent event)
+ {
+ QtNative.sendGenericMotionEvent(event, getId());
+ return true;
+ }
}
diff --git a/src/angle/patches/0013-ANGLE-Fix-crash-with-ltcg-on-Visual-Studio-2015-Upda.patch b/src/angle/patches/0013-ANGLE-Fix-crash-with-ltcg-on-Visual-Studio-2015-Upda.patch
new file mode 100644
index 0000000000..ee847d3d9a
--- /dev/null
+++ b/src/angle/patches/0013-ANGLE-Fix-crash-with-ltcg-on-Visual-Studio-2015-Upda.patch
@@ -0,0 +1,110 @@
+From c30bdc7d961ff09d74117e038c1bb9f06ad49738 Mon Sep 17 00:00:00 2001
+From: Oliver Wolff <oliver.wolff@qt.io>
+Date: Wed, 7 Jun 2017 10:07:43 +0200
+Subject: [PATCH] ANGLE: Fix crash with ltcg on Visual Studio 2015 Update 3
+
+Release builds of applications that used Qt configured with "link time
+code generation" crashed (memory access violation), when calling
+GetInternalFormatInfo in Context::initCaps.
+
+It looks like this is a compiler problem that can be avoided by not
+using a reference for the return value.
+
+Task-number: QTBUG-55718
+Change-Id: Ic1fb95d7b518a49859f41c819e860864387a8d3c
+---
+ src/3rdparty/angle/src/libANGLE/formatutils.cpp | 2 +-
+ src/3rdparty/angle/src/libANGLE/formatutils.h | 2 +-
+ src/3rdparty/angle/src/libANGLE/validationES3.cpp | 18 +++++++++---------
+ 3 files changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/src/3rdparty/angle/src/libANGLE/formatutils.cpp b/src/3rdparty/angle/src/libANGLE/formatutils.cpp
+index 3a4df12..f8b9a8b 100644
+--- a/src/3rdparty/angle/src/libANGLE/formatutils.cpp
++++ b/src/3rdparty/angle/src/libANGLE/formatutils.cpp
+@@ -652,7 +652,7 @@ const Type &GetTypeInfo(GLenum type)
+ }
+ }
+
+-const InternalFormat &GetInternalFormatInfo(GLenum internalFormat)
++const InternalFormat GetInternalFormatInfo(GLenum internalFormat)
+ {
+ const InternalFormatInfoMap &formatMap = GetInternalFormatMap();
+ InternalFormatInfoMap::const_iterator iter = formatMap.find(internalFormat);
+diff --git a/src/3rdparty/angle/src/libANGLE/formatutils.h b/src/3rdparty/angle/src/libANGLE/formatutils.h
+index 6863e4d..2165e6b 100644
+--- a/src/3rdparty/angle/src/libANGLE/formatutils.h
++++ b/src/3rdparty/angle/src/libANGLE/formatutils.h
+@@ -79,7 +79,7 @@ struct InternalFormat
+ GLint skipRows,
+ GLint skipPixels) const;
+ };
+-const InternalFormat &GetInternalFormatInfo(GLenum internalFormat);
++const InternalFormat GetInternalFormatInfo(GLenum internalFormat);
+
+ GLenum GetSizedInternalFormat(GLenum internalFormat, GLenum type);
+
+diff --git a/src/3rdparty/angle/src/libANGLE/validationES3.cpp b/src/3rdparty/angle/src/libANGLE/validationES3.cpp
+index e08e5d2..2db64ec 100644
+--- a/src/3rdparty/angle/src/libANGLE/validationES3.cpp
++++ b/src/3rdparty/angle/src/libANGLE/validationES3.cpp
+@@ -775,20 +775,20 @@ static bool IsValidES3CopyTexImageCombination(GLenum textureInternalFormat, GLen
+ // with the values of the source buffer's [channel sizes]. Table 3.17 is used if the
+ // FRAMEBUFFER_ATTACHMENT_ENCODING is LINEAR and table 3.18 is used if the FRAMEBUFFER_ATTACHMENT_ENCODING
+ // is SRGB.
+- const InternalFormat *sourceEffectiveFormat = NULL;
++ InternalFormat sourceEffectiveFormat;
+ if (readBufferHandle != 0)
+ {
+ // Not the default framebuffer, therefore the read buffer must be a user-created texture or renderbuffer
+ if (framebufferInternalFormatInfo.pixelBytes > 0)
+ {
+- sourceEffectiveFormat = &framebufferInternalFormatInfo;
++ sourceEffectiveFormat = framebufferInternalFormatInfo;
+ }
+ else
+ {
+ // Renderbuffers cannot be created with an unsized internal format, so this must be an unsized-format
+ // texture. We can use the same table we use when creating textures to get its effective sized format.
+ GLenum sizedInternalFormat = GetSizedInternalFormat(framebufferInternalFormatInfo.format, framebufferInternalFormatInfo.type);
+- sourceEffectiveFormat = &GetInternalFormatInfo(sizedInternalFormat);
++ sourceEffectiveFormat = GetInternalFormatInfo(sizedInternalFormat);
+ }
+ }
+ else
+@@ -800,7 +800,7 @@ static bool IsValidES3CopyTexImageCombination(GLenum textureInternalFormat, GLen
+ GLenum effectiveFormat;
+ if (GetEffectiveInternalFormat(framebufferInternalFormatInfo, textureInternalFormatInfo, &effectiveFormat))
+ {
+- sourceEffectiveFormat = &GetInternalFormatInfo(effectiveFormat);
++ sourceEffectiveFormat = GetInternalFormatInfo(effectiveFormat);
+ }
+ else
+ {
+@@ -816,7 +816,7 @@ static bool IsValidES3CopyTexImageCombination(GLenum textureInternalFormat, GLen
+ (framebufferInternalFormatInfo.blueBits >= 1 && framebufferInternalFormatInfo.blueBits <= 8) &&
+ (framebufferInternalFormatInfo.alphaBits >= 1 && framebufferInternalFormatInfo.alphaBits <= 8))
+ {
+- sourceEffectiveFormat = &GetInternalFormatInfo(GL_SRGB8_ALPHA8);
++ sourceEffectiveFormat = GetInternalFormatInfo(GL_SRGB8_ALPHA8);
+ }
+ else
+ {
+@@ -834,10 +834,10 @@ static bool IsValidES3CopyTexImageCombination(GLenum textureInternalFormat, GLen
+ {
+ // Section 3.8.5 of the GLES 3.0.3 spec, pg 139, requires that, if the destination format is sized,
+ // component sizes of the source and destination formats must exactly match
+- if (textureInternalFormatInfo.redBits != sourceEffectiveFormat->redBits ||
+- textureInternalFormatInfo.greenBits != sourceEffectiveFormat->greenBits ||
+- textureInternalFormatInfo.blueBits != sourceEffectiveFormat->blueBits ||
+- textureInternalFormatInfo.alphaBits != sourceEffectiveFormat->alphaBits)
++ if (textureInternalFormatInfo.redBits != sourceEffectiveFormat.redBits ||
++ textureInternalFormatInfo.greenBits != sourceEffectiveFormat.greenBits ||
++ textureInternalFormatInfo.blueBits != sourceEffectiveFormat.blueBits ||
++ textureInternalFormatInfo.alphaBits != sourceEffectiveFormat.alphaBits)
+ {
+ return false;
+ }
+--
+2.5.3.windows.1
+
diff --git a/src/corelib/configure.json b/src/corelib/configure.json
index c6c5c93ddb..deb7a544ef 100644
--- a/src/corelib/configure.json
+++ b/src/corelib/configure.json
@@ -84,6 +84,14 @@
"-ldl"
]
},
+ "librt": {
+ "label": "clock_gettime()",
+ "test": "unix/clock-gettime",
+ "sources": [
+ "",
+ "-lrt"
+ ]
+ },
"pcre2": {
"label": "PCRE2",
"test": "unix/pcre2",
@@ -119,15 +127,11 @@
"type": "compile",
"test": "common/atomicfptr"
},
- "clock-gettime": {
- "label": "clock_gettime()",
- "type": "compile",
- "test": "unix/clock-gettime"
- },
"clock-monotonic": {
"label": "POSIX monotonic clock",
"type": "compile",
- "test": "unix/clock-monotonic"
+ "test": "unix/clock-monotonic",
+ "use": "librt"
},
"cloexec": {
"label": "O_CLOEXEC",
@@ -199,7 +203,7 @@
"features": {
"clock-gettime": {
"label": "clock_gettime()",
- "condition": "tests.clock-gettime",
+ "condition": "config.unix && libs.librt",
"output": [ "privateFeature" ]
},
"clock-monotonic": {
diff --git a/src/corelib/doc/src/json.qdoc b/src/corelib/doc/src/json.qdoc
index a32772f910..4c7e62a10a 100644
--- a/src/corelib/doc/src/json.qdoc
+++ b/src/corelib/doc/src/json.qdoc
@@ -45,7 +45,7 @@
access.
More details about the JSON data format can be found at \l{http://json.org}{json.org}
- and in \l{http://tools.ietf.org/html/rfc4627}{RFC-4627}.
+ and in \l{https://tools.ietf.org/html/rfc7159}{RFC-7159}.
\tableofcontents
diff --git a/src/corelib/global/global.pri b/src/corelib/global/global.pri
index f162dd95dd..b76d1ef43c 100644
--- a/src/corelib/global/global.pri
+++ b/src/corelib/global/global.pri
@@ -27,7 +27,6 @@ HEADERS += \
SOURCES += \
global/archdetect.cpp \
global/qglobal.cpp \
- global/qglobalstatic.cpp \
global/qlibraryinfo.cpp \
global/qmalloc.cpp \
global/qnumeric.cpp \
diff --git a/src/corelib/global/qglobalstatic.cpp b/src/corelib/global/qglobalstatic.qdoc
index d1c522a79a..8c34739d38 100644
--- a/src/corelib/global/qglobalstatic.cpp
+++ b/src/corelib/global/qglobalstatic.qdoc
@@ -37,8 +37,6 @@
**
****************************************************************************/
-#include "qglobalstatic.h"
-
/*!
\macro Q_GLOBAL_STATIC(Type, VariableName)
\since 5.1
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp
index 6a91b2cfd0..b5ba935194 100644
--- a/src/corelib/global/qlogging.cpp
+++ b/src/corelib/global/qlogging.cpp
@@ -254,7 +254,7 @@ Q_CORE_EXPORT bool qt_logging_to_console()
\sa QMessageLogContext, qDebug(), qInfo(), qWarning(), qCritical(), qFatal()
*/
-#ifdef Q_OS_WIN
+#if defined(Q_CC_MSVC) && defined(QT_DEBUG) && defined(_DEBUG) && defined(_CRT_ERROR)
static inline void convert_to_wchar_t_elided(wchar_t *d, size_t space, const char *s) Q_DECL_NOEXCEPT
{
size_t len = qstrlen(s);
diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp
index c0ec35ff32..2226b4435b 100644
--- a/src/corelib/io/qprocess.cpp
+++ b/src/corelib/io/qprocess.cpp
@@ -154,8 +154,8 @@ QT_BEGIN_NAMESPACE
QStringList QProcessEnvironmentPrivate::toList() const
{
QStringList result;
- result.reserve(hash.size());
- for (Hash::const_iterator it = hash.cbegin(), end = hash.cend(); it != end; ++it)
+ result.reserve(vars.size());
+ for (auto it = vars.cbegin(), end = vars.cend(); it != end; ++it)
result << nameToString(it.key()) + QLatin1Char('=') + valueToString(it.value());
return result;
}
@@ -181,9 +181,9 @@ QProcessEnvironment QProcessEnvironmentPrivate::fromList(const QStringList &list
QStringList QProcessEnvironmentPrivate::keys() const
{
QStringList result;
- result.reserve(hash.size());
- Hash::ConstIterator it = hash.constBegin(),
- end = hash.constEnd();
+ result.reserve(vars.size());
+ auto it = vars.constBegin();
+ const auto end = vars.constEnd();
for ( ; it != end; ++it)
result << nameToString(it.key());
return result;
@@ -191,14 +191,14 @@ QStringList QProcessEnvironmentPrivate::keys() const
void QProcessEnvironmentPrivate::insert(const QProcessEnvironmentPrivate &other)
{
- Hash::ConstIterator it = other.hash.constBegin(),
- end = other.hash.constEnd();
+ auto it = other.vars.constBegin();
+ const auto end = other.vars.constEnd();
for ( ; it != end; ++it)
- hash.insert(it.key(), it.value());
+ vars.insert(it.key(), it.value());
#ifdef Q_OS_UNIX
- QHash<QString, Key>::ConstIterator nit = other.nameMap.constBegin(),
- nend = other.nameMap.constEnd();
+ auto nit = other.nameMap.constBegin();
+ const auto nend = other.nameMap.constEnd();
for ( ; nit != nend; ++nit)
nameMap.insert(nit.key(), nit.value());
#endif
@@ -271,7 +271,7 @@ bool QProcessEnvironment::operator==(const QProcessEnvironment &other) const
if (d) {
if (other.d) {
QProcessEnvironmentPrivate::OrderedMutexLocker locker(d, other.d);
- return d->hash == other.d->hash;
+ return d->vars == other.d->vars;
} else {
return isEmpty();
}
@@ -289,7 +289,7 @@ bool QProcessEnvironment::operator==(const QProcessEnvironment &other) const
bool QProcessEnvironment::isEmpty() const
{
// Needs no locking, as no hash nodes are accessed
- return d ? d->hash.isEmpty() : true;
+ return d ? d->vars.isEmpty() : true;
}
/*!
@@ -301,7 +301,7 @@ bool QProcessEnvironment::isEmpty() const
void QProcessEnvironment::clear()
{
if (d)
- d->hash.clear();
+ d->vars.clear();
// Unix: Don't clear d->nameMap, as the environment is likely to be
// re-populated with the same keys again.
}
@@ -318,7 +318,7 @@ bool QProcessEnvironment::contains(const QString &name) const
if (!d)
return false;
QProcessEnvironmentPrivate::MutexLocker locker(d);
- return d->hash.contains(d->prepareName(name));
+ return d->vars.contains(d->prepareName(name));
}
/*!
@@ -337,7 +337,7 @@ void QProcessEnvironment::insert(const QString &name, const QString &value)
{
// our re-impl of detach() detaches from null
d.detach(); // detach before prepareName()
- d->hash.insert(d->prepareName(name), d->prepareValue(value));
+ d->vars.insert(d->prepareName(name), d->prepareValue(value));
}
/*!
@@ -352,7 +352,7 @@ void QProcessEnvironment::remove(const QString &name)
{
if (d) {
d.detach(); // detach before prepareName()
- d->hash.remove(d->prepareName(name));
+ d->vars.remove(d->prepareName(name));
}
}
@@ -369,8 +369,8 @@ QString QProcessEnvironment::value(const QString &name, const QString &defaultVa
return defaultValue;
QProcessEnvironmentPrivate::MutexLocker locker(d);
- QProcessEnvironmentPrivate::Hash::ConstIterator it = d->hash.constFind(d->prepareName(name));
- if (it == d->hash.constEnd())
+ const auto it = d->vars.constFind(d->prepareName(name));
+ if (it == d->vars.constEnd())
return defaultValue;
return d->valueToString(it.value());
diff --git a/src/corelib/io/qprocess_darwin.mm b/src/corelib/io/qprocess_darwin.mm
index dd7a8275b9..2c3c296cb4 100644
--- a/src/corelib/io/qprocess_darwin.mm
+++ b/src/corelib/io/qprocess_darwin.mm
@@ -48,7 +48,7 @@ QProcessEnvironment QProcessEnvironment::systemEnvironment()
__block QProcessEnvironment env;
[[[NSProcessInfo processInfo] environment]
enumerateKeysAndObjectsUsingBlock:^(NSString *name, NSString *value, BOOL *__unused stop) {
- env.d->hash.insert(
+ env.d->vars.insert(
QProcessEnvironmentPrivate::Key(QString::fromNSString(name).toLocal8Bit()),
QProcessEnvironmentPrivate::Value(QString::fromNSString(value).toLocal8Bit()));
}];
diff --git a/src/corelib/io/qprocess_p.h b/src/corelib/io/qprocess_p.h
index 6e0630eb66..c5abf7b762 100644
--- a/src/corelib/io/qprocess_p.h
+++ b/src/corelib/io/qprocess_p.h
@@ -55,6 +55,7 @@
#include "QtCore/qprocess.h"
#include "QtCore/qstringlist.h"
#include "QtCore/qhash.h"
+#include "QtCore/qmap.h"
#include "QtCore/qshareddata.h"
#include "private/qiodevice_p.h"
@@ -90,22 +91,19 @@ public:
QProcEnvKey(const QProcEnvKey &other) : QString(other) {}
bool operator==(const QProcEnvKey &other) const { return !compare(other, Qt::CaseInsensitive); }
};
-inline uint qHash(const QProcEnvKey &key) { return qHash(key.toCaseFolded()); }
-typedef QString QProcEnvValue;
-#else
-class QProcEnvKey
+inline bool operator<(const QProcEnvKey &a, const QProcEnvKey &b)
{
-public:
- QProcEnvKey() : hash(0) {}
- explicit QProcEnvKey(const QByteArray &other) : key(other), hash(qHash(key)) {}
- QProcEnvKey(const QProcEnvKey &other) { *this = other; }
- bool operator==(const QProcEnvKey &other) const { return key == other.key; }
+ // On windows use case-insensitive ordering because that is how Windows needs the environment
+ // block sorted (https://msdn.microsoft.com/en-us/library/windows/desktop/ms682009(v=vs.85).aspx)
+ return a.compare(b, Qt::CaseInsensitive) < 0;
+}
- QByteArray key;
- uint hash;
-};
-inline uint qHash(const QProcEnvKey &key) Q_DECL_NOTHROW { return key.hash; }
+Q_DECLARE_TYPEINFO(QProcEnvKey, Q_MOVABLE_TYPE);
+
+typedef QString QProcEnvValue;
+#else
+using QProcEnvKey = QByteArray;
class QProcEnvValue
{
@@ -138,7 +136,6 @@ public:
};
Q_DECLARE_TYPEINFO(QProcEnvValue, Q_MOVABLE_TYPE);
#endif
-Q_DECLARE_TYPEINFO(QProcEnvKey, Q_MOVABLE_TYPE);
class QProcessEnvironmentPrivate: public QSharedData
{
@@ -161,13 +158,13 @@ public:
inline Key prepareName(const QString &name) const
{
Key &ent = nameMap[name];
- if (ent.key.isEmpty())
- ent = Key(name.toLocal8Bit());
+ if (ent.isEmpty())
+ ent = name.toLocal8Bit();
return ent;
}
inline QString nameToString(const Key &name) const
{
- const QString sname = QString::fromLocal8Bit(name.key);
+ const QString sname = QString::fromLocal8Bit(name);
nameMap[sname] = name;
return sname;
}
@@ -197,17 +194,17 @@ public:
// do not need a lock, as they detach objects (however, we need to
// ensure that they really detach before using prepareName()).
MutexLocker locker(&other);
- hash = other.hash;
+ vars = other.vars;
nameMap = other.nameMap;
// We need to detach our members, so that our mutex can protect them.
// As we are being detached, they likely would be detached a moment later anyway.
- hash.detach();
+ vars.detach();
nameMap.detach();
}
#endif
- typedef QHash<Key, Value> Hash;
- Hash hash;
+ using Map = QMap<Key, Value>;
+ Map vars;
#ifdef Q_OS_UNIX
typedef QHash<QString, Key> NameHash;
diff --git a/src/corelib/io/qprocess_unix.cpp b/src/corelib/io/qprocess_unix.cpp
index b822417ddf..98d196ff7b 100644
--- a/src/corelib/io/qprocess_unix.cpp
+++ b/src/corelib/io/qprocess_unix.cpp
@@ -136,7 +136,7 @@ QProcessEnvironment QProcessEnvironment::systemEnvironment()
QByteArray name(entry, equal - entry);
QByteArray value(equal + 1);
- env.d->hash.insert(QProcessEnvironmentPrivate::Key(name),
+ env.d->vars.insert(QProcessEnvironmentPrivate::Key(name),
QProcessEnvironmentPrivate::Value(value));
}
return env;
@@ -338,7 +338,7 @@ bool QProcessPrivate::openChannel(Channel &channel)
}
}
-static char **_q_dupEnvironment(const QProcessEnvironmentPrivate::Hash &environment, int *envc)
+static char **_q_dupEnvironment(const QProcessEnvironmentPrivate::Map &environment, int *envc)
{
*envc = 0;
if (environment.isEmpty())
@@ -348,10 +348,10 @@ static char **_q_dupEnvironment(const QProcessEnvironmentPrivate::Hash &environm
envp[environment.count()] = 0;
envp[environment.count() + 1] = 0;
- QProcessEnvironmentPrivate::Hash::ConstIterator it = environment.constBegin();
- const QProcessEnvironmentPrivate::Hash::ConstIterator end = environment.constEnd();
+ auto it = environment.constBegin();
+ const auto end = environment.constEnd();
for ( ; it != end; ++it) {
- QByteArray key = it.key().key;
+ QByteArray key = it.key();
QByteArray value = it.value().bytes();
key.reserve(key.length() + 1 + value.length());
key.append('=');
@@ -436,7 +436,7 @@ void QProcessPrivate::startProcess()
char **envp = 0;
if (environment.d.constData()) {
QProcessEnvironmentPrivate::MutexLocker locker(environment.d);
- envp = _q_dupEnvironment(environment.d.constData()->hash, &envc);
+ envp = _q_dupEnvironment(environment.d.constData()->vars, &envc);
}
// Encode the working directory if it's non-empty, otherwise just pass 0.
diff --git a/src/corelib/io/qprocess_win.cpp b/src/corelib/io/qprocess_win.cpp
index 329d1842f0..05c9d6594c 100644
--- a/src/corelib/io/qprocess_win.cpp
+++ b/src/corelib/io/qprocess_win.cpp
@@ -75,7 +75,7 @@ QProcessEnvironment QProcessEnvironment::systemEnvironment()
int nameLen = equal - entry;
QString name = QString::fromWCharArray(entry, nameLen);
QString value = QString::fromWCharArray(equal + 1, entryLen - nameLen - 1);
- env.d->hash.insert(QProcessEnvironmentPrivate::Key(name), value);
+ env.d->vars.insert(QProcessEnvironmentPrivate::Key(name), value);
}
entry += entryLen + 1;
}
@@ -390,11 +390,11 @@ static QString qt_create_commandline(const QString &program, const QStringList &
return args;
}
-static QByteArray qt_create_environment(const QProcessEnvironmentPrivate::Hash &environment)
+static QByteArray qt_create_environment(const QProcessEnvironmentPrivate::Map &environment)
{
QByteArray envlist;
if (!environment.isEmpty()) {
- QProcessEnvironmentPrivate::Hash copy = environment;
+ QProcessEnvironmentPrivate::Map copy = environment;
// add PATH if necessary (for DLL loading)
QProcessEnvironmentPrivate::Key pathKey(QLatin1String("PATH"));
@@ -413,8 +413,8 @@ static QByteArray qt_create_environment(const QProcessEnvironmentPrivate::Hash &
}
int pos = 0;
- QProcessEnvironmentPrivate::Hash::ConstIterator it = copy.constBegin(),
- end = copy.constEnd();
+ auto it = copy.constBegin();
+ const auto end = copy.constEnd();
static const wchar_t equal = L'=';
static const wchar_t nul = L'\0';
@@ -475,7 +475,7 @@ void QProcessPrivate::startProcess()
QString args = qt_create_commandline(program, arguments);
QByteArray envlist;
if (environment.d.constData())
- envlist = qt_create_environment(environment.d.constData()->hash);
+ envlist = qt_create_environment(environment.d.constData()->vars);
if (!nativeArguments.isEmpty()) {
if (!args.isEmpty())
args += QLatin1Char(' ');
diff --git a/src/corelib/json/qjson_p.h b/src/corelib/json/qjson_p.h
index 0c78fadfc7..c012ec2662 100644
--- a/src/corelib/json/qjson_p.h
+++ b/src/corelib/json/qjson_p.h
@@ -243,7 +243,7 @@ public:
uint i = qFromLittleEndian(val);
i <<= 32 - width - pos;
int t = (int) i;
- t >>= pos;
+ t >>= 32 - width;
return t;
}
bool operator !() const {
diff --git a/src/corelib/kernel/kernel.pri b/src/corelib/kernel/kernel.pri
index 0e6ff17b8f..29bd5bbc6c 100644
--- a/src/corelib/kernel/kernel.pri
+++ b/src/corelib/kernel/kernel.pri
@@ -162,7 +162,7 @@ unix|integrity {
QMAKE_USE_PRIVATE += glib
}
- qtConfig(clock-gettime): include($$QT_SOURCE_TREE/config.tests/unix/clock-gettime/clock-gettime.pri)
+ qtConfig(clock-gettime): QMAKE_USE_PRIVATE += librt
!android {
SOURCES += kernel/qsharedmemory_posix.cpp \
diff --git a/src/corelib/tools/qcollator.cpp b/src/corelib/tools/qcollator.cpp
index e34d16079f..f1e3d6652d 100644
--- a/src/corelib/tools/qcollator.cpp
+++ b/src/corelib/tools/qcollator.cpp
@@ -254,7 +254,7 @@ bool QCollator::numericMode() const
The default is locale dependent.
- \note This method is not currently supported on Apple platforms or if Qt is configured to not use ICU on Linux.
+ \note This method is not currently supported if Qt is configured to not use ICU on Linux.
\sa ignorePunctuation()
*/
diff --git a/src/corelib/tools/qcollator_macx.cpp b/src/corelib/tools/qcollator_macx.cpp
index d468272430..9aa59a81dc 100644
--- a/src/corelib/tools/qcollator_macx.cpp
+++ b/src/corelib/tools/qcollator_macx.cpp
@@ -66,7 +66,7 @@ void QCollatorPrivate::init()
options |= kUCCollateCaseInsensitiveMask;
if (numericMode)
options |= kUCCollateDigitsAsNumberMask | kUCCollateDigitsOverrideMask;
- if (ignorePunctuation)
+ if (!ignorePunctuation)
options |= kUCCollatePunctuationSignificantMask;
OSStatus status = UCCreateCollator(
diff --git a/src/corelib/tools/qsimd.cpp b/src/corelib/tools/qsimd.cpp
index d4edf459de..4c6f08c774 100644
--- a/src/corelib/tools/qsimd.cpp
+++ b/src/corelib/tools/qsimd.cpp
@@ -721,6 +721,14 @@ void qDumpCPUFeatures()
printf("%s%s", features_string + features_indices[i],
minFeature & (Q_UINT64_C(1) << i) ? "[required]" : "");
}
+ if ((features = (qCompilerCpuFeatures & ~features))) {
+ printf("\n!!!!!!!!!!!!!!!!!!!!\n!!! Missing required features:");
+ for (int i = 0; i < features_count; ++i) {
+ if (features & (Q_UINT64_C(1) << i))
+ printf("%s", features_string + features_indices[i]);
+ }
+ printf("\n!!! Applications will likely crash with \"Invalid Instruction\"\n!!!!!!!!!!!!!!!!!!!!");
+ }
puts("");
}
diff --git a/src/corelib/tools/qsimd_p.h b/src/corelib/tools/qsimd_p.h
index 28253b3ae9..023a4b08d2 100644
--- a/src/corelib/tools/qsimd_p.h
+++ b/src/corelib/tools/qsimd_p.h
@@ -232,7 +232,7 @@
#if defined(__SSE4_2__) || (defined(QT_COMPILER_SUPPORTS_SSE4_2) && defined(QT_COMPILER_SUPPORTS_SIMD_ALWAYS))
#include <nmmintrin.h>
-# if defined(__SSE4_2__) && defined(QT_COMPILER_SUPPORTS_SIMD_ALWAYS)
+# if defined(__SSE4_2__) && defined(QT_COMPILER_SUPPORTS_SIMD_ALWAYS) && (defined(Q_CC_INTEL) || defined(Q_CC_MSVC))
// POPCNT instructions:
// All processors that support SSE4.2 support POPCNT
// (but neither MSVC nor the Intel compiler define this macro)
@@ -245,7 +245,7 @@
// immintrin.h is the ultimate header, we don't need anything else after this
#include <immintrin.h>
-# if defined(__AVX__) && defined(QT_COMPILER_SUPPORTS_SIMD_ALWAYS)
+# if defined(__AVX__) && defined(QT_COMPILER_SUPPORTS_SIMD_ALWAYS) && (defined(Q_CC_INTEL) || defined(Q_CC_MSVC))
// AES, PCLMULQDQ instructions:
// All processors that support AVX support AES, PCLMULQDQ
// (but neither MSVC nor the Intel compiler define these macros)
@@ -253,7 +253,7 @@
# define __PCLMUL__ 1
# endif
-# if defined(__AVX2__) && defined(QT_COMPILER_SUPPORTS_SIMD_ALWAYS)
+# if defined(__AVX2__) && defined(QT_COMPILER_SUPPORTS_SIMD_ALWAYS) && (defined(Q_CC_INTEL) || defined(Q_CC_MSVC))
// F16C & RDRAND instructions:
// All processors that support AVX2 support F16C & RDRAND:
// (but neither MSVC nor the Intel compiler define these macros)
diff --git a/src/gui/configure.json b/src/gui/configure.json
index ee3615390d..2fb03a452a 100644
--- a/src/gui/configure.json
+++ b/src/gui/configure.json
@@ -1152,7 +1152,6 @@ QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your pla
"linuxfb", "vnc", "mirclient",
{
"type": "feature",
- "message": "INTEGRITY framebuffer",
"condition": "config.integrity",
"args": "integrityfb"
},
diff --git a/src/gui/kernel/qclipboard.cpp b/src/gui/kernel/qclipboard.cpp
index f14355bc01..cd8406b8dc 100644
--- a/src/gui/kernel/qclipboard.cpp
+++ b/src/gui/kernel/qclipboard.cpp
@@ -137,6 +137,17 @@ QT_BEGIN_NAMESPACE
\endlist
+ \section1 Notes for Universal Windows Platform Users
+
+ \list
+
+ \li The Universal Windows Platform only allows to query the
+ clipboard in case the application is active and an application
+ window has focus. Accessing the clipboard data when in background
+ will fail due to access denial.
+
+ \endlist
+
\sa QGuiApplication
*/
diff --git a/src/network/kernel/qhostaddress.cpp b/src/network/kernel/qhostaddress.cpp
index b8c0584a62..1b7061d050 100644
--- a/src/network/kernel/qhostaddress.cpp
+++ b/src/network/kernel/qhostaddress.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2017 The Qt Company Ltd.
** Copyright (C) 2016 Intel Corporation.
** Contact: https://www.qt.io/licensing/
**
@@ -393,7 +393,7 @@ void QNetmaskAddress::setPrefixLength(QAbstractSocket::NetworkLayerProtocol prot
/*! \enum QHostAddress::SpecialAddress
- \value Null The null address object. Equivalent to QHostAddress().
+ \value Null The null address object. Equivalent to QHostAddress(). See also QHostAddress::isNull().
\value LocalHost The IPv4 localhost address. Equivalent to QHostAddress("127.0.0.1").
\value LocalHostIPv6 The IPv6 localhost address. Equivalent to QHostAddress("::1").
\value Broadcast The IPv4 broadcast address. Equivalent to QHostAddress("255.255.255.255").
@@ -606,6 +606,14 @@ QHostAddress &QHostAddress::operator=(SpecialAddress address)
}
/*!
+ \fn void QHostAddress::swap(QHostAddress &other)
+ \since 5.6
+
+ Swaps this host address with \a other. This operation is very fast
+ and never fails.
+*/
+
+/*!
\fn bool QHostAddress::operator!=(const QHostAddress &other) const
\since 4.2
@@ -621,7 +629,9 @@ QHostAddress &QHostAddress::operator=(SpecialAddress address)
*/
/*!
- Sets the host address to 0.0.0.0.
+ Sets the host address to null.
+
+ \sa QHostAddress::Null
*/
void QHostAddress::clear()
{
@@ -982,9 +992,11 @@ bool QHostAddress::operator ==(SpecialAddress other) const
}
/*!
- Returns \c true if this host address is null (INADDR_ANY or in6addr_any).
- The default constructor creates a null address, and that address is
- not valid for any host or interface.
+ Returns \c true if this host address is not valid for any host or interface.
+
+ The default constructor creates a null address.
+
+ \sa QHostAddress::Null
*/
bool QHostAddress::isNull() const
{
diff --git a/src/network/ssl/qsslsocket_mac.cpp b/src/network/ssl/qsslsocket_mac.cpp
index 78aceadb81..10f6fb4e41 100644
--- a/src/network/ssl/qsslsocket_mac.cpp
+++ b/src/network/ssl/qsslsocket_mac.cpp
@@ -1219,8 +1219,10 @@ bool QSslSocketBackendPrivate::verifyPeerTrust()
QCFType<CFMutableArrayRef> certArray = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
for (const QSslCertificate &cert : qAsConst(configuration.caCertificates)) {
QCFType<CFDataRef> certData = cert.d->derData.toCFData();
- QCFType<SecCertificateRef> certRef = SecCertificateCreateWithData(NULL, certData);
- CFArrayAppendValue(certArray, certRef);
+ if (QCFType<SecCertificateRef> secRef = SecCertificateCreateWithData(NULL, certData))
+ CFArrayAppendValue(certArray, secRef);
+ else
+ qCWarning(lcSsl, "Failed to create SecCertificate from QSslCertificate");
}
SecTrustSetAnchorCertificates(trust, certArray);
diff --git a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
index 8dfae2ca0b..2b4c6a000f 100644
--- a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
+++ b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
@@ -366,6 +366,14 @@ void QKdeThemePrivate::refresh()
resources.fonts[QPlatformTheme::FixedFont] = fixedFont;
}
+ if (QFont *menuFont = kdeFont(readKdeSetting(QStringLiteral("menuFont"), kdeDirs, kdeVersion, kdeSettings))) {
+ resources.fonts[QPlatformTheme::MenuFont] = menuFont;
+ resources.fonts[QPlatformTheme::MenuBarFont] = new QFont(*menuFont);
+ }
+
+ if (QFont *toolBarFont = kdeFont(readKdeSetting(QStringLiteral("toolBarFont"), kdeDirs, kdeVersion, kdeSettings)))
+ resources.fonts[QPlatformTheme::ToolButtonFont] = toolBarFont;
+
qDeleteAll(kdeSettings);
}
diff --git a/src/plugins/platforms/android/androidjniinput.cpp b/src/plugins/platforms/android/androidjniinput.cpp
index 8372bf6484..32630003d1 100644
--- a/src/plugins/platforms/android/androidjniinput.cpp
+++ b/src/plugins/platforms/android/androidjniinput.cpp
@@ -121,11 +121,11 @@ namespace QtAndroidInput
return m_softwareKeyboardRect;
}
- void updateHandles(int mode, QPoint cursor, QPoint anchor)
+ void updateHandles(int mode, QPoint cursor, QPoint anchor, bool rtl)
{
- QJNIObjectPrivate::callStaticMethod<void>(applicationClass(), "updateHandles", "(IIIII)V",
+ QJNIObjectPrivate::callStaticMethod<void>(applicationClass(), "updateHandles", "(IIIIIZ)V",
mode, cursor.x(), cursor.y(), anchor.x(),
- anchor.y());
+ anchor.y(), rtl);
}
static void mouseDown(JNIEnv */*env*/, jobject /*thiz*/, jint /*winId*/, jint x, jint y)
@@ -173,6 +173,25 @@ namespace QtAndroidInput
Qt::MouseButtons(Qt::LeftButton));
}
+ static void mouseWheel(JNIEnv */*env*/, jobject /*thiz*/, jint /*winId*/, jint x, jint y, jfloat hdelta, jfloat vdelta)
+ {
+ if (m_ignoreMouseEvents)
+ return;
+
+ QPoint globalPos(x,y);
+ QWindow *tlw = m_mouseGrabber.data();
+ if (!tlw)
+ tlw = topLevelWindowAt(globalPos);
+ QPoint localPos = tlw ? (globalPos-tlw->position()) : globalPos;
+ QPoint angleDelta(hdelta * 120, vdelta * 120);
+
+ QWindowSystemInterface::handleWheelEvent(tlw,
+ localPos,
+ globalPos,
+ QPoint(),
+ angleDelta);
+ }
+
static void longPress(JNIEnv */*env*/, jobject /*thiz*/, jint /*winId*/, jint x, jint y)
{
QAndroidInputContext *inputContext = QAndroidInputContext::androidInputContext();
@@ -824,6 +843,7 @@ namespace QtAndroidInput
{"mouseDown", "(III)V", (void *)mouseDown},
{"mouseUp", "(III)V", (void *)mouseUp},
{"mouseMove", "(III)V", (void *)mouseMove},
+ {"mouseWheel", "(IIIFF)V", (void *)mouseWheel},
{"longPress", "(III)V", (void *)longPress},
{"isTabletEventSupported", "()Z", (void *)isTabletEventSupported},
{"tabletEvent", "(IIJIIIFFF)V", (void *)tabletEvent},
diff --git a/src/plugins/platforms/android/androidjniinput.h b/src/plugins/platforms/android/androidjniinput.h
index af18a96dc1..c09b426f49 100644
--- a/src/plugins/platforms/android/androidjniinput.h
+++ b/src/plugins/platforms/android/androidjniinput.h
@@ -58,7 +58,7 @@ namespace QtAndroidInput
// Software keyboard support
// cursor/selection handles
- void updateHandles(int handleCount, QPoint cursor = QPoint(), QPoint anchor = QPoint());
+ void updateHandles(int handleCount, QPoint cursor = QPoint(), QPoint anchor = QPoint(), bool rtl = false);
bool registerNatives(JNIEnv *env);
}
diff --git a/src/plugins/platforms/android/qandroidinputcontext.cpp b/src/plugins/platforms/android/qandroidinputcontext.cpp
index 4ab8a9d060..279cb338f4 100644
--- a/src/plugins/platforms/android/qandroidinputcontext.cpp
+++ b/src/plugins/platforms/android/qandroidinputcontext.cpp
@@ -537,7 +537,7 @@ void QAndroidInputContext::updateSelectionHandles()
? QHighDpiScaling::factor(window)
: QHighDpiScaling::factor(QtAndroid::androidPlatformIntegration()->screen());
- QInputMethodQueryEvent query(Qt::ImCursorPosition | Qt::ImAnchorPosition | Qt::ImEnabled);
+ QInputMethodQueryEvent query(Qt::ImCursorPosition | Qt::ImAnchorPosition | Qt::ImEnabled | Qt::ImCurrentSelection);
QCoreApplication::sendEvent(m_focusObject, &query);
int cpos = query.value(Qt::ImCursorPosition).toInt();
int anchor = query.value(Qt::ImAnchorPosition).toInt();
@@ -563,7 +563,8 @@ void QAndroidInputContext::updateSelectionHandles()
QPoint leftPoint(leftRect.bottomLeft().toPoint() * pixelDensity);
QPoint righPoint(rightRect.bottomRight().toPoint() * pixelDensity);
- QtAndroidInput::updateHandles(CursorHandleShowSelection, leftPoint, righPoint);
+ QtAndroidInput::updateHandles(CursorHandleShowSelection, leftPoint, righPoint,
+ query.value(Qt::ImCurrentSelection).toString().isRightToLeft());
if (m_cursorHandleShown == CursorHandleShowPopup) {
// make sure the popup does not reappear when the selection menu closes
diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm
index 72e90a5363..66c3b6fad4 100644
--- a/src/plugins/platforms/cocoa/qnsview.mm
+++ b/src/plugins/platforms/cocoa/qnsview.mm
@@ -177,7 +177,10 @@ static bool _q_dontOverrideCtrlLMB = false;
- (void)dealloc
{
CGImageRelease(m_maskImage);
- [m_trackingArea release];
+ if (m_trackingArea) {
+ [self removeTrackingArea:m_trackingArea];
+ [m_trackingArea release];
+ }
m_maskImage = 0;
[m_inputSource release];
[[NSNotificationCenter defaultCenter] removeObserver:self];
diff --git a/src/plugins/platforms/direct2d/qwindowsdirect2ddevicecontext.cpp b/src/plugins/platforms/direct2d/qwindowsdirect2ddevicecontext.cpp
index 8a34f6974f..643ae877d0 100644
--- a/src/plugins/platforms/direct2d/qwindowsdirect2ddevicecontext.cpp
+++ b/src/plugins/platforms/direct2d/qwindowsdirect2ddevicecontext.cpp
@@ -89,7 +89,8 @@ public:
if (FAILED(hr)) {
success = false;
- qWarning("%s: EndDraw failed: %#x, tag1: %lld, tag2: %lld", __FUNCTION__, hr, tag1, tag2);
+ qWarning("%s: EndDraw failed: %#lx, tag1: %lld, tag2: %lld",
+ __FUNCTION__, long(hr), tag1, tag2);
}
}
diff --git a/src/plugins/platforms/xcb/qxcbxsettings.cpp b/src/plugins/platforms/xcb/qxcbxsettings.cpp
index 401eb8043c..88933c6c22 100644
--- a/src/plugins/platforms/xcb/qxcbxsettings.cpp
+++ b/src/plugins/platforms/xcb/qxcbxsettings.cpp
@@ -45,10 +45,6 @@
#include <vector>
#include <algorithm>
-#ifdef XCB_USE_XLIB
-#include <X11/extensions/XIproto.h>
-#endif //XCB_USE_XLIB
-
QT_BEGIN_NAMESPACE
/* Implementation of http://standards.freedesktop.org/xsettings-spec/xsettings-0.5.html */
@@ -145,19 +141,18 @@ public:
return value + 4 - remainder;
}
-#ifdef XCB_USE_XLIB
void populateSettings(const QByteArray &xSettings)
{
if (xSettings.length() < 12)
return;
char byteOrder = xSettings.at(0);
- if (byteOrder != LSBFirst && byteOrder != MSBFirst) {
+ if (byteOrder != XCB_IMAGE_ORDER_LSB_FIRST && byteOrder != XCB_IMAGE_ORDER_MSB_FIRST) {
qWarning("ByteOrder byte %d not 0 or 1", byteOrder);
return;
}
#define ADJUST_BO(b, t, x) \
- ((b == LSBFirst) ? \
+ ((b == XCB_IMAGE_ORDER_LSB_FIRST) ? \
qFromLittleEndian<t>(x) : \
qFromBigEndian<t>(x))
#define VALIDATE_LENGTH(x) \
@@ -220,7 +215,6 @@ public:
}
}
-#endif //XCB_USE_XLIB
QXcbVirtualDesktop *screen;
xcb_window_t x_settings_window;
@@ -267,10 +261,8 @@ QXcbXSettings::QXcbXSettings(QXcbVirtualDesktop *screen)
const uint32_t event_mask[] = { XCB_EVENT_MASK_STRUCTURE_NOTIFY|XCB_EVENT_MASK_PROPERTY_CHANGE };
xcb_change_window_attributes(screen->xcb_connection(),d_ptr->x_settings_window,event,event_mask);
-#ifdef XCB_USE_XLIB
d_ptr->populateSettings(d_ptr->getSettings());
d_ptr->initialized = true;
-#endif //XCB_USE_XLIB
}
QXcbXSettings::~QXcbXSettings()
@@ -290,9 +282,8 @@ void QXcbXSettings::handlePropertyNotifyEvent(const xcb_property_notify_event_t
Q_D(QXcbXSettings);
if (event->window != d->x_settings_window)
return;
-#ifdef XCB_USE_XLIB
+
d->populateSettings(d->getSettings());
-#endif //XCB_USE_XLIB
}
void QXcbXSettings::registerCallbackForProperty(const QByteArray &property, QXcbXSettings::PropertyChangeFunc func, void *handle)
diff --git a/src/plugins/sqldrivers/.qmake.conf b/src/plugins/sqldrivers/.qmake.conf
new file mode 100644
index 0000000000..15ba71a343
--- /dev/null
+++ b/src/plugins/sqldrivers/.qmake.conf
@@ -0,0 +1,19 @@
+# This file detaches this sub-tree from the rest of qtbase,
+# so it can be configured stand-alone.
+# Of course, under normal circumstances, this _is_ part of qtbase,
+# so we have to make some contortions to restore normality.
+
+isEmpty(_QMAKE_CONF_): return() # Pre-scan during spec loading.
+
+SQLDRV_SRC_TREE = $$dirname(_QMAKE_CONF_)
+QTBASE_SRC_TREE = $$section(SQLDRV_SRC_TREE, /, 0, -4)
+
+QTBASE_BLD_TREE = $$shadowed($$QTBASE_SRC_TREE)
+!isEmpty(QTBASE_BLD_TREE):exists($$QTBASE_BLD_TREE/.qmake.cache) {
+ # This tricks qt_build_config.prf and qt_build_paths.prf
+ _QMAKE_CONF_ = $$QTBASE_SRC_TREE/.qmake.conf
+} else {
+ CONFIG += sqldrivers_standalone
+}
+
+include($$QTBASE_SRC_TREE/.qmake.conf)
diff --git a/src/sql/configure.json b/src/plugins/sqldrivers/configure.json
index 49444c7e5f..5603ceb37b 100644
--- a/src/sql/configure.json
+++ b/src/plugins/sqldrivers/configure.json
@@ -1,9 +1,9 @@
{
- "module": "sql",
+ "module": "sqldrivers",
"depends": [
"core"
],
- "testDir": "../../config.tests",
+ "testDir": "../../../config.tests",
"commandline": {
"assignments": {
@@ -129,47 +129,42 @@
"sql-db2": {
"label": "DB2 (IBM)",
"condition": "libs.db2",
- "output": [ "publicFeature" ]
+ "output": [ "privateFeature" ]
},
"sql-ibase": {
"label": "InterBase",
"condition": "libs.ibase",
- "output": [ "publicFeature" ]
+ "output": [ "privateFeature" ]
},
"sql-mysql": {
"label": "MySql",
"condition": "libs.mysql",
- "output": [ "publicFeature" ]
- },
- "use_libmysqlclient_r": {
- "label": "MySql (threadsafe)",
- "condition": "features.sql-mysql && (libs.mysql.source == 0 || libs.mysql.source == 2)",
- "output": [ "privateConfig" ]
+ "output": [ "privateFeature" ]
},
"sql-oci": {
"label": "OCI (Oracle)",
"condition": "libs.oci",
- "output": [ "publicFeature" ]
+ "output": [ "privateFeature" ]
},
"sql-odbc": {
"label": "ODBC",
- "condition": "libs.odbc && features.datestring",
- "output": [ "publicFeature" ]
+ "condition": "features.datestring && libs.odbc",
+ "output": [ "privateFeature" ]
},
"sql-psql": {
"label": "PostgreSQL",
"condition": "libs.psql",
- "output": [ "publicFeature" ]
+ "output": [ "privateFeature" ]
},
"sql-sqlite2": {
"label": "SQLite2",
"condition": "libs.sqlite2",
- "output": [ "publicFeature" ]
+ "output": [ "privateFeature" ]
},
"sql-sqlite": {
"label": "SQLite",
"condition": "features.datestring",
- "output": [ "publicFeature" ]
+ "output": [ "privateFeature" ]
},
"system-sqlite": {
"label": " Using system provided SQLite",
@@ -179,8 +174,8 @@
},
"sql-tds": {
"label": "TDS (Sybase)",
- "condition": "libs.tds && features.datestring",
- "output": [ "publicFeature" ]
+ "condition": "features.datestring && libs.tds",
+ "output": [ "privateFeature" ]
}
},
diff --git a/src/sql/configure.pri b/src/plugins/sqldrivers/configure.pri
index 9fb957291f..9fb957291f 100644
--- a/src/sql/configure.pri
+++ b/src/plugins/sqldrivers/configure.pri
diff --git a/src/plugins/sqldrivers/qsqldriverbase.pri b/src/plugins/sqldrivers/qsqldriverbase.pri
index 512c046ec1..4b78fa9454 100644
--- a/src/plugins/sqldrivers/qsqldriverbase.pri
+++ b/src/plugins/sqldrivers/qsqldriverbase.pri
@@ -1,5 +1,8 @@
QT = core core-private sql-private
+# For QMAKE_USE in the parent projects.
+include($$shadowed($$PWD)/qtsqldrivers-config.pri)
+
PLUGIN_TYPE = sqldrivers
load(qt_plugin)
diff --git a/src/plugins/sqldrivers/sqldrivers.pro b/src/plugins/sqldrivers/sqldrivers.pro
index 30fb6019ce..8a9ae46f82 100644
--- a/src/plugins/sqldrivers/sqldrivers.pro
+++ b/src/plugins/sqldrivers/sqldrivers.pro
@@ -1,5 +1,9 @@
TEMPLATE = subdirs
-QT_FOR_CONFIG += sql
+
+sqldrivers_standalone {
+ _QMAKE_CACHE_ = $$shadowed($$SQLDRV_SRC_TREE)/.qmake.conf
+ load(qt_configure)
+}
qtConfig(sql-psql) : SUBDIRS += psql
qtConfig(sql-mysql) : SUBDIRS += mysql
diff --git a/src/plugins/sqldrivers/sqlite/sqlite.pro b/src/plugins/sqldrivers/sqlite/sqlite.pro
index 1066bf7f51..d7e19f97b1 100644
--- a/src/plugins/sqldrivers/sqlite/sqlite.pro
+++ b/src/plugins/sqldrivers/sqlite/sqlite.pro
@@ -1,10 +1,11 @@
TARGET = qsqlite
-QT_FOR_CONFIG += sql-private
-
HEADERS += $$PWD/qsql_sqlite_p.h
SOURCES += $$PWD/qsql_sqlite.cpp $$PWD/smain.cpp
+include($$OUT_PWD/../qtsqldrivers-config.pri)
+QT_FOR_CONFIG += sqldrivers-private
+
qtConfig(system-sqlite) {
QMAKE_USE += sqlite
} else {
diff --git a/src/tools/uic/cpp/cppwriteinitialization.cpp b/src/tools/uic/cpp/cppwriteinitialization.cpp
index bbef010a9c..d208ec6718 100644
--- a/src/tools/uic/cpp/cppwriteinitialization.cpp
+++ b/src/tools/uic/cpp/cppwriteinitialization.cpp
@@ -84,9 +84,10 @@ namespace {
int w = 0;
int h = 0;
if (properties.contains(QLatin1String("sizeHint"))) {
- const DomSize *sizeHint = properties.value(QLatin1String("sizeHint"))->elementSize();
- w = sizeHint->elementWidth();
- h = sizeHint->elementHeight();
+ if (const DomSize *sizeHint = properties.value(QLatin1String("sizeHint"))->elementSize()) {
+ w = sizeHint->elementWidth();
+ h = sizeHint->elementHeight();
+ }
}
output << w << ", " << h << ", ";
diff --git a/src/widgets/dialogs/dialogs.pri b/src/widgets/dialogs/dialogs.pri
index 8614d2bcc6..c9438696fa 100644
--- a/src/widgets/dialogs/dialogs.pri
+++ b/src/widgets/dialogs/dialogs.pri
@@ -22,8 +22,7 @@ win32 {
SOURCES += dialogs/qwizard_win.cpp
}
-wince: FORMS += dialogs/qfiledialog_embedded.ui
-else: FORMS += dialogs/qfiledialog.ui
+FORMS += dialogs/qfiledialog.ui
INCLUDEPATH += $$PWD
SOURCES += \
diff --git a/src/widgets/dialogs/qdialog.cpp b/src/widgets/dialogs/qdialog.cpp
index 8e74c659fa..60e1c43721 100644
--- a/src/widgets/dialogs/qdialog.cpp
+++ b/src/widgets/dialogs/qdialog.cpp
@@ -1049,7 +1049,7 @@ QSize QDialog::minimumSizeHint() const
\brief whether show() should pop up the dialog as modal or modeless
By default, this property is \c false and show() pops up the dialog
- as modeless. Setting his property to true is equivalent to setting
+ as modeless. Setting this property to true is equivalent to setting
QWidget::windowModality to Qt::ApplicationModal.
exec() ignores the value of this property and always pops up the
diff --git a/src/widgets/dialogs/qfiledialog_embedded.ui b/src/widgets/dialogs/qfiledialog_embedded.ui
deleted file mode 100644
index 933acdeaf2..0000000000
--- a/src/widgets/dialogs/qfiledialog_embedded.ui
+++ /dev/null
@@ -1,353 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <comment>*********************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtWidgets module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-*********************************************************************</comment>
- <class>QFileDialog</class>
- <widget class="QDialog" name="QFileDialog">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>240</width>
- <height>320</height>
- </rect>
- </property>
- <property name="sizeGripEnabled">
- <bool>true</bool>
- </property>
- <layout class="QVBoxLayout">
- <item>
- <widget class="QFileDialogComboBox" name="lookInCombo">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>1</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- <item>
- <layout class="QHBoxLayout">
- <item>
- <widget class="QToolButton" name="backButton">
- <property name="toolTip">
- <string>Back</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QToolButton" name="forwardButton">
- <property name="toolTip">
- <string>Forward</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QToolButton" name="toParentButton">
- <property name="toolTip">
- <string>Parent Directory</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QToolButton" name="newFolderButton">
- <property name="toolTip">
- <string>Create New Folder</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QToolButton" name="listModeButton">
- <property name="toolTip">
- <string>List View</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QToolButton" name="detailModeButton">
- <property name="toolTip">
- <string>Detail View</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <widget class="QSplitter" name="splitter">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="childrenCollapsible">
- <bool>false</bool>
- </property>
- <widget class="QSidebar" name="sidebar"/>
- <widget class="QFrame" name="frame">
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <layout class="QVBoxLayout">
- <property name="spacing">
- <number>0</number>
- </property>
- <property name="leftMargin">
- <number>0</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- <item>
- <widget class="QStackedWidget" name="stackedWidget">
- <property name="currentIndex">
- <number>0</number>
- </property>
- <widget class="QWidget" name="page">
- <layout class="QVBoxLayout">
- <property name="spacing">
- <number>0</number>
- </property>
- <property name="leftMargin">
- <number>0</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- <item>
- <widget class="QFileDialogListView" name="listView"/>
- </item>
- </layout>
- </widget>
- <widget class="QWidget" name="page_2">
- <layout class="QVBoxLayout">
- <property name="spacing">
- <number>0</number>
- </property>
- <property name="leftMargin">
- <number>0</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- <item>
- <widget class="QFileDialogTreeView" name="treeView"/>
- </item>
- </layout>
- </widget>
- </widget>
- </item>
- </layout>
- </widget>
- </widget>
- </item>
- <item>
- <layout class="QGridLayout">
- <item row="0" column="0">
- <widget class="QFileDialogLineEdit" name="fileNameEdit">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>1</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- <item row="0" column="1" rowspan="2">
- <widget class="QDialogButtonBox" name="buttonBox">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="standardButtons">
- <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QComboBox" name="fileTypeCombo">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <widget class="QLabel" name="fileNameLabel">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="fileTypeLabel">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="maximumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string>Files of type:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="lookInLabel">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="maximumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string>Look in:</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <customwidgets>
- <customwidget>
- <class>QFileDialogTreeView</class>
- <extends>QTreeView</extends>
- <header>private/qfiledialog_p.h</header>
- </customwidget>
- <customwidget>
- <class>QFileDialogListView</class>
- <extends>QListView</extends>
- <header>private/qfiledialog_p.h</header>
- </customwidget>
- <customwidget>
- <class>QSidebar</class>
- <extends>QListWidget</extends>
- <header>private/qsidebar_p.h</header>
- </customwidget>
- <customwidget>
- <class>QFileDialogLineEdit</class>
- <extends>QLineEdit</extends>
- <header>private/qfiledialog_p.h</header>
- </customwidget>
- <customwidget>
- <class>QFileDialogComboBox</class>
- <extends>QComboBox</extends>
- <header>private/qfiledialog_p.h</header>
- </customwidget>
- </customwidgets>
- <tabstops>
- <tabstop>lookInCombo</tabstop>
- <tabstop>backButton</tabstop>
- <tabstop>forwardButton</tabstop>
- <tabstop>toParentButton</tabstop>
- <tabstop>newFolderButton</tabstop>
- <tabstop>listModeButton</tabstop>
- <tabstop>detailModeButton</tabstop>
- <tabstop>sidebar</tabstop>
- <tabstop>listView</tabstop>
- <tabstop>fileNameEdit</tabstop>
- <tabstop>fileTypeCombo</tabstop>
- <tabstop>buttonBox</tabstop>
- <tabstop>treeView</tabstop>
- </tabstops>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/widgets/itemviews/itemviews.pri b/src/widgets/itemviews/itemviews.pri
index d78bc4b40e..ed0e3fe072 100644
--- a/src/widgets/itemviews/itemviews.pri
+++ b/src/widgets/itemviews/itemviews.pri
@@ -28,9 +28,6 @@ HEADERS += \
itemviews/qitemeditorfactory_p.h \
itemviews/qtreewidgetitemiterator.h \
itemviews/qdatawidgetmapper.h \
- itemviews/qcolumnviewgrip_p.h \
- itemviews/qcolumnview.h \
- itemviews/qcolumnview_p.h \
itemviews/qstyleditemdelegate.h
SOURCES += \
@@ -49,11 +46,20 @@ SOURCES += \
itemviews/qitemeditorfactory.cpp \
itemviews/qtreewidgetitemiterator.cpp \
itemviews/qdatawidgetmapper.cpp \
- itemviews/qcolumnview.cpp \
- itemviews/qcolumnviewgrip.cpp \
itemviews/qstyleditemdelegate.cpp
}
+qtConfig(columnview) {
+ HEADERS += \
+ itemviews/qcolumnviewgrip_p.h \
+ itemviews/qcolumnview.h \
+ itemviews/qcolumnview_p.h
+
+ SOURCES += \
+ itemviews/qcolumnview.cpp \
+ itemviews/qcolumnviewgrip.cpp
+}
+
HEADERS += \
itemviews/qfileiconprovider.h \
itemviews/qfileiconprovider_p.h \
diff --git a/src/widgets/itemviews/qcolumnview.h b/src/widgets/itemviews/qcolumnview.h
index 7d5e2f5cd1..42eac7426a 100644
--- a/src/widgets/itemviews/qcolumnview.h
+++ b/src/widgets/itemviews/qcolumnview.h
@@ -43,10 +43,9 @@
#include <QtWidgets/qtwidgetsglobal.h>
#include <QtWidgets/qabstractitemview.h>
-QT_BEGIN_NAMESPACE
-
+QT_REQUIRE_CONFIG(columnview);
-#ifndef QT_NO_COLUMNVIEW
+QT_BEGIN_NAMESPACE
class QColumnViewPrivate;
@@ -109,8 +108,6 @@ private:
Q_PRIVATE_SLOT(d_func(), void _q_clicked(const QModelIndex &))
};
-#endif // QT_NO_COLUMNVIEW
-
QT_END_NAMESPACE
#endif // QCOLUMNVIEW_H
diff --git a/src/widgets/itemviews/qcolumnview_p.h b/src/widgets/itemviews/qcolumnview_p.h
index 7eff0f66cd..fa276075fe 100644
--- a/src/widgets/itemviews/qcolumnview_p.h
+++ b/src/widgets/itemviews/qcolumnview_p.h
@@ -54,8 +54,6 @@
#include <QtWidgets/private/qtwidgetsglobal_p.h>
#include "qcolumnview.h"
-#ifndef QT_NO_QCOLUMNVIEW
-
#include <private/qabstractitemview_p.h>
#include <QtCore/qabstractitemmodel.h>
@@ -67,6 +65,8 @@
#include <qevent.h>
#include <qscrollbar.h>
+QT_REQUIRE_CONFIG(columnview);
+
QT_BEGIN_NAMESPACE
class QColumnViewPreviewColumn : public QAbstractItemView {
@@ -190,9 +190,7 @@ public:
const QStyleOptionViewItem &option,
const QModelIndex &index) const Q_DECL_OVERRIDE;
};
-#endif // QT_NO_QCOLUMNVIEW
-
QT_END_NAMESPACE
-#endif //QCOLUMNVIEW_P_H
+#endif //QCOLUMNVIEW_P_H
diff --git a/src/widgets/itemviews/qcolumnviewgrip.cpp b/src/widgets/itemviews/qcolumnviewgrip.cpp
index f7d6e6d2b0..4a4237805f 100644
--- a/src/widgets/itemviews/qcolumnviewgrip.cpp
+++ b/src/widgets/itemviews/qcolumnviewgrip.cpp
@@ -37,8 +37,6 @@
**
****************************************************************************/
-#ifndef QT_NO_QCOLUMNVIEW
-
#include "qcolumnviewgrip_p.h"
#include <qstyleoption.h>
#include <qpainter.h>
@@ -190,5 +188,3 @@ originalXLocation(-1)
QT_END_NAMESPACE
#include "moc_qcolumnviewgrip_p.cpp"
-
-#endif // QT_NO_QCOLUMNVIEW
diff --git a/src/widgets/itemviews/qcolumnviewgrip_p.h b/src/widgets/itemviews/qcolumnviewgrip_p.h
index 3447f9f824..16c0aefada 100644
--- a/src/widgets/itemviews/qcolumnviewgrip_p.h
+++ b/src/widgets/itemviews/qcolumnviewgrip_p.h
@@ -54,7 +54,7 @@
#include <QtWidgets/private/qtwidgetsglobal_p.h>
#include <private/qwidget_p.h>
-#ifndef QT_NO_QCOLUMNVIEW
+QT_REQUIRE_CONFIG(columnview);
QT_BEGIN_NAMESPACE
@@ -98,6 +98,4 @@ public:
QT_END_NAMESPACE
-#endif // QT_NO_QCOLUMNVIEW
-
#endif //QCOLUMNVIEWGRIP_P_H
diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp
index 752e385aa5..afcb50c866 100644
--- a/src/widgets/styles/qcommonstyle.cpp
+++ b/src/widgets/styles/qcommonstyle.cpp
@@ -608,7 +608,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q
}
break;
#endif // QT_NO_LINEEDIT
-#ifndef QT_NO_COLUMNVIEW
+#if QT_CONFIG(columnview)
case PE_IndicatorColumnViewArrow: {
if (const QStyleOptionViewItem *viewOpt = qstyleoption_cast<const QStyleOptionViewItem *>(opt)) {
bool reverse = (viewOpt->direction == Qt::RightToLeft);
@@ -660,7 +660,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q
p->restore();
}
break; }
-#endif //QT_NO_COLUMNVIEW
+#endif //QT_CONFIG(columnview)
case PE_IndicatorItemViewItemDrop: {
QRect rect = opt->rect;
if (opt->rect.height() == 0)