Commit Graph

6716 Commits

Author SHA1 Message Date
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
Thiago Macieira
2af70ba396 Define P in stringbuilder.cpp, just to help in editing in the editor
Otherwise it keeps thinking that we have an error.

Change-Id: I8175e34dc6421884b89de9165193e32b6cdf1b62
Reviewed-by: hjk <qthjk@ovi.com>
2012-05-03 06:10:07 +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
Rohan McGovern
fb44114e06 tst_qdnslookup: disabled broken testdata
The mentioned records for råkat.se cannot be resolved.
Note these were marked with a FIXME in the first place.

Change-Id: I4ea3bbb0aec8ca1b3487c44656b48a8715228886
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2012-05-03 06:08:49 +02:00
Raphael Kubo da Costa
f42a61e76a mkspecs: Define compilers and linkers elsewhere for freebsd-g++46.
Commit 996672933a has made the
freebsd-g++46 mkspec use g++-base.conf, which on its turn resets
QMAKE_CC and QMAKE_CXX to other values.

Redefine them to gcc46 and g++46, respectively (and fix the linker
values) after the inclusion of g++-unix.conf so the settings are not
lost.

Change-Id: I2d03548fdc492c5e4c4744b636b29df2cefe2acd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-05-03 05:55:14 +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
Kai Koehne
2f105af8de Enable QML debugging of qtquick1 with CONFIG+=quick1
Make the option name align with the name of the module.

Change-Id: I29a822b55b3cb52a51592aa2bd0746a53bfe44b9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
2012-05-02 12:21:55 +02:00
Andreas Holzammer
a3a1fea094 Support mkspecs in subdirs for xcompile under windows
Support mkspecs in subdirectories for cross compilation
under windows. Mkspecs in subdirectories are separated by
slashes.

Change-Id: Id3954cc38df2922b20156589335faad989ec0537
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-05-02 12:16:39 +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
Sergio Ahumada
62185f07f8 configure: Escape '{' in getQMakeConf2 function
Change-Id: I7df0ca940a76b80d7b0da24dbedbabd2b8736bb8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-05-01 07:10:55 +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