Introduce error messages showing the path in file existence,
file type and directory entry list tests to make fails related
to missing UNC shares clearer.
Task-number: QTBUG-48504
Change-Id: I5fb401b94cfa8b58562a906b8d9765039e334027
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
There's no need for it and there's harm in doing so, as it #defines
"interface".
Task-number: QTBUG-48351
Change-Id: I4ca855441b899f3f723a12f673645f3ce7541d9b
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
It's accessed by QFutureWatcherBase::isFinished(), potentially before
anything has set it. It gets to be initially true until setFuture()
has given it us unfinished future and set it false.
Add a regression test for matching state in future and watcher.
Task-number: QTBUG-12358
Change-Id: Iae7bdaa434ab80f518afe4d7d55df99c391991a4
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
- tst_QProcess::fileWriterProcess()
- tst_QProcess::readLineStdin()
- [tst_QProcess::readLineStdin_lineByLine()
The test fails apparently due to a bug in its runtime library
(fread() dropping data).
Task-number: QTBUG-48455
Task-number: QTBUG-48504
Change-Id: I972e560e88312cea0d3dbcea9450c59285a15d5a
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
The ftok function unfortunately can return duplicate keys even for different
files if the same project id is used. This is discussed e.g. in Stevens'
"Advanced Programming in the UNIX Environment".
We want the key to be predictable so we cannot just pass a random number as
the project id. To reduce the propability of key collisions we hash the file
name with the project number as seed for a predictable value. This is the same
approach taken e.g. by Apache, but the real fix is to move away from System V
IPC completely once this is feasible on our supported platforms.
Task-number: QTBUG-48375
Change-Id: If1a57f215f7ddd147aa38919907cfb83db07aea0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Rather than treating >=glibc-2 specially, we treat <glibc-2 specially
and all other libc implementations as POSIX.
This was found here http://patchwork.openembedded.org/patch/94947/ and
tested with armv6j-hardfloat-linux-uclibceabi and
armv6j-hardfloat-linux-musleabi.
Change-Id: I3850b1561a2e240f6564afedd80ce39407cc50b6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This is a leftover from the unsupported Windows Phone 8.0 mkspec.
Change-Id: Ibcf11e131a3cb098960410dbd683eb5950b0c5ad
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Verify exit status and code where applicable. Avoid unnecessary
data conversions in fileWriterProcess. Improve error handling in
helper processes.
Task-number: QTBUG-47370
Task-number: QTBUG-48455
Change-Id: Ib5c4f546027131db02caaa05154a5880edac5cf7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The code still produces Internal Compiler Errors in release mode.
Task-number: QTBUG-46344
Change-Id: I86d3608b13a197a0b65b83829d1512203e1578f8
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Status bar visibility can be controlled and window geometry can be
adjusted accordingly. Default show to showMaximized instead of
showFullScreen. This means that by default application starts status
bar visible.
[ChangeLog][winphone][Important Behavioral Changes] By default
application starts status bar visible.
Task-Id: QTBUG-48282
Change-Id: Ia60edd53ec2a7181aa97d21a825600b7c8cf87a7
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
If data[0] were > 128 (that is, if the full size, encoded in big endian
were > 2 GB), the result of the OR chain would be a negative int (due to
C integer promotion rules). We're shifting into the sign bit, which is
either implementation-defined behavior or, worse, undefined behavior.
This negative number is then sign-extended to ulong (64-bit on 64-bit
platforms), which then becomes a big number. This code was probably
written with only 32-bit in mind, where there would be no size extension
(sign or otherwise).
This isn't too bad because there's a size check for the max size of
QByteArray a few lines below, but we can fix it, so let's do it.
Found by Coverity, CID 22530.
Change-Id: I42e7ef1a481840699a8dffff1407ea6c22e1a0ec
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
It was dereferenced 8 lines before and the pointer cannot have changed
since.
Found by Coverity, CID 11363.
Change-Id: I42e7ef1a481840699a8dffff1407ecab4e4f5930
Reviewed-by: Richard J. Moore <rich@kde.org>
For some reason VMware reports 8 outputs, 7 of them are disconnected
and so they cause several errors.
Skip disconnected outputs to avoid those errors.
Change-Id: I5f9fa2ef38b916af9f9ae8b50fce9fc40c18bff3
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Use QVERIFY2() with QTemporaryDir/File::errorString() consistently.
Attempt to catch issues like the below warning and follow-up issues.
QSYSTEM: tst_QFiledialog::clearLineEdit() QFileSystemWatcher: FindNextChangeNotification failed for "C:\Users\qt\_____aaaaaaaaaaaaaaaaaaaaaa" (Access is denied.)
Task-number: QTBUG-47370
Change-Id: I58a6e87c502627e976efa62ad73c912f3b2d49fa
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
The two lines of code are the same as in QFSFileEnginePrivate::nativeSyncToDisk,
but we don't want to create a fileengine instance just for this.
qlockfile_win.cpp already calls FlushFileBuffers, only the Unix implementation
was missing the equivalent call.
Task-number: QTBUG-44771
Change-Id: I2253972857e4de9d27ef442c92983a1088d6f03e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The logic for handling cancel operations was spread out through
the code base and sometimes hard-coded to only include the Escape
key shortcut, missing the Command+. shortcut.
We now intercept both attempts at cancel operations from the system
through cancelOperation, which we forward as normal key events.
A new QKeySequence::StandardKey has been added for the Cancel sequence,
which maps to Escape on all platforms, and Command+. in addition for
OS X. The hard-coded logic in QWidget and subclasses for dealing
with closing the dialogs has been replaced with this key sequence,
which allows clients to override the behavior. Note that the widget
code is not wrapped in checks for QT_NO_SHORTCUT, as we don't care
about keeping widgets building and working under that define.
The logic in QCocoaWindow to bypass windowShouldClose when delivering
IM events has been removed as we now handle that specific case by
also forwarding Escape as a cancel operation.
Task-number: QTBUG-47557
Task-number: QTBUG-45771
Task-number: QTBUG-44076
Change-Id: Ibe0b3a4819f8659d246a2142dd7d9cd3a826ef78
Reviewed-by: Tim Blechmann <tim@klingt.org>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
This test caused problems because it relies on the at-spi services to
run. In addition it could trigger orca (screen reader) to be launched
as a side-effect of the dbus call to the screen-reader-enabled setting.
Instead just export QT_LINUX_ACCESSIBILITY_ALWAYS_ON to make sure that
accessibility will work. This means we won't test the dbus startup any
more, but the test will be reliable.
There is still a dbus call to org.a11y.Bus to launch the service in case
it's not running yet.
Task-number: QTBUG-27732
Task-number: QTBUG-44434
Change-Id: Idb86ed98ca4b47cb209027c8b41529e7e5285197
Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
qhash.cpp(89): warning #3199: "defined" is always false in a macro expansion in Microsoft mode
Change-Id: I7de033f80b0e4431b7f1ffff13fc960bcbb17352
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
It can't be. The block in which the variable "s" exists makes no call
to any function that takes the setjmp buffer. This is not a false
positive warning: it's an incorrect warning.
qjpeghandler.cpp:878:6: error: variable ‘s’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered]
Change-Id: I42e7ef1a481840699a8dffff140681a3d7e34493
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
There's QT_WARNING_DISABLE_CLANG for when a warning applies to a Clang
build.
Change-Id: I42e7ef1a481840699a8dffff1406ac36b6a6eac3
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Instantiate the QProcess object on the stack to ensure resource
cleanup and remove the QProcess * member variable.
Use qobject_cast<QProcess *>(QObject::sender()) instead
of the member variable in the helpers slots to ensure that signals
from a leaked QProcess do not interfere with other tests.
Task-number: QTBUG-47370
Change-Id: Ifc0dccb7e4b18069d236df53bccdcb6a47df6346
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Qt5 applications do not enable IBus when the applications are saved in
the session and launched automatically in the next login.
This patch checks the IBus socket path and connect to the bus when
it's available.
Task-number QTBUG-47657
Change-Id: I0883eaa2438fd27455da93f78f392ea3c1abe6b8
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
QWindow by default doesn't have the window flags to display
buttons on the title bar and it's up to the window manager
whether they will be shown. For example, fluxbox doesn't show
the maximize button.
The cocoa plugin and the windows plugin adjust the window
flags in this special case of QWindow to show some buttons,
so do the same in the xcb plugin.
Change-Id: Idc2575cfeaced524dd67eb5ba99126663626e2b0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
In addition to the proprietary Mali Linux driver bundle from ARM, there
are a couple of semi open source alternative bundles out in the wild,
which are mostly derivatives from the sunxi-mali bundle.
The non-ARM bundles lacks the proprietary header file fbdev_window.h
which defines the fbdev_window struct. Instead, it has an equivalent
mali_native_window struct in the EGL/eglplatform.h (which in turn is
included by EGL/egl.h).
This change adds an alternative configure test which detects the non-ARM
bundles are used. It also removes the dependency on fbdev_window.h by
defining the structure ourselves, which actually makes the plugin
potentially compilable with *any* EGL SDK.
Change-Id: I78ab4b618e8e9c774c889fe9896105cf2cf4228e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
This allows handling of state specific code when entering/exiting
states during a micro-step.
Change-Id: If2fa8dde9a1e209345950a93dee59414063d863e
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Touch screens without the "Abs MT Position X" but "Abs X" capability
weren't detected correctly so far. This patch fixes the detection and
enables these tochscreens.
Change-Id: I32fdb4d56c106717c90904a6632c2838bd55a255
Task-number: QTBUG-48279
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Use the presence of a platform window to detect
if the QWindow has already been closed.
Change-Id: Ieedf231cc5b805ed6383e55a82ca137087805a4f
Task-number: QTBUG-43344
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Before deleting the children of an Aggregate, we must clear its
internal collections first. This prevents removeChild() (called
from ~Node) from accessing already deleted siblings.
Change-Id: Ic657b1d57fe4c766daa2bd4b791c3840099de709
Task-number: QTBUG-47751
Reviewed-by: Martin Smith <martin.smith@digia.com>
Normally, disconnectNotify() is called at the end of QObject::disconnect
and all the locks have been dropped. That is not the case for the
QObject destructor, so we need to deal with the fact that it there may
be some locks held.
I didn't catch this issue during testing because it depends on the
pointer addresses of the object being destroyed and that of the
QDBusAbstractInterface sender object, as we use one global, non-
recursive mutex pool. For the same reason, this patch is not testable.
The fix is simple: we don't need to remove the relay rules immediately.
It's ok for them to happen later, since the worst case scenario is that
we'll receive a few more signals than we have objects to deliver them
to. If that happens, we'll do a little more work than we have to. But in
the normal case, the amount of work is the same and we get the benefit
of returning more quickly from the destructor. What's more, if the
QDBusAbstractInterface object also gets destroyed, the events are
deleted and QDBusConnectionPrivate will clean everything up.
Task-number: QTBUG-48410
Change-Id: I42e7ef1a481840699a8dffff1406b789ba5217b3
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Using a power of 2 instead of power of 10 means the result of the
division can be accurately represented as a floating point instead of
being an approximation that could lead to rounding errors.
Change-Id: I8910c06113ec6b69c60ff95d59894bfb56133186
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Need to survive having screens detached/reattached on X11.
Task-number: QTBUG-42985
Change-Id: I81cf9721f0cb61a29180c60d44d588063266e651
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
It was working at some point, but not in 5.5.0.
Task-number: QTBUG-48370
Change-Id: I8a0e09d4dfa9ace3d69c10c5f88129958d226a9a
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
For people with non-empty QT_MESSAGE_PATTERNS, the multiple lines would
be unreadable.
This is what it showed for me when starting Qt Creator:
[1442136.587] qtcreator(82762 82762)(?libQt5Gui.so.5?|QGuiApplicationPrivate::createPlatformIntegration|QGuiApplicationPrivate::createEventDispatcher|QCoreApplication::init|QCoreApplication::QCoreApplication|QGuiApplication::QGuiApplication|QApplication::QApplication|?qtcreator?|?qtcreator?|__libc_start_main):
Warning: QT_DEVICE_PIXEL_RATIO is deprecated. Instead use:
[1442136.592] qtcreator(82762 82762)(?libQt5Gui.so.5?|QGuiApplicationPrivate::createPlatformIntegration|QGuiApplicationPrivate::createEventDispatcher|QCoreApplication::init|QCoreApplication::QCoreApplication|QGuiApplication::QGuiApplication|QApplication::QApplication|?qtcreator?|?qtcreator?|__libc_start_main):
QT_AUTO_SCREEN_SCALE_FACTOR to enable platform plugin controlled per-screen factors.
[1442136.592] qtcreator(82762 82762)(?libQt5Gui.so.5?|QGuiApplicationPrivate::createPlatformIntegration|QGuiApplicationPrivate::createEventDispatcher|QCoreApplication::init|QCoreApplication::QCoreApplication|QGuiApplication::QGuiApplication|QApplication::QApplication|?qtcreator?|?qtcreator?|__libc_start_main):
QT_SCREEN_SCALE_FACTORS to set per-screen factors.
[1442136.593] qtcreator(82762 82762)(?libQt5Gui.so.5?|QGuiApplicationPrivate::createPlatformIntegration|QGuiApplicationPrivate::createEventDispatcher|QCoreApplication::init|QCoreApplication::QCoreApplication|QGuiApplication::QGuiApplication|QApplication::QApplication|?qtcreator?|?qtcreator?|__libc_start_main):
QT_SCALE_FACTOR to set the application global scale factor.
(and imagine it line-broken in a terminal 140 columns wide)
Change-Id: I42e7ef1a481840699a8dffff1406f73dc4d44a41
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
These variables were defined but never used in the respective qmake
features. Utilizing them allows more control over the output file name.
Change-Id: I5ba96c5cd330b18dc060f563186992fe3bd27b49
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>