Commit Graph

11469 Commits

Author SHA1 Message Date
Jędrzej Nowacki
ae2359d49e Merge "Merge branch 'stable' into dev" into refs/staging/dev 2013-01-07 18:07:29 +01:00
Giuseppe D'Angelo
998899cf3a Introduce QRegularExpression::NoMatch match type
This match type doesn't do any match at all; it's only necessary to
properly introduce default constructors for QRegularExpressionMatch
and QRegularExpressionMatchIterator (since they return the match type
that created them).

Change-Id: Ibfe92459c7fdd23129cf3afe073cd443c461ddeb
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-01-07 16:11:19 +01:00
Friedemann Kleint
bc5a2336ab Provide operators for QMargins.
Provide addition/subtraction for QMargins as well as
multiplication and division for int/qreal similar
to QPoint. Add unary minus.

Change-Id: If4eb831cfd610b34b5ca361619b1636031811d0a
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2013-01-07 16:11:19 +01:00
Friedemann Kleint
6ecc3e76e8 Add API dealing with QMargins to QRect.
- Addition of a QMargin to a QRect.
- Removal of a QMargin from a QRect.
- Remove implementation from Windows platform plugin.

Change-Id: Iae54bc13e94a7ece48853b1d3f3de2bfc154d2dd
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2013-01-07 16:11:19 +01:00
Giuseppe D'Angelo
41ec7c32ac Improve QRegularExpression autotests
Check that the regular expression, the match type and the match options
returned by QRegularExpression/QRegularExpressionIterator are the
same ones passed to match / globalMatch.

Change-Id: Ibd282379bb60b53d614b1d56a7e08b3d6c236da6
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2013-01-07 16:11:19 +01:00
Giuseppe D'Angelo
59eb393cf5 Rename QRegularExpression-related feature defs to QT_NO_REGULAREXPRESSION
QRegExp and QRegularExpression are totally independent, therefore
using two different defines is the right thing to do.

Also, document the new define in qfeatures.{txt,h}.

Change-Id: Ice4826ea543f4b22f1cc27bf31ed6e043d0c43b0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-01-07 16:11:19 +01:00
Frederik Gladhorn
cdf13ce286 Merge branch 'stable' into dev
Conflicts:
	tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp

Change-Id: I6b8d505fc22f052c307ca27f58f7d16f98965f47
2013-01-07 15:18:16 +01:00
Konstantin Ritt
79f0a29abf Get rid of pre-QPA leftovers
Change-Id: I61a393baa387f2f90dc652d6a9df1c41c3730611
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-01-07 13:59:55 +01:00
Stephen Kelly
21d607c81a Automatically register method types in QSignalSpy.
Change-Id: I3655291dca6dbd3d8d09ee835b85983caa911b64
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-01-07 12:06:00 +01:00
Stephen Kelly
6769e0783a Fix the \since version for QSharedPointer::create().
It is not relevant that it has been part of the class since Qt 4.6. It has
always been internal until now. The release where it became public API (5.1)
is what is relevant.

Change-Id: Ib740f3ed6df190884a94fb2c11dd74cd7edb7b1a
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-01-07 12:05:51 +01:00
Giuseppe D'Angelo
2d8910cbed Introduce QRegularExpressionValidator
QRegularExpression counterpart for QRegExpValidator.

Change-Id: Ib391e73dd49e32aeb9b48e6f2217b67a17a83a11
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-01-07 12:04:53 +01:00
Sergio Ahumada
a8321f21fb Add bic data for tst_bic
- Add initial set of amd64 data
 - Add QtWidgets to global.cfg

Task-number: QTQAINFRA-321
Change-Id: I9bffaa00ac01976546629988ac69965383eb2efd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-01-06 19:16:02 +01:00
Mehdi Fekari
33f603c4a3 Update qlocale autotest
Add additional tests for the updates in the Qt4.8 qlocale data (CLDRv2.0) already existing in Qt5 locale data (CLDRv22.1):

- The NumberingSystem for some Indic and Slovak locales.
- The Month/Day name in Irish/Gaelic locale.
- The AM/PM Text in Turkish locale.

Change-Id: Iaea4f13ec79f94ab937b97f8ae60eb8d8f217c4b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-01-06 14:29:48 +01:00
Stephen Kelly
cf22e8ea4e Tests: Remove declaration of built-in and automatic metatypes.
These types are either built-in or 'automatically declared' and so
don't need to be explicitly declared as metatypes.

Change-Id: Ifd116dee32a450ff89a9a1011e26b434765d6e95
Reviewed-by: David Faure <david.faure@kdab.com>
2013-01-06 11:23:45 +01:00
Sergio Ahumada
d376a4e578 configure: Remove left over for -nokia-developer option
This seems to be a left over from 52fc6694b8

Change-Id: Ib0d5868a099e53ec2c2af6be749a5496bbf1f145
Reviewed-by: Jeremy Katz <jeremy@panix.com>
2013-01-04 20:43:51 +01:00
Rafael Roquetto
91a55c7e7d Disable Q_COMPILER_RVALUE_REFS on QNX
std::forward and std::move are not yet supported by the NDK.

Change-Id: I1df1b5e88717c0d27a280862b98eb68262927f2b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-01-04 20:43:51 +01:00
Stephen Kelly
ba82958af9 Widgets: Remove declaration of built-in and automatic metatypes.
These types are either built-in or 'automatically declared' and so
don't need to be explicitly declared as metatypes.

Change-Id: Ibe8e2ec867afb4051a3c7eef806d9cd86945928b
Reviewed-by: David Faure <david.faure@kdab.com>
2013-01-04 18:44:31 +01:00
Joerg Bornemann
fbd3cd8679 remove unused member from QSystemLocalePrivate
This is a refactoring leftover from commit
bb86e77cc437b92d49692bb7026c57626d77079f in qt/qt.git.

Change-Id: I04993faca44ad0ffca2ae163049770c29d232a47
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Reviewed-by: Denis Dzyubenko <denis@ddenis.info>
2013-01-04 18:43:40 +01:00
Rafael Roquetto
faaaa68db4 Remove redundant Q_OS_BLACKBERRY define check.
Q_OS_QNX is always implied by Q_OS_BLACKBERRY

Change-Id: Ic07a967ab9a45b3c6c088aa8399bab823b9a413e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-01-04 18:43:19 +01:00
Stephen Kelly
cc69dff01b Gui: Remove declaration of built-in and automatic metatypes.
These types are either built-in or 'automatically declared' and so
don't need to be explicitly declared as metatypes.

Change-Id: I95b8b4b674e85b2b3c374931f6231d60f35be984
Reviewed-by: David Faure <david.faure@kdab.com>
2013-01-04 18:39:08 +01:00
Stephen Kelly
79f1afc23c Core: Remove declaration of built-in and automatic metatypes.
These types are either built-in or 'automatically declared' and so
don't need to be explicitly declared as metatypes.

Change-Id: I54523eb854619917123d8816d3cd6c3a1f5b4c55
Reviewed-by: David Faure <david.faure@kdab.com>
2013-01-04 18:39:05 +01:00
Thiago Macieira
fc032aa713 Update the sysconfdir default to non-absolute
Make the settings path to be relative to $prefix, instead of absolute.
And update the configure -help output to match the actual code.

Change-Id: I71e4ad6e3db046fec95ef057ae7f7bc566bc5794
Reviewed-by: Sune Vuorela <sune@vuorela.dk>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-01-04 17:35:21 +01:00
Thiago Macieira
a094bf5a89 Don't increase the reference count if dynamic_cast failed
If the dynamic_cast failed in QSharedPointer::dynamicCast or
qSharedPointerDynamicCast, we should avoid creating the QSharedPointer
that shares the weak and strong reference counts. In Qt 5, this does
not imply a leak since the original pointer is stored internally for
deletion. In Qt 4 it implies a leak under certain circumstances, which
this change fixes.

Task-number: QTBUG-28924
Change-Id: Id2de140de4cf676461e14b201ad250c53666b79d
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-01-04 17:30:19 +01:00
Peter Hartmann
bf5e7fb265 SSL certificates: blacklist mis-issued Turktrust certificates
Those certificates have erroneously set the CA attribute to true,
meaning everybody in possesion of their keys can issue certificates on
their own.

Task-number: QTBUG-28937

Change-Id: Iff351e590ad3e6ab802e6fa1d65a9a9a9f7683de
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2013-01-04 15:19:17 +01:00
Jan Arve Saether
89f862ab10 Do not send QAccessible::Focus when current index is changed.
This had the unfortunate side-effect that focus was reported to change
(but it didn't) just because the qtabbar was shown.
Found by clicking the different categories on the left-hand side of the
options dialog in Qt Creator.
So, what happened was that clicking "Text Editor" would move the
accessibility focus (that the AT client saw) to the "Font & Colors" tab)

Change-Id: I19a508f6a32a77696079d24c3c6408cb6c3d9fd5
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-01-04 15:18:56 +01:00
Jan Arve Saether
07e69c7896 Make textEditTest pass on Windows 8
We make it pass by relaxing the comparison of the characterRect....

Change-Id: I900e0601d9e1e568c12a3952cf42657743345013
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-01-04 13:20:06 +01:00
Jan Arve Saether
32f7db7686 Fix autotest of textEditTest to use currentFont() instead of font()
Change-Id: I5c9b2ad494a7daf9b07804f77c4692d49e774261
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-01-04 13:20:06 +01:00
Stephen Kelly
ad330f327e DBus: Remove declaration of built-in and automatic metatypes.
These types are either built-in or 'automatically declared' and so
don't need to be explicitly declared as metatypes.

In some cases, the type is required to be registered with the typedef
name, so those Q_DECLARE_METATYPE uses remain for now. In a future
patch we can also remove those and the typedefs themselves.

Change-Id: I5721955c86f566ae09024203954840f817bd3088
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-01-04 13:20:06 +01:00
Samuel Rødal
bd04a3d136 Fixed wrong emits of x/y/width/height changed signals in QWindow
We should only emit these when the corresponding property value changes.
Since these are changed asynchronously in the case of a platform window,
we should not emit them in the setter, as they are already properly
emitted in QGuiApplicationPrivate::processGeometryChangeEvent().

Change-Id: I5ac00601ddb4e7a8ff02376e5f5135d427913119
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-01-04 13:20:06 +01:00
Jon Severinsson
cf2a75e41b Fix QGuiApplication::keyboardModifiers() and QGuiApplication::mouseButtons()
Previous commit b2363a935c fixed keyboardModifiers() after QPA event
processing, but broke QTestLib, which expects spontaneous input events
sent to qApp->notify() to update keyboardModifiers() and mouseButtons().
The commit also did not fix mouseButtons() after QPA event processing,
and missed keyboardModifiers() after QPA Tablet event processing.

This commit fixes all these shortcommings in b2363a935c.

Includes test case by David Faure <faure@kde.org>

Task-Number: QTBUG-26887
Change-Id: I8518b06c4ce86ea7b35120e3353a45ea2a81d356
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-01-04 13:20:06 +01:00
Gabriel de Dietrich
f415d86d1e Cocoa: Fix zombie NSScreen crash
While the Cocoa documentation says we should not cache [NSScreen screens],
it seems that we should not cache its referenced objects either. This
caused a crash in desktop components when using Dial because, given
the way it is being rendered, we need to know the screen pixel ratio.

Task-number: QTCOMPONENTS-1279
Change-Id: If5c3c6f14d04925215b9dca011143a2056a68846
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-01-04 13:20:06 +01:00
Jonathan Liu
d75b217901 Windows: Add fallback for UpdateLayeredWindowIndirect
The UpdateLayeredWindowIndirect function is only available on Windows
Vista and later. If UpdateLayeredWindowIndirect is not available
(e.g. on Windows XP), use UpdateLayeredWindow instead.

Change-Id: I8af23c051560f7e54eda390dae7553543c00a94b
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-01-04 13:20:06 +01:00
aavit
4250fa2cf6 Revert "Enable module build with QT_NO_ACCESSIBILITY"
This reverts commit b7f63c6bf7.
It made compilation fail in qstylehelper_p.h if QT_NO_ACCESSIBILITY
was defined - which it is by default on linux without dbus.

Change-Id: I313f5138460d28c44dad128d175df0e53a99287d
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-01-04 13:20:06 +01:00
Frederik Gladhorn
ca2f44680c Merge branch 'stable' into dev
Conflicts:
	examples/widgets/painting/shared/shared.pri
	src/corelib/tools/qharfbuzz_p.h
	src/corelib/tools/qunicodetools.cpp
	src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp
	src/plugins/platforms/windows/qwindowsfontdatabase.cpp

Change-Id: Ibc9860abf570e5ce8b052fb88feb73ec35e64bd3
2013-01-04 11:12:05 +01:00
Bernd Weimer
9cfce43f19 BlackBerry: Reevaluation of timer list in event dispatcher
In the event dispatcher the timer list has to be reevaluated after
each call to filterEvent, because timers could be started in event
filters.

Change-Id: I1a275845fb74c63441f2301555f3459f8295af27
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-01-04 10:27:09 +01:00
J-P Nurmi
24d8bcf93a QGtkStyle: exclude Xlib calls on Mac
Task-number: QTBUG-28769
Change-Id: I3f83b6011acf43e5136a762d0f8841b3a910cecb
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-01-03 22:17:11 +01:00
Jan Arve Saether
cf5264fd67 Cleanup verifyHierarchy. Remove dead code and add indexOfChild test
Change-Id: I4f423cf2f08b657329b7fb5e225e7b8b3f17e4af
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-01-03 20:18:06 +01:00
Jan Arve Saether
25c6908c80 Do not crash in the bridge because of inconsistent hierarchy
Change-Id: I732b624b9918ff4ab59ef46322fd42167b438a8d
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-01-03 20:18:06 +01:00
Mitch Curtis
1b47059c88 Clarify how two digit years are parsed by QDateTime::fromString().
It's currently not obvious that two digit years will always be in the
20th century (1900's).

Task-number: QTBUG-28797
Change-Id: I7dee9a46e0cb803a8f097debc5443d1789c2f16c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
2013-01-03 18:19:28 +01:00
Stephen Kelly
ee7dbf97bb Benchmarks: Remove declaration of built-in and automatic metatypes.
These types are either built-in or 'automatically declared' and so
don't need to be explicitly declared as metatypes.

Change-Id: Iba4b7f8ff7a1c7974d144b955cbf064e43b36ec7
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-01-03 18:19:28 +01:00
Stephen Kelly
330ad41b7d Network: Remove declaration of built-in and automatic metatypes.
These types are either built-in or 'automatically declared' and so
don't need to be explicitly declared as metatypes.

Change-Id: Ifdce72af844901665c4ebab11507216ba5f00fc1
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-01-03 18:19:28 +01:00
Sergio Martins
00b0dff93f QNX: Don't crash because the window hasn't been initialized yet.
Don't call window->handle() inside the backingstore ctor, because
we might still have the window ctor in the call stack
( ex: a QWindow sub-class that creates a backingstore inside it's
ctor).

Crash can be reproduced by running examples/gui/analogclock.

Change-Id: I4622ceaeb05696c5ae0181a528f58e5d102dcb22
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-01-03 18:19:28 +01:00
Peter Kümmel
8e3d4f5e87 Don't read from deleted member variable
QNetworkProxy::setApplicationProxy deletes factory set by
QNetworkProxyFactory::setApplicationProxyFactory.

Change-Id: Iaafd62d1cdb2045d69c7359cacc513056216826c
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2013-01-03 18:19:28 +01:00
Andreas Holzammer
0cac0796a0 WINCE: Follow new library naming schema
Change-Id: Iad85e64bf504053e21cad809d2435c1ca239201b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-01-03 16:15:37 +01:00
Stephen Kelly
4184892665 Fix copy-pasto in QMetaObject::methodCount docs.
Copy-pasto'ed from the propertyCount docs.

Change-Id: Iddb4ce9c9559ca274a80deb0785424df108af762
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-01-03 16:15:37 +01:00
Eskil Abrahamsen Blomfeldt
248ccb2889 Fix possible crash in QTextDocument
With trailing spaces in some cases, we would not get the
"no justification at end of paragraph" special case, and continue
in the code, getting the unexpected case where line_length becomes
< 0 which would lead to memory corruption because we were writing
outside our buffers. I added an assert to catch this type of bug
earlier, and I added the trailing spaces to the test for the end
of the paragraph.

The test case added is one example which would crash.

Task-number: QTBUG-27354
Change-Id: Id720a6fa55dbc709ce04dd5321e55687bf960d75
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-01-03 16:15:37 +01:00
Stephen Kelly
4319f698c8 Remove metatype registration of built-in types.
As they are built-in, they are effectively registered at compile-time
already.

Change-Id: I7ae6ba16088eab5d19213fa7b07c2a7760988a86
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-01-03 16:15:37 +01:00
Thiago Macieira
0fd0f8dfa0 Declare the QMetaType::WasDeclaredAsMetaType enum as private
Omit its value in the documentation.

Change-Id: I474faefde23b0e2e0a77a9e6391fd556a6523128
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-01-03 14:18:08 +01:00
Thiago Macieira
77924a0276 Remove some dead code from qtriangulator.cpp
The CompareEdges functor class is never used anywhere. Clang saw it
through to the static function that never got used:

qtriangulator.cpp:227:12: error: unused function 'comparePoints'
      [-Werror,-Wunused-function]
static int comparePoints(const QPodPoint &u, const QPodPoint &v)
           ^

Change-Id: I67d821e454daf82bd8107bf20f787aff9496e878
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-01-03 14:18:06 +01:00
Thiago Macieira
ddf8ebb014 Fix warnings found by GCC 4.7 in the XCB platform plugin
qxcbnativeinterface.cpp:246:8: error: unused parameter 'context' [-Werror=unused-parameter]
qxcbcursor.cpp:550:85: error: 'root' may be used uninitialized in this function [-Werror=maybe-uninitialized]

Change-Id: I5fa4e717c86d0e8198e501e6c799e0ceb9264708
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-01-03 14:18:03 +01:00