profile/ivi/qtbase.git
12 years agoQEasingCurve: return QVector for cubic spline representation
Marc Mutz [Wed, 15 Feb 2012 17:55:25 +0000 (18:55 +0100)]
QEasingCurve: return QVector for cubic spline representation

QEasingCurve internally holds the spline data in a
QVector<QPointF>. For the return from cubicBezierSpline(),
the vector is transformed into a QList<QPointF>.

This involves copying, and into an inefficient (for QPointF
payloads) container at that, so deprecate cubicBezierSpline()
in favour of a new toCubicSpline() returning the QVector
directly.

Change-Id: Ie4827fe7c6e289ad97a0b09772e47298779c76ca
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoTrivial doc fix
Richard Moore [Sat, 18 Feb 2012 10:57:42 +0000 (10:57 +0000)]
Trivial doc fix

Change-Id: I9b63e0b63f225b245eec68ea4211cb0f2ccf9bb5
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
12 years agoDocument Q_PROCESSOR_* macros
Bradley T. Hughes [Fri, 17 Feb 2012 08:41:35 +0000 (09:41 +0100)]
Document Q_PROCESSOR_* macros

All known processors and their variants/revisions are documented. I
added Q_PROCESSOR_MIPS_V based on the MIPS64 online documentation, which
documents MIPS64 as a superset of MIPS IV and MIPS V.

Change-Id: Ie2796d4f03499283aa2c96d60f5e37bd74a36ab0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoFix qclipboard autotest on Windows.
Friedemann Kleint [Wed, 15 Feb 2012 11:34:04 +0000 (12:34 +0100)]
Fix qclipboard autotest on Windows.

Emit changed signal only if the clipboard is not owned,
in which case QClipboard does it.

Task-number: QTBUG-24184
Change-Id: I27420583a718a5f8cd93b9d361b1e422a75df300
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoFix error handling in QHostInfo windows backend
Shane Kearns [Fri, 17 Feb 2012 15:14:01 +0000 (15:14 +0000)]
Fix error handling in QHostInfo windows backend

If the DNS server returns a non authoritative host not found response,
then windows returns WSATRY_AGAIN error code.
This is now reported as HostNotFound and not UnknownError

Change-Id: I212985acd4e85ff4b2bdb6c57ec403405a7695fb
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
12 years agoWindows: Fix QWindow-test.
Friedemann Kleint [Fri, 17 Feb 2012 15:08:17 +0000 (16:08 +0100)]
Windows: Fix QWindow-test.

- Save & Restore style and geometry when switching to
  full screen and back since it is not a real state on
  Windows.
- Obey the positioning policy in setGeometry.

Task-number: QTBUG-24185

Change-Id: I18dea4fd372e0b2e46273a7a27e0c6f4f4bde771
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoqnamespace.qdoc: Add doco for new values of Qt::MouseButton
Rick Stockton [Tue, 14 Feb 2012 16:52:09 +0000 (08:52 -0800)]
qnamespace.qdoc: Add doco for new values of Qt::MouseButton

QtTBUG-22642 added about 25 new values for the Qt::MouseButton Enum.
This change adds documentation for the new values. Note that the
special value 'Qt::AllButtons' is documented at the top (next to
the other special value, 'Qt::NoButton'.) The new internal value
'Qt::MaxMouseButton' is listed as a \omitvalue.

Task Number: QTBUG-22642

Change-Id: Iaec623754156fff8a2c73e357fef82e1fe36354b
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoOnly define QT_NAMESPACE if it is used.
Stephen Kelly [Wed, 15 Feb 2012 21:12:41 +0000 (22:12 +0100)]
Only define QT_NAMESPACE if it is used.

Fixes non-namespaced builds.

Change-Id: I0ec3c29f58042313dfa864f15c2b2d47914cdedb
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoEnsure that Qt public headers compile with strict flags
David Faure [Fri, 17 Feb 2012 08:05:39 +0000 (09:05 +0100)]
Ensure that Qt public headers compile with strict flags

Those from
http://wiki.qt-project.org/Coding_Conventions#Conventions_for_public_header_files
(unfortunatey -Wold-style-cast cannot be used due to the glibc macro bswap_16)
and many Qt defines that disable casts.

Change-Id: I97ac707a101df9819e8c031fa75a31b30e20247f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoQProcess documentation typo fix and improvement.
Rafael Roquetto [Fri, 17 Feb 2012 11:17:30 +0000 (12:17 +0100)]
QProcess documentation typo fix and improvement.

The word 'momentaneously' does not exist.

Change-Id: I3d2201d5b7b3a01af5989bb1c3fcd55110d5482c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Till Adam <till@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoMention QT_NO_STL in the QString documentation
Simon A. Eugster [Tue, 14 Feb 2012 18:04:11 +0000 (19:04 +0100)]
Mention QT_NO_STL in the QString documentation

Defining QT_NO_STL disables STL functions (toStdString() etc.) too.

Change-Id: Id5c8e12d933af6af63ee7f80fa2d5d7577cd689a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoNo need to stat with QFile::exists before QFile::open, for reading.
David Faure [Fri, 17 Feb 2012 13:16:55 +0000 (14:16 +0100)]
No need to stat with QFile::exists before QFile::open, for reading.

Change-Id: I14ca7f8a377bca39004defc96d69d62c151181f5
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Jeremy Katz <jeremy.katz@nokia.com>
12 years agoRemove unnecessary locking from QNetworkProxy constructor
Shane Kearns [Thu, 16 Feb 2012 17:02:11 +0000 (17:02 +0000)]
Remove unnecessary locking from QNetworkProxy constructor

QGlobalNetworkProxy (a singleton) had two phase construction, with
the second phase being called from QNetworkProxy's constructor.
This isn't necessary, and has been reported as causing deadlocks.

Although constructing socket engine handlers has side effects
(they add themselves to a list on construction and remove themselves
on destruction), this appears to be safe. The socket engine handlers
are only used while holding the list mutex, and any socket engines
created don't have any reference to the factory that created them.

With the new version, it is possible that two instances of
QHttpSocketEngineHandler and QSocks5SocketEngineHandler exist
temporarily if a Q_GLOBAL_STATIC initialisation race occurs.
This appears safe, because the loser of the race deletes its
handlers, which remove themselves from the global list as above.

Task-number: QTBUG-13088
Change-Id: I8cf520da717d8ab7d862ab89c6de13aea6d60ac3
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFix warnings about missing file.
Friedemann Kleint [Fri, 17 Feb 2012 10:59:48 +0000 (11:59 +0100)]
Fix warnings about missing file.

Change-Id: I8644d2b80bab9c18f666d742da389e84bf3f124c
Reviewed-by: Xizhi Zhu <xizhi.zhu@nokia.com>
12 years agoFix handling of urls containing username/password in QNetworkAccessManager
Shane Kearns [Wed, 15 Feb 2012 17:24:14 +0000 (17:24 +0000)]
Fix handling of urls containing username/password in QNetworkAccessManager

QNetworkAccessManager was ignoring the supplied credentials, although
webkit seems to support these urls at a higher level.

Following the behaviour of browsers:
We use supplied credentials if authentication is required.
We add supplied credentials to the authentication cache.
We emit authenticationRequired signal if the credentials were wrong.
We do not use previously cached credentials for that url

Synchronous http requests fail, if the credentials were wrong.

Task-number: QTBUG-18107
Change-Id: If46e8eab1511ba8a0f4bbe0d4efaabc4df0b8ab4
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFix incorrect use of QObject::disconnect in synchronous http request
Shane Kearns [Wed, 15 Feb 2012 17:58:11 +0000 (17:58 +0000)]
Fix incorrect use of QObject::disconnect in synchronous http request

In certain circumstances, this could cause the request to time out
(and repeatedly send bad authentication credentials to the server)
instead of failing with AuthenticationRequiredError.

Change-Id: Iff66b32f1d7268f21fd77b6620aae4b5d49d857f
Reviewed-by: Richard J. Moore <rich@kde.org>
12 years agoUpdate documentation to show NTLMv2 is supported
Shane Kearns [Wed, 15 Feb 2012 15:34:09 +0000 (15:34 +0000)]
Update documentation to show NTLMv2 is supported

This feature was implemented in 4.8, but documentation was not
updated at the time.

Task-number: QTBUG-18181
Change-Id: I657d7ab7aaf43b73b7bf8fd1cb76086522cf5c2b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoQSize/QSizeF: add const versions of scale()/transpose()
Marc Mutz [Thu, 16 Feb 2012 15:38:52 +0000 (16:38 +0100)]
QSize/QSizeF: add const versions of scale()/transpose()

Non-mutating functions can (potentially) be constexpr.
On top of that, they often make for more readable code.

Change-Id: I3547327cf5a7162737353a864a1025d0d02ccc2f
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Reviewed-by: David Faure <faure@kde.org>
12 years agoMake 'nmake check' succeed for widgets tests
Miikka Heikkinen [Thu, 16 Feb 2012 11:36:27 +0000 (13:36 +0200)]
Make 'nmake check' succeed for widgets tests

Marked a bunch of tests insignificant, and skipped one crashing test
case in QApplication test, as that couldn't be made to pass simply by
marking the test insignificant.

Once the underlying issues are fixed, the tests need to be re-enabled.

Task-number: QTBUG-24203
Change-Id: I9aea4fa207d307793445efdcaead72219fbf6c4f
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoFix another typo in the evdev keyboard plugin.
Friedemann Kleint [Fri, 17 Feb 2012 12:59:20 +0000 (13:59 +0100)]
Fix another typo in the evdev keyboard plugin.

Amend 3296b7327bd84f420df7e5561d192c0a8d0bb409

Change-Id: Ide58a6b8cbd980eda6ff91948c8f4fb45a30e527
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoWidgets: Remove obsolete QGuiPlatformPlugin.
Friedemann Kleint [Tue, 14 Feb 2012 15:46:31 +0000 (16:46 +0100)]
Widgets: Remove obsolete QGuiPlatformPlugin.

It has been superseeded by QPlatformTheme.

Task-number: QTBUG-24204
Change-Id: I8c4131c7bfd8201e747984d772ed8042610192b8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoDisable 'check' target generation for network autotests for Windows.
Miikka Heikkinen [Fri, 17 Feb 2012 10:28:50 +0000 (12:28 +0200)]
Disable 'check' target generation for network autotests for Windows.

A number of network autotests are unstable in Windows, so don't
generate check target for them as is done for mac.

Once the tests are acceptably stable, this needs to be reverted.

Change-Id: I18262e28ce40eba541aecf3cfb651bff34698ead
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoFix "check" target when load(testcase) is used in .pro file.
Miikka Heikkinen [Fri, 17 Feb 2012 08:48:22 +0000 (10:48 +0200)]
Fix "check" target when load(testcase) is used in .pro file.

The "check" target always depended on debug-check on projects that
explicitly loaded the testcase.prf, even if Qt was configured with
-release parameter. This obviously caused build failure. Changed the
testcase.prf to check which configuration is preferred using
CONFIG(debug, debug|release) like is done with similar cases in other
.prf files.

Task-number: QTBUG-24332
Change-Id: Ib5140b106e99efe51932bdd5a48914786de23230
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoQt 5 plugin system: Fix handling of namespaced plugin classes.
Friedemann Kleint [Fri, 17 Feb 2012 10:01:26 +0000 (11:01 +0100)]
Qt 5 plugin system: Fix handling of namespaced plugin classes.

- Add 'using namespace' to moc code as was the case in 4.8.

Change-Id: I26cba9ad74bf05eecc5205714c32c3176695e3b4
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoClean up default arch setting on Mac OS X
Bradley T. Hughes [Wed, 15 Feb 2012 12:49:55 +0000 (13:49 +0100)]
Clean up default arch setting on Mac OS X

Remove config.tests/mac/defaultarch.test, but do the same type of
default arch detection, only using the qmake binary instead of compiling
an empty file. Qt 5 will only support 10.6 and up, which means we
only support i386 and x86_64 now.

Change-Id: I24949ac803b965c523b1ee45cf769e266dcde134
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoFortune client example - list all IP addresses
Shane Kearns [Wed, 15 Feb 2012 20:12:15 +0000 (20:12 +0000)]
Fortune client example - list all IP addresses

The first IP address on the machine might not be a usable one.
Changed the QLineEdit to a QComboBox, and populated it with
all IP addresses of the machine, along with the machine names
if they are configured.

Task-number: QTBUG-13121
Change-Id: I7c443f5ce6efb0d0b525c5abad1671d3dcbba33c
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoFixed API in QWindow: visible() -> isVisible().
Samuel Rødal [Fri, 17 Feb 2012 09:19:35 +0000 (10:19 +0100)]
Fixed API in QWindow: visible() -> isVisible().

Change-Id: I14706abb8441c153f738563cb1a46205fdb2dae6
QWindow::visible() did not follow the API guidelines.
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoQStandardPaths implementation configured using JSON
Jeremy Katz [Wed, 15 Feb 2012 17:49:31 +0000 (18:49 +0100)]
QStandardPaths implementation configured using JSON

The default JSON file is /etc/user-dirs.json, but may be
overridden by setting PATH_CONFIG_HOME to the file to be used.

This provides functionality similar to the XDG based QStandardPaths,
but uses a JSON file to define paths, rather than the XDG A=B
format. Values other than HomeLocation and TempLocation may be
specified by removing the "Location" postfix, converting to upper
case, and separating words with _. Values are independent. For example,
CacheLocation does not depend on GenericCacheLocation.

Variables specified as ${[^{]*} will be replaced with environment
variables.

Change-Id: I374f5e6bae498dbfa9cb4ecadf915b05fb91fc34
Reviewed-by: David Faure <faure@kde.org>
12 years agoWindows: Fix compilation with -qtnamespace
Kai Koehne [Fri, 17 Feb 2012 09:10:27 +0000 (10:10 +0100)]
Windows: Fix compilation with -qtnamespace

Change-Id: I00ba88887100b699d620875d868f8a769259a768
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoExpect failure in tst_QStyleSheetStyle::hoverColors()
Bradley T. Hughes [Thu, 16 Feb 2012 13:18:10 +0000 (14:18 +0100)]
Expect failure in tst_QStyleSheetStyle::hoverColors()

This is similar to the focusColors() failures in QTBUG-23686.

Task-number: QTBUG-23686
Change-Id: I1f01a4e41e61a7a664309be34cfa4fe916a92b15
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoSkip tst_QGuiApplication::focusObject() on Mac OS X
Bradley T. Hughes [Thu, 16 Feb 2012 08:40:02 +0000 (09:40 +0100)]
Skip tst_QGuiApplication::focusObject() on Mac OS X

This test fails intermittently, and at random locations.

Task-number: QTBUG-24322
Change-Id: Ied6dd4d1593066debc0fb48c6ca2a17a1f4d51b7
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoSkip all tst_QFontDialog tests on Mac OS X
Bradley T. Hughes [Thu, 16 Feb 2012 08:35:53 +0000 (09:35 +0100)]
Skip all tst_QFontDialog tests on Mac OS X

All of these tests currently hang.

Task-number: QTBUG-24321
Change-Id: I7664b57f6539d4c03008701da66e193019a4440a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoSkip hanging tst_QColorDialog test, expect failing test on Mac OS X
Bradley T. Hughes [Thu, 16 Feb 2012 08:31:59 +0000 (09:31 +0100)]
Skip hanging tst_QColorDialog test, expect failing test on Mac OS X

tst_QColorDialog::native_activeModalWidget() hangs, so skip this test.
tst_QColorDialog::task247349_alpha() fails, so XFAIL this failure.

Task-number: QTBUG-24320
Change-Id: Ie4d69e07063e9a648ec4fa3337274143a52ea3e3
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoSkip hanging/failing tst_QApplication tests on Mac OS X
Bradley T. Hughes [Thu, 16 Feb 2012 08:22:39 +0000 (09:22 +0100)]
Skip hanging/failing tst_QApplication tests on Mac OS X

The first block of tst_QApplication::quitOnLastWindowClosed() hangs
on Mac OS X, so skip that block for now.

tst_QApplication::testDeleteLAter() both hangs and fails on Mac OS X,
so skip the test and XFAIL the failure.

Task-number: QTBUG-24318
Task-number: QTBUG-24319
Change-Id: Ice11292d84e63215f1bb9e03f3ef369943d1d887
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoRemove unused config.tests from config.tests/mac/*
Bradley T. Hughes [Wed, 15 Feb 2012 11:51:15 +0000 (12:51 +0100)]
Remove unused config.tests from config.tests/mac/*

The xarch.test and crc.test are not run by configure, so remove them
along with the related CFG_MACH_XARCH and QT_NAMESPACE_MAC_CRC configure
variables.

The kEventClassQt variable in qt_mac_p.h is also unused now, so remove
it as well.

Change-Id: I596ab9b493ce3164b6a4d40e8942479efc91b60d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoExpect tst_QSettings::ctor(native) failures on Mac OS X
Bradley T. Hughes [Tue, 14 Feb 2012 07:46:22 +0000 (08:46 +0100)]
Expect tst_QSettings::ctor(native) failures on Mac OS X

The default constructor for QSettings does not set NoAccess status, even
if the organization domain, organization name, and application name are
empty. Instead of trying to fix QSettings, keep the existing behavior,
and test for it.

Failures from tst_QSettings no longer need to be ignored, so
mac:CONFIG+=insignificant_test has been removed from the .pro file.

Task-number: QTBUG-22745
Change-Id: Ic9f8b6821c483c217e1ef2ece704be2da169e340
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoAdd palette() and further hints to QtGui/QPlatformTheme.
Friedemann Kleint [Fri, 10 Feb 2012 16:17:36 +0000 (17:17 +0100)]
Add palette() and further hints to QtGui/QPlatformTheme.

- Move palette() from deprecated QtWidgets/QGuiPlatformPlugin
  to  QtGui/QPlatformTheme, Make it return a const * since
  QPalette does not have isNull().
- Initialize QGuiApplication::palette() and
  QApplication::systemPalette() from it.
- Do not initialize QPalette from QGuiApplication::palette()
  unless app_pal is non-null (default to Qt::black if it is 0).
  This avoids initialization order crashes/recursions in the
  QPA plugin. Streamline initialization function.
- Remove styleName(), systemIconThemeName() and iconSearchPaths()
  from QGuiPlatformPlugin and re-add them as
  QPlatformTheme::themeHint().
- Remove styleHint() from QGuiPlatformPlugin, add it to
  QPlatformTheme::themeHint().
- Add UNIX themes with factory function (Generic,
  KDE, Gnome), taking it from Qt 4.8 code (stripping the
  KDE 3 code).
- Implement Windows palettes.

Task-number: QTBUG-24204

Change-Id: Ie27ec035df4f84c42deaffc4816b2e53ce705462
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoPlugin loader: Output offending plugin name in warning.
Friedemann Kleint [Fri, 17 Feb 2012 07:48:05 +0000 (08:48 +0100)]
Plugin loader: Output offending plugin name in warning.

Change-Id: I0aba0cf04f703b893459af55263685c5548a92f9
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoConvert jpeg plugin to new format
Lars Knoll [Fri, 10 Feb 2012 09:57:48 +0000 (10:57 +0100)]
Convert jpeg plugin to new format

Change-Id: Icadeb366c39a71dac948904197464f7e0b4272b8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoConvert ico plugin to new format.
Lars Knoll [Fri, 10 Feb 2012 09:54:01 +0000 (10:54 +0100)]
Convert ico plugin to new format.

Change-Id: Ib0fb7bb9f853e39cd62b693bb5b43ae15f750d84
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoConvert GIF plugin to the new format
Lars Knoll [Thu, 9 Feb 2012 20:34:26 +0000 (21:34 +0100)]
Convert GIF plugin to the new format

Change-Id: I3adf1d2402a07213cb4cb5193c465bd820919bd1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoEnables QProcess back on QNX.
Rafael Roquetto [Wed, 15 Feb 2012 15:52:43 +0000 (16:52 +0100)]
Enables QProcess back on QNX.

Because fork()/vfork() on QNX are not supported on multithreaded applications,
QProcess had been disabled on this platform. The corresponding code has now
been replaced with functions that wrap around spawn().

Change-Id: I46091b7d41f322a5cad07d17893aa929c84941ef
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoStatic plugins don't break QFactoryLoader::keys()
Lincoln Ramsay [Fri, 17 Feb 2012 06:31:06 +0000 (16:31 +1000)]
Static plugins don't break QFactoryLoader::keys()

The = means that a single, static, compat plugin replaces the list of
keys (eg. from previously checked static plugins or from dynamic plugins).

Using += prevents this undesirable behaviour.

Change-Id: I3a40752c08dddbfe81444ca9c782b633e9742ab9
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoChanged qnetworkreply unittest to work from install directory
Kurt Korbatits [Tue, 14 Feb 2012 01:46:03 +0000 (11:46 +1000)]
Changed qnetworkreply unittest to work from install directory

- made subdir test depend on echo
- remove SRCDIR and changed to use TESTDATA and QFINDTESTDATA
- added waitForFinish() to handle slow networks
- removed core module header from echo subprogram and replaced
  with needed header only
- Added ipv6 skip to connectToIPV6Address() if not available
- Added check QT_BUILD_INTERNAL and skip tests if backend
  not available
- Skip permission tests if run as root
- Removed win32 debug and release directory locations so that
  application is in known location relative to test data

Change-Id: I58c3c2fca3cd2fee72fdb81d016bb4fd7fe08ac2
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoRemoved rfc3252.txt from networkselftest unittest
Kurt Korbatits [Wed, 15 Feb 2012 23:32:06 +0000 (09:32 +1000)]
Removed rfc3252.txt from networkselftest unittest

- no longer needed after test that used it was removed

Change-Id: I63fc8a9db07f9250507becb9bf6c2aefe0fdc254
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoFix naming of plugins for QPA plugins and use new plugin system.
Friedemann Kleint [Thu, 16 Feb 2012 14:30:37 +0000 (15:30 +0100)]
Fix naming of plugins for QPA plugins and use new plugin system.

- Fix naming "com.nokia" -> "org.qt-project" in platform
  integration & platform theme.
- Adapt Windows, XCB, Cocoa, Minimal.

Change-Id: I7834f5c3d94473b6f06c1bffee074a70ee25f426
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoRemove usages of QT_ARCH and QT_ARCH_* from qtbase
Bradley T. Hughes [Fri, 10 Feb 2012 14:50:47 +0000 (15:50 +0100)]
Remove usages of QT_ARCH and QT_ARCH_* from qtbase

The architecture is detected at compile time based on the predefined
macros from the compiler. Don't use QT_ARCH in .pro, .pri, or .prf
files.  The PNG_NO_ASSEMBLER_CODE define from libpng.pri is not present
in the current copy of src/3rdparty/libpng, so no change in
functionality is expected.

The conditional for the SUPPORT_JIT define in pcre.pri is moved to
src/3rdparty/pcre/config.h, again so that we can use the compiler's
predefined macros to detect the architecture at compile time.

Replace QT_ARCH_ARM, QT_ARCH_MIPS, and QT_ARCH_SPARC with their
Q_PROCESSOR_* equivalents.

Replace QT_ARCH_INTEGRITY, QT_ARCH_VXWORKS, and QT_ARCH_WINDOWSCE with
their Q_OS_* equivalents.

Note that this commit also effectively disables the SPARC atomic
implementation. An inline implementation for SPARC needs to be added,
or we remove the current code and instead rely on the GCC intrinsic or
C++11 std::atomic support on SPARC.

Note also that this commit does not remove QT_ARCH from configure or
qconfig.h. This will continue to be set until all Qt 5 projects can be
moved away from using QT_ARCH.

Change-Id: I5de747cc4436d21941329974cff3016970f497b8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoSome small doc fixes, typos and removal of one incorrect paragraph
Andy Shaw [Fri, 3 Feb 2012 22:53:31 +0000 (23:53 +0100)]
Some small doc fixes, typos and removal of one incorrect paragraph

The QTextStream paragraph that is removed referred to something that is
incorrect.  This was confirmed for Windows, Linux and Mac.

Change-Id: Ibac8f82482f2060308b5b8485d6da228bdf52fe6
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
(cherry picked from commit 80cebfde10cf34dcc0777c24f1b3ff37cad20181)

12 years agoDon't render glyph with FT with fetchMetricsOnly
Jiang Jiang [Wed, 15 Feb 2012 13:41:07 +0000 (14:41 +0100)]
Don't render glyph with FT with fetchMetricsOnly

Neither rendering with outline nor fetchMetricsOnly requires the
rendering from FreeType so we don't need to render them or cache
it. It should speed up recalcAdvances() quite a lot.

Change-Id: I0f623cb4f79da2edf6e9c9634a2f22fb0c66823c
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoEnsure that QSqlDatabase::database() is still thread-safe
Andy Shaw [Thu, 10 Nov 2011 06:56:57 +0000 (07:56 +0100)]
Ensure that QSqlDatabase::database() is still thread-safe

QSqlDatabase::database() is documented to be thread-safe and when the
driver is queried for the numericalPrecisionPolicy set then it can
comprimise the thread-safety.

Since the driver itself (if one is set) will be queried for the
numericalPrecisionPolicy when numericalPrecisionPolicy() is called on
the QSqlDatabase then we can have it fallback to the default instead
rather than taking the driver's own setting.

Task-number: QTBUG-13423
(cherry picked from commit e7e9fca6c0cd1d0869029fc6e9d7605234ee5bb2)
Change-Id: Ie7e9fca6c0cd1d0869029fc6e9d7605234ee5bb2
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agoEnsure the header's context menu is in sync with the visible sections
Andy Shaw [Fri, 3 Feb 2012 23:45:33 +0000 (00:45 +0100)]
Ensure the header's context menu is in sync with the visible sections

When the filedialog was reshown the context menu for the header was not
in sync with the sections that were actually visible.  This ensures that
it is in sync after the state of the header is restored.

Task-number: QTBUG-23271

Change-Id: Ia1546bf300d43a5822482f63de99eb52b674bf52
Reviewed-by: Zeno Albisser <zeno.albisser@nokia.com>
(cherry picked from commit 2e220e4603d6a0c21efee3a884be76e9f2d7ebb7)

12 years agoUse ctest to run all tests and print output.
Stephen Kelly [Wed, 15 Feb 2012 22:19:19 +0000 (23:19 +0100)]
Use ctest to run all tests and print output.

Change-Id: Ib5a8513cc2d08adce49602b2590059b918b1ffda
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoOnly define QT_NAMESPACE if it is used.
Stephen Kelly [Wed, 15 Feb 2012 21:12:41 +0000 (22:12 +0100)]
Only define QT_NAMESPACE if it is used.

Fixes non-namespaced builds.

Change-Id: Ie743fc57e7f208fdd50c61b08dc8a4b150de3930
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoCompilation fix: missing includes for geteuid()
Marc Mutz [Thu, 16 Feb 2012 13:37:04 +0000 (14:37 +0100)]
Compilation fix: missing includes for geteuid()

Change-Id: I054b8c9a398b5e192c2e005a39cba19bb4930966
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years ago[QTBUG-22847] Compile with C++11 compiler
Marc Mutz [Thu, 16 Feb 2012 06:40:20 +0000 (07:40 +0100)]
[QTBUG-22847] Compile with C++11 compiler

C++11 supports user-defined string literals, which makes
the C++98-accepted literal string concatenation sequence
  "foo"MACRO
illegal under C++11.

The solution is to add whitespace between the string
literal and the macro. For symmetry, this patch adds it
on both sides.

Change-Id: Ie0c698f610986c4d1b12dc2083489043b696936d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoxcb: avoid use of statically-sized QList
Marc Mutz [Thu, 16 Feb 2012 13:39:51 +0000 (14:39 +0100)]
xcb: avoid use of statically-sized QList

Change the use of QList<QPair<>> to a simple C array of xcb_keycode_t*s.
This is possible since the number of elements in the container is
statically known.

I have not measured speedup; this is just preventing premature pessimisation.

Change-Id: I8855fc8a4e7ee840d8b7497ec4166074da7d8ea8
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoMake sure to print short text for QSslCertifictaeExtension.
Casper van Donderen [Thu, 16 Feb 2012 15:41:38 +0000 (16:41 +0100)]
Make sure to print short text for QSslCertifictaeExtension.

Change-Id: If2471bea27f095352ae8c28604e104b896fd97c7
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFix qlogging test for release configuration
Miikka Heikkinen [Thu, 16 Feb 2012 12:20:57 +0000 (14:20 +0200)]
Fix qlogging test for release configuration

The helper process 'app' wasn't built in release configuration.

Also improved finding the helper executable to utilize
QFINDTESTDATA and print out a proper errors if it could not be
found or started.

Note that adding ".exe" to process name in Windows is unnecessary
as QProcess already does that for you, so removed the ifdeffing.

Task-number: QTBUG-24330
Change-Id: Ibe75e0ecd24181ab623d0a60f17ecaf92052b0dd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoQWindow-test: Fix QSignalSpy warning about Qt::ScreenOrientation.
Friedemann Kleint [Thu, 16 Feb 2012 11:50:22 +0000 (12:50 +0100)]
QWindow-test: Fix QSignalSpy warning about Qt::ScreenOrientation.

Change-Id: I5954445057c1a597b5062ee8e472d684832812e5
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoQMimeData: export URLs as text too
David Faure [Sat, 11 Feb 2012 01:13:22 +0000 (02:13 +0100)]
QMimeData: export URLs as text too

This allows to drop or paste them into lineedits and text widgets
(including such widgets in non-Qt applications)

Implementation note: this is done on-demand rather than in setUrls
so that it's still possible to setText explicitely; the new code
is only a fallback for when no text/plain data is available.

Change-Id: Ie90c43a30bfa64a6047b627e7351d20bf5ec8e03
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoRemove historical +1 from font height calculation
Eskil Abrahamsen Blomfeldt [Fri, 3 Feb 2012 13:28:16 +0000 (14:28 +0100)]
Remove historical +1 from font height calculation

Historically, we've calculated font height as ascent+descent+1.
In Qt 4, a patch was added to work around this by subtracting
1 from the descent of the font engines. We now remove the +1 and
the work arounds.

Change-Id: I7e25d49b97ac892015d3328f32d70eb9a7c2d88f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoAvoid loading and keeping unused fallback font engines
Eskil Abrahamsen Blomfeldt [Wed, 15 Feb 2012 14:06:00 +0000 (15:06 +0100)]
Avoid loading and keeping unused fallback font engines

When we request glyphs from fallback fonts, we would potentially
load all fonts on the system into memory. This is especially true
for glyphs that are not supported by any font (or by the last in
the list) in any "Common" script (which e.g. includes CJK).

This would make any application which tried to display unsupported
glyphs use huge amounts of memory for keeping unused fonts cached,
only limited by the number of fonts on the system.

The patch contains two solutions: First, before loading the font,
the multi font engine will be asked whether it needs to be tried
for the given character. By default, this will always be true, so
all fonts will be tried, but with the new font config multi engine
in the platform plugin, it will ask FontConfig whether the font
contains a glyph for the character.

Should the font be loaded and still fail to resolve the character
(which could be the case for other platforms), we will simply
delete it again immediately instead keeping it cached.

Change-Id: I92dfb39289a359f49caa02c2caf8baf66098fb59
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoBase active window handling on WM_SET/KILLFOCUS.
Friedemann Kleint [Thu, 16 Feb 2012 11:24:32 +0000 (12:24 +0100)]
Base active window handling on WM_SET/KILLFOCUS.

Make it work for child windows, fixing the isActive()
test of QWindow.

Task-number: QTBUG-24185
Change-Id: I75597c2d322969f7e109d76e30b9b1f4b66c6e1e
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoFix QWindowsClipboard crash when mimeData is NULL.
Miikka Heikkinen [Thu, 16 Feb 2012 10:27:46 +0000 (12:27 +0200)]
Fix QWindowsClipboard crash when mimeData is NULL.

When setting NULL mimeData in QWindowsClipboard::setMimeData, and the
OleSetClipboard call failed, the warning print crashed because it
tried to access mimeData.

Task-number: QTBUG-24327
Change-Id: I1f56fd28c9191a330e14a93b4b11ac9c89db6985
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoQDebug: Add support for %{pid}, %{appname} and %{threadid}
David Faure [Sun, 12 Feb 2012 00:39:47 +0000 (01:39 +0100)]
QDebug: Add support for %{pid}, %{appname} and %{threadid}

Change-Id: I4add0a374e6524b615c6dc0ecfb010a90075b04f
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFix tst_QFileSystemWatcher failure on Mac OS X
Bradley T. Hughes [Tue, 14 Feb 2012 06:03:18 +0000 (07:03 +0100)]
Fix tst_QFileSystemWatcher failure on Mac OS X

The watchFileAndItsDirectory() test would fail due to atime updates for
the first watched file coming up to 2 seconds after the file was closed.
Observation shows that the atime has a 2 second resolution on Mac OS X
using HFS+, so add an appropriate delay to make sure that the atime
update from the kqueue based file system watcher can dispatch all
updates.

Task-number: QTBUG-22744
Change-Id: Ie79af20d6b4c154021307c8a8f6d336369720337
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agotestlib: Skip test function if init() fails.
Jason McDonald [Thu, 16 Feb 2012 06:00:41 +0000 (16:00 +1000)]
testlib: Skip test function if init() fails.

Prior to this commit, the following statement in the qtestlib
documentation was untrue: "If init() fails, the following testfunction
will not be executed, the test will proceed to the next testfunction."
If init() called QSKIP, the test function would be skipped, but if
init() reported a failure, the test function would still be executed
(even though doing so could be unsafe).

This commit makes testlib skip a test function if init() reports a
failure and enhances the selftests to cover skips and fails in both
init() and cleanup().

Task-number: QTBUG-20371
Change-Id: Id1cc8464ae0b8c257ae1b74dbe9189a501f5366b
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoChanged qsslkey to work from installation directory
Kurt Korbatits [Wed, 15 Feb 2012 22:25:31 +0000 (08:25 +1000)]
Changed qsslkey to work from installation directory

- Changed to use TESTDATA and QFINDTESTDATA instead of SRCDIR

Change-Id: I30bf175c2c9044e1f8556260a032467ca0dfc09f
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoChanged qsslcertificate unittest to work from install directory
Kurt Korbatits [Wed, 15 Feb 2012 22:13:13 +0000 (08:13 +1000)]
Changed qsslcertificate unittest to work from install directory

- Changed to use TESTDATA and QFINDTESTDATA instead of SRCDIR

Change-Id: I1957ef287ba2f337b5e0b2c6245d872eacb6316f
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoChanged qcryptographichash unittest to work from installation directory
Kurt Korbatits [Wed, 15 Feb 2012 04:30:16 +0000 (14:30 +1000)]
Changed qcryptographichash unittest to work from installation directory

- Changed qcryptographichash to use TESTDATA and QFINDTESTDATA

Change-Id: Ic3a1bdccc9f81605c648dab2a642421d17f7fe80
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoChanged json unittest to work from installation directory
Kurt Korbatits [Wed, 15 Feb 2012 04:22:48 +0000 (14:22 +1000)]
Changed json unittest to work from installation directory

- Changed json unittest to use TESTDATA and QFINDTESTDATA

Change-Id: Id29f8257565f409fa184ba465f25bc8454e2b7fb
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoAdd support for querying an elided sub-string from QTextEngine.
Andrew den Exter [Wed, 15 Feb 2012 01:32:59 +0000 (11:32 +1000)]
Add support for querying an elided sub-string from QTextEngine.

The QML Text element attempts to layout text first without eliding and
only builds an elided string for the last visible line.  This allows
it to re-use the already generated layout information to build the
elided string rather than doing a second layout of the relevant text.

Change-Id: Ieee45902d0c129853abe822c465eece4d634a028
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agoUse english name to match font in windows platform
jian liang [Mon, 13 Feb 2012 13:26:28 +0000 (21:26 +0800)]
Use english name to match font in windows platform

In windows platform, simplified chinese envrionment, the default font
family name is "SimSun" which is not in the font list generated by
EnumFontFamiliesEx(), this will cause chinese font can't be displayed.

This patch will generate font's english name during font enumeration in
windows platform, and take font's english name into consideration in font
matching. The english name generation code is taken from Qt4.8

Change-Id: Ie939ec0c8c08c628a835c7a53fb22d0545626d9c
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoQDial: Fix crash when singleStep-property is 0.
Friedemann Kleint [Fri, 9 Dec 2011 08:02:48 +0000 (09:02 +0100)]
QDial: Fix crash when singleStep-property is 0.

Task-number: QTBUG-23072

Change-Id: I296b46af23420b24fa5460b9660e33bf203ea29f
Reviewed-by: Jarek Kobus <jaroslaw.kobus@nokia.com>
(cherry picked from commit 6d370a19e367d0ccec59db5c34cbe2e3f7cfc586)
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoEliminate duplicate data row names in dbus, tools and xml autotests.
Jason McDonald [Tue, 14 Feb 2012 03:13:05 +0000 (13:13 +1000)]
Eliminate duplicate data row names in dbus, tools and xml autotests.

Change-Id: Ic734435f57bb4f2160ecb3bc645e642207931a99
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoEliminate duplicate data row names in network autotests
Jason McDonald [Tue, 14 Feb 2012 03:10:02 +0000 (13:10 +1000)]
Eliminate duplicate data row names in network autotests

Change-Id: Icbfc24309a182f37268232fc3c299d35d6d6a0ea
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agotestlib: Remove obsolete version of QSKIP macro.
Jason McDonald [Mon, 13 Feb 2012 03:34:21 +0000 (13:34 +1000)]
testlib: Remove obsolete version of QSKIP macro.

A variadic version of the QSKIP macro has been left in qtestlib for
a transitional period to give upstream projects time to catch up with
the removal of the function from the API.  This transitional period is
now finished.

Task-number: QTBUG-21652
Change-Id: Ib1a9158c2efbae05ffd0e69e72879f6387d4b2e8
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoRemove code related to test location.
Jason McDonald [Tue, 7 Feb 2012 02:50:54 +0000 (12:50 +1000)]
Remove code related to test location.

Testlib no longer does anything with the test location, and neither do
any of Qt's tests, so the code is no longer needed.

Change-Id: I1a464116179f3e26efadad6901f00f3c33e0ce84
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoUse static-less QMetaType API in QVariant.
Jędrzej Nowacki [Mon, 9 Jan 2012 10:36:03 +0000 (11:36 +0100)]
Use static-less QMetaType API in QVariant.

This patch improves performance when constructing a custom type in
a QVariant by ~ 7-20% (instructions count) depending on the type size
and metatype attributes.

Change-Id: Ic2707ff5abd689b66e23c1794f111504bf9b3b01
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoImplement new static less API for QMetaType.
Jędrzej Nowacki [Tue, 20 Dec 2011 16:11:46 +0000 (17:11 +0100)]
Implement new static less API for QMetaType.

Currently QMetaType API contains almost only static methods. This works
nice until someone needs more information or needs to do more operations
on a type. In this case every function call has to do type dispatch.

This API allows to avoid redundant type dispatching, by caching a
type information in a QMetaType instance. It gives significant
performance boost especially for custom types (up to 9x).

Change-Id: I223d066268402e072e41ca1d0a3e7bc160655d7f
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoRedirect libjpeg messages via qWarning
Donald Carr [Tue, 14 Feb 2012 21:55:48 +0000 (21:55 +0000)]
Redirect libjpeg messages via qWarning

This allows us to catch spurious libjpeg warnings via the installation of a
message handler

Change-Id: I82f3257118b5fbdf66550be80e72f75e9a24d3c1
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoQt Network: Added the \inmodule command in the class documentation.
Michalina Ziemba [Tue, 14 Feb 2012 12:27:58 +0000 (13:27 +0100)]
Qt Network: Added the \inmodule command in the class documentation.

-Some of the public classes were missing the \inmodule command.
-Fixed a sentence.

Change-Id: I88ebe12680c744e32253dc01c5ddb4292267caf9
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoDrop QFile::fileEngine
João Abecasis [Sat, 4 Feb 2012 00:10:55 +0000 (01:10 +0100)]
Drop QFile::fileEngine

The function was already marked as internal.

By moving access to the underlying file engine to private API this
supports the effort to completely drop file engines from public API. In
the future, the goal is to completely drop the file-engine abstraction
as it exists today.

Change-Id: I332fa56e70c87e83c1e08bb9f75e04df7c93fec7
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Anselmo L. S. Melo <anselmo.melo@openbossa.org>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoFixed tst_QFile when redirecting stdin/stdout/stderr to/from files.
Rohan McGovern [Wed, 15 Feb 2012 07:56:30 +0000 (17:56 +1000)]
Fixed tst_QFile when redirecting stdin/stdout/stderr to/from files.

openStandardStreamsBufferedStreams would fail if standard streams were
redirected to a file (e.g. ./tst_qfile > testlog.txt).

openStandardStreamsFileDescriptors already has a workaround, so apply it
here too.

Change-Id: Iffe9d7864909e489e77c1114e80c4e3bc70a8722
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoqmetaobjectbuilder: Store only unique strings in the string table
Kent Hansen [Mon, 6 Feb 2012 14:38:34 +0000 (15:38 +0100)]
qmetaobjectbuilder: Store only unique strings in the string table

Do like moc: If the string has already been entered into the table,
just return its position, don't make a new copy. This can save
space, for example, if there are several properties of the same type;
the typename only occurs once in the string table but will be
referenced by several property descriptors.

Change-Id: Ic0087697716cab1c6449ea51c0c758a6fd1a1c82
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years agoDon't hardcode the number 14 in meta-object generators
Kent Hansen [Mon, 6 Feb 2012 07:32:59 +0000 (08:32 +0100)]
Don't hardcode the number 14 in meta-object generators

14 is the number of fields (ints) in the QMetaObjectPrivate struct
as of revision 6.

Use the calculated number of fields instead, so that the code will
still be correct when more fields are added in future revisions.

Change-Id: I4f2c2bfc125f3fabc8e8caedf5c6ba6c17a34d06
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
12 years agoqmetaobjectbuilder: Add asserts to confirm validity
Kent Hansen [Sun, 5 Feb 2012 21:38:56 +0000 (22:38 +0100)]
qmetaobjectbuilder: Add asserts to confirm validity

buildMetaObject() can operate in two "modes", based on whether a
buffer to write the meta-object into is passed or not. Add asserts
to make sure that the intermediate meta-data indexes are correct
in both "modes", and that the final size in "write mode" matches
the size that was computed in the preceding non-writing pass.

The asserts make it easier to catch obvious problems when changing
buildMetaObject() to generate a new meta-object revision.

Change-Id: Ief7c74e6f6fca836587e831b06072d6aa98c7193
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years agoInclude headers before QT_BEGIN_NAMESPACE.
Xizhi Zhu [Tue, 14 Feb 2012 21:32:52 +0000 (22:32 +0100)]
Include headers before QT_BEGIN_NAMESPACE.

Change-Id: Icaef1cb280d2968e4a35c93375749d2d9feff856
Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
12 years agoAdd missing private headers to .pri.
Xizhi Zhu [Tue, 14 Feb 2012 21:21:35 +0000 (22:21 +0100)]
Add missing private headers to .pri.

Change-Id: Ia0f37953124198dce000adad9dfae051925d526e
Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
12 years agoFix ref counted window close handling.
Stephen Kelly [Sat, 11 Feb 2012 00:33:55 +0000 (01:33 +0100)]
Fix ref counted window close handling.

Instead of refcounting QWindow visibility, we ask the Application
subclass whether quitting is appropriate.

Task-Id: QTBUG-24120
Change-Id: Idd19cc1a3e5742fddded89c7638aaaa5e47c568d
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agobootstrap configure.exe on windows
Oswald Buddenhagen [Wed, 8 Feb 2012 10:38:07 +0000 (11:38 +0100)]
bootstrap configure.exe on windows

it is *ugly* to have the binary in the repository.
this adds a few seconds to the windows build, as the configure needs to
be rebuilt, obviously. that's almost negligible.

Change-Id: I40ffde23b3c3af2b6bab3e78cd0a9f433214b563
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoAdd QMetaType::FirstCoreType enum value.
Jędrzej Nowacki [Mon, 13 Feb 2012 12:01:59 +0000 (13:01 +0100)]
Add QMetaType::FirstCoreType enum value.

We should not assume that the first type id is 0.

Change-Id: I17ba6ba57e97ebd495904bfd11235fe458f214e5
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years agoAdd a ThemeChange event.
Friedemann Kleint [Tue, 14 Feb 2012 10:52:05 +0000 (11:52 +0100)]
Add a ThemeChange event.

- Pass it from QWindowSystemInterface via QWindow to the widgets.
- Add handler code from 4.8 / qapplication_win.cpp to qwidget.cpp.

Change-Id: Ic759563aa00cb93fe014c1bf41020446c1927dec
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoMove the removal of the Quit event to QWindow.
Stephen Kelly [Sat, 11 Feb 2012 00:10:07 +0000 (01:10 +0100)]
Move the removal of the Quit event to QWindow.

Change-Id: If524127ba9dab9ef065aaf4079294295eef8e49b
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoMake the cmake tests work with a namespace build.
Stephen Kelly [Fri, 10 Feb 2012 15:40:12 +0000 (16:40 +0100)]
Make the cmake tests work with a namespace build.

Change-Id: I6858c324548373c57963b5ef137772a1f780ec78
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoQHeaderView::moveSection performance boost
Thorbjørn Lund Martsum [Thu, 29 Dec 2011 07:59:37 +0000 (08:59 +0100)]
QHeaderView::moveSection performance boost

The patch also speeds up swapSections and hideSection a lot.

It work by eliminating the Span. (That is forcing each 'Span'
to have exactly one element) That saves a lot of loops since
we can often lookup info fast - and/or change it fast.

Since it is often a complexity change, it is difficult to
put %-increase on. (The most used linear function is
recalcSectionStartPos() - and it has a very low constant)

However comparing with the new benchmark (2500 rows)
swapSection, showHideSection and moveSection are about
20-40 factors faster. (Yes, it is a lot faster!)

In the benchmark moveSection is about 300 factors faster.

Beside being a far better model it is also far more simple.

This fix partly solves:
Task-number: QTBUG-19092

Change-Id: I8deeb9315276d15c68e8a27d5dcb8e0c0badf367
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoFix tst_QFileDialog2 for Windows 7.
Miikka Heikkinen [Wed, 15 Feb 2012 11:23:22 +0000 (13:23 +0200)]
Fix tst_QFileDialog2 for Windows 7.

There are no rights for typical user or even administrator to write
directly under c:\ root in windows without rights elevation, so
completionOnLevelAfterRoot() test case failed. Changed the test case
to use an existing directory.

Task-number: QTBUG-24289
Change-Id: I6a8dfc9d1d6ae798b3b9049c542b45fdbdbd9a8c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoRemove XFAIL in QGraphicsWidget test for Windows
Miikka Heikkinen [Wed, 15 Feb 2012 13:22:35 +0000 (15:22 +0200)]
Remove XFAIL in QGraphicsWidget test for Windows

The XFAILed initStyleOption() case passes on Windows, so do not XFAIL
it there.

Task-number: QTBUG-24297
Change-Id: I9615c408aa7e72b5eb8fe9739903594e45eb5fd7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoImplement new plugin mechanism
Lars Knoll [Mon, 6 Feb 2012 22:36:17 +0000 (23:36 +0100)]
Implement new plugin mechanism

moc can now embed meta information about the plugin
inside the plugin itself. This information can
be queried by Qt without having to load the plugin.

Source compatibility with the old plugin loading
mechanism is still there, but will be removed before
Qt 5.0.

Change-Id: I03e4196ddfed07d0fe94acca40d5de8a6ce7f920
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoAdd JSON support to the bootstrap library
Lars Knoll [Mon, 6 Feb 2012 09:36:48 +0000 (10:36 +0100)]
Add JSON support to the bootstrap library

The JSON support will get used in moc to support
the creation of plugin metadata that's embedded
into the plugin itself.

Change-Id: I3bc52b16ca0a43bc8bf9141b450045c6183b7823
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>