Friedemann Kleint [Tue, 21 Feb 2012 13:45:07 +0000 (14:45 +0100)]
Handle theme change in QApplication/QGuiApplication.
Re-initialize palette and fonts.
Change-Id: Ib312747886a31e8370f8d99536d52cbcf8afe8a4
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Debao Zhang [Sat, 24 Dec 2011 16:47:41 +0000 (00:47 +0800)]
Fix conflict between QMainWindow::restoreState() and QWidget::setStylesheet()
If QMainWindow::restoreState() then QWidget::setStylesheet() were called
before the QMainWindow is shown, the size of QDockWidget can not be
restored.
QWidget::setStylesheet() will generate QEvent::StyleChange event, which will
cause the function QDockAreaLayout::fitLayout() to be called before the layout
of MainWindow is activated. Although the state info has been stored in
a QMainWindowLayoutState variable by QMainWindow::restoreState(), but
QMainWindowLayout::setGeometry() still isn't called at present. So
QDockAreaLayout::fitLayout() will force the size of dockwidgets
and centralwidget to be calculated using the wrong geometry, which will
break the state restored by QMainWindow::restoreState().
This is a side effect of
692e9103ebb85b90e79377206d5d03b704d43d42.
Task-number: QTBUG-15080
Change-Id: I8cda6a529d178f7467a59b780db80df0a44d4769
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Andrew den Exter [Thu, 23 Feb 2012 05:02:23 +0000 (15:02 +1000)]
Fix rounding error in QInputMethod::cursorRectangle().
Use QRectF consistently to avoid the rounding done in the conversion
to QRect.
Task-number: QTBUG-24463
Change-Id: If9ea858ebabf8c449ea058b9d379d4a57cb6c82d
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
Debao Zhang [Thu, 23 Feb 2012 02:29:51 +0000 (18:29 -0800)]
QMenuBar: Clean up Q_WS_WIN
- Replace Q_WS_WIN with Q_OS_WIN
- Remove useless #ifdef Q_OS_WINCE which located in another #ifdef
Q_OS_WINCE
Change-Id: I6279b6d74902ab3ca6bdb7292c2936a76e3e6952
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
John Tapsell [Wed, 8 Feb 2012 10:12:08 +0000 (10:12 +0000)]
Harfbuzz-thai - When calling HB_OpenTypePosition we must set doLogClusters to true for thai
This bug resulted in word wrapping not working correctly for thai.
Reviewed-by: Adrian Yanes <ext-adrian.yanes@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
(cherry picked from commit
7495f2c7c55917a98c903547858be923028b7827)
Change-Id: Iedb26a10078c6cc4e90d090176ab63499293d69d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
John Tapsell [Wed, 8 Feb 2012 10:12:03 +0000 (10:12 +0000)]
Harfbuzz-thai - fix to_tis620 function for latin characters
This was an obvious typo - a missing "else" in a group of if statements.
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Reviewed-by: Adrian Yanes <ext-adrian.yanes@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
(cherry picked from commit
a784bdcabe895ab927cbc28118d427c6e932b9fc)
Change-Id: Icbd458034e42cf7f2af33c1ecc9b0e4f1aa8724a
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Marko Kenttala [Tue, 31 Jan 2012 11:19:02 +0000 (13:19 +0200)]
Fix height of some Thai characters
Some Thai characters with two above glyphs were higher than fonts ascent. This
caused them to be clipped in for example qtcomponents buttons.
Added checking for this and calculation of new lower offset between glyphs if
needed.
Task-Number: ou1cimx1#898104
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Sami Merilä <sami.merila@nokia.com>
Reviewed-by: Pasi Pentikäinen <ext-pasi.a.pentikainen@nokia.com>
(cherry picked from commit
d7c7bf721c93fe7629f725c181b52ad9ca645a7a)
Change-Id: Ie4ac69de75f50b68b2ba87353d83098846f319f4
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Friedemann Kleint [Thu, 23 Feb 2012 07:53:04 +0000 (08:53 +0100)]
Fixed tst_qobject signalbug silently not compiled in -fast builds.
When configuring with -fast on Windows, a directory which contains two
.pro files, one SUBDIRS and one not, will have the SUBDIRS Makefile
silently clobbered by the non-SUBDIRS Makefile. In practice, this may
cause various subdirectories to be silently excluded from the build.
Rearrange .pro files for this test to avoid triggering this bug.
See also
e9015b3bc8827a8276f58bdd41adcac1bcbf2137.
Task-number: QTBUG-21168
Change-Id: I18fac1ac636fdc6b2aaee1b4cdfee9c4bc2a77ff
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Bradley T. Hughes [Thu, 23 Feb 2012 07:17:22 +0000 (08:17 +0100)]
Add src/concurrent/qtconcurrentversion.h to .gitignore
Change-Id: I521d9809b5e7a67db1370dd178d3795beee2a388
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Andy Shaw [Wed, 22 Feb 2012 12:28:44 +0000 (13:28 +0100)]
Silence coverity warning about sizeof(Node*) vs sizeof(Node) in QList
Coverity was complaining about QList::node_copy using sizeof(Node *)
instead of sizeof(Node). The complete message from Coverity is:
"Passing argument "from" of type "struct QList<QObject *>::Node *" and
argument "(to - from) * sizeof (struct QList<QObject *>::Node *) /*4*/"
to function "memcpy" is suspicious. Did you intend to use "sizeof(struct
QList<QObject *>::Node)" instead of "sizeof (struct
QList<QObject *>::Node *)" ? In this particular case sizeof(struct
QList<QObject *>::Node *) happens to be equal to sizeof(struct
QList<QObject *>::Node), but this is not a portable assumption."
Task-number: QTBUG-24443
Change-Id: I583887a8b4177a224664065e14f8780a9586c9a3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Matthew Vogt [Mon, 20 Feb 2012 00:23:26 +0000 (10:23 +1000)]
Report failure to open deprecated header file
If a deprecated header file is not writable, report the error message.
The existing error message statement is not processed due to an
operator precedence issue.
Change-Id: Ifb2d4e234c64e560d05c021c621966bce19ce215
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Stephen Kelly [Thu, 23 Feb 2012 00:05:46 +0000 (01:05 +0100)]
Use the CMake definition of Windows for CMake macros.
Change-Id: I599ddaaf9176f76f2e144c893e607757957dfef2
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Rick Stockton [Fri, 17 Feb 2012 03:20:35 +0000 (19:20 -0800)]
Suppport up to 27 mouse buttons from DirectFB Plugin.
Previous to this update, our plugin accepts only 3 moue buttons
(from DirectFB, to be translated into Qt::MouseButton values.)
This update changes our Plugin, so that it will successfully
translate up to 27 mouse button numbers. It is unclear, to the
author, which configurations of DirectFB on Linux might be
capable of actually sending high-numbered mouse button Events
to Qt. But, if/when a DirectFB configuration does so, this
change makes Qt ready to recognize and work with the button event.
Task-number: QTBUG-24335
Change-Id: I8839ed386eb3d261a187355a244e80d511399ea8
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Robin Burchell [Mon, 13 Feb 2012 15:27:36 +0000 (17:27 +0200)]
Remove unneeded code to convert to ASCII/Latin1.
This isn't used, and isn't wanted with the upcoming utf8 switch.
Change-Id: Ibec0fa7f36549df6a1c240353ffcd44beb2976f0
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Stephen Kelly [Wed, 22 Feb 2012 17:17:53 +0000 (18:17 +0100)]
Don't do macro self-expansion for moc anymore.
Change-Id: Ia34cc244a160c6c4abe6dacd7a2ce29bc4fc7bfb
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Stephen Kelly [Tue, 21 Feb 2012 16:25:28 +0000 (17:25 +0100)]
Remove unused Q_CANNOT_DELETE_CONSTANT
Change-Id: I697f3f786d84fa766b3bc48d93fc265deee5fdcf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Stephen Kelly [Tue, 21 Feb 2012 22:00:57 +0000 (23:00 +0100)]
Add the QT_LIBINFIX to the CMake config files.
Change-Id: If7bec54eca2d28cba314ce94a1ab1831c024ad31
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Stephen Kelly [Tue, 21 Feb 2012 16:26:45 +0000 (17:26 +0100)]
Remove detection of GCC versions which are not supported anywhere.
Change-Id: If254af51880e20be486b14f5237e6e1d4e4d6af3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Stephen Kelly [Tue, 21 Feb 2012 21:18:26 +0000 (22:18 +0100)]
Remove use of Q_BROKEN_DEBUG_STREAM.
No supported compiler defines it, and it was not used consistently
so it didn't work anyway.
Change-Id: Icc9e911e22daaedaee3d9316c15d19be26cd2e72
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Stephen Kelly [Tue, 21 Feb 2012 18:45:05 +0000 (19:45 +0100)]
Use QMAKE_SUBSTITUTIONS conditionals
Instead of generating CMake conditionals.
Change-Id: I3d987cc08666270e618222be9292558e73bc961e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Richard Moore [Tue, 21 Feb 2012 22:44:08 +0000 (22:44 +0000)]
Fix breakage in dead code
Change-Id: Ibcddfb711a3f47bf957a4b010330e8a775f1a2e8
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Friedemann Kleint [Tue, 21 Feb 2012 14:36:01 +0000 (15:36 +0100)]
Add further theme hints to QPlatformTheme.
- Add hints for QDialog/QDialogButtonBox.
- Add hint for available popup-menu area.
- Add keyboard scheme hint replacing
QGuiApplicationPrivate::currentKeyPlatform()
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Task-number: QTBUG-24204
Task-number: QTBUG-24315
Change-Id: I6653786b0dcb49a6fc264d3b9891dbfee502bd3e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Marc Mutz [Wed, 22 Feb 2012 14:29:05 +0000 (15:29 +0100)]
QEasingCurve: fix a missing */
Change-Id: I344342e950158c9dc832f1cd181d92899ddb1651
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Stephen Kelly [Tue, 21 Feb 2012 16:27:39 +0000 (17:27 +0100)]
Fail with #error early if the compiler does not support bool or explicit.
The fail mode for bool is moved from later in qglobal.h, and explicit is
used unguarded throughout Qt, so the macro is already useless.
Change-Id: Iff26892b025ba155e360a1f2dc93a67a6622dbc1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Robin Burchell [Mon, 30 Jan 2012 12:23:22 +0000 (14:23 +0200)]
Remove custom text codec for C strings.
This setting is extremely harmful, as code cannot know whether or not to expect
it. It also made the behaviour of QString::fromAscii and ::toAscii unintuitive,
and caused a lot of people to make mistakes with it.
Change-Id: I2f429fa7ef93bd75bb93a7f64c56db15b7283388
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Samuel Rødal [Mon, 20 Feb 2012 13:11:29 +0000 (14:11 +0100)]
Updated QApplication / QGuiApplication to match Qt 5 reality.
Removed obsolete Q_WS_X11/WIN/MAC stuff as well.
Change-Id: I8b65a0348a8cb170f3f060023fc6d9d982949b7e
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
Pekka Vuorela [Thu, 16 Feb 2012 12:24:22 +0000 (14:24 +0200)]
Fix typos
Change-Id: Ic0389d36bad001935376fb29d8c925b7ff908e4f
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
Pekka Vuorela [Wed, 22 Feb 2012 09:34:37 +0000 (11:34 +0200)]
Refactor input context tests
Combined test input context instances and adapted changed
interfaces a bit.
Change-Id: Id5422cac5967d45dcaf2eb71b941d9c45e3b4dee
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
Friedemann Kleint [Wed, 22 Feb 2012 08:26:27 +0000 (09:26 +0100)]
Fix QJson autotest on Windows.
- Fix warning: "Character represented by universal-character-name
'\uFFFF' cannot be represented in the current code page (1252).
- Fix character conversion
- Change source file to plain ASCII, add defines for special
characters.
Change-Id: I8557e6ba7488f746247f0d78181f14bfb7d5aaae
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Laszlo Agocs [Wed, 22 Feb 2012 07:25:01 +0000 (09:25 +0200)]
Migrate evdev plugins to the new plugin system
Change-Id: I7eb283646b7529080c8c2f41c267b0135c8f57e4
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Caroline Chao [Fri, 17 Feb 2012 08:37:15 +0000 (09:37 +0100)]
CodeCoverage: Move installCoverageTool call.
Call it from qtest_qParseArgs() instead of qExec(). This will allow to
remove the code coverage calls from quicktest.
Both the installation and the saving of code coverage data are now
gathered in testlib.
Change-Id: If3baedb0cff9d894e6f232b947af7e3158703d9d
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Rohan McGovern [Wed, 22 Feb 2012 00:07:01 +0000 (10:07 +1000)]
Fixed tst_qlogging app silently not compiled in some -fast builds.
When configuring with -fast on Windows, a directory which contains two
.pro files, one SUBDIRS and one not, will have the SUBDIRS Makefile
silently clobbered by the non-SUBDIRS Makefile. In practice, this may
cause various subdirectories to be silently excluded from the build.
Rearrange .pro files for this test to avoid triggering this bug.
Task-number: QTBUG-21168
Change-Id: Ic51941db497d7b8fb004f3c50f5ea24d90ff3114
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Marc Mutz [Fri, 17 Feb 2012 11:02:14 +0000 (12:02 +0100)]
QtCore: add constexpr to geometric classes
This turns code like QPoint(12, 12) into a compile-time
expression, under a C++11 compiler, and allows to define
arrays of these types that end up in read-only memory,
just like PODs would.
Some constructors and QLine::pointAt() needed to be
adjusted to fit into the empty-body/only-return-expression
requirement for constexpr constructors/functions.
Change-Id: Id11ee2752c948930c3e40a91d1f6d7c97db7a373
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Toby Tomkins [Tue, 21 Feb 2012 04:55:13 +0000 (14:55 +1000)]
Flag QGraphicsView test as unstable on Mac.
Task-number: QTBUG-24296
Change-Id: I9f748c368fbc0cc2b272be9400da95d774d51bde
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
João Abecasis [Fri, 17 Feb 2012 19:09:17 +0000 (20:09 +0100)]
Drop file-engine abstraction from public API
This abstraction imposed serious performance penalties and is being
dropped from the public API.
In particular, by allowing file names to be arbitrarily hijacked by
different file engines, and requiring engines to be instantiated in
order to decide, it imposed unnecessary overhead on all file operations.
Another flaw in the design with direct impact on performance is how
engines have no way to provide (or retain) additional information
obtained when querying the filesystem. In many places this has meant
repeated operations on the file system, where useful information is
immediately discarded to be queried again subsequently.
For Qt 4.8 a major refactoring of the code base took place to allow
bypassing the file-engine abstraction in select places, with
considerable performance gains observed. In Qt 5 it is expected we'll be
able to take this further, reaping even more benefits, but the
abstraction has to go.
[Dropping this now does not preclude that virtual file systems make an
appearance in Qt at a later point in Qt 5's lifecycle. Hopefully with a
new and improved abstraction.]
Forward declarations for QFileExtension(Result) were dropped, as the
classes were never used or defined.
Tests using "internalized" classes will only fully run on developer
builds. QFSFileEngine was removed altogether from exception safety test,
as it isn't its intent to test internal API.
Change-Id: Ie910e6c2628be202ea9e05366b091d6d529b246b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Donald Carr [Mon, 6 Feb 2012 15:28:19 +0000 (15:28 +0000)]
Correct pkg-config usage to respect sysroot
Direct use of pkg-config variables disregards the sysroot offset pkg-config
factors into consideration with the dedicated variables:
--cflags-only-I
--libs-only-L
these parameters exist exactly for this reason.
Change-Id: Ieecf31ebe0640f64b272b84fba22701aacf8f966
Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com>
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
jian liang [Sun, 19 Feb 2012 14:09:44 +0000 (22:09 +0800)]
Fix potential race condition in data structure of adopted thread watcher
Fix potential race condition in data structure of adopted thread watcher
in Windows. Since QVector is not thread safe, it is not safe to read and
append data to qt_adopted_thread_handles or qt_adopted_qthread
simultaneously in qthread_win.cpp. This patch fix this race condition.
Change-Id: I2d0c7a4cdde5390d38d15c98343f0fc6ddd24aba
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Richard Moore [Sun, 19 Feb 2012 15:55:29 +0000 (15:55 +0000)]
Merge overloads
Fixes ### Qt 5
Change-Id: I2846593616635440e17c8a9ce518780561992b84
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Richard Moore [Sun, 19 Feb 2012 16:52:24 +0000 (16:52 +0000)]
Merge overloads.
Fixes a Qt 5 TODO
Change-Id: Ide3159a5b979bd8e8a1edefff7fccb98dbe9a78e
Reviewed-by: Pierre Rossi <pierre.rossi@nokia.com>
Jonathan Liu [Tue, 21 Feb 2012 04:54:25 +0000 (15:54 +1100)]
QElapsedTimer/Win: Fix 64-bit integer overflow
The ticksToNanoseconds function in qelapsedtimer_win.cpp multiplies
ticks from performance counter with
1000000000 which can sometimes
result in 64-bit integer overflow. This can cause the elapsed time to
reset or jump around.
Task-number: QTBUG-23150
Change-Id: I464503e03cbe64e13906e773beafbf88e7dc256a
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit
f30a91ba9d98de1a0ebee5608ba289ac35871a8c)
Andrew Stanley-Jones [Tue, 21 Feb 2012 07:11:49 +0000 (08:11 +0100)]
Fix the qlocalsocket test
This test is broken in a couple of ways. A few one line fixes
combined into a single patch.
1. Linux is the only OS that does
abstract unix domain sockets by prepending a null as the first
character. Don't test this on non-Linux platforms and expect
it to pass.
2. Change QVERIFY2 to QCOMPARE so we can see why this
fails in CI but no on the local system. Use QCOMPARE
where possible.
Change-Id: Ic3d2cf9696730dc4d6589539fdfe8a48ccf28de5
Reviewed-by: Alex <alex.blasche@nokia.com>
Andrew Stanley-Jones [Wed, 15 Feb 2012 12:58:29 +0000 (13:58 +0100)]
Enable qlocalsocket auto test
Due to recent changes in the test it should now compile
and run properly. This re-enables the test.
Change-Id: I6c647d99fa1f1b1c53e006fef2865d6be08ec16c
Reviewed-by: Alex <alex.blasche@nokia.com>
Andrew Stanley-Jones [Tue, 21 Feb 2012 20:37:57 +0000 (21:37 +0100)]
Fix error in addrlen field
addrlen must be initialize to the amount of space available
in the buffer.
Change-Id: I52945d780bba9d22aeaa7ac5a35a0e54dbea60dc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Stephen Kelly [Tue, 21 Feb 2012 11:06:54 +0000 (12:06 +0100)]
Give the compile flags an EXECUTABLE_ prefix.
The fPIE flag should only be used with executables.
Change-Id: If799ae4a7fe2492af3aac67651659a52d365024a
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Simon Hausmann [Tue, 21 Feb 2012 15:38:00 +0000 (16:38 +0100)]
Add GL_BGR to the list of defined GL constants, right next to GL_BGRA
We use this one in WebKit's OpenGL texture mapper and it would be
convenient to have it here if it's not defined by the platform.
Change-Id: Idae33e49773e21c6290b164bccd4f209cf9820a2
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Oswald Buddenhagen [Wed, 1 Feb 2012 21:25:04 +0000 (22:25 +0100)]
make resolution of default spec less inefficient
resolve only once, in particular on unix.
Change-Id: I090698fc6029322a3a16d179d461af3e8336f6ad
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Oswald Buddenhagen [Tue, 31 Jan 2012 11:49:53 +0000 (12:49 +0100)]
revamp reading of bootstrap variables
make the "evaluator" able to process simple variable expansions.
cache the processed spec, so it is not re-read for every variable.
Change-Id: I20e69ec7b65faa7d571e68dbfea6c21c79a62641
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Oswald Buddenhagen [Tue, 21 Feb 2012 19:59:43 +0000 (20:59 +0100)]
regenerate unicode tables after rittk's patches
Change-Id: I60b416fc2dc2f0ccbcf13288a9ba2a42547269ec
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Konstantin Ritt [Tue, 18 Oct 2011 17:12:21 +0000 (19:12 +0200)]
optimize QString::toLower()/toUpper() for special cases, step 2
from now, QUnicodeTables::specialCaseMap[] starts with a placeholder; so,
if somethingCaseSpecial is true, then somethingCaseDiff is always greater than 0
Change-Id: Ibb1870512836eee71b1521564c0745096c05b2f9
Merge-request: 70
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Olivier
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Konstantin Ritt [Tue, 18 Oct 2011 17:12:20 +0000 (19:12 +0200)]
optimize QString::toLower()/toUpper() for special cases, step 1
reorganize QUnicodeTables::specialCaseMap as follows:
specialCaseMap contains sequence entries in form { length, a, b, .. }
Change-Id: Iea1f80bc2f4dc1f505428dad981cde26daaa52c7
Merge-request: 70
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Olivier
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Konstantin Ritt [Tue, 18 Oct 2011 17:12:19 +0000 (19:12 +0200)]
optimize QString::toCaseFolded()
use the codepath similar to QString::toLower()
Change-Id: Ica1948c5e9c82199307d9f823e07d42b50d59480
Merge-request: 70
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Olivier
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Konstantin Ritt [Tue, 18 Oct 2011 17:12:19 +0000 (19:12 +0200)]
optimize handling of surrogate pairs in toLower()/toUpper()
high surrogate part never changes on upper/lower casing
(which tested explicitly in the qunicodetables generator),
thus we can copy the high surrogate part in the loop
Change-Id: I24642b35eea7596c6ad494f2a7bc670f10b759a8
Merge-request: 70
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Olivier
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Konstantin Ritt [Tue, 18 Oct 2011 14:44:54 +0000 (16:44 +0200)]
replace 'const QChar &' with 'QChar ' where appropriate
as QChar is actually an ushort and there is no point in taking its
address.
Merge-request: 69
Change-Id: Idcc9d621e5627514ade006aa12a789a88929d48b
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Bradley T. Hughes [Mon, 20 Feb 2012 08:41:09 +0000 (09:41 +0100)]
Move QSysInfo out of qglobal.h and into a separate header
qsysinfo.h is still included by qglobal.h, but it may be possible
to remove the include from qglobal.h and instead include qsysinfo.h
only where needed (e.g. qendian.h, qdatastream.h).
Change-Id: Ifa2c72e0dae206d88eaa192e15a906297673c048
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Marc Mutz [Sun, 19 Feb 2012 19:55:09 +0000 (20:55 +0100)]
QEasingCurve: implement copy assignment operator inline
Implement the copy-assignment operator inline, using the
copy-swap idiom. This makes assignment strongly exception
safe, but also simplifies maintainence, because op= is
formulated in terms of the copy constructor now.
Change-Id: I803c9100a520d659b685992237cb76fd114222c8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Stephen Kelly [Tue, 21 Feb 2012 11:40:38 +0000 (12:40 +0100)]
Print out the try_compile output for tests expected to fail.
This way, ctest -V shows that it fails for the expected reason.
Change-Id: I97589d4e90d889ea0b10dbd6192526712dbfdd8e
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Oswald Buddenhagen [Thu, 2 Feb 2012 17:08:19 +0000 (18:08 +0100)]
remove bizarre late feeding of user_configs into base_vars
there is no obvious reason why this should happen. if base_vars is used
again, the user configs will be parsed again, too.
Change-Id: Ib56e01a468cdb5e81d610bcaf0163bf730cbae05
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
David Faure [Mon, 20 Feb 2012 17:14:55 +0000 (18:14 +0100)]
qmimetype: Fix test failure when LC_ALL is set.
This code sets LANG=en_US so that the method comment(), which returns a translated
name, can be compared with an expected result in English.
(QMimeType::comment uses QLocale::system().name() and QLocale::system().uiLanguages())
But LANG= has no effect if LC_ALL is set, so LC_ALL needs to be cleared (or set
to en_US) for the test to work.
Change-Id: Icb031057769be9bc8c0fcab65daa45e7bf1d5b18
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Shane Kearns [Mon, 20 Feb 2012 17:02:41 +0000 (17:02 +0000)]
Test for QT_NO_SSL instead of QT_NO_OPENSSL
Change the ifdefs in our own code (except openssl backend) to use the
new configure flag.
Change-Id: I8774734771c66b22164b5fae8fdb27814ac3df7b
Reviewed-by: Richard J. Moore <rich@kde.org>
Shane Kearns [Mon, 20 Feb 2012 16:40:55 +0000 (16:40 +0000)]
Make qget manual test compile without ssl support
Change-Id: I35f92328b79df1cfcae52fa6ff8290f260183aea
Reviewed-by: Richard J. Moore <rich@kde.org>
Shane Kearns [Mon, 20 Feb 2012 16:18:29 +0000 (16:18 +0000)]
Make https requests fail fast when configured without ssl support
Restored the Qt4 behaviour where attempting a https request using
QNetworkAccessManager fails with ProtocolUnsupportedError instead
of timing out or hanging.
Covered by existing autotests.
Task-number: QTBUG-17189
Change-Id: Iceb1ba6558c7d2b1af8ddf8d4ea9315a5b44d970
Reviewed-by: Richard J. Moore <rich@kde.org>
Marc Mutz [Sun, 19 Feb 2012 19:53:20 +0000 (20:53 +0100)]
QEasingCurve: simplify and fix copy constructor
The copy constructor used the default Private constructor,
followed by the application of the compiler-generated
copy assignment operator, and finally replaced the config
member with a copy of itself.
This is needlessly inefficient.
Worse: it's incorrect: if config->copy() throws, then
*d_ptr is leaked.
Solution: implement the copy constructor for Private,
and use it in the copy constructor of the public class.
Effect: everything that can throw now prevents the new
Private class from being created, and the compiler ends
up cleaning up after us.
Change-Id: I09ed18bb39ee7cd81aaa8ba01676fc202502a8e3
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Marc Mutz [Tue, 21 Feb 2012 12:41:25 +0000 (13:41 +0100)]
QHash: more robust use of qDebug()
I'm sure 'line' can't contain anything resembling a format string,
but better safe than sorry.
Change-Id: I0aa0f4a5a03d97b18d6a866c27fa721fcbe0f77b
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Marc Mutz [Sat, 18 Feb 2012 10:45:45 +0000 (11:45 +0100)]
QEasingCurve: implement move constructor
The move constructor sets other.d_ptr to zero. This is safe, because
after being moved from, the object is left in a state in which it
can be safely destroyed (delete nullptr is a no-op).
It cannot meaningfully be used anymore (most members will crash with
a nullptr dereference), but in most cases, the moved-from object
cannot be accessed anyway (not a named object), and if a named object
is moved from, it must have been through explicit std::move(), as in
the test case.
The STL makes better guarantees (moved-from containers are .empty()),
but I don't think it's worth introducing a null state into
QEasingCurve just for supporting a use-case that should be
considered a bug anyway.
Change-Id: I4115b7386cdea6960507da6843a0d0196d8e4139
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Marc Mutz [Sat, 18 Feb 2012 07:52:51 +0000 (08:52 +0100)]
QEasingCurve: implement move-assignment operator
Implemented as in QPen etc.
Change-Id: I65b43c6ec7308ca4b44f614594c15c41ab2f89f9
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Marc Mutz [Sat, 18 Feb 2012 07:52:13 +0000 (08:52 +0100)]
QEasingCurve: add member-swap
Implementated as in QPen etc.
Change-Id: Ia08551bf7902b60e115d1b1d2353030597e34841
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Marc Mutz [Sat, 18 Feb 2012 07:50:45 +0000 (08:50 +0100)]
QEasingCurve: mark as Q_MOVABLE_TYPE
The private data doesn't contain any back-links to the public
class, afaics. So QEasingCurve qualifies for movable.
Change-Id: Id8ab186fc0a25740458341256b53425dc40bce37
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Tor Arne Vestbø [Tue, 21 Feb 2012 12:08:42 +0000 (13:08 +0100)]
Use requested window format to match rest of the patch in
38257651
Otherwise we end up with an error at runtime:
QEGLPlatformContext::makeCurrent: eglError: 3009, this: 0x4b5c58
Change-Id: I1e794f427243e40f0a8f572a936b9fb756e89f8a
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Kent Hansen [Fri, 17 Feb 2012 21:45:08 +0000 (22:45 +0100)]
Port badxml autotest to QMetaObjectBuilder
The meta-object format is going to change for Qt5. Use QMOB to
insulate the badxml test from such changes.
(It just so happens that the QFAIL("a failure") statement is still on
line 109 after the refactoring, so the expected_badxml.* files'
location tags did not have to be changed.)
Change-Id: I04421d13c4df71c8004fa71cafc4823a59079a41
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Harald Fernengel [Tue, 21 Feb 2012 10:08:39 +0000 (11:08 +0100)]
Rename Q_MUTEX_LINUX to QT_LINUX_FUTEX
As requested by Thiago
Change-Id: Ie5b00cf4e530e19d360d0bc588f0f051e04b338f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Friedemann Kleint [Tue, 21 Feb 2012 10:46:33 +0000 (11:46 +0100)]
moc: Fix loading of plugins in release mode.
Generate the plugin meta data with "debug" set to false/true
in two code sections #ifdefed QT_NO_DEBUG.
Do not use the value of QT_NO_DEBUG set at moc compile
time which does not work in release mode/Windows.
Change-Id: I0252795ed063bebb2c3b3784f880e64845b5b7e7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Friedemann Kleint [Tue, 21 Feb 2012 11:26:58 +0000 (12:26 +0100)]
Streamline QPalette initialization code.
Share the brushes to reduce memory usage by QBrushData.
Change-Id: I04044b4c54b1f6a35a73d8bb4d299661ec0136a5
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Friedemann Kleint [Mon, 20 Feb 2012 13:05:33 +0000 (14:05 +0100)]
Use new plugin system for Input Context plugins.
Change-Id: Ifd1f63499afba546a745815762263a58ebf66460
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Thorbjørn Lund Martsum [Mon, 20 Feb 2012 15:11:31 +0000 (16:11 +0100)]
QHeaderView - create a union to save some space.
Beside saving some space it also ensures a bit faster vector operations
(remove and insert memcpy) - and lower the risk for a cache-miss.
(Many operations seems to be about 5-10% faster in the benchmark).
Change-Id: If8109e2146c25f642015906375dfbb449706ce8e
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Thorbjørn Lund Martsum [Thu, 16 Feb 2012 09:12:30 +0000 (10:12 +0100)]
QHeaderview - many sections removed performance boost.
When the QHeaderView model rowCount is decreased then the headerview
needs to remove some sections.
If e.g swapSections had occured then qheaderview before this patch did
a very slow removal by removing one section at a time and for each section
it restored visual and logical indexes.
By temporarily storing the logical index on the section we
can reduce the execution time of this a lot. The old code is only
faster when we remove one index (and is kept for that situation)
There is a complexity in difference (and many factors in our
qheaderview benchmark (the trunc part))
Change-Id: If45eab17fbca3364d458b004980570b5d013e4bd
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Bradley T. Hughes [Mon, 20 Feb 2012 08:43:02 +0000 (09:43 +0100)]
Remove qMacVersion()
Add QSysInfo::macVersion() instead, to match the windowsVersion()
function.
Change-Id: I783e59583ca21653d25586156cbb0cb1f301868b
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Friedemann Kleint [Tue, 21 Feb 2012 07:38:37 +0000 (08:38 +0100)]
Fix qlogging test.
Build app sub-process first.
Change-Id: I87a11f7fd5d8a82584e496722f79e236191b0fb3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Jason McDonald [Tue, 21 Feb 2012 02:57:27 +0000 (12:57 +1000)]
Improve tst_QPrinterInfo::testForDefaultPrinter().
Be explicit about skipping the test when no default printer is present.
Change-Id: If69b275eb0f490411471ec42798d8aefcc57fd83
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Jason McDonald [Tue, 21 Feb 2012 02:52:15 +0000 (12:52 +1000)]
Allow printer names to contain hyphens in QPrinterInfo test.
Change-Id: I473627413d2f1cd5637704f2948eb07a264be49e
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Jason McDonald [Tue, 21 Feb 2012 02:00:14 +0000 (12:00 +1000)]
Fix warning about unregistered metatype in QWindow autotest.
Change-Id: If9d8d7e1cd52815ef7231294e4890dfafcd28ec8
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Toby Tomkins [Tue, 21 Feb 2012 01:03:00 +0000 (11:03 +1000)]
Flag two tests (Win+A, Simon+G) in parseString as expect fail on OSX.
Remove previously defined insignificant test flag as the number of
tests failing has been reduced.
Task-number: QTBUG-24406
Task-number: QTBUG-23058
Change-Id: I01b41f30469cf7a440e21195e105cb30a8db76e2
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Jason McDonald [Mon, 20 Feb 2012 06:01:43 +0000 (16:01 +1000)]
Make the QApplication autotest work for shadow builds.
Use QFINDTESTDATA to locate the helper applications.
Change-Id: I604d10e37c9367f2e95225864edf5bf705f1d961
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Rohan McGovern [Mon, 20 Feb 2012 05:12:50 +0000 (15:12 +1000)]
tst_qapplication: mark expected failure on mac
The tab key behavior in Qt5 no longer respects the "Text boxes and lists
only" tab navigation option in OSX, which is the default. This is a
regression since Qt4.
Task-number: QTBUG-24372
Change-Id: I54c1663f8fb259dd847083432102a0bfad7dd69c
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Kurt Korbatits [Mon, 20 Feb 2012 01:36:24 +0000 (11:36 +1000)]
Changed qnetworksession unittest to work from installation dir
- Made test depend on subprogram
- added install of subprogram
Change-Id: Ib263e9e75ed3c900b52fb1c9b6d319e71d19bdbb
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Rohan McGovern [Tue, 14 Feb 2012 02:55:49 +0000 (12:55 +1000)]
Stabilize tst_qdbusabstractinterface and make it XFAIL
This test was written incorrectly in a way which happened to allow it to
pass most of the time (but not all the time).
Reset the state of test objects between each test function, and mark the
broken functions with QEXPECT_FAIL and a link to a task.
Replace the unusual WaitForPinger construct with the usual
QTRY_VERIFY/QTRY_COMPARE method of verifying asynchronous operations.
Task-number: QTBUG-24262
Change-Id: I82d09002307c0b500bf60cd5b583674321b37609
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Richard Moore [Sun, 19 Feb 2012 15:43:57 +0000 (15:43 +0000)]
Remove many unneeded virtuals.
Cleanup a ### Qt 5 TODO.
Change-Id: I384e868ecc3ca4d80e4e71bb54d402f4ec1337a8
Reviewed-by: David Faure <faure@kde.org>
Richard Moore [Sun, 19 Feb 2012 15:31:44 +0000 (15:31 +0000)]
convert length functions in QDom from uint to int.
Fixes a ### Qt 5
Change-Id: I7a385f2b704d38ae626094f27b06a918d4a9bc48
Reviewed-by: David Faure <faure@kde.org>
Richard Moore [Sun, 19 Feb 2012 13:41:31 +0000 (13:41 +0000)]
Merge overloads.
Fix a ### Qt 5 by merging the overloads.
Change-Id: If33e7592191c81b32caa6d68c73dbf2282437886
Reviewed-by: David Faure <faure@kde.org>
Andreas Holzammer [Mon, 20 Feb 2012 17:38:52 +0000 (18:38 +0100)]
Include qt_windows.h for Windows CE.
The include is needed for OutputDebugString,
as it is defined in winbase.h. To include
use the centralized header.
Change-Id: I486da20d7b054cee352be085e65a0ede1394653d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Kent Hansen [Mon, 20 Feb 2012 13:26:00 +0000 (14:26 +0100)]
Silence warnings/debug output from qobject tests
They create noise in the test results.
Change-Id: I40e7239ba7cd41bec577fe8220c86476553a6502
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Xizhi Zhu [Sun, 19 Feb 2012 09:15:18 +0000 (10:15 +0100)]
Merges several overloaded functions in QCoreApplication.
The source compatibility is kept.
Change-Id: If66053b271d65062b3c0ce6ec66c8394a37b4e3e
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Oswald Buddenhagen [Fri, 3 Feb 2012 21:15:07 +0000 (22:15 +0100)]
don't attempt to build host tools which are gone from qtbase
Change-Id: If9a3fb9792fc5d90496ff834b2c3adc177e1311e
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Shane Kearns [Fri, 17 Feb 2012 20:33:57 +0000 (20:33 +0000)]
Windows - fix connecting to a socket using IPv4 mapped IPv6
Connecting to an IPv4 mapped IPv6 address (e.g. ::FFFF:127.0.0.1)
requires the IPV6_V6ONLY socket option to be cleared.
This was causing tst_qtcpserver::ipv6ServerMapped autotest to fail.
The same change is not required on MacOS X - the test passes there.
Task-number: QTBUG-24351
Change-Id: I6c08b19f0daa12765da2d44792ffb17299322695
Reviewed-by: Markus Goetz <markus@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Friedemann Kleint [Mon, 20 Feb 2012 14:36:57 +0000 (15:36 +0100)]
Remove QPlatformIntegration/QPlatformTheme from QGuiAppPrivate.
Forward-declare instead.
Change-Id: I3851994e8bc05b389e94e948478339ba33d521c1
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Friedemann Kleint [Mon, 20 Feb 2012 14:44:21 +0000 (15:44 +0100)]
Fix warning about converting false to pointer value.
Change-Id: I70c324e6fcfd2bba3ab44837c5ce2c007de8896f
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Jørgen Lind [Tue, 14 Feb 2012 15:38:32 +0000 (16:38 +0100)]
Make sure that we pick up xcb from pkg-config
and run the configure checks with the values
Change-Id: Ie8e0072c686c6a7dce1d02e25a9c1abce4679d34
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Morten Johan Sorvig [Mon, 20 Feb 2012 11:05:17 +0000 (12:05 +0100)]
Remove Native Client special casing from configure.
Change-Id: I20f044b267b6c18e5a3050de22710c45e7573cc3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Jan-Arve Saether [Mon, 20 Feb 2012 13:42:41 +0000 (14:42 +0100)]
Remove QAccessibleInterface::relationTo().
QAccessibleInterface::relations() replaces both relatedTo() and
some of the RelationFlags that navigate() handled before.
Change-Id: I4b9d2c28ba3d753efe7cc9bfa0ad68bed3ee02fd
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Jan-Arve Saether [Mon, 20 Feb 2012 10:19:10 +0000 (11:19 +0100)]
Updated for accessibility
Change-Id: I13b5c2f293e9c1c238c7b7c6aae9d26f5c150f24
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Kent Hansen [Sat, 18 Feb 2012 20:33:28 +0000 (21:33 +0100)]
Port QDBusAdaptorConnector meta-object to revision 6
We want to drop support for old revisions in Qt 5.
This commit brings the QDBusAdaptorConnector meta-object in sync with
current moc output.
The QtDBus implementation was assuming that the relaySlot() slot
would be created at index methodOffset() in the meta-object, but
since revision 4 that's no longer the case (signals always come
first). Made the code more robust by actually querying the
meta-object what the index is.
Change-Id: Ie0791680cc2e9e5fb1472c4462c391f92ea22ea6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>