profile/ivi/qtbase.git
12 years agoImprove type detection for query results
Andy Shaw [Fri, 2 Mar 2012 09:46:57 +0000 (10:46 +0100)]
Improve type detection for query results

When an aggregate function is used for a column in a SQL resultset then
it should ensure that the right data type is reported for that column.
This also concerns expressions when the returned column does not map
directly to a table column.

Test included for this.

Task-number: QTBUG-22038
Change-Id: I07487694c0ed393d46af06e232914fe923356a99
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
12 years agoRefactor headersclean for usage from modules other than qtbase
Rohan McGovern [Thu, 1 Mar 2012 04:37:50 +0000 (14:37 +1000)]
Refactor headersclean for usage from modules other than qtbase

headersclean enforces various rules which all Qt headers are supposed to
abide by.  It fails compilation if these rules are broken.

These rules should be followed also by modules hosted outside of
qtbase.  Split the test up so that it can be easily reused by other
modules.

Change-Id: Icf09cbfde411c926ed87914dc821e6dfc569b0de
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoCompile with -qtnamespace
Sarah Smith [Tue, 6 Mar 2012 01:51:22 +0000 (11:51 +1000)]
Compile with -qtnamespace

Mac has to work with -qtnamespace as well, and other files have gotten
this right, so follow their example.

Change-Id: I551e1843e8a0e82a82d1d5ea8c8cd5f20e6880fa
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoQRegularExpression: fix optimizePattern, document the issue
Giuseppe D'Angelo [Thu, 16 Feb 2012 22:49:27 +0000 (23:49 +0100)]
QRegularExpression: fix optimizePattern, document the issue

The studyData pointer is atomically set by the pointer assignment,
but another processor running a different thread might see the
new studyData value but not the memory it points to.

Therefore, the current studyData is returned from optimizePattern
and used by that thread.

Docs were added to optimizePattern to explain what's going on.

Change-Id: I4502c336077bb98a1751011aa93ffd4f585ed101
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoRenaming QNX mkspecs
Rafael Roquetto [Tue, 6 Mar 2012 14:21:19 +0000 (15:21 +0100)]
Renaming QNX mkspecs

Renamed from blackberry-* to qnx-* in order to match he <platform>-<compiler>
pattern.

Change-Id: I378151f3d564dd280943c74865a1d2b97215b656
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoAdd benchmark for QMetaType::create().
Jędrzej Nowacki [Tue, 6 Mar 2012 11:04:37 +0000 (12:04 +0100)]
Add benchmark for QMetaType::create().

A case of a custom type creation was not covered before.

Change-Id: Icd2a7d63633f8e40d9d4a8a26e0eb0896fc85ec8
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years agoQuery udev build parameters from pkg-config
Donald Carr [Fri, 2 Mar 2012 04:58:33 +0000 (04:58 +0000)]
Query udev build parameters from pkg-config

Change-Id: Ia3b7329d7359684ee7bf572a7e5fb681105108f4
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Holger Freyther <holger+qt@freyther.de>
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoFix double click handling.
Laszlo Agocs [Tue, 6 Mar 2012 14:09:09 +0000 (16:09 +0200)]
Fix double click handling.

Until now double clicking in Qt 5 resulted in the following sequence of mouse
events: pressed, released, double clicked, released. This is wrong, the press
belonging to the second button down is missing. In Qt 4 that pressed event is
present.

The problem is not apparent in desktop environments because the double click is
functioning properly even when the second pressed is missing. However when
using a platform plug-in like wayland, where the clients receive only press,
move and release events, double click was broken because the second click was
effectively ignored (due to receiving nothing but a button release).

Change-Id: Ief6af12c666b23e544da4a68cb835cd577265469
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoFix the bit test for ABS_MT_SLOT to detect protocol B
Shawn Rutledge [Tue, 6 Mar 2012 15:29:50 +0000 (16:29 +0100)]
Fix the bit test for ABS_MT_SLOT to detect protocol B

I tested, it didn't work.  This is from a previous patch I had
already gotten working before 40a5ba4d3fccb449dcfd8d9a0deaf4c7f0fe12bc
was submitted.

Change-Id: I868f069fe834b3122ed9b5b3dc9af0781d6e1d0d
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoQRegularExpression: fix documentation due to qdoc changes
Giuseppe D'Angelo [Sat, 3 Mar 2012 12:41:13 +0000 (12:41 +0000)]
QRegularExpression: fix documentation due to qdoc changes

Removes the usage of various qdoc macros which are now deprecated.

Change-Id: I74fa70f8d2a2a1bff57cdb2bcc14a31a7198dea0
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoFixed warnings from arm builds with -Wundef
Rohan McGovern [Tue, 6 Mar 2012 07:50:05 +0000 (17:50 +1000)]
Fixed warnings from arm builds with -Wundef

Do not use the value of a macro before verifying that the macro
is defined.

Change-Id: I36bebe37da5f4e5e7af1e423b7f2b18091e35707
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoFix off by one in updateAccessibility.
Frederik Gladhorn [Mon, 5 Mar 2012 15:56:55 +0000 (16:56 +0100)]
Fix off by one in updateAccessibility.

Now that indexOfChild is 0-based, the update notifications should follow.

Change-Id: I5e0303516d503d5e23061df5894b2428c00da2ce
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
12 years agoFix parsing of unicode escape sequences
Lars Knoll [Tue, 6 Mar 2012 12:05:09 +0000 (13:05 +0100)]
Fix parsing of unicode escape sequences

Change-Id: I63a7cd3a571fb47c97157bcb2ca29c4239c600ba
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFixed warning from gcc with -Wundef for some values of WCHAR_MAX
Rohan McGovern [Tue, 6 Mar 2012 07:55:14 +0000 (17:55 +1000)]
Fixed warning from gcc with -Wundef for some values of WCHAR_MAX

Certain versions of system headers will declare WCHAR_MAX like:

    #define __WCHAR_MAX      ( (wchar_t) - 1 )
    #define WCHAR_MAX         __WCHAR_MAX

In particular on ARM (see e.g.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=598937 )

In this case, defined(WCHAR_MAX) is true, but attempting to use the
value of WCHAR_MAX in a preprocessor expression will not give the
desired results - "wchar_t" is unknown to the preprocessor, so
WCHAR_MAX silently (without -Wundef) evaluates to ( (0) - 1 ) == -1.

A simple workaround is to avoid looking at WCHAR_MAX when the
superior __SIZEOF_WCHAR_T__ is defined.

Change-Id: I439b166cffb93416737ee19025fb6e8d51c27876
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoQRegularExpression: fix autotest
Giuseppe D'Angelo [Thu, 23 Feb 2012 02:49:52 +0000 (02:49 +0000)]
QRegularExpression: fix autotest

Some minor fixes: obviously, a valid match always come from a
valid regular expression, but a valid regular expression can create
an invalid match (internal error during matching).

Also, testing an invalid iterator should silence the emitted
warnings.

Change-Id: I585bb99a81e22f108601fd66bf30b56e0229d68b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoSupport legacy QDataStream serialization of QDate.
Aaron McCarthy [Tue, 6 Mar 2012 01:17:07 +0000 (11:17 +1000)]
Support legacy QDataStream serialization of QDate.

Commit 8327fa7c11f6c84ccc66be4365ee282a76288788 changed the type of the
Julian day member of QDate from quint32 to qint64.  This changed the
QDataStream format.  Keep the old behavior, with the limited date
range, if the stream version is less than Qt_5_0.

Change-Id: I800448979a1891581069f39de7f9ab9c634e4f0e
Reviewed-by: John Layt <jlayt@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoUse #define before including SHA-2 3rdparty code
Bradley T. Hughes [Fri, 2 Mar 2012 07:07:23 +0000 (08:07 +0100)]
Use #define before including SHA-2 3rdparty code

Using typedef causes errors due to re-definition, so #define the types
needed by the SHA-2 code to the q[u]int* equivalents instead.

Change-Id: I6fc29788dd05aeee28723820f511527d482d31f2
Reviewed-by: Oliver Wolff <oliver.wolff@nokia.com>
12 years agoQSqlTableModel: use selectRow() for field and row edit strategies
Mark Brand [Tue, 21 Feb 2012 08:22:26 +0000 (09:22 +0100)]
QSqlTableModel: use selectRow() for field and row edit strategies

Calling select refreshes the query data but disrupts view
navigation.

For OnFieldChange and OnRecordChange it makes sense to only
select the row in question. This does not disturb view navigation.

Assume disruption of view navigation is not a problem
for OnManualSubmit because the user or application decides
when submitAll is called.

Task-number: QTBUG-2875
Change-Id: I1e5f68668fb9102f6296d67d543e80daa403f1c4
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
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>