Commit Graph

5043 Commits

Author SHA1 Message Date
Mark Brand
463bd32fe5 QSqlTableModel: mirror database values in change cache
Between submitting and the next select, these values will be more
up-to-date than those that could be obtained from the query.

This will be useful for constructing primary values and reverting
changes made after submitting.

Change-Id: I8317617f3e7043ad0b79b333731c55fb88aef171
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
2012-03-06 06:34:29 +01:00
Mark Brand
50f6cf6e48 QSqlTableModel: remove unnecessary parameter from setSubmitted()
Change-Id: I6d23788163ffd6ba7a8f01ed40910d861ff92703
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
2012-03-06 06:34:27 +01:00
Samuel Rødal
50ca45f059 Worked around Metacity crashes in xcb plugin.
Setting the user time before mapping the window seems to prevent the
crasher from happening. We used to set the user time before mapping in
Qt 4.8 too, so it's probably the right thing to do.

Task-number: QTBUG-24462
Change-Id: Ia670b799bd1ed7a7e6399631d5242e57324918b3
Reviewed-by: Jan Arne Petersen <jpetersen@openismus.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-06 01:34:57 +01:00
Rohan McGovern
7206f9c539 Stabilize tst_QCalendarWidget::buttonClickCheck
The window should be shown and activated before sending user input.

Task-number: QTBUG-23615
Change-Id: I2fc1738d9dc4ee7f03c81b040eed6389910a9d3c
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2012-03-06 01:34:55 +01:00
Rohan McGovern
443fd332f9 Stabilize tst_QShortcut
show() on a window is asynchronous.  Wait for it to complete before
continuing with the test.

Note the test already contained code for this, but it was inside of
a Q_WS_X11 block, making it dead code in Qt 5.

Change-Id: I06f892eea86278c56b1773a7e968bbe065f86260
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
2012-03-06 01:34:53 +01:00
Rohan McGovern
961c3f958f Stabilize tst_QAccessibility::actionTest
show() on a window is asynchronous.  Wait for it to complete before
continuing with the test.

Change-Id: Icd0daa0c0e8f287171c57708bb2fce0b6cf0906a
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
2012-03-06 01:34:50 +01:00
Frederik Gladhorn
f449cefc27 Remove AccessibilityPrepare event.
This event was completely unused.
In addition it leads to crashes on linux when
sending the Destroy accessibility update.

The Destroy event on linux would still query an accessible interface.
That in turn would trigger the event to be sent.

Change-Id: I8915527de067b8b70ba41b1361e3ef5d12866d7d
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-03-05 18:46:43 +01:00
Bradley T. Hughes
b7ba685150 Don't leak from QPlatformPrinterSupportPlugin::get()
Cache the first QPlatformPrinterSupport returned from the first
QPlatformPrinterSupportPlugin, and treat it as an persistent singelton.

Change-Id: Ic1c83d7c1cdf4a09723a74e0b9fd485e0b0b3acb
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-05 16:37:16 +01:00
Bradley T. Hughes
e1ec8727ea Add API to convert QSizeF<->PaperSize in QPlatformPrinterSupport
These static public functions give printsupport plugins access to the
non-exported qt_paperSizeToQSizeF() and qSizeFTopaperSize() functions in
qprinter.cpp to aid implementing QPrintEngine and
QPlatformPrinterSupport::supportedPaperSizes().

Change-Id: I3ebcdcd17e863b06ceb135e096e630b37882a293
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-03-05 16:37:16 +01:00
Bradley T. Hughes
0cb58c7c6d Replace Q_WS_MAC with Q_OS_MAC in QtPrintSupport
Change-Id: Ib19c87a72f74e28412a6060a83bf17d1d16a83ac
Reviewed-by: John Layt <jlayt@kde.org>
2012-03-05 16:37:16 +01:00
Bradley T. Hughes
79e64ede69 Remove #ifdef Q_WS_MAC code from QPrinter
We have a QPlatformPrinterSupportPlugin on Mac OS X to return the
QPrintEngine/QPaintEngine, no need to keep this code.

Change-Id: Ie24dcfd157810ede69790fc7b27c12e24766efce
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-03-05 16:37:16 +01:00
Miikka Heikkinen
82fd18fe36 Windows: Make QSettings autotest significant again
The latest windows run of CI has QSettings test passing, so remove the
CONFIG += insignificant_test from it.

Task-number: QTBUG-24145
Change-Id: I35c0d8d4f72ad49f9f21dcd486ab33a37ab95e15
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2012-03-05 16:37:16 +01:00
Leonard Lee
e8b46d6f69 Enable name of threads in release mode.
Naming threads is very useful for release builds.
Enabling only on Linux/Mac for now.
The Windows port is using debugger specific API for setting thread
 names, so it has to remain debug mode only.

Change-Id: I179521f65f215ff038e8230f958f6aa728ea4cbe
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-03-05 14:54:18 +01:00
Oswald Buddenhagen
a91c997238 give load()/include() with target and infile()/$$fromfile() a clean environment
load()/include() with a target namespace would inherit the current
context. however, if you source a project with all bells and whistles,
this makes completely no sense and may be actually counterproductive.

infile()/$$fromfile() would have interited only the functions from the
current context. that was only a hack to support abusing them.

Change-Id: I2e992b923d9e5b0e5056001ca49b35de573abc63
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-03-05 14:46:36 +01:00
Oswald Buddenhagen
deb3c134b5 remove injection of default_pre in infile()/$$fromfile()
this is a hack from the times when these functions were (ab)used to
inspect proper project files, but the inclusion was done with a clean
project, so that the included files did not have any functions to work
with.

Change-Id: I19925e8ead597ca38df040000c183e368b32c06d
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-03-05 14:46:12 +01:00
Robin Burchell
d94165ab32 Fix tst_QStyleSheetStyle::qproperty to not implicitly rely on QHash ordering.
Changing qHash() for string data affected the order of properties to be set,
causing 'checkable' to be set after 'checked'.

As 'checkable' state affects 'checked' as well (setting it to false), this means
that the test was unreliable, a bug, which was exposed by the qHash change.

Change-Id: I03a8dd7d07609683d99f0b2a40012a147d409c6e
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-03-05 14:09:24 +01:00
Stephen Kelly
c01ef19e77 List the dependencies of Qt when creating static libraries.
Change-Id: Ib6787f982ff962cfdf3d8a0a26989489619a57b0
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-03-05 11:36:36 +01:00
Laszlo Agocs
3ae0164687 Update QTouchEvent docs with regards to raw positions
Change-Id: I2c955e42605c442793095d5ca27c34d7d87e08fb
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-05 11:34:14 +01:00
Jason McDonald
0862d7f78a testlib: Make verbose2 selftest use QCOMPARE as well as QVERIFY.
The verbose output for QCOMPARE is not very helpful.  Make the verbose2
selftest (which reuses the counting selftest) demonstrate this, so that
a future commit can demonstrate improvement.

Change-Id: I6b3bc8f5199e984aa11d0a67b76a8c916be86380
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-03-05 05:32:03 +01:00
Rohan McGovern
33f82d5b4e Merge "Merge remote-tracking branch 'origin/api_changes'" into refs/staging/master 2012-03-05 05:31:06 +01:00
Jason McDonald
d423fd0975 Avoid using internal testlib API in QDbusConnection autotest.
QCOMPARE should only be used in a test function because it makes the
test function return if the compare fails.  The test wants to compare
without returning on failure because the compare is inside a helper
function called by many test functions, so the test was calling
testlib's internal QTest::compare_helper() functions instead of
QCOMPARE.

This commit makes this code slightly less objectionable by calling the
public QTest::qCompare() instead.

Change-Id: Ida17a641e89f8a297d6a036449f44b33aa266368
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-05 03:44:01 +01:00
Lars Knoll
96232be146 Merge remote-tracking branch 'origin/api_changes'
Conflicts:
	dist/changes-5.0.0
	mkspecs/features/qt_module_config.prf
	qmake/project.cpp
	qmake/property.cpp

Change-Id: I6e4af40743a9aeff8ed18533a48036e332acc296
2012-03-04 21:45:05 +01:00
Olivier Goffart
8db8a34f07 Fix documentation of the new connect functions.
Make sure that qdoc can find the same function signature in the header
than in the \fn tags in qobject.cpp

Change-Id: Iccf2ba4e8f6384e9c3bfc878a446120f03e8a813
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-03-04 15:19:15 +01:00
Giuseppe D'Angelo
ddf4faf33f QRegularExpression: import PCRE under 3rdparty/
Imported only the minimum subset of PCRE version 8.30,
without documentation, tests, examples, etc. by using
the import_from_pcre_tarball.sh script.

Change-Id: Ib1112a6179789814cc3c90cbde59408d2ccd0f57
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-03 01:00:12 +01:00
Samuel Rødal
3280b91985 Cleaned up debug and warning output in xcb plugin.
Got rid of unnecessary debug output, and prefixed debug / warnings
with class name to provide more context.

Change-Id: Ia68e85ec0207de4d87d02226bdf6e4cddf464afc
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-03-02 23:16:25 +01:00
Thorbjørn Lund Martsum
87975f88ce QAbstractSlider - adding setRange as a slot
In many situations it would be very nice to have setRange
as a slot. It fits good with the rangeChanged signal -
and in some situations it does make sense to synchronize
scrollbars ranges.

Change-Id: I6bcb41ed6e009e5822b56b621e4e187fe52502a6
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-03-02 23:16:25 +01:00
Sergio Ahumada
db1abf9f76 Change bugreports.qt.nokia.com -> bugreports.qt-project.org
Change-Id: Ia795098f24cf358b15067f54cd08dff0bd792bc5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-02 23:16:25 +01:00
Giuseppe D'Angelo
7ae38c49b7 Use QHash<K,V> instead of QMap<K,V> when K is a pointer type
Changes various internal usages of QMap when the key is a pointer type.
Being ordered by the pointer value itself, it makes very little sense
to use QMap<K*, V> (esp. in cases where the key is actually allocated
on the heap).

The usages have been found with the following script:

 #!/usr/bin/perl

 use strict;
 use warnings;
 use Regexp::Common;
 use File::Find;
 use feature ':5.10';

 my $container = qr/(?:QMap)/;

 sub process {
     return unless (-f and -r and /(\.c|\.cpp|\.h|\.txt)$/);
     open my $fh, "<", $_ or die "Cannot open $_: $!";
     while (my $line = <$fh>) {
         chomp $line;
         while ($line =~ /($container\s*$RE{balanced}{-parens=>"<>"})/g) {
             my $tmp = $1;
             $tmp =~ s/\s+//g;
             say "$_:$.: $line" if $tmp =~ /^$container\s*<[^,]+\*,/;
         }
     }
     close $fh;
 }

 find( { no_chdir => 1, wanted => \&process }, @ARGV );

Change-Id: Idd9819c3f4c48f98ef92831d5e8e5ac0fa42283c
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-02 23:16:25 +01:00
Casper van Donderen
95d83cb1b6 Remove the usage of deprecated qdoc macros.
QDoc now has support for Doxygen style commands for italics, bold
and list items. This change applies that change in QDoc to the
actual documentation.

Task-number: QTBUG-24578
Change-Id: I519bf9c29b14092e3ab6067612f42bf749eeedf5
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-02 23:16:25 +01:00
Frederik Gladhorn
15e136d4e1 Mark overload of QAccessible::updateAccessibility as deprecated.
updateAccessibility(const QAccessibleEvent &event) should be used,
updateAccessibility(QObject *object, int child, Event reason) is deprecated.

Change-Id: I92b32579ff202681189e9581365d2891e5d1e994
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-03-02 23:16:25 +01:00
mae
0f49137027 Name threads properly
When there is no QObject subclass with Q_OBJECT macro,
we must at least set an object name

Change-Id: Ib429a9b246d9d6b4b4cfb11593e4f358850677f2
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-02 23:16:25 +01:00
Uli Schlachter
9c757fac35 xcb: Check for SHAPE extension before using it
This change makes sure that the X11 server really supports the SHAPE
extension before it is used.

Before this, libxcb would disconnect from the server as soon as it was
told to send a SHAPE request to a server which doesn't support SHAPE. Oh
and of course it would do so without any good error message.

Change-Id: I5f9481e488925e74e62f229e9f637ef262020c04
Signed-off-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-02 21:33:08 +01:00
Oswald Buddenhagen
c679b2f0a6 get rid of Option::user_configs
merge them into before_user_vars. they are evaluated right after another
anyway.

Change-Id: I11859284b363fee01233f6e20989444fef711d0d
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-03-02 21:33:08 +01:00
Oswald Buddenhagen
a30074bab8 remove now unused QMakeProject c'tors
Change-Id: Ia65d49df50a5610bbd88417ca90ac348a774a1e1
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-03-02 21:33:08 +01:00
Oswald Buddenhagen
dce3821b8a make evaluation of spec+cache independent of build pass context
don't inject the build pass specific variables into the project even
before evaluating the .spec file and the .qmake.cache. they are not
supposed to base configuration on that - feature files should do that
later.

the immediate advantage of this is that base_vars is never manipulated
upfront any more, which allows for cleaner setup paths. also, we can do
more caching of the spec+cache contents.

Change-Id: I19d7f8bec1fb7c3b54121e26794340b287055ebf
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-03-02 21:33:08 +01:00
Jørgen Lind
cd6e90c70a Remove the LIBS from platformsupport
The application / library that uses this should know it needs to link
to ie. udev, xrendr etc.

Change-Id: I9e3ffd4d98b3bd66abb8e621378b010da7feda7a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
2012-03-02 21:33:08 +01:00
Jan-Arve Saether
72b5afddb9 Fix get_accFocus() to return CHILDID_SELF when it returns itself.
This means that the AT client knows it should not have to ask for
the focus child anymore.
Previously, some clients (NVDA) kept on asking infinitely because of
this.

Change-Id: Ia2bd2e1088a899f7d1a0c9189024accdacfd693b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-03-02 18:36:07 +01:00
Jan-Arve Saether
c531fcc92e Improve debugging in the windows accessibility bridge.
set QT_DEBUG_ACCESSIBILITY=(1|0) to turn logging on or off

Change-Id: Ibd5b77699decf0cf02bc6b6cc656fa237de29124
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-03-02 18:35:21 +01:00
Miikka Heikkinen
db1aa6dd99 Fix QWizard autotest for Windows 7 Classic theme
QWizard always forced Aero style even if Classic theme was used.
Added a check for Classic theme into initialization.

Task-number: QTBUG-24618
Change-Id: I0793df62e022037835e1c1a311143f06cc4382b4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-02 18:31:10 +01:00
Robin Burchell
db5c28fa0e Use correct types in QResource.
qHash() returns uint, not int, so change all interactions with hashing to use
uint to match.

This blocks the introduction of a new (better) hashing algorithm because it
currently breaks numerous tests: rcc would (correctly) write a uint hash value
to the qrc files, but QResource would attempt to mangle it around as an int.

This wasn't a problem with the old hash, because it deliberately threw away
data (h &= 0x0fffffff), possibly because of someone not being able to
diagnose precisly this problem.

Change-Id: I46fb42acc100fdd3bedd714f6dc91aeca91d0351
Reviewed-by: hjk <qthjk@ovi.com>
2012-03-02 16:07:47 +01:00
Oswald Buddenhagen
ab05682564 don't announce a dynamic .qmake.cache if we don't actually create one
otherwise we are breaking the "less hacky" configurations. whoops.

Change-Id: Ibb037753fbaf30beae3d30173be77d48b978b60b
Reviewed-by: Caroline Chao <caroline.chao@nokia.com>
2012-03-02 15:56:44 +01:00
Kevin Krammer
08cc2d2779 Improving clipboard integration
Derive a data accessor class from QMimeData so application level code can
query MIME type availability through it or directly attempt to fetch
data by MIME type even if the type is not yet known to QBBClipboard.

Also make sure any MIME type used by the application in setMimeData
operations is checked for availability when being queried for formats.

Change-Id: If8174adf3f3383496a354d291ef7d36b9732be1d
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2012-03-02 15:55:44 +01:00
Kevin Krammer
c0af324071 Fixing z-ordering of windows
The application root window is at z-order == 0, all platform windows created
for Qt windows are its descendants, so their base value for z-order needs
to be 1.

Change-Id: I7c9615ffac6757c31900a7640eb0ffdd6065b722
Reviewed-by: Sean Harmer <sh@theharmers.co.uk>
Reviewed-by: Nick Ratelle <nratelle@qnx.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
2012-03-02 15:55:38 +01:00
Stephen Kelly
6c2e57e688 Make the CONFIG and QT_CONFIG contents available downstream.
Change-Id: I62dbc5a695e41179de9f6acd11aa7bc592cac6f3
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-03-02 15:55:29 +01:00
Jonathan Liu
b2fb578a11 Fix sizing in QGraphicsView itemsAtPosition auto test
The auto test may fail incorrectly depending on the width of the
QGraphicsView frame. To ensure more consistent test results, the frame is
disabled.

Change-Id: I8d70fb07e45803230954f776947d525e4cf9050f
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-03-02 15:33:11 +01:00
Jonathan Liu
81dcb377e5 Add additional QGraphicsView tests for regression
Add additional tests for graphics view tooltip regression introduced by
7c0d15a22266a425c9e9ac0120d6774e120fe01e.

Task-number: QTBUG-17517
Task-number: QTBUG-22663
Change-Id: I5e0d0e19504730a3e14ac84712a366dbebe688e6
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
(cherry picked from commit aaa46755dcc15b8baaa0d1b928828eb60e0babbc)
2012-03-02 15:33:06 +01:00
Jonathan Liu
286229ca14 Revert "Don't rely on mapFromGlobal in QGraphicsScenePrivate::itemsAtPosition."
This reverts commit 7c0d15a22266a425c9e9ac0120d6774e120fe01e.
The commit caused a regression whereby tooltips may be shown even if the
mouse is not over the item if it has the Qt::ItemIgnoresTransformations
flag and the QGraphicsView had been scaled.

Task-number: QTBUG-17517
Task-number: QTBUG-22663
Change-Id: Ib7fd788d9712c5e659fe07182f9505a4eb135ab2
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
(cherry picked from commit 15c14584199dc43e4a309fc331f3144009008128)
2012-03-02 15:33:04 +01:00
Bradley T. Hughes
70578e4fc7 Export QPaintEnginePrivate from QtGui
This allows the QCoreGraphicsPaintEngine to use QPaintEnginePrivate
members (e.g. pdev and drawBoxTextItem()).

Change-Id: I5bed3cb007ae469816afce619edd55f155b04fa9
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-02 14:57:31 +01:00
Bradley T. Hughes
17ddce4692 Remove Q_BYTE_ORDER and -*-endian arguments from configures
Do not write Q_BYTE_ORDER to qconfig.h in the configures. Instead,
we #define Q_BYTE_ORDER in qprocessordetection.h, since many CPUs only
support a single endian format. For bi-endian processors, we set
Q_BYTE_ORDER depending on how the preprocessor sets __BYTE_ORDER__,
__BIG_ENDIAN__, or __LITTLE_ENDIAN__ (instead of using a compile test
to do so).

For operating systems that only support a single byte order, we can
check for Q_OS_* in addition to the preprocessor macros above. This is
possible because qprocessordetection.h is included by qglobal.h after
Q_OS_* and Q_CC_* detection has been done. Do this for Windows CE,
which is always little- endian according to MSDN.

Change-Id: I019a95e05252ef69895c4b38fbfa6ebfb6a943cd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-02 14:48:00 +01:00
Miikka Heikkinen
62a654cc90 Fix QApplication autotest crash when running on multiple screens
Screens need to be destroyed in reverse order to ensure the primary
screen stays valid when other screens are destroyed.

Task-number: QTBUG-24300
Change-Id: I9d9d710aa67ec045baa8bf292833ffe7d9eea935
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-03-02 14:45:23 +01:00