Commit Graph

34703 Commits

Author SHA1 Message Date
Lars Knoll
41b4e154d6 Update Text segmentation and line break data to Unicode 10.0
Also adjusted the text segmentation and line break algorithms
so that they can handle the new data, and pass the test suite.

Change-Id: Ib727fd80003e34e96458d7a681996de3fa3691e7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-01-03 07:47:26 +00:00
Lars Knoll
8bfabb34de Update most Unicode data to version 10.0
The text segmentation data is not being updated in this change,
as it requires additional code changes. Updating those will
come in a follow-up commit.

Change-Id: I5d6b6bc96044e8dd0c25cf6f79756e7f68bf6e7c
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-01-03 07:46:31 +00:00
Lars Knoll
2b2b9c9962 Update QString::isRightToLeft() to take directional hints into account
Make sure we properly handle both directional embeddings as well as
directional isolates to determine the direction of the string.

According to the latest version of the Unicode bidi algorithm,
parts of the string contained inside an directional isolate is
to be ignored when determining the paragraph direction. Embedding
markers themselves are to be ignored as well, but not the characters
inside an explicit directional embedding or override.

This is also some required pre-work to get our BiDi algorithm
updated to the latest version of the standard.

Move the implementation to QStringView and implement the methods
in QString and QStringRef through that implementation.

Task-number: QTBUG-57743
Change-Id: I7f24e09198e22d6359c6534c9ae40a904e94c46e
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-01-03 07:46:20 +00:00
Martin Smith
f28ef0eca9 doc: Correct remaining qdoc warnings in QRandomGenerator
Due to the integration of clang in qdoc, several qdoc warnings
appeared for class QRandomGenerator. This update corrects all
the remaining qdoc warnings.

Change-Id: I92fe9f7d9cb193e145ee8ad0e7198625b9a5bf7b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-01-02 14:17:38 +00:00
Liang Qi
9de26a630f Merge "Merge remote-tracking branch 'origin/5.10' into dev" into refs/staging/dev 2018-01-02 09:32:37 +00:00
David Faure
bb6f0a5291 QMimeDatabase: only export var for unittests if QT_BUILD_INTERNAL
Change-Id: I7fa25b64cf39667c8cea95431f68baab623c8a2a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-01-02 09:31:37 +00:00
David Faure
739611221c Add QHeaderView::setFirstSectionMovable(), useful for flat treeviews
QTreeView makes columns movable except for the first one
(since Qt 5.0, see commit e0fc088c0c). This is indeed best
for actual trees, but not when using QTreeView as a flat
multi-column list (with no "root decoration"). Then it should
be possible to move the first column.

[ChangeLog][QtWidgets][QHeaderView] Flat treeviews can now allow
the user to move the first column (like in Qt 4.x) using the new
method QHeaderView::setFirstSectionMovable().

Change-Id: I6b5025e40850bf5c4c373124ee81f657f3f09d29
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2018-01-02 09:31:11 +00:00
Lars Knoll
0f315adf91 Merge remote-tracking branch 'origin/5.10' into dev
Conflicts:
	.qmake.conf
	sc/corelib/io/qfsfileengine_p.h
	src/corelib/io/qstorageinfo_unix.cpp
	src/platformsupport/eglconvenience/qeglpbuffer_p.h
	src/platformsupport/input/libinput/qlibinputkeyboard.cpp
	src/platformsupport/input/libinput/qlibinputpointer.cpp
	src/plugins/platforms/cocoa/qcocoamenu.mm
	src/plugins/platforms/ios/qiosscreen.h
	src/plugins/platforms/ios/qioswindow.h
	src/plugins/platforms/ios/quiview.mm
	src/printsupport/dialogs/qpagesetupdialog_unix_p.h
	src/printsupport/dialogs/qprintpreviewdialog.cpp
	src/printsupport/widgets/qcupsjobwidget_p.h
	src/widgets/widgets/qmenu.cpp
	tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
	tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp

Change-Id: Iecb4883122efe97ef0ed850271e6c51bab568e9c
2018-01-02 09:58:44 +01:00
Andy Shaw
a899e45495 DB2: Pass on the native error codes to QSqlError
Since DB2 can potentially have more than one error code, we need to join
these together using ';' as a separator.

Task-number: QTBUG-142
Change-Id: Idd376df84a8e3ae4c05b4722b4d0020fa4f3edad
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-01-02 08:51:06 +00:00
Andy Shaw
fa1397882a Test calling setRelation() with QSqlRelation() clears the relation
Change-Id: I93dbec54bfb9402b9044323862c2ae1d41e1790a
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2018-01-02 08:50:54 +00:00
Andy Shaw
9b361f0e90 Return an invalid QSqlDatabase when accessing from another thread
QSqlDatabase objects can only be used in the thread that the connection
was opened for. So if the driver was created already then we check if
the thread is correct. If it is not then we output a warning and return
an invalid QSqlDatabase.

[ChangeLog][QtSql][QSqlDatabase] QSqlDatabase::database() will return
an invalid QSqlDatabase if the calling thread does not own the requested
QSqlDatabase.

Task-number: QTBUG-216
Change-Id: Ib5a25aa62129e3925f9819109af05961e5178bc5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-01-02 08:49:40 +00:00
Andy Shaw
52b85212a2 sqlite: Check that there are values to be set when binding
If the values vector is empty then we know already that the paramCount
will still be invalid, so we should just accept that and not check the
reused named placeholders.

Task-number: QTBUG-64923
Change-Id: Ifaa755540c4574f1f76d3f9f129bf0f66b837b70
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-01-02 06:32:16 +00:00
Samuel Gaist
2b0eb3fac3 Remove use of QRegExp from QSharedMemory
This patch updates the code from QSharedMemory to remove the use
of the deprecated QRegExp class. It also updates the unique key
test to avoid change of behavior going undetected.

Change-Id: I649e615027507898800bb5454a62a6cf8bbb2e18
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-12-30 23:34:00 +00:00
Samuel Gaist
83aca24bc4 Migrate Cocoa QPA backend to use QRegularExpression
This patch updates the Cocoa QPA backend code to use QRegularExpression
in place of the deprecated QRegExp.

Change-Id: I6de2774975e63f8dbff6dad0a842f35c3c4b4f83
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-12-30 23:33:50 +00:00
Lars Knoll
f3f4f95536 Bump the minimum required version for harfbuzz to 1.6.0
This is the first version that supports Unicode 10.0.0, which
we now require for Qt.

Change-Id: Iff3cb757eb7d97dace5649262c337a4ed1145199
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-12-30 15:17:32 +00:00
Lars Knoll
809200a83e Update bundled HarfBuzz-NG copy to 1.7.4
This is the latest released version, fixing a large amount
of bugs and adding Unicode 10 support.

[ChangeLog] Bundled HarfBuzz-NG copy updated to 1.7.4

Change-Id: Idc8092dfc4e593d64fff2fd51ff9e1b3d84049a7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-12-30 15:17:28 +00:00
Lars Knoll
db92f2f3aa Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
	.qmake.conf
	mkspecs/win32-g++/qmake.conf
	src/corelib/global/qglobal_p.h
	src/corelib/global/qoperatingsystemversion_p.h
	src/corelib/io/qfilesystemengine_win.cpp
	src/network/bearer/qbearerengine.cpp
	src/platformsupport/input/libinput/qlibinputpointer.cpp
	src/sql/doc/snippets/code/doc_src_sql-driver.cpp
	src/widgets/kernel/qwidget_p.h
	src/widgets/kernel/qwidgetwindow.cpp
	src/widgets/styles/qfusionstyle.cpp
	tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp

Change-Id: I80e2722f481b12fff5d967c28f89208c0e9a1dd8
2017-12-30 12:09:53 +01:00
Alex Trotsenko
89b0364cde QRingBuffer: avoid reallocations of the data
Since its initial implementation, QRingBuffer had the following
fragilities in the architecture:

  - it does not guarantee validity of the pointers, if new data will
    be appended. As an example, passing an address of the QRingBuffer
    chunk as a parameter to the WriteFileEx() function on Windows
    requires the stability of the pointer. So, we can't add new data
    to the QRingBuffer until the overlapped operation completed
    (related issues were fixed for QWindowsPipeWriter and QSerialPort
    in 5.6 branch by introducing an intermediate byte array);
  - inefficient reallocations in reserve(), if a shared chunk was
    inserted in the queue (we can get a reallocation in the place
    where we don't expect it:

      char *writePtr = buffers.last().data() + tail;  <-  line #133

    ).

Proposed solution is to avoid reallocation by allocating a new
block instead. That was accomplished by introducing a QRingChunk
class which operates on a fixed byte array and implements head/tail
pointers strategy for each individual buffer in the queue. So,
QRingBuffer is no longer dependent on QByteArray's internal
shrink/growth algorithms.

Change-Id: I05abab0ad78e22e4815a196037dfc6eff85325d1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-12-30 10:15:10 +00:00
Alex Trotsenko
48ea14080e QNetworkInterface: fix warning of unused function
That causes compilation error in developer build or when '-Werror'
command line argument is forced:

kernel/qnetworkinterface_unix.cpp:142:12: error: 'int getMtu(int, ifreq*)' defined but not used [-Werror=unused-function]
 static int getMtu(int socket, struct ifreq *req)
            ^
cc1plus: all warnings being treated as errors

So, mark 'getMtu()' as unused in the appropriate branches.

Change-Id: Ib4d74845835962bb12f56baf8e13834c032a0404
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-12-29 13:57:18 +00:00
Lars Knoll
dcc605beb6 Chop a possible trailing \0 from retrieved text
Some apps (e.g. Chromium) explicitly append a \0 to the text they
transmit through the clipboard. Remove that one, when we retrieve the
text, so it doesn't become part of the text we're pasting.

This was e.g. visible when pasting from chromium to the textedit example.

Change-Id: I9445319e6e5ef304a364e14f794b16557a3cc919
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2017-12-29 08:14:55 +00:00
Thiago Macieira
dd61a1d98e tst_QUdpSocket: add some tests for link-local IPv6 multicasting
Unlike higher scopes (like scope 4, admin-local, which the last commit
used), scopes 1 and 2 require a scope in order to bind, even if some
operating systems are lenient. So test that we are able to bind to them
and do bind properly.

Change-Id: Ifb5969bf206e4cd7b14efffd14fba153eab965b9
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-12-29 00:11:00 +00:00
Thiago Macieira
198c59dbce tst_QUdpSocket: always use an interface when binding to IPv6
Binding without an interface and expecting the OS to select something is
not supported in all OSes. On FreeBSD, I keep getting EADDRNOTAVAIL. So
modify our test to only join, leave and send to multicast groups with an
interface selection.

With this, all tests either pass or are skipped for me on Linux,
FreeBSD, and macOS. On Windows, this revealed an inconsistency in
behavior, which this commit adds a workaround for.

Change-Id: Ifb5969bf206e4cd7b14efffd14fb6815456494d2
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-12-29 00:10:54 +00:00
Thiago Macieira
656804b964 qrandom.h: actually #undef min and max instead of using parentheses
Putting parentheses around the call to (std::numeric_limits<T>::min)()
works, but the trick cannot apply to the min() function declaration on
the same line. So we really need to #undef.

I hope no one after the 1990s still needs these macros.

Task-number: QTBUG-65414
Change-Id: I39332e0a867442d58082fffd15024f8edb293311
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-12-28 21:30:28 +00:00
Jake Petroules
44da5b8635 Allow moc to handle Unicode output filenames on Windows with MSVC
The C standard library functions cannot handle UTF-8 filenames. Instead,
we need to use the wide-character versions which accept UTF-16 input.

Task-number: QTBUG-65492
Change-Id: If4b3b4eeeec4f3bbb428b8f6b0311a65d01463b0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-12-28 15:29:02 +00:00
Thiago Macieira
6f7b64e2a9 QMap: fix another UB (invalid cast) relating to QMap's end
Like in commit 75cdf654bc, we use the
pointer value of the QMap header (which is of type QMapNodeBase) as a
sentinel. It's never dereferenced. In that commit, the issue was calling
end() directly; in here, it happens when iterating forward from any
element, which means nextNode() can reach back to the header.

However, using static_cast is wrong, so we use reinterpret_cast.

Change-Id: I39332e0a867442d58082fffd15040317704a87ce
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-12-27 21:01:00 +00:00
Christian Ehrlicher
a779d68256 MimeTypeBrowser: avoid memleaks
In MainWindow ctor some member values were allocated without a parent
and not cleaned up in dtor. Fixed it by give them a valid parent so they
get automatically cleaned up. Also m_treeView was initialized twice.

Task-number: QTBUG-61862
Change-Id: I5590b87bb517c55db6eb58e700a5d419c0acdba2
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Martin Smith <martin.smith@qt.io>
2017-12-27 18:21:28 +00:00
Albert Astals Cid
d733014019 CUPS: Refactor the code a bit
Move the selected and selDescription members to a subclass of QOptionTreeItem
since it's only ever used for Option type nodes of the tree

Change-Id: Ic99841c4e04a3afcff0950f72abf12977850f6d3
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2017-12-27 16:46:38 +00:00
Joni Jantti
e548406d28 Blacklist tst_QUdpSocket on Ubuntu 16.04
tst_QUdpSocket::broadcasting and tst_QUdpSocket::pendingDatagramSize
fail on the new Ubuntu 16.04 clean template.

Task-number: QTBUG-65440
Change-Id: I0e973b9c90b7c5827406bac8138370b61992a115
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2017-12-27 14:41:26 +00:00
Nico Vertriest
0fd5fe28ab Doc: remove Config Dialog Example
Task-number: QTBUG-60635
Change-Id: I089f14a92f1b9c53b26200c93cac7ee3c9f26d65
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2017-12-27 14:41:18 +00:00
Joni Jantti
597b96b8fa Blacklist tst_QDateTime::operator_eqeq
This autotest fails on the new Ubuntu 16.04 template with UTC timezone
in the system settings.

Task-number: QTBUG-65435
Change-Id: I397f01ab3fed354a4eeec8b05415226a75fce5a1
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2017-12-27 14:41:00 +00:00
Thiago Macieira
3d7cdb64fc qfloat16: NaN is not infinite
Change-Id: I39332e0a867442d58082fffd1502b7010424f0f8
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2017-12-27 11:50:09 +00:00
Shawn Rutledge
0c4d31d8c9 Improve the findfiles example: use QDirIterator, etc
It hasn't been necessary for a long time now to write the recursive
file-find function manually.  It has just been an obscurely documented
feature of QDirIterator for far too long.

Demonstrate the new QLocale::formattedDataSize() function.

Also sync up the qdoc description of this example with the recent changes.

Change-Id: I9c2bb15bb5ec353d38181b160f0be198774cbea2
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-12-27 08:40:22 +00:00
Gabriel de Dietrich
c7faa4ad8f Cocoa QPA: Delete singletons on exit
This involves QCocoaApplicationDelegate and QCocoaMenuLoader.

The former has been modernized to use blocks. The latter was
not being deleted previously.

Change-Id: Ic4cbfed2d9598fa04130675b3330d985b9489a21
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2017-12-26 21:43:43 +00:00
Thiago Macieira
c4f397ee11 tst_QUdpSocket: Don't use interface-local IPv6 multicast
The FreeBSD kernel treats them specially, just like link-local (that's
probably why it calls them "interface-local" instead of "node-local").

So instead let's use a random address, which will avoid multiple
tst_qudpsocket, when run on the same network at the same time,
receiving each other's datagrams. It could happen, considering this test
has an 800-second timeout limit.

Change-Id: Ifb5969bf206e4cd7b14efffd14fb592a3166547e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2017-12-24 17:14:19 +00:00
Thiago Macieira
bbcd453388 tst_QUdpSocket: stop trying to bind to multicast addresses
This is not an official feature of the networking stacks and does not
work portably across operating systems. So just stop trying to do that.

This was failing reliably (not flaky!) with IPv6 on FreeBSD and
Windows. For IPv4, Windows apparently accepts 239.255.0.0/16 but not
other addresses, so remove IPv4 too.

Change-Id: Ifb5969bf206e4cd7b14efffd14fb682c2839e95d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2017-12-24 02:04:44 +00:00
Thiago Macieira
b12db22fcf Replace a few hardcoded paths with defaults from paths.h
This removes at least one special-case we had to have, in Android's lack
of /etc/mnttab. Bionic's _PATH_MOUNTED is already /proc/mounts.

Change-Id: I9407dcf22de6407c83b5fffd14fedc638586d0f9
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-12-24 02:04:12 +00:00
Thiago Macieira
f95d64d075 Doc: attempt to fix some qdoc errors for QRandomGenerator
This fixes only those that look fixable. There are a number of errors in
the online documentation that look like qdoc tool bugs, like missing
functions (operator==) and documentation text that does not exist in the
source code. This fixes:

 - QRandomGenerator(System) constructor showing up
 - Links for C++ reference documentation not showing up as links

Change-Id: I9e2892cb6c374e93bcb7fffd14fe21db5a6969d9
Reviewed-by: Martin Smith <martin.smith@qt.io>
2017-12-24 02:04:10 +00:00
Thiago Macieira
f9c07da7b6 Examples: Update multicast sender and receiver examples for IPv6
It's the right thing to do, as we're in 2017, not 1997. Also, this takes
care to indicate that QAbstractSocket::MulticastTtlOption makes sense
mostly for IPv4, even though it's implemented for both families. In
IPv4, it's used to indicatae the scope, whereas in IPv6 it's stored in
bits 12-15 of the address.

Task-number: QTBUG-46046
Change-Id: I9741f017961b410c910dfffd14ffaabe0a2024d8
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-12-24 02:04:07 +00:00
Christian Ehrlicher
a02b371eb2 QHeaderView: properly connect rows/columnsMoved
QHeaderViewPrivate reimplemented _q_layoutChanged() to handle changes
of rows/columns via layoutChanged/layoutAboutToBeChanged. This worked
fine for Qt4 but since Qt5 only the special signals rowsAboutToBeMoved/
rowsMoved are used for this (8021e2d5e7).
With this change, QAbstractItemViewPrivate::_q_rows/columnsMoved() is
calling the virtual function _q_layoutChanged(). This resulted in a
wrong call of QHP::_q_layoutChanged() for a horizontal header when
a row changed and for a vertical header during a column change. In the
end this can lead to an unhide of hidden sections.

Task-number: QTBUG-54610
Change-Id: Ide4bfc5b24a97746fd1e5af82d3ba08257149157
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-12-22 16:17:56 +00:00
Tor Arne Vestbø
44ef95a885 iOS: Don't send all touch events async
Commit 77942a1bdf introduced the QScopedValueRollback, but without
assigning it to a local temporary, so the value was rolled back
immediately, resulting in always sending touch events async.

Change-Id: Ic7f65c3d38c46813ff06694e883dae3df138b9d4
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-12-22 11:13:21 +00:00
Eskil Abrahamsen Blomfeldt
67b1fa48be Update font when text format's letter spacing type is changed
The QTextFormat::FontLetterSpacingType property was added outside
the span of the FirstFontProperty and LastFontProperty, so
the fontDirty flag would not be set when it was changed. There is
no binary compatible way to fix this before Qt 6, so for now, we
add a special case for it.

[ChangeLog][QtGui][Text] Fixed an issue where changing the letter
spacing type of a QTextCharFormat would not cause its font to
update.

Task-number: QTBUG-65345
Change-Id: I5ab53d7f82d529b57edceacfc3fa688c6741cd17
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: C. Boemann <cbo@boemann.dk>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-12-22 05:37:55 +00:00
Gabriel de Dietrich
c5a3022b04 QMacStyle: Minimize size of scrollbar transparency layer
Instead of allocating the full backing store size for
the transparency layer, we make sure we only allocate
exactly as much as needed by the scrollbar.

Change-Id: I55c3172fe3dd2a1f3fd46828463497f9f35cb1ae
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-12-21 20:53:23 +00:00
Gabriel de Dietrich
e3c79b4356 QMacStyle: Use light color on expanding scrollbar
Change-Id: I4e9c870c8acaaa690f530f847c9927d61a508a94
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-12-21 20:53:20 +00:00
Gabriel de Dietrich
117148c381 QMacStyle: Bring back submenu indicator
This one fell off the truck while we were removing
HITheme calls. We add it back by simply rendering a
BLACK RIGHT-POINTING TRIANGLE character.

We also fix smaller issues, such as not displaying
any shortcut related to a submenu action — this is
simply not a thing. The spacing between the menu
item's text and the submenu indicator has also been
slightly improved.

Change-Id: I6c768a5506a5eb9528b0dd76acd52b561266d67b
Task-number: QTBUG-64405
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-12-21 20:53:17 +00:00
Ulf Hermann
ca47afbfaa Fix build with -no-feature-regularexpression
The thing we are looking for in qstandardpaths_unix.cpp is
regularexpression, not QT_BOOTSTRAPPED.

Change-Id: I37eb0cdd8a52b0adfd69f592b84659e8807e35ad
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-12-21 18:23:17 +00:00
Ulf Hermann
74027e7f99 Fix build with -no-feature-network
The vnc and tuiotouch plugins depend on network support. The tuiotouch
plugin furthermore depends on a specific feature from network.

Change-Id: I3bc1f7b1dcf3437c6ed0d41cc9e282114a95a39c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-12-21 18:19:55 +00:00
Thiago Macieira
aad0c8dda1 Fix build with ICC: it miscompiles the F16C intrinsics
By not actually making them intrinsic, leading to linker errors:

 /home/qt/work/qt/qtbase/src/corelib/global/qfloat16_f16c.c:61: undefined reference to `_mm256_cvtps_ph'
 /home/qt/work/qt/qtbase/src/corelib/global/qfloat16_f16c.c:76: undefined reference to `_mm256_cvtph_ps'

I had the workaround applied, but only for "intel_icl", the qmake config
for the Intel compiler compatible with MS cl.exe options. The one for
compatibility with Unix cc (intel_icc) was missing.

Task-number: QTBUG-65367
Change-Id: I39332e0a867442d58082fffd15020e4838b6a01d
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-12-21 15:51:08 +00:00
Friedemann Kleint
309169afd9 QScroller: Fix deprecation warning about QDdesktopWidget:::primaryScreen()
In file included from ..\..\include\QtWidgets/qdesktopwidget.h:1:0,
                 from kernel\qt_widgets_pch.h:71:
..\..\include\QtWidgets/../../src/widgets/kernel/qdesktopwidget.h:71:65: note: declared here
     QT_DEPRECATED_X("Use QGuiApplication::primaryScreen()") int primaryScreen() const;

Use QScreen directly and remove the then unused function realDpi().

Change-Id: I526adb09ba35ed0699338d6a8d044c2ff9a03a1e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-12-21 15:49:44 +00:00
Timur Pocheptsov
54519d7327 Fix signed/unsigned comparison
It breaks a build if warnings are treated as errors.

Task-number: QTBUG-65357
Change-Id: I42d5cbdbd90f831662a6decaebecebef5005e735
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
2017-12-21 15:46:05 +00:00
Dyami Caliri
ffc8409aa5 Use AccessCheck for current user effective file permissions
On Windows, QFileInfo.isWritable() was returning true in situations
where the file would only be writable with elevated privileges. Using
AccessCheck instead of GetEffectiveRightsFromAcl to get the correct
results.

Done-with: Friedemann Kleint <Friedemann.Kleint@qt.io>
Done-with: Edward Welbourne <edward.welbourne@qt.io>
Task-number: QTBUG-30148
Change-Id: I7a3468ac069bf782ca312078e3a84107b6cd468c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-12-21 15:45:34 +00:00