Commit Graph

20821 Commits

Author SHA1 Message Date
Mitch Curtis
06e706bdbb Fix QAbstractListModel's detailed description.
Change-Id: I3f3e6b9d4e021620505c03458e78856326dcd859
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-10-17 22:14:00 +02:00
Joerg Bornemann
dc612acdc6 fix PRECOMPILED_SOURCE regression in vc(x)projs
Commit af760349 in Qt4 broke the possibility of having a
PRECOMPILED_SOURCE in a different directory than the
PRECOMPILED_HEADER.
Do not write the PrecompiledHeaderThrough value for the
PRECOMPILED_SOURCE, but use the project default.
The msbuild code path needed adjustments to write the
UsePrecompiledHeader value, even if PrecompiledHeaderThrough is
empty.

Task-number: QTBUG-41917
Change-Id: I74e621f6618cf056e3967c99a2215f76c346b9ee
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-10-17 16:52:14 +02:00
Louai Al-Khanji
1c91ce375e eglfs: try to query real cursor size instead of hardcoding 64x64
We still fall back to 64x64 if the query fails for either width or height.

Change-Id: I39682f30c94cfd9932667a9bb15947e50ee0de1d
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-10-17 15:48:18 +02:00
Louai Al-Khanji
d63e012fcd eglfs: Make KMS hooks compile on older systems
drmModeSetCursor2 has not been available for very long and doesn't
actually buy us much, so don't use it. Also one more missing cast.

Change-Id: I1120b933759bbabf73edd23bfc837a2a27a93a0c
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-10-17 15:48:14 +02:00
Christian Strømme
3d94a564f4 Android: Improve cache logic in findClass()
This change adds guards to ensure that we only do a class
look-up once when calling QJNIEnvironmentPrivate::findClass().
IF someone calls findClass() with an environment that does not contain
a "valid" class loader, we should fallback to loadClass(),
but only once.

Change-Id: If5fc82956db889f3269bb33c98a16c49cae55def
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2014-10-17 14:58:23 +02:00
Topi Reinio
cf8f369f85 Move Qt Core examples under a common subdirectory
Qt Core examples were scattered into several subdirectories under
qtbase/examples. This caused an issue with the example manifest
file generated by QDoc; it expects to find all examples under a
common directory in order to produde correct paths to the example
.pro files. Qt Creator will not find the examples without a valid
manifest file.

This change moves the examples and edits the documentation files
accordingly.

Task-number: QTBUG-41963
Change-Id: I51d86782e0ba21c5c9bae5f15401ec774abe5cf8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2014-10-17 14:57:13 +02:00
Marc Mutz
45485d9eb4 Fix undefined behavior in QLoggingRegistry::defaultCategoryFilter()
Report by asan:

  READ of size 2 at 0x00000041dd40 thread T0
    #0 0x2af097b84da6 in QLoggingRegistry::defaultCategoryFilter(QLoggingCategory*) (lib/libQt5Core.so.5+0x566da6)
    #1 0x2af097b8387b in QLoggingRegistry::registerCategory(QLoggingCategory*, QtMsgType) (lib/libQt5Core.so.5+0x56587b)
    #2 0x4067f7 in tst_QLogging::QLoggingCategory_categoryName() tests/auto/corelib/io/qloggingcategory/tst_qloggingcategory.cpp:238
    <snip>

  0x00000041dd41 is located 0 bytes to the right of global variable '*.LC115' defined in 'tests/auto/corelib/io/qloggingcategory/tst_qloggingcategory.cpp' (0x41dd40) of size 1
    '*.LC115' is ascii string ''

At face value, memcmp("", "qt", 2) should not return 0, but since
the code invokes undefined behavior, the compiler can do whatever
it wants, including returning 0 here, further proving the fact
that there are *no* benign cases of undefined behavior.

Change-Id: I0c38622c47d1dcea450ea549370be1673b47b18d
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-10-17 14:56:07 +02:00
Friedemann Kleint
db069e7f30 XCB: Always set X window attributes in QXcbWindow::setWindowFlags().
QDockWidget and QToolBar set the Qt::BypassWindowManagerHint window flag
when unplugging and clear it in the endDrag() methods. This does not have
any effect since the attribute is not taken into account in
QXcbWindow::setWindowFlags(). Change the method to always set the attributes,
which should also make it possible to set/clear Qt::WindowTransparentForInput.

Task-number: QTBUG-41189
Task-number: QTBUG-38964
Change-Id: Id9eddc642489d18f44c7597f8fc1a1df71971306
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
2014-10-17 14:56:05 +02:00
Kai Koehne
16df1ad322 Export QFSFileEngine symbols
Although it's private API the symbols are used e.g. in the
Qt Installer Framework.

Change-Id: I557d3b86dbf87cb1b712bae09c3e8fecf6f15e67
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-10-17 14:55:59 +02:00
Friedemann Kleint
0368b24a7f QSettings: Prevent assert when passing empty keys.
[ChangeLog][Important behavior changes][QSettings]
QSettings::value() now returns an invalid QVariant
when passing an empty key. The code path ran into
an assert, which was only noticeable in debug
builds.

Task-number: QTBUG-41812
Change-Id: I5cc32be3aa267a132e9d6639ecd6cb0bbafc15b0
Reviewed-by: Stéphane Fabry, Cutesoft <stephane.fabry@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-10-17 14:55:45 +02:00
Martin Smith
4f1de1432c qdoc: Generate QA pages
qdoc has a new command line option, -write-qa-pages. Using this
flag on the command line will tell qdoc to generate a QA html page
in each module's output directory. The QA page contains information
that is useful for Quality Assurance checking of the module's docs.
The QA file name begins with "aaa" so it will always be listed at
the top of the output directory. The file name for the QA file for
QtCore, for example, is aaa-qtcore-qa-page.html.

Currently, the QA page only contains a report listing the intermodule
link count for each module that is the target of links from the
documented module.

The link report can be used to optimize the search order qdoc uses
when resolving inter-module links. By default, the search order
is the same as the ordering of the modules in the depends list
in the .qdocconf file. Using the report, the user can reorder
that list according to the number of links found in each module.
i.e. in descending order of link count.

The modules are listed in descending order of link count.
Additionally, an actual depends variable is printed. It can
be cut and pasted into the module's qdocconf file.

Change-Id: I442596aeb54dcdd5db4a0821096a5273c15627e6
Task-number: QTBUG-41850
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-10-17 10:43:05 +02:00
Martin Smith
77165553af qdoc: qdoc was too slow
The hard-coded search order is now removed. The search order
is now constructed from the depends variable in the qdocconf
file.

The basic idea is that qdoc is run once. It gets a list of all the
qdocconf files for the modules in Qt5.
First, qdoc runs in -prepare mode for each qdocconf file in the list. It
generates the index file for each module, but these index files are
never used. At the end of the -prepare phase for each module, qdoc keeps
the tree structure for the module in a collection of trees.
Second, qdoc runs in -generate mode for each qdocconf file in the list.
But now it uses the existing tree for that module, so it doesn't have to
read the sources files again, and it doesn't have to read any index
files. Now it generates the docs for each module.

The runtime for qdoc has been reduced
by 90% when running qdoc for all of Qt5 on a not so new iMac.
Before this update, qdoc took about 10 minutes to generate
docs for Qt5. Now it takes a little over 1 minute. The new
way to run qdoc is described in the Qt bug report referenced
here.

Note that running qdoc this new (old) way also generates
fewer qdoc errors than when running qdoc the old way. This
indicates that the index files qdoc uses when running the
old way are incomplete.

Note also that the old way of running qdoc is not affected
by this update. The old way is still required for running
qdoc in the current qmake/make system. That process must be
changed to be able to use the faster qdoc. The details are
provided in the Qt bug report.

Change-Id: Ibec41d6fbaa9fc8cd070a05d04357bd02c4478f0
Task-number: QTBUG-41705
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-10-17 10:42:56 +02:00
Ulf Hermann
880986be23 Check for integer overflows in places where qAllocMore is used
Task-number: QTBUG-41230
Change-Id: I5e932c2540c0bd67f13fab3ae20975d459f82c08
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-10-17 10:09:18 +02:00
Ulf Hermann
9eb2b25300 Don't dereference pointers on QArrayData deallocation
If the allocation fails the pointer will be 0. That is OK for free(),
but we shouldn't try to check for static data then.

Change-Id: I0a8860c9e04833e3be79f7a8a39bdaffeb488f35
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-10-17 10:00:42 +02:00
Ulf Hermann
9d44645eae Do Q_CHECK_PTR on all results of QArrayData::allocate()
QArrayData::allocate() uses malloc() which can return 0. We need to
check for that when using it inside other containers. The containers
might otherwise return a seemingly valid result from some allocating
operation which is actually corrupt.

Task-number: QTBUG-41231
Change-Id: I16cc6035e4f495f519bd38bf29cee080ee0637f6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-10-17 09:58:56 +02:00
Marc Mutz
f93870ed44 QtDBus: use qEnvironmentVariableIntValue()
It doesn't allocate memory, so cannot throw and is a lot faster
than qgetenv().

Change-Id: Ib0c0f903531a3a656919e87df8065a9c6c7a666c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-10-17 09:51:11 +02:00
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
Alexander Volkov
1b8c5f450b xcb: Fix a type of variables for xkb modifiers masks
Change-Id: I05c7c6a649a55fc0648b1cb84e1c402160c9d998
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
2014-10-16 21:51:31 +02:00
Alexander Volkov
50398708cd Accessibility Linux: Make a full copy of a key event
Otherwise native values (scan code, modifiers, virtual key) of the key event
will be lost if an event listener is registered.

Change-Id: I5eebb1f91ad7de6801f7efb0bf0891c4430f9cf5
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2014-10-16 21:51:05 +02:00
Alexander Volkov
e8e1616cf2 Reduce code duplication in QFontconfigDatabase
Extract common part from fontEngine() methods to setupFontEngine().

Change-Id: Id4aee43b2a477f9fd40dc564d96a2335bfde9e22
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
2014-10-16 21:49:21 +02:00
Alexander Volkov
d904533acb xcb: Don't return 0 as a possible key for a shortcut
QXcbKeyboard::keysymToQtKey() may return a value of 0 for keysyms
that are not supported by Qt (e.g. for XK_ISO_Next_Group).
It is then translated to an empty QKeySequence which in turn is
detected as a partial match for any shortcut.
The behavior of QShortcutMap::nextState() becomes broken because
it sets current state to QKeySequence::PartialMatch while there is
no match at all.

Task-number: QTCREATORBUG-9589
Change-Id: I1e2a4511a876dfa418db9906d10382255a2e4d62
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
2014-10-16 21:49:02 +02:00
Laszlo Agocs
6d1c4c8862 Avoid breaking BC with new virtuals in QOpenGLPaintDevice
Task-number: QTBUG-41046
Change-Id: Iab628d2d6811d528e2cc513b6f8a74baa628541d
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2014-10-16 21:47:29 +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
Friedemann Kleint
a4ac4b3263 QWindowsGuiEventDispatcher: Register timers in constructor.
Port change 3716a76704273fdbe5ad4ec978438daeda606c26 (Qt 4)
to Qt 5. Enforce the creation of the internal window
and registering of timers in the event dispatcher constructor
for GUI applications instead of delaying it to processEvents()
is called. Move the call to virtual wakeUp() out of
createInternalHwnd().

Task-number: QTBUG-40881
Change-Id: I82a4748897da140a39feff882c75ad5ac6155148
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-10-15 15:16:38 +02:00
Friedemann Kleint
7095cdabc9 QTestLib: Remove valgrind version check.
Version 3.3 is now assumed to be widely available.

Task-number: QTBUG-41453
Change-Id: I453ce26d170b2bbb8179ddf4b91155ddd3e6379a
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2014-10-15 15:16:29 +02:00
Topi Reinio
65b563fe57 qdoc: Fixed recursion of \sincelist command handling
QDoc uses a recursive method of resolving all the classes, QML types,
properties, functions etc. added since a specified Qt version.

The code entered the next level of recursion only if its parent had
set a \since version, which was not always the case.

Task-number: QTBUG-41862
Change-Id: I3803ed9ffa472165754358f3906955430a893de1
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-10-15 14:47:27 +02:00
Jan Arve Saether
648623ff23 Consolidate how contentDescription is calculated.
Previously, the behavior was different depending on if the
contentDescription was calculated as a result of an event, or if it was
calculated as a result of hierarchy traversal.
Refactor the functionality into one single function that will be used in
both scenarios.

'contentDescription' will now receive its value from one of the following
sources, listed in prioritised order (QAI == QAccessibleInterface):
1. QAI::text(QAccessible::Name)
2. QAI::text(QAccessible::Description)
3. QAI::text(QAccessible::Value)
4. QAI::valueInterface()->currentValue()

Change-Id: I2e4958a1e95b5f20d01da37c23ecbc09842360bc
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2014-10-15 14:24:46 +02:00
Oswald Buddenhagen
29ad07d0a4 Avoid sleeping 100ms in QProcessPrivate::drainOutputPipes()
There is no point in waiting 100 milliseconds after each iteration, as
all data that we may possibly read will be already in the pipe. We only
need to give the notifier thread a chance to inform us, which is best
achieved with a yield.

Task-number: QTBUG-41282
Change-Id: Id654b688246508494a5549c11900f9ad2957f192
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2014-10-15 13:44:17 +02:00
Tor Arne Vestbø
3edce263fb Prevent 'recursive' update events when calling QToolButton::setMenu()
Commit bb3d2ca9f1 (QToolButton: properly reset the size hint when a
menu is set on it) didn't take the case of re-setting the same menu
into account, and the result was that we would unconditionally cause
an update, resulting in the following backtrace again and again, as
each posted update event was processed by the event loop:

    frame #0: QToolButton::setMenu(this=0x7af59500, menu=0x00000000)
    frame #1: QToolBarLayout::setUsePopupMenu(this=0x7ae65a30, set=false)
    frame #2: QToolBarLayout::checkUsePopupMenu(this=0x7ae65a30)
    frame #3: QToolBarAreaLayoutLine::fitLayout(this=0x78e5f870)
    frame #4: QToolBarAreaLayoutInfo::fitLayout(this=0x790be278)
    ...

Besides consuming needless CPU time this also uncovered a case on iOS
where Qt would starve native events and animations from being processed,
preventing eg. rotation animations from running.

Change-Id: Ib6bd4ba21d8e84ca73fb0a75b598016dbd9ae0fd
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-10-15 13:34:30 +02:00
Morten Johan Sørvig
f5cf06f4af Cocoa: Send obscure events on OcclusionStateHidden
This disables animations for windows that are
completely obscured by other windows.

On examples/quick/animation, obscured CPU usage goes
from 10% to 1%.

Change-Id: I9945431e6387e406e2064c08d5aa01d5d96ef602
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2014-10-14 18:15:04 +02:00
Laszlo Agocs
ebc835c2aa Fix QOpenGLWidget on Cocoa when used as viewport
Having a QOpenGLWidget as a graphics view viewport was not functioning
on OS X: it was showing incomplete content due to accessing the texture
attached to the framebuffer object before the rendering is complete.

On the normal path, when rendering is done via paintGL(), the flush was
there. When used as a viewport however, this path is not used. The missing
flush is now added for the other case too. For performance reasons, we will
not flush on every paint engine end(). Instead, the flush is deferred until
composition starts.

QGLWidget also featured a weird on-by-default autoFillBackground concept. To
maintain compatibility with apps that used QGLWidget as the viewport for
QGraphicsView, we will now do the same for QOpenGLWidget, but only when it
is used as a viewport. For regular QOpenGLWidgets autoFillBackground defaults
to false, like for any other widget. The docs are extended with a small section
about differences between QGLWidget and QOpenGLWidget.

Task-number: QTBUG-41046
Change-Id: I42c2033fdd2ef5815783fd640fe11373761061e0
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-10-14 18:14:52 +02:00
Frederik Gladhorn
b55a688b61 Merge remote-tracking branch 'origin/5.3' into 5.4
Change-Id: Ic01820f2390e419a5b286643e7351e85ae032473
2014-10-14 13:54:50 +02:00
Eskil Abrahamsen Blomfeldt
4bf0660ae4 Make QStringRef::right() consistent with QString::right()
The implementation was inconsistent with QString::right(),
and did not return the N rightmost characters but actually did
the same as QString::mid(N) (returning the rightmost size - N
characters.)

Since this function is fairly recent (Qt 5.2), is documented to
behave the same as QString::right(), and since these APIs are
meant to be interchangeable, this needs to be fixed, even though
it changes behavior.

[ChangeLog][Important Behavior Changes] Changed QStringRef::right()
to be consistent with QString::right(). The function now returns
the N right-most characters, like the documentation already claimed.

Change-Id: I2d1cd6d958dfa9354aa09f16bd27b1ed209c2d11
Task-number: QTBUG-41858
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-10-14 11:32:55 +02:00
Richard Moe Gustavsen
5d9dcac0f2 qplatformmenu: remove unused and deprecated function
Now that all platforms use the popup function that
takes a target rect, lets remove the deprecated one.

This is sort of important, since QtQuick controls now
uses the new version. So if a (new) platform ends up only
implementing the old version, that can end up not
working correctly.

Change-Id: I34814b3de5ea4954cf21b161e8a834e39e5534c8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-10-13 22:13:18 +02:00
Richard Moe Gustavsen
afefc89d0f osx: let qcombobox specify target rect when showing popup
Let qcombobox use the new API for showing a native
popup menu (introduced with 1a47595).

Change-Id: Id08ef9e59fdd47b2c1df84fa72e3a2c69fe187b0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-10-13 22:12:57 +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
d92a9ca2d3 Update QOffscreenSurface docs regarding threads
Change-Id: Ic2e3230835aa7fc1b1c3ac0530a65cd478e1ec5f
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2014-10-13 14:00:21 +02:00
Lorn Potter
d0a6fcd925 Fix QtBearer connman backend report correctly on lte network
Task-number: QTBUG-41813
Change-Id: I977facc2ee59571d24e60ac9d5d41e957403b344
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-10-13 13:53:39 +02:00
Gabriel de Dietrich
b380bcc7e2 QMacStyle: Fix QPushButton with menu appearance on 10.10
As usual, this includes small and mini control sizes.
Flat and oversized buttons will fall back to the HITheme
rendering for now.

Task-number: QTBUG-40833
Change-Id: I08d67c48b2e72681af4dc4a37ea498f7aac1dca0
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-10-13 13:53:34 +02:00
Maximilian Hrabowski
4cbb99c5e2 QAbstractItemView: fix CTRL+A select all behavior
The check for Qt::Key_A to handle selectAll was changed to directly
compare to QKeySequence::SelectAll as this will only match Ctrl. The
former implementation also triggered when e.g. Shift was pressed.
Added a check that selectAll is only called when selection is not
disabled, i.e. selectionMode=NoSelection.

Added a unit test for selectAll().

Task-number: QTBUG-26687
Change-Id: I721e7ab590b55d7d754b3b74ef01756fa5aa1315
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-10-13 13:53:28 +02:00
Dyami Caliri
2b4cda3852 QMacStyle: save context state before changing to avoid crash
qt_drawFocusRingOnPath was saving the graphics state after setting
a new context. This leads to zombie NSBitmapGraphicsContext access
with QFileDialog.

Task-number: QTBUG-41879
Change-Id: I7fc7d959d2b0f01cb3491d639023083f1b46d175
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-10-13 13:53:24 +02:00
Giuseppe D'Angelo
26fbeecfa5 Initialize QFileSystemMetaData::size_ data member
There's a code path which reads that member before it got anything
assigned to it, triggering undefined behavior.

The code path goes as follows:

1. an instance is created in QFSFileEngineIterator::advance
2. the instance is passed to QFileSystemIterator::advance, which fills in
   only some members (not size_)
3. the instance is passed to QFileInfoPrivate which does a deep copy,
   reading an uninitialized size_

Change-Id: I6835ee701a83b63ca4bad6235feeb6a23566fcd3
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-10-13 13:53:17 +02:00
Marc Mutz
df2afcad2f QTableGenerator: replace a call to a member function with direct element access
Saves one copy of a vector.

Change-Id: I3a14c46e306c3d44a64c6e0d8cd2f120b2c208d7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-10-13 13:50:04 +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