profile/ivi/qtbase.git
13 years agoAdd QDataStream operators to QMargins, so it can be streamed
Steven Ceuppens [Tue, 25 Oct 2011 10:19:19 +0000 (12:19 +0200)]
Add QDataStream operators to QMargins, so it can be streamed

 * QDataStream format documented
 * Added Unit test for QDataStream operators

 * Updated Unit test

Change-Id: Idbcfcb0b927e6369e8d31b57693c7aa0d1a154e7
Reviewed-by: Olivier Goffart <ogoffart@kde.org>
13 years agoDo not call setCursor on Desktop or if there is no platform window.
Friedemann Kleint [Thu, 27 Oct 2011 11:25:14 +0000 (13:25 +0200)]
Do not call setCursor on Desktop or if there is no platform window.

Fix a crash on Windows.

Change-Id: I2b88e113d7149444ebc8946c0ee0eba7a9b5bbc2
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
13 years agoRemove pointless QVERIFY(1) calls in QPainter test
Jason McDonald [Wed, 26 Oct 2011 06:46:06 +0000 (16:46 +1000)]
Remove pointless QVERIFY(1) calls in QPainter test

Change-Id: Iae5fcb9fa7dc64ed2d2bd369dbe689c5136ad283
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoUse standard method of excluding a test.
Jason McDonald [Wed, 26 Oct 2011 06:12:27 +0000 (16:12 +1000)]
Use standard method of excluding a test.

If we find out at run-time that an entire test program is not
applicable, the correct way to skip the test is by calling QSKIP from
the test's initTestCase() method.

Change-Id: Iaf1dbcce38c569ee9513bf37232e9e4ea287d872
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoPrefer compile-time checks to QSKIP.
Jason McDonald [Wed, 26 Oct 2011 05:37:01 +0000 (15:37 +1000)]
Prefer compile-time checks to QSKIP.

Qt has compile-time defines for determining the presence of each style
in the build.  Use these to exclude inapplicable test data instead of
including all test data and then being unable to distinguish the absence
of a style from regressions in QStyleFactory.

Change-Id: Iab1756aec80892a8b587bb635779537c64b1d4dd
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoRemove unnecessary QSKIP.
Jason McDonald [Wed, 26 Oct 2011 04:32:55 +0000 (14:32 +1000)]
Remove unnecessary QSKIP.

Change-Id: Icaa0687d5d0370ede6076cbee9d97d89e338ca17
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoUse load() when constructing QSimpleCodec's reverse map
Bradley T. Hughes [Wed, 28 Sep 2011 10:14:01 +0000 (12:14 +0200)]
Use load() when constructing QSimpleCodec's reverse map

The implicit casting results in unnecessary volatile loads. The
test-and-set-ordered doesn't need full ordering, test-and-set-release
is enough to ensure that the memory initialization done by
buildReverseMap() and test-and-set happen in program order.

Change-Id: I168b504271aeba050d6b8396becbdeb3ef938213
Reviewed-by: Olivier Goffart <ogoffart@kde.org>
13 years agoWindows: More fine-grained paint event handling.
Friedemann Kleint [Thu, 27 Oct 2011 08:31:29 +0000 (10:31 +0200)]
Windows: More fine-grained paint event handling.

Pass expose events to GL widgets, handle invalid
update rectangles, ignore WM_ERASEBKND (using code from 4.8).

Change-Id: Ide062efb392292fff556d37b0ef0e880676748a2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
13 years agoFixed resource leak when setting QProgressBar style sheet
Tero Ahola [Mon, 10 Oct 2011 15:02:33 +0000 (17:02 +0200)]
Fixed resource leak when setting QProgressBar style sheet

Task-number: QTBUG-19110

Merge-request: 2687
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
(cherry picked from commit ecd78168271cfe71715e074a50752712f4aa3229)

Change-Id: I49fdf0f74b903313089eb8cd778c80a19d34b461
Reviewed-by: Olivier Goffart <ogoffart@kde.org>
13 years agoInitial support for MeeGo's input method server
Simon Hausmann [Tue, 18 Oct 2011 12:51:53 +0000 (14:51 +0200)]
Initial support for MeeGo's input method server

This platform input context plugin is based on the dbus protocol used in MeeGo
1.2 Harmattan's input method server.

It supports composition, mouse-click-on-preedit as well as basic input method
hints. Missing are: Copy & paste, preedit injection, key redirection as well
as a bunch of other smaller MeeGoTouch specific features.

Change-Id: Ic3a8741f7a5ed18b379985e316cb137f7b8f6a8e
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
Reviewed-by: Kenneth Rohde Christiansen <kenneth.r.christiansen@nokia.com>
13 years agoAdd default actions to QAccessibleWidget.
Frederik Gladhorn [Tue, 11 Oct 2011 14:20:47 +0000 (16:20 +0200)]
Add default actions to QAccessibleWidget.

Change-Id: I9f251aad663fd0b8db2ef068c6581241d91c090d
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
13 years agoNative file dialog support for Mac
Morten Sorvig [Wed, 28 Sep 2011 07:52:15 +0000 (09:52 +0200)]
Native file dialog support for Mac

* New API: QPlatformDialogHelper to support native dialog on QPA.
    (Currently, It supports only file dialog.)
* Modify QDialog* and QFileDialog* to support native dialog.
* Add native file dialog support to cocoa platform plugin.

Change-Id: I957f046748a27a33fd9f8af3c525feabd1b0f582
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
13 years agoUnix (non-Glib) event dispatcher: round sleep to millisecond boundary.
Thiago Macieira [Wed, 30 Jun 2010 13:18:24 +0000 (15:18 +0200)]
Unix (non-Glib) event dispatcher: round sleep to millisecond boundary.

If we have two timers running in an application with the same timeout
and started almost at the same time by the code, they would trigger two
sleeps, the second of which very short (under a millisecond).

This causes us to match the Glib and Windows event loops, which round
all timers to millisecond anyway.

Change-Id: I7eb531e02dadf75925c01192b0f33ef3641ae1ea
Reviewed-by: Olivier Goffart <ogoffart@kde.org>
13 years agoTests: Remove Q_WS_QPA, qpa-sections from .profiles.
Friedemann Kleint [Tue, 25 Oct 2011 09:28:47 +0000 (11:28 +0200)]
Tests: Remove Q_WS_QPA, qpa-sections from .profiles.

Compile without -qpa.

- Make Q_WS_QPA-#ifdefed sections the default in the code
- Replace some Q_WS_ by Q_OS_
- Add ### fixme for places that need checking
- Remove qpa conditionals from .pro files.

Change-Id: I6ea930afc0c236cc12a7b7e95f1b8a1c24b3a513
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
13 years agoCocoa: Set correct child window geometry.
Morten Sorvig [Wed, 26 Oct 2011 10:35:52 +0000 (12:35 +0200)]
Cocoa: Set correct child window geometry.

Remote globalGeometry which was completely wrong,
replace with flipRect which converts from Qt
screen coordinates to OS X screen coordinates.

Change-Id: Ie560cb7c2266fe779da8a44a35596d2d12af77f5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
13 years agoCocoa: Implement propagateSizeHints.
Morten Sorvig [Wed, 26 Oct 2011 08:00:26 +0000 (10:00 +0200)]
Cocoa: Implement propagateSizeHints.

Change-Id: Idc1244ffbf975972f01d9ee48092500a72739d37
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
13 years agoRemove unreachable QSKIP in UIC autotest.
Jason McDonald [Wed, 26 Oct 2011 04:22:45 +0000 (14:22 +1000)]
Remove unreachable QSKIP in UIC autotest.

If an autotest's initTestCase() method fails or skips, the remaining
test functions are not executed.  Thus the QSKIP in the run() test
function was unreachable.

Change-Id: If1f1b484958367236357f9445491bed50bee2239
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoRemove obsolete MSVC workarounds from autotests.
Jason McDonald [Wed, 26 Oct 2011 01:49:57 +0000 (11:49 +1000)]
Remove obsolete MSVC workarounds from autotests.

Qt5 doesn't support MSVC versions before 2008, so workarounds for
earlier versions are no longer required.

Change-Id: I429feff99fe61d286637b960d92fd58962f8aefa
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoReplace QSKIP with QFAIL in qputenv test
Jason McDonald [Wed, 26 Oct 2011 01:03:35 +0000 (11:03 +1000)]
Replace QSKIP with QFAIL in qputenv test

If qputenv fails, the test should fail rather than skip, particularly as
the test is supposed to be testing qputenv.

Change-Id: Iabe13d360cabaeffda46fab19f1dd0d4ed8e1eee
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoRemove inappropriate QSKIP in QTextCodec autotest.
Jason McDonald [Wed, 26 Oct 2011 00:52:54 +0000 (10:52 +1000)]
Remove inappropriate QSKIP in QTextCodec autotest.

There were only two ways the QSKIP could be called: (1) the C++ runtime
is broken, or (2) the earlier call to resize the string failed.

In both cases there should be a hard test failure. In the former case, a
broken C++ runtime calls all of the test results into question.  In the
latter case, the QByteArray::resize() method has suffered a regression.

Change-Id: I5adf942d2eb4d746d2ab31e98571c5d9bdd40890
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoRemove obsolete QSKIP call.
Jason McDonald [Wed, 26 Oct 2011 00:28:13 +0000 (10:28 +1000)]
Remove obsolete QSKIP call.

The bug referenced in the QSKIP has been marked as resolved, so this
QSKIP should no longer be needed.

Change-Id: I41dd964827a3df8fb5ebb9674cef9db59c03d432
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoFix spelling
Morten Sorvig [Wed, 26 Oct 2011 07:20:27 +0000 (09:20 +0200)]
Fix spelling

Change-Id: If9630ffa3a1c411b2e56b41ed35c272177343274
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
13 years agoreplace 'const QChar &' with 'QChar ' for QChar and QString
Ritt Konstantin [Tue, 18 Oct 2011 14:44:54 +0000 (16:44 +0200)]
replace 'const QChar &' with 'QChar ' for QChar and QString

Merge-request: 69
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Change-Id: I61f5a54b783252029fcad95677958fa6a2130d01
Reviewed-by: Olivier Goffart <ogoffart@kde.org>
13 years agoWindows: Fix Open GL formats.
Friedemann Kleint [Wed, 26 Oct 2011 14:09:37 +0000 (16:09 +0200)]
Windows: Fix Open GL formats.

- Add swapInterval as additional format
- Query context format correctly and store in separate struct
  (default vs requested/obtained)
- Cosmetics, rename enumerations, structs.

Change-Id: I381cf8e1bde33e6624feb549437c7b95dd85e93c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
13 years agoRevert "Use memmove in QListData::append(int) as regions overlap."
Oswald Buddenhagen [Wed, 26 Oct 2011 12:24:51 +0000 (14:24 +0200)]
Revert "Use memmove in QListData::append(int) as regions overlap."

We have proven that the regions cannot overlap. The root problem must be
somewhere else.

This reverts commit d96b7b809e614dd416709acec768529457120b9f.

Change-Id: I3446487f2a1a5bd322379b8adb788c26ff3e08e2
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
13 years agoImplement child instead of navigate in QAccessibleMainWindow.
Frederik Gladhorn [Sat, 22 Oct 2011 15:52:13 +0000 (17:52 +0200)]
Implement child instead of navigate in QAccessibleMainWindow.

Change-Id: I321ce4f8bb6e724db87a0419f890174b32cc1fe2
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
13 years agoDoc: Fixing typo
Sergio Ahumada [Mon, 24 Oct 2011 22:11:03 +0000 (00:11 +0200)]
Doc: Fixing typo

Fix typos I was able to find in `tests/auto' directory.

Change-Id: Id0bfcc18301381ac8b1ca8d5af17bd926e5913d4
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
13 years agoQtPrintSupport: Remove Q_WS_QPA, qpa sections from .pro files.
Friedemann Kleint [Wed, 26 Oct 2011 07:11:48 +0000 (09:11 +0200)]
QtPrintSupport: Remove Q_WS_QPA, qpa sections from .pro files.

Compile without -qpa.

Change-Id: Icfbf733964a7d6db80f8ec706a4b6fe84cd71b4d
Reviewed-by: Oliver Wolff <oliver.wolff@nokia.com>
13 years agoRe-enabled tests
Jo Asplin [Tue, 25 Oct 2011 13:39:20 +0000 (15:39 +0200)]
Re-enabled tests

This commit re-enables tests that are assumed to be ok by now, since they:
- Have been passing in CI for a long time recently (more precisely, not failed once in pulse run range 730-829).
- Did not have any known issues associated with them.

Note that not all of these tests were disabled as a result of QTBUG-21402.

Task-number: QTBUG-21402
Change-Id: I80bbf8b351bd9165aa968e98f4dc17e8be6bc7c3
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoRe-enabled tst_qstatictext
Jo Asplin [Tue, 25 Oct 2011 12:19:49 +0000 (14:19 +0200)]
Re-enabled tst_qstatictext

tst_qstatictext is fixed by 8b4e40f5354ef81c40d8da35e0e79b2a87278e31

Task-number: QTBUG-20977
Change-Id: I70631951c98ee3033f4d0c7a61fad102d28846d1
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoRe-enabled tst_qrawfont
Jo Asplin [Tue, 25 Oct 2011 12:15:57 +0000 (14:15 +0200)]
Re-enabled tst_qrawfont

tst_qrawfont is fixed by 8b4e40f5354ef81c40d8da35e0e79b2a87278e31

Task-number: QTBUG-20976
Change-Id: I862674211f581abec8714d1a3da4dc38227c2606
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoRe-enabled tst_qhttpnetworkconnection
Jo Asplin [Tue, 25 Oct 2011 12:07:13 +0000 (14:07 +0200)]
Re-enabled tst_qhttpnetworkconnection

tst_qhttpnetworkconnection is fixed by 13df02ad044cca3c0414f5e34c57fe04b69b414c

Task-number: QTBUG-20981
Change-Id: I5666dbafe09113a7ecc3680f7608f874d66e2c19
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoRe-enabled tst_qsocketnotifier
Jo Asplin [Tue, 25 Oct 2011 11:57:10 +0000 (13:57 +0200)]
Re-enabled tst_qsocketnotifier

tst_qsocketnotifier is fixed by 0e7cecb861c7be73d3ef46b41ad6d1a5691b5e7d

Task-number: QTBUG-20982
Change-Id: I97c0bc0f94a04e57f239de99bf3b64451a492434
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoRemove unnecessary sources from the bootstrap library
Bradley T. Hughes [Tue, 25 Oct 2011 11:43:27 +0000 (13:43 +0200)]
Remove unnecessary sources from the bootstrap library

The ISCII and TSCII codecs are not compiled in due to QT_NO_CODECS,
likewise for all of the system locale implementations due to
QT_NO_SYSTEMLOCALE.

Since these sources do not result in any symbols, there's no reason
to compile them.

Change-Id: I3b65c156f594366850df9f44406ba7638ad735ba
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
13 years agoSilence warning from clang
Bradley T. Hughes [Tue, 25 Oct 2011 11:29:09 +0000 (13:29 +0200)]
Silence warning from clang

../../corelib/tools/qlocale_mac.mm:78:13: warning: '&&' within '||'
      [-Wlogical-op-parentheses]
  ...&& !qt_splitLocaleName(QString::fromLocal8Bit(result), lang, script, cntry)...
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../corelib/tools/qlocale_mac.mm:78:13: note: place parentheses around the
      '&&' expression to silence this warning
            && !qt_splitLocaleName(QString::fromLocal8Bit(result), ...
            ^

Change-Id: I64f745e7dfa64f28f264667372ed64f9e34ca3b7
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
13 years agoRemove the QT_MOBILITY_BEARER macro.
Xizhi Zhu [Mon, 24 Oct 2011 20:27:28 +0000 (23:27 +0300)]
Remove the QT_MOBILITY_BEARER macro.

It was originally added to keep compatibility with the bearer management module from Qt Mobility, and no longer needed in Qt 5.

Change-Id: I187494e02a71c3d39a52f8c0bd4d0c7cc23d0b4b
Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
13 years agoReadded PrintSupport for Windows
Oliver Wolff [Mon, 24 Oct 2011 07:25:32 +0000 (09:25 +0200)]
Readded PrintSupport for Windows

The prepared plugin architecture for
printing support was used as much as
possible but some functionality had to
be done in src/printsupport.

Change-Id: Ic8446cb8018a0970b4da97c1912ba6dc20d2a09f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
13 years agoUpdate readme about xcb plugin dependencies
Laszlo Agocs [Tue, 25 Oct 2011 13:21:32 +0000 (16:21 +0300)]
Update readme about xcb plugin dependencies

Change-Id: Ia317ce96db3400f43cf800619fddcf76b5ab450a
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
13 years agoFix QDialog test: Q_WS_X11 is no more.
Frederik Gladhorn [Mon, 24 Oct 2011 11:09:50 +0000 (13:09 +0200)]
Fix QDialog test: Q_WS_X11 is no more.

Change-Id: Ia4182b22f4a4999a80d7792378e1b9dfa03e7f9c
Reviewed-by: Kristoffer Flottorp <kristoffer.flottorp@nokia.com>
13 years agoBring back QDoubleSpinBox test.
Frederik Gladhorn [Mon, 24 Oct 2011 12:14:37 +0000 (14:14 +0200)]
Bring back QDoubleSpinBox test.

Returning text "1.00" instead of "1" sounds right to me.
Checking the test before the widget is shown/validated sounds pointless.

Change-Id: Ifc9e51dc9448a5bb3afbd566fe10524fbabc654f
Reviewed-by: Kristoffer Flottorp <kristoffer.flottorp@nokia.com>
13 years agoFix autotest tst_qtextbrowser.cpp
Frederik Gladhorn [Mon, 24 Oct 2011 10:03:10 +0000 (12:03 +0200)]
Fix autotest tst_qtextbrowser.cpp

The qrc tests need further investigation.
Bring at least back the basic test.

Change-Id: I302a37b6c989af76db67716ffcf10a0960234156
Reviewed-by: Kristoffer Flottorp <kristoffer.flottorp@nokia.com>
13 years agoQNetworkReply autotest no longer needs private_tests
Shane Kearns [Fri, 21 Oct 2011 17:03:57 +0000 (18:03 +0100)]
QNetworkReply autotest no longer needs private_tests

Due to clearAccessCache being made part of the public API in Qt5,
this autotest can be run on normal Qt builds again

Task-number: QTBUG-17312
Change-Id: I3b70237a28ed141ffb49762cc40c8a528f9be6a8
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
13 years agoQtGui: Remove Q_WS and qpa.
Friedemann Kleint [Thu, 20 Oct 2011 11:35:27 +0000 (13:35 +0200)]
QtGui: Remove Q_WS and qpa.

Enable compilation without -qpa.
Remove QT_NO_FREETYPE and QT_NO_FONTCONFIG when building.

Change-Id: I0e017cc47ee06b885be65deaeb67a449a119b8be
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
13 years agoQNAM: make systemProxyForQuery respect http_proxy
Arvid Ephraim Picciani [Mon, 24 Oct 2011 14:41:44 +0000 (16:41 +0200)]
QNAM: make systemProxyForQuery respect http_proxy

the generic systemProxyForQuery will use http_proxy from the
environment, if it is set.

Change-Id: Ie685c47eb6df1fdd2ab223defc7172bb25e6fe30
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
13 years agoFix QtSQL auto test server addresses
Honglei Zhang [Mon, 24 Oct 2011 11:37:33 +0000 (14:37 +0300)]
Fix QtSQL auto test server addresses

Fix QtSQL aoto test server addresses. New servers are located in
Brisbane. Old Oslo test servers shall not be used anymore.

Change-Id: Icd4ae4c0193f71410d572bfa014272e1e77586c0
Reviewed-by: Trust Me
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
13 years agoall remaining tests: eliminated usage of qttest_p4.prf
Rohan McGovern [Tue, 25 Oct 2011 04:42:16 +0000 (14:42 +1000)]
all remaining tests: eliminated usage of qttest_p4.prf

qttest_p4.prf was added as a convenience for Qt's own autotests in Qt4.
It enables various crufty undocumented magic, of dubious value.
Stop using it, and explicitly enable the things from it which we want.

Change-Id: I02fe27b2c1800f929250fa8694ca2976c9661a12
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
13 years agowidgets: eliminated usage of qttest_p4.prf
Rohan McGovern [Tue, 25 Oct 2011 04:24:31 +0000 (14:24 +1000)]
widgets: eliminated usage of qttest_p4.prf

qttest_p4.prf was added as a convenience for Qt's own autotests in Qt4.
It enables various crufty undocumented magic, of dubious value.
Stop using it, and explicitly enable the things from it which we want.

Change-Id: I3c1d993d5682db913aadc267d98a638061f393d6
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
13 years agobenchmarks: eliminated usage of qttest_p4.prf
Rohan McGovern [Tue, 25 Oct 2011 01:59:25 +0000 (11:59 +1000)]
benchmarks: eliminated usage of qttest_p4.prf

qttest_p4.prf was added as a convenience for Qt's own autotests in Qt4.
It enables various crufty undocumented magic, of dubious value.
Stop using it, and explicitly enable the things from it which we want.

Change-Id: I48ab0ee64d8348cada2e6c7b27c67b6bbc36280d
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
13 years agotest: Leftover for split `qsqlquery' unit and benchmark test
Sergio Ahumada [Mon, 24 Oct 2011 10:48:56 +0000 (12:48 +0200)]
test: Leftover for split `qsqlquery' unit and benchmark test

Add new directory structure to benchmarks.pro file introduced by
3172631f0d40f34249f376f9b94a40919573d0c7 .

Task-number: QTQAINFRA-353
Change-Id: I998530cd00bb1849f7a42816d61195f6a5bb4b92
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoSanitize QAccessible includes.
Frederik Gladhorn [Sun, 23 Oct 2011 21:03:29 +0000 (23:03 +0200)]
Sanitize QAccessible includes.

Change-Id: I86f5ae75293e5e4d370363d84402f4e7fad03a9e
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
13 years agoRemove QSKIPs from qgraphicslinearlayout test
Jason McDonald [Tue, 25 Oct 2011 04:59:27 +0000 (14:59 +1000)]
Remove QSKIPs from qgraphicslinearlayout test

If the test decides not to do some extra testing for certain styles, but
doesn't find any failures in what it has done so far, it should pass
rather than skipping.  Removing the QSKIPs also corrects the leakage of
the memory pointed to by "widget".

Change-Id: Ibd0f3f0605660c92e9bab2a3d1d9f31b52192575
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoRemove QSKIPs from qgraphicsgridlayout test
Jason McDonald [Tue, 25 Oct 2011 04:48:25 +0000 (14:48 +1000)]
Remove QSKIPs from qgraphicsgridlayout test

If the test decides not to do some extra testing for certain styles, but
doesn't find any failures in what it has done so far, it should pass
rather than skipping.  Removing the QSKIPs also corrects the leakage of
the memory pointed to by "widget".

Change-Id: Id4cf7e8dc48f836d2c6dcde57dde87797a2fe036
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoImprove qhostinfo autotest on HPUX 11i
Jason McDonald [Mon, 24 Oct 2011 06:26:50 +0000 (16:26 +1000)]
Improve qhostinfo autotest on HPUX 11i

Several test functions use IPv6 reverse lookups, which evidently don't
work on HPUX 11i, but only one of these tests was skipped on that
platform and the others presumably fail.

This commit also removes the commented-out test data and makes it easier
to put some useful test data back. QTBUG-22287 records the fact that no
real IPv6 hostnames are currently used in the reverseLookup test.

Change-Id: Iff1ed1b725492bcc28ca4cb5f8e2dc106887c0b4
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agogui: eliminated usage of qttest_p4.prf
Rohan McGovern [Tue, 25 Oct 2011 01:38:02 +0000 (11:38 +1000)]
gui: eliminated usage of qttest_p4.prf

qttest_p4.prf was added as a convenience for Qt's own autotests in Qt4.
It enables various crufty undocumented magic, of dubious value.
Stop using it, and explicitly enable the things from it which we want.

Change-Id: I97046aa51f1b3fc100e2eb2fa115f1bf8ae6437d
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
13 years agocorelib: eliminated usage of qttest_p4.prf
Rohan McGovern [Tue, 25 Oct 2011 01:26:19 +0000 (11:26 +1000)]
corelib: eliminated usage of qttest_p4.prf

qttest_p4.prf was added as a convenience for Qt's own autotests in Qt4.
It enables various crufty undocumented magic, of dubious value.
Stop using it, and explicitly enable the things from it which we want.

Change-Id: I7c1ffe9c8c294dbdc988e1582e580b1ed3f4593e
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
13 years agoDon't build app bundles for qmltestcase applications on Mac OS X
Charles Yin [Mon, 24 Oct 2011 23:50:40 +0000 (09:50 +1000)]
Don't build app bundles for qmltestcase applications on Mac OS X

Change-Id: Ia61f12313908f42f7ff7a43be5443e779300e436
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoDon't call QSKIP/QVERIFY outside of test functions.
Jason McDonald [Mon, 24 Oct 2011 05:55:41 +0000 (15:55 +1000)]
Don't call QSKIP/QVERIFY outside of test functions.

These macros should only be called inside a test function, otherwise
they cannot abort the test function correctly.  Solve this by making the
helper function return a boolean result (and output a warning on
failure to help with debugging) and verify the return value in each test
function that calls the helper.

Change-Id: I599673fda49051baf80a8c94b5d85a4d8c2cb406
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoUpdate bug number in autotests.
Jason McDonald [Mon, 24 Oct 2011 05:47:17 +0000 (15:47 +1000)]
Update bug number in autotests.

Change-Id: I4b17736d86f8dc571090820a545107bb89cb493d
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoAdd CONFIG flag to use the compiler to generate makefile dependencies
Tor Arne Vestbø [Mon, 24 Oct 2011 11:37:30 +0000 (13:37 +0200)]
Add CONFIG flag to use the compiler to generate makefile dependencies

Using CONFIG+=GNUmake will enable dependency tracking using included
dependency files, but will use an implicit makefile rule to generate
each .d file.

We now support an additional CONFIG option, gcc_MD_depends, that
instead passes the -MD flag to a GCC (compatible) compiler. This
will generate a .d file as a side-effect of the normal compile
step.

Change-Id: Ib6ce1d93e7f07e316a345bf12aa6f2b4e9a6415d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
13 years agoCompile with clang
Bradley T. Hughes [Thu, 20 Oct 2011 09:18:48 +0000 (11:18 +0200)]
Compile with clang

Clang does not accept this syntax, see
http://llvm.org/bugs/show_bug.cgi?id=8875

The work around is to not use the typedef name. NS() around the
template parameters is necessary to match the real types (and
not the QMetaType::Type enumerators), otherwise we get the following:

kernel/qmetatype.cpp:1647:72: error: template argument for template type
      parameter must be a type
  ...NS(QVariantMap)* >(where)->NS(QVariantMap)::~QMap<QString, ...
                                                       ^~~~~~~

Change-Id: I3afa0cbbe4ef7ad899cfa9eafb3bcc10bedc20b3
Reviewed-by: Wolf-Michael Bolle <wolf-michael.bolle@nokia.com>
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
13 years agoImprove drawing scaled image with raster using SSE2
Olivier Goffart [Mon, 24 Oct 2011 06:02:10 +0000 (08:02 +0200)]
Improve drawing scaled image with raster using SSE2

That codepath is taken in qml when an Image specify with and hight and
is not smooth, and the image contains alpha contents

The changes in qdrawingprimitive_sse2_p.h just put some code from the
BLEND_SOURCE_OVER_ARGB32_SSE2 macro into a sub macro to allow its reuse

The code that is not SSE2 in qt_scale_image_argb32_on_argb32_sse2 comes
from the qt_scale_image_argb32_on_argb32 in qblendfunctions.cpp

Change-Id: I071a040af4514fb21777dead9f7c5baf16071d59
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
13 years agoNetwork - Use isLoopback API in place of existing localhost checks
Shane Kearns [Mon, 24 Oct 2011 10:07:02 +0000 (11:07 +0100)]
Network - Use isLoopback API in place of existing localhost checks

Various places in QtNetwork checked for Localhost or LocalHostIPv6,
i.e. 127.0.0.1 or ::1. By using the isLoopback API, other loopback
addresses are treated the same way (e.g. 127.0.0.2 and ::ffff:127.0.0.1)

Task-number: QTBUG-22246
Change-Id: I46f55630d8646fd68034a509969a0b7cb72ca77c
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
13 years agoNetwork - Add QHostAddress::isLoopback API.
Shane Kearns [Mon, 24 Oct 2011 10:01:09 +0000 (11:01 +0100)]
Network - Add QHostAddress::isLoopback API.

The standard IPv4 loopback address is 127.0.0.1, however anything in
the 127.0.0.0/8 range is also a loopback address.

isLoopback returns true for any address that is in the IPv4 loopback
address range, or is the single IPv6 loopback address ::1

Task-number: QTBUG-22246
Change-Id: Ic39100e2e97a52db700e01b109998a1cfd4335e3
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
13 years agoQIODevice - disallow setTextMode when not open
Shane Kearns [Thu, 20 Oct 2011 15:55:02 +0000 (16:55 +0100)]
QIODevice - disallow setTextMode when not open

Calling setTextMode() before open() would make the device appear to be
already open and cause later errors.
Added a qWarning and documentation update to prevent this API misuse

Task-number: QTBUG-20905
Change-Id: I2e06cd8e79f4afcf27417ac0eae6ebef980a17aa
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
13 years agoExtend QVariant benchmarks
Jędrzej Nowacki [Wed, 12 Oct 2011 13:05:44 +0000 (15:05 +0200)]
Extend QVariant benchmarks

Add new cases for custom types and QStringList.

Change-Id: I79f8d415be43774e6b2488e8a6a8028bf4a5fd45
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
13 years agocorelib: Remove Q_WS-macros.
Friedemann Kleint [Fri, 21 Oct 2011 07:55:40 +0000 (09:55 +0200)]
corelib: Remove Q_WS-macros.

Q_WS_QPA is the only active code path after merging
refactor, other Q_WS-macros are no longer used.

Enable compilation without -qpa.

- Remove Q_OS_MSDOS, Q_OS_OS2
- Remove Q_WS_QWS
- Remove/replace definitions/conditionals of Q_WS_XX
- Remove qpa branches from profiles
- Replace Q_WS_MAC by  Q_OS_MAC
- Replace Q_WS_MAC && !Q_WS_QPA by
  Q_OS_MAC && !QT_NO_CORESERVICES
- Similarly in profiles: mac:contains(QT_CONFIG, coreservices)
- Replace Q_FS_FAT by Q_OS_WIN

Change-Id: Icce5a6c55b052c8f72b3b979ddf31a4f388ea9c9
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
13 years agotest: Split `qcontiguouscache' unit and benchmark tests
Sergio Ahumada [Sun, 23 Oct 2011 11:15:25 +0000 (13:15 +0200)]
test: Split `qcontiguouscache' unit and benchmark tests

Moving three benchmark tests from 'tests/auto' to 'tests/benchmarks'.
Also removing 'qttest_p4' usage while we are at it.

- void asScrollingList();
- void cacheBenchmark();
- void contiguousCacheBenchmark();

were moved to 'tests/benchmarks/corelib/tools/qcontiguouscache'

Task-number: QTQAINFRA-353
Change-Id: Icbdd852f9c14c3df042d2e19abd42af6c645a3cb
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoKeep Multi font engine in QFontCache
Jiang Jiang [Tue, 18 Oct 2011 13:11:07 +0000 (15:11 +0200)]
Keep Multi font engine in QFontCache

If we only keep single QFontEngineFT in QFontCache, then when we
are looking for the MultiQPA next time with the same QFontDef,
the FT engine will be returned and we get no font fallback support.
That's why we need to keep the Multi engines in QFontCache as well
and distinguish them from the single item. Since QPA doesn't use
'screen' field of QFontCache::Key structure, we use it here to
indicate that we are caching a multi font engine.

Change-Id: Id899d5c5ba52f4bccf134bcd6b1c6386ba22063c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
13 years agotests: do not run benchmarks by default in 'make check'
Sergio Ahumada [Sun, 23 Oct 2011 08:28:53 +0000 (10:28 +0200)]
tests: do not run benchmarks by default in 'make check'

`make check' is intended primarily for running functional tests.
For the most part, it does not make sense to run benchmarks in the same
test environment as the functional tests.

Change-Id: I33b2cf1e833fc6b1d0b3525018945148ba2d3492
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoAllow commiting and then reusing a QTouchEventSequence for testing.
Michael Brasser [Mon, 24 Oct 2011 03:13:53 +0000 (13:13 +1000)]
Allow commiting and then reusing a QTouchEventSequence for testing.

This method allows calls to stationary() to automatically remember
the previous position for a given touch point id. Example usage:

QTouchEventSequence sequence = QTest::touchEvent(&window);
sequence.press(0, QPoint(10,10)).commit();
sequence.stationary(0).press(1, QPoint(40,10)).commit();

Task-number: QTBUG-22057
Change-Id: I489ab3d61f4637d2ed97d09ed0854afa814407a1
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
13 years agoRemove legacy Symbian code from qtestlib.
Jason McDonald [Fri, 21 Oct 2011 06:48:12 +0000 (16:48 +1000)]
Remove legacy Symbian code from qtestlib.

Change-Id: Ia4ac52ce0b5f5a4ba1fcd6594daf424fd7208777
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoFix qcolumnview test for shadow builds.
Jason McDonald [Fri, 21 Oct 2011 05:48:07 +0000 (15:48 +1000)]
Fix qcolumnview test for shadow builds.

Change-Id: I4a81d7c8504400d7fb4bb42fb93508ac28cfb990
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoFix qsidebar test for shadow builds.
Jason McDonald [Fri, 21 Oct 2011 05:43:39 +0000 (15:43 +1000)]
Fix qsidebar test for shadow builds.

Change-Id: I3b58a1c81881401edb2a768b2a9995b1e833e90c
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoFix qfilesystemmodel test for shadow builds.
Jason McDonald [Fri, 21 Oct 2011 05:41:32 +0000 (15:41 +1000)]
Fix qfilesystemmodel test for shadow builds.

Change-Id: Ic9d174670f7411561bdfc0881b426a7ff1ab546d
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoFix QFileDialog test for shadow builds.
Jason McDonald [Fri, 21 Oct 2011 05:35:25 +0000 (15:35 +1000)]
Fix QFileDialog test for shadow builds.

Using relative paths in #include is best avoided.

Change-Id: Iacaab7b4c402dfc96f944f21c634afa6e4a2a32a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoMultiline editors not to limit anchor position inputMethodQuery
Pekka Vuorela [Thu, 20 Oct 2011 12:49:26 +0000 (15:49 +0300)]
Multiline editors not to limit anchor position inputMethodQuery

The queries were limited to current block, because that is the
available surrounding text. Input method side, however, cannot then
distinguish between anchor being really at start or end of the
surrounding text, or beyond it. Without the limitation there at least
is a way to know anchor is at unknown territory.

Change-Id: I388d33566388344ec816ea7d86662b7e36a3d7d0
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
13 years agotest: Split `qsqlquery' unit and benchmark test
Sergio Ahumada [Sun, 23 Oct 2011 12:41:31 +0000 (14:41 +0200)]
test: Split `qsqlquery' unit and benchmark test

Moving benchmark test from 'tests/auto' to 'tests/benchmarks'.
Also removing 'qttest_p4' usage while we are at it.

- void benchmark();

was moved to 'tests/benchmarks/sql/kernel/qsqlquery'

Task-number: QTQAINFRA-353
Change-Id: I241bb1a2fba1c1b5524c21e5941a6c5daf5a4a89
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
13 years agoRemove QAccessibleWidgetPrivate inheritance of QAccessible
Frederik Gladhorn [Sat, 22 Oct 2011 20:17:32 +0000 (22:17 +0200)]
Remove QAccessibleWidgetPrivate inheritance of QAccessible

Change-Id: Iaa7455adc5845e6daceb7eaf9384cd5560fb2cd6
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
13 years agoFix compilation with -fno-exceptions
David Faure [Sun, 23 Oct 2011 12:25:28 +0000 (14:25 +0200)]
Fix compilation with -fno-exceptions

Change-Id: I3dbe8be62d2fe94ed6f97fb565a9e417544c58f9
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
13 years agoDeprecate QDesktopServices::storageLocation/displayName
David Faure [Sat, 22 Oct 2011 09:33:06 +0000 (11:33 +0200)]
Deprecate QDesktopServices::storageLocation/displayName

Which required porting the related unittests to qstandardpaths

Change-Id: I6eb63c46845f05cd29cc42b59872707526277c90
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
13 years agoMake some qtestlib headers private.
Jason McDonald [Fri, 21 Oct 2011 01:00:14 +0000 (11:00 +1000)]
Make some qtestlib headers private.

These headers should have been private from Day One.  Make them private
now so that nobody will be tempted to use them outside testlib in the
future.

Change-Id: I5361777ade124d8187176f9af3cc79cd1a8ecb4f
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoRemove "duplicate objective-c class" warning.
Morten Sorvig [Wed, 19 Oct 2011 11:34:11 +0000 (13:34 +0200)]
Remove "duplicate objective-c class" warning.

Qt would dlopen both libqcocoa.dylib and
libqcocoa_debug.dylib, causing duplicate implementations
if the classes in the cocoa plugin (QNSView etc)

Fix this by building the release version only.

Change-Id: I1244a83c49999ce28edd97400e792fa2a0665fec
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
13 years agoCocoa: clean up compiler warnings.
Morten Sorvig [Wed, 19 Oct 2011 12:23:45 +0000 (14:23 +0200)]
Cocoa: clean up compiler warnings.

Change-Id: I2cb65bb455b79b218a317b21e5a3b0d9792e0e22
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
13 years agoAdd the missing unittest
David Faure [Sat, 22 Oct 2011 09:35:37 +0000 (11:35 +0200)]
Add the missing unittest

Change-Id: I2384d9de7b9ef409db521087670070bd5afc85ff
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
13 years agoRename storageLocation() to writableLocation().
David Faure [Fri, 21 Oct 2011 19:10:28 +0000 (21:10 +0200)]
Rename storageLocation() to writableLocation().

Change-Id: I8f6522a70950f78ddd6141360d36d104bd697e28
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
13 years agoAdd QStandardPaths::RuntimeLocation, for sockets ($XDG_RUNTIME_DIR)
David Faure [Fri, 21 Oct 2011 18:57:54 +0000 (20:57 +0200)]
Add QStandardPaths::RuntimeLocation, for sockets ($XDG_RUNTIME_DIR)

Change-Id: I19c36a04a9deae49ffc20fdec6a2a7eb05155cb4
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
13 years agoAdd QStandardPaths::findExecutable.
David Faure [Fri, 21 Oct 2011 18:57:31 +0000 (20:57 +0200)]
Add QStandardPaths::findExecutable.

Change-Id: If30a83622e2ac5af48e47a38b8f70fce73044d74
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
13 years agoCheck QFileInfo::isExecutable for symlinks, works as intended.
David Faure [Fri, 21 Oct 2011 18:55:34 +0000 (20:55 +0200)]
Check QFileInfo::isExecutable for symlinks, works as intended.

Change-Id: I35acce7ba0e111f651864b9d16abf1bac1923f22
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
13 years agoQStandardPaths: add Config and GenericData, add methods
David Faure [Fri, 21 Oct 2011 18:54:35 +0000 (20:54 +0200)]
QStandardPaths: add Config and GenericData, add methods

New methods: standardLocations, locate, locateAll.

Change-Id: I60bc90f8df53727a72c4b1839ea4d1d88a204e29
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
13 years agoMove path information from QDesktopServices (gui) to QStandardPaths (core)
David Faure [Fri, 21 Oct 2011 18:12:01 +0000 (20:12 +0200)]
Move path information from QDesktopServices (gui) to QStandardPaths (core)

Change-Id: Ic596c21894d83b4dab0c3f5b1aed916ddd590f2f
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
13 years agoQWindow: Re-create platform window only if screen actually changes.
Friedemann Kleint [Fri, 21 Oct 2011 13:45:25 +0000 (15:45 +0200)]
QWindow: Re-create platform window only if screen actually changes.

Change-Id: I3b7dd8b1307aa3cc9357dca861ea407644c5a2e9
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
13 years agoAdd virtual QWindow::focusObject() method
Lars Knoll [Fri, 21 Oct 2011 08:59:27 +0000 (10:59 +0200)]
Add virtual QWindow::focusObject() method

The method allows to retrieve the object that currently
has the input focus inside the Window. This is e.g.
required to correctly determine the context for keyboard
shortcuts.

Change-Id: I9e05ef62717973bac275ce34cc70fb86aa2d1e5b
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
13 years agoFix two typos: docu for "deprecated since" and Q_DEPR... -> QT_DEPR...
David Faure [Sat, 22 Oct 2011 11:00:14 +0000 (13:00 +0200)]
Fix two typos: docu for "deprecated since" and Q_DEPR... -> QT_DEPR...

Shows that there should be an automated build with
QT_DISABLE_DEPRECATED_BEFORE set to 0, too...

Change-Id: If154786ea26bcbfab41efcd7001c222cc258a8af
Reviewed-by: Olivier Goffart <ogoffart@kde.org>
13 years agoCompile with clang
Bradley T. Hughes [Fri, 21 Oct 2011 11:59:45 +0000 (13:59 +0200)]
Compile with clang

When using methods from a template base class, the lookup needs to be
qualified. See http://clang.llvm.org/compatibility.html#dep_lookup_bases

Change-Id: I5b7cd71e0d45414ac0eff97fe9ba5d3ccd5bd9e6
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@kde.org>
13 years agoAdd Q_DECL_CONSTEXPR to a QChar, QLatin1Char and QLatin1String constructors
Thiago Macieira [Thu, 7 Jul 2011 16:48:47 +0000 (18:48 +0200)]
Add Q_DECL_CONSTEXPR to a QChar, QLatin1Char and QLatin1String constructors

These types now technically are trivially-constructible and
standard-layout in C++0x.

Change-Id: I455bd905fd6e237a1dff517b86dcbe59d571266f
Reviewed-by: Olivier Goffart <ogoffart@kde.org>
13 years agoMake the default install path point to /usr/local/Qt-$VERSION
Lars Knoll [Thu, 15 Sep 2011 12:41:25 +0000 (14:41 +0200)]
Make the default install path point to /usr/local/Qt-$VERSION

Remove Trolltech from the default install path.

Since QPA is the default now, so we don't need to treat it
specially from regular Qt versions. It is the regular
Qt version.

Change-Id: I0bde75c90d2d5944be192e1249bc1a9371c70fcb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
13 years agoOff-by-one error in assert condition...
João Abecasis [Mon, 22 Aug 2011 09:30:26 +0000 (11:30 +0200)]
Off-by-one error in assert condition...

While this was safe, it was also over-zealous, disallowing the path from
ending with the placeholder... Incidentally, the default.

Laughed-at-by: w00t_
(cherry picked from commit 7b693627ee2a17718cb6d8bee5e3deb5a97b307f)

Change-Id: I61a1511bca5cafe2edde20ef38c23154200dfcab
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
13 years agoLeftovers from 401722ef9e6fe79bd41f9d5f79668f5c4997c8e6
João Abecasis [Thu, 18 Aug 2011 09:08:26 +0000 (11:08 +0200)]
Leftovers from 401722ef9e6fe79bd41f9d5f79668f5c4997c8e6

This no longer necessary template specialization went unnoticed inside
the Windows/Symbian #ifdef. It breaks compilation on those platforms,
now that qstringbuilder.h is not included and QConcatenable is unknown
to the compiler.
(cherry picked from commit 9e656ce0f7bda4bca4ae55a7aefe1617bc2805ac)

Change-Id: Ie7145c25bca01b808fa6a3fd99e34baa8375d304
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
13 years agoFix QTemporaryFile regressions and new found issues
João Abecasis [Tue, 16 Aug 2011 15:53:41 +0000 (17:53 +0200)]
Fix QTemporaryFile regressions and new found issues

With this change, the file template is always processed in original
QString format. Trying to generate native paths before adding a missing
placeholder mask could change the meaning of templates, such as "." and
"..", which are now tested to mean "..XXXXXX" and "...XXXXXX",
respectively.

After ensuring the template includes a placeholder mask, the path is
converted to a native *absolute* file path and the mask is sought for
again. On Windows, native paths were already absolute. On Symbian, we'd
need at least a clean path, as "." and ",," are not natively understood.

There is a requirement that the placeholder mask /XXXXXX+/ makes it
through this conversion unaltered, which relaxes prior requirements on
*nix platforms. On Windows and Symbian the conversion is under Qt's
control and not user-configurable.

Reviewed-by: Shane Kearns
(cherry picked from commit 401722ef9e6fe79bd41f9d5f79668f5c4997c8e6)

Conflicts:

tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp

Change-Id: Iac823881c865adf0931dc4f429c6c1ef135eeb56
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
13 years agoUse "native paths" on POSIX platforms as well
João Abecasis [Fri, 5 Aug 2011 08:49:44 +0000 (10:49 +0200)]
Use "native paths" on POSIX platforms as well

And don't rely solely on "local8Bit" conversions.

QFile defines an API for overriding how encoding conversions are done
for filenames. In generating unique names, QTemporaryFile ignored that
API and hardcoded the use of local 8-bit, implicitly assuming that that
was appropriate.

With this change, we switch that assumption to one where user supplied
encoding function keeps the byte value of 'X' and '/', also assuming
that encoded 'X' takes up a single-byte (i.e., the byte sequence for
"XXXXXX" remains unchanged).

There was also, and there still is an assumption in name generation that
byte values for ASCII alpha-numeric characters are valid in the "native"
encoding.

In practice this change is compatible with UTF-8, Latin-1 and other
ISO/IEC 8859 encodings. At any rate, it's very likely that only UTF-8 is
relevant here.

Reviewed-by: Denis Dzyubenko
(cherry picked from commit 0de701d01cb221464eed773fd3751aff73fe4d60)

Change-Id: I9ee0fe8e3cad48694d5ec9a2bedd5412cfc0d172
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>