Commit Graph

24760 Commits

Author SHA1 Message Date
Topi Reinio
c3a0f22b60 qdoc: allow 'void' function parameter without a parameter name
There are a few functions using a C-style function declaration:

    void foo(void);

meaning that foo() takes no parameters. This change allows this
for QDoc, making it successfully match documented \fn blocks
with the correct declaration, and not print out warnings.

Change-Id: I8191c55094371431b0e9c2ad22d19cadcb7facfb
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-08-26 09:46:19 +00:00
Topi Reinio
191b7237bf qdoc: Use lowercase names for modules read from index files
The module names are used as keys in the map that defines the
forest of module trees. A physical module name (lowercase) is
used as the primary tree name, but modules read from index
were using a name written to the index file (project name,
typically CamelCase) as-is.

This caused issues for resolving link commands that have a
module name in the square bracket parameters. To ensure that
such links work, convert module names read from index to
lowercase, too.

Change-Id: I698e01fd1df888e4a78c06a76ad72b5eb1a70892
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-08-26 09:46:08 +00:00
Topi Reinio
a5f46bc647 Doc: Fix QDoc warnings for QOpenGLFunctions and QOpenGLExtraFunctions
- Use \a commands when listing the arguments for OpenGL methods
    - Document functions taking a single argument of type 'void'
      verbatim. Otherwise, QDoc refuses to generate their docs
    - Add constructor docs for QOpenGLExtraFunctions (copied from
      QOpenGLFunctions).

Change-Id: I64a436365572a80319ba0a8eaba2f5d9b751e84d
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-08-26 09:46:01 +00:00
Topi Reinio
03d621cbff Doc: Update online documentation template
Update the online documentation template with following fixes:

   - Improve responsivess for narrow screens: TOC and sidebar
     now collapse into drop-down menus
   - React to hashchange events: When the user edits the anchor
     tag in URL and presses enter, the page is scrolled
     correctly to bring the selected section title into view.
   - Handle Ctrl and Meta keys correctly
   - Improve colors for target section highlighting
   - Minor CSS fixes

Task-number: QTWEBSITE-634
Task-number: QTWEBSITE-657
Change-Id: I7221f38cf4988497f0f24ee66e62b7b7d770a121
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-08-26 09:45:55 +00:00
Joerg Bornemann
a4bd096a0a remove pointless function separator comments from tst_qprocess
Newer test functions don't have those. Removing those comments makes
the code consistent.

Change-Id: I542b89e797ef061395ce1fc87d848195e6f81f35
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-08-26 09:38:53 +00:00
Olivier Goffart
5a50010058 Be more tolerant with multiple differerent metatype registrations
There is a qFatal in qmetatype.cpp that checks that the flags are the same.

There is a binary compatibility break because if any cause build with Qt 5.5
is loaded, this qFatal will quit the application, due to the change in
commit 54a09a4188:

  Type flags for type 'QtMetaTypePrivate::QPairVariantInterfaceImpl' [1034]
  don't match. Previously registered TypeFlags(0x103), now registering
  TypeFlags(0x107). This is an ODR break, which means that your application
  depends on a C++ undefined behavior.

This is a false positive since it is an internal type, the MovableType in
QMetaType is only being used for performance reason, it is perfectly fine
to change it.

This commit changes the qFatal to complain only about flags that could
only be caused by a binary incompatible change.

Change-Id: I87b9bf8cf54b6c7f4b1277d411ce5107642435ab
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-08-26 06:46:05 +00:00
Takao Fujiwara
418824dc69 ibus: Return correct scan code to windows
ibus keycode is qt scancode - 8 and needs to be returned to app windows
as the right value.
Use QWindowSystemInterface::handleExtendedKeyEvent() instead of
QCoreApplication::sendEvent() in qtbase 5.6 to follow
QXcbKeyboard::handleKeyEvent().
Also qApp->focusObject() returns QMdiChild which is a QWidget and 
that is not a QWindow.

Task-number: QTBUG-47833
Change-Id: Ie634a86d7790d8093cfca2dc8666f726844ae654
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-08-25 19:41:46 +00:00
Samuli Piippo
4b5da50b29 mkspecs: add option to enable boot2qt platform
Add configure time option to enable boot2qt platform using DISTRO_OPTS.
On embedded, the QtWebEngine is supported only on boot2qt platforms.
To have QtWebEngine CI tested on embedded, we need a way to to enable
boot2qt platform for existing mkspecs.

Change-Id: I218da5b8071041ca1c95eb218b2d552fcc9980d2
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
2015-08-25 19:35:22 +00:00
Bernd Weimer
b46fe39d94 Harmonize input context selection
Input context selection works differently across platforms. On some
platforms it is not possible to request a specific context at all
(e.g. Wayland). This will be unified, depending on the environment
variable "QT_IM_MODULE", you will get:
- null:  default (platform) context, if defined (otherwise no context)
- empty: no context
- set:   set one, if it exists and is valid (otherwise no context)

[ChangeLog][Platform Specific Changes] Haromnized input context selection.
QT_IM_MODULE environment variable will be taken into account.

Change-Id: Ic8f826fbc6ace25941cd19b9b086943e848fbe01
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Nedim Hadzic <nedim.hadzic@pelagicore.com>
2015-08-25 07:04:19 +00:00
Thiago Macieira
3accdb8086 Detect which C++ standard edition the compiler defaults to
Change-Id: I2991557a5cc74cd18e88ffff13f670bf25d5423e
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2015-08-25 06:25:11 +00:00
Louai Al-Khanji
31fb4379c8 Fix module reference in license header
Change-Id: I8efa30869e716d827e8463ef4285f8ff9357cc0e
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-08-25 06:01:31 +00:00
Louai Al-Khanji
aab5698dd9 Remove unused kms plugin
The old kms plugin has been replaced by EGLFS's KMS backend. The EGLFS
backend is smaller and has more features.

The kms plugin cannot be built automatically since Qt 5.5 and is
therefore also not tested for changes in QPA API by the CI. Therefore
removing the plugin from the tree should not be a regression from the
previous release.

Change-Id: Icb9ea8c4a5d6421397a2e3f2e2195fb6bfad2293
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-08-25 06:01:26 +00:00
Louai Al-Khanji
55bc1ddc76 Improve description of configure script's -kms switch
Change-Id: I05e69d10ca0df9f99dca2c172e1791371124e75c
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-08-25 06:01:23 +00:00
Louai Al-Khanji
cf68d764ab Document QStateMachine::running property in single place
This fixes a number of qdoc warnings due to e.g. missing documentation
for setter argument.

Change-Id: If9ae43f70f0e42fe8b8a4f04f49d522cd7d69099
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-08-25 06:01:19 +00:00
Louai Al-Khanji
e6d5e4167c Fix documentation typo
Change-Id: Ic6271a19999555ef2a1dfa90cebfb92b270a3809
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-08-25 06:01:15 +00:00
Louai Al-Khanji
a49477df95 Fix qdoc warning by documenting function argument
Change-Id: I3d80af0b1226fbe601619420dbb35106bb3d4eec
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-08-25 06:01:11 +00:00
Louai Al-Khanji
056328d3cb Add #ifdef to avoid qdoc missing function warning
Change-Id: I1cba5543a519030a5b06bc80b6fd7410327c86c8
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-08-25 06:01:00 +00:00
Louai Al-Khanji
16a506f418 Fix warning due to undocumented function argument
Change-Id: Ia3a54f296b1edcdce5950bf7acad1b4436d9564a
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-08-25 06:00:49 +00:00
Louai Al-Khanji
789b79fd8a Fix warning due to undocumented function argument
Change-Id: I00654b72a654c7b2a762ace773a9caef37b1bdd5
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-08-25 06:00:46 +00:00
Louai Al-Khanji
6c21a0ea0e Fix invalid documentation function reference
Change-Id: Iccf62e3f2f7843c14dd6540400241bdd264ad376
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-08-25 06:00:43 +00:00
Louai Al-Khanji
b4a48d2578 Move QCoreApplication::quitLockEnabled documentation to single place
Moving the documentation to one spot reduces repetition, is more
canonical, and avoids a warning due to undocumented function argument in
the setter.

Also document the default setting.

Change-Id: Idcedacf4bf101909689025d044e96801255a3332
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-08-25 06:00:38 +00:00
Thiago Macieira
b30feab6e0 Fix permissions on qalgorithms.h
Commit 046f325483 accidentally made it
executable.

Change-Id: I7de033f80b0e4431b7f1ffff13fc9872fa64ae9d
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
2015-08-25 01:08:49 +00:00
Thiago Macieira
ad080fa311 Fix compilation with ICC on Windows
Unlike MSVC, ICC *does* support constexpr, but on Windows it will not
define __GNUC__, so we ended up in the multi-line alternative. That is
not permitted in C++11, only in C++14.

qalgorithms.h(659): error: statement may not appear in a constexpr function

Change-Id: I7de033f80b0e4431b7f1ffff13fc96245ee9a846
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-08-25 01:08:42 +00:00
Jocelyn Turcotte
1977855f31 Avoid recreating QVariantLists when extracted from a QVariant
Wrapping a QVariantList in a QVariant to pass it to QML would
trigger a deep copy each time QML would try to access elements
in the list (specifically in QQmlListAccessor::at).

This reverts a part of 8c4deff51c
by specifying the associative array conversions explicitly without
including the current type in the list of types to convert through
an iteration.

Task-number: QTBUG-41403
Change-Id: If9fddfe6d36f789ac4aa61a7c32677cd1dd077d8
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-08-24 21:03:24 +00:00
Allan Sandfeld Jensen
2f43ac9dcd Fix double initialization of QRgba64 with C++14
Use constructors with C++11/C++14 where it is allowed to avoid hack
that caused double initialization and thereby performance regression
with C++14.

Change-Id: I7ae86df8aa34000b2c186e22bd9917303354b794
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-08-24 08:36:50 +00:00
Friedemann Kleint
bc2dabf8ff Extend the image viewer example.
Add:
- Save As
- Copy
- Paste from clipboard into new image

Change-Id: Ibbc308e9bbd2ce407119cd9358874f5c22a6bb83
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-08-24 08:26:55 +00:00
Shawn Rutledge
08de828a11 QTabletEvent manual test: show events/sec and frames/sec, proximity
Task-number: QTBUG-47464
Change-Id: I476586bb15dd5113cf6463b1dc6f05e5bb26127a
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-08-24 07:28:52 +00:00
Shawn Rutledge
06a469b2ff QTabletEvent manual test: show event timestamp
Task-number: QTBUG-39459
Change-Id: Ieac0d7b28a3ca651681d286d4700ef7b9b1675b5
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-08-24 07:28:48 +00:00
Shawn Rutledge
bc8d325926 xcb: set QTabletEvent's timestamp from the window system event
The intention is for it not to include any delays that Qt's event
processing has introduced.  And we are already doing it this way
for touch and scroll events.

Task-number: QTBUG-39459
Change-Id: Ie01cc2f8c6290ab66ef1b9180471afaa3da2e9da
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-08-24 07:28:44 +00:00
Shawn Rutledge
bd2ebbdb9a QInputEvent: document that timestamp() is in milliseconds
Task-number: QTBUG-39459
Change-Id: Ie76f3c2f6fe81746d3ea646f0c2f0d47ec3ef252
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-08-24 07:28:40 +00:00
Shawn Rutledge
5c9e94fb9b Windows: set QTabletEvent's timestamp from the window system event
Task-number: QTBUG-39459
Change-Id: I8439846482a52b358bcdc4d8a5f6f4b9bbe55fa5
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-08-24 07:28:34 +00:00
Kai Koehne
cb6ab05648 QLoggingRegistry: Look up logging configuration in Qt data path
Distributions like Fedora would like to disable logging globally, without
having to patch Qt. Fedora right now therefore adds a
/etc/xdg/qtlogging.ini file, which unfortunately though also messes with
Qt versions compiled by the user.

This patch lets QLoggingRegistry look up logging configurations also
in QLibraryInfo::DataPath, which would allow to tweak the values per
Qt installation.

See also https://bugzilla.redhat.com/show_bug.cgi?id=1227295

Change-Id: I0fca304a47f45739d0c08a9e4e715673bf10aa80
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-08-24 07:17:29 +00:00
Andrew Knight
5c95c2077c winphone: Fix keyboard show/hide calls
These need to occur on the XAML thread.

Change-Id: Id42a37df95b09e6d3c0a1b6e593bbf8cbfe5a129
Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2015-08-24 07:02:58 +00:00
Thiago Macieira
b626a5859a Remove vestiges of Qt's own sockaddr_in6 and sockaddr_storage
We weren't using qt_sockaddr_storage, so it's not a problem. But since
we're not using it anyway, we don't really need it. The storage is only
needed if we needed to get a bigger socket address and that only happens
with Unix sockets (paths).

sockaddr_in6, however, was just wrong. Some systems derived from BSD,
like OS X, have a sXX_len field containing the length of the socket
address structure and our qt_sockaddr_in6 was missing sin6_len. As a
result, setting sin6_family was just plain wrong on little-endian
systems. Like all modern systems running BSDs and OS X...

Change-Id: I7de033f80b0e4431b7f1ffff13f900f004c55443
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-22 22:26:50 +00:00
Thiago Macieira
452924c6ff QNativeSocketEngine Unix: do the same as for Windows
Change-Id: Iee8cbc07c4434ce9b560ffff13ca9d9858cf7111
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-22 22:26:47 +00:00
Thiago Macieira
2c64e05d49 QNativeSocketEngine Windows: bring bind() in line with Unix
The IPv4+IPv6 dual stack code that has been in Qt since 5.0 has been
giving test failures for tst_qudpsocket: some binds that shouldn't
succeed do succeed. Instead, copy the core code from the Unix version so
the two OSes will behave the same way.

The one difference in behavior between Windows and Unix is that on Unix
you can bind an IPv4 address to a multicast IP and on Windows you can't.
So I left the "correction" that was in the original code, but I'm unsure
if it is the right thing to do. Are people expecting to join the
multicast group this way?

Change-Id: Iee8cbc07c4434ce9b560ffff13caa1c3d5a7e8fd
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-22 22:26:43 +00:00
Thiago Macieira
f35b8c004e QNativeSocketEngine Windows: simplify the conversion to struct sockaddr
We have qt_sockaddr, which has enough storage for our needs and is a
union of all the types. We don't need them to be separate like that.

Change-Id: Iee8cbc07c4434ce9b560ffff13ca9cb960ccf1d7
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-22 22:26:40 +00:00
Thiago Macieira
28dfc33c3a QNativeSocketEngine: add code to send extra IP header data
Change-Id: Iee8cbc07c4434ce9b560ffff13ca48c053bd88ed
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-22 22:26:37 +00:00
Thiago Macieira
abe269bb72 QNativeSocketEngine: add code to receive IP header data
Change-Id: Iee8cbc07c4434ce9b560ffff13ca466263abcb1b
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-08-22 22:26:33 +00:00
Thiago Macieira
ef05ad0ac5 QNativeSocketEngine: use sendmsg/recvmsg instead of sendto/recvfrom
We'll need to use these functions instead of the ones we're currently
using in order to access the ancillary data.

Note that on Windows the two functions aren't globals, but must be
obtained via ioctl, which means they can fail. If they do, we fall back
to using WSARecvFrom/WSASendTo

Change-Id: Iee8cbc07c4434ce9b560ffff13ca4284acd24132
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-22 22:26:30 +00:00
Thiago Macieira
5b38454714 Autotest: Print errno in case of failure
Change-Id: I7de033f80b0e4431b7f1ffff13fc4a02e1c1a2a5
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-22 22:26:27 +00:00
Thiago Macieira
89efa7333d QAbstractSocketEngine: introduce QIpPacketHeader for datagrams
This commit changes the readDatagram() and writeDatagram() virtual
functions to take a QIpPacketHeader as meta data, instead of a
QHostAddress/quint16 pair. As previously, the header is an "out"
parameter for readDatagram() and an "in" parameter for writeDatagram().

The header pointer in readDatagram() is allowed to be null if the
PacketHeaderOptions indicates WantNone. Otherwise, it must not be null.
The extra options parameter is introduced because we may not always want
all the metadata upon reception. For sending, we know what to include or
not based on what's set in the incoming header parameter.

QIpPacketHeader splits sender and destination because we'll be able to
return both on datagram reception.

Change-Id: Iee8cbc07c4434ce9b560ffff13ca4213255008c7
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-22 22:26:23 +00:00
Friedemann Kleint
53251e23cf Set QAction::NoRole on dock widget view actions.
Prevent the actions from being shuffled around in OS X
menus since the default is QAction::TextHeuristicRole.

Task-number: QTBUG-47739
Change-Id: Ib68bb7c51eb9278a99d277473f9d4cfcf740431c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-08-22 22:26:19 +00:00
Thiago Macieira
3997321199 Remove Q_DECLARE_TYPEINFO that causes a build error
ICC doesn't like it
qdbusintrospection_p.h(162): error: explicit specialization of class "QTypeInfo<QDBusIntrospection::Argument>" must precede its first use

It's used by the QVector in the same class

Change-Id: I7de033f80b0e4431b7f1ffff13f958971617b657
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-08-22 22:26:16 +00:00
Thiago Macieira
39c2b8c5c1 Add support for same-file intrinsics with Clang 3.7
It supports the same feature that GCC does

Change-Id: Ib306f8f647014b399b87ffff13f1f3159898741b
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-08-22 00:10:39 +00:00
Laszlo Agocs
b409b1a0e4 libinput: Fix key mapping
Prevent generating 2 character long 'text' strings with some garbage as
second char.

This matches how xcb works.

Change-Id: I88a248a89c80b0e100c1c4871cfab4f2c287535e
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2015-08-21 21:02:56 +00:00
Laszlo Agocs
19e61ac290 Fix pointer size detection when cross-compiling
The initial configure fails to build the pointer size test correctly
due to the missing --sysroot argument. This breaks 64-bit targets
as the pointer size is set to 4. A subsequent configure correctly
builds and picks 8 up, but we expect the first attempt to work as well.

Task-number: QTBUG-47840
Change-Id: Iaf9450635f1bbc12e18062fa0a51f35cf690ce08
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-08-21 12:43:41 +00:00
Friedemann Kleint
5549ba4fa5 Polish the imageviewer example.
- Remove unneeded member variables.
- Use member initialization in the constructor.
- Use new connection syntax in createActions()
  to assemble the menu there, removing the createMenus()
  function.
- Fix coding style issue (braces)
- Avoid empty label showing up by setting the scroll
  area invisible until an image is loaded.
- Set a new image only if image read succeeds.
- Add status bar with information message.

Task-number: QTBUG-46848
Change-Id: I32d5af70d8eb71ec16dd58a0b98c32eb2bd988d7
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-08-21 10:37:22 +00:00
Samuel Nevala
b349289fa0 winrt: Hide status bar on windows phone.
Task-Id: QTBUG-47789
Change-Id: I9ca5f336ba9ee7524d4a4bbff3bbf4fbbb56fd54
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-08-20 05:41:26 +00:00
Thiago Macieira
5bf5fe964b Fix Clang warning about copy elision
Found by Clang 3.7:

qcommandlineoption.cpp:287:12: error: moving a local object in a return statement prevents copy elision [-Werror,-Wpessimizing-move]

Change-Id: I7de033f80b0e4431b7f1ffff13f97fb480001d36
Reviewed-by: David Faure <david.faure@kdab.com>
2015-08-19 22:13:23 +00:00