Commit Graph

3016 Commits

Author SHA1 Message Date
José Millán Soto
6e713cf03d Call QAccessible::updateAccessibility when caret moves in QTextEdit
Change-Id: I3b9e5d8e67b4928558b642a4d23aa60ae9dfde60
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2012-12-16 14:49:05 +01:00
Liang Qi
139f416237 Remove the timestamp info in genarated files
For moc, rcc and uic, then it's friendly for tools like ccache.
ccache is using md5 to check file modification, but the different
timestamp info will cause different md5 for same meaningful
contents, it will disabled ccache.

Updated the autotest for uic and rcc.

Task-number: QTBUG-26589
Change-Id: I9f1dcf6cd826ad9603af6e183757bcd748c32bd1
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-12-15 11:32:38 +01:00
Samuel Rødal
52619ae778 Fixed invalid memory read in SSSE3 image blending code.
We need to do bounds comparison on the actual offset we're going to use
with _mm_load_si128 to read 16 bytes from memory (even though we won't
use the trailing bytes in the end).

Task-number: QTBUG-28324
Change-Id: Id0d6094da796ca67338d8ad225fa6b2f309bbe6e
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-12-14 17:12:44 +01:00
Kai Koehne
d6717eb0fb SQL: Fix autotests for MinGW
Change-Id: Ib05a120db16f65d9833663445c028971d4de3d29
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-12-14 17:12:44 +01:00
Friedemann Kleint
0e4c41b7a3 Remove MSVC2012-optimization for the QMetaType-test.
As otherwise compilation takes hours.

Task-number: QTBUG-28611
Change-Id: I0ad73bf6ea4d7d4594e902c101bf52969daca341
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2012-12-14 15:06:22 +01:00
Jonathan Liu
9f88e9a0a8 Add missing uuid lib for qaccessibility test
IID_IAccessible requires linking with the uuid lib.

Change-Id: Ic34d5c9bdb6168df7d2447c8aebf1bc519e5f7cd
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-12-14 13:06:53 +01:00
David Faure
aa434bc908 tst_QDBusXmlParser: make XML attribute order deterministic
Avoid QHash randomization so that the order of the XML attributes is stable
This was causing intermittent failures.

Change-Id: I4cc0dba4b0c2ec36601f3b06fb17ff80005cc9fb
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2012-12-14 11:02:47 +01:00
David Faure
92bd9aecfb Fix empty window title regression, add application display name to window title
This increases consistency a lot: all windows and dialogs from a Qt
application will show the app display name in the caption, on Windows and X11.
This helps identifying which app a dialog belongs to, which is especially
useful when the dialog is very generic and shows up unexpectedly.

For compatibility reasons, the app name is added to the caption only
if setApplicationDisplayName() was called -- or if the caption would be
completely empty. The standard Qt4 case (setWindowTitle + no display name)
is unchanged.

Change-Id: Ib284c62c1f4c0bc923e5bc2d10247d95e9aa76c1
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-12-14 08:56:02 +01:00
Eskil Abrahamsen Blomfeldt
02032fb229 Mark QAbstractTextDocumentLayout test as insignificant
This test fails on some setups and a pending critical change
causes the existing bug to trigger in CI. To avoid blocking
other changes because of this bug, it's been marked as
insignificant until such a time when it can be fixed.

Change-Id: Ide41f7b1c76209f9c05f95f996b2364d5dea5e67
Reviewed-by: Liang Qi <liang.qi@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2012-12-14 06:37:41 +01:00
Denis Dzyubenko
6b5b5d4e53 Added missing detach() to QJsonObject::take()
We also need to detach() the taken value in case the compaction triggers and
modifies the underlaying data.

Change-Id: Idcdeba4236b8e208d107d41be2decbdfc5721300
Reviewed-by: Bjørn Erik Nilsen <post@bjoernen.com>
Reviewed-by: Denis Dzyubenko <denis@ddenis.info>
2012-12-13 23:58:51 +01:00
Eskil Abrahamsen Blomfeldt
04f25ac46c Mark QGlyphRun and QStaticText tests as insignificant on Linux
These tests have been failing on certain setups for a while,
but some new critical changes causes the failure to trigger
on the CI system as well. We mark them as insignificant until
they can be fixed.

Change-Id: I467e7030c55d6f23515275b4062c17068d2b688c
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2012-12-13 20:19:00 +01:00
Friedemann Kleint
bf178c77dd QMenu: Do not set snapToMouse if a caused-widget exists.
When clicking at the bottom-right corner of a menu in a menu
bar, it appears at the wrong position. Add test and stabilize
RTL-tests by making sure the layout direction is cleared should
they fail.

Task-number: QTBUG-28031
Task-number: QTBUG-2596
Change-Id: Ibc5ae916388753908e9f3ee98e8859faaa0c8723
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-12-12 21:55:30 +01:00
Frederik Gladhorn
22c234a34e Accessible: Improve value interface
The stepSize property was missing in Qt 4 and is
a sensible addition to the value interface.

Change-Id: I7571800d50ee7e4194c09c4db40300809a1ce45a
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2012-12-12 15:30:53 +01:00
Friedemann Kleint
303ff1bb12 test: Skip tst_QMdiArea::nativeSubWindows() on Windows/ANGLE.
Task-number: QTBUG-28545

Change-Id: Ifa698b9efe38654c8f8fbcc184db5d176df7ba47
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2012-12-12 10:57:08 +01:00
Oswald Buddenhagen
6694d39131 centralize headersclean test
so other modules can actually re-use the code without referencing qtbase
sources.

Change-Id: Id66f07b476e539273dd32455e7642a17d7e5d0ef
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-12-11 13:37:57 +01:00
Oswald Buddenhagen
6dd9cc8aa8 don't use testlib for headersclean test
this is a compile-only test, and it's not even marked as a testcase in
the autotest system.

Change-Id: I9b48ddad3c8e3e953d0e6fcfa010bab73289bc6f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-12-11 13:37:57 +01:00
Kevin Ottens
5b3e7c8dfa Generate the introspection string during parsing
Commit 0696071316 moved away from QDom but
also lost the ability to fill the introspection field of the created
QDBusIntrospection::Interface instances. This commit now generate the
string again as we proceed with the QXmlStreamReader based parsing.

Task-number: QTBUG-26668
Change-Id: I8f406e1f4e9d3e667a8557db69da36cac369ba4f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-12-11 07:41:49 +01:00
Caroline Chao
a5bca21096 SQL: Change in QSqlResultPrivate::positionalToNamedBinding()
With the change cff46983a, prepared queries can now store a
named paramater to be used more than once.

When using ?, thus positional binding, there is no named
parameter, thus there is no need to store it.

When prepare is called from a query with ?, it currently
causes an error when the feature QSqlDriver::NamedPlaceholders
is true. Because holders values are called while holders is
actually empty.

QSqlDriver::NamedPlaceholders is true for QOCI plugin only
but the problem is independant of the plugin used.

Adding a test case with a test driver to make the test runnable
without Oracle installed.

Change-Id: I6d7491f7e09a7b62d2d4d216b40fedd67e927e27
Reviewed-by: Matt Newell <newellm@blur.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-12-10 21:23:35 +01:00
Stephen Kelly
5809485dbe Move a Q_DECLARE_METATYPE higher up in the file.
Having it low in the file causes ODR violations.

Change-Id: I6267c7c1b043e77b251a88cb8940a9f063160891
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-12-10 20:22:09 +01:00
Samuel Rødal
7da7bbcd87 Removed requestOrientation() API from QWindow.
There are no proper implementations of this API, and as it stands it
only acts to confuse anyone who stumbles across it. It will be better to
revisit the full cross platform orientation API story for 5.1.

Change-Id: Iff7054a32c6e5e4ad0cc0493a5e4ecc35a6ec4f3
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2012-12-06 20:37:13 +01:00
Peter Kümmel
24013d8a87 Don't pass invalid strings to strcmp()
The address behind a string doesn't point to a string.

Change-Id: Ic54f652ae781fea278f60cc49d219c1c610ba29f
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2012-12-06 16:45:52 +01:00
David Faure
418890e074 QPluginLoader: fix loading of plugins with a relative file name
This makes QT_PLUGIN_PATH / QCoreApplication::libraryPaths() actually work,
as a search path for plugins, when apps look for a specific plugin by name.

To make it possible to write portable code (unlike the current QPluginLoader
unittest), let QPluginLoader figure out the extension, too.

Change-Id: I895d597d7cb05ded268734bc5f313f32d8d12cb9
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-12-04 18:38:41 +01:00
Stephen Kelly
348c5bd19a Fix some typos in QProcess and QSslSocket unit tests.
The QSslSocket one is both wrong and redundant as there is a
Q_DECLARE_METATYPE for it already.

Change-Id: I63d065abfb3d0e3d82a8b1f29a6752b7676db847
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2012-12-04 14:41:43 +01:00
Oswald Buddenhagen
4873c4151e remove pointless QT.<module>.sources references
there is no point to use this for in-module references.
cleaning it out in an attempt to purge the constants entirely.

Change-Id: I1da4d70e3778257dd43eda0bdfc71eaec1124732
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-12-04 13:58:29 +01:00
Oswald Buddenhagen
c343795b48 remove pointless zlib includes
Change-Id: I352f6f9626c012c39ac97163ac83b3e24a9e9c7a
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-12-04 13:58:03 +01:00
Oswald Buddenhagen
5ea41a2efa properly syncqt-ize harfbuzz headers
we were already installing them into QtCore/private, so turn them into
proper private headers to start with. this cleans up our project files.

Change-Id: I0795f79e03b60b5854de9e4dc339e9b5a5e6fd87
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-12-04 13:57:55 +01:00
Andrew den Exter
ab97a44b6a Clear focus of GraphicsItem focus scopes and their children.
A focus scope has effective focus if one of its children is the focus item,
clearFocus() should remove effective focus from an item and its children
not just from the focus item.

Task-number: QTBUG-28328
Change-Id: I62a292eff000151e50b2f5221e22f326a380fc3a
Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
2012-12-04 01:50:02 +01:00
Sergio Ahumada
0df026de86 Stop using the name "Trolltech" in QSettings
Also change Trolltech for QtProject in other places

Task-number: QTBUG-23269
Change-Id: Ie4e344f23cab77c575562d18b481b3369ce30491
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-12-03 03:47:08 +01:00
Marc Mutz
716d33d2a7 [QTBUG-27420] Make Q{Box,Grid,Form}Layout::takeAt() unparent a nested layout
QStackedLayout doesn't have support for QLayout, only QWidget, so
the issue doesn't arise there.

Reported-by: Johannes Schaub
Task-number: QTBUG-27420

Change-Id: I71f8d10a036918c16d8f8c9197a2ec61cd76cf01
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-12-02 00:23:14 +01:00
Peter Kümmel
1211b956de Fix wrong string length
Change-Id: Ic10aed6fc59d2518583caf78848711bdc97b4665
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-12-01 17:16:54 +01:00
Friedemann Kleint
43ee10518a Improve auto-test of QFile.
Execute the test in a temporary directory, purge remaining files
except the special readonly-files in cleanup().
Avoid repeated invocation of QFINDTESTDATA() by assigning to
member variables.
Do more checks in rename(), check on contents of file.
Generally, use more QVERIFY2, print error messages.

Task-number: QTBUG-3570
Change-Id: Ibd0e11a361208a716ea3efbcca76adeda70e061a
Reviewed-by: David Faure (KDE) <faure@kde.org>
2012-12-01 13:51:52 +01:00
Samuel Rødal
6385a182f0 Added explicit threading API to QtOpenGL.
Since QtOpenGL/QGLContext is implemented in terms of
QtGui/QOpenGLContext which has stricter requirements about how it's
supposed to be used, we need to apply these requirements to QGLContext
as well.

This change adds QGLContext::moveToThread(QThread *) and documents it as
a necessity for making a context current on another thread.

Also introduces QGLPixelbuffer::context() to access the QGLContext of a
pixelbuffer, and made QGLWidget::context() return a non-const
QGLContext, since there's no good reason why it shouldn't, and it leads
to less const_cast clutter.

We could have introduced a backdoor in QOpenGLContext instead, making it
loosen its requirements, but that would have made it harder / impossible
to fully support threaded OpenGL in all the platforms.

Task-number: QTBUG-22560
Change-Id: Ibb6f65f342e7c963e80cc42ab5664c5f1cab30b0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2012-11-30 18:28:04 +01:00
Olivier Goffart
d8e6be1603 Fix connecting to a functor with 3 arguments
Task-number: QTBUG-28285

Change-Id: I07bd870c093482035728aa783d0ecbc8aa8670d2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-11-30 01:23:48 +01:00
J-P Nurmi
a0d379bc9a Style auto tests: kill QWindowsStyle dependencies
Change-Id: I135fe2b0aae81c73c1cca6272f71db07ecb3fa6b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-11-28 20:54:39 +01:00
J-P Nurmi
50a22d8418 tst_QLayout: use QStyleFactory instead of QWindowsStyle
QWindowsStyle is soon to become an internal class.

Change-Id: I25ac344d349d07db94e2fbc9ef943e09c399f913
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-11-28 13:13:51 +01:00
J-P Nurmi
f308c296c5 tst_QWidget: use QStyleFactory instead of QWindowsStyle
QWindowsStyle is soon to become an internal class.

Change-Id: I75424d6fc2f36fb0faace86c960d78a4ba305658
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-11-28 13:13:41 +01:00
J-P Nurmi
a3fe4c6337 GV auto tests: kill QWindowsStyle dependencies
Change-Id: I6236b7ca23897c5075bef21f5e62fe01f4cfc611
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2012-11-27 23:10:09 +01:00
Samuel Rødal
7a7102ad07 Fixed abbreviations in QWindow::framePos() and QWindow::setFramePos().
As 672e7c875e did changing pos() to
position() and setPos() to setPosition().

Luckily there's not much code that uses these.

Change-Id: I1e1982f00412a22bd376e667a5e8c30b6149f9b5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-11-27 15:24:31 +01:00
Andreas Aardal Hanssen
bfb569b6e7 Ensure subfocus is not reset to 0 when hiding a panel.
When hiding any widget that is not a panel, it is correct to clear
subfocus. In case clearFocus() has been called, the result is that
focusItem() / focusWidget() points to 0, which is correct. Upon
reactivation, nothing gains input focus. When changing focus, the
following setSubFocus() call will ensure subfocus points to the new
widget.

When hiding a panel, however, it's essential that subfocus within
that panel is not cleared, otherwise, when re-showing the panel,
nothing will have focus, whereas the expected behavior is that focus
is restored to the last item that had focus, i.e., the focusItem()
a.k.a. subfocus widget.

Task-number: QTBUG-22256
Change-Id: I84d849a505764e074e1369fef923cef1ad5c0b1e
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-11-26 21:23:15 +01:00
Konstantin Ritt
b34c48d95b qmake: Test recursive function calls
Change-Id: If7d659728d30b2e5c52082ab999bc00de3733972
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-11-26 14:30:09 +01:00
J-P Nurmi
12702d2b12 tst_QSharedPointer: update application types
QCoreApplication::Type enum was removed in 553e21. This change updates
the (un)tested application types to match the application types
available in Qt 5.

Change-Id: I8631987a9ff31dc81baa013619cfc18616b851d1
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-11-26 14:16:44 +01:00
J-P Nurmi
8e7135c894 tst_QGridLayout: use QProxyStyle instead of QWindowsStyle
QWindowsStyle is soon to become an internal class.

Change-Id: If163aae6910c0b082a9bcca1ebbab66660cc005f
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2012-11-26 14:16:44 +01:00
J-P Nurmi
7caaab5262 tst_QFormLayout: use QProxyStyle instead of QWindowsStyle
QWindowsStyle is soon to become an internal class.

Change-Id: Ie28d4ea074938b17827aa803a2298f881946f7e5
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2012-11-26 14:16:44 +01:00
J-P Nurmi
f1a743c165 tst_QBoxLayout: use QProxyStyle instead of QWindowsStyle
QWindowsStyle is soon to become an internal class.

Change-Id: I287c771a841ba96e445f0a0df96ea035be25ac74
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2012-11-26 14:16:44 +01:00
J-P Nurmi
f61a335589 tst_QMenuBar: use QProxyStyle instead of QWindowsStyle
QWindowsStyle is soon to become an internal class.

Change-Id: I422e7d67fadbb169d19285aab0a8ba0f3d668697
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2012-11-26 14:16:44 +01:00
J-P Nurmi
5ad4e14fb1 tst_QComboBox: use QProxyStyle instead of QWindowsStyle
QWindowsStyle is soon to become an internal class.

Change-Id: Ic76ecc20ff600a7d401b44c8dc4d93198c06becc
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2012-11-26 14:16:44 +01:00
Friedemann Kleint
eefec0e0be Fix keyboard grab in QWidgetWindow.
Task-number: QTBUG-28070
Change-Id: I6f55a2dd906ee896071137a5d47fb97c9a571b5f
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
2012-11-26 11:00:07 +01:00
Konstantin Ritt
9b85b81bc8 QLocale: Fix matchingLocales() behavior if script or country is not Any*
Since the documentation doesn't mention the search should be done by language only,
consider the current behavior incorrect.
As of now, it is possible to get a list of locales by Country or Script as well.

Also fix countriesForLanguage() to be in-sync with matchingLocales().

Change-Id: I6a09ca459120143565fa6099d2b823df1fed7c25
Reviewed-by: Denis Dzyubenko <denis@ddenis.info>
2012-11-25 04:06:51 +01:00
Jędrzej Nowacki
cf1e315e28 Fix QVariant streaming in Qt3 compatibility mode.
Task-number: QTBUG-27700
Change-Id: I0408293e43c3330dbc4746198a19709e795f552a
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-11-24 14:55:30 +01:00
J-P Nurmi
0bfc5b898d tst_QDateTimeEdit: remove redundant include
Change-Id: I3aeb90723b41b35e221b86b1767ed1ac45a9fe0c
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2012-11-24 10:34:02 +01:00