Commit Graph

32284 Commits

Author SHA1 Message Date
Liang Qi
94c576cf66 Merge remote-tracking branch 'origin/5.8' into 5.9
Change-Id: I3bd83a839b16822035ed56a5cffe77bd6bc3f08d
2017-04-12 20:08:56 +02:00
Simon Hausmann
2ad7f6ddf5 Preserve last modification timestamps of installed files
On non-windows platforms, we use the "-p" parameter of install(1) to
preserve the last modification timestamps of files. On Windows the use
of copy does not preserve them. As a cross-platform solution, this patch
introduces a simple built-in install command in qmake to copy files.

Task-number: QTBUG-59004
Change-Id: I3064d29a2b8c7b009a1efbf8f00b84c079ea5417
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-04-12 15:50:51 +00:00
Friedemann Kleint
11361f903a qsystemtrayicon_win.cpp: Clean obsolete code
No longer dynamically load API that is present on Windows 7.
Increase the WINVER and related defines locally to keep MinGW 5.3
building. Remove all if clauses checking fore Windows Vista and below.

Task-number: QTBUG-51673
Change-Id: I0feedb95537aea2453d48ef784f7852c4e33347f
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2017-04-12 11:53:08 +00:00
Giuseppe D'Angelo
9dff809b45 Array-backed containers: add shrink_to_fit for STL compatibility
Side note: QHash has squeeze(), but there's no shrink_to_fit on
std::unordered_map.

[ChangeLog][QtCore][QByteArray] Added shrink_to_fit().

[ChangeLog][QtCore][QString] Added shrink_to_fit().

[ChangeLog][QtCore][QVarLengthArray] Added shrink_to_fit().

[ChangeLog][QtCore][QVector] Added shrink_to_fit().

Change-Id: Ifd7d28c9bed70727be6308f0191a188201784f61
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-04-12 11:32:18 +00:00
Marc Mutz
58a4f41af2 QDate/Time: add toString(QStringView) overloads
[ChangeLog][QtCore][QDate/QTime/QDateTime] Added toString() overloads
taking the format as a QStringView.

Change-Id: I322fa22e6b13fe8ba4badf0a3133425bd067ef32
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-04-12 11:12:09 +00:00
Marc Mutz
d68c162c1b QLocale: add toString(Q(Date|QTime)+, QStringView format) overloads
While at it, change the interface of qt_repeatCount() to just take
a single QStringView, since QStringView::mid() is so cheap. Add some
\internal docs.

[ChangeLog][QtCore][QLocale] Added toString(QDate/QTime/QDateTime)
overloads taking the format string as a QStringView.

Change-Id: Ic078796677a6db06227c8a3e276dbdb1039ceead
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-04-12 11:12:04 +00:00
Marco Trevisan (Treviño)
b727f11c2e QFontconfigDatabase: properly parse desktop environment variable
$XDG_CURRENT_DESKTOP is defined as a colon-separated list of
desktop strings, thus we can't check for equality, but split it
and check if it contains the desktop environments we care about.

Change-Id: Ia9ab0f28654a3e1a68b918794a079f3974f85642
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
2017-04-12 11:11:32 +00:00
Tor Arne Vestbø
7f29367c09 Prevent QWindow transient parent loop
Clients may wrongly set the transient parent to the window itself,
causing endless loop when e.g. looking for the top level parent.

Change-Id: Ib23cae3a5576320435ae9b76dd618d1e5ae08b5d
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-04-12 10:00:52 +00:00
Sami Nurmenniemi
6e649f9714 Skip testing of QOpenGlConfig on platforms that don't support it
Task-number: QTBUG-59966
Change-Id: If74657d0a0133c67f57bf92ae96d2d868d523f0e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-04-12 08:36:39 +00:00
Sami Nurmenniemi
a890337433 Fix tst_toolsupport on 32-bit arm platform
On 32-bit arm platform, qint64 gets aligned differently than on 32-bit
x86. First difference between the platforms on QFilePrivate member
offset happens in QFileDevicePrivate::cachedSize:
- On 32-bit x86 it's offset is 148 (4-aligned)
- On 32-bit arm it's offset is 152 (8-aligned) and offsets of all the
  remaining members are +4 compared to x86
- On 64-bit architectures the offsets are the same

Change-Id: If110da27ea08504e78b167c0a21599420eaa9630
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-12 08:36:27 +00:00
Friedemann Kleint
59d4cbca0b QWindowsFontEngineDirectWrite: Fix build with MinGW
In member function 'void tn::QWindowsFontEngineDirectWrite::collectMetrics()':
windows\qwindowsfontenginedirectwrite.cpp:361:22: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
     if (table.size() >= advanceWidthMaxLocation + sizeof(quint16)) {
                      ^
Amends 17fc188aec.

Task-number: QTBUG-58954
Change-Id: Ice2ff135d411b55d32290069b3c85ca0b5ea09af
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-04-12 08:32:00 +00:00
Błażej Szczygieł
bdd5a67e65 QtWidgets: Don't open submenus when mouse is moving between actions
Don't set the current action during closing submenu when mouse moved
more than one action in the menu to the top or to the bottom.

Task-number: QTBUG-53215
Change-Id: I2383363bc48f644df046198662dfa4d080fe3f1d
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-04-12 07:29:18 +00:00
Marc Mutz
11ed95ac9c Improve QStringBuilder docs
- Mention you can build QByteArrays, too
- Nicer list of types that can be used, separate for QByteArray and
  QString

Change-Id: Ia91445f0cb4872bab12a55f4812c283e9c38dba4
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-04-12 06:46:12 +00:00
Thiago Macieira
cdc5f47aeb Restore compatibility with Qt 5.7.0 and 5.6.1
QSysInfo::productType() returned "osx" for all versions of macOS, even
10.12. Change 3e2bde3578 was incorrect.

[ChangeLog][Important Behavior Changes] QSysInfo::productType() and
QFileSelector behavior on macOS was restored to match what Qt used to
return in version 5.7.0 and earlier. The behavior found in Qt 5.6.2,
5.7.1 and 5.8.0 is removed.

[ChangeLog][Future Compatibility Notice] The identifiers that
QSysInfo::productType() and QFileSelector will use to identify macOS
systems will change in Qt 6.0 to match the Apple naming guidelines which
will be current then.

Task-number: QTBUG-59849
Change-Id: Ib0e40a7a3ebc44329f23fffd14b2b39392210c4f
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-04-12 05:14:19 +00:00
Thiago Macieira
e45516ea0d QSysInfo: Bring back suppression of ICC warning #1478
Turns out that different versions of ICC use different warning numbers.
The Linux and Windows compilers emit 1786, but the macOS one emits 1478.
Don't ask me why.

Change-Id: I523b0abacd5148b2bf08fffd14b475a4c4d89ba1
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-04-12 03:37:11 +00:00
Thiago Macieira
8ccd38d20d Move Apple-specific -fapplication-extensions option to the mkspec
The Intel compiler does not know about it.

Change-Id: I523b0abacd5148b2bf08fffd14b4748c3b33c8fb
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-04-12 03:37:01 +00:00
Jake Petroules
cd5c8e78c7 QProcess: fix Unix build
This fixes a regression introduced in ff19ebcc

Task-number: QTBUG-60046
Change-Id: I47c357433b25f07011a7a3a64d3150591785b206
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2017-04-11 17:07:19 +00:00
Andy Shaw
1cd8c6f48e Make networkAccessibility() return the actual state of the network
If networkAccessibility() was queried when the networkAccessibleChanged
signal was emitted then it would report the wrong state and in some
instances it would incorrectly report NotAccessible. This ensures that
it is reflecting what the signal would have been emitted with.

Change-Id: Ib0a7ef9e9ec42c9007340020fd535c8ad36caa49
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-04-11 16:31:32 +00:00
Marc Mutz
9c243d2637 QByteArray: add missing inline keywords
Inline member functions that are not defined in the class body must be
marked with the inline keyword. Otherwise, MinGW complains about any
use of such functions before they are defined with its infamous error
message:

  'char QByteArray::at(int) const' redeclared without dllimport attribute after being referenced with dll linkage

Fix it for all such functions.

Change-Id: Iae76a7ed18e7b2d5cb5e217e154f647be4a2d9c1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-04-11 14:59:49 +00:00
Giuseppe D'Angelo
7af5a3a39e QRegularExpression: streamline some wording in the documentation
Change-Id: Ic1adbf9358ef6fbdaaee52471cd8ed9ca895a9d0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2017-04-11 14:50:03 +00:00
Nikita Krupenko
34f46588aa Add button layout for dialogs on Android
It used macOS layout before, but it differs from the actual layout in
Android/Material Design: affirmative actions are on the right side,
dismissive actions are directly to the left of the affirmative actions
and neutral actions are on the left side.

[ChangeLog][Platform-specific Changes][Android] Android dialogs now have
more appropriate button layout, with affirmative actions on the right.

Task-number: QTBUG-58060
Change-Id: I0755f80261410c64cf4f854b7f2a72e2d959db28
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2017-04-11 14:39:16 +00:00
Tor Arne Vestbø
f9226217d1 macOS: Prevent leaking font data when creating QRawFont from QByteArrays
CTFontCreateWithGraphicsFont has a bug causing it to never release the
graphics font, which cascades down to the data provider never being
released and releaseFontData never being called.

Instead of relying on a callback to release the byte array font data,
we attach the font data to the engine's lifetime. Note that we are
still leaking the CoreFoundation types.

Change-Id: I6eda4212638ccc9439b90e004222272d204c707a
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-04-11 14:30:26 +00:00
Tor Arne Vestbø
31273f079e macOS: Don't marshal app font data via URL when using FreeType font engine
Font descriptors can have attached attributes of any kind, not just pre-
defined constants like kCTFontURLAttribute. We take advantage of this and
attach the font data that was passed into addApplicationFont() to the
font descriptor, so we can read it out directly when later creating an
engine for it. This removes the need to build up a URL to represent the
font data, which also didn't work for the memory-font use-case. The
FreeType font engine now passes the same tst_QFontDatabase tests on
macOS as the native CoreText font engine.

This also fixes the leak caused by CTFontCreateWithGraphicsFont never
releasing the graphics font, resulting in releaseFontData never being
called:

  http://stackoverflow.com/questions/40805382/

We're now cleaning up the font data in releaseHandle, based on the
attribute set on the font descriptor.

Change-Id: Iba15222ec919f989e29fd98b263d9fb182c4d710
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-04-11 14:30:18 +00:00
Robin Burchell
b018a5ecef QAndroidPlatformScreen: Use an event rather than a QTimer
It looks like the origins of this timer may come from QFbScreen. QFbScreen,
however, changed away from a timer in d7068cbe1b.

There are other reasons to avoid a timer in this case, though: a timer may be
pre-empted by application events (like other timers), which may mean a
significant amount of time could pass between starting the timer and pushing the
contents out to the actual screen (in doRedraw).

This has the effect that flush becomes synchronous, which matches the
behavior of the other platforms as far as I can tell.

Change-Id: Ic67ae6c82945a247dceac44ee1bf7d2940f79d07
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2017-04-11 14:26:16 +00:00
Rolf Eike Beer
6ef07e0902 Qt5DBusMacros: remove intermediate variable
This has been there probably forever, likely from the time when the code
was derived from upstream CMake. Since this is just copying one variable
to another and the latter has a wrong name (_qt4_*) just drop it.

Change-Id: Ica74f3bc9a6b0a6669d80cfc0ebafc003f5b908e
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-04-11 14:07:29 +00:00
Gatis Paeglis
e893e657e5 configure: fix detection of xcb extensions
- Properly detect xcb-render and xkb features.
  a) when -qt-xcb, use bundled versions
  b) when -system-xcb, detect from system

- Be consistent with other features (jpeg, png)
  in "enable"/"disable" field handling.

- And move the "xkb" feature higer up in configure.json.
  It is an X11 extension, so keep them all together (instead
  of grouping it with libxkbcommon).

Task-number: QTBUG-59064
Change-Id: I60f95fb37060b8abde4c611cdef178ba3795982c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-04-11 13:23:15 +00:00
Christian Strømme
9091a058bc Android: Fix application state tracking
- Make sure we don't process state changes before the platform plugin
is completely created and registered.
- Protect shared data with mutexes.
- Don't update the application state from different threads.

This was causing issues when testing run-time permission checks, when
the application quickly switches state due to permission dialog being
shown. In this case the states would be incorrectly delivered when the
application was made active again.

Change-Id: I3446eab9414ee5437cd788c27d65f808d1314aa5
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2017-04-11 11:58:02 +00:00
Oswald Buddenhagen
05b3295a57 write Libs.private to .pc files only in static builds
projects using a dynamic build are not supposed to access this variable
anyway.

Task-number: QTBUG-51598
Change-Id: I81b55ea9ba460b80919f40ed7fe3d52129636b9e
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Reviewed-by: Jonathan Liu <net147@gmail.com>
2017-04-11 11:19:01 +00:00
Tor Arne Vestbø
5ad2e1cea1 Populate application fonts via font descriptors on Apple platforms
Instead of registering the font via CTFontManagerRegister we just create
a font descriptor for the data/URL and populate that like normal system
fonts. This makes the code more similar to how we deal with other fonts,
shaves off a ms during font registration due to not registering the font,
and fixes an issue on iOS where CTFontManagerRegister would invalidate
earlier populated system font descriptors.

Task-number: QTBUG-56765
Change-Id: I002a65075b15837c9a2d22573020d4c834111837
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-04-11 09:23:44 +00:00
Eskil Abrahamsen Blomfeldt
17fc188aec Implement maxCharWidth() for DirectWrite engine
This is used to create the bounding box in QFontEngine::properties(), which
in turn is used for the FontBBox when generating PDFs. The result was that
the bounding width in the output was 0 and Adobe Reader complained that the
PDF was malformed. We could implement the proper bounding rect in properties()
at some point, instead of assuming an origin at x = 0 for instance. The
metrics for that are in the head table. But for silencing the warning in
Reader, just implementing the maxCharWidth() function is sufficient.

[ChangeLog][Windows][PDF] Fixed a bug in PDF output when using high-dpi
scaling which was causing the display of warnings when opening the
file in Adobe Reader.

Task-number: QTBUG-58954
Change-Id: I2540571863d4dd0f85af533b591f75dad3f0d75b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-04-11 08:01:44 +00:00
Nico Vertriest
850c5dbcd3 Doc: minor language issues in Qt Sql doc
Change-Id: If9ad86644c097d78895e392acdf017f176d8f95d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-04-11 07:38:51 +00:00
Marc Mutz
da1be671cf QtTest: add toString(QUuid)
[ChangeLog][QtTest] QUuids are now printed on failure.

Change-Id: I39a7b9169aef8ab6ef5ce0790920547af23bd1b9
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
2017-04-11 07:34:38 +00:00
Thiago Macieira
d5f62f7bc7 Ask MS runtime to reload the timezone details if they've changed
POSIX documents that localtime() ensures that tzset() has been called,
but the wording could be understood to mean that it only needs to do so
the first time. Anyway, we're sure that the MS runtime only gets the
timezone information from the Control Panel once. That means Qt-based
applications will not react to a change in the timezone.

Attempt to do that by moving tzset() out of the #if, to apply to all
operating systems.

Task-number: QTBUG-60043
Change-Id: I6ab535fb61094af19fc1fffd14b413541fe5a64c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-04-11 06:45:41 +00:00
Thiago Macieira
dbea118f12 gtk3: Mark the minimum version we support
This suppresses warnings for API that is deprecated. Gtk often marks API
like:

GDK_DEPRECATED_IN_3_22_FOR((gtk_menu_popup_at_widget, gtk_menu_popup_at_pointer, gtk_menu_popup_at_rect))
void	   gtk_menu_popup		  (GtkMenu	       *menu,

Which generates this (found with ICC, accidentally an error):
 qgtk3menu.cpp(449): error #1786: function "gtk_menu_popup" (declared at line 138 of "/usr/include/gtk-3.0/gtk/gtkmenu.h") was declared deprecated ("Use '(gtk_menu_popup_at_widget, gtk_menu_popup_at_pointer, gtk_menu_popup_at_rect)' instead")

The warning is generated by GDK_DEPRECATED_IN_xxxx_FOR when
GDK_VERSION_MIN_REQUIRED is higher than xxxx. And by default,
unlike the Qt equivalent macros, the minimum version required
is equal to the current version.

The minimum version our support requires is 3.6, as we depend
on gtk_accel_label_set_accel, which was first introduced in
that version.

Change-Id: I27b55fdf514247549455fffd14b1c47e470510b2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-04-11 06:44:20 +00:00
Thiago Macieira
e7493c8b54 tst_qhashfunctions: Test non-zero seeds too
Change-Id: Ib0e40a7a3ebc44329f23fffd14b2e927021a1a2e
Reviewed-by: David Faure <david.faure@kdab.com>
2017-04-11 06:38:14 +00:00
BogDan Vatra
eda7f6ea78 Don't hide critical info
The developer should see what's wrong even on release builds.
That code hides any mistakes we do in JNI which are pretty critical
for developers because they can't see what's wrong with their code. e.g.

 QtAndroid::activity().callMethod<void>("wrongMethodName")

*silently* fails, which is so wrong!

Change-Id: I8b6a24946dfef716fcd86ab9bba82666974e3991
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-04-11 06:19:58 +00:00
BogDan Vatra
187427c0ae Use latest stable version of the android:gradle plugin
Change-Id: I15418015c6a206dd1a8e4b52894ec83ddaeb9fc2
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-04-11 05:56:49 +00:00
Oliver Wolff
2019e78d87 qmake: Do not mix canonical and non canonical paths
When having Qt sources in a symbolic link "shadowed" did not work
because _PRO_FILE_PWD_ used canonical path, while source_root did not.
Due to this mix it was possible that shadowedPath did not find any
"common denominator" and always returned and empty string. The first
place where things broke was while running config.tests.

Task-number: QTBUG-59319
Change-Id: If73ecbc58290ee9113f887a73c312ebfb5e20a33
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-04-11 05:37:52 +00:00
Marc Mutz
e91726ef9e QSslSocket/macOS: optimize QUuid usage
- don't create a QString, a QByteArray suffices
- perform the mid() operation on a view type (QLatin1String),
  not on a container
- use QStringBuilder

Change-Id: Ifd74f2bc98606425f9f6cb4da8618e8066a8b12e
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
2017-04-10 18:00:15 +00:00
BogDan Vatra
6c4cbd4122 Android: Fix crash at exit
We need to remove and release the surface imediately, otherwise
setSurface might be called after the object is deleted.

Task-number: QTBUG-59818
Change-Id: I3a09e3de1ceecc22d8d7a48e2fc1cfe40cf09f0a
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Mathias Hasselmann <mathias.hasselmann@kdab.com>
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
2017-04-10 15:27:20 +00:00
Marc Mutz
46c66bce5d Optimize QLoggingSettingsParser
Factor the line parsing into a separate function, parseNextLine(),
taking a QStringRef.

In setContent(QTextStream&), use the new readLineInto() function to
re-use the capacity of a single QString for all lines.

In setContent(QString), use splitRef() to split the lines.

In either function, pass each line to parseNextLine().

In order to port all the parsing to QStringRef, I needed to make some
semantic changes: the old code removed all whitespace right at the
beginning. This is not possible with QStringRef. It also didn't feel
right, since a line like

   [    r u  l e s ]

would successfully parse as the section named "rules".

I added trimmed() calls at the beginning, and around the valueStr and
pattern extraction, which should be good enough.

Also, when a section is found, don't store it anymore. Instead, only
store whether it was the [rules] section, because that's all we'll
test for. That way, we don't have to convert QStringRefs to QString
just to store them across parseNextLine() calls.

Replace the setSection() function with setImplicitRulesSection(),
because "rules" is all that was ever passed.

This is private API, we can bring back some of the dropped flexibility
later, as needed.

[ChangeLog][Important Behavior Changes] Logging rules can no longer
contain arbitrary whitespace such as within a category identifier.

Change-Id: Ic26cd23c71f5c810b37ef4b972354ac31d3408fe
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2017-04-10 14:54:31 +00:00
Marc Mutz
db29042588 QQnxWindow: replace QUuid::toString().toLatin1() with QUuid::toByteArray()
UUIDs are always US-ASCII.

Change-Id: I335882a2df179204d8eca1cf9f02bc6473bac700
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-04-10 14:30:07 +00:00
Daniel Teske
88d3195164 QWindowsPrintDevice: Handle 0 from DocumentProperties correctly
Task-number: QTBUG-55090
Change-Id: I5fadd0f007c826ab6747f319dbf3eaee5f208a44
Reviewed-by: Michael Brüning <michael.bruning@qt.io>
2017-04-10 14:27:46 +00:00
Marc Mutz
30efb14313 Make QStringView::storage_type public
... so users of QStringView::utf16() can use it, without having to
revert to decltype()/auto.

Change-Id: Ie09696b9354d3917914f8e2692769cfd35b01ae1
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-04-10 14:23:50 +00:00
BogDan Vatra
2099709a72 Fix build: Remove unused variable
Change-Id: Ib5e7782e23eb1ff976caedd167d3df8b857d9883
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-04-10 10:46:43 +00:00
Ulf Hermann
49fea13e6d Load android-specific target override in resolve_target
Otherwise, in separate_debug_info.prf, we try to process the original
target, which is not what we actually build.

Task-number: QTBUG-59779
Change-Id: I2b2d2e7b5f87041cc51075da7c3a5b690f94f1f3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-04-10 10:41:44 +00:00
David Faure
c0ecfc08e3 QTextDocument: improve import of DIV tags
<div>1<br/></div>2 was inserting two newlines between 1 and 2, while all
tested web browsers only insert one newline - as long as there is nothing
between the <br/> and the </div>.

This was the cause for extra newlines being inserted in KMail when
replying to HTML emails, such as those generated by gmail.

Change-Id: I5145d977701e68913264357bba22780e7cdd3f7d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-04-10 09:44:01 +00:00
Maurice Kalinowski
45862976b7 winrt: Fix build for Windows 10 Creators Update
Phone specific UI colors have been removed from the windows headers.
Continue to use the enum values does not gain anything as the native
calls return errors for those. Actually they did that already with
14393.

Change-Id: I4b04d3af319766216ae7c550af704aab488c1d15
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-04-10 07:02:06 +00:00
Oliver Wolff
13bb46bc3a winrt: Use hostnames for socket connections
Using IP addresses does not work for every use case on WinRT. The
workaround that is in place for VPN connections uses the host name
directly but has the disadvantage that it:
    1) does a host lookup nevertheless and ends up using the host name
    afterwards.
    2) needs a set environment variable to be activated.

Instead of doing a host lookup we now use the same approach that is used
if a proxy with the HostNameLookupCapability is present. In this case the
lookup is skipped and the direction is made using the hostname.

The big advantage of hostname over ip addresses on WinRt is, that
Windows handles everything related to lookup and proxies (it uses the
system proxy in this case), so we do not have to take care of that.
As the WinRT backend falls back to the "connectToHostByName" in any
case no further adaptions are needed.

QT_WINRT_USE_THREAD_NETWORK_CONTEXT cannot be completely removed though
as the creation of the network context should not be done
unconditionally.

This change partially reverts e9fa435652

Task-number: QTBUG-59989
Change-Id: I5dc7481b7499192641470b4b5a6642509a4b4f38
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2017-04-10 05:20:16 +00:00
Marc Mutz
9d1203bf02 QVariant: fix docs regarding QUuid
- toUuid(): QUuid is a built-in type, so use type(), not userType()
- canConvert()/toUuid(): QUuid converts to and from QString

Change-Id: I5262ff7ab093040cb943b6ab9cfffe95491d2b9b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-10 05:18:14 +00:00