profile/ivi/qtbase.git
12 years agoQSqlTableModel: long live selectRow()!
Mark Brand [Thu, 16 Feb 2012 01:38:02 +0000 (02:38 +0100)]
QSqlTableModel: long live selectRow()!

Change-Id: If26dbcc8a1e8ef1376ef7a688c946ce5270e5706
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agoQSqlTableModel: handle changes between submit and select
Mark Brand [Wed, 15 Feb 2012 08:56:23 +0000 (09:56 +0100)]
QSqlTableModel: handle changes between submit and select

Once an insert has been submitted, the cached record behaves like an
update. For row bookkeeping, we still have to remember that it was
originally inserted and is not in the query rows.

Between submitting a delete and selecting, we remove the values
from the deleted record. This causes a blank row to be displayed.
Read-only flag is set for cells in deleted row.

Reverting between submit and select means going back to the last
submitted values.

When removing rows, it's better to process from highest row numbers
to lowest. This avoids complications with higher rows shifting down
when lower rows are removed.

Change-Id: I8752fa11f7a1b88f2a71b9e03a020ac37e62487f
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
12 years agoQRegularExpression: const correctness fixes
Giuseppe D'Angelo [Sun, 19 Feb 2012 22:58:04 +0000 (23:58 +0100)]
QRegularExpression: const correctness fixes

Adding some const qualifiers to members which are never written.

Change-Id: Ibb8953764c7b7790a419a5d48f2956751d5fc1f9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoQRegularExpression: add captureCount()
Giuseppe D'Angelo [Sun, 19 Feb 2012 22:56:50 +0000 (23:56 +0100)]
QRegularExpression: add captureCount()

QRegularExpression::captureCount() returns the number of
capturing groups inside the regular expression pattern.

Change-Id: Ib90ce67c67d06ab2966f0c98bd91da21defc156d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoQRegularExpression: do not use JIT in debug builds
Giuseppe D'Angelo [Wed, 8 Feb 2012 19:28:14 +0000 (19:28 +0000)]
QRegularExpression: do not use JIT in debug builds

PCRE's JIT uses self-modifying code extensively, requiring full SMC
checks enabled by tools like valgrind, which slow down the execution
considerably; not enabling SMC checks lead to crashes.

Therefore, JIT is now disabled by default in debug builds of Qt.
Its usage (both in debug and release builds) can be controlled
by setting the QT_ENABLE_REGEXP_JIT environment variable.

Change-Id: Ib38952400e4219582942ce65ab9edcd89c432f3e
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoQRegularExpression: improve operator==, add dedicated autotest
Giuseppe D'Angelo [Wed, 8 Feb 2012 18:53:22 +0000 (18:53 +0000)]
QRegularExpression: improve operator==, add dedicated autotest

Trivial change: compare dpointers first, then the data.
Added test function for operator==.

Change-Id: I33ac64a59db4ccad56c30be17622187e42415f38
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoQRegularExpression: QDebug support for pattern options
Giuseppe D'Angelo [Tue, 7 Feb 2012 23:56:40 +0000 (23:56 +0000)]
QRegularExpression: QDebug support for pattern options

Added the proper QDebug operator to debug the
QRegularExpression::PatternOptions flags.

Change-Id: Icd00e93a0c6cc4345db528d494fc176624f7b7a2
Reviewed-by: hjk <qthjk@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoQRegularExpression: add QRegularExpression* set of classes
Giuseppe D'Angelo [Mon, 23 Jan 2012 22:47:59 +0000 (22:47 +0000)]
QRegularExpression: add QRegularExpression* set of classes

Added QRegularExpression, QRegularExpressionMatch and
QRegularExpressionMatchIterator as PCRE-enabled, regexp classes.
Documentation is included, as well as a first round of autotests.

Task-number: QTBUG-23489
Change-Id: Id47031b80602c913ccd2fd740070e3024ea06abc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agodon't add bogus /mkspecs to QMAKE_MKSPECS
Oswald Buddenhagen [Fri, 2 Mar 2012 16:27:33 +0000 (17:27 +0100)]
don't add bogus /mkspecs to QMAKE_MKSPECS

the project build root can of course be empty - if there is neither an
mkspecs/ nor a .qmake.cache - or no project in the first place (-query).

Change-Id: I9595b0b4ad80a9086dcd48c9ae62b3e8bd1b6f2f
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agofix relative default examples path
Oswald Buddenhagen [Mon, 5 Mar 2012 20:03:09 +0000 (21:03 +0100)]
fix relative default examples path

copy&pasto ...

Change-Id: I73ab90f31f2a2250abe1ec9aeea975122ff319cb
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
12 years agoFix tst_QNetworkReply::httpWithNoCredentialUsage autotest
Shane Kearns [Mon, 5 Mar 2012 16:54:12 +0000 (16:54 +0000)]
Fix tst_QNetworkReply::httpWithNoCredentialUsage autotest

The test was testing the wrong thing, and passing even though
QNetworkRequest::AuthenticationReuseAttribute was not being
respected, until recently when I fixed username/password in URLs

Now the cache is properly bypassed when this attribute is set to
manual, and the autotest is updated to check this.

Change-Id: I87943515562d0b16b03504f0758ba265758d1c22
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
12 years agoFix QNetworkReply ioGetFromHttpWithCache test case
Shane Kearns [Mon, 5 Mar 2012 14:09:04 +0000 (14:09 +0000)]
Fix QNetworkReply ioGetFromHttpWithCache test case

Expiration date is calculated from max-age header when a response is
inserted into the cache. Because the test case is prepopulating the
cache outside of QNAM's control, the expiration date was uninitialised,
causing the test to fail.

This is due to a 2 year old change in QNAM, where max age calculation was
removed from cache retrieval, and more recent changes to QDateTime
where secsTo() returns 0 if one of the arguments is invalid.

Change-Id: Ieecd46123dde4ca0fd0be3ae79e70e1528ec02bc
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
12 years agoWindows - fix QWindowsSystemProxy global static race
Shane Kearns [Wed, 22 Feb 2012 21:23:48 +0000 (21:23 +0000)]
Windows - fix QWindowsSystemProxy global static race

Loser of the race would try to delete an uninitialised pointer

Task-number: QTBUG-15765
Change-Id: Ie184ee2306e102aa8fbad752ef09b95c3ede00c2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFix finding specs in the unsupported/ directory.
Thomas McGuire [Tue, 6 Mar 2012 12:13:09 +0000 (13:13 +0100)]
Fix finding specs in the unsupported/ directory.

The -spec argument was interpreted as a relative directory as
soon as it contained a slash. Fix this by checking if the
directory exists before attempting to interpret it.

Change-Id: Ide8f0418abc719b0be582d2d72642a141f6c6dea
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoQProcess/Win: pointless Sleep call removed
Joerg Bornemann [Tue, 6 Mar 2012 09:18:14 +0000 (10:18 +0100)]
QProcess/Win: pointless Sleep call removed

Change-Id: I634c62d3a0f96bc074e815dfd4106b6187f4ba85
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agotransitively resolve module dependencies
Oswald Buddenhagen [Fri, 24 Feb 2012 18:18:02 +0000 (19:18 +0100)]
transitively resolve module dependencies

otherwise we need the nasty hack for includes, and CONFIGs and DEFINES
from dependencies are not included at all.

Change-Id: I7eaee761161a6e8fbac8e9237d26559aa11a88a1
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
12 years agoDon't use QMutexPool in QEventDispatcher
Olivier Goffart [Fri, 2 Mar 2012 14:39:50 +0000 (15:39 +0100)]
Don't use QMutexPool in QEventDispatcher

Use a QBasicMutex, there is no extra cost of having a mutex for this.

Change-Id: Ib5b01338649002c0c21f018b2c931a8cc68027f6
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoDon't use QMutexPool from the animation framework
Olivier Goffart [Fri, 2 Mar 2012 15:18:52 +0000 (16:18 +0100)]
Don't use QMutexPool from the animation framework

Use a plain QBasicMutex instead

Change-Id: I1abd35b4fe4e9f0401e73c7c3f503b00bba2baa9
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoCleanup QThread::initialize and QThread::cleanup
Olivier Goffart [Fri, 2 Mar 2012 14:56:19 +0000 (15:56 +0100)]
Cleanup QThread::initialize and QThread::cleanup

The qt_global_mutexpool was private API deprecated long time ago.

And there is no reason to call qt_create_tls because it is called in
QThreadData::current that is called from the QObject constructor, even
before QCoreApplication::init can be called.

Change-Id: Idf3576d8591377811b727b12edc43dc898570ba4
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoMake cache of opentype tables in Harfbuzz face lazy
Eskil Abrahamsen Blomfeldt [Fri, 2 Mar 2012 15:20:55 +0000 (16:20 +0100)]
Make cache of opentype tables in Harfbuzz face lazy

The mechanism in fontconfig which determines if a certain character
is available (FcCharSetHasChar()) may give false positives, in which
case we would load and unload those fonts per every char for which
FC gave us a false positive. This was a major performance regression.
Specifically the false positives happened when looking at e.g.
italic variants of certain multilingual fonts, since we only check
the charset of the font family as a whole and not of the specific variant,
which may only support a subset of the chars.

To optimize this, we remove the deletion of the font engines after
loading them, but also wait with loading the opentype tables until
they are actually needed. This means that for the false positives,
we will load the font, but the cached data for each unused font will
be much smaller.

Change-Id: Idfc794401a2080da5946bf65204eb947aeb635ed
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoImprove safeness of QMetaType::registerType.
Jędrzej Nowacki [Mon, 5 Mar 2012 14:40:03 +0000 (15:40 +0100)]
Improve safeness of QMetaType::registerType.

This internal function is abused by some modules to create dynamic
types in metatype system. In Qt5 more non-optional arguments were added
to the function and to keep temporary source compatibility an overload
was created.

QMetaType code assumes that every known type has properly defined basic
operations like creation and destruction. Setting a helper function
pointer to null value is asking for a crash, because the code doesn't
check for that value, the null pointer may be called.

Change-Id: I5ca7454a70c308e01de26fab23481b3c94c22371
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoCocoa: Implement widget palettes.
Morten Johan Sorvig [Fri, 24 Feb 2012 08:17:00 +0000 (09:17 +0100)]
Cocoa: Implement widget palettes.

Add roles to QPLatformTheme::Palette, map QWidget
subclasses to those. Port Qt4 widget palette creation
code to use the QPLatformTheme::Palette roles.

Palette entries are disabled in this commit, this
will be fixed later.

Change-Id: I07babe3d7c76d306efc4ea4813c7161fdf36227f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoescape *_script_file usages in MingwMakefileGenerator::writeObjectsPart
Max Desyatov [Fri, 2 Mar 2012 11:33:17 +0000 (13:33 +0200)]
escape *_script_file usages in MingwMakefileGenerator::writeObjectsPart

Task-number: QTBUG-24595
Change-Id: I1e78a6015247b9e41ae2b05b50fdedf0613f00f1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agode-duplicate feature and mkspec root candidate lists
Oswald Buddenhagen [Fri, 24 Feb 2012 16:53:30 +0000 (17:53 +0100)]
de-duplicate feature and mkspec root candidate lists

Change-Id: I03f5b5903a133e5386b9ebef640ddbacdf3ebcd4
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agoQSslCertificate - make lazy initialisation thread safe
Shane Kearns [Wed, 29 Feb 2012 15:53:24 +0000 (15:53 +0000)]
QSslCertificate - make lazy initialisation thread safe

QSslCertificate can be copied around into multiple threads,
without detaching. For example, the https worker threads inside
QNetworkAccessManager.
There are const methods, which lazily initialise members of
the private class without detaching (i.e. caching results of
expensive function calls)
These functions now lock the d pointer using QMutexPool to
avoid concurrency related crashes.

autotest crashes 20% of the time in release builds without
the fix, passes 100 times in a row with the fix.

Task-number: QTBUG-20452
Change-Id: I64a01af8159216f2dd6215a08669890f6c029ca8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
12 years agoQMimeDatabase: Fix crash on empty filename
David Faure [Fri, 2 Mar 2012 19:33:55 +0000 (20:33 +0100)]
QMimeDatabase: Fix crash on empty filename

This is due to the search in the suffix tree starting at position
fileName.length() - 1.

Change-Id: I98501c1724c7dde2626351ace8ba19faa0d2e1e1
Reviewed-by: Ivan Komissarov <ABBAPOH@nextmail.ru>
Reviewed-by: Wolf-Michael Bolle <wolf-michael.bolle@nokia.com>
12 years agoqpa: Document a requirement of the backing store implementation
Holger Hans Peter Freyther [Mon, 20 Feb 2012 09:30:07 +0000 (10:30 +0100)]
qpa: Document a requirement of the backing store implementation

Docuent the requirement that the alpha channels need to be properly
initialized by the implementation.

Change-Id: I03db81b44b43ea75feb1b983fb0725c65a3bd9f4
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoadd widget mousebuttons example 'mousetester'.
Rick Stockton [Tue, 7 Feb 2012 01:20:08 +0000 (17:20 -0800)]
add widget mousebuttons example 'mousetester'.

This is an xev-like program. A user clicks a mouse button inside the
Window, and the program displays (a) the "raw" button number; (b)
the corresponding Qt::MouseButton name; and (c) the type of mouse Event.

Task-number: QTBUG-24112
Change-Id: I8a76ff37b5b85639f662706072cc4a2ce490754b
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoQWindow: fix crash on Mac
Tasuku Suzuki [Thu, 1 Mar 2012 23:53:03 +0000 (08:53 +0900)]
QWindow: fix crash on Mac

Fixes a crash when QWindow::baseSize() is invalid size.

Change-Id: I4e41f63d69ad0f218bfd35db8f30f18f92d4e9d5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoAdd missing Q_OBJECT macro to QCoreTextFontEngine
Tasuku Suzuki [Mon, 5 Mar 2012 08:48:22 +0000 (17:48 +0900)]
Add missing Q_OBJECT macro to QCoreTextFontEngine

Change-Id: I5d6b4742265a026d404d5ffa48f2c554d5483f30
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
12 years agoRemove codecForTr().
Robin Burchell [Tue, 31 Jan 2012 22:33:30 +0000 (00:33 +0200)]
Remove codecForTr().

Similarly to change id I2f429fa7ef93bd75bb93a7f64c56db15b7283388, the capability
to arbitrarily alter the encoding of literals is very destructive, especially in
a world with libraries and plugins.

Change-Id: If0d4cd8dcf89792e39c1984cbde6b036cebfc02f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agodo not re-evaluate spec+cache in build passes
Oswald Buddenhagen [Mon, 30 Jan 2012 14:47:45 +0000 (15:47 +0100)]
do not re-evaluate spec+cache in build passes

clean up the somewhat convoluted code paths which forced re-evaluation.
now that the spec+cache are evaluated in a completely clean context
anyway, there is no point in re-evaluating them for build passes.

Change-Id: I12279083238e9ca7028af97f45e2638c8dc715b8
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
12 years agomake QMakeProject's copy c'tor actually behave like one
Oswald Buddenhagen [Fri, 3 Feb 2012 17:34:56 +0000 (18:34 +0100)]
make QMakeProject's copy c'tor actually behave like one

instead of initializing base_vars with the original's vars, initialize
vars itself. this has two consequences:
- there is no need to call read(0) to initialize vars
- one cannot usefully call the complex read() anymore, as that would
  re-initialize vars from base_vars

this is much closer to an actual copy than the previous "seeding with
existing project".

Change-Id: Ib007bc5b779aedb680a27329aa578f7c604a4308
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
12 years agoQNam: only init channels when needed.
Martin Petersson [Thu, 1 Mar 2012 09:36:38 +0000 (10:36 +0100)]
QNam: only init channels when needed.

Each channel will create a socket that will allocate memory for the
read and write buffers. QNam generaly inits 6 sockets for each
connection. That means that by default 12 such buffers are created.
This will instead initialize channels when they are needed.

Change-Id: Ie3f2cf789e084fd3d17d3b2a9bb3d3a4370b3da4
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoSupport new-style plugins without a "Keys" json property
Alex Wilson [Mon, 5 Mar 2012 08:16:58 +0000 (18:16 +1000)]
Support new-style plugins without a "Keys" json property

As per discussion with Lars, intent here was to allow plugins without
a "Keys" property to still function correctly, but this particular
if statement was blocking any such plugins from being detected.

Change-Id: Icb343ca8bd95a508d62565cd816fe2a57a4f82bd
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoMark QMetaType constructor as explicit.
Jędrzej Nowacki [Mon, 5 Mar 2012 14:27:40 +0000 (15:27 +0100)]
Mark QMetaType constructor as explicit.

Implicit conversion from an int would look strange in this case.

Change-Id: I2222a045c293595d7b83a2fb75ca646f5cf79bca
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoRemove unused QThreadPoolPrivate::startFrontRunnable().
Robin Burchell [Mon, 5 Mar 2012 21:11:05 +0000 (22:11 +0100)]
Remove unused QThreadPoolPrivate::startFrontRunnable().

Change-Id: Ie079aea3412a53cf9dccaa770fa64ff5b6b7b3b1
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoQSqlTableModel::data(): use cached values when available
Mark Brand [Wed, 15 Feb 2012 01:07:59 +0000 (02:07 +0100)]
QSqlTableModel::data(): use cached values when available

Simplify logic. If the record is in the cache, even untouched
values should be there. This is also necessary for getting
the most up-to-date values between submitting and the next
select.

Change-Id: I8578d96229797ce9fb0d07fe456301358f2be071
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
12 years agoadd strategy support to sqlbrowser example
Mark Brand [Wed, 15 Feb 2012 10:23:54 +0000 (11:23 +0100)]
add strategy support to sqlbrowser example

Several useful options added to context menu.

Also added yellow background for unsubmitted
changes.

Change-Id: I132cd4498a5fb7275ea10c0497910aba99c06a2b
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agoQSqlTableModel: derive primary values from database values
Mark Brand [Tue, 14 Feb 2012 22:45:44 +0000 (23:45 +0100)]
QSqlTableModel: derive primary values from database values

Primary values are used to map a row in the model to a row in the
database table. It is critically important between submitting a
change and the following select (which refreshes the query) to have
updated primary values. Otherwise, if the change affected the primary
values, additional changes before select will misbehave.

Change-Id: I5d08dd70ac5d3f06cd9d3186a439f4c80a037c2d
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agoQSqlTableModel: mirror database values in change cache
Mark Brand [Tue, 14 Feb 2012 21:50:40 +0000 (22:50 +0100)]
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>
12 years agoQSqlTableModel: remove unnecessary parameter from setSubmitted()
Mark Brand [Tue, 14 Feb 2012 15:51:20 +0000 (16:51 +0100)]
QSqlTableModel: remove unnecessary parameter from setSubmitted()

Change-Id: I6d23788163ffd6ba7a8f01ed40910d861ff92703
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
12 years agoWorked around Metacity crashes in xcb plugin.
Samuel Rødal [Mon, 5 Mar 2012 10:04:48 +0000 (11:04 +0100)]
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>
12 years agoStabilize tst_QCalendarWidget::buttonClickCheck
Rohan McGovern [Tue, 6 Mar 2012 00:03:35 +0000 (10:03 +1000)]
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>
12 years agoStabilize tst_QShortcut
Rohan McGovern [Mon, 5 Mar 2012 23:54:55 +0000 (09:54 +1000)]
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>
12 years agoStabilize tst_QAccessibility::actionTest
Rohan McGovern [Mon, 5 Mar 2012 23:48:59 +0000 (09:48 +1000)]
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>
12 years agoRemove AccessibilityPrepare event.
Frederik Gladhorn [Sun, 12 Feb 2012 11:35:12 +0000 (12:35 +0100)]
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>
12 years agoDon't leak from QPlatformPrinterSupportPlugin::get()
Bradley T. Hughes [Fri, 2 Mar 2012 10:10:23 +0000 (11:10 +0100)]
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>
12 years agoAdd API to convert QSizeF<->PaperSize in QPlatformPrinterSupport
Bradley T. Hughes [Thu, 1 Mar 2012 07:22:57 +0000 (08:22 +0100)]
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>
12 years agoReplace Q_WS_MAC with Q_OS_MAC in QtPrintSupport
Bradley T. Hughes [Thu, 1 Mar 2012 12:19:15 +0000 (13:19 +0100)]
Replace Q_WS_MAC with Q_OS_MAC in QtPrintSupport

Change-Id: Ib19c87a72f74e28412a6060a83bf17d1d16a83ac
Reviewed-by: John Layt <jlayt@kde.org>
12 years agoRemove #ifdef Q_WS_MAC code from QPrinter
Bradley T. Hughes [Thu, 1 Mar 2012 12:18:53 +0000 (13:18 +0100)]
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>
12 years agoWindows: Make QSettings autotest significant again
Miikka Heikkinen [Thu, 1 Mar 2012 13:05:38 +0000 (15:05 +0200)]
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>
12 years agoEnable name of threads in release mode.
Leonard Lee [Mon, 5 Mar 2012 11:01:45 +0000 (12:01 +0100)]
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>
12 years agogive load()/include() with target and infile()/$$fromfile() a clean environment
Oswald Buddenhagen [Tue, 21 Feb 2012 21:23:48 +0000 (22:23 +0100)]
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>
12 years agoremove injection of default_pre in infile()/$$fromfile()
Oswald Buddenhagen [Fri, 3 Feb 2012 17:03:24 +0000 (18:03 +0100)]
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>
12 years agoFix tst_QStyleSheetStyle::qproperty to not implicitly rely on QHash ordering.
Robin Burchell [Mon, 5 Mar 2012 11:31:03 +0000 (12:31 +0100)]
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>
12 years agoList the dependencies of Qt when creating static libraries.
Stephen Kelly [Thu, 1 Mar 2012 10:40:49 +0000 (11:40 +0100)]
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>
12 years agoUpdate QTouchEvent docs with regards to raw positions
Laszlo Agocs [Mon, 5 Mar 2012 08:52:34 +0000 (10:52 +0200)]
Update QTouchEvent docs with regards to raw positions

Change-Id: I2c955e42605c442793095d5ca27c34d7d87e08fb
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agotestlib: Make verbose2 selftest use QCOMPARE as well as QVERIFY.
Jason McDonald [Thu, 1 Mar 2012 05:14:18 +0000 (15:14 +1000)]
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>
12 years agoMerge "Merge remote-tracking branch 'origin/api_changes'" into refs/staging/master
Rohan McGovern [Mon, 5 Mar 2012 03:53:58 +0000 (04:53 +0100)]
Merge "Merge remote-tracking branch 'origin/api_changes'" into refs/staging/master

12 years agoAvoid using internal testlib API in QDbusConnection autotest.
Jason McDonald [Mon, 5 Mar 2012 02:10:32 +0000 (12:10 +1000)]
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>
12 years agoMerge remote-tracking branch 'origin/api_changes'
Lars Knoll [Sun, 4 Mar 2012 20:32:40 +0000 (21:32 +0100)]
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

12 years agoFix documentation of the new connect functions.
Olivier Goffart [Sat, 3 Mar 2012 11:53:45 +0000 (12:53 +0100)]
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>
12 years agoQRegularExpression: import PCRE under 3rdparty/
Giuseppe D'Angelo [Mon, 23 Jan 2012 23:06:27 +0000 (23:06 +0000)]
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>
12 years agoCleaned up debug and warning output in xcb plugin.
Samuel Rødal [Fri, 2 Mar 2012 17:25:22 +0000 (18:25 +0100)]
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>
12 years agoQAbstractSlider - adding setRange as a slot
Thorbjørn Lund Martsum [Thu, 23 Feb 2012 14:53:51 +0000 (15:53 +0100)]
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>
12 years agoChange bugreports.qt.nokia.com -> bugreports.qt-project.org
Sergio Ahumada [Fri, 2 Mar 2012 10:04:01 +0000 (11:04 +0100)]
Change bugreports.qt.nokia.com -> bugreports.qt-project.org

Change-Id: Ia795098f24cf358b15067f54cd08dff0bd792bc5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoUse QHash<K,V> instead of QMap<K,V> when K is a pointer type
Giuseppe D'Angelo [Thu, 1 Mar 2012 23:47:36 +0000 (23:47 +0000)]
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>
12 years agoRemove the usage of deprecated qdoc macros.
Casper van Donderen [Thu, 1 Mar 2012 14:28:31 +0000 (15:28 +0100)]
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>
12 years agoMark overload of QAccessible::updateAccessibility as deprecated.
Frederik Gladhorn [Fri, 2 Mar 2012 18:38:12 +0000 (19:38 +0100)]
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>
12 years agoName threads properly
mae [Thu, 1 Mar 2012 18:42:50 +0000 (19:42 +0100)]
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>
12 years agoxcb: Check for SHAPE extension before using it
Uli Schlachter [Fri, 2 Mar 2012 15:33:01 +0000 (16:33 +0100)]
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>
12 years agoget rid of Option::user_configs
Oswald Buddenhagen [Thu, 2 Feb 2012 18:31:57 +0000 (19:31 +0100)]
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>
12 years agoremove now unused QMakeProject c'tors
Oswald Buddenhagen [Mon, 20 Feb 2012 21:19:11 +0000 (22:19 +0100)]
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>
12 years agomake evaluation of spec+cache independent of build pass context
Oswald Buddenhagen [Tue, 21 Feb 2012 11:56:47 +0000 (12:56 +0100)]
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>
12 years agoRemove the LIBS from platformsupport
Jørgen Lind [Tue, 28 Feb 2012 08:27:25 +0000 (09:27 +0100)]
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>
12 years agoFix get_accFocus() to return CHILDID_SELF when it returns itself.
Jan-Arve Saether [Fri, 2 Mar 2012 15:51:26 +0000 (16:51 +0100)]
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>
12 years agoImprove debugging in the windows accessibility bridge.
Jan-Arve Saether [Fri, 2 Mar 2012 15:06:04 +0000 (16:06 +0100)]
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>
12 years agoFix QWizard autotest for Windows 7 Classic theme
Miikka Heikkinen [Fri, 2 Mar 2012 11:47:47 +0000 (13:47 +0200)]
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>
12 years agoUse correct types in QResource.
Robin Burchell [Fri, 2 Mar 2012 14:05:59 +0000 (15:05 +0100)]
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>
12 years agodon't announce a dynamic .qmake.cache if we don't actually create one
Oswald Buddenhagen [Fri, 2 Mar 2012 10:56:16 +0000 (11:56 +0100)]
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>
12 years agoImproving clipboard integration
Kevin Krammer [Tue, 28 Feb 2012 15:35:08 +0000 (16:35 +0100)]
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>
12 years agoFixing z-ordering of windows
Kevin Krammer [Tue, 28 Feb 2012 14:48:57 +0000 (15:48 +0100)]
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>
12 years agoMake the CONFIG and QT_CONFIG contents available downstream.
Stephen Kelly [Thu, 1 Mar 2012 10:37:51 +0000 (11:37 +0100)]
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>
12 years agoFix sizing in QGraphicsView itemsAtPosition auto test
Jonathan Liu [Wed, 29 Feb 2012 21:09:26 +0000 (08:09 +1100)]
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>
12 years agoAdd additional QGraphicsView tests for regression
Jonathan Liu [Tue, 28 Feb 2012 21:18:43 +0000 (08:18 +1100)]
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)

12 years agoRevert "Don't rely on mapFromGlobal in QGraphicsScenePrivate::itemsAtPosition."
Jonathan Liu [Thu, 23 Feb 2012 13:42:34 +0000 (00:42 +1100)]
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)

12 years agoExport QPaintEnginePrivate from QtGui
Bradley T. Hughes [Thu, 1 Mar 2012 14:35:43 +0000 (15:35 +0100)]
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>
12 years agoRemove Q_BYTE_ORDER and -*-endian arguments from configures
Bradley T. Hughes [Fri, 24 Feb 2012 10:11:02 +0000 (11:11 +0100)]
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>
12 years agoFix QApplication autotest crash when running on multiple screens
Miikka Heikkinen [Thu, 1 Mar 2012 11:19:24 +0000 (13:19 +0200)]
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>
12 years agoAdd note about failing test when using shared-mime-info < 1.0
David Faure [Thu, 1 Mar 2012 15:41:39 +0000 (16:41 +0100)]
Add note about failing test when using shared-mime-info < 1.0

Change-Id: I3ba9d14d915a579b9e102114866f6c9e0344ba16
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoLink against the precompiled header.
Andreas Holzammer [Fri, 2 Mar 2012 10:02:03 +0000 (11:02 +0100)]
Link against the precompiled header.

This fixes the build for Visual Studio 2011.

Change-Id: I8c43eef851d76f8cdde13a57ea3dcd9cf32df0ab
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoFix QPixmap::grabWidget() on Windows.
Friedemann Kleint [Thu, 1 Mar 2012 16:31:37 +0000 (17:31 +0100)]
Fix QPixmap::grabWidget() on Windows.

Do not draw on the backingstore DC when drawing
to a pixmap. Access the paintdevice for checking via
the QPaintEngine since QPainter returns the clipdevice,
which is a widget.
Fix warning about accessing handle of 0-window in the
test.

Task-number: QTBUG-24183

Change-Id: Ie91ea6ab9d09528c7ec1d35633f9a0ee667719b1
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoAutomatic metatype registration of two-template-argument types.
Stephen Kelly [Wed, 29 Feb 2012 14:07:12 +0000 (15:07 +0100)]
metatype registration of two-template-argument types.

This commit is complimentary to the commit which introduced a similar
partial specialization for single template argument types:
6b4f8a68c8da1af7c5be7dc6075b688c9d6ca55f

If T and U are available as metatypes, then QHash<T, U> is too.

Change-Id: I09097b954666418b424c8c23577032beb814343a
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoSupport 16+4 mouse buttons within the generic/evdevmouse plugin.
Rick Stockton [Thu, 1 Mar 2012 07:56:34 +0000 (23:56 -0800)]
Support 16+4 mouse buttons within the generic/evdevmouse plugin.

The Kernel's evdev module is capable of presenting up to 16 mouse
buttons, plus wheel events (UP, DOWN, LEFT, and RIGHT). This
patch updates our Plugin, so that it tranlates all of those button
numbers into corresponding MouseEvent Qt::MouseButton values.

Task-number: QTBUG-24590

Change-Id: Ib8cbb9500280c76f06a51ce95095e22ae84de1c6
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoclean up build pass project initialization
Oswald Buddenhagen [Tue, 21 Feb 2012 11:44:27 +0000 (12:44 +0100)]
clean up build pass project initialization

instead of messing with the Option singleton, add a way to inject
extra config values into QMakeProject.

Change-Id: Ia347dcc38af2c72913e30ebf5c2b4044f93b4f5f
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
12 years agomove finding the makespec to Option
Oswald Buddenhagen [Thu, 23 Feb 2012 18:34:10 +0000 (19:34 +0100)]
move finding the makespec to Option

this is a one-time operation which depends only on the invocation, so
this new home is much more appropriate.

Change-Id: I07c66d95a9ae01a664cec17564995311fb78ec9b
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
12 years agotestlib: Add selftests for -v1 and -v2 command-line switches.
Jason McDonald [Thu, 1 Mar 2012 01:01:49 +0000 (11:01 +1000)]
testlib: Add selftests for -v1 and -v2 command-line switches.

These tests don't have their own source code but rather reuse the
counting selftest with additional command-line options.

Note that currently the -v1 switch only changes the plain text output,
and the expected xml output is identical to that of the counting test.
This may change in the future however.

This commit also restores a couple of lists to alphabetical order, where
the findtestdata selftest was not sorted into the list correctly.

Change-Id: Ie38e255f8029157b34162b3864b5fa66e137d74a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agotestlib: Improve documentation of verbose test logging options.
Jason McDonald [Wed, 29 Feb 2012 02:49:25 +0000 (12:49 +1000)]
testlib: Improve documentation of verbose test logging options.

Change the help output to show which options only work for plain text
logging.

Change-Id: I39eb7cd0793cdbe553c230334c6cd532b4929f61
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoAdd protocol type B support to the evdevtouch plugin
Laszlo Agocs [Thu, 1 Mar 2012 07:59:33 +0000 (09:59 +0200)]
Add protocol type B support to the evdevtouch plugin

Also adds optional support for libmtdev (a helper library which
translates transparently from type A to B when using type A kernel
drivers).

Change-Id: Ic9c065b2fd130e9db2dd07e7dc103e9d45c08c99
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>