Previously we hardcoded the minimum windows version to the initial
Windows 10 release. However features have been added which require a
higher SDK version (eg drag and drop). Deploying such a package might
fail during distribution to consumer devices.
Hence introduce WINRT_MANIFEST.minVersion and
WINRT_MANIFEST.maxVersionTested as variables for the manifest file. If
nothing is specified, both values will be set to the UCRTVersion
environment variable, implying the development setup from which qmake
has been invoked.
Change-Id: I1dcf1e75c67c4ab2fd5a3fdcc32c8783a336e6ff
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Passing a string literal to QWindow::setObjectName() is rude:
it wants a QString.
Change-Id: Ic4c1079889002f0d5f1028c443456a8be0b7b0fe
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
qt_div_255 does a fast rounded division, the form of rounding is however
only valid for positive integers.
Correct one case where it was used incorrectly and add it one place
it would be valid, and adds a comment to the function.
We were using the optimization (x*a + y*(255-a))/255 ==
(x-y)*a/255 + y but that makes the division by 255 potentially
negative.
Change-Id: Ie53aa82b66ef801f5d43f8d2ec48880cb4972f69
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
On macOS, even if pkg-config is present in the path, configure will by
default correctly ignore it and set no-pkg-config. However, this was not
propagated to qmake when invoked from config.test, so tests which rely on
that did not work.
This was leading to pkg-config (installed from homebrew) to be used in
the libpng test, so it succeeded. But the later Qt build would fail to
find png.h from homebrew, as it correctly ignores pkg-config.
Task-number: QTBUG-55011
Change-Id: Ic6fb866bea0551f528da56cb545174dcd9bacf0d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Mike Krus <mike.krus@kdab.com>
This allows setting of variables, like FOO=bar.
Yes, it's intentional that there are no quotes.
Change-Id: Ib306f8f647014b399b87ffff13f1d9e6a10fa2f8
(cherry picked from commit e79200bf7f)
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Mike Krus <mike.krus@kdab.com>
On RHEL 6.6, mysql_config --libs returns "-rdynamic" among other arguments.
The configure test (config.tests/unix/mysql) would end up passing that
to qmake. qmake responds with "***Unknown option -rdynamic ..."
Change-Id: Ib1300e62aec8a5d866359f3eaea88d9648c872b9
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
(cherry picked from commit d7e27e4d26)
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Mike Krus <mike.krus@kdab.com>
amends fc1092cf, necessary because of (the earlier) a28364bc1.
Change-Id: I5c86bcb27854994e59228fd205c799396464554d
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Store the result of the comparison before the calling QWidget::setParent()
passing the flags which can modify q->data->window_flags.
Previously, this led to the condition triggering when a child window
was becoming top level, causing the geometry to be changed (notably for
fullscreen windows on Windows, where fullscreen is merely emulated).
Amends change 5e99b07a07.
Task-number: QTBUG-54906
Change-Id: I9369d7d9f886451cfdb933746a4572593ffa074a
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Remove QWindow instance from QGuiApplicationPrivate::modalWindowList
in the destructor.
Task-number: QTBUG-54566
Change-Id: I1f07fb46a371f69f04907b20657f3b05571445bd
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Fix a few places that were overlooked in
change 29c6e39086.
Most notably, fixes MDI subwindow titles disappearing
when moving windows between monitors.
Task-number: QTBUG-49374
Change-Id: Ie6ffabc4909064e649a3820d9aa952f3991ef06b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This reduces the amount of dbus signals generated when many wifi AP's
are around
Task-number: QTBUG-54814
Change-Id: I4bdd5f0bfe173d6db63f3d975a98583c6c0fc5db
Reviewed-by: Richard J. Moore <rich@kde.org>
This improves code generation, since the compiler statically knows
the number of loop iterations. But it also fixes a compile-error
on Clang with a following change of the name field from char* to
char[].
Change-Id: I7ef18adf3cb9b34cd1b7235cb35cf26b7e349d92
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Changes the --extrawindows option to --numwindows with a default of 3,
and layouts all windows in rows and columns so that they are all
exposed at startup.
Change-Id: I5e8d63a14b778bcddc2fee3bf7e78d6664532b5b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
The limitation of four glyph caches per font engine was to prevent memory
spikes during rotation of text. But in an application with multiple top
level OpenGL windows, each with their own context, we'd end up trashing
the list of glyph caches during rendering, even if each window just drew
the same static text.
Having a shared context between the windows helped a bit, but had other
performance issues due to the globally shared state, so the better approach
is to limit the caches to four per context.
This brings the multiwindow manual test from a grinding 4fps on macOS
to a smooth 60fps for 20 concurrent windows.
Task-number: QTBUG-52372
Change-Id: I26edd5f6edb5c7818e14b2203af062df19ae7127
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
first deprecated in iOS 8.0 - Use NSFontAttributeName instead
Change-Id: I763efc498644ac234a712ebcefd07111b4444c98
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This makes it possible for the application to control which language
is used by QMimeType::comment()
[ChangeLog][QtCore][QMimeType] QMimeType::comment() now uses the default locale
rather than system locale, so that applications can control which language
is being used.
Task-number: QTBUG-50776
Change-Id: I82623b7c488035a4164fadaf37ebcc79a9fd6173
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
when it comes to compiler flags (be it warnings or include paths), it
doesn't matter whether we building/using bootstrap libraries, but
whether we are actually cross-building.
amends c55bdc271f and d8be8110a.
Change-Id: Idf988107e9cccc486672c0ee70dc9bdf8eab9d8c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
"simctl list devices" has changed output format in
Xcode 8 beta to include additional information placed
inside parentheses for each device. And this confuses the
scripts we use to parse and find UUIDs.
Instead of making the inline scripts even longer and more
complex, this patch will factor most of it out to a separate
perl script that reads out device information on json format
and parses the UUID.
Change-Id: I3cd4dc276ecda030fda1932073c8bf1e0bc85deb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
It results in passing an option on the command line that e.g. the
QCommandLineParser doesn't understand.
Change-Id: Ied08c930fab479b6432f025dfe861bdf22c513e6
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
"clang -v" on FreeBSD reports something like "FreeBSD clang version
x.y.z [...]" instead of just "clang version x.y.z [...]", which fails to
match the sed pattern in the configure script, resulting in qconfig.pri
having no clang version defined.
Augment the pattern so that both version strings match.
Change-Id: I5f38f8480f4b1156ca7147e32c1157a009557035
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Some qpa backends do not provide a QPlatformNativeInterface. Hence,
check whether return value is valid.
Change-Id: Iab46bc59a151aa244fcfebf58edb37496369db89
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Some autotests clear the clipboard by invoking setMimeData() with a null
QMimeData argument.
Change-Id: I4a9d3dfd41b2c52964e272fc1362162f47fd8cda
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Some targets do not support QFileSystemWatcher causing
QFileSystemModel::iconProvider() to return zero.
Change-Id: I3d2b7034b9fb805237c66a7dcea4457bfa41d46d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Since Qt 5.6.0, some applications such as Kate (built with clang, libc++
and libcxxrt) on FreeBSD occasionally crash with the following error
message on exit:
QMutex::lock(): sem_wait failure: Invalid argument
[or pthread_cond_wait in the 5.6 branch]
Investigation by Gleb Popov, Thiago Macieira and Olivier Goffart has
shown that this is caused by the fact that QDBusConnectionManager is a
Q_GLOBAL_STATIC (so it will be destroyed with all the other
Q_GLOBAL_STATICs in the reverse order of construction). In the
Q_COMPILER_THREADSAFE_STATICS case, freelist() also returns a
function-level static that is constructed on first use, so it may be
destroyed earlier than the QDBusConnectionManager object, making it
impossible to lock a contended mutex.
We now make freelist() return a global static, so that it is always
destroyed after QDBusConnectionManager and other function-static
variables.
Change-Id: I210fa7c18dbdf2345863da49141b9a85cffdef52
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This fixes a problem that occurs when a task, that is run synchronously,
throws an exception. If that happened, then the exception would not be
re-thrown, because of an early return.
Task-number: QTBUG-54831
Change-Id: Ic70c5b810ec6adce6e62bfd6832ba9f170b13a7f
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
The text direction should *not* be set by the default script, but by the
UI direction.
For example, if the default script is Hebrew, but the UI is in English,
it doesn't make sense to default all the controls to RTL. This should be
done only if the UI is RTL.
This reverts commit a90869861c.
Task-number: QTBUG-53110
Change-Id: I5a6951ac30f24eec86bc0ae2a9fcfe14eb3a8e28
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
connectionFromId can return null if the id isn't found.
This causes crashes like http://paste.ubuntu.com/23061009/
Change-Id: Ib72412f61dc7661455394679b3e90662de505920
Reviewed-by: Lorn Potter <lorn.potter@canonical.com>
Same change as in QColor (d38f86e50b).
relocs: -167
text: +1296B
data: -1984B
(optimized GCC 6.1 Linux AMD64 build). The text size increase means
we pushed the data into an immutable section.
Change-Id: I0ff433714dc23350d1e19893a2e27ff4a0d2ec25
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Same change as in QColor (d38f86e50b).
relocs: -239
text: +2248B
data: -3872B
(optimized GCC 6.1 Linux AMD64 build). The text size increase means
we pushed the data into an immutable section.
Change-Id: Iad10c877d4a4877878dded56a7ef1e14ff92c996
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Same change as in QColor (d38f86e50b),
but much more dramatic effect, due to 5x more elements in the array:
relocs: -657
text: -3416B
data: -10528B
(optimized GCC 6.1 Linux AMD64 build)
Change-Id: Ia266ab68f2d309743374ac2034a69f58bf556adf
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Introduce QXcbWindowFunctions::setWmWindowRole() and call it either from
the implementation of QWidget::setWindowRole() or after the creation of
the corresponding QWidgetWindow.
Change-Id: I143450f4673dd707bb491c1d0f0e8b61d564283d
Task-number: QTBUG-45484
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Ivan Čukić <ivan.cukic@kde.org>
Add files generated for winrt Visual Studio projects
Change-Id: I7e6bf120b115743b836107be4e83147dd671cbe3
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This manual test pretends to be a modest safeguard
against QMenu related regressions on macOS. It takes
a slightly different approach than the existing menus
manual test, tracking observed regressions instead of
providing extensive coverage (though this may change
in the future).
These regressions are listed as task numbers below,
most of them arising from the now infamous change,
09acf326db QCocoaMenu: Decouple NSMenuItem from NSMenu
So, from now on, please run this and the menus manual
tests and look for regressions every time you make a
change regarding QCocoaMenu and related. And, if you're
fixing a regression, add the regression example to the
Menurama manual test.
Task-number: QTBUG-52931
Task-number: QTBUG-53085
Task-number: QTBUG-53251
Task-number: QTBUG-54633
Task-number: QTBUG-54637
Task-number: QTBUG-54698
Task-number: QTBUG-55121
Change-Id: I276e916dcdf00f1a44faf64d87050bc3a037a3b5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
We don't support vertical text layouts in Qt, so the vertical
advance should always be 0 (like it is in other engines).
Since we were setting this, we would calculate the bounding
box of strings in the DirectWrite engine as if the layouts
were diagonal, adding up both the horizontal and vertical advances.
[ChangeLog][QtGui][Windows] Fixed height of text bounding box when
using no or vertical hinting preference, or when the device pixel
ratio is different from 1.
Task-number: QTBUG-51024
Change-Id: I329917eb8da71fdfdffe9651ca8f0f48d26b6a60
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Previously we always updated the window title, independently whether the
window was visible / the toplevel one. This can also cause troubles when
setting the title during initialization.
Change-Id: I02ec0f0e385fa490f641ce83a6cb27717a31620f
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
First, offscreen windows/surfaces should not be tracked in the visible
window list.
Secondly when destroying a window, it is not guaranteed that it had been
removed first, hence enforce it to guarantee that the visibleWindows
list stays correct and does not hold invalid weak pointers to non
existing windows.
Change-Id: I7027ecd010b8bcb3d05e3f5d460662e883e42e50
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
When a window gets removed, the active focus window needs to be set to 0
instead of the the current window. Otherwise
QGuiApplicationPrivate::focus_window is set to an invalid pointer and
crashes when dereferenced.
Change-Id: I258b95e447de4cbfb7f19955079c2545a738e03f
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
For test runs we want to start with a clean slate
and ignore previously saved window state.
This also prevents the “previous restore failed” dialog
from from showing and blocking the test run.
Change-Id: I8e5b87a903cf1d937d628c2b062f917c4c37f176
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This is a runtime setting, as the user's freetype version can differ from
the developer's, and freetype already safely handles it internally when
not available.
Task-number: QTBUG-55345
Change-Id: I26e73728196d60ae26e5f1919ecd0dadac393890
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
As per Core Foundation ownership conventions, we
should release 'source', which is a copy, and not
'langRef', which is a reference. This has shown
to lead to crashes in some occasions.
Change-Id: I2e59b8d62aac13bc60dc013c1ea621850132c719
Task-number: QTBUG-48772
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Use Q_NULLPTR in all public headers
Task-number: QTBUG-45291
Change-Id: Ib294deb3c210a9a186448cbf9656af7a09fea2c1
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
NSMenu has autoenableItems set to true by default, and
we keep it this way in Qt. This means that NSMenuItem's
enabled property is basically ignored and therefore
QCocoaMenuItem::syncModalState() is wrong.
What is also wrong, is syncModalState()'s name in both
QCocoaMenuItem and QCocoaMenu. Indeed, this function's
role should be to ensure that the enabled state is
properly propagated down the menu hierarchy, whether
the reason is being in the context of a modal dialog
or the parent menu having been disabled by the app.
Notice that the latter case is specially needed when
a menubar menu is explicitly disabled.
Therefore, we introduce a separate flag for the parent
enabled state in order to avoid polluting the app-set
enabled state flag. This is done in both QCocoaMenu
and QCocoaMenuItem.
In the case of QCocoaMenuItem, these two flags define
whether an NSMenuItem is enabled state conjointly, and
set from -[QCocoaMenuDelegate validateMenuItem:]. The
rest of the logic remains as before. Similar logic is
used in QCocoaMenu::isEnabled().
In addition, the presence of the second flag allows us
to show disabled submenus in the same fashion native
Cocoa applications do. This means, the submenu item
itself remains enabled, allowing to show the submenu
popup where all its menu items will appear disabled.
Bonus change: merged all the bool flags into a bitfield
and made the compiler happy about the ivar reordering
in QCocoaMenu and QCocoaMenuItem's constructor.
Task-number: QTBUG-54698
Task-number: QTBUG-55121
Change-Id: Ie156cb3aa57a519103908ad4605f7b43c57e5aef
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>