Commit Graph

34858 Commits

Author SHA1 Message Date
Martin Smith
d893ccf6cd doc: Add missing template clauses in qvulkaninstance.cpp
Added a few missing template clauses to member functions
of QVulkanInstance<T>.

Change-Id: Ie13f7e97f6a2183ee66d7ea275bc56a2bc3588e8
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-12 18:18:51 +00:00
Martin Smith
3e0d24ded3 doc: Add missing template clauses in qmatrix4x4.cpp
Added a few missing template clauses to member functions
and friends.

Change-Id: Ie5ca557ddcc1dfd90ef5e80fc4e8213dfb32a03c
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-12 18:18:42 +00:00
Martin Smith
a0eb5c3b32 doc: Add missing class qualifiers to uses of FormatRange
struct FormatRange is contained in QTextLayout, so uses of it as
parameters in friend functions of struct FormatRange must be
qualified with QTextLayout::

Change-Id: I6d3ad3020240bff3b948fb571971694b44708c54
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-12 18:18:32 +00:00
Martin Smith
b290b3336e doc: Add missing class qualifiers to uses of Tab
Tab is contained in QTextOption, so it needs that class qualifier.
Also removed a useless qdoc comment.

Change-Id: Ic37f0fc8cb97c2b022f69293e8fd50f0a5a2b649
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-12 18:18:22 +00:00
Martin Smith
0b637760a5 doc: Add missing class qualifier to \fn for constructor
A class qualifier was missing in a \fn command.

Change-Id: I0bb34912c0b33a3c615a6e9aef68e7e0cd28d037
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-12 18:18:09 +00:00
Martin Smith
64c0bff69a doc: Add QTouchEvent qualifier to uses of QTouchPoint
QTouchPoint is declared inside QTouchEvent, so \fn commands
for functions in QTouchPoint must use QTouchEvent::QTouchPoint::
as the qualifier.

Change-Id: I1dffe9f43f9f8bddbaa8fab9f77cf17802cf8b26
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-12 18:17:54 +00:00
Andre Somers
abbd26f553 Add QModelIndex::siblingAtColumn and ::siblingAtRow
Data in item models is most often organized in rows, where each column
contains an attribute of the item represented by the row. Often when
sibling is used, it is to request another piece of data from the same
row. Having a specialized version makes this easier and less awkward
to do, simplifying

auto sibling = index.sibling(index.row(), columnOfInterest);

to

auto sibling = index.siblingAtColumn(columnOfInterest);

For symmetry reasons, siblingAtRow(rowOfInterest) was also added.

Change-Id: Ib203b2cdb16154cbb2680d16fb5c6a7538f33d07
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
2018-01-12 15:12:53 +00:00
Martin Smith
7157d04d6e doc: Add missing template clause in \fn command
The template clause was missing in the \fn command for
a member function of a template class.

Change-Id: Ie1a8f8372d3183f05f02e518b363a7bac735abbb
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-12 14:49:42 +00:00
Martin Smith
56385f0f3d doc: Add missing class qualifier in \fn command
The class qualifier was missing in the \fn command for
the move copy constructor.

Change-Id: Ia3633efde155ed19ac8460d760a5248e52097ea1
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-12 14:49:25 +00:00
Martin Smith
a61c6a7a2e doc: Add template clauses in qhostinfo.cpp
A few \fn commands were missing the template clause now
required by clang-qdoc. This update adds the template
clauses. It also changes an instance of Q_QDOC to
Q_CLANG_QDOC.

Change-Id: I2850d43d98debb80e01c36a524e0c00651a89298
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-12 14:49:10 +00:00
Albert Astals Cid
c45947aeef CUPS: Don't show choices that conflict with the printer installed options
Some options only make sense if the printer has installed some extensions, e.g.
we should not shown "Staple" options if the Stapler addon is not installed,
so with this change we use ppdInstallableConflict to know whether an option
should be shown to the user or not.

Change-Id: I5733e1ac8b667c26b292aeafc90a10c155b751a4
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-01-12 12:04:51 +00:00
Albert Astals Cid
e35878bf57 CUPS: Rework set/clearCupsOption API
Previously it was a bit awkward to use, you had to do
    QStringList cupsOptions = QCUPSSupport::cupsOptionsList(printer);
    QCUPSSupport::setCupsOption(cupsOptions, option, value);
    QCUPSSupport::setCupsOptions(printer, cupsOptions);
now you simply have to do
    QCUPSSupport::setCupsOption(printer, option, value);

Change-Id: Id31583f1ec72644791d82776debbae5583a2be54
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-01-12 12:04:46 +00:00
Albert Astals Cid
608301d4c8 CUPS: Enable printing arbitrary pages and page ranges
Task-number: QTBUG-1311
Change-Id: I8e09def0e0d8c1404d3ee86845d98a30c23b6485
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-01-12 12:04:42 +00:00
Albert Astals Cid
bf59032d70 cups: Don't show InstallableOptions in the advanced properties
According to CUPS maintainer it is recommended to not show them[1].
GTK and Libreoffice behave like that.

[1] https://lists.cups.org/pipermail/cups/2015-September/027124.html

Change-Id: I82614003490554d41e38a125d44e3a599c2e7342
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-01-12 12:04:41 +00:00
Albert Astals Cid
d94ccf310a Unix: Fix usability of the print properties dialog
Previous behavior:
 * Open, change setting, cancel, open again, setting was as originally (i.e. unchanged)
 * Open, change setting, accept, open, change setting, cancel, open again, the setting would be as before pressing cancel
 * Open, change setting, accept, open, press cancel without changing anything, print, the initially changed setting is not applied

New behavior:
 * Pressing cancel just cancels the changes since you opened the dialog, everything you accepted previously stays correctly selected

Change-Id: I483647504682f26d3d21c5229cc6530bf14fe519
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-01-12 12:04:35 +00:00
Tor Arne Vestbø
114f795221 logging: Break out alternative logging sinks into a well defined API
First steps towards a public API for having multiple output sinks is
to allow this internally.

We give all the different log sinks the same signature, with a bool
return value to signify if stderr has been handled.

The logic of not logging to the alternative sinks when the function
qt_logging_to_console() returns true has been moved into each sink,
so that they in the future may choose to log even when also logging
to the console, allowing multi-sink output. They must then make sure
to return true if the native logging sink has also logged to stderr.

The logic of each sink has been kept the same when it comes to the
formatting of the message. Some of these sinks should ideally use
the raw message instead of the formatted one, as they are structured
logging sinks.

Change-Id: I441d3bc1db3e16180704e00d13a40564b6f06a6c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-01-12 11:50:36 +00:00
Tor Arne Vestbø
84e7b64090 logging: Clarify that QT_MESSAGE_PATTERN only applies to unstructured logging
Structured sinks such as systemd should capture each piece of information
individually, not bake it into the message via the message pattern.

Change-Id: I164c043683f123764a5445dc9faad049e25fd738
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-01-12 11:50:35 +00:00
Mårten Nordheim
b14934547a Use TESTDATA for QSsl* tests
Apparently this (undocumented) TESTDATA feature creates resource files,
but lets you use wildcards as well, which is very handy.

The reason I didn't know/realize this when adapting the tests to use a
".qrc"-file* was because some of the test-cases were using relative
paths instead of the 'testDataDir' variable.

This commit fixes the remaining uses of relative paths, removes a
usage of QDir::setCurrent, and adapts QSslSocket to use TESTDATA.

* in now-reverted commit e1600c1a73

Change-Id: Iee6d88f1e0810eeaadac90e7d44bc6db84bfeabf
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2018-01-12 11:43:55 +00:00
Martin Smith
6b012a30d9 doc: Add template clause to \fn commands in qmenu.cpp
clang-qdoc requires the template clause in \fn commands
for template functions.

Change-Id: I5719f39ebca6064e6480e873a1d4f339f41df436
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-12 11:42:39 +00:00
Martin Smith
b426e00ebf doc: Add template clause to \fn commands in qtoolbar.cpp
clang-qdoc requires the template clause in \fn commands
for template functions.

Change-Id: I838bae74102e99b64f04960ad88f192e45d901ba
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-12 11:42:25 +00:00
Martin Smith
485c21dcc9 doc: Remove <CR> from \fn commands
clang fails for \fn commands that contain CR.

Change-Id: I4ece5110437cf358e408731f93993bf2d9702381
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-12 11:41:51 +00:00
Kai Koehne
42cb74aa81 MinGW: Remove workaround that disabled strict_c++
The workaround was needed in older versions of MinGW-w64 headers that
did disable some common functions for -std=c++1z. Anyhow, this is not
reproducable anymore with any recent MinGW-w64.

Change-Id: I8e34a2e055f8e2356696dd4fe131a757c1527574
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-01-12 11:41:37 +00:00
Liang Qi
c81966c39e Merge "Merge remote-tracking branch 'origin/5.10' into dev" into refs/staging/dev 2018-01-12 08:00:04 +00:00
Martin Smith
e6c089ae28 doc: Remove unneeded \fn commands
Removed unneeded \fn commands from two qdoc comments and
moved one of the comments to the file where its function
definition is located.

Change-Id: I4c4371f0541d2995398b0d32e1df409433061226
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-12 07:20:36 +00:00
Friedemann Kleint
9031069e12 Add more Q_FALLTHROUGH()
Silence g++ 7.X warnings.

Change-Id: Id06d06e7e3b5be2cf3934d81f1891da58dea2649
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-01-12 07:10:25 +00:00
Gabriel de Dietrich
cf7a4016a1 QMacStyle: Draw CE_MenuItem text using AppKit
We seem to induce QCoreTextFontEngine to draw text the
wrong way in non-native QMenu popups. Here, we just
delegate menu items' text rendering to AppKit.

This is only a workaround pending a proper fix or better
understanding of the aforementioned issue.

Change-Id: I71088ebe2a534bebca2ad396b1ea6754be093f55
Task-number: QTBUG-65653
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2018-01-11 23:37:34 +00:00
Liang Qi
f4d8cafc1b Merge remote-tracking branch 'origin/5.10' into dev
Conflicts:
	src/3rdparty/harfbuzz-ng/src/hb-private.hh
	src/sql/doc/snippets/code/doc_src_sql-driver.cpp
	src/sql/doc/src/sql-driver.qdoc

Change-Id: I38f0e82fcd37926cbf3c1915e009a731040d4598
2018-01-11 18:10:41 +01:00
Rainer Keller
b03133231b qtlite: Skip building examples when configured with no-feature-udpsocket
Compiling the default examples should be possible without compile errors.

Task-number: QTBUG-46857
Change-Id: Ie323798df09cdbebc67eb617a7e0ec4c66cb2357
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-01-11 12:37:50 +00:00
Jani Heikkinen
a6514ddd33 Fix license headers
Remove usage of outdated header.LGPL21 and replace those with proper
one (header.LGPL in src, header.GPL-EXCEPT in tests)

Change-Id: Ia4d1c0d84b77f09787fe7c30670747a1fe2aff29
Reviewed-by: Liang Qi <liang.qi@qt.io>
2018-01-11 11:40:36 +00:00
Liang Qi
1759510201 Merge "Merge remote-tracking branch 'origin/5.9' into 5.10" into refs/staging/5.10 2018-01-11 11:40:34 +00:00
Kai Uwe Broulik
e5b422382a QGuiApplication: Add fontChanged signal
This removes the need to install an event filter on qApp just for this.
A similar thing was done with setPalette to reduce the number of event filters
in e.g. SystemPalette and Quick Controls.

[ChangeLog][QtGui][QGuiApplication] Added fontChanged signal

Change-Id: Ifa843aa42b91ac63ab17c3b064ac0e764aac77d3
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2018-01-11 10:25:05 +00:00
Liang Qi
d51dde6c67 Blacklist tst_QNetworkInterface::localAddress(linklocal-ipv4) in ci
To unblock qt5 5.10->dev merge.

Task-number: QTBUG-65667
Change-Id: Iffd3648913efb52ad5be9dc5310a9f836fab3de1
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-01-10 21:26:20 +00:00
Friedemann Kleint
8247ce9766 SQL plugins: Fix warnings about deprecated constructor of QSqlError
Use the constructor taking a string and convert number unless
it is -1.

Change-Id: I18d1ba2c8e0d3f4af01b7955863967f75051746b
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-01-10 21:18:26 +00:00
Alex Trotsenko
344acfb9fe QRingBuffer: replace some checks with asserts
To avoid the silent exits and potentially dangerous output values, the
caller must supply the correct parameters on input.

Change-Id: Ia9c56940adbf4ad34605a002dfc5c86b32c4658c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-01-10 20:21:31 +00:00
Paul Wicking
1623f66989 Doc: Swap unresolved variables with actual function names
Original documentation commit included unresolved link target names.
This fix replaces them with the actual OpenGL function names.

Change-Id: I36a24eb237ef35d7207f3bae0771dc96476d7b19
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-10 14:13:05 +00:00
André Klitzing
e56eb33cf8 Enable brainpool curves in qsslkey tests
Change-Id: Ibdc0a045e0b0469bfb4dc362e3bc3e6b7940d783
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-01-10 13:25:25 +00:00
Rainer Keller
56e00bf6c0 qtlite: Fix compilation of QWidgetLineControl when configured with no-feature-itemviews
Task-number: QTBUG-53141
Change-Id: I00d9d7fc43a4531c9213281f529b2d0f3164a5c6
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-01-10 09:08:01 +00:00
Giuseppe D'Angelo
ff25a7ec05 QAbstractItemModelTester: fix the autotests
Move the modeltest autotest in the right place, and fix the
other autotests that were using it to use the version now in QtTestLib.

Change-Id: Ic6838945f616d580f357c872ce0956c341be3b16
Reviewed-by: David Faure <david.faure@kdab.com>
2018-01-09 21:12:58 +00:00
Liang Qi
9bee6712fc Merge remote-tracking branch 'origin/5.9' into 5.10
Change-Id: I840849c072075a69819eb185b20bc42c3de0f825
2018-01-09 21:27:30 +01:00
Martin Storsjö
74118a4784 moc: Initialize staticMetaObject with the highest user-settable priority
The referenced static meta object for the superclass might be in a
different DLL. In this case, the whole QMetaObject can't be initialized
all via preinitialized data in the data section of the binary, but must
run code at runtime to fill in the value of the dllimported pointer.

In these cases, both GCC and MSVC initialize as much as possible statically,
while only filling in the dllimported values (QMetaObject::d::superdata)
at runtime. Clang, on the other side, initializes the whole struct
at runtime if some part of it needs runtime initialization, leaving
the struct completely uninitialized before constructors are run.

In C++, there are no guarantees for in what order constructors in
different translation units are executed. This in particular means
that there are no guarantees as to whether qRegisterWidgetsVariant()
in qwidgetsvariants.cpp runs before or after the runtime initialization
of QWidget::staticMetaObject.

With GCC and MSVC, this doesn't seem to have mattered since only the
superdata pointer of the staticMetaObject was uninitialized - everything
else was initialized, and the superdata pointer doesn't seem to be
accessed during qRegisterWidgetsVariant.

With clang, the whole staticMetaObject is uninitialized, unless the
staticMetaObject has been initialized before (and the initialization
order is undefined).

By setting a manual priority (which is a GCC extension that also
clang supports) for the staticMetaObjects, we can be sure that
these are initialized before the actual explicit constructor
invocations (without any explicit initialization priority) that
can access the staticMetaObjects.

Change-Id: I64a82f12d690528567509791bae088b6304e189b
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-01-09 18:36:46 +00:00
Christian Ehrlicher
81566ca9aa QHeaderView: fix visualIndexAt() in rtl-mode
QHeaderView::visualIndexAt() did not calculate the correct position in
right-to-left mode. This lead e.g. to missing vertical grid lines in
QTableView/Widget when scrolling horizontally.

Change-Id: Ia50e5cfd7830a6ad8abd17ff79d9fbb33dc4097c
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-01-09 17:54:43 +00:00
Christian Ehrlicher
a40e2c7d98 Avoid useless casts to/from uint
Remove some c-style casts from int to uint which were needed in Qt3 (or
earlier?) but nowadays the values are all int.

Change-Id: Iecd739c450873adf952a17f635d7fb6825537907
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-01-09 17:54:22 +00:00
Joachim Puhr
50deb8cf70 doc: Hints for using SAP HANA database
As the HANA ODBC driver does not provide scrollable
results per default, the connection has to be established
with a specific option.

Change-Id: I14751a94f61d6fffd6d56c39076c24ec4d1f88ef
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Joachim Puhr <jpuhr@gmx.de>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-01-09 16:35:58 +00:00
Giuseppe D'Angelo
b3e4be2d8b Long live QAbstractItemModelTester!
AKA the model tester, living in QtTestLib now.

Underwent some significant refactoring from the original modeltester:
in particular, it will stop testing illegal indices.

[ChangeLog][QtTestLib] Added QAbstractItemModelTester, a class
to help testing item models.

Change-Id: I0e5efed7217330be11465ce3abb3590f3f2601a4
Reviewed-by: David Faure <david.faure@kdab.com>
2018-01-09 15:57:58 +00:00
Alex Trotsenko
2d260eada8 Micro-optimize QRingBuffer::free()
Change the condition to strong equal, as 'bytes' was checked against
wrong value on the start of the function.

Change-Id: I4ec4768b9fff3292af233417c4a5862d72d4eeac
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-01-09 15:52:18 +00:00
Albert Astals Cid
c1aaa13939 Fix custom page size handling in the Unix print dialog
There were several problems that i've fixed in a single commit since they are very interwinded

 * The dialog used QPageSize::Custom for two things, the custom sizes coming from
   the printer and the "user can write whatever size they want" size. Now only
   the printer custom sizes use QPageSize::Custom and we use m_realCustomPageSizeIndex
   for the "user can write whatever size they want" one.

 * The dialog stored the QPageSize id as the combo userData, that doesn't work
   when the printer has multiple custom sizes since they all share QPageSize::Custom
   so now it stores the QPageSize itself

Task-number: QTBUG-58733
Change-Id: Ie640a07bb5e24b753db83c091c836e8af4ff126c
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-01-09 15:42:33 +00:00
Albert Astals Cid
bc632bc2bf QUnixPrintWidgetPrivate::_q_printerChanged: Update state correctly
We need to update the printer output format and the current print device
when changing the printer so that if the user opens the properties dialog
for that printer it reflects correctly the selected printer.

Change-Id: Ib6767a74b74b8eebe43ff17006b6105c483a08b6
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-01-09 15:42:25 +00:00
Renato Araujo Oliveira Filho
f6fd3f18d3 Validate printer duplex mode
Disable unavailable duplex options
Remove redundant option on advanced tab

Change-Id: Ie09c9ffd637b521210e3d7d4f15300792f910996
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
2018-01-09 15:42:17 +00:00
Robert Szefner
ca4a76350a Small optimalization for NULL values
No need to call PQgetvalue() before PQgetisnull().

Change-Id: Ie83ee577b082dbe9d9ca2e86212a281abebdde6e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-01-09 14:13:52 +00:00
Ryan Chu
a5ad605dfe QFtp: only use fall-back password for anonymous access
The code used to fall back to anonymous login independently for username
and password; however, it should only use a fall-back password if the
username is missing or (case-insensitive) "anonymous".  When a
non-anonymous username is given without password, we should simply skip
he PASS message to FTP.

If the FTP server requests a password, in the latter case, QFtp will
signal authenticationRequired; in all cases, if the server rejects the
given credentials, QFtp signals authenticationFailed.  Either way, the
client code can then query the user for credentials as usual.

Task-number: QTBUG-25033
Change-Id: I2a4a3b2725819ab19c8a7e4baa431af539edcd8d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-01-09 13:31:55 +00:00