Commit Graph

20552 Commits

Author SHA1 Message Date
Laszlo Agocs
47870f02f7 Simplify using tslib with eglfs
tslib support can now be built-in into eglfs, like evdev.

Set QT_QPA_EGLFS_TSLIB to 1 to use tslib instead of evdevtouch.

The input device can be controlled via TSLIB_TSDEVICE.

Change-Id: Iff6bdbb4d133f73eca5528705844862236f8752b
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
2014-10-17 08:08:47 +02:00
Laszlo Agocs
573f5a8ed5 Enable tslib autodetection in configure
Change-Id: I4adbae621e4baa3a24e22a5b5832a08edfab377e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
2014-10-17 08:08:22 +02:00
Laszlo Agocs
0ff3e7d155 Make hellowindow multi display capable on embedded
Platforms like eglfs allow a single window per screen. Thus the behavior of
--multiple is not suitable since it tries to open multiple windows on the
primary screen. Instead, introduce --multiscreen.

Add also --timeout to quit the app after 10 seconds. This is essential on
platforms that do not have windows with decorations that can be used to
close windows.

With eglfs' kms/drm hooks, starting with --multiscreen will now show a
rotating logo on all connected displays, with some random background color.

Change-Id: I53f2651f05620e752c289038a9b3ff4508273173
Reviewed-by: Louai Al-Khanji <louai.al-khanji@digia.com>
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
2014-10-16 14:41:19 +02:00
Risto Avila
5701583891 Fix cast for qeglfshooks_kms
Fix cast for qeglfshooks_kms

Change-Id: Ibfc0c486d252a047e66cbd5bbe08375b994f1eb4
Reviewed-by: Louai Al-Khanji <louai.al-khanji@digia.com>
2014-10-16 14:04:56 +02:00
Laszlo Agocs
dae22ebfe4 Switch to categorized logging in all the input handlers
Use the rule qt.qpa.input (similarly to xcb).

In addition, evdevkeyboard supports qt.qpa.input.keymap to enable keymap
debug messages.

For compatibility, evdevtouch retains the QT_QPA_EVDEV_DEBUG environment variable,
this will simply turn on the associated logging rule.

Change-Id: Ia038beb827346d2573ca9a2b69b8dcc53adcf0eb
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Risto Avila <risto.avila@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-10-16 13:08:14 +02:00
Laszlo Agocs
cf046ccec0 Clean up tslib plugin
The code is now cleaned up, properly divided between platformsupport and
the actual plugin (like evdev) and categorized logging is in use.

This will allow us to use tslib as a built-in input handler in eglfs in
the future.

Change-Id: Ic87cdcfe8049bb98530e7f26ffa7a77611a8ede3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
2014-10-16 13:08:06 +02:00
Laszlo Agocs
5cd6cd198c Avoid qCWarning
qCWarning messages are shown by default. This was not the intention.

Switch to qCDebug since these are not necessarily errors, just debugging
information.

Change-Id: I15f114fd07887afb687e40342b289a6463e0c93a
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
2014-10-16 13:08:01 +02:00
Alex Trotsenko
350ab22885 Make QRingBuffer::ungetChar() not leave empty array in buffer list
Change-Id: Ic692693132f0c316ad068cad5423ca8fd32bd40d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2014-10-13 18:06:33 +02:00
Allan Sandfeld Jensen
29e679bed9 Fix access of non-existing color table
Since alphaMapForGlyph now returns images in alpha8 format, they no
longer have a colortable, so we need to fix the fallback implementation
of alphaRGBMapForGlyph from trying to access it.

Task-number: QTBUG-41855
Change-Id: I232089163cfc817d7cf16df566f05629a968bf12
Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2014-10-13 18:03:40 +02:00
Laszlo Agocs
6c35eb5f0f eglconvenience/eglfs: Clean up warning messages
Remove the last occurrence of ifdefed debug prints and replace it with
categorized logging.

Also clean up the warning texts for some of the serious errors, the old
ones from Qt 4 times were somewhat messy.

Change-Id: I2a3e48c393d56be2511d25c3003b1f2b74ac3c8c
Reviewed-by: Louai Al-Khanji <louai.al-khanji@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-10-13 10:00:45 +02:00
David Faure
cd824ee791 QAIV: speed up isRowHidden for the case where no rows are hidden.
isPersistent(index) is a linear search, which we can avoid altogether
(as well as the creation of a persistent model index, is idx is indeed persistent)
when the row-hiding feature isn't used at all.

Change-Id: I07488dddf56e299806cc29749e633da00115fc30
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
2014-10-12 10:37:58 +02:00
Louai Al-Khanji
97f119af14 EGLFS: Add support for multiple displays
Change-Id: Id039e0ed2d99562eb2a5cfe1e7b34013c75ff3ac
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-10-10 13:25:53 +02:00
Laszlo Agocs
7069ebd1f6 Use requestUpdate in QOpenGL and RasterWindow
Change-Id: Ibed4b8d2e2185f1bcf3430932701f81577b59408
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2014-10-10 08:37:04 +02:00
Laszlo Agocs
1f040d401d eglfs: Add support for systems without pbuffer support
Use a small native window and window surface in case the hooks indicate
that pbuffer support is not available.

Change-Id: I6515309041f0e1e2f5321d59941f35d6ee16dca7
Reviewed-by: Louai Al-Khanji <louai.al-khanji@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-10-10 08:36:47 +02:00
Frederik Gladhorn
881ceeff42 Merge remote-tracking branch 'origin/5.4' into dev
Change-Id: I05fcd8dc66d9ad0dc76bb7f5bae05c9876bfba14
2014-10-09 17:56:52 +02:00
Gunnar Sletta
b3d2c867ed Introducing QWindow::requestUpdate().
Change-Id: I0e2a09b53459a56d90dcd9043e694b19e2d77a9e
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-10-09 10:59:40 +02:00
Alessandro Portale
106487387d Removing a few unneeded "? true : false"
Change-Id: Ib13f0ddd65fe78f5559f343f2fc30756b1d3ef76
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-10-09 09:43:26 +02:00
Marc Mutz
e5f528fb0e Don't stream QStringLiterals into QDebug
Normal (C) string literals do just as well and use more than twice
less space in the DATA section.

Change-Id: Iafb0682a362c41dfd5b4d8b9137d88014d7992a2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-10-09 09:42:27 +02:00
Marc Mutz
a5b647804b QFactoryLoader: de-duplicate two QStringLiterals
When seemingly identical QStringLiterals are used in different
functions, due to the use of lambdas and scoping, they produce
different lambda types and thus duplicated QStringLiteral data.

Fix by moving the QStringLiterals into inline functions and
calling those instead.

Change-Id: Ifaa124ec74e201ccc63fd9afce042f8b2ff22b9e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-10-09 09:42:17 +02:00
Marc Mutz
1cc06b2e94 Don't use QStringLiteral in startsWith/endsWidth
For QLatin1String, startsWith/endsWith is overloaded, so comparing to
a latin-1 (C) string literal is efficient, since strlen() is
comparatively fast.

OTOH, QStringLiteral, when not using RVO, litters the code with
QString dtor calls, which are not inline. Worse, absent lambdas,
it even allocates memory.

So, just use QLatin1String instead.

Change-Id: I7eaf464c67b55116f970fe7f58a85f19ce4d254e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-10-09 09:42:11 +02:00
Marc Mutz
1a5c0b26d0 Don't use QStringLiteral in comparisons
For QLatin1String, operator== is overloaded, so comparing to a latin-1
(C) string literal is efficient, since strlen() is comparatively fast.

OTOH, QStringLiteral, when not using RVO, litters the code with
QString dtor calls, which are not inline. Worse, absent lambdas,
it even allocates memory.

So, just compare using QLatin1String instead.

Change-Id: I7af3bf3a67c55dae33ffaf9922d004fa168a3f9c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-10-09 09:42:00 +02:00
Marc Mutz
bf1df55846 Don't use QByteArrayLiteral in comparisons
For const char*s, operator== is overloaded, so comparing to a (C) string
literal is efficient, since qstrcmp doesn't require the length of the
strings to compare.

OTOH, QByteArrayLiteral, when not using RVO, litters the code with
QByteArray dtor calls, which are not inline. Worse, absent lambdas,
it even allocates memory.

So, just compare with a (C) string literal instead.

Change-Id: Id3bfdc89558ba51911f6317a7a73c287f96e6f24
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-10-09 09:41:51 +02:00
Marc Mutz
05663e29d0 moc: don't use QByteArrayLiteral
The byte array literals are only used to append them to another
QByteArray, so they offer only the static size calculation as a
benefit.

However, there are several drawbacks:
- QByteArrayLiteral data cannot be shared the way string literals
  can be, not even within a single TU, and they add a few ints
  for the QByteArrayData header which cannot reside in BSS, but
  need to be stored in DATA.
- QByteArrayLiteral *does* allocate when the compiler doesn't
  support C++11 lambdas.
- QByteArrayLiteral, when not using RVO, litters the code with
  QByteArray dtor calls, which are not inline, and thus can't
  be optimized away.

In particular, when used like this, they do not prevent any
memory allocation (in fact, they might add some, absent lambdas).

So, just append (C) string literals.

Change-Id: Iee5dba8dd970c5cc6df116afc1f8709a62356b06
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-10-09 09:41:40 +02:00
Friedemann Kleint
4a2cf9ca41 Fix license text and URLs in QMessageBox::aboutQt().
Point to new qt.io site, adapt licensing text.

Task-number: QTBUG-41798
Change-Id: I492df6a842c2b31e44653fb4388408c209f24f1e
Reviewed-by: Sami Makkonen <sami.makkonen@digia.com>
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-10-09 09:32:18 +02:00
Friedemann Kleint
858935fa66 Fix executable name of mousebuttons example.
Change-Id: Icf41ade3a4d2d14535e6fd42212b27ac01c5177f
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-10-09 08:35:32 +02:00
Joerg Bornemann
6e6c6f9868 fix VS 2008 project file generation
Commit 4f21eb03 utterly broke the project file generation for
VS 2008. The introduced filterByName convenience methods looks for
filter names like "Generated Files", but the code path for
VS <= 2008 used filter names like "GeneratedFiles".
The generated projects were valid but empty.
This commit ensures that both VS generators use the same filter
names.

Task-number: QTBUG-41821
Change-Id: I828fa911bae8d835b073a4c2260316127cc72cda
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-10-09 06:55:52 +02:00
Joerg Bornemann
e5a8134765 fix vcxproj generation for CONFIG-=flat
Commit 4f21eb03 broke the generation of non-flat vcxprojs.
XTreeNode passes filter names to outputFileConfigs that have
the source subdirectory suffixed (e.g. "Generated Files\subdir").
That's why the original code tested the filter names with
QString::startsWith.
I've changed the signature of outputFileConfigs to take a filterId
parameter which contains the unaltered filter name (e.g.
"Generated Files") that will determine the correct filter.

Task-number: QTBUG-41746
Change-Id: If33428526a098f433cd6ceb8ab6608bd9f94ef17
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-10-09 06:55:22 +02:00
Marc Mutz
9b80ed9d56 QCss: mark many classes as movable
Most of these are held in QVectors, so let QVector use the
optimized reallocation strategy.

Change-Id: I6c2182465c283705bd5ec761e3d2d3d072bc6207
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-10-08 13:58:40 +02:00
Marc Mutz
9a5e4ada9c QCss: Move declaration of ValueExtractor
Move it to the end of the header, since it was sitting right
in the middle of AST struct definitions without being one
itself.

Change-Id: I017d6187324e91f2745629dbed4271064d4e59a8
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-10-08 13:58:33 +02:00
Marc Mutz
3be9d6d116 QCss: unexport some classes
and export only the non-inline functions inside them.

Inline functions don't need exporting, and some compilers
are known to have problems inlining inline functions of
exported classes.

Change-Id: I843adc0ab493817e71f48ab87bfefb03d4ca918d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-10-08 13:58:27 +02:00
Richard Moe Gustavsen
707eb8d28d iOS: add system palette
Return a system palette that sets the correct
highligh (text selection) colors.

Change-Id: Ic0a18f931913f28bdc73d9ec4ae347fe38839f17
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-10-08 13:43:57 +02:00
Eskil Abrahamsen Blomfeldt
183d04de90 Add text ranges to QGlyphRunPrivate
This is an enabler for using the QGlyphRun in the selection
code of the scene graph node. In this case, we need to
know exactly which of the characters in the text are represented
by the glyph run, as a single range of text may result in
several glyph runs.

Change-Id: Ie8ec942693dceea45ab548f6cefc4f78e4c6d524
Task-number: QTBUG-41808
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-10-08 13:07:58 +02:00
Joerg Bornemann
b883cee471 WinCE: fix DLL build errors with CONFIG+=console
Since commit cd1dff75, we use QMAKE_LFLAGS_CONSOLE when linking DLLs that
are built with CONFIG+=console. Thus, we must not pass options that are
specific to linking executables.

[ChangeLog][qmake] WinCE makespecs must not add /ENTRY: to
QMAKE_LFLAGS_CONSOLE and more. The flag is hard-coded in console.prf now.
This is a side effect of making it possible to specify a subsystem for
DLLs.

Change-Id: Ib481fd45b12140f9f05bf123db7152a3ddf0fa04
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-10-08 13:05:05 +02:00
Topi Reinio
a366b2bb54 qdoc: Fix generation of qhp sections for unsorted pages
If you had the following lines in .qdocconf:

    qhp.QtFoo.subprojects.examples.title      = Examples
    qhp.QtFoo.subprojects.examples.indexTitle = Qt Foo Examples
    qhp.QtFoo.subprojects.examples.selectors  = fake:example

The expected outcome is to see an unsorted list of examples. This
didn't work however, because QDoc assumed to find a chain of
\nextpage links for the indexTitle, and these are rarely used
in Qt documentation nowadays.

This commit ensures that all pages matching the defined selectors
will be listed under the section title, even when the sortPages flag
is not set.

Task-number: QTBUG-41737
Change-Id: I1e7e2a2953de949c9b52763165c406a64d1d46f7
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-10-08 12:47:19 +02:00
Friedemann Kleint
fa096c1123 Change documentation links to point to qt.io.
Task-number: QTBUG-41798
Change-Id: I3a9edc5798d67da60ed1ea55540e2fcdd2e87371
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-10-08 11:12:11 +02:00
Jake Petroules
3b1de67fde Utilize Q_FORWARD_DECLARE_OBJC_CLASS in QCocoaFileDialogHelper.
Change-Id: I94ae91ac8fb625de4a328c6628ce0ab45919708f
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-10-08 02:29:54 +02:00
Marian Beermann
264fcd4eef Fix QDomDocument::importNode() crashing on null nodes
Task-number: QTBUG-12927
Change-Id: I597a149bb273fa132fdb34e3678ebc3069d6f516
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-10-07 23:08:18 +02:00
Thiago Macieira
50430a8392 Fix compilation of MIPS with Clang
Clang always sets __mips to 1, unlike GCC. To detect a higher MIPS arch,
we need to rely on the _MIPS_ARCH_MIPSxxx macros being defined -- or, in
this case, _MIPS_ARCH_MIPS1 not being defined.

Change-Id: Ib6846a6892a4c1e17e595a69305b7e46a5303ee7
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Adrian Perez de Castro <aperez@igalia.com>
2014-10-07 22:30:21 +02:00
Jake Petroules
1cc079c29b Add Objective-C specific type converters to QDateTime
This patch adds the Objective-C NSDate/CDateRef converters to
QDateTime

[ChangeLog][QtCore][Objective-C] Added NSDate/CDateRef converters for
QDateTime

Task-number: QTBUG-37116
Change-Id: I937ea927083a2767b5b17f10a48bf453c9ff8b01
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-10-07 18:54:21 +02:00
Dmitry Shachnev
3a25799413 Add Cinnamon to the list of Gtk+-based DEs
Change-Id: I6c2a374026fde30858f1a51f34fa195ef8f8fe37
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
2014-10-07 15:35:23 +02:00
Friedemann Kleint
a4aea7b578 MSVC: Restore 'public' accessibility of QVariant member functions.
The were made 'protected' as a side effect of a change enabling
support of template friends for MSVC. However, accessibility
is part of the MSVC's name mangling and thus BC was broken.

Task-number: QTBUG-41810
Change-Id: I5ce4c7010673c06d5b75219c89c7ebd337bac6c0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-10-07 14:33:40 +02:00
Andy Shaw
9884ec73dd Clean up the CFTypes used in popuplateFamily
Change-Id: Iabe127486c77ebb2afe7fe13ecccd70252a79031
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-10-07 14:23:57 +02:00
Morten Johan Sørvig
a7f1eb4ab3 Correct devicePixelRatio for software OpenGL
[NSView setWantsBestResulutionOpenGLSurface] is a
hint and the driver may ignore it, for example when
using software OpenGL on a virtual machine.

In these cases devicePixelRatio() must return a value
corresponding to the actual OpenGL surface size. Use
[NSView convertSizeToBacking] which is one of the
recommended methods.

Task-number: QTBUG-41767
Change-Id: Ia79242219908a2454a83b44b6eb7463372764162
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-10-07 13:31:59 +02:00
Oswald Buddenhagen
a1d66c9aee Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4 2014-10-07 13:31:20 +02:00
Nico Vertriest
ded6514de8 Doc: deletion plugin-howtos.qdoc
Document is moved to qtdoc/doc/src/howtos
Including snippet files.

Task-number: QTBUG-38412
Change-Id: Iba15689ad63e17c370c21c9ee5a1fff40c79fcec
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-10-07 13:26:28 +02:00
J-P Nurmi
6cd1257757 Fix native GTK2 dialogs to receive focus
Task-number: QTBUG-41406
Change-Id: I00f317e5ef62f63c37e9610e1f8ea00af2740b99
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-10-06 23:17:11 +02:00
Marc Mutz
10e3ce9e16 QWidget: simplify reading of an env-var in create()
Instead of initializing paintOnScreenEnv to -1 (thus forcing the
variable into the data segment), and then overwriting the -1 with
a read from the env-var, dynamically initialize the variable from
the env-var directly, thus allowing the variable back into the bss
segment (which doesn't occupy storage in the executable).

There may have been a reason to do it this way when the old code
could fail due to the memory allocation involved, but now with
qEnvironmentVariableIntValue(), that is no longer a reason.

Change-Id: I6547a81f69b0b57dc49bb4dd3ba1865ce8ac5b86
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-10-06 20:39:16 +02:00
Marc Mutz
d8838ee126 Simplify QWidgetPrivate::map{To,From}WS()
Change-Id: I065a173601d45ddb8ec52e721dfc596a487637fe
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-10-06 20:38:37 +02:00
Marc Mutz
41a1b4daae QDesktopWidget: use qDeleteAll()
Change-Id: Icfbf47309e425deabcef81c8f11b8e42fcc9cdcc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-10-06 20:38:29 +02:00
Alex Trotsenko
06632928af QIODevice: Improve read buffer use
Change buffer fill strategy to have more cached data for next read call.
This avoids unnecessarily many small reads from device implementation layer.

Change-Id: If1a039524afc03c02d2299babbfccef09f3f1cf0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-10-06 17:22:39 +02:00