Commit d839564c94 was incomplete. It
added the Q_CORE_EXPORT macro to qmalloc.cpp, but the qMemSet and
qMemCopy function bodies are in qglobal.cpp.
Change-Id: I24ee44f04365d8dbdf3f1c0f22b6a72cae9f96bb
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
SSSE3 was first available on the original Intel Core 2 processors, so
add the "Merom" codename. SSE4.1 was available on the 45 nm shrink of
those processors, codename "Penryn", not on the next architecture.
Change-Id: I5fd92db62aa409b7f4e46f9b24d960519177f811
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Modify configure.exe to run some configure-time tests and check if
the SSE and AVX compiler features are supported.
The tests themselves required a bit of changes to compile with
MSVC. The include in sse4_2.cpp was wrong. And for whatever reason, it
didn't like the volatile variables, which GCC, Clang and ICC have been
happy with. This should produce no effect in compilation, though: even
dead code must be syntactically correct. We're not running the output.
Change-Id: Ibe5d0904a378a7efed853c7215f88a2ddcefb1b3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
The old macro was leading to symbol clashes.
Change-Id: I090c511d4090bc96fc6c88537fae7bbe7f143b6c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
The getUrl: and appleEventQuit: handlers are only called if we register
them with the NSAppleEventManager. The Cocoa documentation says the best
place to do this is in the applicationWillFinishLaunching: delegate
method, so add this method and move the code from
qcocoaeventdispatcher.mm to there. Since QCocoaApplicationDelegate is
only used when AA_MacPluginApplication is not set, we do not need to
check again in the delegate code. Be sure to remove these event handlers
when shutting down the application.
For the getUrl: handler, send file open events when receiving this
event. This restores Qt 4 behavior.
Remove the qDebug() from the appleEventQuit: handler.
Change-Id: Ibcbdd541695176e3d236366d4d541e4811882d6c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
To avoid a QtWidget dependency, we should use QGuiApplicationPrivate
isntead, but instead of storing, we can use
QGuiAppliationPrivate::instance() instead.
Change-Id: If3f63fee804b7ad32fe8d612bf70c051b70f54c8
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
This is a cherry-pick of 0ba850c7a2dbccb8dd6aa1664679bda6cce95065
When the mouse button is released at the end of a drag, Cocoa
may simulate an extra mouse moved event. However, the state of
the buttons when this event is generated is already 'no button'.
This leads to some failsafe code canceling out of the drag state
and when the actual mouse release event is finally processed, the
header drag state has already been exited and the header drag
fails.
This patch disables the failsafe code on Cocoa and makes header
dragging work when the mouse goes outside the bounds of the header
view.
Task-number: QTBUG-14179
Change-Id: Ia9fd1ac79f9e7b4b90d3e160298c53d65fb171d3
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
QSharedPointer doesn't work like the other automatic template metatype
declarations because in some cases T* is declared as a metatype, but we
are interested in QSharedPointer<T> (eg QObject*). In other cases, T is
declared as a metatype and we are interested
in QSharedPointer<T> (eg char).
In particular the macro used before this patch was attempting to get the
metatype id of the element_type using for example qMetaTypeId<QObject>()
instead of qMetaTypeId<QObject*>(), which did not work.
Similarly, the variadic macro driven test is no good, because it was
testing QSharedPointer<QObject*> instead of QSharedPointer<QObject>,
so that is removed.
In the end, the only thing we can sensibly automatically declare as
metatypes are QSharedPointers to QObject derived types. That is also
the type that makes the most sense in a QML context anyway.
Change-Id: I13dd40147e2e6bedf38661f898102abaaaa96208
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Some test functions that only test QDate and QTime were in
tst_qdatetime.cpp. Upon moving these into tst_qdate.cpp and
tst_qtime.cpp, there were already some similar tests so I
consolidated them.
Change-Id: I5f8758bf8b4804ae9d3a482f49d21de9f7a1dc03
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Clicking the area just below the close button when Aero is enabled
reveals duplicate caption buttons. DwmDefWindowProc returns hit results
for DWM caption buttons but DefWindowProc may also return hit results
for non-DWM caption buttons.
To resolve this issue, if DefWindowProc returns a window button hit
result then we just use HTCLIENT (the client area) as the hit result
instead.
Change-Id: Ia741ce4f9aa944109d8de54c2f84009f5ea1883f
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
The distance field generator was always returning a 64x64 pixels image.
It now returns an image with a variable width (width of the represented
glyph) and always a height of 64px.
Change-Id: Id5f11a50a8031ebca10cd4803adf179ccde6db26
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Most fixes are simple and quite obvious. The ones more involved are
the ones to QArrayData, which had probably not been compiled with
strict iterators thus far.
Change-Id: Ic4ff84c34fd9a04fd686fecaa98149b1c47c9346
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
We need to let the QGuiApplication determine whether quitting is appropriate
based on whether there are visible top level QWindows after the last top-level
QWidget was closed.
This solves the issue raised here: http://thread.gmane.org/gmane.comp.lib.qt.user/1880
The transientParent is the QWindow equivalent of parentWidget on QWidget, so the test
in QGuiApplication::shouldQuit is similar to the one in QApplication::shouldQuit.
Change-Id: I500eff8d5887f24415180134b3a4be3c630a896f
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
This also changes the qtdeclarative-specific QMetaObject::activate()
overload to not take a methodOffset argument, since it's no longer
needed.
Change-Id: I4f7ece9f43339f3327419598c032e48fb37b97f0
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
The extension doesn't work outside of function scopes, so a
function declaration such as
void foo(const QString &str = QStringLiteral("bar"));
would fail on certain gcc versions.
Change-Id: I2971301f2859edd3fc81b95dfa5a7c15f29e395c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
The OpenmaxIL video_render component uses the dispmanx layer 0, so EGLFS
should use at least z index 1. Otherwise the video_render would conflict
with the UI and thus overpaints it.
Change-Id: I3bed23567fa8c4399207289c6ef952c5a5e0d503
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Donald Carr <donald.carr@nokia.com>
See https://github.com/raspberrypi/firmware/pull/32 for more information.
Change-Id: I51bb532336ed069cde938540cd962721b1a72adb
Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
The QSet<int> is a more expensive container to use and create, so
it should be avoided.
This is source incompatible compared to earlier Qt 5 for
QAbstractItemView subclasses which reimplement dataChanged, but this
patch changes nothing compared to already-present SiC compared
to Qt 4.
Change-Id: Id95391dfd62a0a7f487a8765790b007badefb937
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Containers are auto-registered and use normalized names.
Change-Id: Id65c3940401f69436929220e1f6a971135e147ed
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
set WS_EX_LAYERED | WS_EX_TRANSPARENT style if the window has
WindowTransparentForInput flag.
Change-Id: I6b0dcf35abb5fc63c800439e9b81ace1070dcad4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Added three new methods, which are meant to be used internally to
configureapp.cpp:
- int platform(): returns an integer representing a platform
- QString platformName(): returns the platform name string to be used when
displaying the license agreement.
- QString qpaPlatformName(): returns the value to be defined as
QT_QPA_DEFAULT_PLATFORM_NAME.
Currently supported names are Windows, Windows CE, QNX and Blackberry. Default
is "Windows".
Change-Id: Ifa4d1b9c02cda956be9becdf8db195d3d494f1d5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
When trying to detect the target architecture, configure.exe will look for a
file called 'arch.exe'. However, in some situations such as when
cross-compiling on a Windows host to a Unix host, and depending on the
toolchain being used, the output file generated by config.tests/arch may
simply be called "arch" instead of "arch.exe", causing configure.exe to fail.
This patches configure.exe to handle both naming schemes.
Change-Id: I5798f716d732388c707564d4d45c4887ab3d3d9f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Re-enable application termination as it was in Qt 4.
QApplication::exec() must return to main() so that the destructors in
main() are run.
The QApplicationPrivate::canQuit() function from Qt 4's
qapplication_mac.mm is gone, so bring back this function in
QCocoaApplicationDelegate instead.
Change-Id: I1c21894d59061687c36ab49bcb2e4e3ae0752fa4
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Build printing only if Qt is configured with
widget support.
This is mostly useful for testing -no-widgets builds.
Change-Id: I2d47b420e311869e85508db1f7372fe326617dec
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Mention something about touch handling with QWindow and document the
non-partialness of touch events which has been taken for granted since
4.6, but has not been documented at all.
Change-Id: I9ec75f74153bbc28e146b000d70fb26384e497a3
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
This potentially allows the creation of multiple QWindows. The platform
context is now in a seperate file and the integration provides a new
instance of the context allowing creation of multiple contexts.
Change-Id: If2b6fa29b573d87c0a4cd0a8eff1f044bd1ff9b8
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Now that we know the compiler flags for asking MSVC to produce SSE2 code
properly as well as AVX code (technically, just VEX-prefixed SSE2), we
may as well use it.
The SSE2 code generation is enabled by this commit. The AVX one
requires a change to configure to detect the support in the compiler.
Change-Id: Ib6970daaedf450500ee73600e6bf9722eddb9a0c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This is the first step in supporting these checks on Windows.
Change-Id: I77cfd46bd733161ad2e52c2f76a6354b95ff737d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This allows us to have different flags for the compilers for
supporting the same feature. For example, the official flag in GCC to
support AVX2 is -mavx2, but ICC does not support it (yet), requiring
-march=core-avx2 or -xCORE-AVX2. That flag, instead, enables support
for all the features that the "Core-AVX2" processor (codename Haswell)
will support. And clearly, the MSVC flags are different.
Change-Id: I33b6d8617520925e807747180a8dbaafd79b7a9a
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Some error messages were not clear for these qdoc commands: \qmlclass,
\qmlmodule, \inqmlmodule, and \qmlproperty. They have been made clearer
now.
Also, qdoc now parses input files in the same order all the time now.
The order is alphabetic now. This might not be the optimal order.
Change-Id: Id53a5ec8105009c71f4bbd41973a54aed7821099
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
This already worked, but let's have a test so we can be sure it doesn't
regress.
Change-Id: I358b436d216e3ec4310f05ccf4f70f9e7aad3281
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Use case-insensitive string comparisons to deal with any combination of case in the target or menu text correctly. Fixes issues reported by BHughes in TextEdit and Creator.
Change-Id: Ic3b577bf9034659b2de4aa206757b3a5a303a7b8
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
PLATFORMS is unused. Also remove the loop that printed all the
PLATFORMS when the mkspec couldn't be autodetected. Even if the
PLATFORMS variable was moved up, it wouldn't work anyway since
it detects files and not directories.
Change-Id: Id483c431a179fb01fcf680538e28c81763bc0b90
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Update documentation. Implementation is left for
now.
There is currently no replacement; once we have
that in place we'll update the docs agin to point
to it.
Change-Id: I8b4532702938398dc5b4eef5da2b3f9dfb68382f
Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Make the file/color dialog helpers use QCoreApplication::
translate("QDialogButtonBox", text) instead of
QDialogButtonBox::tr(text)
Change-Id: I7ee4c32f8f8b9cd002836e24b962ef1c0f2e0737
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Remove the reference to PATH, as it may confuse developers who expect
a separator between locations. The ordering has been made explicit,
including the position of writableLocation() if it can be determined.
Note that some implementations may allow the empty string.
Change-Id: I134db44dd8bea437824a1d0bf8ed373ec655ab04
Reviewed-by: David Faure <faure@kde.org>
QString::localeAwareCompare() has always been a broken
way to support collation. The current implementation is
not even thread safe.
This adds a proper collation class that fixes the problems
and finally allows Qt to sort properly according to locale
rules.
The class is private for now, but is intendent to be made
public with 5.1
Change-Id: Idb4e75ff68a398c9813af622af884a90898d2be9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Clean up the ICU code and make it thread-safe. Add a
QIcuData structure to QLocalePrivate, that contains
ICU specific data.
Link against ICU directly, greatly simplifying the
code.
Also fix a bug in the locale specific case conversion
code that would cause it to fail and fall back to the
QString code if the output string was larger than the
input.
Change-Id: Ie67e5ea14fa204ebc5887d7aaeb1a4f3ecaf8697
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* The Line Breaking Algorithm implementation conformance tests has been added;
* The Grapheme, Word, and Sentence Breaking Algorithm implementation
conformance tests has been updated.
Change-Id: Ia1a6eef6272d580964cb23788ddf30dfd5f4a5a3
Note: the Line Break test data contains some extended cases we don't currently support;
just skip them for now.
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
to make it conformant to the Unicode 6.1 specifications #14 and #29.
The most important changes are:
* The implementation has been reworked from scratch to fix all known bugs;
* Separate-out the grapheme and the line breaking implementation to eliminate
an overhead due to calculating unnecessary breaks;
* Stop using deprecated SG class in favor of resolving pairs of surrogates;
* A proper support for SMP code points;
* Support for extended grapheme clusters (a drop-in replacement for the legacy
grapheme clusters as of Unicode 5.1);
* The hardcoded tailoring of UBA has been eliminated which breaks the 7 years-old
lineBreaking test. Some later, we'll investigate if such a tailoring is still needed.
Change-Id: I9f5867b3cec753b4fc120bc5a7e20f9a73d89370
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>