Commit Graph

9144 Commits

Author SHA1 Message Date
Timur Pocheptsov
a90a238b49 tst_qsslsocket - blacklist several test temporarily
For some reason behavior of SecureTransport has changed from 10.12 to 10.13
and then to 10.14. On 10.13 SecureTransport fails upon receiving the server's
certificate with 'Unrecoverable error', before we can do a manual verification
and accept the certificate as trusted. Analysis of available source code
shows that they, apparently, do not like MD5 hash which our server is using.
Until certificate is updated on the server or we switch completely to
the Docker-based solution we have to BLACKLIST tests that connect to our
current network test-server. Oddly enough, on 10.14 SecureTransport is
less mean.

Task-number: QTBUG-69873
Change-Id: I7da1883e0970a2f6ddd8385f193b76116d6983e0
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-01-24 20:38:14 +00:00
Qt Forward Merge Bot
e3da05f39a Merge remote-tracking branch 'origin/5.12.1' into 5.12
Change-Id: Icebd151eae0cf9d400319a42573290d1a911ce26
2019-01-23 10:13:29 +01:00
Allan Sandfeld Jensen
e823c351c6 Fix resolve() on fonts returned from QWidget::font()
Set the inherited properties as resolved on the font, so non-default
values are passed on in contexts that does resolve logic like QPainter.

One test is updated as it actually tests what it is supposed to on
more configurations.

Fixes: QTBUG-39560
Change-Id: Ief668e992ccdc091337a259a4c1306a00e67c73f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-01-22 18:43:18 +00:00
Friedemann Kleint
9822d57d85 Stabilize tst_QItemDelegate::dateTimeEditor()
Add qWaitForWindowExposed() for the toplevel and use QTRY_VERIFY()
for finding the delegates consistently.

Change-Id: I430088a91b5cc1a8f856d0a58aba066b1baf179b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-01-22 12:33:01 +00:00
Christian Ehrlicher
9f8589befe tst_QString: fix localeAwareCompare() when using ICU
tst_QString::localeAwareCompare() is failing since
ab448f731e because the 'C' locale no
longer initializes ICU and falls back to simple QString comparison.
Fix it by explicitly setting the locale for the testdata to en_US so the
QCollator is properly initialized.

Task-number: QTBUG-73116
Change-Id: I9d4d55e666c5c52f93298dedb7e22da01a25318d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 9d2923c1b0)
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2019-01-21 16:47:32 +00:00
Christian Ehrlicher
024daeb08c tst_QGraphicsItem: stabilize cursor() test
The cursor test sometimes fails due to the fact that the topLevel widget
has not yet reached it's fullscreen geometry. This means the
QGraphicsView is to small and the test will fail.
Avoid it by simply removing the topLevel widget since it's not used at
all.

Change-Id: Ia7b34f283a917a35b6665e6333a01378575a5a04
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-01-22 17:00:34 +00:00
Edward Welbourne
76dfda1ad1 Use RAII to handle setting of default locale in tst_QString
Various tests were setting the default locale and relying on cleanup()
to "restore" the C locale; which needn't actually be the locale we
started out in and, in any case, was the wrong locale for some tests.
So handle this via an RAII class that records the actual prior locale
and restores it on destruction.

Fixes: QTBUG-73116
Change-Id: If44f7cb8c6e0ce81be396ac1ea8bab7038a86729
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-01-22 16:42:29 +00:00
Christian Ehrlicher
b1092a7d42 tst_QPrinter: stabilize qprinter test
The CreationDate entry in the two PDF files can potentially
be different depending on when the test is run.
97b4c5a574 already accounts for it but
the current tag for creation date is '/CreationDate'. Therefore check
if the line contains 'CreationDate' instead.

Change-Id: I1fc069cf935bba07084ac4a0743ff05312374d10
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-01-20 13:39:54 +00:00
Christian Ehrlicher
9d2923c1b0 tst_QString: fix localeAwareCompare() when using ICU
tst_QString::localeAwareCompare() is failing since
ab448f731e because the 'C' locale no
longer initializes ICU and falls back to simple QString comparison.
Fix it by explicitly setting the locale for the testdata to en_US so the
QCollator is properly initialized.

Task-number: QTBUG-73116
Change-Id: I9d4d55e666c5c52f93298dedb7e22da01a25318d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-01-20 13:39:45 +00:00
Edward Welbourne
a53500f5bf Eliminate some stray misleading paths from expected output files
The output files for the tuplediagnostics selftest of testlib had a
stray non-canoical path fragment in them; so replaced with its
canonical form.

Change-Id: Ib421380036c3fb1b91447eb8c87be4ad0dfe5c96
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2019-01-16 18:47:41 +00:00
Mårten Nordheim
8e500e15fa tst_qsyntaxhighlighter: fix no-op QTRY_VERIFY check
The bool is assigned on the previous line: QTRY_VERIFY will not do
anything because the statement is already true.

Change-Id: I067290e19ffd100819b2b631af431c6013623a00
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2019-01-16 14:23:42 +00:00
Mårten Nordheim
f8f0f3eef1 QSyntaxHighlighter: cancel delayed highlight if done manually
It was an implicit effect before which stopped working after
dec7961709. Reintroduce it as some
projects used this side-effect as a way to abort the initial
highlighting.

Change-Id: I5340ee9882a242bc8b5f7f843f1cfe793a65d357
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2019-01-16 14:23:37 +00:00
Oswald Buddenhagen
c365fa49d8 fix out-of-bounds access on trailing percent sign in tr() argument
tr() recognizes %n and %Ln. it offers no way to escape lone percent
signs, which implies that they must be interpreted verbatim, which is
what the code actually does. except that it would run off the end if the
% appeared at the end of the string.

Fixes: QTBUG-57171
Done-with: Mateusz Starzycki <mstarzycki@gmail.com>
Change-Id: Icf81925c482be1ea66ec8daafb3e92ad17ea7fab
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2019-01-14 08:52:15 +00:00
Edward Welbourne
dd5e7f1a52 Use a more robust test for absolute paths in QDir
Its filePath() and absoluteFilePath() don't trust its own
isAbsolute(), due to some infelicities on MS-Win; and kludged round a
consequent problem with resource paths; but other virtual file systems
weren't catered for.  Replace the convoluted test there with a static
bool function (so that future kludges in this area shall only need to
edit one place; and can document why they're needed) and use a more
robust test that handles all virtual file systems (by asking
QFileInfo) but falls back to QFileSystemEntry to work round the known
infelicities on MS-Win.  Add regression test for asset library paths
issue on iOS.  Ammends 27f1f84c1c.

Moved a couple of local variables to after the early return, since it
doesn't need them, in the process.

Task-number: QTBUG-70237
Change-Id: Ib3954826df40ccf816beebe5c3751497e3bf6433
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2019-01-13 18:18:10 +00:00
Tor Arne Vestbø
68511d41d5 qWaitFor: Prevent being stuck in QCoreApplication::processEvents
When using the overload of QCoreApplication::processEvents that takes a
maxtime argument, the function will keep processing events until there
are no more events, or until it times out.

The problem is that the function doesn't distinguish between events that
were on the event queue when the function was called, and events generated
by processing events as part of its own execution. If for example a widget
calls update() in its paintEvent, the function will spin for the entire
duration of maxtime.

That doesn't work for qWaitFor, where we need to check the predicate
between each pass, so we use the overload of processEvents that doesn't
take a maxtime. That's fine, as we have our own timeout logic.

Change-Id: I9738d7d0187c36d4a5ddfcd3fd075b0bd84583c4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-01-09 18:10:54 +00:00
Tony Sarajärvi
8b1a23ed32 Blacklist a flaky qtableview function in WinRT
Task-number: QTBUG-72853
Change-Id: Iaf2b25712b571a3ce73387cb3d2e70d427808364
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-01-08 11:58:41 +00:00
Liang Qi
0e96b5fe48 Merge remote-tracking branch 'origin/5.12' into 5.12.1
Conflicts:
	src/widgets/kernel/qtooltip.cpp

Change-Id: Ic2f9a425359050eb56b3a4e5162cf5e3447058c8
2019-01-08 09:34:24 +01:00
Christian Ehrlicher
52e0d9e23c Drag'n'Drop: fix dnd when dragMoveEvent() is not implemented
The refactoring of dnd with f8944a7f07
added a regression which results in a need to reimplement
dragMoveEvent() on the drop side. Before this change it was possible to
accept the dnd in dragEnterEvent() without again accepting it in
dragMoveEvent().
Fix it in a similar way it's done in
QGuiApplicationPrivate::processDrag() by prefilling the first simulated
QDragMoveEvent with the values from the previous QDragEnterEvent before
it is sent to the drop receiver.

Fixes: QTBUG-72844
Change-Id: I1300dd02b7f1d9dcd44ecefa8335f92ad6c6cafa
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2019-01-07 10:50:18 +00:00
Jędrzej Nowacki
ecdccce8e4 Fix warnings about uninitialized variables
qtbase/src/corelib/kernel/qmetatype.cpp: In static member function ‘static void QMetaType::destroy(int, void*)’:
qtbase/src/corelib/kernel/qmetatype.cpp:2599:27: error: ‘info.QMetaType::m_destructor’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
     if (m_typedDestructor && !m_destructor)
         ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
qtbase/src/corelib/kernel/qmetatype.cpp:1868:15: note: ‘info.QMetaType::m_destructor’ was declared here
     QMetaType info(type);
               ^~~~
qtbase/src/corelib/kernel/qmetatype.cpp:2600:26: error: ‘info.QMetaType::m_typedDestructor’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
         m_typedDestructor(m_typeId, data);
         ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
qtbase/src/corelib/kernel/qmetatype.cpp:1868:15: note: ‘info.QMetaType::m_typedDestructor’ was declared here
     QMetaType info(type);
               ^~~~

The extended (not inlined) function may be called on a half
initialized invalid instance.

Change-Id: I26d677a8ad2bd0c5846233f06393e774d377936d
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-01-06 10:14:36 +00:00
Oswald Buddenhagen
f89ac0101a qmake: add $$read_registry() function
Change-Id: I7f9f17e0f44c273e4754d1decc92a8594cad8658
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-01-05 20:33:07 +00:00
Tony Sarajärvi
8c2ca29045 Revert "Blacklist tst_QTimer::basic_chrono on macOS"
Incorrectly blacklisted.

This reverts commit 40a7c57ba9.

Task-number: QTBUG-61013
Change-Id: I7d9dc4a4b1c8d7ff77ab75c61027b908ffb74552
Reviewed-by: Liang Qi <liang.qi@qt.io>
2019-01-04 09:45:41 +00:00
Vitaly Fanaskov
f7dc6042cb Remove dead code
Task-number: QTBUG-44131
Change-Id: Ic092f2be5855840d6467560159c12f3c5aa36344
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-01-04 09:42:14 +00:00
Vitaly Fanaskov
d8bbb5ee0e Respect roles of buttons added to QMessageBox
When a button added to QMessageBox has AcceptRole or YesRole, the signal
accepted() will be emitted upon click on the button. If the button has
RejectRole or NoRole, the signal rejected() will be emitted upon click
on the button. If a button has a different role, neither accepted() nor
rejected() will be emitted. This works for both standard and custom
buttons.
The signal finished() with result code will be sent regardless of a
clicked button role.
Also added documentation strings for some methods of private classes in
order to have better tooltips in IDE(s).

Task-number: QTBUG-44131
Change-Id: I521a4e5112eb4cf168f6fbb4c002dbe119aeeb09
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-01-03 18:38:12 +00:00
Luca Beldi
ff835a5030 Fix QStringListModel::setData to check for actual changes
QStringListModel::setData documentation states that
"The dataChanged() signal is emitted if the item is changed."
This patch actually respects the doc. setData will check that the data
actually changed before sending the dataChanged signal.

[ChangeLog][QtCore][QStringListModel] setData will now emit the
dataChanged() signal only if the string set is different from
the one already contained in the model

Change-Id: I4308a6f3b4851203fb899c5e29a36076e0c32f2f
Reviewed-by: David Faure <david.faure@kdab.com>
2018-12-24 08:07:36 +00:00
Tor Arne Vestbø
3306b16239 macOS: Only do gamma-corrected blending for subpixel-antialiased text
The grayscale font-smoothing doesn't expect to be linearly blended,
as first assumed.

Amended nativetext manual test to better diagnose the native Core
Text behavior. Non-linear blending will result in the magenta
text having a dark outline against the green background.

Change-Id: I24a5f04eb1bd66fb98d621078d80ee9b80800827
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-12-23 12:00:07 +00:00
Milla Pohjanheimo
4a0ed282cf Add binary compatibility files for 5.12 for QtBase
Binary compatibility files added.

Change-Id: I2543902fb7ac97270db7fb79ae09641898cc8ba4
Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-12-21 19:42:57 +00:00
Eskil Abrahamsen Blomfeldt
e6880e7cd1 Fix text shifting vertically when elided
When eliding text we would check for the existence of the ellipsis
character and fall back to using the dot if it was not available.
However, when font merging was in use, we would also use ellipsis
from a fallback font if available. This could cause the metrics
of the text to increase if the fallback font had larger metrics,
and the result was that text could shift when elided.

It is better to prefer the dot from the current font than to use
the ellipsis from a fallback, so we only use the ellipsis if
it is in the main font.

[ChangeLog][QtGui][Text] Fixed a bug where eliding text could
change the height of its bounding rectangle for certain fonts.

Fixes: QTBUG-72553
Change-Id: Ib27fc65302465ddce661801bcc5ae32e55f1aeb9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-12-21 10:27:12 +00:00
Christian Ehrlicher
7863be3115 QTableView: Fix keyboard navigation with disabled rows
The keyboard navigation with MovePageUp/Down and MoveEnd did not honor
disabled cells in all cases which lead to inconsistencies in the
navigation (esp. since MoveHome does honor them correctly).
Therefore make sure that all four move operations work consistent by
refactoring the code to use common functions.

Fixes: QTBUG-72400
Change-Id: I63fa3b626510d21c66f4f9b2b1bfb3261728ecaf
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-12-18 05:33:52 +00:00
Tor Arne Vestbø
1f30434356 nativewindow: Add additional test for 8pt font size
Change-Id: I5012eb6ffee8f81da61a6fe611352ee5900a5eee
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-12-16 15:02:19 +00:00
Samuel Gaist
a5eabac96d moc: add support for C++11 enum struct
C++11 added the new enum class key as well as enum struct. While the
former is likely the most known and used, the later can be used in the
same contexts and with the same effects.

Currently moc doesn't parse enum struct while it does for enum class.
This patch fixes this.

[ChangeLog][moc] moc now parses enum struct the same way as enum class
therefore that keyword can be used with the Q_ENUM macro as well as
Q_FLAG and Q_DECLARE_FLAGS.

Change-Id: Iaac3814ad63a15ee4d91b281d451e786b510449c
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-12-15 13:24:29 +00:00
Samuel Gaist
649ee12aba QRegularExpression: anchor wildcard pattern
The current implementation of wildcardToRegularExpression doesn't
anchor the pattern which makes it not narrow enough for globbing
patterns. This patch fixes that by applying anchoredPattern before
returning the wildcard pattern.

[ChangeLog][QtCore][QRegularExpression] The wildcardToRegularExpression
method now returns a properly anchored pattern.

Change-Id: I7bee73389d408cf42499652e4fb854517a8125b5
Fixes: QTBUG-72539
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-12-15 13:24:16 +00:00
Mitch Curtis
32fd79a20f QAbstractSlider: fix invertedControls having no effect for left/right keys
There was a comment in the code that said:

// It seems we need to use invertedAppearance for Left and right, otherwise, things look weird.

It's not clear what that was referring to, but in its current state,
a slider with invertedControls set to true will not behave as expected:
pressing the left arrow key will decrease its value instead of increasing it,
and vice versa for the right arrow key.

As stated in the documentation (and by its name), invertedAppearance only
controls the appearance of the slider, and not the effect of key events.

Remove the comment and use invertedControls instead.

Change-Id: I13296cbda9244413978ef0d7f0856065f74fd0bf
Fixes: QTBUG-25988
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-12-13 10:46:22 +00:00
Mitch Curtis
35602d75d3 Refactor tst_QAbstractSlider::keyPressed()
Don't do several tests at once in the test function. Instead, move
the extra tests to the data function. This makes it possible to easily
add a self-contained test (i.e row) for an upcoming fix.

Task-number: QTBUG-25988
Change-Id: I65c8d7620f01107f8f59c96896b1a641d97f5fdc
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-12-13 10:46:18 +00:00
Joni Poikelin
eaf4438b35 Make url normalization closer to common browser behavior
Firefox, Chrome and various http libraries normalize /./ and /../ from
urls, but retain multiple adjacent slashes as is. Qt removes
duplicated slashes which makes it impossible to access some web
resources that rely on those.

Fixes: QTBUG-71973
Change-Id: Ie18ae6ad3264acb252fcd87a754726a8c546e5ec
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-12-13 05:23:12 +00:00
Friedemann Kleint
d1cafa3eba qt_imageFromWinHBITMAP(): Fix memory corruption when converting from bitmaps with low depths
Insufficient memory was allocated when asking GetDIBits() to convert to 32bit.
Fix allocation size and use a QScopedArrayPointer.

Fixes: QTBUG-72343
Change-Id: I45f79c913a243316e01bc6efed08e50ccc7d25f4
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-12-12 16:08:10 +00:00
Vitaly Fanaskov
ceebad9bd2 tst_QMessageBox: Modernize and simplify code
Changed 0 to nullptr, used more C++-style casts, simplified some
code for searching a button, and changed foreach to range-based for
loop.

Task-number: QTBUG-44131
Change-Id: I211b12751b0e2591d1d14294c31b51d52bb4e3f6
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2018-12-12 13:58:16 +00:00
Tor Arne Vestbø
f10b980840 nativetext: Fix baseline positioning for CoreText
The Qt and CoreText positioning is now in sync.

Change-Id: I0cbb5b150d1bef732674b8d42c64a040773a62ab
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-12-11 23:41:47 +00:00
Edward Welbourne
ab448f731e Handle QCollator with locale C by delegating to QString
Previously, the C locale was treated as English because each back-end
takes the locale's bcp47Name(), which maps C to en. However, the C
locale has its own rules; which QString helpfully implements; so we
can delegate to it in this case. Extended this to sort keys, where
possible. Clean up existing implementations in the process.

Extended tst_QCollator::compare() with some cases to check this. That
required wrapping the test's calls to collator.compare() in a sign
canonicalizer, since it can return any -ve for < or +ve for >, not
just -1 and +1 for these cases (and it'd be rash to hard-code specific
negative and positive values, as they may vary between backends).

[ChangeLog][QtCore][QCollator] Added support for collation in the C
locale, albeit this is only well-defined for ASCII. Collation sort
keys remain unsupported on Darwin.

Fixes: QTBUG-58621
Change-Id: I327010d90f09bd1b1816f5590cb124e3d423e61d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-12-11 19:05:07 +00:00
Allan Sandfeld Jensen
9fbce8d5cb Avoid crash in blitting or fast draw when QPointF is too big
Change-Id: I88182d5d95fda15d33836f16dee78167685b3765
Fixes: QTBUG-72392
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-12-11 18:32:53 +00:00
Tor Arne Vestbø
e12aad05f0 Add manual test case for verifying our text rendering
Allows comparing Qt's text rendering to the native rendering.

Change-Id: I56f015fb64df3f70c33db58891876c325cbbc55d
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-12-08 15:27:06 +00:00
Shawn Rutledge
c4ee125891 Set QScroller's parent to its widget, for memory management
If the widget to which the scroller was assigned is deleted, the
QScroller ought to be deleted too, to avoid filtering events and then
following a dangling pointer while trying to react.

Fixes: QTBUG-71232
Change-Id: I62680df8d84fb630df1bd8c482df099989457542
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
2018-12-08 07:18:15 +00:00
Thiago Macieira
962bded90f Fix QSettings parsing of spaces after comment lines
[ChangeLog][QtCore][QSettings] Fixed QSettings parsing of blank spaces
after comment lines in INI-style configuration files.

Fixes: QTBUG-72007
Change-Id: Idd0c85a4e7b64f9c9c7dfffd156c5b219f3b5c0a
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2018-12-07 18:53:34 +00:00
Edward Welbourne
4ee59cf96d Remove one out-of-date comment, refine another that was imprecise
The former is a follow-up to c17563eca8.

Change-Id: I3cd41e6e38f740de67605f785a804ffd879b9e67
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-12-07 15:59:38 +00:00
Lars Knoll
c4daa2b527 Fix compilation
::link() is defined in unistd.h, so include it.

Change-Id: I58e99dbcdd64da6388f85d98e73e7d1bd56f4e37
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-12-03 07:53:00 +00:00
Lars Knoll
86aabb500c Add lancelot tests to verify vertical alignment of inline images
Adds a test case for 199f9c5448.

Task-number: QTBUG-59310
Change-Id: Iee26f8bc21884da36471935f64524b62c3f79ff4
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-12-03 07:52:55 +00:00
Mårten Nordheim
17ced070fd Read font selection flags and use them when querying for metrics
Certain fonts with multiple styles have the same family name. When
loading these as application fonts we were not specific enough when
querying for the text metrics. This meant that e.g. the bold version in
a font family would get the metrics of the regular one.

Fixes: QTBUG-67273
Change-Id: Ic988d62cddde0a1f77ddcaf2891cadc21c9b31e6
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-11-30 16:15:03 +00:00
Ville Voutilainen
c0dd445564 Fix a nullptr compile error with gcc 4.8
template argument deduction/substitution failed:
qtbase/tests/auto/corelib/kernel/qobject/tst_qobject.cpp:6756:71: note:   mismatched types ‘const typename QtPrivate::FunctionPointer<Func2>::Object*’ and ‘std::nullptr_t’

Change-Id: I8e7872457d1fc30c4b29e96c16091915264f9bce
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-30 14:50:00 +00:00
Ulf Hermann
042707a633 Avoid invalid qmake code in macOS-specific pluginloader test
You cannot manipulate variables in custom target dependencies, so the
following code was invalid:

i386_d.depends = EXPORT_VALID_ARCHS=i386

In order to still build the fat binary, we split the project in four,
one for each architecture, plus one to create the final package.

Change-Id: If08cf54e2e4098a7e10df41b7ea8d2bf699f58be
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-11-30 14:47:29 +00:00
Richard Moe Gustavsen
f1812aad89 QFocusFrame: protect it from being moved around by accident
If a focus frame is set around a widget that exist inside a
QAbstractItemView, both the focus frame and the widget will
be scrolled when the table is scrolled (since the focus frame
is a child of the view). The result is that after the widget
has been scrolled (which will move the focus frame to the
correct position as well), the focus frame will be scrolled
next, and therefore away from the widget.

This patch will catch this case by always adjusting the
focus frame position when someone tries to move it. Trying
to move the focus frame away from the widget it tracks
will anyway be flaky.

Fixes: QTBUG-63877
Change-Id: Ic2aacc4fafc219280e32092c258a7539d0db9cd0
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-11-27 14:59:52 +00:00
Shawn Rutledge
a5e32f9375 Re-enable the QScroller tests on macOS
Maybe they aren't flaky anymore... let's find out.

Task-number: QTBUG-29950
Task-number: QTBUG-30133
Change-Id: I1a2a3ef7facac5b6e59588d7c6b1b28b40a788ea
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-11-27 14:57:35 +00:00