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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Change-Id: I837eaef4fb114c20a75ffc188b49aa612f07f507
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
because if it is automatically restored it's out of the application's
control, so the user's interaction will be ignored. Change
I8ce3cd94f5ae81d7877a346743ca4e0e188baa02 did this for normal windows
by default, but the dialog helpers generate windows which aren't
affected by that.
Change-Id: I819d7ab4e51e90783d55cee0676dbc33b38c5b00
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Currently, calling
QGraphicsScene::items(QPointF(0, 0), Qt::IntersectsItemBoundingRect) or
QGraphicsScene::items(QPointF(0, 0), Qt::ContainsItemBoundingRect)
will exclude items whose shape does not contain QPointF(0, 0). This is
because QGraphicsSceneIndexPointIntersector::intersect() also checks if
the point is contained within the shape, instead of just checking
if it is contained within the bounding rect.
Task-number: QTBUG-19036
Change-Id: Ie701af2a5694d40cf9b3c9c19adbb09a53a4e398
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Do not attempt to lookup the service owner on peer connections (it will
fail).
Make QDBusAbstractInterface::isValid() return a sensible result on peer
connections, instead of always returning false.
Task-number: QTBUG-32374
Change-Id: I1b02feaffb3b255188f8d63306f89f5034a32f22
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
flock isn't available but we use fcnlt already (which is the recommended
alternative on Solaris)
Change-Id: I718e59c4804950a26eeb610888e17ce666522dcc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Unexport free function qt_registerAliasToFontFamily() and
Make it a static member of QPlatformFontDatabase instead.
Change-Id: I1df49a8e37a24b3961f92288d67b6f1108a7d520
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Update documentation for the QAbstractItemModel::supportedDragActions()
(virtual since 5.0) and the obsoleted setter function.
Task-number: QTBUG-32410
Change-Id: I4f77601bca63e5f782ade1f577104500f541bbb1
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
For developer builds, there is no need to run the test a second time.
Change-Id: I3564874cb2e9d6cc243e25a89ecd7f89df23b0bd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
The error dialog is sometimes desired when trying to attach a
debugger. Use the -nocrashhandler option for it, which already
exists on UNIX.
Change-Id: I42c9311242cdeaa81a148af9bf61875e1bc6f32c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Task-number: QTBUG-32403
Change-Id: I709ca32ca5bc1a342593357735ef3911ef849eb9
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Copy some needed files into a local folder when QtWidgets is not
available.
Task-number: QTBUG-31993
Change-Id: I93b65bda198c22a60e979c119de8de683a78bb53
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
- Don't run this test in parallel
- Remove redundant QT=-gui
- Place the insignificant_test marks together
Change-Id: I078fa29a4dccef9af8798792d06d51835b4b8934
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
We only control the application delegate in the wrapped case anyways,
so QIOSApplicationDelegate is good enough for our use.
Change-Id: Ib738592dc306c5b6652632b9ae4dab431639a89a
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Should not be needed anymore (as of 3d0a60aaa4), as we now use libc++
automatically when C++11 support is enabled.
The specs were deprecated in Qt 5.1 (commit f7a7859a7).
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: I6653f191b99f7c51c3f02a62c6ef68591b2dfa70
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>