In a multi-monitor setup, when the main display is turned off or
disconnected, all remaining monitors have their hMonitor handle
changed. Qt did not store these updated handles, which led to not
posting the WindowScreenChanged event when a window was moved
to a different DPI-scaled display, leading to e.g. improperly
scaled popup menus.
The fix consists in updating the hMonitor handles whenever a new
monitor is connected or disconnected.
Change-Id: Id2ca2c128510d9ff3e9746eb33e86dce8f6c4c83
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This case is not supported by the Mac HIG, so we need to improvise
some colors that look better than those used in document mode.
Change-Id: I9858be468680303fdf65e17aa10ca1f90718b236
Task-number: QTBUG-61092
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Covers non-document mode, tab icon, and adds a more
useable interface. Some parts are still missing, like
tab orientation and long tab titles.
Task-number: QTBUG-61092
Change-Id: Idbda84f513e3ff7f87fa04ae4476b11bd8bb6bf2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
CMake gained support for running AUTOMOC on generated headers,
so we need to mark them with SKIP_AUTOMOC since we're generating
moc files for those already. Otherwise we get duplicated symbols.
Change-Id: Iabd387832cfc74809fc5e6ff4782f4fc83cc07d8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Rolf Eike Beer <eb@emlix.com>
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Reviewed-by: Stephen Kelly <steveire@gmail.com>
Add a margin to the window geometry.
Task-number: QTBUG-61595
Change-Id: I12c557d7cfb1fe954a9845848c0777817c4cbf27
Reviewed-by: Thomas Sondergaard <thomas@sondergaard.cc>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This protects against the file having been renamed or deleted. We'll
still operate on the open file, regardless the name it may have on the
filesystem.
Change-Id: I1eba2b016de74620bfc8fffd14cca85cfd672e6d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
It's not dangling only because of QFileSystemMetaData's construction:
the nativeFilePath() function returns a member variable. Since
QByteArray COWs, the pointer that we stored would not be freed.
But this was dangerous, since any change to the "entry" variable could
cause it to invalidate the member variable and the pointer to become
dangling. This line is only as old as this entire file is.
Change-Id: I8d96dea9955d4c749b99fffd14cda4d8e2cc5e5b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The deserialized user type is now shown to the user to figure which
QMetaType registration is missing.
Change-Id: I4b7624827e479b1bea67065ce3542183b7355165
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Move all the logic into socket.pri and clean-up source
code. Build local socket/server only if feature 'localserver'
was enabled.
Task-number: QTBUG-61672
Change-Id: I9f9d1a262df4bb020c8706c7cb5a66b926e0240f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
The MSDN documentation says that it's a date that reflects the item
type, giving an example the date a photo was taken (probably as stored
in the EXIF metadata).
Change-Id: I8d96dea9955d4c749b99fffd14cd7616cc0da545
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Fix a number of issues that caused polygons to not always be drawn
fully connected.
Ensures the original lastPixel is set when drawing closed polygons,
ensure we don't round away from the original starting point, and add
handling of edges that need to be rounded half a pixel sideways to line
up with endpoints.
Task-number: QTBUG-27053
Change-Id: Ib51ee5623a629996af51a0967096383f04e91e2f
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
I noticed we never release 'items' imported by SecPKCS12Import.
But looking at the actual code (SecImportExport.c), it appears
we own these 'items' and must release them. And this leads to a crash
(on over-release) which reveals another bug: a value from a dictionary
obtained with 'Get' method should follow the 'get rule' - we do not
own it and QCFType RAII object is not needed.
Change-Id: I219015fadedb256c401e50cf7e955f3d7e0a6c5f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
First, it can never return, so we can mark it Q_NORETURN and add an
std::termianate at the end. Though if it did, we'd end up in a null-
pointer dereference crash in the caller.
Second, add Q_DECL_NOTHROW to it. It can't throw, but it terminates
execution. This also prevents both puts and fprintf from escaping via
pthread asynchronous cancellation on Linux/glibc.
Third, don't use QMessageLogger, since that allocates memory and
actually uses QString. If we really are in an OOM situation, then
QString's failed allocation would recurse back into qt_check_pointer.
We'd compound the OOM situation with a stack overflow...
Change-Id: Ia53158e207a94bf49489fffd14c81c47971f4e82
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
qt_assert and qt_check_pointer get the function name and line number
from the caller (the functions are called from the Q_ASSERT and
Q_CHECK_PTR macros, respectively), so we don't need to capture the
context from those two functions. Instead, pass the context to
QMessageLogger for proper logging.
I've left the file name and line number in the assertions, for users who
did not add them to their message log pattern, but I've removed from the
almost never used qt_check_pointer function.
Note: how useful is it that we allocate memory in response to failing to
allocate memory?
Change-Id: Ia53158e207a94bf49489fffd14c81b359c5b6537
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
This compiler seems to require explicit initialization of all member
variables in a constexpr constructor, even if they have an implicit
default constructor of their own. We probably fixed the rest of Qt a
couple of years ago, but not these two places because they were arrays
and those require the C++11 syntax for uniform initialization.
All compilers that support constexpr do support uniform initialization.
MSVC 2015 fixed our issues with it on the same update.
Change-Id: Ibc1eb23e3ae093f5c6928ded3a041be35eb9baae
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It prints the warning even if we surround the affected code with
QT_WARNING_DISABLE_GCC("-Wstringop-overflow") (see e4eaa62943),
so we have no alternative other than to disable the warning completely.
Change-Id: Ia3e896da908f42939148fffd14c488c4006040e6
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Since the result is an actual zero, this section of code looking for
underflows kicks in. But we forgot to take the capital letter into
account when parsing the number.
Task-number: QTBUG-61350
Change-Id: Ia53158e207a94bf49489fffd14c6abbd21f0bac0
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Use Qt's flags instead of WS_DLGFRAME which matches WS_CAPTION as
well (WS_BORDER | WS_DLGFRAME).
Amends 886ce572d6.
Task-number: QTBUG-58959
Change-Id: Ifdc106667d67cc6f5d3611806aae1035742fb882
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Fixes dubious lock protecting the platform interface handle, and makes
sure that we lock and hold a valid reference to the platform
interface before accessing it. Since the platform interface is exposed
we also need to expose the mutex protecting it.
Change-Id: I1ec1219a75c589bc793676369b11fb403de20102
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
The code was trying to open a local file with the same path
as the remote URL, which is unnecessary and wrong in the unlikely
case where such a file would exist.
Spotted by Christoph Feck when reading the code.
Change-Id: I1d77e5781cf606b025d2877f48a9914dd1e36b1d
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
This provides a helper function which does the check on the string.
QFileInfo::isRoot() in addition checks for the existence of
the directory, which can cause hangs with network drives.
Use the new function in appropriate places in QtWidgets.
Task-number: QTBUG-6039
Change-Id: I54d0d860713e82b28fa4069a5345b042337f9c52
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
They don't have any meaning, seems like they were meant for a future
extension. Documenting them, documents that they need to be escaped.
Change-Id: I90079766ffd45fab8c4676f7a9212ff6dec4a732
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
And remove the corresponding defines.
Note that XCB_USE_GLX and XCB_HAS_XCB_GLX were used as synonyms
because QGLXBufferSwapComplete was wrapped in #if defined(XCB_USE_GLX)
and at the same time it was used only when XCB_HAS_XCB_GLX
was defined.
Change-Id: I6c04b0ccfd5369b78b3e8af2ec39d38ae5c311dc
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Documentation does not match the sample code. There is no explicit
call to QWindow::create(). It is called implicitly by QWindow::show().
Furthermore, QWindow::create() documentation states: "Note that it is
not usually necessary to call this function directly, as it will be
implicitly called by show(), setVisible(), and other functions that
require access to the platform resources.".
Change-Id: I632da86438f7f88c1fd8359b9fd6d52f329291cb
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
We're only supporting builds with MinGW-w64 these days.
Change-Id: I1198551ba85132c3f0f81e32f11aa149126ca61f
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
When the switching to the non-simple offline style is done after
document load, the navigation to anchors completely breaks. So, do
the switch without the additional delay.
Task-number: QTCREATORBUG-18448
Change-Id: I5abbc3bbe1c743d2a5e493bb9e0916c5d092942a
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
To make it more reliable and efficient we now do the reverse of what we
are doing when redirecting the items. This will ensure that the actions
are correctly reset to the original target and action. The original
approach of updateMenubarImmediately() was not always doing this and it
also does other unnecessary things as a result when all we need is to
just reset the things we changed.
Change-Id: Icefa38d47ec9434894f05caeed75fbf8bdfecb93
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
tst_QLocale::macDefaultLocale() was determining local-time's current
offset from UTC and using it when working out what to expect the
offset at 1:2:3 today to be. When a transition happens after 1:2:3 on
its day (which is usual for DST changes in Europe), this lead to using
the new offset to test a time before the transition; the test was thus
wrong and failed.
Use the time to be tested (and current date) to compute the offset to
use, instead of using the current date-time.
Change-Id: I1c02a5579bca859e1d1aeb4f45b24871a08287af
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
References to these screenshots have been removed from the
docs in other commits.
Change-Id: I1af72f0160382f1fe98740c664258a9b35ca0e64
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Building qtbase 5.9.1 on Linux always results in a build with
accessibility support disabled.
The problem is that the config option for accessibility-atspi-bridge
checks for config.atspi, which isn't defined anywhere - it should
check for libs.atspi (which is set if pkg-config finds atspi-2) instead.
[ChangeLog][QtGui][Platform Specific Changes][Linux/XCB]
Fixed detection of AT-SPI, allowing accessibility support to be built
again.
Task-number: QTBUG-61731
Change-Id: If3bd5dfccda40158c566f8507e34b6877b59b6fb
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Bernhard Rosenkränzer <bero@lindev.ch>
Reads the v4 and v5 info-header together with the rest of the info-
headers, and use that to report the correct image format before
decoding.
Change-Id: I69e2bcc54367b7f14820815ae2ae1fa2d8d5dc8c
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>