Commit Graph

4928 Commits

Author SHA1 Message Date
Robin Burchell
d1e8d9a347 Pull in netinet/in.h. Required for definition of sockaddr_in and friends.
Change-Id: I3b1c7dc1c08ec54f5537b6019dc2554763538cfd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-05-03 16:11:58 +02:00
Robin Burchell
f02acb8bfc Work around std::wstring not being defined on Android.
libstdc++ requires wchar.h (which bionic provides), but it also requires
additional functionality which bionic does not provide, thus, std::wstring
proper basically doesn't exist.

Provide a compatibility shim so we can keep API intact. This feature existed in
a similar guise in the past, but was removed in
d868c9945a.

Change-Id: I6cab6f41d04ad9dde97e3ce73506f9d8a42043fb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-03 16:11:58 +02:00
Stephen Kelly
eb9474d045 Add some missing includes.
There is a #include <QStringList> line wrapped in
QT_DEPRECATED_SINCE(5, 0).

Change-Id: I766848dfcc3bd765c57626a3d70f492ac1219091
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-03 16:11:58 +02:00
Shane Kearns
39eb95ece1 Implement QLocalServer::socketOptions on windows
Tested manually using the localfortuneserver example and multiple
login sessions. The linux autotest isn't suitable for windows due
to pipe permissions not appearing in the filesystem.

Task-number: QTBUG-25147
Change-Id: I5ea4db81d1870dc45bd483fa8d0b06afede3b722
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-05-03 16:11:58 +02:00
Lars Knoll
1e49914fee Merge remote-tracking branch 'origin/api_changes'
Conflicts:
	src/corelib/global/qglobal.cpp
	src/corelib/global/qlogging.cpp
	src/gui/kernel/qguiapplication.h
	src/gui/kernel/qwindow.cpp
	src/gui/kernel/qwindow.h
	tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp

Change-Id: I62a8805577a7940d4d36bed985eb3e7019d22f2e
2012-05-03 12:26:09 +02:00
Yuchen Deng
95c4be798c MSVC: Fix link warning if ship qt library without pdb files
qtmaind.lib(qtmain_win.obj)👎 warning: LNK4099: PDB 'vc100.pdb' was
not found with 'qtmaind.lib(qtmain_win.obj)';
linking object as if no debug info

Change-Id: I5d515a240e917f5747ec8ca7dabde1cd1a1b14de
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-05-03 11:33:05 +02:00
Friedemann Kleint
c505a16451 Windows: Fix QWindowsNativeFileDialogBase::directory()
The item was never initialized.

Change-Id: Iaf404c7f601713886c1c1346cc145460e7e89171
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-05-03 11:33:05 +02:00
Kevin Ottens
b6a4d69830 Advertise window (de)activation to Qt event system
The integration plugin now connects screens to the newly introduced
signals of the navigator event handler. The relevant screen then push a
corresponding event to the Qt event loop.

Change-Id: Ide6779bd1288c6560d113c77c60fc0ae30866d7f
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2012-05-03 11:33:05 +02:00
Kevin Ottens
f74e5a0359 Emit signals to notify window (de)activation
The event notifier now deals also with the windowActive and
windowInactive PPS messages. The event handler simply emit the
corresponding signals.

Change-Id: I1906a47a314bf81877e4dd3dc52c6463312f3aac
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2012-05-03 11:33:05 +02:00
Thiago Macieira
9c75a547a0 Remove references to to/fromAscii in QString and QByteArray main docs
Those functions are about to be deprecated and shouldn't be referred
to in the main documentation. Since they were temporarily changed to
mean UTF-8, this is not a behaviour change.

The next commit will update the code to match the documentation.

Change-Id: Ia8c2843c7f2b478f5691fe0224d5e631d94b1af6
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-05-03 11:33:05 +02:00
Thiago Macieira
d9f4b130aa Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtPrintSupport]
This operation should be a no-op anyway, since at this point in time,
the fromAscii and toAscii functions simply call their fromLatin1 and
toLatin1 counterparts.

Task-number: QTBUG-21872
Change-Id: I73963515a44175cb63251d0508d5f28d78076d76
Reviewed-by: John Layt <jlayt@kde.org>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-05-03 11:33:05 +02:00
Thiago Macieira
5e2590b537 Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtXml]
This operation should be a no-op anyway, since at this point in time,
the fromAscii and toAscii functions simply call their fromLatin1 and
toLatin1 counterparts.

Task-number: QTBUG-21872
Change-Id: I7e7202e6a1a84699ae0d43e4b2e7ee9ec87ed0b6
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-05-03 11:33:05 +02:00
Thiago Macieira
afbdf3b1cc Change QtSql documentation to recommend QString::toUtf8
Change-Id: I604166677ea182553adffc4835050f2964f2aef9
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-05-03 09:05:27 +02:00
Thiago Macieira
0c2d643e01 Change remaining uses of {to,from}Ascii to {to,from}Latin1 [qdoc]
This operation should be a no-op anyway, since at this point in time,
the fromAscii and toAscii functions simply call their fromLatin1 and
toLatin1 counterparts.

Task-number: QTBUG-21872
Change-Id: I2049c1919c15142ffb1dc406d183c6669ac3b1d6
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-05-03 09:03:02 +02:00
Shane Kearns
5fb7b7322e Fix documentation of QLocalServer
Added \since 5.0 and corrected the enum documentation to match the
code.

Task-number: QTBUG-24001
Change-Id: I8e284b6eaaf68c46bbd0e07f4378f0c442f2edd4
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-05-03 09:02:38 +02:00
Thiago Macieira
1eac22a1b9 Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtWidgets]
This operation should be a no-op anyway, since at this point in time,
the fromAscii and toAscii functions simply call their fromLatin1 and
toLatin1 counterparts.

Task-number: QTBUG-21872
Change-Id: Ie8ac500f2f8ebe99b7525feaa7b39247e641a461
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-05-03 06:10:20 +02:00
Thiago Macieira
425b925b7e Simplify the size of the QVarLengthArray buffer.
The previous calculation was too complex for no good
reason. QVarLengthArray actually doesn't change the size after this
change due to padding, but we don't need to include the padding in our
own calculation.

Task-number: QTBUG-25113
Change-Id: I72ea214f0d96870ecf8ff65737e7ca14e19afc7a
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-05-03 06:10:15 +02:00
Thiago Macieira
19d160b72b Fix the QByteArray overloads to QString::fromXXXX
c951908bc2 added these overloads, but
did not properly use qstrnlen to get the size. This means we get
subtle errors because other methods do have them.

For example:
  QByteArray ba("abc\0def", 7); // ba embedding a NUL
  QString s1(ba);
  QString s2 = QString::fromAscii(ba);
  s1 == s2; // FAILS

  QString s3;
  s3.append(ba);
  s3 == s2; // FAILS

Tested in an upcoming commit.

Change-Id: I22864521a42da789d522d7b75790696928d9ec32
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-05-03 06:10:11 +02:00
Shane Kearns
a5fcd3f799 QFtp - implement fast abort for downloads
Most FTP servers do not support the ABOR command (they don't process
control channel traffic until the data channel is finished). Or they
require the telnet IP & sync procedure on the control channel (this
requires sending TCP urgent data, which we do not support).
Following behaviour of most browsers and GUI FTP clients, abort
downloads by resetting the data channel.
Abort of uploads needs no change, because the client closes the data
channel rather than the server.

Task-number: QTBUG-25494
Change-Id: I69e7b7c04d709d26def9a4a7081074e1cbf69701
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2012-05-03 06:10:02 +02:00
Shane Kearns
c6864e0a58 QNetworkAccessManager - ensure abort reaches QFtp
Previously, we just disconnected signals from QFtp and allowed it
to continue downloading in the background.

Task-number: QTBUG-25494
Change-Id: I891c2fff88ef1ee554d1ccf821a3f7998eeb8406
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2012-05-03 06:09:53 +02:00
David Faure
ac86c8397c Pass configured timeout to callWithCallback too.
This was missing in ccf3b9e48b2d773999a9a88e249f79380618cde6.

Change-Id: I8bc8239591b893aad361b372a36ed5b9478aff24
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-02 22:49:42 +02:00
David Faure
9724642621 Fix unit confusion in ccf3b9e48b2d773999a9a88e249f79380618cde6
I wrote nonsense in that commit. The older methods that take a timeout
all take milliseconds, and the comments in the unit test really meant
milliseconds, not seconds. 1s is not shorter than 100ms....

Change-Id: Ic18899bb0462d89575dc5a9a311478adc4dea1cb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-02 22:49:26 +02:00
Lauro Neto
31a5fb1fa2 Update QXbWindow orientation API
After orientation handling was split in window orientation
and content orientation QXcbWindow remained with the old api.
This patch renames setOrientation to handleContentOrientationChange,
fixing the issue of double status bar (portrait and landscape)
when running Qt5 apps with QtComponents on N9 in portrait mode.
(thanks to Simon for pointing out the difference between
changing the window and the content orientations)

Change-Id: I20d0be0c7f7e4593ac1e3c2ac2518144fc7fed0e
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
2012-05-02 22:38:11 +02:00
Robin Burchell
266913a649 Stub out QDnsLookup on Android.
Android's resolv.h is completely crippled, so we can't use the libc resolver.

Change-Id: I07e310e3561c719f4fe0bf08e58b5194f5a76e4a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-05-02 22:32:17 +02:00
Robin Burchell
dac828dd81 Android's resolv.h is busted, so stub out QHostInfo::localDomainName().
Change-Id: Idcf5ca7298eed55121b690906885af0eb3fe0b9e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-05-02 22:32:13 +02:00
Robin Burchell
a195a5bfd6 Disable code using if_nameindex on Android.
Android doesn't support if_nameindex.

Change-Id: Idb0cbf52e6cffb19fe65e30430ef53626e0eeac7
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-05-02 22:32:07 +02:00
Robin Burchell
0c1ae68c0a Work around Android not having SYS_futex.
Even though we really shouldn't, we can get away with using __NR_futex instead.

Done-with: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: I0ba449b740acf2c78825f8093d1515a74f0bc9cd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-02 17:55:22 +02:00
Kevin Krammer
a818a1eb2f Add implementation of virtual keyboard based on BPS events
Change-Id: Ida4fa344c54db32b7b22b08a124b8c7b6df8adef
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2012-05-02 17:52:50 +02:00
Friedemann Kleint
77a8bd1e01 Windows: Fix a crash in Vista style.
Do not query the paintDevice of a backing store that has not
received a resize yet.

Change-Id: I49bf8f7e85c092c5664e5bc507802bd2cd8b62ea
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-05-02 14:53:41 +02:00
Bradley T. Hughes
af0df2d047 Remove unused Mac OS X code from QtWidgets
qcolordialog_mac.mm, qfiledialog_mac.mm, qfontdialog_mac.mm, and
qnspanelproxy_mac.mm are unused, remove them. The functionality they
used to provide is already included in the Cocoa platform plugin.

Change-Id: I2815d119687fd8d8dd421da36563afbd645ee000
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-05-02 14:53:41 +02:00
Stephen Kelly
98ac56676a Avoid macro re-definition warning for QT_NO_EXCEPTIONS
Change-Id: I0c4b2d00dd567af17f22b733b93032ff1056fcbd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-02 14:53:41 +02:00
Stephen Kelly
8dd66f42e8 Avoid undefined macro warning for __GXX_EXPERIMENTAL_CXX0X__.
The GCC use of this is already correct.

Change-Id: I28650196c7a325b552117fe2f2014ad7d6b365c2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-02 14:53:41 +02:00
Casper van Donderen
c0f0a7825e QDoc: Remove all occurences of 'qdoc3' in source.
Change-Id: I7d4e3238a9233d6aab32cc7a3c5a883e718113d5
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-05-02 14:53:41 +02:00
Casper van Donderen
21c3170fa6 Add "make docs" target for QtNetwork and sanitize other qdocconfs.
Change-Id: Ic9d6384b20162debeb69cb067c96c330c0fd999a
Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
2012-05-02 14:53:41 +02:00
stockton
e02e49852f fix documentation for QKeySequence::StandardKey "What's This"
add apostrophe and double-quotes.

Task-number: QTBUG-25545

Change-Id: Ib79953731953166ff7d8b999fee6571e62d86d01
Reviewed-by: Rick Stockton <rickstockton@reno-computerhelp.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-05-02 14:53:41 +02:00
Robin Burchell
61196fc248 mkdtemp() is not included in Android's libc
Use our own implementation instead.

Change-Id: Ic04dd480d52404e03e26cdf4caa1d00e4c3219c7
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: David Faure <faure@kde.org>
2012-05-02 12:14:17 +02:00
Sean Harmer
b17814e6ff Allow creation of QOpenGLShaderProgram without a current context
This change prevents the qWarning() in QOpenGLFunctions from being
triggered when creating a QOpenGLShaderProgram object without a current
QOpenGLContext. This is a common case especially when the shader program
is a member variable of a class.

It now relies upon the QOpenGLShaderProgram::init() function to resolve
the GL function pointers when the shader program is first used which of
course should be done with an active context.

Change-Id: Ib7dc345593f2a70d72ef8f650151cc90001058ca
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-05-02 11:36:36 +02:00
Sean Harmer
c73ddb0c0e Initialize QOpenGLFunctions before using it in QOpenGLShaderProgram
Change-Id: I472e97092b05f1721b7df5759d674c213d6018c6
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-05-02 11:20:42 +02:00
Olivier Goffart
36b3a6ad38 Fix compilation of public headers with QT_NO_DEPRECATED defined
Put the functions in QT_DEPRECATED_SINCE if possible

QPluginLoader::staticInstances is not documented as deprecated, and do
not reference any alternative use. So I unmarked it as deprecated.

Change-Id: I556c3f3657fb0490dd5543fcc56718fe9bd394e7
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-05-02 11:14:09 +02:00
Olivier Goffart
bcd477e0bc Introduce QObject::isSignalConnected(QMetaMethod)
This is much more performant than calling QObject::receivers(const char*)

Can be used instead of connectNotify in some cases.

Change-Id: I19e0933f678f171f515d9a0f69f0ad4fb7d894b4
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2012-05-02 10:59:41 +02:00
Debao Zhang
ade8888603 Don't use obsolete qVariantValue, qVariantCanConvert, etc.
qVariantValue and qVariantCanConvert are Compatibility members, while in
Qt4.8 they are marked as Qt 3 Support Members.

qVariantFromValue and qVariantSetValue are Obsolete members.

Change-Id: Ie8505cad1e0950e40c6f6710fde9f6fb2ac670fd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-05-02 08:30:59 +02:00
Donald Carr
6102ab8d64 Make eglfs hooks functionality namespace cognisant
Change-Id: Ie9f86bd0494c0423f50d0f405922ab169b2431e3
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-05-02 04:29:15 +02:00
Rohan McGovern
2929b920af Fixed windows platform plugin with -qtnamespace.
Added missing QT_BEGIN_NAMESPACE/QT_END_NAMESPACE

Change-Id: I2ffc5ec18d19027c01c81ba9c29f6d7cac5e9619
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2012-05-02 03:20:56 +02:00
Rohan McGovern
6b98bf6a14 Fixed QtGui and QtPrintSupport with -qtnamespace and MSVC
With this compiler, external functions declared inside other functions
will end up in the wrong namespace.

Change-Id: Ia37283d632dbc2ee0c269aeffa1f045b3e60148e
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2012-05-02 03:20:53 +02:00
Kent Hansen
74c3517e6a Fix regression in connectNotify(const char *) emission
Reimplementations of connectNotify() and disconnectNotify() can
assume that the signal argument is in normalized form, but after the
introduction of the Qt5 meta-object format, it could happen that it's
not.

The problem is that the internal QArgumentType class, which attempts
to resolve a typename to a type id, was calling QMetaType::type().
QMetaType::type() falls back to trying the normalized form of the
typename if the original argument can't be resolved as a type (this
behavior isn't documented, but that's how it works). This means that
e.g. QMetaType::type("const QString &") returns QMetaType::QString.

Since QMetaObjectPrivate::indexOfMethodRelative() (more specifically,
the methodMatch() helper function) prefers to compare type ids
over typenames (since the type ids are stored directly in the meta-
object data for built-in types), the method lookup would *succeed*
for signatures with non-normalized built-in typenames as parameters.
QObject::connect() would then think that it did not have to
normalize the signature (see "// check for normalized signatures").
The consequence was that the original, non-normalized form got
passed to connectNotify().

This commit introduces an internal typename-to-type function that
is the same as QMetaType::type(), except it doesn't try to normalize
the name. This way, the only place where normalization can occur in
the signature-to-meta-method processing is through the calls to
QMetaObject::normalizedSignature() in QObject::connect() itself.

The implication is that there are now cases where the method
signature will be decoded and processed twice, where processing it
once was sufficient before. On the other hand, it is consistent with
the pre-Qt5-meta-object behavior, where we predict that the
signature is already normalized, and only perform (comparatively
costly) normalization if the initial lookup fails.

Change-Id: Ie6b60f60b0f9a57ebd378d980329dac62d57bbd9
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-05-01 20:03:28 +02:00
Adrien Bustany
3013758f17 QNetworkProxyFactory: check the "no_proxy" environment variable
The QNetworkProxyFactory class considered the http_proxy environment
variable, but not the no_proxy one. This commit adds no_proxy handling,
loosely modeled after the way curl does it.

Change-Id: Ibb9e5ffcb30fed5c95dc9fc3bc4177e20d025a50
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-05-01 14:56:38 +02:00
Rohan McGovern
2149b650ea Fixed compile of QSslSocket with -qtnamespace on Windows.
Q_DECLARE_METATYPE must be outside of the qt namespace.

System headers must be included outside of the qt namespace.

Change-Id: I2f48b1df87e5edae2baee6ce813af08d3e011dc0
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-05-01 12:38:07 +02:00
Olivier Goffart
9420a7da7a Fix warning
qxcbnativeinterface.cpp:209:8: warning: unused parameter ‘context’
[-Wunused-parameter]

Change-Id: I0c90e94020907cf84626af9f3fef3e6746182431
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-05-01 09:41:27 +02:00
Rohan McGovern
40a73d7c63 Fixed uninitialized memory in QMetaObjectBuilder::fromRelocatableData
static_metacall was never set on the metaobject written by
QMetaObjectBuilder::fromRelocatableData, sometimes causing a crash.  It
should be initialized to 0.

Change-Id: I79373d895e131f0cc2ff1af6d2177a0c1a282be7
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-05-01 09:41:27 +02:00
Olivier Goffart
e1d5355325 Fix warning about narrowing inside {}
Such as
qdialogbuttonbox.cpp:259:1: warning: narrowing conversion of
‘2147483650u’ from ‘unsigned int’ to ‘const int’ inside { }
[-Wnarrowing]

Change-Id: I00d66d96ef3af1a46935a58119668a20f8fd58c7
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-05-01 07:11:13 +02:00
Kevin Krammer
050ff2730c Handle navigator events in BPS event filter
Change-Id: I37b5de4bf1e9f9bbe53910eb5e3f490172b28371
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2012-05-01 07:10:45 +02:00
Kevin Krammer
e212d25972 Register for and handle screen events delivered through BPS
Delegates actual event inspection and reaction to the screen event
handler class already used by the PPS screen event handler

Change-Id: Ic07efa1de3f6b452f3091e901bd8a577175e3cf0
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2012-05-01 07:10:43 +02:00
Friedemann Kleint
0b05e4cdd5 Widgets: No longer use deprecated QPixmap::grabWindow(),grabWidget().
Change-Id: Icf0d6a672edcfd1d3d10275bb9a93bde29251e79
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-05-01 07:10:40 +02:00
Lars Knoll
1767e21123 Allow loading of static plugins by index
Static plugins could so far not get loaded by
index. Implement the missing support for this.

Task-number: QTBUG-25274
Change-Id: I901b08bfaf4f9fc3cb9fcea0b47f3ed89588a27b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-01 07:10:37 +02:00
Lars Knoll
c56e756aa9 Reset pointer to 0 after freeing
set m_textureResource to 0 after freeing it, to
ensure we allocate a new one two lines below before
using it again 5 lines below.

Change-Id: Ib9c4de94aefed91f15d0fab0cd3c774a64f2f891
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-05-01 07:10:34 +02:00
Lars Knoll
715e9caf19 Initialize member variable
Change-Id: Icfbe064e89b0c2f7b67ba58cbdc79347275b63b1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-05-01 07:10:31 +02:00
Lars Knoll
f9c2094e49 Restructure how we initialize hash nodes a little
This should help to silence coverity which was complaining
hundreds of times about Qt not initializing h and next in
QHashNode.

Change-Id: Ib7977693e9786d4b310799e4f428115c65bb3fee
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-01 07:10:31 +02:00
Lars Knoll
69218f58a9 Initialize members
Change-Id: I786de497af63a45d9c38780e856a3f27c5ce8468
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-05-01 07:10:28 +02:00
Martin Smith
7329d61212 qdoc: Further changes to the QML specialization
Re-adding <qmlInherits>, <qmlInheritedBy>,
<qmlInstantiates>, and <qmlSince>. Also adding
<qmlAttached>.

Change-Id: Iebd70a37b083bc404ce621d0bb9d3090dbc1109e
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-05-01 07:10:25 +02:00
Kent Hansen
31e9f2a7a5 Port bearer plugins to QMetaMethod-based connectNotify()
The const char *-based API is deprecated and will be removed in Qt5.

Some of the reimplementations were commented out since the signals
being checked for aren't even declared by the relevant classes.

Change-Id: I4486d1f3242db21cebd55fb53def3904f7c236ba
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-01 01:18:03 +02:00
Kent Hansen
a08e0fca27 Port QtDBus to QMetaMethod-based connectNotify()
The const char *-based API is deprecated and will be removed in Qt5.

Change-Id: I1c7f0e46149964367f42faccfff4b89acbf16511
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-01 01:18:03 +02:00
Kent Hansen
e525957253 Port QNetworkSession to QMetaMethod-based connectNotify()
The const char *-based API is deprecated and will be removed in Qt5.

Change-Id: I36f6dc761e3b5a087e38db29b761c3e9237958b4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-05-01 01:18:03 +02:00
Kent Hansen
90c6d44512 Port QBuffer to QMetaMethod-based connectNotify()
The const char *-based API is deprecated and will be removed in Qt5.

Also fix a bug in the disconnectNotify() reimplementation; when all
signals are disconnected at once, disconnectNotify() is only called
a single time, with an invalid method as argument. Thus, the signal
connection count should be set to 0, instead of decremented.

Change-Id: Ieee92293777bff87f8b28e56e23ab55d0b8b8101
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-01 01:18:03 +02:00
Kent Hansen
b39c1a32b5 Port QtConcurrent to QMetaMethod-based connectNotify()
The const char *-based API is deprecated and will be removed in Qt5.

Change-Id: Ica5b2c5020adf972db5005be8c062ddcdae8c0b4
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-01 01:18:03 +02:00
Kent Hansen
243ea09e4c Add QMetaMethod-based QObject::connect/disconnectNotify() API
This API will fully replace the const char *-based connectNotify()
and disconnectNotify() in Qt5; the old functions will be REMOVED
before Qt 5.0 final.

The new implementation fixes the long-standing issue of
connectNotify() not being called when using the (internal)
index-based QMetaObject::connect() (e.g., from QML).

As with the old API, there are still two "unintuitive" behaviors
concerning disconnectNotify():
- disconnectNotify() is not called when the signal is disconnected
  using the QObject::disconnect(QMetaObject::Connection) overload.
- disconnectNotify() is not called when a receiver is destroyed
  (i.e., when a connection is implicitly removed).

The old versions of connectNotify() and disconnectNotify() are kept
for now, and they are still called. They will be removed once known
existing reimplementations (e.g., QtNetwork, QtDBus) have been
ported to the new API.

Change-Id: I8b4f007f3c6d89199c1ba04a3e23c8ca314e0896
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-05-01 01:18:03 +02:00
Olivier Goffart
67245d1708 Fix compiler warning in qdrawhelper.cpp
warning: always_inline function might not be inlinable [-Wattributes]

Those function are only used in array of function pointers. They
cannot be inlined.

Change-Id: I82b10d82ac8915129dc8921b1a74d42d8547bc40
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-05-01 01:18:03 +02:00
Bradley T. Hughes
b46189c3c3 Support all modality types in QPlatformDialogHelper
Modality is not a boolean property in Qt. There are 2 types: window
modality and application modality. Native dialogs can support both of
these types as well (e.g. on Cocoa, a window modal file dialog should be
displayed as a Sheet). Remove the QPlatformDialogHelper::ShowFlags enum
and instead pass a Qt::WindowModality parameter to
QPlatformDialogHelper::show_sys().

The Windows implementation has been updated to check for
Qt::ApplicationModal instead of the ShowModal flag (since only
Qt::ApplicationModal dialogs are blocking).

The Cocoa implementation has been updated to only use non-modal and
application modal native color and font dialogs (which restores Qt 4
behavior). These are shared Cocoa panels that cannot be shown as sheets,
however. If the programmer asks for window modal color/font dialogs, we
use the Qt versions, not the native ones. The file dialog can be shown
either as a Sheet (but we need to pass an NSWindow parent for it to work
properly) or as an application modal dialog.

This change has been tested on Mac OS X with
tests/manual/windowmodality.

Change-Id: I9064987433895c55f68aac979ef8e8207fb24bbe
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-04-30 14:01:22 +02:00
Morten Johan Sorvig
842a0b094b Make QGtkStyle work on Qt 5.
Mostly straightforward porting: Add configure test from Qt 4. Add X11
include to qgtkstyle_p.cpp. Use renamed QGuiApplicationPrivate::showModalWindow.

Change-Id: I83020e13ec00b49f3fe346814f881bce19a6f602
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-30 14:01:22 +02:00
Morten Johan Sorvig
4e59daf34f Cocoa: Fix beep-on-show for Creator menus.
Maintain a current window state variable in QCocoaWindnow
and use it when setting the new window state on the
NSWindow.

The NSWindow state accessors can apparently not be
trusted, in particular isZoomed always returns true
for the Creator popup menu.

Change-Id: I78f13de251f3730752813bba17459011f8558aee
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-30 14:01:22 +02:00
Lars Knoll
b7cd964761 Remove unused code
Change-Id: I185db2361990dd1d503488a364826738270388b5
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-04-30 14:01:22 +02:00
Jonathan Liu
7bd1f36d37 Disable force_align_arg_pointer function attribute with MinGW-w64
The force_align_arg_pointer function attribute is not necessary for
MinGW-w64 to align stack for SSE and generates a compiler warning as
it is ignored. Do not use force_align_arg_pointer with MinGW-w64 to
silence the warning.

Change-Id: I58a754dc3ec01b36a1d3c9490f45ccf0824468ba
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-30 14:01:22 +02:00
Miikka Heikkinen
e1e9295926 Fix the tst_QOpenGL::sharedResourceCleanup() test case in Windows
QWindowsGLContext was returning always false for isSharing() query,
as it was falling back to default implementation.

Task-number: QTBUG-24192
Change-Id: I884d559d69545ef85a0d07d7287bc50ce459c1bd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-30 14:01:22 +02:00
Kevin Krammer
fa94f01489 Use BPS based event dispatcher
Create a QPA specific subclass of the blackberry event dispatcher
(basically the BPS equivalent to the QUnixEventDispatcherQPA created
by createUnixEventDispatcher()).

Create an event dispatcher event filter that will receive all BPS events
and then either handle them itself or delegate to event subtype
specific handlers.

Change-Id: I112e0274156727d3aa9e5693b59d041c65be4daf
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2012-04-30 14:01:22 +02:00
Miikka Heikkinen
891345072e Remove declaration of QWindowsFontEngine::createEngine()
There is no implementation for this function so might as well remove
the declaration. The function is actually implemented by
QWindowsFontDatabase class, where it is also properly declared.

Change-Id: I8f5c050fa3f3c48b07e10f205eb0f7b16e12b737
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-30 11:37:36 +02:00
Laszlo Agocs
9d6f208704 Remove unused private and protected members from QClipboard
Change-Id: I1d5ce0db4a9a6582629e2c0b74e9ab998b405788
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-04-30 11:37:36 +02:00
stockton
0ea3a1a9ad Fix Qt::MouseButton Documentation for Qt::ExtraButton24,
Documentation for the 'more mouse buttons' feature has a Typo on
Qt::ExtraButton24 (is shown as "Qt::ExtraButton44", no value.)
Also, the order of BackButton/Xbutton1/ExtraButton1 causes the
'BackButton' value to be a forward reference to XButton1, which
makes it awkward and hard to understand. Same with ForwardButton/
XButton2/ExtraButton2.

Task-number: QTBUG-25529

Change-Id: I04b76d91d7a2155c1917a809a51700059320f510
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-04-30 09:17:13 +02:00
Jonathan Liu
7b87469bc5 Fix MinGW-w64 compilation
Use qintptr and quintptr for exchanging data with registers for cpuid
as the size of long does not match the size of the register on Win64
which uses the LLP64 data model.

Change-Id: I23b8c8e0977166f7e62795c16e9080e44d9f25f5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-30 01:06:47 +02:00
Lars Knoll
03da3d7f5c Get rid of most warnings related to QInputMethod
Change-Id: Id0b1235a5dc209c5c06e0a64613364c89e733005
Reviewed-by: Pekka Vuorela <pekka.ta.vuorela@nokia.com>
2012-04-29 14:05:39 +02:00
Thiago Macieira
75a0c7f9b5 [SIC] Make non-const the QRegExp methods that modify the internals
These methods modify QRegExp internals and should not have been
const. It's actually dangerous to have them const, since users may
think it's safe to use the matching method in a thread-safe manner.

Task-number: QTBUG-25064
Change-Id: Ia370eb42fd0407a94924f420297c5e83d3908214
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-28 19:42:51 +02:00
Casper van Donderen
00b961c37f Doc: Fix most qdoc errors in QtSql.
- Move 2 images from qtdoc.
- Add "make docs" command for qtsql
- Fix qdoc command usage errors.

Change-Id: Id2f0548d09ed8f77b2317863d443c19d1cccdd83
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-28 13:53:46 +02:00
Martin Smith
82fa92b23c qdoc: Further changes to the QML specialization
The <qmlPropertyGroup> tag now has an id attribute
of the form "id-qml-propertygroup-xxx" where the
xxx is the property name. //This should be unique
within the document.

Change-Id: I20b30266dbe92b85b60400de30ebf9b1f1e292ea
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-04-28 13:53:37 +02:00
Lars Knoll
600e193bbc Don't generate compiler warnings for using deprecated methods
We need to construct QImageTextKeyLang objects for the deprecated
method in QImage. That's impossible to do if we don't have a
constructor for the class that's non deprecated. So add a private
constructor and make QImage a fried of the class so it can use
that constructor.

Change-Id: I6359e9943fe031ed3dca85479ee9ec47ceaf776b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-28 01:16:20 +02:00
Lars Knoll
9d1f1b0901 Get rid of some deprecation warnings
Change-Id: I05e6f9479789652cc1536cb5bced2bc8fa664c84
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-28 01:16:20 +02:00
Thiago Macieira
da2c170aa2 Don't use the QRegExp methods that modify the object [QtCore]
QRegExp matching methods modify the object, which we don't want to. In
particular, when we receive a QRegExp from the user or we store in a
context that might require thread-safety, make sure we make a copy
before using it.

QRegularExpression has no such shortcoming.

Task-number: QTBUG-25064
Change-Id: Icf22986cd5f6fd086518c78a7d56e6cadfe9f5f6
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-27 22:52:54 +02:00
Jason McDonald
0c3a0dd799 Remove old Qt4 to-do comment.
Addressing the comment would likely break existing applications, so
leave things as they are for now.

Task-number: QTBUG-25099
Change-Id: I7dfd0e1ae121dcae57c2babc3373c2e5d16ad44b
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-27 22:52:01 +02:00
Shane Kearns
08cc6901f8 Move QWinEventNotifier data members to a private class
This is a binary incompatible change to allow future changes
to QWinEventNotifier to be possible in a binary compatible way.

Change-Id: I268d3e01d8ee237ecbd164ee0f7cae1eb73dd725
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Debao Zhang <dbzhang800@gmail.com>
2012-04-27 22:52:01 +02:00
Friedemann Kleint
e79d975be4 Replace QGuiApplication::activeWindow by focusWindow().
Fix deprecation warnings.

Change-Id: I8d33aa8c035df6f5ef3fff6a402e980e43e03406
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-27 20:16:37 +02:00
Friedemann Kleint
89b6e2d704 Windows: Fix warning about retrieving the handle from non-toplevels.
Change-Id: I967f218c98309e77371717aa16e46995a767caa3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-27 20:16:09 +02:00
Friedemann Kleint
bf4a4a106f QWindowsBackingStore: Flush to correct window.
Task-number: QTBUG-25435

Change-Id: I13f57a328a7ac3402fe0def9d724f7e700016c80
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-27 20:15:52 +02:00
Morten Johan Sorvig
1d72e3fbdf Remove deprecation tags from QWheelEvent.
0df1c9f1 enabled deprecation warnings from Qt,
causing warnings from QWheelEvent use.

Using delta() and orientation() in new code is still
not advised, but since QtWidgets uses them the
"deprecated" tag is not suitable.

Change-Id: I597e8ddf9fd2dc911d0e30044e96df744982ff81
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-27 14:41:42 +02:00
Friedemann Kleint
4a2942085a Windows/Vista style: Fix painting of QGroupBox.
QGroupBox in Vista style does not show a frame, currently.

drawBackgroundDirectly should also be called if the paintDevice
is a backing store.

Task-number: QTBUG-25395
Change-Id: Ifa20802dea6c182904f68271ddd0d175007e4b0e
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-27 10:37:02 +02:00
Friedemann Kleint
bd2d0d7cbe Fix warning about int-truncation (MSVC2010, 64bit).
Change-Id: Idfc483ccb80a8bbad128672052edfa04635bd532
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-04-27 10:37:02 +02:00
Rohan McGovern
64fbad8de4 doc: removed wrong license headers from several .pro snippets
qmake can't parse /* C-style comments */.  The license headers in these
files should use # as the comment delimiter.  However, .pro files anyway
don't need license headers, so just remove them.

Continues from commit 8dea797015, which
removed the header from one file.

Change-Id: Ib227aabb27224fc1fe89b7ced4fbbf7b1af8b193
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-04-27 10:37:02 +02:00
Kent Hansen
dac23b9a57 Add QMetaMethod::fromSignal() function
Given a member function that's a signal, returns the corresponding
QMetaMethod. Inspired by the implementation of the template-based
QObject::connect().

The primary use case for this function is to have an effective and
exact (not subject to shadowing) way of checking whether a known
signal was connected to in reimplementations of
QObject::connectNotify(QMetaMethod), avoiding string comparisons.
Example:

void MyObject::connectNotify(const QMetaMethod &signal)
{
    if (signal == QMetaMethod::fromSignal(&MyObject::mySignal)) {
        // Someone connected to mySignal ...
    }
}

Change-Id: I5e4de434275fe543c004d569dcaa9ceda3442f03
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-27 10:37:02 +02:00
aavit
56d4d97852 Fix workaround for image readers that can scale but not clip
If both scaling and clipping was requested from an image reader that
only supports scaling, the code failed to apply the intended
workaround (i.e. read normal and do clipping and scaling afterwards).
Ref. the comment just above about "Only enable the ScaledSize option if
..."

Change-Id: I273edba60bf9f785f2082aa8f236505ec3ce0776
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
2012-04-27 10:37:02 +02:00
aavit
878a01b2d1 Implement inline downscaling in png reader, to save memory
Instead of allocating and reading the entire image and then scaling it
down, this code reads only one line at a time and scales it on the
fly.

Change-Id: I61fde307146c11dcd90ca617cc2e7f85dd3b66c4
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-27 10:37:02 +02:00
Christoph Schleifenbaum
1c9a4093a5 Respect the DontUseNativeDialog flag.
QFontDialog and QColorDialog were ignoring the DontUseNativeDialog. This
lead to a native (Cocoa) dialog created all the time.

Fix the testcase for QFontDialog. It needs the DontUseNativeDialog flag
set.

Task-number: QTBUG-24321

Change-Id: I159c1ad057bac38226f1e01a56b15f142650bfd8
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-27 05:51:14 +02:00
Thiago Macieira
e5a3217349 Mark that the Sun compiler includes the return type in the mangling
Source: http://developers.sun.com/solaris/articles/external_linkage.html
   %dem __1cFgreet6F_pc_
   __1cFgreet6F_pc_ == char*greet()

Source: http://www.oracle.com/technetwork/articles/servers-storage-dev/stablecplusplusabi-333927.html
	Function		Mangled Name
	float f(float)		__1cBf6Ff_f_
	int f(int)		__1cBf6Fi_i_
	int T::f(int)		__1cBTBf6Mi_i_
	int T::f(char*)		__1cBTBf6Mpc_i_
	int T::U::f(int)	__1cBTBUBf6Mi_i_
	int N::T::f(int)	__1cBNBTBf6Mi_i_

Change-Id: Ibe1934f1c137d1657fb122cbf1a1b1fbc3e4a202
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-27 03:09:56 +02:00
Casper van Donderen
71172159ba QDoc: Pretend that .qtx and .qtt files are .qdoc files.
Change-Id: I2b530e526d2c1f5102960dab4991ceade414f1eb
Reviewed-by: Ed Baak <ed.baak@nokia.com>
Reviewed-by: Peter Yard <peter.yard@nokia.com>
2012-04-27 01:44:30 +02:00
Konstantin Ritt
16042472ac fix build with mingw
since MinGW is GCC, invert the order and place the GCC constructs first

Change-Id: I98113aa77e51f9e01c3641987e915bf475053a60
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-27 01:24:05 +02:00
Ian Dean
5a1c67c657 Fixed iOS compilation issues.
Put MacOS-specific code in #ifdef blocks so that it is not compiled for
iOS.

Change-Id: I303b7dbb63eb298e92351951731868df6a38bffa
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-26 17:52:12 +02:00
Eskil Abrahamsen Blomfeldt
f1212ddc62 Revert "Harfbuzz-shaper - fix incorrect logClusters being set in HB_OpenTypePosition"
This reverts commit add629d4f1.

The commit caused crashes when laying out some text (e.g. ordinary
Arabic text) with certain fonts (it triggered the assert in
QTextLayout::addNextCluster()). The regressions will have to be
weeded out before the fix can be recommitted.

Change-Id: Iee457f138367d4cf8fcbd2e518271d8eaa95a62c
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2012-04-26 17:52:12 +02:00
Honglei Zhang
1509316a37 Fix memory leaks in 64-bits ODBC driver
On 64-bits Windows system, integers and longs are still 4 bytes values.
Several functions that were previously defined with SQLINTEGER and
SQLUINTEGER parameters have been changed where appropiate to use new
SQLLEN and SQLULEN typedefs. SQLGetStmtAttr() is one of these functions.
This fix replaces SQLINTEGER with SQLULEN in appropriate functions to avoid
memory leaks.

Task-number: QTBUG-25256
Change-Id: I744927f42b8578ece60815df360e3b337ebf452a
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-04-26 17:52:12 +02:00
Konstantin Ritt
f3721d7706 get rid of Q_*_EXPORT_INLINE macros
> Girish:
> We should be able to remove the macro completely today,
> just mark all those functions as plain inline.
> With Qt5, we don't have to worry about bc yet.

this fixes "import attribute ignored" warnings on mingw with -fno-keep-inline-dllexport

Change-Id: I616e5de7c8d59953ce03a316b941a439fae56298
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-04-26 15:33:00 +02:00
Olivier Goffart
93132154b5 Fix C++11 compilation
Fix compilation with compilers that support user defined literal
(such as GCC 4.7)

Change-Id: I31cd3d2177688f963ab33cf68cd6060a5fb8640f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-26 15:32:34 +02:00
Kevin Krammer
8c59e22538 Create interface for navigator calls and implement for BPS and PPS
Makes QQnxServices available on non-BPS systems by delegating to an interface
which is implemented on systems with BPS using the currenly used navigator API
and on systems without BPS by sending an appropriate message to the navigator's
PPS service interface.

Change-Id: I0e32fb11e6debb7b7b4693c0bc02af4f75ee2162
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-04-26 15:21:46 +02:00
Stephen Kelly
99a620d2e2 Take account of spanned items in QTreeView when dragging.
Also remove some code which has been unused since it was introduced in
32182d107fa75e5619ecc91a81f50626f429ebe1

Task-number: QTBUG-25140
Change-Id: Ic7053d68d8200f845c1ae330342d27af7275e057
Reviewed-by: Tarja Sundqvist <tarja.sundqvist@digia.com>
Reviewed-by: David Faure <faure@kde.org>
2012-04-26 15:20:30 +02:00
Casper van Donderen
62932faef0 Doc: Use the proper way to find qdoc.
Previously $$QT.core.bins was used to find qdoc, the proper way is to
use qtPrepareTool().

Change-Id: I5d97f5517ae63253ccaf1fb1487034c3a312a074
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-26 15:04:38 +02:00
Casper van Donderen
9f789044d7 Doc: Add "make docs" command for QtXml.
Also fix a typo in the qhp/index URL.

Change-Id: I5774982b15f9de5b59966a2d932307b156eecc7f
Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
2012-04-26 14:49:53 +02:00
Casper van Donderen
99e3c08064 QDoc: Disambiguate prev and next links in html source.
Change-Id: Iaa82b9b6de71b577a44eae86eb6847c07d068670
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@nokia.com>
2012-04-26 14:12:12 +02:00
Jan-Arve Saether
c10a0c29d3 Map QAccessible::Role to the proper IA2Role.
All enum values after the MSAA-specific roles needs a special
mapping.

Change-Id: I6c77abf09b68d2d3d772937be986d532db2e5292
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-04-26 11:45:01 +02:00
Sean Harmer
5c882dbb89 Use non-blocking reads on virtual keyboard pps device.
Change-Id: Iad350c948049128f3014a6ad6536ac9dc2ee86d5
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
2012-04-26 11:45:01 +02:00
Sean Harmer
15d4e943ba Fix compilation when debug output enabled on virtual keyboard
Change-Id: I467e9ef624bcd10cb5b61f6f665a7bbb0bb1f57a
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
2012-04-26 11:45:01 +02:00
Thiago Macieira
f6aef23ff1 Ensure that QUrl::{to,from}LocalPath encode/decode properly
Unlike path(), toLocalFile() isn't reporting a URL component, so it
should decode the percent-encoded characters fully. This extra
decoding pass is meant to catch %00 to %1F, %7F and %25 (the percent
sign itself).

It also catches %80 to %FF, which aren't decoded because they don't
form UTF-8 sequences. That means QUrl::toLocalFile() has undefined
behaviour if the path contained non-UTF8 sequences.

Task-number: QTBUG-25459
Change-Id: Iab5a0ba6afcfc4510e297984f2ffc208cedd752b
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-26 03:15:22 +02:00
Olivier Goffart
5a6ee590a2 Remove deprecated conversion from QKeySequence to QString
Change-Id: I3844913c16b9d6222f48e66dddc1d680458ffa56
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-04-26 00:56:40 +02:00
Olivier Goffart
67f58040ea Remove QMetaObjectExtraData and put everything into QMetaObject
QMetaObjectExtraData was added when support for QMetaObject::newInstance
was added. One needed a place to put the pointer to static_metacall in
the QMetaObject.

But as we break binary compatibility, one can change the size of
QMetaObject, and put everything back inside QMetaObject's own structure.
Meaning it is not required anymore to have one QMetaObjectExtraData
instance per QMetaObject anymore.

Change-Id: If0b8f586cbaf633eed10045adee3ba3366826c86
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-04-25 20:19:29 +02:00
Kent Hansen
7b118c6456 Split qobject_impl.h into qobjectdefs_impl.h
This is done to make QtPrivate::FunctionPointer available to the
QMetaMethod declaration in qmetaobject.h (which already included
qobjectdefs.h, since that's where QMetaObject is declared), so that
the new template-based QMetaMethod::fromSignal() function may be
implemented.

The logic for statically generating the array of qMetaTypeId (used by
the template-based QObject::connect()) remains in qobject_impl.h,
since it's not needed for QMetaMethod::fromSignal(). Moreover, moving
that code would introduce a circular dependency, since qmetatype.h
as of commit 1946740446 now includes
qobjectdefs.h.

Change-Id: I36c35041e0c6661c3cf523684177a0b6c19e2d35
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-25 20:17:18 +02:00
Kent Hansen
28c79d8c0b Add comparison operators == and != for QMetaMethod
This is done in preparation of introducing the
QObject::connectNotify(QMetaMethod) function. Together with the
forthcoming QMetaMethod::fromSignal() function, which returns the
QMetaMethod corresponding to a Qt/C++ signal (member function), the
comparison operators provide an effective way of checking which
signal was connected to.

Change-Id: I2de48628c4884a7174fb8574895f272cb3fe5634
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-25 20:16:56 +02:00
Thiago Macieira
6624151c6a Don't use the QRegExp methods that modify the object [QtWidgets]
QRegExp matching methods modify the object, which we don't want to. In
particular, when we receive a QRegExp from the user or we store in a
context that might require thread-safety, make sure we make a copy
before using it.

QRegularExpression has no such shortcoming.

Task-number: QTBUG-25064
Change-Id: I44cc44b75b3da10c5ece97cb6315c2c425327dc0
Reviewed-by: Alexis Menard <alexis.menard@openbossa.org>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-25 20:15:32 +02:00
Thiago Macieira
105b231214 Add detection code for AVX2, HLE, RTM and AES to qsimd.cpp
AES is currently not enabled, since we don't use it for anything. The
code is here with the proper detection should we want to in the
future.

RTM and HLE (Transactional Memory Extensions) I'll use soon in the
locking code.

Also rename a few variables to make it easier to read later on.

Change-Id: I800c66d7e1ba86ec037692928d94f53ea5d5868f
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-25 14:58:36 +02:00
Thiago Macieira
e75b0e8c72 Replace the x86 XGETBV instruction with its opcode bytes
This is a new instruction, present on the SandyBridge architecture and
later. Some older assemblers do not support it and produce:

  {standard input}:225:no such instruction: `xgetbv'

The use of this instruction is protected by a CPUID check (function 1,
ECX bit 27), so we only run it in processors that do support it.

Change-Id: Ife7500c0deaab9539074835a4511e8c19602608e
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-25 14:58:36 +02:00
Thiago Macieira
dc6d1c6c3f Update the x86 feature-detection code, unifying x86 and x86-64
Most of it is the same for both of them, so let's avoid doing
everything twice. Or more, since we may support x32 soon. For Windows,
use the intrinsics. For GCC, we'd like to use cpuid.h, but it only
exists since GCC 4.3, so we can't.

And properly detect AVX support: it's not enough to detect that the
processor supports them, we also need to check that the OS enabled
support for the 256-bit registers.

Change-Id: Ibb4872cdb774de5701b18c40f4e612330a266214
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-25 14:58:36 +02:00
Thiago Macieira
01ee098531 Fix atomics on SPARC
Inspired by
https://bugreports.qt-project.org/secure/attachment/26020/qt_atomic_sparc64.patch

Task-number: QTBUG-22479
Change-Id: Ie3275df96c639d6a75e05f70fe5745aeb34457f9
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-25 14:58:36 +02:00
Bradley T. Hughes
d9875f7bff Cocoa: support modal windows
Qt::WindowModal windows and dialogs are shown using [NSApp
beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:] as
long as they have a valid parent. Otherwise they are behave as
application modal.

Use the existing modal session support in the QCocoaEventDispatcher
(which was inherited from Qt 4) to support Qt::ApplicationModal
windows and dialogs. Some changes to this code are needed to ensure
proper behavior:

1. Window level modification is now done in
QCocoaWindow::recreateWindow() instead of in QCocoaEventDispatcher.
2. Make interrupt() use [NSApp abortModal] to stop a modal session
(previously we were freeing memory from under Cocoa's feet, causing
tools like valgrind and Instruments.app to complain)
3. Do not remove an item from a list and use a const reference to the
removed item immediately after (minor bug fix).

Also make sure that QCocoaEventDispatcher cleans up any modal sessions
and retained user input events on destruction (otherwise we leave
NSApplication in a weird state, which causes some autotest failures).

Change-Id: Iaeefa025400f324b5348b8c81a40384ef026efb4
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-04-25 14:58:36 +02:00
Thiago Macieira
6159870348 Revert QUrl::isRelative to its Qt 4 behaviour
Instead of trying to return whether the URL is relative to something
undefined, let's instead follow what the documentation was saying all
along and what the RFC says about "Relative References".

Change-Id: I32722321a6b36c6e3480669ad769390e4c6f7d1c
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-25 14:58:36 +02:00
Jan-Arve Saether
5a09e71fc3 MSAA bridge should not return any IA2-specific roles from get_accRole()
Small cleanup/improvement. This patch just does what the removed ###
says.

Change-Id: I0d16541d2e4b8f948f32734ef0138fde5517932a
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-04-25 12:43:25 +02:00
Jan-Arve Saether
3fef4b4635 Do not map LayeredPane and Terminal to the wrong MSAA role
Microsoft did at some point extend the roles in MSAA with two extra
roles (ROLE_SYSTEM_IPADDRESS and ROLE_SYSTEM_OUTLINEBUTTON).
These are defined in oleacc.h as:
  #define	ROLE_SYSTEM_IPADDRESS	( 0x3f )
  #define	ROLE_SYSTEM_OUTLINEBUTTON	( 0x40 )

This means that LayeredPane will map to ROLE_SYSTEM_IPADDRESS
and Terminal will map to ROLE_SYSTEM_OUTLINEBUTTON, which is
obviously wrong.

We now reserve some valuespace for more roles to reduce the likelyness of
any collisions in the future. Having the reserved area also serves
as a way of indicating the boundary between the "MSAA" enums and other
enums.

Change-Id: Ic67a1a7200382fed3040e69b3e8856376ba642ac
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-04-25 12:43:25 +02:00
Konstantin Ritt
17ebedf5fc get rid of QT_NO_IMAGE_TEXT switcher
Change-Id: Ie72f907ffb959f629af6a414959348a992c4c941
Reviewed-by: aavit <qt_aavit@ovi.com>
2012-04-25 10:29:56 +02:00
Casper van Donderen
82fcbe9d7d QDoc: Implement -installdir CLI option for module cross-linking.
QDoc needs to know the final location of the installed documentation to
generate correct relative links between the modules. Normally you can
use QLibraryInfo::DocumentationPath for this, but since QDoc gets compiled
during Qt bootstrapping QLibraryInfo is not available yet.
The -installdir option still allows us to specify
QLibraryInfo::DocumentationPath  on the command line.

Change-Id: Ic4729f4daad112f0d175931467cf09cfcf5145a3
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-04-25 10:29:56 +02:00
Konstantin Ritt
96a165870d support UTF-8 encoded file names in QZip*
Change-Id: Iba0457b55ef9fa3673f78b4d30d018a146e8fb1c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
2012-04-25 10:29:56 +02:00
Laszlo Agocs
2cbd5906df Update QTest::QTouchEventSequence docs
Change-Id: I2a8f88929f985b1543ec7c223266e8387f0a8a48
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-04-25 08:16:41 +02:00
Peter Hartmann
314e590d67 QHttpMultiPart: supply new line at the end of the body
... to conform to RFC 2046 (section 5.1.1). Apparently IIS had problems
without the new line.

Task-number: QTBUG-25429
Change-Id: Ia619bbdcebd407b2716bc467323634e4c8d77bcd
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-25 01:57:14 +02:00
Konstantin Ritt
5e66c35a23 optimize QChar::decomposition()
* by not using QString::fromUtf16() as we know for sure that
  the data is 'raw' UCS-2;
* it's safe to avoid a check for > UNICODE_LAST_CODEPOINT
  as GET_DECOMPOSITION_INDEX macro already does a similar check

Change-Id: Ifb660efc51c664d06733ac8ed46d54278520da06
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-25 01:57:04 +02:00
Debao Zhang
6fb0110f97 Using QLatin1String instead of QLatin1Literal
QLatin1Literal is just a typedef of QLatin1String.

Change-Id: If20ca225e57a7fb45a7775f0fc81aedb6da88c96
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-04-25 01:56:56 +02:00
Stephen Röttger
b9790a04ee Fix locale issue on unix systems
QSystemLocale::query() was missing the LanguageId QueryType. Therefore
QSystemLocale::fallbackLocale() was always used as default language,
which reads environment variables in the order: LC_ALL -> LC_NUMERIC ->
LANG. The correct behaviour is to read LC_ALL -> LC_MESSAGES -> LANG.
This leads to problems for users that want to use english language, but
non-english localization features (date, number formats etc.)

Change-Id: I4310537dac8622a3dd79231fbad58e22f20ca262
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: John Layt <jlayt@kde.org>
2012-04-24 21:45:00 +02:00
Konstantin Ritt
f948bb3c6c qunicodetables generator: improve the output and the generated code
better memory usage report;
an additional asserts with conditions the implementation is depends on;
a namespace for the internal static data;
styling fixes

Change-Id: Id4048ff6104c56b5f590f9ac6fbf7c0bce79ec47
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2012-04-24 21:45:00 +02:00
Konstantin Ritt
ba0d752c2d workaround issue where casing diff overflows signed short
there are two such codepoints were added in the Unicode 5.1:
  U+1D79  LATIN SMALL LETTER INSULAR G
  U+A77D  LATIN CAPITAL LETTER INSULAR G
two more of them were added in the Unicode 6.0:
  U+0265  LATIN SMALL LETTER TURNED H
  U+A78D  LATIN CAPITAL LETTER TURNED H
and two more were added in the Unicode 6.1:
  U+0266  LATIN SMALL LETTER H WITH HOOK
  U+A7AA  LATIN CAPITAL LETTER H WITH HOOK

we map them like special cases with length == 1
(note: all are in BMP which is checked explicitly in the generator)

Change-Id: I8a34164eb3ee2e575b7799cc12d4b96ad5bcd9c6
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-24 21:45:00 +02:00
Konstantin Ritt
4ca3d4ebab QChar: reduce code duplication by inlining some methods
using templates for toLower()/toUpper()/toTitleCase()/toCaseFolded()
makes the upcoming patches smaller and thus easier to review

Change-Id: Ideb23e8669dbc2fe9ea3f129bf0137e1805ece11
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-24 21:45:00 +02:00
Jan-Arve Saether
fd87a4c7f6 Make NVDA read aloud stuff from a Qt app again.
Previously, NVDA did not read aloud anything from a Qt app.

Change-Id: Ie738e7e7d7acc54f45fab9195adc09bfde930174
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-04-24 19:41:05 +02:00
Jan-Arve Saether
961d460ecf Fix a regression where events were not delivered on windows
Regression caused by a17907829e

Change-Id: I8a2ca35cf176b4db47f29d848cbc2cd8180596d0
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-04-24 19:38:58 +02:00
Jan-Arve Saether
739579d15a Add QDebug operator<< for QAccessibleEvent
(Keep it internal)

Change-Id: I9e99ccbd16cc595d2aff97a26181e8d8c3d9d7ae
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-04-24 19:38:04 +02:00
Yan Shapochnik
33a4e3b470 Provide access to RTLD_NODELETE flag on Unix.
Introduce a new QLibrary::PreventUnloadHint to support the
RTLD_NODELETE flag support by dlcompat on Unix platforms.

Change-Id: Ib1327e968a2a888850ad1086a102a143f86c5090
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
2012-04-24 19:37:13 +02:00
Jeff Kehres
0723e14699 Integrate Blackberry Platform Services (BPS) with Qt event loop.
This ensures interoperability between the Blackbery C and C++ APIs
and makes it easier to expose platform services in C++ that are
exposed in BPS - since events from both APIs can be processed on
the same thread.

Change-Id: I7270adc64c26396f66d9126141500d5e58be51e7
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-24 19:36:55 +02:00
Thiago Macieira
77a816c00d Ensure that QUrl::toLocalFile returns decoded paths
QUrl::path() already decodes almost everything, but let's pass the
formatting flag to be sure.

Note: decoding of control characters from U+0001 to U+001F is not
implemented. Non-UTF8 sequences are also not representable.

Change-Id: I9a0ae2282ec3d48cc0e70e5b2d3824fb120709ed
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-24 19:36:55 +02:00
Thiago Macieira
092118855b Don't use the QRegExp methods that modify the object [QtGui]
QRegExp matching methods modify the object, which we don't want to. In
particular, when we receive a QRegExp from the user or we store in a
context that might require thread-safety, make sure we make a copy
before using it.

QRegularExpression has no such shortcoming.

Task-number: QTBUG-25064
Change-Id: If119e06221ca99e57c5ad1a1d4cc6468e9f68c7b
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-04-24 19:36:55 +02:00
Thiago Macieira
fd7e1cef9c Don't strip the leading slash of letter+colon paths on Unix
It's perfectly valid to have a path of /c:/a.txt on Unix, so don't
strip the leading slash unless we're on Windows.

Task-number: QTBUG-20322
Change-Id: I721bd0a65b41048bc735d4eaa0d536174164fe64
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-24 19:36:55 +02:00
Laszlo Agocs
63051701b4 Add flag in testlib to disable committing the simulated touch
Some declarative tests (e.g. 24319) need more fine-grained control
over processing the simulated touch events.

Change-Id: Ib163cfd29254016ea16e8d739ad97369b6ccdc90
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-04-24 19:36:55 +02:00
Kai Koehne
c0d249019b Allow qDebug output to be configured by qSetMessagePattern()
Add qSetMessagePattern() to configure the default
message pattern. This one can still be overwritten by setting the
QT_MESSAGE_PATTERN environment variable.

Without this method, there's actually no way to change the
default output programatically. Since QT_MESSAGE_PATTERN is
evaluated when the first message arrives, setting it via e.g. qputenv
might have no effect/be too late.

Change-Id: I115e0c30606f128fdbf5c169a951ffa2a6a48517
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-24 17:12:46 +02:00
Thiago Macieira
4544ec931f Update the QUrl documentation concerning the encoding
Looks like I failed to update this earlier, when the behaviour changed.

Change-Id: Ic020c2a14d4e9153f2bc9d22d943a3a380c0851c
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-24 17:02:23 +02:00
Thiago Macieira
2a683c1f14 Don't use the QRegExp methods that modify the object [QtTest]
QRegExp matching methods modify the object, which we don't want to. In
particular, when we receive a QRegExp from the user or we store in a
context that might require thread-safety, make sure we make a copy
before using it.

QRegularExpression has no such shortcoming.

Task-number: QTBUG-25064
Change-Id: I7c5f5ebf4521c32337c9ea9aeeef50e1e8690bf8
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-04-24 16:38:38 +02:00
Thiago Macieira
29d2aad30a Use the C99 keyword "restrict" in compilers that support it
This allows the compiler to produce better / smaller code due to not
being required to deal with two pointers possibly aliasing each
other. This also enables vectorisation where otherwise the compiler
wouldn't be able to do.

Change-Id: Ie7db3a54a1ba22f87ac5283d5c43905707957549
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-24 16:38:14 +02:00
Thiago Macieira
1765329b8c Mark some functions as always_inline with GCC and ICC.
These functions are too critical to be called. They should always be
inlined.

Change-Id: I698dc6d83e02c323759c6d066f17993340bd53a5
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-24 16:38:02 +02:00
John Layt
0060b44d70 QLocale: Clean up QLocalePrivate implementation
In Qt4 QLocalePrivate is a struct returned by a d() method.  This will be
unsuitable for the planned change to use ICU and may cause BIC issues.

This change makes QLocalePrivate a class and creates a new struct
QLocaleData to hold the data index.  Further clean-ups are possible
but are left for later.

Change-Id: Ie316a07790f74674a3b520b735dff72695cc4060
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-24 16:37:11 +02:00
Jędrzej Nowacki
feb736ef27 Cleanup QMetaObject string access.
We do not need operate on raw QByteArrayData, QByteArray gives us
better, stable API, without any performance penalty.

Change-Id: Idf47af2333c3694e81dcd31cd07d1a4720046df7
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-04-24 16:33:47 +02:00
Shane Kearns
6137067fc2 Fix tst_qtcpserver::serverAddress on Mac OSX
While linux returns the local address of dual mode sockets as "::"
i.e. the IPv6 address, OSX returns "::FFFF:0.0.0.0" i.e. the IPv4 address.

In the unix socket engine, treat both of these as candidates for
being a dual mode socket. This should hopefully cover other unixes
which we haven't tested.

Task-Number: QTBUG-25445
Change-Id: If1251018d54da98618223ba538c00ba54ac4cb4e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-24 15:58:26 +02:00
Martin Smith
20d901a555 qdoc: Further changes to the QML specialization
1.  Body elements to include type, property, method, signal, enum info, so:

qmlDetail to
- qmlTypeDetail
- qmlPropertyDetail
- qmlEnumerationDetail
- qmlMethodDetail
- qmlSignalDetail

2.  Same thing for a section that contains elements specialized for QML, so

qmlDef to
- qmlTypeDef
- qmlPropertyDef
- qmlEnumerationDef
- qmlMethodDef
- qmlSignalDef

Rationale for both items above is that otherwise the body and section
content models would have to be exactly the same for a type, property,
method, etc.

3.  For the import statement use:

<qmlImportModule>
<apiItemName>QtGraphicalEffects</apiItemName>
<apiData>1.0</apiData>
</qmlImportModule>

So we have an element indicating that this is for the import
statement, not an outputclass.  And no need to specialize the elements
inside it as we know from the ancestor (qmlImportModule) what they're
for.
<qmlImportModule> to be specialized from apiDef.

4.  The 'description' section name doesn't need to be specialized further from the API ref. DTDs so

<qmlDesc> should be <apiDesc>

The content model for the 'description' section would be similar to that of a normal DITA section, specialized into apiDesc in the API ref. DTDs, so we don't need to rename it for QML.

5. We need a separate element for the since information.

<qmlSince>
    <apiItemName>QtGraphicalEffects</apiItemName>
     <apiData>1.0</apiData>
</qmlSince>

6.  Public identifier should be like this for a type:

-//NOKIA//DTD DITA QML Type//EN

Not like this:

-//NOKIA//DTD DITA QML API Type Reference v0.1.0//EN

Change-Id: Ie9047965bf32a2e3e9339eb743f2019cb38c88e4
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-04-24 15:52:54 +02:00
João Abecasis
e92e5fda44 Migrate QString over to QArrayData
Change-Id: Ieadc60523a2bef61a088920576c65c720b11bfb9
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-24 13:51:37 +02:00
Markus Rathgeb
e998f971f6 Fix QMutex::tryLock timeout regression (integer overflow)
The timeout given in milliseconds should be converted to a timespec
struct.
To separate the seconds and nanoseconds the milliseconds are first
multiplied to represent the whole value in an int64 variable.
The calculation is done on integers, so we get an overflow if the
milliseconds are bigger then 2148.
If we cast the given value to an int64 we can avoid this problem.

Fix the used cast.

Task-number: QTBUG-24795
Change-Id: I864ae227cf7dda16a6f30aa4db74acc49e20f6eb
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-24 12:48:38 +02:00
Niels Weber
8643e1992f Improved detection of libcrypto and libssl.
The previous solution didn't work on systems where the libraries
aren't in the same location.
Now we search for both libcrypto and libssl and load them if their
versions match, even if they are in different directories.

Task-number: QTBUG-25398

Change-Id: I37164638890586947d07670d8a59fc53a84f9c42
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-04-24 12:48:38 +02:00
Friedemann Kleint
5d5d39b369 Windows: Fix for frameless widgets.
Let Qt::FramelessWindowHint take precedence over
Qt::WindowTitleHint (which enforces WS_CAPTION and thus
WS_DLGFRAME).

Change-Id: I2c0248d8a3ee3ed0f04b926acdef3cbeb98ca571
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-24 10:45:40 +02:00
Thiago Macieira
d8ce528400 Remove Qt 5 todo in QVariant: we're not going to change the behaviour
Task-number: QTBUG-25111
Change-Id: I2387767698c402e2bd0ecdfdd6ed41d4a224f1b6
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-04-24 09:20:09 +02:00
Miikka Heikkinen
4e7854e496 Change Windows font database to use qendian.h
Removed the custom BigEndian class and utilized qendian.h functions
instead.

Change-Id: Ieb10f77411404e1524fcedaceffa5b0e333c7429
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-24 09:18:14 +02:00
Thiago Macieira
42e152d5f2 Rename the default organisation from "Trolltech" to "Qt" on Mac
This doesn't seem to be documented -- or if it was, the documentation
has been changed.

Task-number: QTBUG-23269
Change-Id: Ie7aa51aeb251bfaa3d0018fbac4adc9517c97fa0
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-23 23:27:25 +02:00
Thiago Macieira
f02e1d6d8e Move QGestureEventPrivate's content to the main class
QEvent now checks that the d pointer is unused.

Change-Id: Ib0aa97d1692ea55324c4c6f133ffdd5a221f1680
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-23 23:26:44 +02:00
Thiago Macieira
d631c31235 Make QStringLiteral and QByteArrayLiteral always return the real types
Up until now, the macros would return an internal type that contained
the pointer to the data. This breaks code that tried to use the macros
with operators, like QStringBuilder but also when writing:

     QStringList() << QStringLiteral("a") << QStringLiteral("b");

This change seems to work fine now and I can also verify that this
works:

     const auto str = QStringLiteral("Hello");

Even though it creates a QString, which is non-POD and non-constexpr.

Change-Id: Iaf82af9bea4245513a1128ea54f9d2d3d785fb09
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-04-23 23:26:28 +02:00
Martin Smith
5a1fc72696 qdoc: Don't write '...' for empty <apiName>
qdoc now <apiName/>, when there is no name.

Change-Id: I0aa85eef633776f691c9e2238514194cf89b8a8f
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-04-23 19:20:19 +02:00
Martin Smith
a7bc21d010 qdoc: Update qdoc to use QML spec for DITA
qdoc now generates DITA XML from QML docs according
to the QML specialization.

Change-Id: I51d93c2ab3b1deefab9bbedcd2e752f49648809f
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-04-23 19:20:19 +02:00
Simon Hausmann
18f4da0d90 Removed unused QUrlPrivate::clear()
The function is not used anymore.

Change-Id: Idfdc0505358421a866b15e2ad322679a1808e223
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-23 19:20:19 +02:00
Thiago Macieira
e9e817accb Use the Q_PROCESSOR_* macros in qsimd.cpp
Change-Id: I7be9b14a24329be32c43603ae87df17328696109
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-23 19:20:19 +02:00
Sean Harmer
fe7c600fab Set thread name on QNX
Change-Id: I4fc786afce2e53676b148332dddd2c84228f7d87
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-23 19:20:19 +02:00
Giuseppe D'Angelo
a5565bcac0 QTimer: fix typo in singleShot optimization for 0 msecs
The SIGNAL/SLOT/METHOD(x) macros prepend a character between
'0' and '2' inclusive, and not '0' and '3'.

Change-Id: Ibdbf442422925a43f956b2ba70f1f9c6a2812305
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-23 19:20:19 +02:00
Thiago Macieira
3da8a33a62 Add missing private headers to testlib.pro
Change-Id: Id927b05374b9e82fbee029258f176223b8b32e90
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-04-23 19:20:19 +02:00
Thiago Macieira
34ea06eaac Move Q_FUNC_INFO to qcompilerdetection.h
Change-Id: Ibc63913f070febe561890e98ef079ca883d9bfc9
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-23 19:20:19 +02:00
Thiago Macieira
60c9c69379 Move the QT_STRINGIFY macro to the top of qglobal.h
This will allow me to use them in qcompilerdetection.h.

Also, leave them defined.

Change-Id: I73cb39e3cfcc2463d1d47a856e4a64354ebe743c
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-23 19:20:19 +02:00
Mark Brand
83c9ebbd66 QSqlQueryModel::setQuery() don't use deprecated reset()
Previously the method attempted to reset only as a last resort.

Now reset() is deprecated and resetting must happen between emitting
modelAboutToBeReset() and modelReset(). Since this suffices in all
cases to notify views that they must reinterrogate the model, it is no
longer necessary to signal explicitly row removals and insertions
within the scope of the reset.

Additionally, fetchMore() is now called within the scope of the reset
so insert signals do not have to be emitted here either.

This improved handling of resetting in QSqlQueryModel also allows the
cache in QSqlTableModel to be cleared directly at select().

This change may actually allow views to operate more efficiently since
they no longer have to react to separate row removal and insert
signals. Views can avoid pointless deallocation and reallocation
by considering row count only after the reset is finished. The cost is
that the columns and horizontal headers must be considered in the view
at each setQuery() call. In any case, it is not clear that trying to
be smart about this in the model justifies additional complexity.

Tests had to be adjusted where they expected explicit row removal
and insert signals.

Change-Id: I4f7eac1419824361d7d9bdcc6a87092b33e80d7a
Task-Id: QTBUG-25419
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
2012-04-23 19:20:19 +02:00
Mark Brand
508a90302b QSqlQueryModel::fetchMore() documentation fix
Change-Id: If046e674abad9c2dcff934a2fdd80d4133e1f4ad
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-04-23 19:20:19 +02:00
Stephen Kelly
d21f8c157a Build the QNX plugin with -no-opengl enabled.
Change-Id: I776a3eb0d7ada4399b8c191bbfa1e3ed9236b20e
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-04-23 17:04:04 +02:00
Olivier Goffart
ecba58500e Fix compilation of QDesktopServices without deprecated
Change-Id: I9e225d32b3f7db403cf3eea6a277580b4b7410a7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-23 15:39:24 +02:00
Olivier Goffart
55d1f56c28 Fix warning in qobject.cpp
Variable only used in debug mode

Change-Id: I6601ca68c427b909680423ae81802f1ed5cd178a
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-04-23 15:38:09 +02:00
Miikka Heikkinen
e95d94cbbd Windows: Fix QRawFont loading from data.
The implementation for loading QRawFont from data was missing from
Windows QPA plugin.
For freetype font database, just called the parent QBasicFontDatabse
implementation.
For native font database, ported the implementation from Qt 4.8
qrawfont_win.cpp.

Task-number: QTBUG-24197
Change-Id: Ia784d4cbc4f37c925aa49e53d04faf06a7169a73
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-04-23 15:37:23 +02:00
Casper van Donderen
3a78aabf3f QDoc: Support -indexdir on CLI and depends in qdocconf.
You can now specify a list of modules in the "depends" qdocconf
variable. This stringlist is then used by the -indexdir option to
specify in which directory to search for [depends entry]/[depends entry].index

Change-Id: Icab6dd0133e180ac04365da9605743def6fb754d
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-04-23 09:45:24 +02:00
Casper van Donderen
8d9cb38a66 Doc: Fix most QDoc errors in QtXml.
Changes:
- XML processing document moved from Qt XML Patterns.
- Moves documentation from /doc/src to /src/xml/doc
- Add new qdocconf file.

Change-Id: I4bc2104714a28905304997e5ff252e662ddf0bee
Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
2012-04-23 09:45:24 +02:00
Jonathan Liu
6289636365 Fix unmatched double quote character
Change-Id: I25fb7dac38db2800ce974d40ec275d510f6d47f4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-23 09:45:24 +02:00
Kalle Viironen
83c637aa94 Fix bug in qsslsocket peek()
Calling peek() for qsslsocket caused socket data to be copied into
qiodevices buffer and therefore make it unaccessible in qsslsocket.

Cherry picked form 4.8-branch & modified to Qt5 API changes
(int -> qintptr)
Original commits:
commit 621f18955082fc73471e75d1f8c35c2dcd4befeb
Author: Shane Kearns <ext-shane.2.kearns@nokia.com>
commit 68b1d5c17aa38d5921bdade2b0e0cb67c6c90513
Author: Kalle Viironen <kalle.viironen@digia.com>

Task-number: QTBUG-18498
Change-Id: I6be4b19baec2f3197537f5e7b61432040ec84ad2
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-23 09:45:24 +02:00
Stephen Kelly
47617f68cb Make the QNX QPA plugin work with non blackberry.
Change-Id: Id85d18d9f21711e8d53e8e4bfdf39d10e135f593
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-04-23 07:30:02 +02:00
Kevin Krammer
5c2e560fe9 Send Expose event when top level window becomes visible
Change-Id: I0b45c27fa03bbe073c88ce8d01d9fb283f4051c1
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-04-23 07:30:02 +02:00
Rohan McGovern
8dea797015 Removed invalid C-style license header from .pro file
/* C-style comments */ cannot be parsed by qmake.

Additionally, Qt Project legal has agreed that .pro files do not need to
be covered by license headers.

Change-Id: Ie4d75ee09c2fc85a2f954ec4a931b36ea9d51d93
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2012-04-23 04:28:54 +02:00
Michael Brasser
b332a6c1e4 Don't assume QAbstractDeclarativeData::objectNameChanged is available.
Preparation for removal from declarative now that a proper NOTIFY
signal exists.

Change-Id: If0acb73b73d17c49dc8de211d95ecd1e8e80ff1b
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2012-04-23 01:22:29 +02:00
Thiago Macieira
fcec903da7 Ensure that qXXXdetection.h can be included directly
Those files might have dependency on one another, on qconfig.h and on
early qglobal.h definitions, so ensure that the only correct include
order is that of qglobal.h.

Change-Id: I89098bacaf16353ee8b51604ee885508dc8e201a
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-04-21 11:19:39 +02:00
Thiago Macieira
f4227a7b86 Make the fallback Q_ASSUME and Q_UNREACHABLE be qt_noop
That way, we can properly add ; after them, and I can use Q_ASSUME in
Q_ASSERT's else condition.

Change-Id: Iad35819fbb06714116b7dd0f952e1c2c89044c72
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-04-21 05:09:24 +02:00
Thiago Macieira
4d55ba046c Move Q_DECL_{IMPORT,EXPORT,HIDDEN} to qcompilerdetection.h
Mindful of QT_VISIBILITY_AVAILABLE and Q_OS_WIN for GCC: when GCC is
used on Windows (i.e., MinGW or potentially Cygwin), use the declspec
variant so we produce proper DLL imports and exports.

When used on other platforms, rely on configure adding
QT_VISIBILITY_AVAILABLE to qconfig.h, which confirms that the
-fvisibility argument is available. That flag has been available since
GCC 4.0 on ELF targets, but it could be missing on some other targets.

Change-Id: I3dbc0043c1eaee0c469c5b1dc8bf05842fe9cd47
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-04-21 05:09:20 +02:00
Thiago Macieira
32758d917e Move some compiler macro definitions into the compiler sections
Makes for a couple of cleaner definitions of fallbacks.

Change-Id: I9b1a6f77bab986514e1862ae1f431ea37b89c1b5
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-04-21 05:09:18 +02:00
Thiago Macieira
308ffceea5 Move the compiler-related macros to qcompilerdetection.h
This cleans up qglobal.h a little further and organises things a bit
more.

Change-Id: Ic025e720941cdf59b8a1a0baf515b29f25eba0f1
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-04-21 05:09:14 +02:00
Jan-Arve Saether
45991b0f31 Compile on Windows.
The previous code was trying to sum one pointer with one string
literal...
Using QVarLengthArray should also potentially speed things up a bit,
since it will avoid a malloc if className is small enough (less
than 15 bytes).

Change-Id: I41218babb3030e7e6f9c31fc77e4af1c209ae0a5
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-04-21 05:09:12 +02:00
Stephen Kelly
40fe0721d6 Fix typo in backwards compatibility code.
The patch just submitted to Qt4 is not affected by this.

Change-Id: I3f38f1a56f2a9a2058b2c8ff0a6ee1715be41e85
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-21 01:24:05 +02:00
Olivier Goffart
7eebe4e960 Fix compilation with Q_DECL_OVERRIDE
In C++11, the override keyword is placed after the function declaration

Change-Id: I3a079860762f30fa21eb01611c770713f6ba4acb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-20 22:23:23 +02:00
Aurindam Jana
d8a1899682 QDataStream: Update Version info for doc
QDataStream::Qt_5_0 was modified in
aee1f6cc41
but the documentation was not updated.

Change-Id: I520798a7572b0f21cd275290bcd689e1b686d098
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-04-20 22:23:23 +02:00
Thiago Macieira
369863efef Don't push unnecessary data to a data stream for QVariant()
Adjust the test because we don't read past the end anymore.

Task-number: QTBUG-25108
Change-Id: I8243f1d5ae79d1256aab2cb1132598a716a7eeeb
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-04-20 22:23:23 +02:00
Shane Kearns
fffc900f78 Windows - "bypass proxy for local..." also affects IP addresses
If the "bypass proxy for local addresses" option is enabled in
the windows proxy configuration, then do not use the proxy for
any IP address in the subnet of any network interface.

As the systemProxyForQuery api is now offering HTTP proxy tunnels
for TCP sockets, this change avoids local ad-hoc network
connections being routed through the proxy.
In the case where the local address was on a different interface to
the proxy server, it may have been unreachable through the proxy.
For example IP over USB or Bluetooth.

Change-Id: I0842732832a7795112be029d923ed168edc008d6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-20 22:23:23 +02:00
Miikka Heikkinen
a941e0c0a6 Windows: Remove fontengine autodetection logic
Always default to native font engine as native fonts now work in
QML applications, too.

Change-Id: Iafa5f6d25a9a3b22f49763f287e4e358216cfc2d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-20 16:21:31 +02:00
Miikka Heikkinen
4c6d12e6d2 Fix missing Windows native fonts in QML applications
Windows native fonts were not getting rendered because the font engine
was cloned incorrectly for QRawFont, resulting in multi-engine instead
of the specific cloned engine.

Task-number: QTBUG-25410
Change-Id: I08f543e541739ac1b51f96f381ae1bb20b59399a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-04-20 16:21:08 +02:00
Casper van Donderen
ac090486c4 QDoc: Remove the text around previous and next page links.
Previously we printed "[Previous: <link>] and [Next: <link>]. After this
change we only print the <link>, which should include an icon.

Change-Id: I30d0c7d53b70ec2e537774d57a4ac9af01b26b16
Reviewed-by: Martin Smith <martin.smith@nokia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@nokia.com>
2012-04-20 12:46:47 +02:00
Lars Knoll
9ce1acd9e4 Revert "List QtPrintSupport as a dependency of QtPlatformSupport."
This reverts commit 9c7cdce672.

platform support does not and should never depend on widgets
or print support.

Change-Id: I828d1dfc02e7993325cf653ed92100750761eaae
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-20 12:46:47 +02:00
Friedemann Kleint
6331894524 Fix MSVC conversion warnings in new bytearray code.
Change-Id: Ifc81564daf3fef0d7f08ae8d250ba41d3b1d5b0f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-20 12:46:47 +02:00
Martin Petersson
a8a5b38b00 QSslSocket: call to ERR_free_strings to free loaded error strings
Since we are calling q_SSL_load_error_strings to load error strings
we should call ERR_free_strings to free the memory again.

Task-number: QTBUG-15732
Change-Id: Ie41291bb0e1434f82025378edfca51930712a8aa
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-20 12:46:47 +02:00
Morten Johan Sorvig
fb8cd418fb Fix crash in QCocoaBackingStore.
QWindow->handle() may be null during construction,
and also during calls to resize(). Get and check
the pointer at each call instead of caching it
in the constructor.

Change-Id: Icd950b55e16fdd2077e3b7fe3c3393d8b89b5903
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-20 12:46:47 +02:00
Thiago Macieira
80ad5938ea Stop using QEventPrivate::d in QWindowStateChangeEvent
We can add a boolean and avoid using the d pointer (which QEvent now
checks to be unused).

Change-Id: I7367d5410d10ed06441fe9037cac0e3473d62498
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-04-20 10:50:28 +02:00
Konstantin Ritt
65ae2151c3 mingw: fix a lot of annoying warnings
like "QRect::intersected() redeclared without dllimport attribute
after being referenced with dll linkage" (-fno-keep-inline-dllexport)

Change-Id: Id24e5ee857579ee9f97a60de0ab88ce3db8385cf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-20 10:29:14 +02:00
Morten Johan Sorvig
128b7c56b7 Implement QCocoaWindow::setWindowState.
Add window state change notification logic. Send
and expose event in addition to window state change
on window restore since the QWidget logic expects
this.

Modify QCocoaWindow::setVisible to sync up window
state that may have been set on the hidden window.

Refactor NSWindow event observing to use one observer
function for all notifications.

Add window state testing to tests/manual/windowflags
Add delay after showFullScreen in tst_qstatusbar to
wait for the Lion fullscreen transition.

Change-Id: I57c523cedd0644d4181b40d72046fad4fdb09a9c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-20 10:29:14 +02:00
Eskil Abrahamsen Blomfeldt
ca5918c8b8 Retain bidirectional marks when eliding text
When the text contains unicode markers for bidirectional
text, these will not affect the width of the text, but they
might affects its layout. Thus, we need to retain these
markers in the elided text to avoid the layout of the string
changing when its allocated width changes.

Task-number: QTBUG-3768
Change-Id: I3866c32cd1dcd5fff2b8fa5b25ae89e551531a97
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2012-04-20 10:29:14 +02:00
Kai Koehne
d9a1c2dff8 Logging: Change arguments of message handler to avoid conversions
Introduce a new QtMessageHandler that takes QString instead of
char *: This avoids converting to local8bit , only to convert it back
to utf16 for Windows.

The old QMessageHandler is kept for a transition period, but will
be removed before Qt 5.0.

Also fix qEmergencyOut (that is called in OOM situations) to not rely
on the default message handler.

Change-Id: Iee0ce5838f97175c98788b847964273dd22d4a37
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-20 08:37:06 +02:00
Martin Jones
1946740446 Provide versions of qRegisterMetaType() that do not normalize typename.
QML is quite capable of providing typenames in the correct format.
qRegisterNormalizedMetaType() does not normalize the typename, so
avoids the huge overhead.

Change-Id: I96c9a42fe0b5d36ac05a9247f6507dbf9583fa67
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-04-20 03:39:10 +02:00
Michael Brasser
7e9f7080b7 Minor QObject::receivers() optimization.
Don't lock if there are no receivers.

Change-Id: I922fad10436adeb27aa4f193cc0dcbaa3f0c0f1e
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-04-20 00:32:53 +02:00
Michael Brasser
5533cc9953 Minor QObject::receivers() cleanup.
Return 0 rather than false; remove extra Q_D().

Change-Id: I3dac733c3fae27c76790f09fd6b63356767a0363
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-04-20 00:32:43 +02:00
Michael Brasser
56d78e5086 Add a receivers callback to QAbstractDeclarativeData.
Change-Id: I767fabd66c7de535db26e779855d21ec5b94e947
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2012-04-20 00:32:32 +02:00
Andy Shaw
a48d9b52c3 Fix compilation with QT_NO_DEBUG_OUTPUT defined
Change-Id: If96e93c08240e0f626f8e465993b2c38b2cad832
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-20 00:29:39 +02:00
Konstantin Ritt
8e09e0dc45 QImage: fix declaration of inline methods
Change-Id: If97f423329705dccf98742089362db9eecb55087
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-20 00:29:39 +02:00
Thiago Macieira
a3f90fd44f Remove private classes in QEvent-derived classes.
QEventPrivate doesn't exist, so these classes were technically abusing
the d pointer.

Move the contents of the private classes into the main event classes.

Change-Id: If2e894c1fa05f468221a0b43f3ebdf90769298eb
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-19 23:42:26 +02:00
Thiago Macieira
5d0da01b54 Mark qt_assert and qFatal as non-returning functions (excpt. MSVC)
This allows the compiler to optimise the code a bit better: since they
don't return, it can assume in the code after the Q_ASSERT that the
condition was true.

MSVC is the exception: with MSVC, we have the CrtDbgReport dialog,
which allows the developer to continue execution, inside the
debugger. Therefore, we can't mark any of those functions as
non-returning because they can, after all, return.

Unfortunately, the Q_ASSERT usually expands to no code in release
mode, so the improvement in code generation happens in debug mode
only...

Change-Id: I4d542d6853cd51c71ffab1d563ed64ef7c419115
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-19 22:15:16 +02:00
John Layt
886aea1250 PrintSupport - Remove Qt5 To-do Messages
Task-number: QTBUG-25085
Change-Id: I4cf3cc4827f5cc0eeade36cfde94472fab3abb92
Reviewed-by: John Layt <jlayt@kde.org>
2012-04-19 22:15:16 +02:00
Shane Kearns
af100dbd7e Abort background requests if policy changes to disallow them
Using the policy change signal from QNetworkSession.
If the new policy disallows background requests and this is a
background request, then generate an error.
This results in a TCP RST on the socket, and a
BackgroundRequestNotAllowedError on the QNetworkReply.

If the reply is already finished, no action is taken.

Change-Id: I4ff5c681a8b7b852727bb95f03664d666f4efe07
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2012-04-19 19:46:07 +02:00
Shane Kearns
a1e961705c Connect usagePoliciesChanged signal to the QNetworkReply
Change-Id: Ibb8ba0b3226e402dfa9a5a1a64faa80702b11dd7
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2012-04-19 19:46:07 +02:00
Shane Kearns
96fe7dad38 Set ConnectInBackground also for http implementation
Change-Id: Id82322250d86f35702036c64d725c9d093046d5b
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2012-04-19 19:46:07 +02:00
Kim Motoyoshi Kalland
8aa0be210a Removed legacy pixmap and image cleanup hooks.
Task-number: QTBUG-25114

Change-Id: Id87172665ec15874e293e3891738e6366aef4554
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-04-19 16:57:08 +02:00
Konstantin Ritt
907909d858 fix qsslsocket build in -permissive mode (assigning const char* to char*)
Change-Id: I76269630ebabdf601c2fcb5f65a8dffbd6cdbc5e
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-19 16:44:47 +02:00
Girish Ramakrishnan
0074cc5d34 Fix detection of default platform plugin.
Let configure generate the QT_QPA_DEFAULT_PLATFORM_NAME in
qconfig.h. This allows us to override the platform name
using a configure argument.

This commit adds -qpa <platform> that lets the user specify
the default platform at configure time. Note that the default
platform is not checked against the tree since plugins are
allowed to exist outside the Qt source tree.

In the absence of -qpa argument, configure checks the mkspec
for a variable named QT_QPA_DEFAULT_PLATFORM. This check is
implemented only in the unix configure because it will be primarily
used in custom mkspecs (devices, boards).

If -qpa argument is absent and the mkspec variable is absent,
the default value is determined based on the OS as below:
    Unix - "xcb"
    Windows - "windows"
    Mac - "cocoa"
    QNX - "qnx"

Done-with: Jørgen Lind

Change-Id: I0df31811a1b901a3242bfada1232e596ebda04f4
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2012-04-19 16:40:29 +02:00
Bjoern Breitmeyer
14ea50598f Fixed QSimd WindowsCE build
Change-Id: I94de251cf1f283d30f92d0fb9d37a1646765cbdd
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-04-19 16:27:22 +02:00
Konstantin Ritt
d48f3fc1e7 fix undefined behavior issue on Integrity
in contrast to ::strdup(), qstrdup() allocates memory via new[];
deallocating this memory with free() leads to undefine behavior.

Change-Id: I0692c4bef010c05de547283b00b6c6043ac24c79
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-19 15:58:03 +02:00
Konstantin Ritt
f4d02ecdbf optimize canonicalOrderHelper() for generic case
if there is no need to swap codepoints A and B,
then we proceeding with advance to the next codepoint B
that becomes A, and some next codepoint C becomes B;
in such case we can easily skip the re-calculations for A
by using previously calculated results for B

Change-Id: I5c63589c274acaddf0f6a4cb1e0608d352a0c1b3
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-19 15:57:38 +02:00
Konstantin Ritt
73423db31d qwindowsintegration: fix build with -no-accessibility config option set
Change-Id: I2f4080b04f61ec425d41180f0163cebcc745c1b9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-19 13:26:51 +02:00
Casper van Donderen
c4e308d3f7 QDoc: Generate index file for DITAXML.
This change moves the fullDocumentLocation function to the generator
base-class and adds generateIndex to the DITAXML Generator.
All function calls to fullDocumentLocation are now handled by the static
function in the base-class which will use the file extension from the
currently active generator (either DITAXML or HTML).

Change-Id: I24ce09c05a63eb5980b1243c58990e7ce9d42036
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-04-19 13:26:51 +02:00
Thiago Macieira
77cc912590 Don't use QByteArrayLiteral for a non-stored QByteArray
Unless you're creating a QByteArray that you will store, don't use
QByteArrayLiteral. Using it for 1 byte that is always concatenated to
something else is an extreme waste.

Change-Id: Icc29e4c4cb1d0aad1714bdeec8ff41da7c301af9
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-04-19 13:26:51 +02:00
Thiago Macieira
275945f144 Add an assertion to deleteLater() before it modifies QEvent::d
The deferred deletion functionality stores the event loop level
nesting count in the QEvent d pointer. In Qt 4, this d pointer was
not usable because we forgot to add a proper copy constructor and
assignment operator to it, so the deleteLater() process stored the
count here safely.

Since Qt 5 now has non-implicit copy methods, the d pointer could be
used in the future. If QEvent uses it, this assertion will
trigger. Note that it doesn't apply to classes derived from QEvent,
though.

Change-Id: I8600c8e9379921e32aca166bc0a6c0b4c4ed799f
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-19 12:14:30 +02:00
Friedemann Kleint
a633d80efe Fix font substitutions.
- Remove remains of platform-specific substitution tables in QtGui.
- Deprecate QFont::removeSubstitution() in favour of
  QFont::removeSubstitutions() (as suggested in the comments).
- Clean up substitution code, remove postfix operator++ on
  iterators and repeated invocation of .end().

Change-Id: I2e82e4ce2dd357d49e4d2b7fd6f95785acfcda95
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-19 11:07:25 +02:00
Konstantin Ritt
21eb4578e5 replace getenv("HOME") with a "centralized" QDir::homePath()
Task-number: QTBUG-4902

Change-Id: Ie9124de45be2d8e859f8b0aaea246e660145a1c5
Reviewed-by: John Layt <jlayt@kde.org>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-19 11:07:25 +02:00
Samuel Rødal
197aa9f67f Get rid of warning when building qplatformwindow_qpa.cpp.
This Q_UNUSED was unintentionally lost in 55fa3c189f.

Change-Id: I832ee7c8d46cf66f7b63045015bef181fddebeef
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-04-19 11:07:25 +02:00
Sean Harmer
4c0289c337 Do not force OpenGL sample buffers on in the qnx qpa plugin
Change-Id: I6af40382102f2163f5ad8606b498a89db420c5d6
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-04-19 11:07:25 +02:00
Laszlo Agocs
56850d6cd7 Remove internal QClipboardEvent
This class is not in use with QPA.

Also remove useless sending of QEvent::Clipboard from the
QGuiApplication dtor. That event is not (cannot be) handled by the
platform plugins and is not used at all. Perhaps it should be removed
altogether from the public API.

Change-Id: I478b31ff9875a8dfff99bddafd335ab02a5fe477
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-19 11:07:25 +02:00
Jędrzej Nowacki
ff55d64f67 Remove QVariant constructor taking Qt::GlobalColor.
The constructor is wrong, it creates instance of QVariant encapsulating
a QColor instance. QVariant should not implicitly convert data, never.

Change-Id: Idc794ecdecb42d8b53fee3f993bf51ddd43f595d
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-19 10:09:39 +02:00
Hannu Lyytinen
1267bd82a4 Extend QUDeviceHelper to detect DRM graphics devices.
KMS QPA plugin duplicates udev code needlessly; merging the
functionality here.

Change-Id: I69be8549f1feee298fe28215d491c8ce5de96b18
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
2012-04-19 08:48:18 +02:00
Toby Tomkins
02242a8b01 directfb: Fix namespace compilation.
Change-Id: I55450e0585092f0b052cf6755acc541915c411e5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-19 08:17:28 +02:00
Casper van Donderen
0bc02fd0d6 Doc: Prepare for building modular QtCore docs.
This change fixes most qdoc errors in QtCore. There are about 900 left.
The main thing this change does is moving documentation from qtcore from
/doc/src to /src/corelib/doc.
Other issues resolved are mis-use of qdoc commands.

Change-Id: I002d01edfb13575e8bf27ce91596a577a92562d1
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
2012-04-19 07:34:53 +02:00
Ian Dean
22042dd769 Change coreservices -> ios
Replace "contains(QT_CONFIG, coreservices)" with "!ios" in config files.
Replace "QT_NO_CORESERVICES" with "Q_OS_IOS" in source files.

Change-Id: Id3b02316b245a24ce550e0b47596d18a4a409e4f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-04-19 01:57:58 +02:00
Konstantin Ritt
9a7f7b5d34 qdbusxml2cpp: fix build on Windows
bootstrapped process defines QT_NO_LIBRARY but QT_NO_LIBRARY
is not supported on Windows

Change-Id: I353a8690832e292522ed6c39a7e0ca19b0980e01
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-19 01:57:58 +02:00
Jędrzej Nowacki
b3e55fbf4e Do not assert when QVariant is constructed from an invalid type id
That change also fix moduleForType() which was wrongly recognizing
negative ids as belonging to Core.

New tests were added.

Change-Id: I40a5819effb32489a45937011980457387c9f8be
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2012-04-19 01:57:58 +02:00
Eskil Abrahamsen Blomfeldt
06d4ea6400 Fix memory leak when drawing text in non-common script
When the font engine cache was updated for new parameters, we
would overwrite the cached engine, but not deref the old
cached engine, thus it would never be deleted.

This is manual cherry pick of 44c14470e5b28e45c19d6959b114e063cf3f4d83
from 4.8 branch.

Change-Id: Ice2e555fe380dc9851ef490fa1a6928936ae4c35
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2012-04-18 23:26:01 +02:00
Samuel Rødal
197b423e96 Optimized EGLFS backing store a bit.
Avoid expensive image copying when possible.

Change-Id: Ia79919ea7652d7bfdd744198c494c20cb78a0f48
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-04-18 22:23:53 +02:00
Girish Ramakrishnan
10c88faf79 api: remove QWindow::visible()
The correct api is QWindow::isVisible(). Removing the api
is safe since QWindow is not even released yet.

Only qtdeclarative needed to be fixed with
71c8fe296fe5aa7e79033dd8f5b539852d4276e0.

Change-Id: Ie571ed4802fe89132419e402acdb854446f4578f
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-18 21:24:25 +02:00
Stephen Kelly
e8e3049d31 Fix unused variable warning.
Change-Id: I8daa2912e1c26e9e9f6bb77f64eb3e06c6715cce
Reviewed-by: David Faure <faure@kde.org>
2012-04-18 17:28:47 +02:00
Girish Ramakrishnan
21102a71ff api: QGuiApplication::inputMethod should be static
Pretty much all methods in QGuiApplication are static.

Also adds documentation.

Change-Id: I96808dd266922432b92fe3962292e4d5b6a8ab46
Reviewed-by: Pekka Vuorela <pekka.ta.vuorela@nokia.com>
2012-04-18 15:11:13 +02:00
Stephen Kelly
cd2b94771c Fix some unused variable warnings.
Change-Id: I3ffbb155c0efa65bb33a0e2ce80dbd75dc56f3fc
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-04-18 14:23:27 +02:00
Jędrzej Nowacki
9ecce11261 Remove redundant check in QMetaType::typeInfo
The check was introduced when void was not a fully defined type.

Change-Id: I4df8607999436f8db92be77fc8fd203fc66c2816
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-04-18 12:16:20 +02:00
Jędrzej Nowacki
ab0bcd0792 Remove redundant checks in QVariant.
QVariant and QMetaType have aligned type naming implementation.

Change-Id: I9eaae1045c492c148e3e9d23f4e04d48272f7ec2
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-04-18 12:16:09 +02:00
Jędrzej Nowacki
6f0065944d Hide QTypeModuleInfo in a private namespace.
The class is private and shouldn't pollute global namespace.

Change-Id: Ib44473fd72e5a70096eeff1662e88b29263d19c6
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-04-18 12:15:52 +02:00
Stephen Kelly
50aca3d020 Fix some unsigned comparison warnings.
Change-Id: I4e72dbb6e207757c8bb75a7726c83ed5916df094
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-04-18 11:36:05 +02:00
Stephen Kelly
3b1a52b573 Fix build with QT_NO_CLIPBOARD.
Change-Id: I82558e1e432934b98236d69106fb98e44e819095
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-04-18 11:36:05 +02:00
Kim Motoyoshi Kalland
f13acef7ba Remove todo comments that are no longer relevant.
Task-number: QTBUG-25067

Change-Id: I5d3022a2881a3c6c97429f609fe567bd9970a046
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-04-18 11:36:05 +02:00
Lars Knoll
23ad9c3cf2 Revert "Fix memory leak of QFontEngineData"
This reverts commit addffb71b4.

The fix causes crashes on exit in Qt Declarative.

Change-Id: Ib1fc67c27fb1869b7824ba080083da67b8878fff
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-18 08:58:58 +02:00
Tasuku Suzuki
f5c3226f58 change NSTextInput to NSTextInputClient in Cocoa plugin
NSTextInput protocol is slated for deprecation

Task-number: QTBUG-23867
Change-Id: I3f9eadc31bdf4234c63f1bcde5172f22da8d340e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-04-18 01:33:57 +02:00
Janne Anttila
7bab41a681 Fixed libjpeg compiler warning about macro redefinition.
When compiling Qt for Windows CE the MSVC reported the followin warning:
    warning C4005: '_CRT_SECURE_NO_DEPRECATE' : macro redefinition
Fixed by adding ifdef quard for duplicate _CRT_SECURE_NO_DEPRECATE.

Task-number: QTBUG-22512
Change-Id: I8c37ffe6ca275c80a7b7e6b23f39f3ab06b332f1
Reviewed-by: aavit <qt_aavit@ovi.com>
(cherry picked from commit 1a1a8f004824b981865c6239747ff05d8e6f812a)
2012-04-18 01:33:57 +02:00
Mark Brand
00bf077b98 remove useless workaround
The workaround attempts to let the application reserve memory in
QString for receiving the stored procedure output parameter.
This does not work because the reserved capacity is not preserved
through QVariant.

Unfortunately, the application must actually populate QString with
at least the number of characters that will be received.

Change-Id: Icb3be60d6bd570ad2349f20fb7d93b340e395627
Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-04-17 23:16:51 +02:00
Mark Brand
f869a12c10 QTBUG-18435 fix stored procedure output parameters on ODBC
Follow-up to c55a99965d8c08d5f924d49db4fe4aa49df8096.

3 problems prevented stored procedure output parameters from working.
- SQLBindParameter needs access to buffer provided by QByteArray.
- The length of the buffer is measured in bytes.
- A typo corrupted conversion back to QString.

Also, data() makes more sense than constData() to expose the buffer.

Task-Id: QTBUG-18435
Change-Id: I66444b13c0f584ed79bcf026e5a23caff83c22cb
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-04-17 23:16:51 +02:00
Frederik Gladhorn
84e782e2bd Only send progress bar updates when visible.
Screen readers tend to announce progress.
Some applications (for example KMail) have hidden
progress bars that update frequently.

While the applications should be fixed, it's better
not to spam the user with continous progress announcements.

Ported from Qt 4 patch.

Change-Id: I5f3b5a83dc80594d995b10e58527115de8601c77
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
(cherry picked from commit 90dc28900d3abfb00a65fef1d9daf36e727dfdca)
2012-04-17 23:16:51 +02:00
Frederik Gladhorn
c65a558e00 Accessibility: Check for valid range of tree items.
This might lead to crashes otherwise.

Change-Id: Ib28ac03b7d200571a0e759467eb692cfee3b05f3
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-04-17 20:58:49 +02:00
Frederik Gladhorn
d64ad022f3 Use parentheses in statement with && and ||.
Forwardport from Qt 4

Change-Id: I4f968559a7371b87343cb5825eb83b0099364cf2
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
(cherry picked from commit 330b0bece4d7805067f488c157532f9fb9b48bbc)
2012-04-17 20:58:49 +02:00
Konstantin Ritt
dab2e1fea7 QThreadPool: unify waitForDone() overloads
Change-Id: I1515a65fab37588372794422a43ed09ac076e108
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-17 18:44:13 +02:00
Konstantin Ritt
cbaf52b099 QThreadPool: optimize enqueueTask() for common case
the most-common case is: queue is empty or filled with tasks of
the same priority; so the runnable would be put at the end of queue.
both checks are cheap for us.

also avoid detach()'ing by using const iterators

Change-Id: Iab2255f852211f9accc8d717f778671661210ef3
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-17 18:44:13 +02:00
Konstantin Ritt
95bd974163 fix QChar::decompositionTag() returns wrong result for Hangul syllables
Change-Id: I28e7b14b6a90aa539f8a50107737a66b3484fc00
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-17 18:44:13 +02:00
Konstantin Ritt
087cda285f fix QChar::isPrint() returns an incorrect result.
results are now equals to results of ICU's u_isprint() for the entire set
of the Unicode code points

Change-Id: I763f4b37cccd285eb01543d486f25bd7ea011241
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-17 18:44:13 +02:00
Samuel Rødal
a73125bada Fixed RGBA <-> BGRA bug in EGLFS backingstore.
Better to swizzle in the fragment shader than to do a byte swapping
operation on the CPU.

Change-Id: I01420c3a5ceb5309f5648e1f86979b025bdd88aa
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-04-17 16:28:46 +02:00
Janne Anttila
ec49bcb2e4 Fixed MSVC compiler warning for zlib when compiling on WEC7.
WEC7 mkspecs define _CRT_SECURE_NO_DEPRECATE globally. zlib redefined
the same macro without checking if it is already defined. Added #ifdef
guard to zlib when defining _CRT_SECURE_NO_DEPRECATE.

Task-number: QTBUG-22512
Change-Id: I477b24b7bc0ebb4cd8a619b11668eceb0f5064d4
Reviewed-by: aavit <qt_aavit@ovi.com>
(cherry picked from commit a0a970447d63e5c9afdb55d179d671d9c24e9061)
2012-04-17 16:28:46 +02:00
Pierre Rossi
46556529ec Fix a thread safety issue with QTextLine::glyphRuns
This is a very partial revert of 10ac80708.
Revert back to using engineFromScript, which is reentrant, for cases other
than the "rawfont mode". In that last case, reentrancy is not a big issue
so far as the only client is WebKit, and this is used in the web process,
with no threaded rendering.

Change-Id: I047b04cf0236d52e6d548f34cddd3dcc7c3c5f83
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-04-17 16:28:46 +02:00
Jian Liang
addffb71b4 Fix memory leak of QFontEngineData
Move QFont::cleanup(); and cleanupThreadData(); to the end of destructor
of QGuiApplicationPrivate class. This is because they will trigger the
QFontCache::~QFontCache() function being called and at that time the
platform_theme object still hold some fonts object, This will cause the
QFontEngineData object hold by those fonts can never been deleted.

Change-Id: I4d3f21c5e2683706f68395ba3ad24203081e1d1d
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-04-17 16:28:46 +02:00
Jørgen Lind
ba1309e1f4 Add function getters in the native interface
Change-Id: I4609071e38c3807479375ef98f260516da03ec15
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
2012-04-17 16:28:46 +02:00
Casper van Donderen
1d0ed55e6e QDoc: Write subclasses of namespaces in automatic ditamap.
Now we also write the subclasses of namespaces sorted to qt.ditamap.

Change-Id: I4a4376bac208b9bacd5a2ddd5265faef13dc2eba
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-04-17 16:28:46 +02:00
Jan-Arve Saether
19768e115a Add some missing \internal for accessibility
Change-Id: I42c0a14908cfcccd2218f887b286515fef8d6611
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-04-17 16:28:46 +02:00
Stephen Kelly
7c3684dff7 Fix out of bounds use of QVector API.
This is a regression introduced by commit
22b7d21186.

Task-number: QTBUG-24965
Task-number: QTBUG-25140

Change-Id: I3f3bfe23af802444b078a29ee5565dd2bd24a34d
Reviewed-by: David Faure <faure@kde.org>
2012-04-17 16:28:46 +02:00
Lars Knoll
64255ef650 Merge remote-tracking branch 'origin/api_changes'
Change-Id: I964b0a6f5c38351fdfafb8a2a128a349ff8c89d1
2012-04-17 12:58:52 +02:00
Sergio Ahumada
16b53b2f0e Merge "Merge remote-tracking branch 'origin/master' into api_changes" into refs/staging/api_changes 2012-04-17 10:38:24 +02:00
aavit
4a9fb41a79 Upgrading libpng: Patches to libpng 1.5.10 for Qt usage
This is the collection of those earlier patches to libpng in Qt that
are still relevant, updated as required. For details, refer to the git
history of the src/3rdparty/libpng directory of Qt 4 and Qt 5/qtbase.

Change-Id: Ia922441024536eec9b8ced8c3c5e4dc941ae152f
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
2012-04-17 10:15:56 +02:00
aavit
1fa1ce3628 Upgrading libpng: Adding clean copy of libpng 1.5.10
This commit removes the previous version of the bundled libpng
(1.5.4), as well as all local modifications to it. It adds an
unmodified copy of the official libpng source distribution, except
that various extraneous files have been removed, as usual.

The patches required to build it in Qt will follow in separate
commit(s).

Change-Id: I90149f87fc889c44a3b60b21cdf755020f3a8e39
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
2012-04-17 10:15:48 +02:00
Bradley T. Hughes
bffbfc5b33 Cocoa: allow timer activation to recurse
CFRunLoopTimer's callback will never recurse. Since we are using one
CFRunLoopTimer to drive all Qt timers, we need to work around this by
sending all timers via a dedicated CFRunLoopSource (since these
callbacks can recurse). We also need to block this new timer source
along with the posted event source when calling processEvents()
"manually" to prevent livelock deep in CFRunLoop.

Change-Id: I375e46b6cfa0c76db678a1085314d42d8996d062
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-04-17 10:15:44 +02:00
Bradley T. Hughes
2afeb07227 Add QPlatformWindow::setWindowModified(bool)
Mac OS X provided a platform API for marking a window/document as
modified. This previously worked in Qt 4, so we need to have an
interface to keep this working in Qt 5. If the platform window does not
provide an implementation, fallback to setting the window title.

Note that this does not add any QWindow API, it's only in
QPlatformWindow.

Change-Id: I84c5a5df8536859157f2b1fa9e4cc647a09fd06d
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-04-17 10:15:44 +02:00
Girish Ramakrishnan
2c13dc7482 api: remove QWindow::move
QWindow::setPos is the correct api.

Change-Id: I5439338e9bc6933800d66331f20ce554b017c4fb
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-17 06:19:52 +02:00
Girish Ramakrishnan
f285356e88 api: Fix const correctness of api in QScreen
const was missing in many convenience functions.

grabWindow should not be const since it actually does something.

Change-Id: I0ffa718878d4251c4fb5c34789cf58ebb85cff37
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-17 06:19:49 +02:00
Girish Ramakrishnan
6094197294 api: Make QGuiApplication::styleHints() static
Practically all functions in QGuiApplication are static.

Change-Id: I5948620865c021029a3c04b31901b1110e6c0d27
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-17 06:19:47 +02:00
Bradley T. Hughes
5a57ddebf5 Fix tst_QDialog::deleteInExec() crash on Mac OS X
When destroying a window immediately after showing it, we can sometimes
provoke a crash in Cocoa after the show-window-animation has finished
(which appears to assume that the window's view will always be valid).
Prevent the crash by not removing the view from the window. When
recreating a window, we explicitly release the old window, but we do not
release the view, so we can freely add it to the new window (i.e. this
does not introduce new bugs related to recreating the platform window).

Task-number: QTBUG-24977
Change-Id: I466ce75b04785401032a0a2d4a2c494910cd1672
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-04-17 03:28:29 +02:00
Donald Carr
a2e42a6a0a Reintroduce testlib to widget free builds
testlib now compiles without widget support and it will be great to get
this code path QAed and testable.

Change-Id: Iceb641bf04fdac84ef0a0f86d0abb83f4c66bf80
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-04-17 03:26:32 +02:00
Qt4iOS
4a4e9e4a9c Add support for iOS.
Provide support for platforms with older implementations of
realpath() (eg. iOS).

Change-Id: Iec7f73c8014d238ae6a2cb2fa836b36b89ce4ef6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-04-17 03:26:32 +02:00
Bradley T. Hughes
768e587cdc Add QPlatformWindow::windowEvent()
This function is used to pass non-spontaneous events from QWindow to
QPlatformWindow so that QPlatformWindow subclasses can do any platform
specific event handling (such as setting/clearing modality flags on
QEvent::WindowBlock/WindowUnblock).

Change-Id: I82a89e8dadcd2f706aae25889d79cbfac9c2ee18
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-17 01:13:52 +02:00
Donald Carr
d4c4723583 Remove incorrect inclusion of GL support headers given EGL presence
The include files have a hard dependency on OpenGL (ES2); testing for the
presence of  EGL support is insufficient grounds for including this
functionality

Change-Id: I391b5dbbcbef40ecf68d16617b6eb1c0bb4b799e
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-16 22:55:26 +02:00
hjk
6e1594e456 Make {TCBPoint,QEasingCurveFunction}::operator==() const
This is needed to use the classes with standard algorithms
and is the Right Thing anyway.

Change-Id: I13d1e0bfabbd216319cc138f11a9b3240f093052
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-16 22:33:50 +02:00
Donald Carr
5ba9c07ddd Handle window state changes correctly in EGLFS
The only valid state for EGLFS is fullscreen; this change reduces EGLFS to
reflect this cruel reality

Change-Id: I5aa9b4ef88451a00ce9de328add7d5512e1c86b5
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-16 22:33:43 +02:00
Samuel Rødal
c2cd2a0cb8 Implemented raster based backing store for EGLFS plugin.
This improves quality of rendering for QWidget-based applications a bit.

Change-Id: I6b832d1de7e722f4dbe4e82882f5db35f0b8c30c
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-04-16 21:42:19 +02:00
Bjoern Breitmeyer
0e317af13f Fixed networkproxy build under WinCE
The used functionality is partially not available under WinCE.
qnetworkfunctions_wince.h encapsulates the needed extra symbols.
It only needs to compile as the functions are loaded dynamically.

Change-Id: Ieb9010d4f6c7f94d39918b869ac503976e094e49
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-16 19:04:38 +02:00
Martin Petersson
0a5440b2f0 Responses to request with AlwaysNetwork set should be cached
Previously the cache was not enabled if the request had AlwaysNetwork
set. This removes the check for the CacheLoadControlAttribute when
checking if the cache should be enabled.

Task-number: QTBUG-15805
Change-Id: I3d0722fbc1e6c77c5b947a2af0a09e2de8f4f9df
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-16 18:35:58 +02:00
Richard Moore
2b1e0940fd Trivial doc fix.
Change-Id: I837c74d38b9f73aed41c3839421f5faad9d22f3f
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-16 18:35:49 +02:00
Richard Moore
591ad20a0b Minor doc improvements.
Change-Id: Ic14cefcf935fea822c581013f437ae61b820ddd9
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-16 18:35:09 +02:00
Girish Ramakrishnan
5369f50686 Add 'we mean it' header to qpa headers
The QPA api is internal and not meant to be used by app users.

Change-Id: I37245e9635bf22f2454e763699dd58eca6565b63
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-04-16 18:31:52 +02:00
Girish Ramakrishnan
a718a99438 doc: Mark all qpa classes as internal
All QPA api as marked as so:
    * preliminary - the api is subject to change anytime
    * internal - internal api that shouldn't be used by apps
    * ingroup qpa - "qpa" module. In the long run, qdoc should
      generate documentation for qplatform* API as if it were
      a seperate module.

Change-Id: I4e76c0e0c1805c679cabd52d5006f9fa9bc411c0
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-04-16 18:31:39 +02:00