Commit Graph

7048 Commits

Author SHA1 Message Date
Martin Petersson
3e697188da tst_QNetworkReply: enable the ioGetFromBuiltinHttp test.
This can be enabled again now. The sender transfer test is still not
re-enabled since the test would take to long to run if sending
enough data to overwhelm the reciever's kernel buffers.

Change-Id: I4056fdca53ec8ebbcc53dfdc814d8bfdbc73f7ce
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
2012-05-16 04:24:38 +02:00
Martin Petersson
384c155627 QHttpNetworkReply:readBodyFast return early if nothing to read.
Incase there is no bytesAvailable on the socket there is no need to
try to read.

Change-Id: Ied9e4b8d86854b356a733fab4948739db206b6ad
Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-05-16 04:24:35 +02:00
Martin Petersson
7ba7dddffd QNetworkAccessManager: Read all from socket on remote host close
When we get a remoteHostClosed we should try to read everything from
the socket before we close the channel.

Change-Id: Iaa87d79ea16d69735f6ba3e8b3b4a0f86fbd5f73
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-05-16 04:24:32 +02:00
Andy Shaw
cfb44c6528 Fix cases where functions are called with a drive and no slash
When a file is specified on a path that includes a drive letter
followed by a colon but no slash then it didn't always account
for the fact that this refers to the current path on that drive.
This fixes the problems in completeBaseName(), baseName() and
path().  Tests are also added for these three cases and some
others too.

Task-number: QTBUG-25353

Change-Id: I47a197c6af066f532442ad269be57597ec61303a
Reviewed-by: Irfan Omair <irfan.omair@gmail.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-05-16 04:24:29 +02:00
Johannes Zellner
fb6d83cca5 udev: improve device discovery with udev for add/remove
As the udev device tree structure varies between distros and udev
versions, first probe the actual leaf node for device properties.
If leaf does not contain needed properties, walk up the tree to the
next node matching the queried submodule.

Change-Id: I09329d5a76a1a2a797513f4a787cb27fed5293c7
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-05-15 23:03:23 +02:00
Teemu Katajisto
385e584926 printsupport: set duplex setting correctly to CUPS printer
If CUPS printer default is not DuplexNone then setting duplex
to None for printer did not have any effect on duplex setting.

Change-Id: Ifdd82241952c9a63cdf9b53fe787f7503b8049bd
Reviewed-by: John Layt <jlayt@kde.org>
2012-05-15 23:03:23 +02:00
Stephen Kelly
f16a77d783 Use IF(NOT TARGET ...) before creating imported targets.
Initially we didn't do this because someone could accidentally create
another target of a conflicting name, and used a variable to store whether we
have created the target already or not.

That wasn't adequeate to deal with finding the package in a scope
like a function, so we used a directory property. However, the directory
property is not valid in the same scopes as the defined target. For
example, finding a Qt module in both a directory and a subdirectory causes
a conflict.

As it is already unlikely that a target would be accidentally created with
a name like Qt5::Core, we should simply use the IF(TARGET) form.

Change-Id: If64f25d45f51edcd1edb0d4bfb5ed3bb2479bd27
Reviewed-by: David Faure <faure@kde.org>
2012-05-15 23:03:23 +02:00
Carl Schumann
4f7a6bdabe Add Q_UINT64_C to 64 bit integer literal.
On some systems prior to this change the code
would not build with the following error reported
by gcc:
error: integer constant is too large for 'long' type

Change-Id: I778bce9a72ccf3a41cdf17883d734082ed3fb4b3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-15 23:03:23 +02:00
Johannes Zellner
7a304015bd input: Use UDev or specific device paths
Keyboard,mouse and touch plugins using evdev now either
use udev for device discovery or the plugin arguments
for fixed device paths.

Change-Id: I72606ad48c15c55a49724a82f7bc285dd3984c43
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-05-15 20:44:36 +02:00
Thiago Macieira
44724508c9 Restore the QEvent::d pointer to null after we're done using it
Change-Id: I2fd6ebd80bf47456d74e939d49bff4ac9f199e8b
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-05-15 20:44:36 +02:00
Pino Toscano
77b179689b QElfParser: fix type of sh_size
The type of the sh_size field of a section header is either Elf32_Word or Elf64_Xword,
so the type used cannot be qelfword_t (always 32 bits) but qelfoff_t.

Change-Id: Ia380b6823913fee7a96b39f742630ae3a9ca0cb8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Arvid Picciani <arvid.picciani@nokia.com>
2012-05-15 20:44:36 +02:00
Alessandro Portale
8a0f48ab65 qdoc: Improve fileToOpen detection for examples manifest
When looking for a suitable "fileToOpen", do a case insensitive
file name comparision. So that it also works in this scenario:
  AnExample/anexample.qml

Change-Id: Ic4cd1d59a7a35e534bfd26cd174a3c2ab5383025
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-05-15 20:44:36 +02:00
Friedemann Kleint
5031aee972 Windows: Trim filter specification of the native file dialog.
In the event customer code (namely Qt Creator) does not pass a
clean specification (corresponding to 4.8 behaviour).

Change-Id: I8271e3a45bea4bea912fcdf0b7c0aae6c022c6a8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-05-15 18:08:11 +02:00
kb
4c3a35adec Do not limit mingw mkspec to "win32-g++" only.
The Qt configure script and various qmake project files interpret
mkspecs with a win32-g++ prefix as needing special mingw treatment.
This patch corrects one instance of the too-specific "win32-g++"
qmake platform scope and broadens it to "win32-g++*" -- bringing
it in line with the rest of the Qt project files -- thus re-enabling
custom mkspecs for crosscompilation.

Change-Id: I8c5107053ce9e0c499002b1990b492bda0eec52b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-05-15 14:34:23 +02:00
Marius Storm-Olsen
58ab3a79a0 Set QMAKE_DOCS_INSTALLDIR to $$[QT_INSTALL_DOCS] to allow overriding in .pro
Normally you want to pass -installdir $$[QT_INSTALL_DOCS] to qdoc by
default. However, if you want to force the generation of URL links to
the documentation, the option cannot be specified.

By setting the QMAKE_DOCS_INSTALLDIR variable in default_pre.prf a
project may override it at will, as for example Qt Creator would do.

Change-Id: Ib31f03acf4e8050cf2dd3aa33f3a10ed027f1df7
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-05-15 14:34:15 +02:00
Friedemann Kleint
8b4bf5f816 Fix font printing on Windows using the native engine.
- Add HFONT, LOGFONT, trueType as properties of the
  Windows font engine, make it a real Q_OBJECT.
- Query properties in the Windows print engine and use the HFONT,
  LOGFONT there.

Change-Id: I5c35275b32ef6580d7fa15ed83c6e79e33dc3334
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-05-15 14:34:04 +02:00
David Faure
c241d8921e Rename QMimeDatabase method for consistency.
Name is about mimetype names, while FileName is about, well, file names.

Task-number: QTBUG-25748
Change-Id: I34a9ac1a5fc06dc3e3855365e19c4dc7a1aa2671
Reviewed-by: Wolf-Michael Bolle <wolf-michael.bolle@nokia.com>
2012-05-15 14:25:37 +02:00
Martin Smith
f3476d3ae2 qdoc: Don't include internal QML properties in output
QML properties marked internal were still appearing in the
the HTML output. Also, the title for QML type pages was not
correct in the help project writer.

Change-Id: Icaad7cefce77a4af70796bc185c99a3035fb17c8
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-05-15 14:01:58 +02:00
Casper van Donderen
b690f5b89e QDoc: Use capitalized navtitles in ditamap.
The auto-generated ditamap used titles like "articles", this now becomes
"Articles".

Change-Id: I32fa6353443aaa66cbfc2b2fea1fea26e3e33684
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-05-15 04:57:49 +02:00
Martin Smith
e776a50a11 qdoc: Fixed some terminology output by qdoc
There were still a few places where qdoc
generated "element" instead of "type" or
"class" instead of "type." These have been
fixed.

Change-Id: Id75156810212edb468198b6f269e3a91c55ac22c
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-05-15 04:57:46 +02:00
Girish Ramakrishnan
b048b7ea18 Fix include path to fb_base.pri
Also fixes a typo in fb_base.pri.

Change-Id: I4fae156640325a7a2894ea0d1fbe96936f190bdb
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-05-15 04:57:44 +02:00
Girish Ramakrishnan
32c517c990 Fix QPA files inclusion headers
find . -name "*.h" | xargs sed "s/^#\(.*\)_QPA_H/#\1_H/" -i

Change-Id: Ifa96f8cfcb67070a961c7e5f05719b82653a1174
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-05-15 04:57:40 +02:00
Kent Hansen
f544d7189e Remove const char *-based connectNotify() API
This completes the transition from connectNotify(const char *) and
disconnectNotify(const char *) to the new QMetaMethod-based
functions.

Removed the old connectNotify autotests and renamed the
connectNotifyMethodXXX autotests to connectNotify, since there is
no longer any ambiguity about which overload is being tested.

Change-Id: Icf108a80177155f21bb73c165fb8ab5d4e997bc2
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>
2012-05-15 04:57:37 +02:00
Thiago Macieira
57c755fef0 Deprecate the ability to change the FS encoding separate from the locale
Changing the encoding used by filenames separately from the locale
encoding is a broken concept and cannot work properly. This creates
ambiguity depending on the data source and how it's being treated.

Instead, enforce that the locale encoding is the only possibility to
deal with file names.

The QFile::encodeName and decodeName functions are retained due to the
Mac-specific issues and due to the sheer number of current
uses. There's no point in deprecating them and moving away from them.

Change-Id: Iedb2d8715d166a59a824f05bc11d107fd44f9c17
Discussed-on: http://lists.qt-project.org/pipermail/development/2012-May/003782.html
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-05-15 04:57:29 +02:00
Shane Kearns
e5f77fe31b Add test case for link local TCP connections
The socket engines already implemented this, but it is a good idea
to test it explicitly.

Task-number: QTBUG-25634
Change-Id: Ife3fe09b0119ed435e4055523c553847739a09fe
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-15 04:57:18 +02:00
Frederik Gladhorn
49e7ff443b Enable Gtk file icons
This needs some build system fixes to let widgets depend on
the platform support library (and be built after it).

Change-Id: I6f5b878971d1002a18e2fd66db4f34ffd0ac939a
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@nokia.com>
2012-05-15 04:57:15 +02:00
Thiago Macieira
f31b324a24 Use org.qt-project for the QFactoryInterface's IID
Task-number: QTBUG-23273

Change-Id: I935d2e20a4905121ca226f052528fa7c9d80e88b
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-05-15 04:57:05 +02:00
Bradley T. Hughes
e1cee9222d Split Q_COMPILER_DEFAULT_DELETE_MEMBERS
Based on reviewer comments on
https://codereview.qt-project.org/#change,25992, split
Q_COMPILER_DEFAULT_DELETE_MEMBERS into
Q_COMPILER_DEFAULT_MEMBERS and Q_COMPILER_DELETE_MEMBERS. Clang provides
2 separate feature checks for these, all other compilers always define
both.

Keep the Q_COMPILER_DEFAULT_DELETE_MEMBERS define, though, for any
existing code that may be using it.

Change-Id: I8969e10989c776a822da153152cfecb99dda8cb9
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-15 04:57:05 +02:00
Shane Kearns
3976339ca9 Properly handle unexpected EOF in QHttpThreadDelegate
This prevents http POST/PUT from hanging if the QIODevice being uploaded
returns -1 from read.

Task-number: QTBUG-24738
Change-Id: I76500cc4f0101cc8e5da5f1dc105508b3f519a3c
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2012-05-15 04:57:02 +02:00
Donald Carr
1da0db344a device: don't set a default cross compile prefix
qmake -set can be used instead to set a the default cross compile.
device_config.prf already contains code to read this default.

Remove per-spec CROSS_COMPILE checks

Introduce deviceSanityCheckCompiler() usage where appropriate

Done-with: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Change-Id: I07c75c9e933dc1174a1bf8bf523b6b4a6b427408
Reviewed-by: Romain Pokrzywka <romain.pokrzywka@kdab.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-05-15 04:56:59 +02:00
Glenn Watson
87362f3f58 Add private API for finding symbols on Linux
Add an API for use by declarative that allows searching for a
symbol that has been loaded, without opening a specific library.
This makes it possible for declarative to determine if the
profiling library has been preloaded, and to call functions on
it that enable / disable / save the current profile.

Change-Id: I2ec12d9babea2a152990c19735e98d4d7c10a062
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-05-15 04:55:47 +02:00
kb
cff6e39cd1 Remove capitalization when specifying include-libraries.
MinGW installations on case-sensitive filesystems expect
lowercase names of include-libraries and (usually) include
files.
When crosscompiling on Debian 6 (targeting MS Windows) linking
fails because mingw is looking for non-existent include-libraries.
Using lowercase names solves this.

Change-Id: Id3454f4ed8ba42b6ea93d65d9c0ce567db6712df
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-05-14 21:34:08 +02:00
kb
9bd24b6edc Do not override CO_E_NOT_SUPPORTED
Change-Id: Id0cb9e1dca67400a2e3a02da663d810b06bdb6ec
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-05-14 21:33:58 +02:00
Friedemann Kleint
61ebcc3ae7 Windows: Query mouse double click interval from system.
Change-Id: I6bfd19a76bf3fde1344760d7f216a2dffa4b9018
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-05-14 21:33:48 +02:00
Johannes Zellner
26790242c5 configure: save pkg-config env in qconfig.pri
Store PKG_CONFIG_SYSROOT_DIR and PKG_CONFIG_LIBDIR for the usecase of
cross compilation in qconfig.pri. They will get picked up by
pkgConfigExecutable() in qt_functions.prf used from link_pkgconfig.prf
as environment for pkg-config calls.

Change-Id: I7d0de05c0bd21b435275fc26c66a80035ba30970
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-05-14 21:23:43 +02:00
David Faure
5764f5e6ea QUrl: using sectionIsPresent in operator== broke for local files.
QUrl::fromLocalFile("/foo") doesn't set Host, but QUrl("file:///foo")
does (to remember that it saw a Host section, even if empty, which is
useful for urls like "remote://"). So ignore the Host flag in operator==.

Change-Id: I4322b4a75420c4e42766c0d65c1b121f28028a76
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-14 17:36:57 +02:00
David Faure
feb212e1e5 QUrl: a url with a fragment or query, and one without, are different.
Fix operator== and operator< so that a URL with an empty fragment
or query, is not treated as equal to a URL without any fragment or query.
This restores the Qt4 behavior on this particular issue.

Change-Id: Ie989f37353fb13c791b1d558d638d2e8a5b5d1b8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-14 17:36:50 +02:00
Thiago Macieira
28aa3324de Port away from QString::{to,from}Ascii in qmake
Properly use from/toLocal8Bit when referring to user data, even file
names.

Change-Id: I8fc7afa2ea570f8b1b1eecf354f01d6dfe0883cb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-05-14 17:33:04 +02:00
kb
dfd9ef3469 Add missing include library to prevent link failure
When cross-compiling the uuid library needs to be included
explicitly so the linker has access to _IID_IUnknown et al.

Change-Id: I713af426357603c08eef55857be20105e5aa6eba
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-05-14 09:14:05 +02:00
Bradley T. Hughes
fe5d5fdaf1 clang: Use __has_feature() to detect C++11 features
Apple's clang version is often reported as the next official clang
version, but Apple clang does not support all the features that the
final official clang does. Instead of using version based feature
detection, use the __has_feature() built-in instead, so that we
correctly #define the various Q_COMPILER_* macros.

Task-number: QTBUG-25554
Change-Id: I2195401dbf6cd8574c30aa1bd6f7cf1cf537dae7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-14 08:10:29 +02:00
Stephen Kelly
2b735ac8e6 Use directory property instead of variable to determine target existance.
This is more resilient to calling find_package in a scope such
as a function.

Change-Id: I17e69a416f4aed3102fa6195d239bcf4ce0b306b
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-05-14 04:35:08 +02:00
Stephen Kelly
c18a41197f Find Qt5 modules automatically in the qt5_use_modules function.
This ensures that we only find Qt5 modules from the same directory
as modules we have already found, not from multiple different
directories which may be incompatible.

Change-Id: I7ad1d81ec41bba2e543130740041338ba44a6c3b
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-05-14 04:35:01 +02:00
Stephen Kelly
dd38ad600f Only find dependencies from the same Qt installation.
Add a PATH to search for dependencies in the current prefix, and
disable other CMake searching logic with NO_DEFAULT_PATH.

A Qt installation must all be installed to the same prefix currently.
If that constraint is ever relaxed, we can turn this into a hint instead.

Change-Id: I633cafb7e546dbd102ac0b2ed18db260d26adc51
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-05-13 18:49:10 +02:00
David Faure
5ab700f639 Restore QUrl::setEncodedQuery(QByteArray()) to the Qt4 behavior.
Null bytearray means no query, and QString::fromLatin1(QByteArray())
doesn't give a null string, but an empty string.

Same for setEncodedFragment(QByteArray()).

Change-Id: I992e9253e35941d66886456872ea06aa2ae92450
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-13 11:06:18 +02:00
Casper van Donderen
b587da56b9 QDoc: Also use the CppCodeMarker for .qtx and .qtt files.
Change-Id: Iff44975bc17fbf1158b373ecd967782b6cb5a3c1
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-05-12 23:48:14 +02:00
Donald Carr
f1ea4ed3d4 Remove stale udev check
udev headers now ship as part of the base debian reference image

Change-Id: I181c7f48ca59af46fccf8f3204845379d068c023
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-05-12 01:24:55 +02:00
Thiago Macieira
1ea3c22e66 Add a QStringBuilder::toUtf8() function
Just to match the ones that are already there.

Change-Id: I25acc2391feded4cac79ebf65a6bc72176f5f931
Reviewed-by: hjk <qthjk@ovi.com>
2012-05-11 23:11:08 +02:00
Andreas Holzammer
6e6b74c0c7 Use WChar method for reporting for Windows
Switch to Unicode reporting, as Windows CE does
only support UTF-16 functions and to not open
up some other ifdefs just switch to unicode.

Change-Id: I82613a131313235e313cecd315bf6d1488af0532
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-11 19:41:25 +02:00
Thiago Macieira
61a3615c46 QGuiApplication::activeWindow() is deprecated
Change-Id: Id66740eb42fdaa86807222fbebc148de9434fa6e
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
2012-05-11 19:41:25 +02:00
Shane Kearns
6abc66e076 Fix sending UDP packets to link local addresses
When the scope ID is not set, Mac and Windows will not transmit
packets to link local addresses. This patch implements setting
the scope in the native socket engines and adds a test case.
(it was partially implemented already, though UDP specific code
paths were missed in the unix engine)

Task-number: QTBUG-25634
Change-Id: I23300bdc9856e38458078e913daaa59cd05a74b5
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2012-05-11 17:39:13 +02:00