Commit Graph

14388 Commits

Author SHA1 Message Date
Martin Smith
93a3173444 doc: Added Q_REQUIRED_RESULT to ignored tokens
This macro is apparently knew. It was unknown to qdoc.
Now qdoc knows to ignore it.

Task-number: QTBUG-32344
Change-Id: Id4455ad2329aeb2d2f8cacef99cdd1ff2a72321c
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-07-23 16:30:06 +02:00
Martin Smith
a7f020fe17 qdoc: Eliminate cases of multiple topic commands
Several instances where \page and \example are
corrected by removing the \page and leaving the
\example.

Task-number: QTBUG-331578
Change-Id: I95373c2d209698b68197bb9c95ef0c41e64c55d3
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-07-23 16:30:06 +02:00
Martin Smith
eaac7960f8 doc: Ensure page name does not change
This fix ensures that the page name is
set only once. Also included are a few
internal documentation changes that
bring qdoc's internal terminology up
to date.

Task-number: QTBUG-31578
Change-Id: Ib52a5a9024533d5a695cee0055bf2bc4d9bc2af9
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-07-23 13:53:09 +02:00
Frederik Gladhorn
084c5b3db7 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	tests/auto/dbus/qdbusabstractinterface/tst_qdbusabstractinterface.cpp

Change-Id: I18a9d83fc14f4a9afdb1e40523ec51e3fa1d7754
2013-07-23 11:18:11 +02:00
Sérgio Martins
f4a0d6d249 Move the declaration of QFileIconProviderPrivate to it's own file.
Needed to backport qtbase/46685f755b01288fd53c4483cb97a22c426a57f0
to Qt4.

We can't add new symbols in Qt4 to QFileIconProvider so we will make
the private class a friend of the QFileDialog.

Change-Id: I6bc5a2d127b09f20633e733a79de509c8c186c6c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-07-22 22:28:53 +02:00
Oswald Buddenhagen
54987c6bf5 default to -compile-examples
because of popular confusion.
the packaging scripts now need to use -no-compile-examples explicitly.

Task-number: QTBUG-32449
Change-Id: Iecab1f345afe21e540204fe69a2292ef932cbb61
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-22 19:52:06 +02:00
Oswald Buddenhagen
c9568da969 don't install mac bundles atomically
... as that causes debug+release installs to overwrite each other's
postprocessed files.

introduces CONFIG+=sliced_bundle, which instructs qmake to create
file-by-file install commands. we don't know whether people are not
putting files outside qmake's knowledge into the bundle build dir, so
this mode is not necessarily backwards-compatible, and thus off by
default.

Task-number: QTBUG-28336
Change-Id: I23e90985ccd3311f0237ed61aadca6d7ed8325b7
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-22 19:52:06 +02:00
Oswald Buddenhagen
9e4dcbac05 mac frameworks: link target alias to Current version
by convention, $target.framework/$target links to
Versions/Current/$target, not Versions/$version/$target.
Versions/Current already links to $version.
so this adds one indirection, but is otherwise the same.

Change-Id: If3d1a3713712f4221ec31883977e50bce6f91764
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-22 19:52:06 +02:00
Oswald Buddenhagen
1cbb228a10 fix target strip-ing inside mac bundles
this went unnoticed so far, because the mac qmakespecs don't define a
strip command to start with.

Change-Id: Iac3e7ffa6f400373552134a44b9713aaf5f44589
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-22 19:52:06 +02:00
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