Commit Graph

14379 Commits

Author SHA1 Message Date
Oswald Buddenhagen
944e1d7b6a make unescapeFilePath() less inefficient
replace() doesn't detach if there is nothing to do.

Change-Id: I845b585c766f44a670ca3af1fc11ba03e7317622
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-22 19:52:06 +02:00
Oswald Buddenhagen
cc0c394682 escape paths coming from prl files
qmake has the rather bizarre logic that QMAKE_LIBS* is escaped rather
early (instead of right before being written out the the Makefile).
consequently, we need to explicitly escape the paths from the prl files
as well.

Task-number: QTBUG-32326
Change-Id: Ieaf81113d3ca3cf5d8a1ef87c83c5721d6b473ee
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-22 19:52:06 +02:00
Oswald Buddenhagen
f216caa52c unbreak use of not-overquoted ICON entries
amends 0e548b5856.

Change-Id: I88a5b8c681f7508aecf02b913e64816b712d97a2
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-22 19:52:06 +02:00
Oswald Buddenhagen
ff6265bfc2 fix c-quoting of strings which contain quotes
escape backslashes before the quotes, as otherwise we'd escape the
backslashes we just used to escape the quotes.

Change-Id: I88e12c0c2cfc53e0ab8dce9807b06dfce6aa6e78
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-22 19:52:06 +02:00
Oswald Buddenhagen
f57e2f5667 resolve output of .depend_command relative to $$OUT_PWD
... as that is the CWD of the command (since b139e7e96e5c).
leave the resolution relative to $$PWD as a fallback with a warning.

Investigated-by: Harald Hvaal <hhvaal@cisco.com>
Task-number: QTBUG-19352
Change-Id: I75de9444a647cd9e6f509e3d8eb3382dc985e5ca
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-22 19:52:06 +02:00
Oswald Buddenhagen
08db2caf63 document that validity of exitCode() depends on exitStatus() == NormalExit
Change-Id: Ied16681f08c59de16ac365b9ae76c2eacf6bc29c
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
2013-07-22 19:52:06 +02:00
Stephen Kelly
782ed5eebb Don't check for the existence of private include directories.
Some packagers don't want to install the private headers.

Check the existence of private headers only if the 'Private' component
is specified when finding the package.

Task-number: QTBUG-32466
Change-Id: I1fdbfb25e8ce485cd051564b937f766b2733741a
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-07-22 15:41:45 +02:00
Shawn Rutledge
4dbf574b7a xcb: touchpad support
Relative touch devices tend to provide a moving point for one finger,
then when more points are pressed, the root_x/root_y stay stationary
while the Rel X/Y valuators provide info about the movements around
that point.  Synthesize moving touch points from those so that
gestures become possible.  Behavior is now similar to that on OS X.

Change-Id: I1c65fb04849d19f11c3bf166044f296d95c33da1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-07-22 13:21:35 +02:00
Shawn Rutledge
29fda24ca8 added maximumTouchPoints to QTouchDevice
This was missing information which the driver can provide.

Change-Id: I2574745635d6fdf608bc5617999aec46d9312c09
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-07-22 10:07:38 +02:00
Uli Schlachter
3ff441d305 xcb: Don't use Xlib's XBell() function
XBell() just sends a Bell request to the X11 server. This can be done
equally well (and with less ifdefs) through xcb's xcb_bell().

Change-Id: If41d955aa97acfe9e0a8b9fce05c11ebc146ce8e
Signed-off-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-07-22 08:12:59 +02:00
Friedemann Kleint
a0996b8b60 Prevent activation of windows with Qt::WindowDoesNotAcceptFocus.
Task-number: QTBUG-32385
Change-Id: I307e2a3e5157b351663940d5d02fc16b3127b5dd
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-07-22 08:10:32 +02:00
Ivan Komissarov
16579e5b84 Prevent QLineEdit from emitting edited signal (QTBUG-27347)
edited() signal should not be emitted when QValidator fixups
text in a lineedit.

Change-Id: Iccef45c4b858a65fd5097dc9e5033cefb09ad889
Reviewed-by: David Faure <david.faure@kdab.com>
2013-07-21 15:52:24 +02:00
Thiago Macieira
b02eb3b436 Ensure that the user codecs are listed in QTextCodec::availableCodecs
Codecs registered by creating new QTextCodec instances should be listed
there.

Task-number: QTBUG-32500
Change-Id: I56c00e0d6bbfef55a6cbd571bcf9aa2cf333ef3a
Reviewed-by: David Faure <david.faure@kdab.com>
2013-07-21 07:30:48 +02:00
Thiago Macieira
bad93acfba Fix compilation of QtTest on Linux systems with old kernel headers
Hardcode our perf_event_open(2) function to simply return -1 and set
errno to ENOSYS. This will disable the functionality.

People compiling Qt with such old headers will probably carry quite a
bit of dead code in QtTest. They should upgrade.

Task-number: QTBUG-32507
Change-Id: I774b4a81bee5c3e2ddc75fa52520d123a6bebed9
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2013-07-21 04:06:21 +02:00
Thiago Macieira
d040681b6f TestLib: align the colons so the "actual" and "expected" align too
Before:
FAIL!  tst_testcase::testcase: Compared values are not the same
   Actual   (actual): F0O
   Expected (expected): FOO

Now:
FAIL!  tst_testcase::testcase: Compared values are not the same
   Actual   (actual)  : F0O
   Expected (expected): FOO

Change-Id: I6f0768e4ef53e065b85a56879cecbad06fa34aef
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2013-07-21 03:01:06 +02:00
David Faure
d5d07f26f6 QUrl: let StripTrailingSlash remove multiple trailing slashes
Change-Id: Ic4c8f70bb729630d9110ed6766dd9e40f9ab4d80
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-07-20 21:04:29 +02:00
David Faure
0f062f42b9 QUrl: add fileName() method. Complements QUrl::RemoveFilename.
Change-Id: Ieda43364214c3b7aee43040e176e29ad48c14271
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-07-20 21:04:16 +02:00
Jan Arne Petersen
2ff2a7c32d Fix wayland-scanner to work with CONFIG+=silent
Use "_" instead of "-" in variables so variable replacement works
properly.

Change-Id: I2b17dca8f2351bc0933c165017f3fbb9393b0514
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-07-20 15:54:27 +02:00
Simo Fält
bd1dc60d65 Expect tst_QEasingCurve::setCustomType() failing on 32 bit Ubuntu 11.10
Currently tst_QEasingCurve::setCustomType() is always failing on CI
when ran on 32 bit 11.10 Ubuntu.

Task-number: QTBUG-32432
Change-Id: Iaf346c14985f14716692fe996714b7040fb70930
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-07-20 11:21:51 +02:00
Teemu Kaukoranta
db5631484b Changed digia contact details to */legal, updated licenses
Scripts are available in internal mkdist repo.
Added license tags, updated licenses and copyrights/contacts

Change-Id: Ibc734275f3000987eaa4f5c57f19d4e1fda2c479
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-07-20 11:21:46 +02:00
Thiago Macieira
9d0ff90760 Make QUrl store the first bad IPv6 character in the error string
Change-Id: I9a0a521ff5c3188ba6f862e2b91369cb61787359
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-07-20 05:08:16 +02:00
Thiago Macieira
9063119268 Make QIPAddress::parseIp6 return the first bad character
In case of undetermined error, returns end.

Change-Id: Ic5d16bab5fc56ad24f19da25f73f9b844ce11d3f
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-07-20 05:08:08 +02:00
Thiago Macieira
4b3acf5aff QUrl: Make sure we don't return a dangling pointer from parseIpFuture
Change-Id: I54bf8d0fe72b8db8d158899ee4525c8d067272b8
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-07-20 05:07:09 +02:00
Thiago Macieira
6130bb22e7 QUrl: Uppercase the version number in IPvFuture
We don't know what it might be used for. The RFC for URI says it's an
HEXDIG, and since we uppercase all other HEXDIGs already (in
percent-encodings...).

Change-Id: I56d0a81315576dd98eaa2657c0307d79332543a5
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-07-20 05:07:02 +02:00
Thiago Macieira
3d77406e27 Make the URL Recode function to fix bad input in FullyDecoded mode too
So far, this function hasn't been used for input coming in from the
user, so it wasn't necessary. But we may want to do it, or we may
already be doing it accidentally somewhere that isn't triggering the
failed assertions during unit testing.

So let's be on the safe side and allow it. And test it too.

Change-Id: Ib63addd8da468ad6908278d07a4829f1bdc26a07
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-07-20 05:06:34 +02:00
Thiago Macieira
b60cac3602 Fix IPvFuture use in QUrl
We have no idea what it might contain, but test it anyway to make sure
it works. Turns out there were a few bugs the unit tests have now
caught.

Change-Id: I0a6c868365feec31c2360b3c341c8ca6944f4352
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-07-20 05:06:16 +02:00
Thiago Macieira
393865be2a Fix QUrl parsing of IPv6 hosts with encoded colons
Registered names and IP addresses can only contain unreserved
characters (letters, digits, dots, hyphens, underscores) and the
colon, which is a gen-delim. For registered names and IPv4 addresses,
we can simply use the default config -- if anything that remains
percent-encoded, it means it's not a valid hostname anyway.

For IPv6, we just need to decode the colon.

Change-Id: If8083d47f6e5375f760e7a6c59631c89e4da8378
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-07-20 05:06:11 +02:00
Thiago Macieira
afe66eb9b4 QUrl: Add an "appendingTo" parameter to QUrl::appendFragment
Will be needed in a future commit.

Change-Id: Ia5f384442d25d277e7582a20d1c37da4303c64c3
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-07-20 05:05:57 +02:00
Thiago Macieira
f5b3cbb8f7 Fix warning about using QString's const char* constructor on Mac
Change-Id: I20ca50fdcdcfb075ad317247f147e4eb007a0c44
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-07-20 05:05:49 +02:00
Thiago Macieira
53bcd63061 Make the Mach-O size checking a little more robust
It's not necessary to check at every point if we know the minimum file
size: it must contain at least the header, one segment (__TEXT) and one
section (qtmetadata). Most files have more than one segment and more
than one loader command, so this check does not mean we can eliminate
the checks further down.

Also be more resilient against corruptions in the header data: check not
only the additions, but the values themselves. For example, an offset +
size addition could be smaller than the file size when the addition
overflows in 32-bit. Another thing is that the cmdsize fields could be
corrupt too.

Change-Id: I7968a769c1cbe9150270c91823cafc4f8f833876
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-07-20 02:09:41 +02:00
Thiago Macieira
2b0cf53df7 Simplify the QLibrary plugin-detection code
The reason why the scanning of files was restricted to Unix is lost in
history. My guess is that it was added *because* on Unix you couldn't
do the LoadLibrary trick to load without dependencies. That is, it
makes no comparison to whether scanning is faster than LoadLibrary.

So assume that scanning is faster, especially now that we have memory
mapping in QFile (it wasn't there in Qt 4.0).

This simplifies greatly the codebase because we no longer need to try
to load and later unload the library to check whether it is a Qt
plugin or not, nor deal with Windows non-C++ exceptions. Just scan on
all platforms.

Change-Id: If269e009bfb9920805ca1aa6c2b66aacdd5b26e9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-20 02:09:33 +02:00
Thiago Macieira
62d636a666 Add a Mach-O decoder to the QPluginLoader
We already had an ELF decoder, which helped us greatly to find the
metadata and that catches most Unix systems (Solaris, QNX, HP-UXi, and
all of the free Unixes). On other Unix systems, aside from Mac OS X,
we simply scanned the entire file for the signature. On Windows, even
without a COFF-PE decoder, we use a LoadLibrary trick to load the
plugin without loading the dependent libraries. In most cases, that
works.

Unfortunately, on Mac OS X we didn't have a decoder and nor could we
do the file scan: because Mac OS X binaries could be fat binaries, we
wouldn't know which architecture's signature we had found.

No more. This adds a full Mach-O decoder to QtCore. It is also capable
of finding the boundaries of the architecture's binary, but that
functionality is disabled since all Qt 5 plugins have plugin metadata
sections.

Change-Id: I2d5c04c5ecf024864b8a43f31ab6b7e6c5eae9ce
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-07-20 02:09:26 +02:00
Thiago Macieira
bfc5bb09c4 Ignore or suppress warning and debug messages in tst_QLocalSocket
The one in tst_QLocalSocket::writeToClientAndDisconnect just needed
proper ordering: that's what waitForDisconnect is for. At the same time,
we need to make sure we get the same message from all three
implementations of QLocalSocket::waitForDisconnect (and without the
useless space at the end).

Change-Id: I21364263cf908df022df814a6a39fcb5783e84e6
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2013-07-20 00:22:07 +02:00
Thiago Macieira
674e79416f Fix incomplete override of QIODevice::open in QProcess and QLocalSocket
The rule for a new override is that it must still work if the old
implementation is called. The catch is that any class that derives from
QProcess and isn't recompiled will still have QIODevice::open in its
virtual table. That is equivalent to overriding open() and calling
QIODevice::open() (like the tests).

In Qt 5.0, QProcess::start() called QIODevice::open directly, not the
virtual open(), so there's no expectation that a user-overridden open()
be called. With that in mind, simply fix QProcess::start to not call the
virtual open at all.

Similarly with QLocalSocket, the calls to open were always non-virtual.

Task-number: QTBUG-32284
Change-Id: I88925f0ba08bc23c849658b54582744997e69a4c
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-07-20 00:22:03 +02:00
Thiago Macieira
4a7e37b0a3 Add a test for QLocalSocket::open
This should have been done in the commit that introduced open
(953255abab), but was missing.

Change-Id: I1c2de4ad5fa42aa5b90646e7d4d7d1b1570a0f87
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-07-20 00:22:00 +02:00
Oswald Buddenhagen
3fdf69b599 update m_featureRoots less aggressively
it's not necessary to immediately re-calculate the roots after assigning
QMAKE_PLATFORM - it's sufficient to do it on-demand, so merely
invalidate them. this avoids that we re-calculate them multiple times
without ever using them in between while processing specs with
distributed platform assignments.

Change-Id: If508594764811b96a577fc81c5ded34ab0453148
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
(cherry picked from qtcreator/28df27d924bb407791a76de8159c9ffa6efde283)
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-19 17:15:16 +02:00
Oswald Buddenhagen
3a6a462ad9 cache results of feature search
looking up the same files in the same locations over and over again
is a rather significant waste. in particular, looking up the CONFIG
flags that don't correspond with features has a measurable impact on qt
creator's project loading time.

Task-number: QTCREATORBUG-9154
Change-Id: Ibae3d8b7797e706a6416a7d45c77734ab1281b51
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
(cherry picked from qtcreator/fa27cd79e05aed4ebd16d5648480cc7d48fefd43)
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-19 17:15:16 +02:00
Oswald Buddenhagen
547b7ed29c minor optimization: don't concatenate strings needlessly
Change-Id: Iddec1a818ff9f3ad8b12491100883e433e4b8246
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
(cherry picked from qtcreator/12652c20711fd29dcba62b8d5ba71c077d8bd06c)
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-19 17:15:16 +02:00
Oswald Buddenhagen
4b600bd3c1 don't unnecessarily use QFileInfo::filePath()
just directly use the filename we constructed it from.

Change-Id: Ia428a2cb4b192fea6bde62dfbf35361bcfc4b21e
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
(cherry picked from qtcreator/571234786a3ff7e8e3a9220f12d22a9f74f7a53c)
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-19 17:15:16 +02:00
Friedemann Kleint
83ee168cbb Fix compilation of the tst_qnetworkreply benchmark test with QT_NO_SSL.
preConnectEncrypted_data() is called by preConnect_data().

Change-Id: I9a3fad294d88e4cb4d2f6132cf7a87945373bb7d
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Sérgio Martins <sergio.martins.qnx@kdab.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-19 14:16:42 +02:00
Stephen Kelly
87db2fdef3 Use the compilers used by Qt for the CMake tests.
Task-number: QTQAINFRA-609

Change-Id: I32ad70a4b31baf1815c2c08ac16e35e78052e569
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-07-19 12:32:14 +02:00
Eskil Abrahamsen Blomfeldt
61fbdc00fb Fix compilation of run-time-resolved SSL on Android
We need the same code for both the no-sdk and the sdk case for
the OpenSSL code, since this is not covered by a system library,
but by an external dependency in both cases.

Task-number: QTBUG-32130
Change-Id: I976835556fcb0e6c32cfb3da4dd585e45490061b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-07-19 12:32:14 +02:00
Gatis Paeglis
8609a63297 Add manual test for UNC paths
Change-Id: I25949b6fb04dc4bb976f4daea96cbab2897e15af
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-07-19 10:10:19 +02:00
Kevin Ottens
5069e203d7 Add QUrl based API to QFileDialog
Change-Id: Iaf4f8e57e8df956dec9105eb00c193645f2db098
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-07-18 17:07:22 +02:00
Joerg Bornemann
5d6dbc6637 fix endless loop in QProcess/Win drainOutputPipes
Commit 568f82fba3 was incomplete.
If drainOutputPipes detected some readyRead it wouldn't end the loop.

Task-number: QTBUG-32354

Change-Id: I4e594f1e148abe9ef36c047a55eee1b22fd5064b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-07-18 15:25:16 +02:00
Friedemann Kleint
81addcc1ed XCB: Set WM_CLASS.
Set the instance name and class name of the application windows.

Task-number: QTBUG-29396

Change-Id: Ia1fb492ab169108c3779deb8964bb731b322dd89
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-07-18 15:12:37 +02:00
Bjoern Breitmeyer
07bc530250 Better errorhandling for the fontengine on WINCE.
The CE fontengine only supports translations, scaled
Text would only work if its an isometric scale and would
require to create a new font from the old one. Rotations
and more aren't supported at all. The freetype fontengine
for CE supports this, so we give a warning that the font
might be rendered incorrect, but could render correct with
the freetype engine.

Task-number: QTBUG-32189

Change-Id: I3581c3fef8e4ee118c0038a6ccc237e66b583731
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-07-18 15:07:45 +02:00
Kevin Ottens
f5dbc87637 Have QFileDialog use QUrl internally
When using the native dialog and through the helper, we use QUrl in
QFileDialog. It is preparatory work for having QUrl based methods on
QFileDialog interface itself.

Done-with: sean.harmer@kdab.com
Done-with: faure@kde.org

Change-Id: I61e99d498252241f38ec05724702a90ba050c4bb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-07-18 13:17:41 +02:00
Friedemann Kleint
c96a6ab627 Pass argc, argv to the platform plugins.
Allow for parsing of X11-specific arguments like -display,
-geometry. Introduce overload of
QPlatformIntegration::create() with argc and argv
and provide default implementation that calls the old version
(for platforms that do not have argc, argv). Provide default
implementation for the old version returning 0 so that platforms
using the new API compile.
Prototypically implement -display in XCB.

Task-number: QTBUG-29396
Change-Id: I6a0e9271fad6e2d10f11b80393025ae3a3e36623
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-07-18 13:13:36 +02:00
Friedemann Kleint
183cc501d6 QNX: Handle Qt::WindowDoesNotAcceptFocus correctly.
Discovered while working on:
Task-number: QTBUG-32385

Change-Id: Id1ff31ea6a367983676125810b4f49629233d374
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Frank Osterfeld <frank.osterfeld@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2013-07-17 16:08:24 +02:00