The naturalTextWidth() of the QTextLayout already includes the left
and right bearing of the actual text in the line edit, there's no need
to shift the text based on the minimum left and right bearings as well.
This may result in text that is closer to the edges of the line edit
on platforms that relied on this flawed logic, but that should be
adjusted back using the corresponding style hints.
Change-Id: I1d5edbeda7afe3e69b972841d280eb9e573675f5
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Prefix the error string message with either "chdir" or the "execvXX"-
family function that failed. In order to simplify the process, I also
made it transmit local 8-bit data instead of UTF-16 (this also avoids
memory allocation with QString).
Since there are now two write(2) calls, it's possible for the parent
process to be woken up and read(2) only the first. The parent process
now needs to wait for EOF.
Change-Id: Ib306f8f647014b399b87ffff13f1956199a5aee0
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
The torrent example does not have its own code to work with SHA-1,
it uses QCryptographicHash instead.
Change-Id: Ided0e3dcded1096feb3366682c97530c4cec0a14
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Sami Makkonen <sami.makkonen@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
If a mouse event from the window system changes both position and buttons
at the same time, then it's split by QGuiApplication into a mouse move
event followed by a mouse button event. Propagate the source of the
original mouse event to the mouse button event.
Change-Id: I075fb4ad9e4338bf8ec170630ce270b38d8682d9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Virtual roots are windows, so we should request XCB_ATOM_WINDOW
instead of XCB_ATOM_ATOM.
Change-Id: I59558b1a3c37cb9bcad42bc0695d420f59088eb9
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Add note mentioning it to QTcpSocket::incomingConnection() and
update SSL socket server code snippet accordingly.
Change-Id: I9d228dabde76f9e9cd5140edf08be09a588066c8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
On Windows, some messages occur before a QPlatformWindow is actually
created, for example WM_WINDOWPOSCHANGING, which is handled in
QWindowsWindow::handleGeometryChangingMessage().
Extract a static function QPlatformWindow::closestAcceptableGeometry()
from QPlatformWindow::windowClosestAcceptableGeometry() and use
that in QWindowsWindow::handleGeometryChangingMessage().
This fixes a regression crash occurring in Qt 5.6 when running
the example from QTBUG-48201.
Task-number: QTBUG-36220
Task-number: QTBUG-48201
Task-number: QTBUG-46615
Change-Id: I86b8f923447c8e447382427cf5795628ef1c9717
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
I added this sometime in the past to work around some ICC bug in
position-independent code. Modern versions don't have the bug.
Change-Id: I42e7ef1a481840699a8dffff140049ce927cdff2
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
See https://software.intel.com/node/522852. There are options to turn
off LTCG and, on Linux, to enable/disable fat objects.
Change-Id: I42e7ef1a481840699a8dffff14003db5a9c95b83
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This is probably emitted in error in ICC 16.
warning #809: exception specification for virtual function
"QQmlEnginePrivate::~QQmlEnginePrivate" is incompatible with that of
overridden function "QObjectData::~QObjectData"
Change-Id: I7a21ba10770ba008bdc18f535502376e1d92520f
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Major << 16 is 0x90000. Reported in QTBUG-45139
Change-Id: I42e7ef1a481840699a8dffff14057022bc4df8e9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
This is a repeat of acf80b9a2b, but this
time it appears ICC 15 works and ICC 16 doesn't. ICC doesn't like
polymorphic, exported classes with inline constructors.
qsvgiconengine.obj : error LNK2001: unresolved external symbol "const QIconEngine::`vftable'" (??_7QIconEngine@@6B@)
Task-number: QTBUG-48062
Change-Id: I82493c0f52084e0588352cd0c26e1293b0727242
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This is for compatibility with old Qt versions that had this.
Task-number: QTBUG-48360
Change-Id: I42e7ef1a481840699a8dffff1405c0a348e32e27
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
The .altmacro is not supported with Clang's integrated assembly.
The worst part is that I had this fixed, but apparently I never pushed
the update to Gerrit and then we staged the old version. This commit
brings back the fixes.
Incidentally, it also makes things work with freebsd-clang.
Change-Id: Id2a5d90d07d7ee470fcb9ad9696a9a0f9ced7ea7
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Tool window always had NSResizableWindowMask before dd02c1eb38,
and this is broken, the new logic depends on WindowMaximizeButtonHint which is not
set on, for example, un-docked widget. Bring the old behavior back, while not
cancelling dd02c1e - make it resizable unconditionally, as it always was.
Task-number: QTBUG-46882
Change-Id: Ib739a701d85aaadab83230deee808757de6b5e21
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
As most of QFactoryLoader is now available with QT_NO_LIBRARY,
we can use it to load static platform plugins.
Task-number: QTBUG-3045
Change-Id: Idaf2d62fe43774c12d8777f2cf4afaa099833801
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We need a method to check whether a specified pixmap is still
cached without touching the recently-accessed list for this pixmap.
[ChangeLog][QtGui][QPixmapCache] Added QPixmapCache::Key::isValid().
Change-Id: I90fa4f67b569099b67b6207e78494beb3111b68e
Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
The drivers for PowerVR Rogue G6200 reports BGRA support, but reading
from the FBO does not produce the correct result.
Initially reported here: http://launchpad.net/bugs/1436074
Change-Id: Ia173817d557446818d08609d943eb3573b900cc3
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Set defaults before parsing compiler options.
UsePrecompiledHeader, CompileAsWinRT and GenerateWindowsMetadata
options were overwritten after parsing the options.
Task-number: QTBUG-46978
Change-Id: I8c4e423cd13f575fa679b114108b693937908549
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
there is no particular reason to have them in qt_functions.prf any more,
while the separation made the code harder to follow.
Change-Id: Ie44c9784358f382f7bc863b421ff5b440211d66f
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
there is no particular reason to have it in qt_functions.prf.
Change-Id: I88ed1ea937a9a88a4625a6de7bcd3a29957560da
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
the addition of qt's rpath belongs into qt.prf - even on mac.
so consolidate the two implementations.
as a nice "side effect", we get relative rpaths also on linux.
another "side effect" is that we don't unnecessarily add the qt rpath to
qt modules also on linux.
the qt rpath addition mechanism should not be responsible for setting
the policy who gets a relative rpath, so move the logic to higher-level
callers.
Change-Id: I52e8fe2e8279e7b1ac25fae758867a5cb1cafcf8
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
the rpath applies only to the installed on-device location and is
consequently always the same for all modules, so there is no point in
indirections.
Change-Id: Ia0590552aa317d799a2d3879fd0c0768344b9645
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
this variable is not referenced anywhere else.
Change-Id: Ib4d0a47a08d029f65542e752fa2a47c992e061fa
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
the old plugin loader which test-loaded plugins (without their
dependencies) is gone, so the hack is obsolete.
Change-Id: I68077cb58174dfbcb0b5372e2574de41f48d35c9
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
$ORIGIN (or $LIB) needs to be escaped to survive the trip through
make and the shell.
this shouldn't break anything, as there was simply no way to get it
right so far.
Change-Id: I86337c5994d10dae2e80dd2f858f74874b14bca7
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
ppc/ppc64 and 32-bit x86 have been dead for a while.
consequently, the legacy macx-g++-64 spec was most probably not used.
which in turn meant that NATIVE_64_ARCH was never set (in particular on
windows hosts ...), which means that the android ndk host auto-detection
was effectively broken.
the arch code in mac/default_post.prf was also never triggered, so nuke
it as well.
Change-Id: Ic0775e40b273a22e0a15808cac328e0df33c2155
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
According to MSDN, the zero value of ICONDIRENTRY bHeight and bWidth
fields mean a maximum icon size 256 pixels. So QtIcoHandler::option()
should return 256 instead of 0 pixels for such icons. Also there is
fixed wrong seek offset at the second call on this method.
http://blogs.msdn.com/b/oldnewthing/archive/2010/10/18/10077133.aspx
Task-number: QTBUG-48103
Change-Id: I99f0c9720fd58889045b0c73c51498f2065b0b91
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
This change enables the workaround for missing precision qualifiers when
running in the emulator. The same workaround is already applied to the
Android plugin (9eeb1bd).
Change-Id: I46ca344f71a48c9586bd8f491e56a1a814ee7ab6
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Commit f3bc9f5c5c broke standardLocations
by replacing them with same paths as writeable locations would return.
Task-number: QTBUG-46279
Change-Id: I43150e3af13320a707c7882dd0f0cdcb2c6e8a70
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Important flags are not passed from mkspecs to cmake like SYSROOT,
CFLAGS and CXXFLAGS.
Change-Id: Ie318d19c1aebacdb845638e5f80c2ecb8e6ac8bb
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
As a useful side effect, watchOS and tvOS won't be detected
as iOS, leading to another confusing Q_OS_MAC situation.
Change-Id: I00fc0c7088dbc091c4638b6937a7b378d7569cec
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
By serializing the capitalization value of QFont, it ensures that it is
correctly preserved when QPicture streams it and later plays it back.
Subsequently the QDataStream version has been bumped up to account for the
change of the data format for serializing QFont.
[ChangeLog][QtGui][QFont] QFont now serializes the capitalization setting.
[ChangeLog][Important Behavior Changes] QDataStream version bumped up to
17 to account for changes in the serialization of QFont.
Task-number: QTBUG-15214
Change-Id: I042680760e5a69d18d41e786b7500a3eebbe562f
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Calling runOnUiThread() only queues calls that comes from a different
thread then the UI thread. The problem with the current solution is that
we can't promise or rely on the calls being delivered in the same order
they were called. Another consequence of the old behavior is that we
potentially cause long lasting synchronization points, which can cause
the application to become unresponsive or in worst case result in a
deadlock. With this change all calls to runAction() will be queued on
Android's main message queue (aka the UI thread) and return immediately.
Change-Id: I50a4273ae9ba8ad17fb2c50ccd57449e4fbc12f9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
It was just documented as a method and signal so far, even though it
already was a property. This patch merges both documentations into one.
Change-Id: I3fb4090b773ba8762ad9e830303812887b75add3
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
The correct macros can be easily checked by running:
.../arm-linux-androideabi-gcc -E -dM - < /dev/null | grep -i ANDR
Otherwise we're just relying on the user to set up explicitly the
toolchain to target Android
Change-Id: I7b68521f43031c13da99b07626360d0702bff4ca
Reviewed-by: BogDan Vatra <bogdan@kde.org>
According to the SCXML specification, the state-machine can exit the
interpreter loop when a final state has been reached. This happens after
finishing a macro-step or when it ends up in a final state right after
startup (e.g. when the only state is a final state). This patch adds a
virtual method which can be used to detect this reliably.
Change-Id: I594e952a4972dd70d4089a2c4ce1c86880568eb9
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
It sends a shortcut override event directly, which should go
though QPA anyways.
Change-Id: Ie2c6f45cd44222cd9be8846099573dcd2968a77c
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Justification: intuition indicates that Q_OS_MAC refers to OS X. Reality
indicates it refers to OS X, iOS, watchOS, and tvOS. Technical
correctness requires that it match reality. Backwards compatibility
dictates it can't be changed anyways. Conclusion: an extremely confusing
macro that no one knows how to use properly.
When Q_OS_MACX was repurposed for OS X (and later, Q_OS_OSX introduced),
Q_OS_MAC was kept around to allow differentation between Q_OS_DARWIN
(the grandfather OS of everything - OS X, iOS, watchOS, tvOS, and
theoretically "open source Darwin derivative"). However, given that
every attempt at a non-Apple Darwin based operating system has failed
and sees virtually no interest at scale, this distinction is not useful
in Qt for the confusion it causes in return, especially considering that
there are several cases in Qt where Q_OS_MAC should be Q_OS_DARWIN or
vice versa, and sometimes the correct macro is not even entirely clear.
Therefore, Q_OS_MAC can be deprecated. In the extremely unlikely case
that differentiation between Darwin core, and commercial Darwin-based
operating systems from Apple is required, I suggest introducing
Q_OS_APPLE (a superset of Q_OS_DARWIN, and subset of Q_OS_OSX, Q_OS_IOS,
Q_OS_WATCHOS, and Q_OS_TVOS). Until it is needed, Darwin, OS X, iOS,
watchOS, and tvOS defines should be perfectly sufficient for every
real-world use case.
Change-Id: Id6df8c1102010b61cfe001ed41a76809bc166863
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Opening a connection to an e.g. inactive server will return true
regardless of the server accessibility.
This patch aims to fix the current checks done.
The first one is an allocation check which should only fail if there's
not enough memory but is currently wrote as if the connection failed
there.
The second check that is "failing" is the connection setup. The return
value should either be NULL or the same value provided as first
parameter. That is now verified.
[ChangeLog][QtSql][QSqlDatabase] Fixed a bug where opening a
connection to a MySQL database using the QMYSQL plugin would always
return true even if the server was unreachable. This bug could
also lead to crashes depending on the platform used.
Task-number: QTBUG-47784
Task-number: QTBUG-47452
Change-Id: I91651684b5a342eaa7305473e26d8371b35396c4
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>