Commit Graph

12918 Commits

Author SHA1 Message Date
Jan Arve Saether
6e7b8f79cb Fixed a typo in the comment.
The orientations involved here can be easy to mix up,
so don't make it more confusing.

Change-Id: I73c4765ebbc89feced12898ac6001eb68db0e21c
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-04-03 11:38:35 +02:00
Bernd Weimer
d20851f8ec Avoid socket notifiers on invalid file descriptors
There is potential trouble and no point in registering a QSocketNotifier
on an invalid file descriptor. This is prevented now in addition to the
existing warning.

Change-Id: I6fc3c639b167ea98d09a2738986360cc4b3fc210
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-04-03 09:25:22 +02:00
Thorbjørn Lund Martsum
01b4b7f917 GraphicsView - add Q_DECL_OVERRIDE to the manual rubber band test
This adds Q_DECL_OVERRIDE to the virtual functions in the test.

Change-Id: If1b7646c9a6f50c6efe2d03d253bd8e0b4c09716
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Laszlo Papp <lpapp@kde.org>
2013-04-03 07:00:12 +02:00
Konstantin Ritt
32983c2027 Improve QTextEngine::elidedText() in TextShowMnemonic mode
Check if the sequence is really a mnemonic and emulate grapheme cluster if so,
rather than blindly reset the next character's attributes.
This covers cases like "& ", "&<U+034F>", etc.

Change-Id: Ibb063a2d258aff6455b9bb41bbe1a58a5036d0d6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-04-02 22:23:28 +02:00
Peter Hartmann
9efd40bd77 QNetworkAccessManager: track online / accessible state without session
In particular, set online state right upon construction of the
QNetworkAccessManager instance. Therefor, QNAM needs an instance of a
QNetworkConfigurationManager internally.
Before, this would only work properly if a network session was created.
Now, networkAccessible() returns the correct status.

Change-Id: I7ff9ccfd18ad376a131fc5977843b55bf185fba0
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2013-04-02 10:46:23 +02:00
Peter Hartmann
16269904a2 QNetworkAccessManager: store QNetworkConfiguration instead of identifier
In case a network session is not required, we need access to the
configuration object rather than to the QString.

Change-Id: I05945525ce8247e343d0bebd7ec15e0e162ed826
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2013-04-02 10:46:17 +02:00
Montel Laurent
4a5182e63d Check 'node' for NULL before derefencing it, not after
Change-Id: Iab4b28997d9d13645375284083e4e603e02cec5c
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2013-04-02 01:40:04 +02:00
Rafael Roquetto
eb42513a50 BlackBerry: fix compilation
Remove a leftover #endif from the merge with stable

Change-Id: Idd0509d2ddcc3e8e7914aaa59beabc8036f45fff
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-04-01 20:42:52 +02:00
Stephen Kelly
f84cb43eda Add automatic metatype handling for common standard library containers.
Change-Id: I7fc6db6ea71026066d3e3fa4bfd5ecd5c96ad067
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-04-01 13:49:57 +02:00
Konstantin Ritt
e006624a42 Improve shapeTextWithHarfbuzz() logic a bit
* Move non-specific code to shapeText();
* Make shapeTextWithHarfbuzz() re-use variables obtained in shapeText();
* Make shapeTextWithHarfbuzz() return amount of shaped glyphs
  instead of nothing. Right now, this is not about error reporting,
  since failed shaping causes assertion/crash in most cases.

Change-Id: I2e0c91b9e5de8b19e0bc22ca60add1b1fc6ebdb0
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-04-01 11:54:09 +02:00
Konstantin Ritt
af553b7b1b Replace HB_JustificationClass with QGlyphAttributes::JustificationClass
Also move stringToGlyphs() helper closer to shapeTextWithHarfbuzz(),
where it is only used.
As of now, Harfbuzz-old dependency in QTextEngine can be disabled
by simply if-defing a single piece of code.

Change-Id: Ic6f7d9b64bf9201d7540c58db46e20f28de8120d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-04-01 11:53:58 +02:00
Tor Arne Vestbø
d817da8797 iOS: Specify framework dependencies in the right place
Instead of unconditionally linking to Foundation, UIKit, and QuartzCore,
we leave the dependencies for the iOS platform plugin, where the libs
are actually used.

Change-Id: Ie8cfad2c8230d1f1af6933b831e443fecb0c93f1
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-03-31 23:46:37 +02:00
Sergio Ahumada
cd5acab7aa Bump Qt version to 5.2.0
Change-Id: Id2a4b8fb00837154a7fc1bf96060c0cdc808f13d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-03-29 12:16:26 +01:00
Montel Laurent
0eccc02ff1 Remove unused variable
Change-Id: I2c38192d0f913e91da44f487e5313c526ebb2fbc
Reviewed-by: David Faure <david.faure@kdab.com>
2013-03-29 10:31:51 +01:00
Bernd Weimer
6b413dc32c QNX: Added warning when low memory event is received
Low memory warning has been added for debug purposes.

Change-Id: I3ca4f1e68cec0914ce8d77b5bed4cde210c031fa
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-03-28 23:22:19 +01:00
Frederik Gladhorn
ad809526d6 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/plugins/platforms/qnx/qqnxtheme.cpp
	src/widgets/dialogs/qfileinfogatherer.cpp
	src/widgets/dialogs/qfilesystemmodel.cpp

Change-Id: Ifa536969c4beafcdfeebbf6beda1674b86750be8
2013-03-28 12:33:32 +01:00
Morten Johan Sørvig
c7cca2dd74 Make QMacStyle paint right side up again.
491dcbfac8 accidentally removed the y-axis inversion
for the widget case. Move it back to the common
code path.

Change-Id: Ie6bbe6f442ca342347af77071da3a743b5655159
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-03-28 08:04:38 +01:00
Debao Zhang
ba3418ae75 QtWidgets tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
Change-Id: I1264784d6984edc70bf07e58ed763e1d1b001d7d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-03-28 02:02:14 +01:00
Debao Zhang
f6e739d9e3 QtWidgets tests: Replace qFindChild{ren} with QObject::findChild{ren}
Change-Id: I79a26387bcce0d7f79f4f9f70293e97dae52f949
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-03-27 19:34:22 +01:00
Frederik Gladhorn
8d009b38c8 FileDialogs: Set shortcuts for navigation buttons.
Change-Id: If2ad1af096787e3e1dc424c096566f382ba7a3b5
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-03-27 17:16:37 +01:00
Frederik Gladhorn
8b4888afb2 Test with random qobject instead of widget twice
Change-Id: Ibece0f65dafa7fc59486c5a4c1467c93636b93c1
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-03-27 17:16:37 +01:00
Axel Waggershauser
5fcf441392 Fix '=' alignment and replace tabs in *.conf (whitespace only change)
Replace all tabs with proper space characters and consistently align
the '=' characters. The default alignment for the '=' of 25 characters
has been left as is to get a minimal diff. Lines with the '=' further
to the right and those belonging to 'proper code (TM)' have not been
touched.

The work was mostly done using the following python script (might
come in handy again...):

import sys, re
indent_eq = 25 + 0*4 # 25 characters was the most widely used indentation for the '=' character
p = re.compile(r'(\w+)[ \t]*([\-\+]?)(=$|= )[ \t]*(.*$)')

for fn in sys.argv[1:]:
    with open(fn, 'r+') as f:
        lines = []
        nl_count = 0
        continuity_indent = None
        for l in f:
            m = p.match(l)
            nl = l
            if m:
                n_spaces = max(m.start(3), indent_eq - 1) - len(m.group(2)) - len(m.group(1))
                if m.group(2) and m.start(2) >= indent_eq-1 and m.start(2) % 4 == 0:
                    n_spaces -= 1 # left-shift '+=' by one if the '+' is aligned to a multiple of 4
                n_spaces = max(1, n_spaces) # we want at least one space before '='/'+='
                nl = m.group(1) + ' '*n_spaces + ''.join(m.group(2,3,4)) + '\n'
                continuity_indent = nl.find('= ') + 2 if l[-2] == '\\' else None # remember indent on '\\$'
            elif continuity_indent:
                nl = ' '*continuity_indent + l.lstrip()
                if l[-2] != '\\': # check when to stop the continuation
                    continuity_indent = None
            elif l.startswith('#'):
                nl = l.expandtabs(2)
            if l != nl:
                nl_count += 1
            lines.append(nl)
        if nl_count > 0:
            print fn, nl_count, len(lines)
            f.seek(0)
            f.writelines(lines)
            f.truncate()

Change-Id: I1d2870d0a2fe2e30d398c140fe523e69dd20c81b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-27 17:16:37 +01:00
Gabriel de Dietrich
bbfbf9d24c Mac style: Remove suspicious assignment
Change-Id: I070eeb27b1630331afd7f4f02aadf97f6ea2bf97
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-03-27 17:16:37 +01:00
Gabriel de Dietrich
4ea11e82ec QCocoaScreen: Properly align secondary screens w.r.t. primary screen
When using different resolution screens, one can arrange them around
the primary screen. However, the vertical offset has to take into account
the fact that NSScreen origin is bottom-left, whereas QScreen origin is
top-left. This usualy impacts the geometry's y coordinate, and can result
in popups showing in the wrong screen.

Task-number: QTBUG-30348
Change-Id: I159e6be2b590bd2d9a31f3f36c3785afcc62123e
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-03-27 17:16:37 +01:00
Stephen Kelly
ec37cdbc80 Populate includes, defines and pic flags in target interfaces.
Used by features in CMake 2.8.11.

This matches the features in FindQt4 in that version of CMake,
namely that the IMPORTED targets contain the appropriate
INTERFACE_INCLUDE_DIRECTORIES and INTERFACE_COMPILE_DEFINITIONS
and that the qtmain.lib static library is automatically linked to
on Windows by executables. Additionally, the
INTERFACE_POSITION_INDEPENDENT_CODE property is set appropriately
if Qt requires users to use position independent code.

Change-Id: Ide341f43fcaf7d722a7bdf1a12b1071c7e548ccc
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-03-27 14:54:49 +01:00
Sérgio Martins
9149f31aea Windows: Fix the last file dialog bottleneck.
Went from taking 30 seconds to 2 seconds, on a SDCard with 10k files.

Windows file dialog does not resolve NTFS symlinks,
it just shows an empty icon, and the link name, not the target.

This allows for a big performance gain by reducing the number of
calls to GetFileAttributesEx() by checking the extension directly.

This also fixes the problems with the native file dialog, which
for some reason, is creating a QFileSystemModel too.

Task-number: QTBUG-13182
Change-Id: Ie2739765fd6c7daea64e3cf1d208ba9720bd39f2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-03-27 14:26:09 +01:00
Venu
70115a8107 Doc: Corrected a typo in the constructor documentation.
Task-number: QTBUG-30162

Change-Id: I2db9ae7b5bab82cf4b65dc35bcb904ffbfb9e115
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2013-03-27 13:24:44 +01:00
Friedemann Kleint
28881a91f0 Add qDebug() output for QTouchEvent.
Task-number: QTBUG-29946
Task-number: QTBUG-29254

Change-Id: I9371954caf4166041239684e90c09b12038065d3
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-03-27 13:19:59 +01:00
Volker Krause
a3f74835f8 raspberry pi: add /opt/vc/include/interface/vmcs_host/linux to GL includes
This matches upstream changes on https://github.com/raspberrypi/firmware/

Change-Id: Ie28c2fa574d5cd097c033926970db40e8904e42e
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
2013-03-27 08:36:10 +01:00
Montel Laurent
12d8432c69 Fix infinit loop
Change-Id: Ie1edfeae72e033b14e16cc4c5c9e388f11be1627
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-03-27 08:11:57 +01:00
Debao Zhang
1fb3d56efb QtWidgets tests: Don't use the deprecated QTest::qWaitForWindowShown()
Change-Id: I2dd5a54f9485591ca2dab65f7a352ef453c185e2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-03-27 06:01:11 +01:00
Debao Zhang
90d74f8602 QtWidgets tests: Don't call the empty function QApplication::syncX()
Change-Id: I2c732afd43586209cf5a2b72caac53e34abb9090
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-03-27 06:01:11 +01:00
Debao Zhang
f57a3c0ba3 tst_qgraphicseffectsource: Don't use the deprecated QGraphicsItem::children()
Change-Id: I0cc0c5284a675fb1c7f960e9790baa89c56112b1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-03-27 06:01:11 +01:00
Rafael Roquetto
5d12417c94 BlackBerry: Native BB10 QFileDialog support
Change-Id: I4e83fbc6ba425d237b08056b45f9bcf47751bfce
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Tobias Koenig
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
2013-03-27 03:54:59 +01:00
Debao Zhang
bca0ee7115 QtXml tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
Change-Id: Ifb9363fb6d397a91501fc906454e172731d4c06d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-03-27 03:54:48 +01:00
Debao Zhang
dd4220b6e6 QtGui tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
Change-Id: I48c83fa0c5eccd86a5242fc8ed51ac6d7623f7f3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-03-27 03:54:42 +01:00
Debao Zhang
670aae7d8d QtConcurrent tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
Change-Id: Ia0c4751b891ae81a66b072bc504b555d81625172
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-03-27 03:54:25 +01:00
Debao Zhang
495f7cafdb QtTest tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
Change-Id: Id67ab0ea3be47d3b365aa01a354829b8745b7250
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-03-27 03:54:20 +01:00
Joerg Bornemann
925fd32a2d qmake/Win: disable "find highest lib version" feature by default
The undocumented feature of linking the library with the highest
version number is more confusing than helpful.
We're changing the default from on to off now.
Users who still need this feature can turn it on with:
    CONFIG += link_highest_lib_version

Task-number: QTBUG-15596

Change-Id: Ic998c1685003caa6f57e27dccf83c8b4a2a09553
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-26 21:44:15 +01:00
Morten Johan Sørvig
d616915b0a Support high-dpi images.
When Qt::AA_UseHighDPIImages is set images and pixmaps
may be of the high-dpi type.

Account for this when calculating layout sizes by
clamping the size or dividing by devicePixelRatio()
to go from device pixels to device-independent pixels.

Change-Id: I7b7f4c36ebd83d72ecdf6fbe0ae20e20ed6540bb
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-03-26 21:44:15 +01:00
Morten Johan Sørvig
491dcbfac8 Cocoa: Make retina desktop components work.
Scale non-widget paint devices as well.

Change-Id: Ic68fb166058e9b162f8baeab81196ee254f30b2e
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-03-26 21:44:15 +01:00
Michael Brasser
87b3aa9f4f Revert "eglfs: Disable eglfs when evdev is not present"
evdev support in eglfs is now guarded by QT_NO_EVDEV, so this
check is no longer required. This allows eglfs + tslib to be
a supported combination.

This reverts commit a95e396a83.

Change-Id: Icf7c15121b7eca1131d412b05b956cd5d7f189ae
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-26 21:44:15 +01:00
Michael Brasser
bb4e2e4faf Allow tslib to be specified at configure time.
Change-Id: I0ebf0eeea7e6a0b8136fb805f34f04082bc58c5e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-26 21:44:15 +01:00
Thiago Macieira
bafd3fdf1c Make the inline CPU detection functions also static
Since qCpuHasFeature() checks the static qCompilerCpuFeatures variable
and that variable's value might change depending on the compiler flags,
it's best to ensure that the function is not subject to link-time
merging. That would be bad if it happened when qCpuHasFeature() was used
from a file with higher CPU compiler settings than the default, as it
would incorrectly conclude that certain features are always available.

Change-Id: I8bacde056fb89869ec1d306a163742e72522315e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-03-26 21:44:15 +01:00
Sérgio Martins
b611da0d97 Windows: Fix one of the two file dialog bottlenecks.
This patch reduces the number of calls to GetFileAttributesEx()
when icon lookup is being done.

The second bottleneck is a couple of isSymLink() calls. Will fix
that next.

Task-number: QTBUG-13182
Change-Id: Ife3ff6cfb49d2294c501253ccc55d8c26036be94
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-03-26 21:05:39 +01:00
Morten Johan Sørvig
03d057ff01 Cocoa: Make touch events work again.
Bring back the ref-counted enable on enter/leave
workaround we had in Qt 4: If any widget in a
window sets WA_AcceptTouchEvents then that window
will start processing touch events.

Enabling touch events has implications for delivery
of other events, for example by causing scrolling
event lag.

Change-Id: I307488937f417612eff624bf9892b82a7f69c1b7
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-03-26 19:22:01 +01:00
Morten Johan Sørvig
b2c73c73cd Cocoa: Correct enter/leave event handling.
Make top-level windows generate enter/leave events
for sub-windows. Keep track of the current "under mouse"
window in mouseMoved and send EnterLeave events when
it changes.

mouseEntered/mouseExited handles enters and leaves
from the top-level window.

Add tests/manual/cocoa/nativewidgets.

Task-number: QTBUG-27550
Task-number: QTBUG-29751

Change-Id: If4b9f9e0f39d9fb05fdab45a100ffdcf107965ad
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-03-26 19:21:38 +01:00
Konstantin Ritt
a2fc37044c Fix font stretching issue
We're treating fontDef.pixelSize as a box height everywhere but in
harfbuzzFont initialization code the logic was opposite.

Change-Id: I4eecf7861a6084c7f2dbe1df85a71f2e251da845
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-03-26 19:14:16 +01:00
El Mehdi Fekari
f1d8987b82 Fix a bug in QSystemLocale on BB10
Call qt_safe_open in the constructor
to avoid opening the pps files several times.

Change-Id: I1bf79284850353a47ee1fc17797cd667536e17b1
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2013-03-26 18:58:29 +01:00
Rafael Roquetto
6131f79e4e QNX: Code cleanup: normalize 'if' macro usage
Always use "if defined" instead of "ifdef". The same is valid for
"ifndef" macros

Change-Id: I8e8f65e36dc636c10b3d656ce9a89ab3a664a80b
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
2013-03-26 18:55:11 +01:00