Commit Graph

18759 Commits

Author SHA1 Message Date
Zhang Xingtao
02b7b21f9b Doc: correct the format of Q_PLUGIN_METADATA macro in sample codes
Change-Id: I464a0c0a590b0b90cf0fe7ccd448ee9bf704bd4f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-06-12 14:11:19 +02:00
Lars Knoll
81ba16cad9 Fix case insensitive comparisons using QCollator
In ICU the strength parameter decides whether a comparison is
case sensitive or not.

Fix mac comparison code. It can't have worked before.

Added some basic automated testing for QCollator.

Change-Id: I2646c464fd22ccd3a93c461fa3dba4bd1d4c7b4b
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-06-12 10:26:07 +02:00
Sergio Ahumada
490e79e39e Merge "Merge remote-tracking branch 'origin/stable' into 5.3" into refs/staging/5.3 2014-06-11 23:06:01 +02:00
David Faure
a6d7e09e89 QWidget: fix documentation for isEnabledTo(0)
It is NOT always the same as isEnabled().
Added a unittest to prove it.

Change-Id: I7717126835923e8c091249bfcdf81767c44fb5f7
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2014-06-11 23:06:01 +02:00
David Faure
11aaff3a57 Add missing detach() in QPixmap::convertFromImage()
Task-number: QTBUG-18519
Change-Id: I5d929cf6eda3f34130314edac95487fb00a95db5
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-06-11 23:06:01 +02:00
Sergio Ahumada
7ffbfed7c7 Merge remote-tracking branch 'origin/stable' into 5.3
Change-Id: I147a75ac74bd7b19dbeb99e1ec2836cc5bfc2806
2014-06-11 16:44:33 +02:00
Sérgio Martins
dbe6db192a Windows: Fix maximizing frameless windows on secondary screens.
They would either disappear or be positioned at bogus coordinates.

The MINMAXINFO structure works with coords from the primary screen
then uses an "interesting" algorithm to adjust to secondary screen:

Say you have a primary screen with width=1000 and secondary screen
with width=2000, here's what you get when you set ptMaxSize to:

ptMaxSize.x   | Size window gets in second screen
--------------------------------------------------
    500       |                500
    1000      |               2000
    1001      |               2001
    1100      |               2100

So basically you can't get any value between 1000 and 1999

How many people use the taskbar on a second display and maximimize
a frameless window anyway ?

Task-number: QTBUG-39537
Change-Id: Ic9b3120e7fb5a9a5d97828a2e44be02ae587b92e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-06-11 16:42:43 +02:00
Coursar
f65333b027 Fix Android: use fbo read back workaround with specific GPUs.
Namely, the Adreno 205. We used to enable this
workaround for Huawei Honor (Adreno 205).

Task-number: QTBUG-33951
Change-Id: Ic92a6913664f2f0954271c700d9ef83d27c238a7
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-06-11 16:42:43 +02:00
Gatis Paeglis
d06c6d8a51 Compose key plugin: expand "%L" to full path.
According to [1] "%L" should expand to a full path for the
default (based on system's locale) Compose file.

[1] http://www.x.org/archive/current/doc/man/man5/Compose.5.xhtml

Task-number: QTBUG-35943
Change-Id: Ie803a89742d9c0aa3b2d759bea28ed403dc68c9c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-06-11 15:01:06 +02:00
Sergio Ahumada
4b43a5d528 Merge "Merge tag 'v5.3.0' into HEAD" into refs/staging/stable 2014-06-11 12:10:04 +02:00
Oswald Buddenhagen
a16818cc3d Merge tag 'v5.3.0' into HEAD
Qt 5.3.0 Release

Conflicts:
	src/plugins/platforms/cocoa/qcocoaintegration.mm

Manually removed call to setWindow in src/plugins/platforms/cocoa/qcocoawindow.mm
to follow 1ac0f953ba.

Change-Id: Ieddedf4cd7b47effce6b6865fb9c48df6c5838a7
2014-06-11 10:41:08 +02:00
Steffen Imhof
641ca1d7cb Fix QT_NO_SETTINGS build in QLibraryInfo.
One reference to QSettings was only guarded by QT_BOOTSTRAPPED.

Change-Id: I2f9761ee88b4a45edb16054fdba3c3f11fec12ff
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-06-10 16:25:22 +02:00
Steffen Imhof
ba9b1b0512 Fix QT_NO_BEARERMANAGEMENT compile of QHttpThreadDelegate.
Re-order the constructor parameters for QHttpNetworkConnection to be consistent with the #ifndef version.

Change-Id: Icd8be4406ff549d468e06d635fac2ddc34826b1c
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-06-10 16:25:22 +02:00
Steffen Imhof
aa4ad43cfd Fix QT_NO_LIBRARY compile in Unix DNS lookup implementation.
The static method QDnsLookupRunnable::query() got an additional parameter for QTBUG-30166, but the #ifdef'd part was not updated.

Change-Id: Ifc317bfae6e02c00936e1922ec77f89fb5faf497
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-06-10 16:25:22 +02:00
Jerome Pasion
857c82f8a4 Doc: Updated Layout examples.
-added links to and from the overviews.
-added information on how to run the example.
-updated copyright.

Task-number: QTBUG-33597
Change-Id: Ib049cb94f136caa6916878959ae830248bd236b5
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Nico Vertriest <nico.vertriest@digia.com>
2014-06-10 15:56:59 +02:00
Jan Arve Saether
8fa91217bc Make sure we run gracefully below API level 18
Task-number: QTBUG-39508
Change-Id: I023ba7c50de5c95a5514658797125e22016a6543
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-06-10 14:10:21 +02:00
Simon Hausmann
e3d32bce79 Fix failing qtdeclarativetextedit auto-test
After commit c3baa7c1dc the qtdeclarativetextedit
tests in the qtquick1 module started failing. This was due to commit
852abfca6f4c349dce9b895956922f96d82df579 from 4.8 not being forward-ported from
Qt 4 to Qt 5, hence the comment in c3baa7c1dc
about the missing mousePressEvent line. It was intentionally removed and
instead used further down, which is what this patch adds and therefore acts as
forward-port of 852abfca6f4c349dce9b895956922f96d82df579.

Change-Id: I55978c961002382c1f228bf796c469c10686ba9f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-06-10 14:09:29 +02:00
Topi Reinio
1a3d149174 qdoc: Revised logic for which example file to open in Qt Creator
qdoc stores the 'files to open' into the example manifest. These
files are opened in Qt Creator's editor when an example is selected
from the Welcome / Examples list.

This change uses the following criteria (case insensitive), in
order of preference:
    - .qml file matching the project name
    - .cpp file matching the project name
    - .h file matching the project name
    - main.qml
    - main.cpp

A 'mainFile = "true"' argument is written for the file that is
preferred to be the top-most file.

Having a main.qml file take precedence over main.cpp ensures that
most Qt Quick examples open into the relevant QML code instead of
the boilerplate C++ used for launching the application.

Task-number: QTBUG-37203
Change-Id: I2ea58a31b1284f4f7d424dd35d49a84a23a88c23
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-06-10 10:16:56 +02:00
Mitch Curtis
7da3228abb Fix typo in QGraphicsTextItem::defaultTextColor() documentation.
Change-Id: I6e255483d63a3024d9cbfe09a12f33d7fddf36c0
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-06-10 09:12:49 +02:00
Mitch Curtis
8480ddbe60 Remove unnecessary comma in QStackedWidget doc.
Change-Id: Iaa6102ea90c695eb2d81cc5d4fbd00dafc7783f5
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-06-10 09:06:24 +02:00
Morten Johan Sørvig
360fd4a278 Cocoa: Don't send duplicate close events.
Don't send QCloseEvents to QWidgetWindows during
cmd-q application shutdown, since widgets will
will already have received close events from
QApplication close event handling.

Task-number: QTBUG-39398
Change-Id: I7f6e892b0042361bed7a3bc5fac8518eabfc8e4e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-06-10 06:54:11 +02:00
David Faure
29513210df Doc: QAtomicInteger first appeared in Qt 5.3
Change-Id: I900e5b0ec8291d34685cb545540a5a9f54551d05
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-06-09 18:44:57 +02:00
Andy Shaw
9a3a3b641a Don't try to draw if there are no points in the path
In some cases, for instance if drawEllipse() was called with a null QRect
then it would still try to draw a QVectorPath without having enough points
in the list. Therefore the point_count should be checked first before
doing any drawing.

Change-Id: I9b8dbb87c73b74e9df9eb10ec790a484d05d4c46
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-06-09 12:35:02 +02:00
David Faure
ebe4aaadb2 tst_qtcpsocket: fix comment, the slot goes to 512
Change-Id: Ia0c5b29d6e02c9fda0b1da4a2779f1cbe9b1d747
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-06-09 10:39:44 +02:00
Morten Johan Sørvig
908de0fb8d NSURLConnection: Set http response status code.
Make XMLHttpRequest.status work.

Task-number: QTBUG-38864
Change-Id: Ic691b39a43aeb2ad3cd2e8ffef64c74d02699755
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-06-07 23:14:16 +02:00
John Layt
398ae00e84 QPrinter - Don't use QPrinterInfo::availablePrinters()
The availablePrinters() method can be slow as it gets all info for every
printer which may be slow with many network printers.

Change-Id: I4bc5ef46ed4867326b60b66371178b84204639ce
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2014-06-07 19:06:26 +02:00
Morten Johan Sørvig
7eba6d039d Cocoa: Re-implement QCocoaScreen::topLevelAt()
The previous implementation used [NSApp orderedWindows]
which does not return NSPanel subclasses, which is
used by Qt dialogs and pops.

Use [NSWidow windowNumberAtPoint:belowWindowWithWindowNumber]
instead, which hit-tests on all window types. This
can potentially include windows from other processes
and non-Qt windows which needs to be filtered out.

Add EXPECT_FAIL to tst_MacGui::nonModalOrder. The
correct topLevelAt() implementation now exposes that
this test is failing.

Task-number: QTBUG-39322
Change-Id: I81afa3da964e08fe682802220d8fe81e9284205e
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-06-06 23:39:12 +02:00
Jan Arve Saether
0af887124a Do not crash with IA2 AT clients.
Make sure all members of the IA2Locale we return are properly
initialized. Only accProbe provoked this bug, and I have no idea why
this haven't crashed earlier.

nvda probably does not query the locale, therefore it was unaffected.

Change-Id: I5a9d98eed5af56fd2a75f6cb7035ed613fd802d5
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-06-06 19:58:49 +02:00
Oliver Wolff
7e9f08302c winrt: set error if tcp socket initialization fails
Change-Id: I31a2684ffdc864c69fe896829bca860e88c4a6ca
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-06-06 16:52:24 +02:00
Oliver Wolff
9cd7403801 winrt: do not try to close non existent sockets
Change-Id: I41103db89985f8fbde1faaccaf33c7a76c275f7d
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-06-06 16:52:24 +02:00
Oliver Wolff
7e44e4bb4e Windows: Added Comma to list of possible numpad keys
Some keyboard layouts (German and Czech for example) have comma instead
of period on the numpad, so this key should also be considered when
setting the Qt::KeypadModifer state.

Task-number: QTBUG-38248
Change-Id: I06847a02a9334c21784790eae6fd7e1bc6de4099
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-06-06 16:52:24 +02:00
Jerome Pasion
56a087a1ef Doc: Added link to SQL example page from main Qt SQL landing page.
Change-Id: I1fe42b6ec72933ea8ba605836e8a56332fd3c691
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-06-06 16:52:24 +02:00
Kai Koehne
7ec4939313 Fix documentation about QStringLiteral
The fallback for QStringLiteral in case C++11 features are not enabled
is QString::fromUtf8(), not QLatin1String().

Also, the result of a QStringLiteral expression _is_ a QString.

Change-Id: Ib9c2f4c13fff237de3acb2e0f64027bacea6271c
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-06-06 13:19:52 +02:00
Richard Moe Gustavsen
bc9423316f iOS: delay callbacks to UITextInput to avoid recursion
If the application calls "reset" or "commit" on the input
method (or forces active focus on some other item) from a text
changed or key pressed handler, iOS will sometimes throw
an exception. It does so because we try to change the state
of UITextInput (by calling textDidChange) while processing a
callback from the same place (insertText).

Optimally this should not happen since we would normally
post such events to Qt, not send them directly. But with
text input we cannot do this since UITextInput expects us
to update immediately upon receiving text input callbacks.
If not, word completion and spell checking will stop working.

This change will guard against recursive callbacks by delaying
callbacks to UITextInput when text/selection/first responder
changes.

Change-Id: I099f30adf1c5aba241fc833a45b423016f4ed8d0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-06-06 11:21:17 +02:00
Andy Shaw
dbc7ed8214 Ensure that there is no duplication of the output directory in output
When a relative path was specified as the output then it would be in both
Option::output_dir and Option::output. Therefore in that case
Option::output should be just the filename as Option::output_dir has the
correct path to output to.

Task-number: QTBUG-39460
Change-Id: Idc988e6bad94f34b89660fb5e8d6fa3a39dc623b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-06-06 08:49:06 +02:00
Allan Sandfeld Jensen
3441738d5f Remove unfinished NEON version of vectorized rotate sampling
A vectorized codepath for rotating transforms were added in 5.3.0, but
was only properly tested for SSE2. The NEON version remains unfinished.
Since it was never working, this patch reverts the NEON version.

Task-number: QTBUG-39445
Change-Id: Ifbce0e03781d217ad976c6b18ac88381055cba66
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-06-06 08:48:35 +02:00
Friedemann Kleint
a1c5198387 Suppress move/resize events if they are the result of call to move()/resize().
QWidget::resize() or QWidget::move() set the new size/position values
and send events. The spontaneous events generated by the platform
should be ignored in that case.

Task-number: QTBUG-30744
Task-number: QTBUG-38768
Task-number: QTBUG-32590
Change-Id: I9c0ae38842ed76a8a88ca64fdc9bbe106b2766b7
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2014-06-06 06:30:44 +02:00
Friedemann Kleint
c3e416296a Revert "Fixed duplicate QMoveEvent generated for each QWidget::move call"
A better fix is to check whether the widget already has the requested
geometry when receiving the spontaneous event from the platform in
QWidgetWindow and to suppress that.

This reverts commit 72259baa76.

Task-number: QTBUG-32590
Change-Id: I4d7a9b4c340c2d6a427727ecb8de50c3d199f7a9
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2014-06-06 06:30:22 +02:00
Friedemann Kleint
c3baa7c1dc Fix selection by dragging after double click in QWidgetTextControl.
Remove return in mouseMove depending on variable mousePressed which
is not present in Qt 4. The variable was true in Qt versions
before 5.3 due to an additional mouse press event received before
a double click.

Task-number: QTBUG-39023
Task-number: QTBUG-25831
Change-Id: I57ed9284961195c71df9e9b9d697b1cfbad7c228
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-06-06 06:29:47 +02:00
Friedemann Kleint
a6855cbf40 QPlatformClipboard::emitChanged(): Do not emit signals when closing down.
Prevents a shutdown crash in the Qt Mfc migration solution.

Task-number: QTBUG-39317
Change-Id: I7f0aa40715baed57ff59682a477084347dfd45bc
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2014-06-06 06:28:57 +02:00
Laszlo Agocs
ab3603d2b5 Fix alpha in no-opengl configuration on xcb
Like the EGL + xcb configuration, the -no-opengl is broken too when
it comes to translucent windows: Requesting an alpha channel is futile
since the xcb_create_window call always uses the root's depth and visual.

This is now corrected by picking a 32-bit visual.

This will make translucent windows and drag pixmaps appear correctly again.

Task-number: QTBUG-35126
Change-Id: I00e7d6e08b5fcc055ef3ea6d822561740a1f5457
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
2014-06-06 02:51:32 +02:00
Laszlo Agocs
0712b4ff71 Fix visual selection with EGL on xcb
Using a 24-bit visual for 8888 configs is wrong since we loose the
alpha channel. This breaks translucent windows and, among others,
leads to not showing drag pixmaps (that typically have transparent
areas) properly.

Change-Id: I516c84327680b76996b622831e431c29d840471e
Task-number: QTBUG-35126
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-06-06 02:51:32 +02:00
Laszlo Agocs
1b21974f3e Avoid polluting the output with warnings on eglfs
Many windowing functions are not supported (since they do not make sense)
on the embedded platforms. Provide empty implementations for a few more
to avoid showing useless warnings, in particular for widget apps. The
user cannot do anything about it and these are not errors.

Task-number: QTBUG-39081
Change-Id: I29afd981e037d1e6772bcdfc33497e6d0ae02008
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-06-06 02:51:32 +02:00
Laszlo Agocs
d1c0015546 Make multisampling more robust in QOpenGLFramebufferObject
Some drivers are reported to get confused when passing different
sample counts (requested vs. actual) to the color and depth/stencil
attachments. To overcome this, pass the requested sample count to all
the attachments.

Task-number: QTBUG-33406
Change-Id: I17b0e3dbbd78de2ab0f45e95164b4f326d47aeff
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Kimmo Leppälä <kimmo.leppala@digia.com>
2014-06-06 02:51:32 +02:00
Bernd Weimer
fce9c2dd26 QNX: Fix build for QNX 6.5
QNX 6.5 does not have readdir64_r, which is selected by current
qplatformdefs.h. There is only a reentrant version (readdir_r) which
does not support large files and a large file version (readdir64) which
is not reentrant. The reentrant version (readdir_r) will be chosen now.

In summary, the following versions will be used:
QNX 6.5:  readdir_r    (postfix '_r': reentrant version)
QNX 6.6: _readdir_r    (prefix  '_' : extra stat info included)
BB 10:   _readdir64_r  (infix   '64': large file support)

Change-Id: I00739f0e2054a32f52555309d03463a6c52e3d99
Reviewed-by: Wolfgang Bremer <wbremer@blackberry.com>
Reviewed-by: Samuli Piippo <samuli.piippo@digia.com>
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
2014-06-05 23:24:47 +02:00
Christian Strømme
bbdf6a8039 Android: Use exceptionCheck() function.
This was the only place where we didn't use the exceptionCheck()
function. Besides being more consistent, it's also more verbose if an
exception occurs.

Change-Id: Ib1e3dba82b0730cf189ec725f4da425d7ac85cdc
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-06-05 23:23:56 +02:00
Oswald Buddenhagen
c54f7720d0 fix qmaccocoaviewcontainer example
- fix build on 10.6
- actually build it at all

Change-Id: Ib929f8b56e55f00191f7fcfb2be25975e46a1af2
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-06-05 17:11:58 +02:00
Oswald Buddenhagen
f9b61eca4e use the right env var in qmlplugindump call
qml2 needs QML2_IMPORT_PATH.
this didn't affect non-prefix builds (which most developers use), so
it wasn't too serious.

Change-Id: I435dca151348669b66f091f9a9324cd69394284e
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-06-05 17:11:55 +02:00
Oswald Buddenhagen
7a1e17a350 unbreak static qml imports again
a) qmlimportscanner has no built-in -importPath, so it can't be omitted
even for non-prefix builds, and b) the QMLPATHS variable is also used
further down, so we can't just do away with it.

amends a658fa40.

Change-Id: I42a47a82fe13694fbac3c4a3962ebbe1d7e7865b
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-06-05 17:11:53 +02:00
Oswald Buddenhagen
12bbd15e0f actually don't install qt dlls into lib/ any more
it helps enormously to use the flag correctly.

amends f0c34eb08f.

Change-Id: I04a63cc59e133169d9f6677f2f88ef98fd5c524c
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-06-05 17:11:49 +02:00