Commit Graph

32158 Commits

Author SHA1 Message Date
Marc Mutz
b3e66c76aa QUuid: de-duplicate uuid → string formatting
The code was duplicated for QChar and char characters. Keep only the
char version, and use QString::fromLatin1() to convert to QString.

This does not perform more allocations. It just copies 38 bytes more
than before.

Saves 788B in text size on optimized GCC 6.1 Linux AMD64 builds.

Change-Id: I1a65c8128eb2097e11527961618d54ea362e1b80
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-04-19 11:07:11 +00:00
Samuel Gaist
d5cecfe8fd Migrate Windows QPA backend to use QRegularExpression
This patch updates the Windows QPA backend code to use QRegularExpression
in place of the deprecated QRegExp.

Change-Id: Ib45c374578bed5b9f2771df1ca04cc09cab6e7c9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-04-19 09:25:12 +00:00
Rainer Keller
b549a3550c eglfs: Adopt changed function signature in QtGlesStream library
Change-Id: I80fb7e403073fd264e0878d7c638812027282ad8
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-04-19 07:28:05 +00:00
Rainer Keller
f9aaf0e6d5 eglfs: Use description property as screen name
Change-Id: I2322ffcb28c646b289ee718b9c3946bc0a44bd3c
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-04-19 07:27:33 +00:00
Giuseppe D'Angelo
2d504c6709 QJsonValue: implement copy-assignment via copy-and-swap
Now we have a swap() member, remove the comment.
Amends bbb440bab2.

Change-Id: I3640d544bbd0927109460d843252c8e5f0aefaf5
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-04-19 06:19:27 +00:00
Giuseppe D'Angelo
8a375341cf QJson*: value semantics cleanup
Re-add the move operations, add a swap(), mark as shared
(we're already using them in containers).

QJsonValue is slightly tricky, because it has an anonymous union,
which can't be easily moved in C++. Use the implementation of
the copy constructor as inspiration for the move.

[ChangeLog][QtCore][JSON] QJsonArray, QJsonDocument, QJsonObject
and QJsonValue now have move operations and a swap() member function.

Change-Id: Idfb94a93370ace96100efbd6559ef05b4c5adc39
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-19 04:50:26 +00:00
Albert Astals Cid
6462f299ed Make platform menu tag/setTag not be pure virtual
Reasons:
 * Tag means nothing to the platform, tag is something
   the Qt side code will store and then restore, but it's meaningless
   for the platform, since it can be either the pointer to an
   action (qmenu.cpp) or an item count (qcombobox.cpp)
 * Since it's meaningless to the platform you don't know what
   to do when trying to implement a platform, this shows in how
   the field was being initialized, some initialized to this,
   some initialized to 0

On a followup commit we will remove the virtual tag but first
need to fix up other QPAs that don't live in the main repo

Change-Id: I15ac83f3bf7e4c741153d31ac761dbbe6f4b1b52
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-04-18 14:31:52 +00:00
Edward Welbourne
df252fc205 Tidy up QDateTimeParser in assorted petty ways
A bit-field was necessarily equal to either zero or its (single-bit)
mask; so comparing to the mask was superfluous.

A local value set and then conditionally over-ridden could easily be
made const by using the condition in a ?: assignment.

A use of qMin() lent itself to turning into a simple conditional
assignment.

Change-Id: I541d98044b23b8c51e6169f617a5841ba8fffc55
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-18 12:56:33 +00:00
Edward Welbourne
e764f34583 QDateTimeParser: simpler return, clearer comment
skipToNextSection() returned via a local temp that served no purpose.
The accompanying comment didn't quite explain what it set out to.

Change-Id: I31581323df374653db9c2558a3bd63409aafb178
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-18 12:56:09 +00:00
Edward Welbourne
5bc814ac69 QDateTimeParser: simplify switch by exploiting fall-through
Several cases all fell together; their code tested away one of them;
so putting it last and falling through to it avoids the need to test.

Change-Id: I0bf555710604a56faa61b60bfe5484d5c5a1ee6b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-18 12:56:01 +00:00
Richard Moe Gustavsen
7243b7cbf2 qmacmime: modernize QMacPasteboardMimeTiff
Since QMacPasteboardMimeTiff was moved out of the cocoa
plugin and into platformsupport, we take the opportunity to
give the code some overhaul as well.

Change-Id: I7d5425d336ba41474698915008b2086e98ea49dc
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-04-18 10:19:04 +00:00
Richard Moe Gustavsen
fb8ec15110 darwin: add tiff support to clipboard for all darwin platforms
This will add copy/paste/dnd support for QPixmap and QImage
to all darwin platforms (and not just macOS, as it is today).

Task-number: QTBUG-57428
Change-Id: Iefc876c0a347077322f195b55c49f2c1c4b4a34b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-04-18 10:18:54 +00:00
Marc Mutz
0a807c2ab6 QStringView: plaster API with Q_REQUIRED_RESULT
There's no reason to use it only on some functions with return values
and not others.

Change-Id: If50a669f49e9e2f71173dea94465a5de58a7783e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-04-18 09:43:39 +00:00
Marc Mutz
a21a9efacb QLatin1String: add chopped(), chop(), and truncate()
[ChangeLog][QtCore][QLatin1String] Added chopped(), chop(),
truncate().

Change-Id: I69b31aae560e94a120d7e8a36e06ea957ccd2003
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-04-18 09:43:32 +00:00
Marc Mutz
fc8cc2573c QStringView: add chopped(), chop(), and truncate()
Change-Id: I33925f5b2b3e0904f47f18f3cbab480d7f844734
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-04-18 09:43:26 +00:00
Marc Mutz
d176808eef QByteArray, QString, QStringRef: Add chopped()
We have two functions to get a substring without doing some
calculations involving size():

- mid(p):    mid(p, size() - p)
- right(n) : mid(size() - n, n)

(left does not involve size(), so isn't in that set). What was missing
was a name for

- f(n): mid(0, size() - n)

As an action, it's called chop(), so call the transformation version
chopped().

I made chopped(n), n < 0 or n > size(), undefined, because QString(Ref)
::left() is broken[1], while the QByteArray implementation is not. This
is the only way to get consistent behavior among the three classes.

I's also the correct thing to do.

[1] instead of returning the empty string for negative indexes, it
returns the whole string.

[ChangeLog][QtCore][QString/QStringRef/QByteArray] Added chopped(n), a
const version of chop(n).

Change-Id: I6c2c5b16e0060fa924ced5860f21f2d0f23bd023
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
2017-04-18 09:43:18 +00:00
Richard Moe Gustavsen
6d3c4833c2 iOS: add support for adding mimetypes other than text on the clipboard
A QVariant can only be converted to a QByteArray if it has user type
QMetaType::QByteArray or QMetaType::QString. The way it stood, we
always tried to convert the mime data to a QByteArray, and
then put the result into a QVariant. This would fail if the mime
data contained e.g a QPixmap.

This patch will inspect what kind of data the QMimeData contains, and
convert it to a QVariant using the expected API.

Task-number: QTBUG-57428
Change-Id: I67054424fe8c45873bab8305e7b44de939aae0fb
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-04-18 08:22:38 +00:00
Marco Martin
7fffc04335 Reset d->mouseDown only if it's the menu being hidden
If the mouse cursor is over a menu entry with a submenu, and the
submenu is open, quickly moving the mouse to a near menu entry and
clicking it sometimes results in the click being eaten: this happens
when the mouse is pressed before the submenu disappears and released
after it disappeared: the submenu resets d->mouseDown that is a static,
causing the mouse release event on the action we want to have no effect.
Set d->mouseDown to 0 only when the window is hiding is the actual
window that contains the mouseDown, otherwise is still valid.

Change-Id: I2c981b9432728e9e7518c30a146c9595199f8afe
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-04-18 08:18:57 +00:00
Marc Mutz
3064067154 QXmlStream: update qxmlstream.g to match qxmlstream_p.h again
Many changes over the last years didn't update qxmlstream.g:
  ecceaec858
  6f41600422
  9f888d2fde
  59c3670b63
  a7885c9756
  817800ad39
  342c99ff45

These changes are all included now.

Change-Id: I9dd56ec12ae6505edaf8238d48c5a5f78b5e8779
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-15 18:34:49 +00:00
Marc Mutz
19b94f970b QXmlStream: remove more unneeded toString() calls
Some are enabled by the recent addition of QStringView, but some were
wrong already before.

Change-Id: I3f900a80c47011af4c0370e32acb7478404b4867
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-15 18:34:30 +00:00
Jake Petroules
4f3249f32d Pluginize the platform styles
This enforces decoupling and in the case of QMacStyle, isolates
QtWidgets and therefore end user applications, from Carbon/HITheme.

Windows and Fusion are platform independent, so they remain built-in
(but mostly because the Windows style is tightly coupled to other styles
like QStylesheetStyle).

Task-number: QTBUG-59428
Change-Id: Id6519fe0c5269c1bce5b5921f9db06257032a1c9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-04-14 17:07:54 +00:00
Robin Burchell
571eb37ac9 QAndroidPlatformScreen: Add missing override
Missed in b018a5ecef.

Reported-by: Anton Kudryavtsev <antkudr@mail.ru>
Change-Id: Id833fbd77c571923571e59b0c609b56c69308d90
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
2017-04-14 11:30:07 +00:00
Robin Burchell
6bf9972621 QMovie: Add lastError and lastErrorString getters
QMovie has an error signal, but it is not possible for users to
"catch" all errors, for instance, if they occur at construction time, and
furthermore, it may not be convenient to add interception of the signal
just to find out what the error was.

[ChangeLog][QtGui][QMovie] Added lastError and lastErrorString accessors,
as a convenience over connecting to the error() signal.

Change-Id: I9c6ef70694c67986ecd30b5dc1b321c4dfa5c315
Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
2017-04-14 09:10:34 +00:00
Robin Burchell
01a4d09ef6 QMovie: Make sure to pass on QImageReader errors when they occur
If a file cannot be opened for some reason (like running out of FDs),
emit the error signal.

Change-Id: I9586dda34b2f2cef73593c6dcb855b29d63c2dbc
Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
2017-04-14 09:10:27 +00:00
Jake Petroules
401d9b5278 Remove the Windows XP style from public accessibility
Later, the Windows XP style will be removed entirely by means of
being merged with the Windows Vista style (which inherits from the
XP style).

There was actually no reason for these styles being separate
classes in the first place, because both result in the same
appearance for controls on the running version of Windows.
Therefore, the windowsxp style merely appears as a "broken"
version of the windowsvista style, with only minor differences
based on the additional metrics that the vista style provides.
The windowsxp style does NOT, and never did, allow users to get
a Windows XP style appearance on Windows 7 and above (which is
currently Qt's minimum supported platform). Therefore, now that
Qt no longer supports Windows XP, the windowsxp style is unusable.

[ChangeLog][QtWidgets] The windowsxp style is no longer available
as a separate style, because it did not (and cannot) actually
provide an XP-style appearance on currently supported Qt platforms.

Change-Id: I513d9bce3f247f97cfb28dfee88fe888469e0a6f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-04-13 21:39:09 +00:00
Olivier Goffart
4b0d6704d9 DockWidgets: Allow to have floating dockwidgets side by side
Based on what MS VisualStudio can do, allow to have. We can now
drop the QDockWidgets on floating ones so that they are next to eachother

This is activated when QMainWindow::GroupedDragging and
QMainWindow::AllowNestedDocks are both set.

[ChangeLog][QtWidgets][QDockWidget] When QMainWindow::GrouppedDragging
and QMainWindow::AllowNestedDocks are both enabled, floating dock widgets
acquired the ability to be dropped together side by side.

Change-Id: I48765c72ef80ef15aa31b91ae582cbb01dea41d6
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
2017-04-13 17:44:58 +00:00
Olivier Goffart
60be2fb6a1 QMainWindow: move the separator handling in another class
So it will be re-used by QDockWidgetGroupWindow

The Layout template argument can be the QMainWindowLayout,
or the QDockWidgetGroupLayout. They have a function
dockAreaLayoutInfo which return a QDockAreaLayout* or a
QDockAreaLayoutInfo*, respectively. These two class
have the same interface as far as QMainWindowLayoutSeparatorHelper
is concerned. (QDockAreaLayout forward most of its call to
the relevant QDockAreaLayoutInfo)

The code is mostly moved without modification, but there is a change in
startSeparatorMove, because we don't have access to the layoutState to
set the fallbackToSizeHints variable, so instead, we do that from
QMainWindowLayout::hover.

Change-Id: Ic5fa3ee2def3d0155195f751d4770b207732139f
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
2017-04-13 17:44:33 +00:00
Friedemann Kleint
46458ce3ef uic: Port Ui classes to QVector
Regenerate the ui4* files after a change in qttools replacing
QList by QVector in the Dom* classes with the exception of
QList<DomProperty *> since that affects the public interfaces
of QAbstractFormBuilder.

Change-Id: I0922127fb911a5abc125d93ef97a0b22ff94788a
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2017-04-13 12:43:00 +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
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
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
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
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
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
3ded791062 Mark qCompareStrings() functions pure
Change-Id: I73945aceeb1e3e2794c285ca6379bee3d94013a6
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2017-04-09 05:26:21 +00:00
Gatis Paeglis
fff55558cf cleanup: remove references to unknown classes
Google did not find anything. I guess it is just some
development side product.

Change-Id: Idc44870e71bad1c13858210c7830e08573442cca
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-04-08 08:09:37 +00:00
Marc Mutz
de3785b8bc QVersionNumber: add fromString(QStringView/QLatin1String) overloads
The parsing code anyway operated on a QByteArray created from
toLatin1(), so expose this to the user by providing a QLatin1String
overload.

Also provide a QStringView overload, since we can. Port one user (in
qmake) to the new overload.

[ChangeLog][QtCore][QVersionNumber] Added QStringView and
QLatin1String overloads of fromString().

Change-Id: Idbff44c3997f5cfa86ea1bce8b3da4b700a3d9cc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-08 05:40:52 +00:00
Marc Mutz
f5d8ad61a4 qmake: use new QString::arg(QStringView) overload
Add ProString::toQStringView() to avoid creating QStrings just to pass
them to QString::arg() (single-arg; multiArg() does not, yet, accept
QStringViews).

I could have used the existing toQStringRef() function, but QStringRef
is a tad more complex to copy and quite a bit less future-proof.

Change-Id: I344c46f301768e844c487d36ce3e6cb276de8843
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-04-07 18:33:23 +00:00
Marc Mutz
cdbe9d1483 QMakeEvaluator: port a QString::split() to a QStringRef::split() loop
Change-Id: I91a65776124f88a7e2e4778dbe9154b597f52212
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-04-07 18:33:18 +00:00
Jesus Fernandez
18cdf8e90b Adds a list of supported platforms in PI mkspec
Change-Id: I7e67ffc41c7a389750e1ab342a570a1dda8ff077
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-04-07 10:18:51 +00:00
Martin Smith
7e1658f2ec doc: Correct include guard
It should be QCOCOAWINDOWFUNCTIONS_H, not QXCBWINDOWFUNCTIONS_H.

Change-Id: I296e1db28f3727c6aba6de4f02cf26808f72a8a1
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-04-07 10:09:00 +00:00
Gatis Paeglis
f57322f70e xcb: remove x11FilterEvent() code path
This is a legacy code that was there to support
IM plugins using the Qt4's QInputContext::x11FilterEvent.
Updating IM plugins to the new API is a trivial task,
external plugins have had enough time to switch to
the new API QInputContext::filterEvent(). The 'fcitx'
plugin did the required changes in Oct 2014. AFAIK
this was the only remaining plugin that still used
x11FilterEvent.

Change-Id: I7702bcd7017d2d24a1ed07fdebac8b61ca178161
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-04-07 09:25:07 +00:00
Marc Mutz
399ab058c9 Add front()/back() to QString, QStringRef, QByteArray and QLatin1String
These STL-compatibility functions are present on our generic
containers, but not on the string classes.

[ChangeLog][QtCore][QString/QStringRef/QByteArray/QLatin1String] Added
front() and back() for STL compatibility.

Change-Id: I536019396b319abd1e2daf9c64ebab4e7a35b334
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-04-07 08:32:32 +00:00
Marc Mutz
5dc1e08c8c Add qConvertTo{Utf8,Latin1,Local8Bit,Ucs4}() and corresponding QStringView methods
Like the qt_compare_strings()/qCompareStrings() split, distinguish
between the internal and exported functions.

Because of the circular dependency between qstring.h and qvector.h,
the inline toUcs4() function has to be in qvector.h.

At some point, we need to refactor the headers so qvector.h is lower
in the dependency chain than qstring.h. It's not the first time this
bites.

Change-Id: Ief9f3bd92c83cdd1f31c51c700f42e146916eefd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-07 08:54:16 +00:00
Jesus Fernandez
86005ea257 Replace Q_DECL_OVERRIDE with override in imageformats
Change-Id: I7280cdf674b2a202f9ef7ff2bb9b6732e09a5a76
Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2017-04-07 08:45:51 +00:00