Commit Graph

32687 Commits

Author SHA1 Message Date
Jake Petroules
0b6bf289fd Update OS version constants in qsystemdetection.h
Change-Id: I8c8fa8861280948bf8488c4465a359858bb625e0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-16 23:04:34 +00:00
Kai Uwe Broulik
184d80f5a0 QDialogButtonBox: Don't overwrite shortcut with standardButtonShortcut
de63bbd2f8 introduced a new
QPlatformTheme::standardButtonShortcut which would then unconditionally
overwrite the QPushButton shortcut, even when empty, breaking activating
mnemonics potentially included in the button's text.

Task-number: QTBUG-61197
Change-Id: I2a5a460a820a5ab4054eb44f349066aaeca1436f
Reviewed-by: Marco Martin <notmart@gmail.com>
Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-07-15 16:59:49 +00:00
Stephan Binner
773178900f Convert features.treeview to QT_[REQUIRE_]CONFIG
Change-Id: I4a036a0410615ac563b17f7715c47acccb8abfca
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-15 16:46:38 +00:00
Joerg Bornemann
a23568be6c Fix CONFIG+=silent for MSVC non-inference rules
silent.prf modifies the compiler commands by prefixing them with a
silencing echo command. For MSVC, the used $< syntax is only valid in
inference rules. However, the PCH rule is not an inference
rule and breaks when silent.prf is used.

Remove the echo command for MSVC. The compiler already outputs the
currently compiled file. There's no need to do it twice.

Task-number: QTBUG-61688
Change-Id: I7e2c1211e471c9c149c16cac8e87406e88ee2d97
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-14 18:49:56 +00:00
Stephan Binner
4db3a5f8eb Add missing #include for -no-widgets
Task-number: QTBUG-61780
Change-Id: I62fccc6474965278cb1b258b512fda3b60f995f3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-14 18:18:18 +00:00
Friedemann Kleint
dc81a99dec Examples: Remove remains of wince
Task-number: QTBUG-52590
Task-number: QTBUG-60628
Task-number: QTBUG-60633
Task-number: QTBUG-60635
Task-number: QTBUG-60641
Task-number: QTBUG-60659
Change-Id: I9ffc3e25893d2281b19cc12b70e1a92fb2a8b708
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2017-07-14 17:30:51 +00:00
Alex Blasche
d4700b2317 Bump copyright year of qdbuscpp2xml and qdbusxml2cpp to 2017
Change-Id: I7be6f45d359db813b15a3754b3ed203cb829a3d0
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2017-07-14 13:00:54 +00:00
Alex Blasche
dbcfe31892 Fix empty "Command line was" string in generated source files
Task-number: QTBUG-61370
Change-Id: If829a889acfe092adad4ac443d71e63b67ba7f55
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-14 13:00:26 +00:00
Mårten Nordheim
5b24d3dd35 Add missing constexpr specifier to two iterators
The classes themselves and their equality operators are used in
constexpr functions/ctors (in QKeyValueIterator) so Visual Studio 2017 expects
them to be marked constexpr as well. Currently this causes a compilation error
when instantiating a QKeyValueIterator using either of these iterators.

Change-Id: I2e3eeaf3b3f11f381a63875e6575dfd82fe56fcb
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-14 00:24:25 +00:00
Kai Koehne
627f0a7f7d Doc: Improve documentation about append, prepend
The references to the this pointer look somewhat alien in the
documentation, because it isn't part of the signature. Rather make
the relationship explicit.

Change-Id: I6de516e165ea6e9c4ee2898836e9490fbaf4545c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-13 15:25:57 +00:00
Daniel Teske
7051572618 QLineEdit: Fix length calculation for input mask "\\\\"
Consider the raw string \\\\. The previous algorithm would consider
the last 3 \ to be escaped because the previous character is a \ and
thus calculating a maxLength of 3.

But this should be treated as two escaped \ with a maxLength of 2.

Change-Id: I6c4b8d090a2e1c6e85195d5920ce8b80aea1bc2d
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-07-13 14:59:17 +00:00
Simon Hausmann
bdca35e815 Fix documentation of QEvent::LanguageChange propagation
The documentation claims that QGuiApplication forwards the top-level
windows. However this appears to be a search & replace mistake from the
QApplication <> QGuiApplication separation times. Only QApplication
forwards the event to top-level widgets and changeEvent() is a virtual
method of QWidget. Nothing is implemented for plain QGuiApplication and
QWindow.

Change-Id: I71b05ecebc90f7c28e150590764438ebaa90e88f
Reviewed-by: Michael Brasser <michael.brasser@live.com>
2017-07-13 04:53:59 +00:00
Tor Arne Vestbø
58ab25004e macOS: Fix unused variable in window:willUseFullScreenContentSize:
Change-Id: I419f884f4145dbe2b60751bf6cde3968cf34fe4a
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-07-12 23:28:38 +00:00
Gabriel de Dietrich
9ec73b85aa QMacStyle: Remove unused variable warning
Change-Id: Id6116ad110ac39898e9c44ae41c6d7eec96f58d7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-07-12 17:37:57 +00:00
Allan Sandfeld Jensen
b3f7bea105 Handle conversion and comparison between qvarianthash and qvariantmap
QVariant claims to be able to QVariantHash and QVariantMap, but the
actual conversion implementation is missing.

Task-number: QTBUG-61471
Change-Id: I0cba74642aa77dc423effed289bc7619922a89eb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-11 21:10:54 +00:00
Mitch Curtis
b783c03d19 Doc: fix paintEvent() function casing
Change-Id: I66ef1c25259499147100413753fdc80b01dc49f6
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2017-07-11 18:30:30 +00:00
Allan Sandfeld Jensen
69c5ddf295 Fix buffer overflow in text blending
Clip buffers being converted to those being worked on so we don't write
outside the lines.

Task-number: QTBUG-61863
Change-Id: Icc7c6c0946fa522b5afeca0663fc2b45151b1897
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-07-11 18:13:25 +00:00
Friedemann Kleint
4970ef5574 Windows QPA: Fix build with draganddrop disabled
Task-number: QTBUG-61885
Change-Id: Ibb4a7ac43785dcdb46afcd5c2081e43df7d9e9a5
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-07-11 18:05:18 +00:00
Friedemann Kleint
ba87cfd774 iaccessible2.pri: Fix architecture detection
Use QT_ARCH instead of legacy QMAKE_TARGET.arch, which is not
defined for MinGW.

Change-Id: I5a1298321f696cf1bc30613283174ecfa0139600
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-07-11 18:05:07 +00:00
Andy Shaw
b1708efeeb Windows: Fallback to d3d9 when in a VM on VMWare Workstation 12
On VMWare Workstation 12 it will indicate OpenGL 2.1 support but it is
not sufficient enough as it is lacking things needed to use QtWebEngine
without crashing. Falling back to d3d9 works fine in this case as d3d11
also crashes.

Change-Id: I404867045a74f37d3ecc7e04e669dd305570deeb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-07-11 06:24:19 +00:00
Stephan Binner
01703d0264 Convert features.tableview to QT_[REQUIRE_]CONFIG
Change-Id: I7ab479deff7bbf3083d1efa196e0480b181548c5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-11 02:52:35 +00:00
Stephan Binner
6cd46c9a61 Convert features.datetimeedit to QT_[REQUIRE_]CONFIG
Change-Id: I083cd565fab8c33dc3633b71f962de099c2b3481
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-11 02:52:29 +00:00
Stephan Binner
3835194d34 Convert features.rubberband to QT_[REQUIRE_]CONFIG
Change-Id: I6d634bafa6d26c1e78069fddd412e6de24f5775c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-11 02:52:25 +00:00
Stephan Binner
3906043f05 Convert features.fontdialog to QT_[REQUIRE_]CONFIG
Change-Id: Iebc091ffd023595278fa177b7f205b6e0cd7ec52
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-11 02:52:20 +00:00
Stephan Binner
93dc459f48 Convert features.graphicseffect to QT_[REQUIRE_]CONFIG
Change-Id: I1bb96088b2e9f2a2cfab5fceeebebe94fa6bb3a6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-11 02:52:03 +00:00
Ben Boeckel
bb1e5675a5 cmake: avoid @var@ expansion in older CMake versions
Older versions of CMake expanded `@var@` in CMake code, so this could be
expanded at this location rather than the `string(CONFIGURE)` call if
`module` were set inadvertently. Instead, hide the literal `@` symbol
from CMake, but not from the string.

This avoids a CMP0053 warning for projects using Qt5 with a minimum
version set lower than 3.1 and silent bugs with projects explicitly
setting CMP0053 to OLD.

Change-Id: I0e4a86469fdf69b8706387799ab9b17498b8d1ca
Reviewed-by: Stephen Kelly <steveire@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-10 21:25:47 +00:00
Thiago Macieira
c3cd0f6e19 configure: Remove test for unused feature "mremap"
It's a Linux-specific call that was added to the kernel in pre
historical times (before Git). Sqlite3 uses mremap(2) but it has its own
checking. Nothing else in Qt uses this.

Looks like the last user was the QPF font engine, removed in commit
d7e424ee66 almost four years ago. And
that's considering that the QPF font engine wasn't in use since Qt 5.0
because QWS was no more...

Change-Id: Idaa189413f404cffb1eafffd14ceee7488514c1d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-10 18:00:38 +00:00
Gabriel de Dietrich
c12072c685 QMacStyle: Add back icon logic in tab layout
This was accidentally removed when we revamped the document
mode tabs appearance.

In retrospect, we should also consider adding CE_TabBarTabIcon
so that we can set the relative position of the icon w.r.t.
the tab title.

Change-Id: Ic8c3a69c31837018bfdd60f8084120cae47e91f8
Task-number: QTBUG-61092
Task-number: QTBUG-61742
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-07-10 17:39:03 +00:00
Stephan Binner
333a27a8b6 Fix macOS build for -no-widgets, take 2
Task-number: QTBUG-61780
Change-Id: Ic67074b19b3b5c409c0f1254be77ba122ad61a85
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-10 09:40:46 +00:00
Friedemann Kleint
70b976ece1 QtTest: Add msvc2017 detection and keyword to blacklisting
Change-Id: I71162fc7dff0f29a24fd78e1188f8d86c2834d3c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-07-10 07:01:14 +00:00
Friedemann Kleint
1bc5f619ea QStorageInfo/Windows: Improve error handling
Bail out of QStorageInfoPrivate::doStats() should an error occur
and set the ready/valid flags accordingly.

Task-number: QTBUG-6039
Change-Id: Id5354b31329d951599ae991aa7edde0515c90514
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-09 11:07:38 +00:00
Friedemann Kleint
6e861d8412 pathstroke example: Add Q_FALLTHROUGH to unmarked fallthrough seen by GCC 7
Task-number: QTBUG-60635
Change-Id: I10695f96122f1b0859bbe7fadb349efb3c7277a6
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-07-09 11:07:17 +00:00
Tor Arne Vestbø
16799ba394 Only try to resolve library paths via linker for Drawin clang
Task-number: QTBUG-61735
Change-Id: Ia8e777928aa0cff44f092968eac14d32501a5d73
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-08 16:59:07 +00:00
Kevin Funk
9db09b4700 Fix modernize-use-bool-literals issues
Reported by clang-tidy. Skipped fixes in implementation files, only
changed headers.

Change-Id: I5cfd266b3d4046f90baebc0c538b1b6ab03a02d2
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-08 11:49:55 +00:00
Friedemann Kleint
2300629df5 QWindowsFileIconEngine::filePixmap(): Handle non-existent files
Pass SHGFI_USEFILEATTRIBUTES/FILE_ATTRIBUTE_NORMAL to ShGetFileInfo() in
case a file does not exist to obtain an icon.

SHGFI_USEFILEATTRIBUTES cannot be used unconditionally as it
breaks custom directory icons.

The functionality is then on par with XCB which obtains icons
via QMimeDatabase look-up.

Task-number: QTBUG-25319
Change-Id: Icd894d97fd8d1a2c4d5d39e86afe89843e6720c4
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-07-08 11:02:39 +00:00
Gatis Paeglis
fb78adf8df xcb: cleanup gl_integrations_plugin_base.pri
The original version (8758f532ae) of
this file was full of things that are irrelevant for XCB GL plugins.
Most of this has been cleaned out as side effect of porting to the
new configure system. This patch cleans up the remaining pieces.

It does not matter for XCB GL plugins if Qt was configured with
-qt-xcb or -system-xcb as those are dependencies of xcb_qpa_lib-private
and are not used directly by these plugins.

The only XCB dependencies that are directly used by these plugins
are libxcb-glx and libxcb, which are managed directly in xcb_glx.pro:

qtConfig(xcb-glx): QMAKE_USE += xcb_glx

Change-Id: I2175185902bb028de142c8ff6e0b0a3b76a09703
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-07 23:05:17 +00:00
Friedemann Kleint
05fd45ac8d QIntegrityHIDManager: Fix syncqt warnings
QtInputSupport: WARNING: qtbase/src/platformsupport/input/integrityhid/qintegrityhidmanager.h includes QObject when it should include QtCore/QObject
QtInputSupport: WARNING: qtbase/src/platformsupport/input/integrityhid/qintegrityhidmanager.h includes QList when it should include QtCore/QList
QtInputSupport: WARNING: qtbase/src/platformsupport/input/integrityhid/qintegrityhidmanager.h includes QList when it should include QtGui/QList
QtInputSupport: WARNING: qtbase/src/platformsupport/input/integrityhid/qintegrityhidmanager.h includes QThread when it should include QtCore/QThread

Amends 88f30250eb.

Change-Id: Ia56fdd87871fdeae8fe34752c61a66195100ceb7
Reviewed-by: Kimmo Ollila <kimmo.ollila@qt.io>
Reviewed-by: Rolland Dudemaine <rolland@ghs.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-07 21:39:17 +00:00
Thiago Macieira
8d542154a8 Avoid sharing violation in QFileSystemEngine::id on Windows
We can't open a file for reading if the file is open by another process
(or by ourselves) without sharing permitted. So ask for no access just
so we can get a handle to it.

Change-Id: I998653739e1cec2a58a07a6593b6ff87c1d59dd1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-07 21:39:16 +00:00
Thiago Macieira
fd95ef765a QFile::rename: avoid two stat(2)/CreateFile in a row
QFileSystemEngine::id() will stat(2)/CreateFile in order to get the ID
of the file anyway, so we don't need to use QFile::exists() to check if
the destination exists. Instead, rely on id() returning a null value to
indicate error. On Windows, it's possible that the calls to either
GetFileInformationByHandle or GetFileInformationByHandleEx might fail,
but we ignore those.

Change-Id: I1eba2b016de74620bfc8fffd14ccaebcbed64419
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2017-07-07 21:39:12 +00:00
Giuseppe D'Angelo
353fb118c3 Fix detection of QMAKE_DEFAULT_LIBDIRS with Clang under Linux
With 4183475080, Qt fails to build if
qmake is unable to detect the compiler's default include and
library search paths. Clang on non-Darwin systems was missing working
code for the detection.

Unlike GCC, Clang on its own does not print the library search paths
when called with the -v option.

On Darwin, the -Wl,-v option will reach ld64, which will print those paths.
However, neither GNU ld nor gold will print anything useful with just
-v. GNU ld has a --verbose option that does print some search paths, but
those are not the ones used when ld is invoked (via collect2) by GCC or
Clang, so it can't be used.

To make Clang print its library search paths one can use
-print-search-dirs, which however doesn't print include search paths. So
amend the existing code in order to make a second call to clang on
non-Darwin systems. This second call is used for library path detection,
and fixes the build on non-Darwin (tested on Linux).

Change-Id: Ic858f908ee1a2e0eb307abb074daee0ded38abd5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-07 16:23:46 +00:00
Alessandro Portale
f2db946fa4 QWidgets/FusionStyle: Fix menu drawing under HighDPI
Delegating the border painting to qDrawPlainRect ensures that there are
no off-by-one pixel issues.

Task-number: QTBUG-61845
Change-Id: I732795e048cbc2e5b279782e9a19700884f8bc40
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-07-07 16:23:45 +00:00
Friedemann Kleint
b6d5026b1f QWidgets/drawutils: Handle device pixel ratio != 1
The panel drawing helpers have code drawing shadows that relies
on working with integer coordinates and one pixel lines, which causes
artifacts when Qt High DPI scaling is in effect.

Add code that checks for device pixel ratio != 1 and in that
case reverts out the Qt High DPI scaling transformation and scales
the parameters so that the drawing code used device
pixels.

Task-number: QTBUG-58611
Task-number: QTBUG-59116
Change-Id: I8402044f3fd4dfcd349b31c573dcad12ae1f609f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-07-07 14:25:20 +00:00
Tor Arne Vestbø
9d3cd2268c macOS: Account for fullscreen geometry bug in AppKit on OS X 10.10
Task-number: QTBUG-61776
Change-Id: Ifac502cf422088eafe9211d759f2f5cd9769d0d3
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-07-07 10:36:54 +00:00
Simon Hausmann
3fb0852091 Skip the dbus abstract adaptor test on OpenSuSE 42.1
It has been crashing for months...

Change-Id: I1d6077f949d642465771c4d618babc64ebc340f6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-07-07 09:40:14 +00:00
Friedemann Kleint
d7bfbf3a13 Windows QPA: Further restrict windows for WM_DPICHANGED
Exclude popups among other non-applicable windows types
from resizing in WM_DPICHANGED.

When resizing was enabled for non-fixed size windows
by c854fc5a6b
it turned out that context menus were truncated
when moving an application from a high resolution
to a low resolution monitor.

Factor out a function to check for the applicable window types.

Amends 886ce572d6,
c854fc5a6b.

Task-number: QTBUG-55510
Change-Id: I16fee07f3e11828848ec71cdceadff958cedb13a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2017-07-07 09:29:11 +00:00
Berthold Krevert
e53a57d254 Add Q_FALLTHROUGH
Change-Id: I14efe4dbffb5808f3f9b763f7dae38301a1f6e5c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-07-07 08:45:49 +00:00
Orgad Shaneh
5772cac426 qmake: Do not default to -pipe on Windows
It is considered slightly faster than the default mode[1],
but on Windows it causes trouble when aborting the build,
it leaves behind zero-sized object files which cause link
error. See discussion in the bug-make mailing list[2].

[1] https://stackoverflow.com/a/1512947/764870
[2] http://lists.gnu.org/archive/html/bug-make/2017-06/msg00066.html

Change-Id: I7aa0b328a8c743fdfe9b0aece02b329066515076
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-07 08:11:42 +00:00
Orgad Shaneh
e10be52e21 qmake: Separate object_script by Makefile name
If several Makefiles are used in the same directory (for example, for
multiple projects in the same directory or different build configurations),
they all reference the same object_script, which is obviously wrong.

Change-Id: I9b499ceb6b6bd6058f54b452fa44bfb2313eec26
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-07 08:11:44 +00:00
Friedemann Kleint
db404fea64 QListView: Fix viewport size when checking scroll bar visibility
Subtract the viewport margins from the contentsRect in
QCommonListViewBase::updateHorizontal/VerticalScrollBar(). This
affects list views in icon mode and list mode / ScrollPerPixel.

Task-number: QTBUG-61383
Change-Id: I6f2f7951ac9344ac21cef1eba061780d130e2467
Reviewed-by: David Faure <david.faure@kdab.com>
2017-07-07 08:10:01 +00:00
Thiago Macieira
9bec818ccc Use the namespace-mangled symbol for the qt_version_tag group name
Doesn't affect our current builds since it's just a marker for the
linker on what sections should be merged. Unless you're mixing
namespaced and non-namespaced static builds into one executable.

Change-Id: Ia53158e207a94bf49489fffd14c7bc294fccf8f9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-07 07:22:03 +00:00