profile/ivi/qtbase.git
11 years agoUse constFind()/constEnd() for const_iterator-s
Konstantin Ritt [Fri, 12 Oct 2012 04:08:18 +0000 (07:08 +0300)]
Use constFind()/constEnd() for const_iterator-s

to make the strict iterators happy.

Change-Id: Ief4ec309b815f18dc4b2017d4f34c063db510c31
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
11 years agoChange hostname for dnslookup 'notfound' test cases.
Janne Anttila [Thu, 11 Oct 2012 11:33:11 +0000 (14:33 +0300)]
Change hostname for dnslookup 'notfound' test cases.

Microsoft DNS server used in Digia hosted Qt-Project CI system,
returns 'Server failed' error for 'invalid.' hostname. Because
the purpose of these autotests is to test 'notfound' use case, it should
be ok to use also 'invalid.invalid' hostname in these DNS queries.

Change-Id: I9e9c829f3858e7fa23feffd2ede018b19f676857
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
11 years agosyncqt: Fix warnings about missing QT_BEGIN_HEADER/NAMESPACE.
Friedemann Kleint [Fri, 12 Oct 2012 14:32:54 +0000 (16:32 +0200)]
syncqt: Fix warnings about missing QT_BEGIN_HEADER/NAMESPACE.

Do not print warnings when stop-processing pragma was encountered.

Change-Id: I0dd3b317b3a685afe613527988eb137325037e16
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
11 years agoRemove the -falign-stack option from ICC's mkspec.
Thiago Macieira [Thu, 11 Oct 2012 23:34:44 +0000 (16:34 -0700)]
Remove the -falign-stack option from ICC's mkspec.

This option was necessary in early ICC 12 releases because of a
difference in interpreting the ABI requirements with GCC. According to
ICC devs, GCC changed the ABI on its own to require 16-byte-aligned
stacks on i386.

It looks like this option has been the default in later ICC 12
releases. At least 12.1 update 5 has it by default. ICC 13 does not
have the option anymore but accepts it silently for backwards
compatibility.

Change-Id: Id8bb4c250718eef2f02dc97bd47a0efd95b272fc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
11 years agoqmake: fix reversed defines in vcxproj files
Joerg Bornemann [Thu, 11 Oct 2012 09:59:40 +0000 (11:59 +0200)]
qmake: fix reversed defines in vcxproj files

Change-Id: I9fbb4b563428bb23974d59050f4c71e8d1983ff3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
11 years agoMac OSX: configure will use clang for any version >= 3
Shawn Rutledge [Tue, 9 Oct 2012 14:16:27 +0000 (16:16 +0200)]
Mac OSX: configure will use clang for any version  >= 3

Task-number: QTBUG-26140
Change-Id: Ifee00a9d15b053bb9d2c7b0d9bedca45e4d589d3
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
11 years agoFix warnings from syncqt.
Friedemann Kleint [Fri, 12 Oct 2012 14:35:04 +0000 (16:35 +0200)]
Fix warnings from syncqt.

Stop processing in internal headers, use correct include
syntax.

Change-Id: I9dcf1f6f89907986b7b58658be514083f213a3e6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agoFix "open with" functionality on OSX (FileOpenEvent)
Shawn Rutledge [Thu, 11 Oct 2012 11:09:56 +0000 (13:09 +0200)]
Fix "open with" functionality on OSX (FileOpenEvent)

QGuiApplicationPrivate::processWindowSystemEvent needs to handle the
FileOpen event type so that applications can receive the events from
the Finder.  This makes it possible to e.g. double-click a qml file
and open it in QML Viewer.

Task-number: QTBUG-26855
Change-Id: I1e14e478460e8823095e4a33cee1e0defbf76d8b
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
11 years agoBe able to obtain list of possible key combinations in platform integration
Oliver Wolff [Thu, 11 Oct 2012 05:40:14 +0000 (07:40 +0200)]
Be able to obtain list of possible key combinations in platform integration

As there is no way to obtain the list of possible keys for a shortcut
in a platform independent way there needs to be a way to get that
from the platform integration.

Task-number: QTBUG-26902
Change-Id: I520add56ee09d5c3c58709fb29dad2fbfe4c9d0b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
11 years agoAdded possibleKeys(QKeyEvent *) to QWindowsIntegration
Oliver Wolff [Thu, 11 Oct 2012 05:42:08 +0000 (07:42 +0200)]
Added possibleKeys(QKeyEvent *) to QWindowsIntegration

Task-number: QTBUG-26902
Change-Id: I08d244816eae8794b52f244f049ee1fb825dac8b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
11 years agoUpdate qfiledialog ui to new style.
Frederik Gladhorn [Fri, 12 Oct 2012 09:58:01 +0000 (11:58 +0200)]
Update qfiledialog ui to new style.

Simply opened and saved in designer.
No changes otherwise.

Due to designer adding deprecated property margin, reverted parts manually.

Change-Id: I5edbf82126606e224da4d0d51baeedb13b39bd83
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
11 years agoSimplify transaction expiry mechanism
Gatis Paeglis [Mon, 1 Oct 2012 12:04:09 +0000 (14:04 +0200)]
Simplify transaction expiry mechanism

This patch makes transaction mechanism less scattered around and
conforms to the xdnd specification:

Don't block and keep a history of previous data. This can be very difficult to implement,
but it is clearly the ideal behavior from the user's perspective because it allows him to
drop something and then continue working with the assurance that the target will get the
data regardless of how slow the network connections are.

When the source receives XdndFinished, it can remove the item from its history, thereby keeping
it from getting too large. The source must also be prepared to throw out extremely old data
in case a target malfunctions.

I assume that 10min for drag-and-drop operation can be considered 'extremely' old data.

Change-Id: I73dcd21aee3ad188d2260e49d80824da6ba040ab
Task-numer: QTBUG-14493
Reviewed-by: David Faure (fixes for KDE) <faure@kde.org>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
11 years agoMake sure timestamp is initialized before using it for seting selection owner.
Gatis Paeglis [Wed, 3 Oct 2012 12:53:33 +0000 (14:53 +0200)]
Make sure timestamp is initialized before using it for seting selection owner.

Convention from icccm: Clients attempting to acquire a selection must set
the time value of the xcb_set_selection_owner request to the timestamp of
the event triggering the acquisition attempt, not to XCB_CURRENT_TIME. In
some cases it happened that timestamp was set to XCB_CURRENT_TIME.

A zero-length append to a property is a way to obtain a timestamp for this
purpose; the timestamp is in the corresponding XCB_PROPERTY_NOTIFY event.
We used to have this mechanism in 4.8, it was achieved by XWindowEvent.

AFAIK there isn't an equivalent for XWindowEvent in XCB. Therefore i had to
introduce a new mechanism in QXcbConnection - getTimestamp. This function
blocks until it receives the requested event.

Change-Id: Ide46a4fdd44cf026fdd17a79d3c4b17741d1b7d4
Task-number: QTBUG-26783
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
11 years agoLink to Item Views Puzzle Example in QListView docs.
Mitch Curtis [Fri, 12 Oct 2012 14:57:22 +0000 (16:57 +0200)]
Link to Item Views Puzzle Example in QListView docs.

Change-Id: I75972727077fa1aa1ec66995c4d0ea67057d283b
Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
11 years agoCheck that row and column are not less than 0 in indexFromLogical
José Millán Soto [Wed, 26 Sep 2012 11:11:35 +0000 (13:11 +0200)]
Check that row and column are not less than 0 in indexFromLogical

Change-Id: Icf6dbb234513de12c772618a046461b8674b01ce
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
11 years agoDo not accept key events if a widget is disabled
Oliver Wolff [Thu, 4 Oct 2012 13:02:48 +0000 (15:02 +0200)]
Do not accept key events if a widget is disabled

The disabled state was handled in qapplication_xxx.cpp before.
As the platform integration only knows about windows and
not widgets the state check is now done in qwidget. This commit
just adds key events to the list of events which are ignored
if the widget is disabled. This list also contains mouse events
for example.

Task-number: QTBUG-27417

Change-Id: I55949e1c1aaa992ba71df51c5b5e8177ec6f1e86
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
11 years agoFix moc preprocessor-only mode with input that contains seemingly invalid identifiers
Simon Hausmann [Fri, 12 Oct 2012 12:06:19 +0000 (14:06 +0200)]
Fix moc preprocessor-only mode with input that contains seemingly invalid identifiers

In WebKit we use moc -E to pre-process various files before throwing at
further build creation tools. The pre-processing is used to filter out
code depending in #ifdef'fed features.

The latest addition to the family of pre-processed files is the CSS grammar,
which is written in Bison. It contains rule lines like

   $$ = parser->createFoo()

and when pre-processing this moc stumbles over the dollar sign. Instead
of ignoring un-tokenizable input we should add it to the current token
if we're in preprocessor-only mode, otherwise the $$ gets eaten and we
produce data-loss by printing out less characters than.

Change-Id: Ib32e7c04b38dd2ba3726201e76f27405f7ea6c0d
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
11 years agoFix number of available printers in CUPS support.
Rafael Roquetto [Wed, 10 Oct 2012 18:43:50 +0000 (15:43 -0300)]
Fix number of available printers in CUPS support.

If the number of available printers changes, we want
to update the count. Additionally, if that number has
gone to zero, we want to ensure that the number of
available printers in the static object is reset to
zero.

This fixes a crash that occurs if:
 * You print
 * You kill cupsd (or it crashes because you're porting it and your port is unstable)
 * You try to print again before restarting it.

Change-Id: I6c6069db9d800ce7426e75df760829fea278e56e
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoMake QValidator tests do not require a QApplication
Giuseppe D'Angelo [Sun, 7 Oct 2012 15:09:46 +0000 (16:09 +0100)]
Make QValidator tests do not require a QApplication

Change-Id: I9aae997e33672203470b0429cc061a1adf88dfe9
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
11 years agoBlackberry: Populating the QCoreApplicationData
Fabian Bumberger [Tue, 9 Oct 2012 17:34:29 +0000 (19:34 +0200)]
Blackberry: Populating the QCoreApplicationData

Change-Id: I7adb2e207cab89fbad9458cd0bcb856ecd2288f0
Reviewed-by: Peter Hartmann <phartmann@rim.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
11 years agoBlackberry: Emit aboutToBlock() and awake() correctly in the dispatcher
Thomas McGuire [Tue, 9 Oct 2012 12:07:28 +0000 (14:07 +0200)]
Blackberry: Emit aboutToBlock() and awake() correctly in the dispatcher

On Blackberry, select() can actually temporarily wake up to process
mative BPS events. Make sure to emit the aboutToBlock() and awake()
signals in this situation accordingly.

Change-Id: Ib324e702feb1cfebdc6926f80af9c92f291a2b94
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
11 years agoRemove unused private header
Jens Bache-Wiig [Fri, 12 Oct 2012 07:22:40 +0000 (09:22 +0200)]
Remove unused private header

This was a leftover after removing motif style from the repo.

Change-Id: I98d47a9443ffce2be34d73e779a0787c0b68913f
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
11 years agoqfeatures.txt: cleanup obsolete cde & motif styles
J-P Nurmi [Fri, 12 Oct 2012 07:21:30 +0000 (09:21 +0200)]
qfeatures.txt: cleanup obsolete cde & motif styles

both styles were removed in 570ae4

Change-Id: I47b3b268191aecd1c04f1c1f1bd0f500332e3ef8
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
11 years agoAuto tests: revise cursor dependant tests
J-P Nurmi [Thu, 20 Sep 2012 13:35:21 +0000 (15:35 +0200)]
Auto tests: revise cursor dependant tests

Cursor dependant auto tests are currently skipped in various ways.
Some are checking PlatformQuirks::haveMouseCursor() that tries to
detect if the desktop environment is MeeGo, using obsolete Q_WS_X11.
Some are skipped if QT_NO_CURSOR or Q_OS_WINCE is defined and
some are actually missing the approriate guards.

=> unify by defining QTEST_NO_CURSOR in qtest-config.h when
appropriate ie. for platforms that have no regular mouse cursor
support or when QT_NO_CURSOR is defined.

Task-number: QTBUG-22551
Change-Id: I9a1e0e3156617945ae46226c79268955454c8a9a
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
11 years agoDoc: Removed references to stale links.
Jerome Pasion [Thu, 11 Oct 2012 14:02:22 +0000 (16:02 +0200)]
Doc: Removed references to stale links.

The links are from the qt-webpages.qdoc and no longer exist.

Change-Id: I8329032215fa77811117e2767bae745795b209cb
Reviewed-by: Martin Smith <martin.smith@digia.com>
11 years agoQGtkStyle: fix a warning
Marc Mutz [Thu, 11 Oct 2012 17:04:57 +0000 (19:04 +0200)]
QGtkStyle: fix a warning

Commit c0893962ef94f12594f936ef2a50db6d0328eca0 added two
definitions of a variable named gtkToggleButtonStyle in nested
scopes. Because of name lookup rules, the second one wasn't
initialised with the first one, but with itself.

This leaves the second gtkToggleButtonStyle uninit'ed.

Simply remove the surplus declaration, leaving the name to
the original declaration.

Change-Id: I2269e1093f54643ff4dce27b39cc033db6697782
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
11 years agoAccessibility: Implement GetVersion and GetLocale in app adaptor.
Frederik Gladhorn [Fri, 28 Sep 2012 18:18:22 +0000 (20:18 +0200)]
Accessibility: Implement GetVersion and GetLocale in app adaptor.

Change-Id: I73a49b22add9e268907025dd0bf7ec76e7fd0c0b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
11 years agoAdd workaround for typo in libatspi VisualdataChanged
Frederik Gladhorn [Mon, 1 Oct 2012 10:02:44 +0000 (12:02 +0200)]
Add workaround for typo in libatspi VisualdataChanged

Change-Id: I6375d77fac4e743a372f18b3e3d63c128ce51271
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
11 years agoFix missing return in QtOpenGl/paintedwindow example.
Friedemann Kleint [Thu, 11 Oct 2012 14:58:38 +0000 (16:58 +0200)]
Fix missing return in QtOpenGl/paintedwindow example.

Change-Id: I17da0e93bb7c1b0cdbb5b76035ec913cbc616608
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
11 years agoStabilize Accessibility/Combo test.
Friedemann Kleint [Thu, 11 Oct 2012 12:46:16 +0000 (14:46 +0200)]
Stabilize Accessibility/Combo test.

The Windows combo animation causes a delay, introduce
QTRY_VERIFY. Fix warnings about being unable to
set geometry on Windows.

Change-Id: I52ca960c06f023ade3afe85f31deaf8e32edff26
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
11 years agoOpenGL: Add missing WINAPI calling convention for QGL functions
Sean Harmer [Thu, 11 Oct 2012 13:08:45 +0000 (14:08 +0100)]
OpenGL: Add missing WINAPI calling convention for QGL functions

This is the QGL equivalent of commit

602cab9bb2072c5564bbb43c4125e04f98266043

Without this QGLExtensionMatcher causes stack corruption when using
a core profile GL context due to the call to glGetStringi() with
an incorrect calling convention.

Change-Id: Ibd86645e04df8c650c182fecfc8c481dae8a75b2
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
11 years agoQtPrintSupport: Fix build with QT_NO_PICTURE.
Sérgio Martins [Tue, 9 Oct 2012 22:34:29 +0000 (23:34 +0100)]
QtPrintSupport: Fix build with QT_NO_PICTURE.

Printer support depends on having Picture support.
If QT_NO_PICTURE is defined, qfeatures.h will define
QT_NO_PRINTER.

Not all code is including qfeatures.h, which causes inconsistency,
some code has QT_NO_PRINTER defined and some has not, which causes
the build to fail.

Change-Id: I10a854244a41d017b921b731ec0e08f90a3326cf
Reviewed-by: Holger Ihrig <holger.ihrig@digia.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
11 years agoqdoc: qdoc now can run in 2 passes
Martin Smith [Thu, 11 Oct 2012 12:04:21 +0000 (14:04 +0200)]
qdoc: qdoc now can run in 2 passes

Two command line options have been added, -prepare and -generate.
If you run qdoc with -prepare, qdoc reads and parses the source
files but does not generate the documentation. It only creates
the .index file for the module you are running qdoc on.

If you run qdoc with -generate, qdoc reads and parses the source
files as well as the .index files created by running qdoc with
-prepare, and it generates the documentation but no .index file.

If you run without either option, qdoc runs as before, i.e. it
runs both passes as a single pass.

Task number: QTBUG-27539

Change-Id: Idbfe3f0f9dff58283596b504f00dff3f70f6e371
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
11 years agoqdoc: Allow empty character literal ''
Martin Smith [Wed, 10 Oct 2012 13:15:21 +0000 (15:15 +0200)]
qdoc: Allow empty character literal ''

qdoc's tokenizer was reporting an error for the
empty character literal ''. Now it allows it.
Apparently it makes sense in .js files.

Task number: QTBUG-25775

Change-Id: If407427fad9b65a035c2c4785d53c9e3d5202e62
Reviewed-by: Martin Smith <martin.smith@digia.com>
11 years agoQFont: Fix build with QFONTCACHE_DEBUG
Konstantin Ritt [Thu, 11 Oct 2012 22:19:34 +0000 (01:19 +0300)]
QFont: Fix build with QFONTCACHE_DEBUG

Change-Id: Ifc89af71cdf6a5f9e4114266030cf265042db626
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
11 years agoQGlyphRun: Fix isEmpty() and boundingRect() didn't work after setRawData()
Konstantin Ritt [Thu, 11 Oct 2012 03:23:32 +0000 (06:23 +0300)]
QGlyphRun: Fix isEmpty() and boundingRect() didn't work after setRawData()

Change-Id: I44a347ef24961493d6b8353abbb215c713ccce52
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
11 years agoFix QTextBoundaryFinder usage cases in QAccessible2
Konstantin Ritt [Fri, 5 Oct 2012 23:53:44 +0000 (02:53 +0300)]
Fix QTextBoundaryFinder usage cases in QAccessible2

Make the implementation safer and closer to what
http://www.linuxfoundation.org/collaborate/workgroups/accessibility/ia2/ia2_implementation_guide#boundaries
requires us to do.

Change-Id: I00af4697e52a9b6e7f5d7b3f403b29126fa1517b
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
11 years agoUpdate/fix QTextBoundaryFinder simple usage cases in qtbase
Konstantin Ritt [Mon, 8 Oct 2012 13:51:41 +0000 (16:51 +0300)]
Update/fix QTextBoundaryFinder simple usage cases in qtbase

Change-Id: I4d3000558bce86e2de3c32247915868ba18fc8b7
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoReview of documentation.
Michele Caini [Thu, 20 Sep 2012 20:36:05 +0000 (22:36 +0200)]
Review of documentation.

Documentation has been updated to reflect changes in Qt5.

Change-Id: I3d54d1875962bd27c43bb360ae7b3fda0b7702ba
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agoMark QTreeView test as significant.
Stephen Kelly [Tue, 9 Oct 2012 14:32:10 +0000 (16:32 +0200)]
Mark QTreeView test as significant.

I can't find any failures in the CI logs, as reported by the bug.

Even if there is still an unstable test here, it is not appropriate
to mark the entire test as insignificant, as that hides regressions
in the entire class.

Task-number: QTBUG-23638
Change-Id: I1aeaf6e725bf28e9ac03c9330a67e51241b9272b
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
11 years agoQTextBoundaryFinder: Fix handling of break opportunities
Konstantin Ritt [Fri, 12 Oct 2012 03:49:27 +0000 (06:49 +0300)]
QTextBoundaryFinder: Fix handling of break opportunities

Add BoundaryReason::BreakOpportunity flag that will be returned by the
boundaryReasons() when the boundary finder is at the break opportunity
position that might be not an item boundary.
This is the same as (StartWord || EndWord) in Grapheme and Sentence modes;
in Word and Line modes, BreakOpportunity flag might occur between the words
or in between of Line boundaries (e.g. in conjunction with SoftHyphen flag).
In other words, the text boundaries are always break opportunities, but not vice versa.

StartWord and EndWord flags has been deprecated by new StartOfItem and EndOfItem
flags which are not about the word boundaries only. In line breaking,
StartOfItem and EndOfItem are set for the mandatory breaks only.

Change-Id: I79bf297e2b988f5976f30cff0c8ca616385f6552
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
11 years agoFix tst_QTextEdit::fullWidthSelection2() for shadow build
Konstantin Ritt [Thu, 11 Oct 2012 01:00:11 +0000 (04:00 +0300)]
Fix tst_QTextEdit::fullWidthSelection2() for shadow build

Search for the test data files in the test data directory, not in the current dir.

Change-Id: I746e717bae575364102c1bb5c2888332d94c374f
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
11 years agoFixed cosmetic line drawing where begin and end points are equal.
Samuel Rødal [Wed, 10 Oct 2012 14:14:32 +0000 (16:14 +0200)]
Fixed cosmetic line drawing where begin and end points are equal.

This case has typically required specific work-arounds in other
rendering paths as well.

Task-number: QTBUG-25153
Change-Id: I217e710a30222792ebca3bf297e438d944c32992
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoQVarLengthArray: use memory on stack if possible
Peter Kümmel [Tue, 9 Oct 2012 14:52:37 +0000 (16:52 +0200)]
QVarLengthArray: use memory on stack if possible

After allocating memory on the heap it is ATM not possible to use the
memory on the stack again, QVarLengthArray then uses/resizes only
the memory on the heap. But the memory on stack could be used
if it is big enough.

Change-Id: I566003c25dd1093eb6ba8087a1e5378a11712934
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agoMake QVarLengthArray exception safe in case of OOM
Peter Kümmel [Wed, 10 Oct 2012 14:17:08 +0000 (16:17 +0200)]
Make QVarLengthArray exception safe in case of OOM

After a exception is thrown in resize(), QVarLengthArray has an
invalid state with ptr == 0. On the next resize call when malloc
returns a valid pointer, oldPtr is 0 and it could crash in
memcpy because the pointer to the source is 0.
The patch ensures the valid pointer isn't overwritten with NULL.
When exceptions are disabled the user must ensure that malloc will
not fail.

Change-Id: Id12a5e3e1eacc551e4d1b64cba8e8414cfebd6e1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agoFix a "warning: 'operator+=' is deprecated" when building with clang
Jocelyn Turcotte [Thu, 4 Oct 2012 12:31:29 +0000 (14:31 +0200)]
Fix a "warning: 'operator+=' is deprecated" when building with clang

Any file including qstringbuilder.h would trigger a warning when
compiled with QT_ASCII_CAST_WARNINGS defined since it implicitely
converts a QString to QByteArray.

Explicitely call toUtf8() to fix the issue.

Change-Id: If20f9d4571c5d1ed789564196c9f1331e1efd1d9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agoRemove trivial debug output from QSpiAccessibleBridge
Jocelyn Turcotte [Tue, 2 Oct 2012 11:11:21 +0000 (13:11 +0200)]
Remove trivial debug output from QSpiAccessibleBridge

This information can get noisy when windows get opened/closed frequently
during auto tests.

Change-Id: I2777b51c97b3108be3d784794e12e20985d4d65b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
11 years agoQt Widgets: Added a landing page
Jerome Pasion [Thu, 27 Sep 2012 13:11:55 +0000 (15:11 +0200)]
Qt Widgets: Added a landing page

-Landing page which lists articles in the module, including:
    -Graphics View, Model/View, Style Sheet, and widget galleries
-Renamed some titles and a whitespace fix.

Change-Id: I84be14d9a425ef380162e9a55ce2742c6812f510
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
11 years agoModularize documenation build
Tor Arne Vestbø [Mon, 8 Oct 2012 15:19:14 +0000 (17:19 +0200)]
Modularize documenation build

qdocconf files can now reference $QT_INSTALL_DOCS to pick up e.g. global
includes, instead of using relative paths. Qt modules will automatically
get a doc target that builds and installs into the right place (including
supporting shadow-builds) if they set QMAKE_DOCS before loading(qt_module).

Change-Id: Ia408385199e56e3ead0afa45645a059d1a8b0d48
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
11 years agoRevert "Handle additional format ranges when itemizing."
Pierre Rossi [Wed, 10 Oct 2012 16:57:05 +0000 (18:57 +0200)]
Revert "Handle additional format ranges when itemizing."

This reverts commit 101d04681f4ceb7410681eae684534a206a9d90a.
That change seems to have introduced a few regressions, and
Creator hits an assertion that it introduced because it assumes
the additionalFormats consists of well-formed ranges
(QTCREATORBUG-7995).

Change-Id: Ic4ae761e6e7f6df8a6b5ca565ceb250647420c15
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
11 years agoMove QValidator tests to QtGui
Giuseppe D'Angelo [Sun, 7 Oct 2012 15:05:59 +0000 (16:05 +0100)]
Move QValidator tests to QtGui

Q*Validator classes are not in QtWidgets,
so move them where they should stay.

Change-Id: Ie6ea45a026e640fad131002bc9762c575235f3f4
Reviewed-by: David Faure <david.faure@kdab.com>
11 years agoRemove handleSynchronous* functions.
Morten Johan Sorvig [Thu, 27 Sep 2012 08:37:30 +0000 (10:37 +0200)]
Remove handleSynchronous* functions.

There are now two different ways to implement synchronous
event processing. The platform plugins can choose which
one to use.

1) flushWindowSystemEvents()
   Use to flush the event queue at one point, making
   preceding calls synchronous.

2) setSynchronousWindowsSystemEvents(bool enable)
   Makes all handle* functions synchronous, bypassing
   the event queue completely.

Change-Id: I020b80c731fd13f855a377d7c91d06a4e39b6a0b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
11 years agoDo not handle invalid accessibles in atspi bridge.
Frederik Gladhorn [Mon, 1 Oct 2012 12:09:50 +0000 (14:09 +0200)]
Do not handle invalid accessibles in atspi bridge.

Change-Id: I13a7dd1e190c5d3a5bb8be0ee66c2f18d0d3a1b5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
11 years agoCentralize place where we ensure qdoc is built before generating docs
Tor Arne Vestbø [Tue, 9 Oct 2012 15:37:23 +0000 (17:37 +0200)]
Centralize place where we ensure qdoc is built before generating docs

Change-Id: Ie0220d3c76990f6052edcd8c738e4e2807f35c71
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
11 years agoEnsure that Qt.module.docs is set when first creating the module-fwd file
Tor Arne Vestbø [Tue, 9 Oct 2012 14:38:47 +0000 (16:38 +0200)]
Ensure that Qt.module.docs is set when first creating the module-fwd file

This is a follow-up fix to aef441b1.

Change-Id: Ie5e92ecc55ddcbab3e7830a99a77d3748a5568c1
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
11 years agoQGtkStyle: use gtk_widget_get_style()
J-P Nurmi [Mon, 8 Oct 2012 09:45:23 +0000 (11:45 +0200)]
QGtkStyle: use gtk_widget_get_style()

Do not access GtkWidget::style directly, it doesn't exist in GTK3.

Change-Id: I947776848f5dd64011a40446fcdb9079f295f182
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
11 years agoFix a regression with regards to hfw behavior in QStackedWidget
Jan Arve Saether [Wed, 10 Oct 2012 11:42:07 +0000 (13:42 +0200)]
Fix a regression with regards to hfw behavior in QStackedWidget

This is a regression because we made QStackedWidget actually
support heightForWidth in 4.8. This was done with change
4780f94e391b5e881497c5228661dead42c821fa.

The problem was that heightForWidth was not calculated correctly
because some of the pages were hidden. The hidden pages were
actually not contributing to the hfw of the QStackedWidget at all.
This again caused the QStackedWidget to change its heightForWidth()
value when the current tab changed, which again could cause "jumps"
in the UI when switching tabs (as demonstrated in the task).

The problem was that the patch relied on calling
QWidgetItem::heightForWidth(), and this function would return -1
if the widget was hidden. However, QWidget::heightForWidth() does
not have this magic and returns the proper hfw value regardless
of its visibility.

One could argue about the correctness of this patch, but since
QStackedLayout::sizeHint() disregards QWidgetItem::sizeHint() (it
asks the widget directly), we do the same in
QStackedLayoutHFW::heightForWidth() for consistency.

In addition, QStackedLayout enforces that only widgets can be added
to it, and you cannot add your own QLayoutItem subclasses to it:

  qWarning("QStackedLayout::addItem: Only widgets can be added");

Task-id: QTBUG-24758

Change-Id: I349cf8f4215e4581ea237ef773d53dcdf3db176b
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
11 years agotst_QMenuBar: remove QSKIP's -> omit whole test cases instead
J-P Nurmi [Thu, 27 Sep 2012 13:50:01 +0000 (15:50 +0200)]
tst_QMenuBar: remove QSKIP's -> omit whole test cases instead

Change-Id: I2cf356c5790fd7f2b27a9032e2effacd098b3d05
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
11 years agoQTextBoundaryFinder: Introduce BoundaryReason::MandatoryBreak flag
Konstantin Ritt [Thu, 4 Oct 2012 03:52:13 +0000 (06:52 +0300)]
QTextBoundaryFinder: Introduce BoundaryReason::MandatoryBreak flag

that will be returned by boundaryReasons() when the boundary finder
is at the line end position (CR, LF, NewLine Function, End of Text, etc.).
The MandatoryBreak flag, if set, means the text should be wrapped at a given position.

Change-Id: I32d4f570935d2e015bfc5f18915396a15f009fde
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoInvalidate old QImage data if load()/loadFromData() has failed
Konstantin Ritt [Mon, 8 Oct 2012 13:40:13 +0000 (16:40 +0300)]
Invalidate old QImage data if load()/loadFromData() has failed

This guarantees one will never get `!img.isNull()` after
load()/loadFromData() has failed, even if the image was
not null before.
Apply the same fix to QPixmap and QPicture.

Change-Id: Ida1ad6a6f0fc830df8e75ada0c163fc2d3360dea
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
11 years agoAvoid warnings about an unreachable code
Konstantin Ritt [Mon, 8 Oct 2012 15:20:50 +0000 (18:20 +0300)]
Avoid warnings about an unreachable code

Change-Id: I57c2967db4c1bd2c39ecb3eac9b18eb7455c6a50
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoMac: Bring back "Text boxes and list only" tab navigation
Gabriel de Dietrich [Tue, 9 Oct 2012 09:27:01 +0000 (11:27 +0200)]
Mac: Bring back "Text boxes and list only" tab navigation

Added ThemeHint::TabAllWidgets as a mean to access that platform
specific bool. The default implementation returns always true when
querying QPlatformTheme::themeHint().

Several auto-tests had to be updated to reflect for qt_tab_all_widgets'
type change. One XFAIL removed from tst_QApplication::focusChanged().

Task-number: QTBUG-24372
Change-Id: Ie1f0486c19898fe54c53aa4a27e378485075e512
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
11 years agotst_QApplication: Make sure the native style is being used
Gabriel de Dietrich [Wed, 10 Oct 2012 10:46:37 +0000 (12:46 +0200)]
tst_QApplication: Make sure the native style is being used

The tst_QApplication::args() auto-test sets the style to windows style
but there is no way to reset the style back to the native one. This
makes tst_QApplication::focusChanged() fail on Mac in some cases,
since not all the styles respond the same way to tab vs. strong
focus changes.

Change-Id: I91e39c1dd0fad4d90f3a13ab50a5e9758922ac28
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
11 years agoqdoc: Implements the -no-link-errors option
Martin Smith [Mon, 8 Oct 2012 10:49:39 +0000 (12:49 +0200)]
qdoc: Implements the -no-link-errors option

The -no-link-errors flag tells qdoc not to print any link error
messages at all. This is useful for finding and fixing all non-link
errors in a module.

Task number: QTBUG-26870

Change-Id: Id4b0eebb6c0509c57d2f01763b6dedbfb6756a91
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
11 years agoCocoa: Send keyboard modifiers with mouse events.
Morten Johan Sorvig [Wed, 10 Oct 2012 07:02:51 +0000 (09:02 +0200)]
Cocoa: Send keyboard modifiers with mouse events.

Task-number: QTBUG-27462

Change-Id: Icb9352fcae6f92885d4f1381aa8014fef039149b
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
11 years agoAdded missing keysym to handleExtendedKeyEvent in xcb plugin.
Samuel Rødal [Wed, 3 Oct 2012 06:52:43 +0000 (08:52 +0200)]
Added missing keysym to handleExtendedKeyEvent in xcb plugin.

Now it's propagated to QKeyEvent::nativeVirtualKey() as it should.

Task-number: QTBUG-27353
Change-Id: I40921b99662951decc83d2278e0cd337266dd530
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
11 years agoWindows: Filter out events sent during DestroyWindow().
Friedemann Kleint [Mon, 8 Oct 2012 14:10:14 +0000 (16:10 +0200)]
Windows: Filter out events sent during DestroyWindow().

Task-number: QTBUG-26933

Change-Id: Ie7aaf9f0c9c12a33b059e796a3be161a2d60c64e
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
11 years agoFix scrolldown arrow not showing on popup for QMenu
Miikka Heikkinen [Thu, 4 Oct 2012 13:09:02 +0000 (16:09 +0300)]
Fix scrolldown arrow not showing on popup for QMenu

Scrolldown arrow was not shown when a taller than screen QMenu was
opened because the check to draw it used the size that was already
adjusted to the screen.

Fixed by using the actual menu size in the check. Also fixed the case
where the menu was scrolled, closed, and reopened, in which case the
size hint would return incorrect cached value. This led to scrolldown
arrow not being shown in case the menu was previously fully scrolled
down.

Task-number: QTBUG-27445
Change-Id: Icd8d774071662a9317b3ac53cb05b31cadba96ff
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
11 years agoDelete the QVariant ctors taking global Qt enum values.
Stephen Kelly [Fri, 28 Sep 2012 15:22:21 +0000 (17:22 +0200)]
Delete the QVariant ctors taking global Qt enum values.

They have unexpected results in Qt 5 (the Qt::GlobalColor one works
as expected in Qt 4, but was removed in Qt 5):

 QVariant v = QVariant(Qt::red);
 qDebug() << v; // QVariant(int, 7)
 v = Qt::red;
 qDebug() << v; // QVariant(int, 7)

The correct way is to use:

 QVariant v = QVariant::fromValue(QColor(Qt::red));

The deleted constructors are the ones for which there is a class
with an implicit constructor taking the enum, and that class is
a built-in metatype.

QLocale::Language and QKeySequence::StandardKey would also fit
the description, but I can't include the header for QKeySequence
as it is in QtGui, and I don't want to include the qlocale header
in qvariant.h. Putting a QLocale::Language is probably very
uncommon anyway.

The QTextFormat test is doing the wrong thing, but the result isn't
being tested. Added new tests which fail before the patch.

Change-Id: Ia38a0784990f4d40ff7457a86daf58aabd4964eb
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
11 years agoQGtkStyle: use gtk_widget_get_parent() and gtk_widget_is_toplevel()
J-P Nurmi [Mon, 8 Oct 2012 12:59:31 +0000 (14:59 +0200)]
QGtkStyle: use gtk_widget_get_parent() and gtk_widget_is_toplevel()

GtkWidget::parent does not exist in GTK3, and GTK_WIDGET_TOPLEVEL has
been deprecated since GTK 2.20 - > use gtk_widget_is_toplevel()
(available since GTK 2.18) instead.

Change-Id: I0f082b2d69a795cadb321802f25c9993029f6865
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
11 years agoQGtkStyle: use gtk_widget_get/set_allocation()
J-P Nurmi [Mon, 8 Oct 2012 13:59:09 +0000 (15:59 +0200)]
QGtkStyle: use gtk_widget_get/set_allocation()

Do not access GtkWidget::allocation directly, it doesn't exist in GTK3.

Change-Id: I8ce69fab19ce8f3afe35d0d30d4e28b0348fdaf1
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
11 years agoqmake: fix .pc install target dir separators on windows
J-P Nurmi [Tue, 9 Oct 2012 12:47:46 +0000 (14:47 +0200)]
qmake: fix .pc install target dir separators on windows

Task-number: QTBUG-26455
Change-Id: I578345b1676d0d2e812e0ab2e48468b4a8013ee9
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
11 years agoScale icons returned by QIcon::fromTheme.
David Sansome [Thu, 22 Mar 2012 11:28:29 +0000 (11:28 +0000)]
Scale icons returned by QIcon::fromTheme.

The icon engine behind icons that are loaded from QIcon::fromTheme does
not scale any pixmaps that it returns. When using an icon theme with an
incomplete set of icons (for example, only a "128x128" folder),
QIcon::pixmap will always return 128x128 pixmaps even if you ask for
one of size 22x22.

This is contrary to the QIcon::pixmap documentation that says "The
pixmap might be smaller than requested, but never larger."

This patch uses the same code that is in the main QIcon class in the
PixmapEntry QIconLoaderEngineEntry to scale pixmaps if they are too big.

Change-Id: Ic25a3628ac82cfb899574245f658490a2dd49d54
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
11 years agoCompile fix for when XCB_USE_GLX is not defined.
Samuel Rødal [Fri, 5 Oct 2012 18:31:21 +0000 (20:31 +0200)]
Compile fix for when XCB_USE_GLX is not defined.

Fixes compile failure introduced by 394249616cbb4c0861a032d33f846f.

Change-Id: I5794d22ee87eb18c08ea1de227b943f2e675356c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agoOptimise the deletion of a QSharedPointer with no custom deleter
Thiago Macieira [Wed, 23 May 2012 18:26:58 +0000 (20:26 +0200)]
Optimise the deletion of a QSharedPointer with no custom deleter

When QSharedPointer is created with no user-specified custom deleter,
instead of storing a pointer in ExternalRefCount::destroyer to a
static function which, in turn, calls normalDeleter<T> indirectly (via
another function pointer), specialise the CustomDeleter class and make
it not store the pointer, but instead do the deleting directly.

The benefits are:
 - the QSharedPointer's private data is smaller
 - there is no double-indirection via indirect jumps to the actual
 deleter

Change-Id: Ice5653c144912efb1226e432267a047b9799aaca
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
11 years agofix links in INSTALL
Joerg Bornemann [Tue, 9 Oct 2012 16:26:10 +0000 (18:26 +0200)]
fix links in INSTALL

Change-Id: I633dc1e2a4af8fbf27ae6ee85878768210197def
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agoQElapsedTimer: Instead of two ints, store only the clock type
Thiago Macieira [Fri, 10 Aug 2012 14:13:23 +0000 (16:13 +0200)]
QElapsedTimer: Instead of two ints, store only the clock type

We don't need two ints if we can do it with one. We need to store only
the clock type to be used, which is either CLOCK_MONOTONIC or
CLOCK_REALTIME. In addition, we need an invalid value to indicate that
the test hasn't been done yet.

This also gets rid of an atomic that wasn't QBasicAtomicInt.

Disassembly of the compiled code indicates this is the most optimal
solution:
 - one single variable load
 - one test-and-branch to verify that a test is needed
 - straight call to clock_gettime afterwards

Change-Id: I49788e45b50b6b7fcb7ba4e9332e5352a4428933
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
11 years agoSimplify QDate::addDays() impementation
Jon Severinsson [Tue, 9 Oct 2012 13:44:42 +0000 (15:44 +0200)]
Simplify QDate::addDays() impementation

No need to check for overflows since the change to qint64. as less than
half the qint64 range is a valid julian day, any overflow will be
detected as an invalid date anyway.

Change-Id: I3b6cad24e245ed9418c5804484f846b0b692153a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agoChange QDateTime::addSecs() and QDateTime::secsTo() to use qint64.
Jon Severinsson [Tue, 9 Oct 2012 13:15:53 +0000 (15:15 +0200)]
Change QDateTime::addSecs() and QDateTime::secsTo() to use qint64.

addMSecs() / msecsTo() have always used qint64, and when QDate was changed
to use a 64-bit julian day, QDateTime::addDays() and QDateTime::daysTo() was
changed to use qint64 in order to support the full extended range, but
addSecs() and secsTo() seems to have been forgotten.

Change-Id: I3acc35ee2bcc9f353650eb42f97d428f706b2db6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agoFix wheel events in Windows
Miikka Heikkinen [Fri, 5 Oct 2012 11:12:11 +0000 (14:12 +0300)]
Fix wheel events in Windows

Wheel events were always passed to window that got them from native
message loop, which isn't what Qt expects. Changed the receiver to
preferably be the window under cursor, as long as it is not blocked by
modal window.

Change-Id: I4edf0608842fe5b822a7f574abfdae81fa755ee5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
11 years agoDon't try to emit focusObjectChanged if window pointer is zero
Miikka Heikkinen [Tue, 9 Oct 2012 07:35:19 +0000 (10:35 +0300)]
Don't try to emit focusObjectChanged if window pointer is zero

Task-number: QTBUG-27414
Change-Id: I75ad662e0a66d61b49d55d084f29cefc98221b7f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
11 years agoQDoc/Bootstrap library: fix link error on Windows
Pierre Rossi [Tue, 9 Oct 2012 13:09:34 +0000 (15:09 +0200)]
QDoc/Bootstrap library: fix link error on Windows

QSettingsPrivate on windows requires advapi32.

Change-Id: If4de132827398033c7bb588f6f19bc6fe9619286
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
11 years agoconfig.tests/glib: remove app_bundle config (mac compatibility)
J-P Nurmi [Tue, 9 Oct 2012 13:30:20 +0000 (15:30 +0200)]
config.tests/glib: remove app_bundle config (mac compatibility)

Task-number: QTBUG-26800
Change-Id: I73cad91062c993898567cf9a267a8f6872ba4d52
Reviewed-by: Jiang Jiang <gzjjgod@gmail.com>
11 years agoQNX: Add and remove screens dynamically.
James Turner [Mon, 8 Oct 2012 13:29:51 +0000 (14:29 +0100)]
QNX: Add and remove screens dynamically.

Watch for display events from libscreen, and dynamically add and remove QPlatformScreens (and hence QScreens) in response.

Change-Id: I56dc7019a4d4c77798a0a88451d2f3060066f5d2
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
11 years agoQtPrinterSupport: Fix compilation with QT_NO_PRINTER
Sergio Ahumada [Thu, 4 Oct 2012 09:58:22 +0000 (11:58 +0200)]
QtPrinterSupport: Fix compilation with QT_NO_PRINTER

This seems to be a left over of 80f7a388906f94f58bf765a32b9abbb16f967db2

Task-number: QTBUG-27177
Change-Id: I72a285ed1d64f756d585a86d8401ee23eb4a1ce1
Reviewed-by: Sérgio Martins <sergio.martins.qnx@kdab.com>
Reviewed-by: Indrajit Tapadar <indrajit.tapadar@digia.com>
Reviewed-by: Holger Ihrig <holger.ihrig@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
11 years agoGenerate ';' separated libraries in prl files for CMake.
Stephen Kelly [Sun, 7 Oct 2012 08:42:36 +0000 (10:42 +0200)]
Generate ';' separated libraries in prl files for CMake.

The generated CMake files need to pass ';' separated libraries to
the IMPORTED_LINK_INTERFACE_LIBRARIES property, otherwise we get errors
such as this:

http://testresults.qt-project.org/ci/QtTools_master_Integration/build_00386/win32-msvc2010_Windows_7/log.txt.gz

(grep for QtCore5.lib.lib)

Rather than a naive and error prone replacement of whitespace, generate
the appropriate ';' separated content directly in the qmake prl file.

Change-Id: I8eb5e233a0318b57ec74b86d910583ff99c29415
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Brad King <brad.king@kitware.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
11 years agoUpdate the Unicode Data and Algorithms up to Unicode 6.2
Konstantin Ritt [Thu, 27 Sep 2012 22:57:39 +0000 (01:57 +0300)]
Update the Unicode Data and Algorithms up to Unicode 6.2

Version 6.2 of the Unicode Standard is a special release
dedicated to the early publication of the newly encoded Turkish lira sign.
In addition, there are some significant changes to the Unicode algorithms
for text segmentation and line breaking to improve breaking for emoji symbols.

For more details, see http://www.unicode.org/versions/Unicode6.2.0/

Change-Id: I21cfd4f307e41b41a19d36cce87f7a44c2661bc2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoQGtkStyle: cleanup unused gdk_drawable_get_depth() (not avail in GTK3)
J-P Nurmi [Mon, 8 Oct 2012 12:43:03 +0000 (14:43 +0200)]
QGtkStyle: cleanup unused gdk_drawable_get_depth() (not avail in GTK3)

Change-Id: Ifc04c768dcadc48d459eeb8dd95325823cc44dcd
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
11 years agoAdd QEvent::StyleAnimationUpdate: style animation target should update
J-P Nurmi [Thu, 4 Oct 2012 13:30:09 +0000 (15:30 +0200)]
Add QEvent::StyleAnimationUpdate: style animation target should update

The event will be sent from the upcoming style animations. This change
merely introduces the new event type and makes both QWidget and
QGraphicsWidget call update() upon receiving the event.

Change-Id: I69bb4d05bacb22f7e3a2512cae68848801e4f4d7
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
11 years agotst_qfiledialog: fixed typo causing semi-random completer() failure
Rohan McGovern [Fri, 5 Oct 2012 06:05:33 +0000 (16:05 +1000)]
tst_qfiledialog: fixed typo causing semi-random completer() failure

completer_data() was attempting to find the first folder which did
not begin with a '.' character under QDir::root() for usage during the
test.

However, a typo caused it to find the first folder even if it _did_
begin with a '.'; unless the first folder returned by entryList()
was ".", in which case no folder would be found.

Change-Id: Ie95f1add797973d06a8d5f2fa32935366a008de5
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
11 years ago[QTBUG-13230] Make QVariantAnimation non-abstract
Marc Mutz [Thu, 4 Oct 2012 09:12:45 +0000 (11:12 +0200)]
[QTBUG-13230] Make QVariantAnimation non-abstract

The bug report argues convincingly that, but for the pure virtual
updateCurrentValue(QVariant) function, QVariantAnimation is quite
usable as-is.

So add an empty implementation.

Reported-by: André Somers <andre@familiesomers.nl>
Task-number: QTBUG-13230
Change-Id: I689b4a80fc7d5dfae67c2255777f89afb16f9c21
Reviewed-by: Andre Somers <andre@familiesomers.nl>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agoQMap - remove unused maximumNode() functions
Thorbjørn Lund Martsum [Wed, 26 Sep 2012 13:25:01 +0000 (15:25 +0200)]
QMap - remove unused maximumNode() functions

QMap has 4 different maximumNode() functions, but they are all
unused and just in the way.

Change-Id: I012145cfae32898830ec95e229514d9be838ae2f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
11 years agoRemoved the "tst_QVector::outOfMemory" test.
Christian Strømme [Fri, 5 Oct 2012 14:32:19 +0000 (16:32 +0200)]
Removed the "tst_QVector::outOfMemory" test.

The test is useless as we assert if the requested size exceeds
a certain limit. We could, as an alternative,
throw an exception, but in the end it's the caller's responsibility
to ensure that the requested size is a sane value.

Task-number: QTBUG-27285
Change-Id: I738950a6a2b51671a54e4d25c7e4c3ac0d7f63b8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agoconfigure: bump gtk version from 2.10 to 2.18 (sep 2009)
J-P Nurmi [Mon, 8 Oct 2012 13:10:44 +0000 (15:10 +0200)]
configure: bump gtk version from 2.10 to 2.18 (sep 2009)

GTK_WIDGET_TOPLEVEL was deprecated in 2.20 and no longer available in
gtk 3. gtk_widget_is_toplevel() was introduced as a replacement in gtk
2.18 => make that the minimum requirement.

Change-Id: Ie5d2d8bd824af916a9764c66a7046f07a77b1748
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
11 years agouic: Map QLCDNumber::numDigits to QLCDNumber::digitCount.
Friedemann Kleint [Mon, 8 Oct 2012 12:22:27 +0000 (14:22 +0200)]
uic: Map QLCDNumber::numDigits to QLCDNumber::digitCount.

QLCDNumber::numDigits was deprecated in Qt 4 and removed in Qt 5.

Task-number: QTBUG-27462
Change-Id: I3772a884f31aeea70121cccd429ac996b2ecbccd
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
11 years agoStabilize test qmenu::pushButtonPopulateOnAboutToShow().
Friedemann Kleint [Mon, 8 Oct 2012 09:19:24 +0000 (11:19 +0200)]
Stabilize test qmenu::pushButtonPopulateOnAboutToShow().

Do not leave an allocated menu in member lastMenu behind that
interferes with the consecutive QTBUG7907_submenus_autoselect().

Change-Id: I80fc9de9ca63367264f642023a244c1d7d8ada7f
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
11 years agoIntroduce a Tegra2 mkspec to the device specs
Thomas Senyk [Fri, 27 Jul 2012 15:42:25 +0000 (17:42 +0200)]
Introduce a Tegra2 mkspec to the device specs

Change-Id: I16275f2f289a78e3217d765934b999b188005c14
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
11 years agoSimplify the imx6-device-mkspec
Thomas Senyk [Wed, 1 Aug 2012 09:17:59 +0000 (11:17 +0200)]
Simplify the imx6-device-mkspec

This change is possible due to commit 18654058
As it's now possible to use configure's -sysroot without
gcc's --sysroot, it's possible to use configure's pkg-config setup
(which comes with its -sysroot). This gives the possibility to
simplify the mkspec and be in line with the other device-mkspecs

Change-Id: I0f34ec2c5c7b06334ad3c1605001c0803272b027
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
11 years agoHandle additional format ranges when itemizing.
Pierre Rossi [Fri, 10 Feb 2012 19:42:13 +0000 (20:42 +0100)]
Handle additional format ranges when itemizing.

This is useful when the additional formats are used on a
text layout using a raw font. It can also come in handy for
input methods operating on a QTextDocument.
We now consider all format range edges to generate the
associated items. The capitalization can be overridden via
the additionnal formats mechanism.

Adds an autotest that checks that this works with font capitalization.

Change-Id: I782d2c48d05b0dfbad480a9ca77198465292b358
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
11 years agoFix Windows: QStandardPath::findExecutable() to check suffixes.
Friedemann Kleint [Fri, 5 Oct 2012 10:13:54 +0000 (12:13 +0200)]
Fix Windows: QStandardPath::findExecutable() to check suffixes.

Append the Windows executables suffixes from the PATHEXT
environment variable.

The previous code had a bug since the 'break' statement
bailed out of the inner loop only.

Factor search code out into a separate functions, avoiding
repeated invocations of list.constEnd() and variable
assignments in the old code.

Add a static function that is called on Unix and on Windows
for executable names with a suffix.

Call another function applying a candidate list of suffixes
in case an executable name without a suffix is passed.

Lower case the extensions from PATHEXT, streamline code.

Split up the test, add a _data() slot for clarity.

Task-number: QTBUG-27457
Change-Id: I2bf34de52aeadddd3b937ad1e22191c3c850fd26
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>