The RFC 2822 date format should always use en_US locale for month and
day names instead of whatever the system locale is. Also remove some
duplicate code.
Change-Id: Ia2f7ee405b4e0e2f04980301783b9488628da73f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Renaming of the private implementation of viewOptions to viewOptionsV1
so that future updates of QStyleOptionViewItem can be easily integrated
in the code with a simple search/replace.
Task-number: QTBUG-1180
Change-Id: I18f876a435417717fa0d759bb302a7c6059daf80
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
The driver for the resistive touchscreen of these boards tends to report
ABS limits 0..4095 even tough it never sends coordinates outside a certain
range (e.g. approximately 165..4016 for X). This breaks the mapping of
hardware coordinates to screen space. Apply a workaround to make it
work properly.
Change-Id: I3eb5d76002acba1972061f3add44d797349c8ec8
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
Introduce freeCupsPrinters() thus fixing a bug in the old deallocation
code which would first set m_cupsPrintersCount = 0 and then
pass it to cupsFreeDests().
Task-number: QTBUG-33666
Change-Id: I94c51cb390761a669a9cbd589c1131cfb51354c3
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Currently the share context is always set to
EGL_NO_CONTEXT when it should instead query the
share handle from the QOpenGlContext and pass that
to the eglCreateContext call.
Change-Id: Ia7e32574e1427fba0f919003e5367cfc98688d9d
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
The code generating the QStyleOptionViewItem has been moved back to the
public implementation and the private QAbstractItemView::viewOptions
calling it (like the Qt 4 implementation does). This makes the item
views behave properly again e.g. QListView drag & drop in Icon mode
gets the correct options to draw the moving items
Task-number: QTBUG-1180
Change-Id: I068861e1485252f12d73f9acaf12933d0ec84e2c
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Currently, when dragging a QListView item in icon mode, only the
item is moved and once out of the view port, the visual feedback is
lost. This patch updates the QDrag pixmap to have a persistent view of
what is moved.
Task-number: QTBUG-1180
[ChangeLog][QtWidgets][QTBUG-1180] Dragging an item outside the QListView in icon
mode doesn't lose the icon.
Change-Id: I14f864a8f947997f3bdad1a05fabd200de026d66
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Add QWindowSystemInterface::GestureEvent and
QNativeGestureEvent to QtGui. These events are copies
of Qt4's QNativeGestureEvent, where it was an implementation
detail of QGestureManager.
Add gesture message handlers to QNSView and bring
back the Mac gesture recognizers for QGestureManager.
Task-number: QTBUG-28126
Change-Id: I1304e09e776fa7c44d133d54ca8b895ca2f544c5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
This approach is similar to the earlier apprach of defining main=qt_main
when building the user's sources, but uses the linker to rename the
symbol instead, which is less fragile than using the preprocessor.
To keep the hybrid usecase unaffected by our wrapper logic we declare
both our main wrapper and a fallback qt_main as weak symbols, which
ensures that when the user's application links in our plugin the
real main/qt_main provided by the user is preferred over our weak
symbols.
Change-Id: Ic76f3ba8932430c4b13a1d3a40b8ed2322fe5eea
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Run qmlimportscanner, add found plugins to the LIBS
line, generate qml_plugin_import.cpp.
Change-Id: I6c6b927cceb36fa2dc405ad698f26d20398b33c8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
This code was added as an optimization for showing a mouse cursor on
the Raspberry Pi. What happens though is while the mouse cursor does
move more smoothly, the actual application becomes less smooth when the
mouse cursor is moved. By removing the custom cursor code, performance
will no longer be effected by rendering a moving mouse cursor.
Change-Id: I9f8ac6c236cd4ff6d8e1d999a461c3e6db75d7e3
Reviewed-by: Samuli Piippo <samuli.piippo@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Added clarifying explanations to the QEXPECT_FAIL statements.
Now it should be easier to understand what is expected from the parser.
Change-Id: I1dacd60564f292d9ce43de7254525c34fa7cdc55
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
From the documentation of setScheme it was not clear if the scheme should
be terminated by a ':' or not. Documentation has been updated to clarify
the expected syntax for the scheme.
Change-Id: Ied8533beef7daa12e1d5e7da0649c184efb84522
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Changed the processing of non-character code handling in the UTF8 codec.
Non-character codes are now accepted in QStrings, QUrls and QJson strings.
Unit tests were adapted accordingly.
For more info about non-character codes,
see: http://www.unicode.org/versions/corrigendum9.html
[ChangeLog][QtCore][QUtf8]
UTF-8 now accepts non-character unicode points; these are not replaced
by the replacement character anymore
[ChangeLog][QtCore][QUrl]
QUrl now fully accepts non-character unicode points; they are encoded as
percent characters; they can also be pretty decoded
[ChangeLog][QtCore][QJson]
The Writer and the Parser now fully accept non-character unicode points.
Change-Id: I77cf4f0e6210741eac8082912a0b6118eced4f77
Task-number: QTBUG-33229
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add qjson* implementation files from corelib/json
to the qmake build. Add a read-only compile mode,
enabled by defining QT_JSON_READONLY.
Add qmake built-in function parseJson(file, into)
which parses a json file into the given variable.
qmake uses a flat key -> value-list implementation
for storing variables, which means that some hackery
is need to represent arbitrarily nested JSON. Use a
special "_KEYS_" variable for arrays and objects:
Arrays:
["item1", "item2"]
$${array._KEYS_} -> 0 1 2
$${array.0} -> "item1"
$${array.1} -> "item2"
Objects:
{ "key1" : "value1", "key2" : "value2" }
$${object._KEYS_} -> key1 key2
$${object.key1} -> value1
$${object.key2} -> value2
Change-Id: I0aa2e4e4ae14fa25be8242bc16d3cffce32504d2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Android does not provide rand_r(), so we would fall back to rand()
and srand() which means we where not keeping the promise of qrand
and qsrand being thread-safe. As a replacement we can use the Java
api and have one Random object for each thread.
Task-number: QTBUG-32814
Change-Id: Id46d195a0bb122bc7a5a8de43bdf088e11a9c42e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Also changed the 'step' range check to treat NaNs as invalid, too.
Change-Id: I993c5efffcf7140fba8f80a7db499cd2335867e0
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Check if the datetime is valid before converting it to a different time
spec. If it is invalid then just change the spec to keep behavior
consistent with 5.1.
Task-number: QTBUG-34020
Change-Id: I6630ec1d50f810a2178ab3222bd32af018085f81
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Those are not related to C++11, so move them to the Clang detection
block.
Change-Id: I80b298e1df5f74a865d743625895e0f01cb5fd6b
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Non-framework builds would automatically link to whatever Qt library
matched the config at the time of running qmake, eg hard-coded to
libQtCore_debug, while Xcode itself allowed the user to switch between
release and debug configurations.
We now append an Xcode settings variable to the library path, which gets
resolved at build time depending on the current config in Xcode.
Change-Id: I12873e38a28d9595ef3fd0ae0ad849e6744833a9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Change the default output of the logging framework to prefix messages
with a 'category: ' in case the category is not "default", so that e.g.
QLoggingCategory cat("qt.core.codes.windows");
qCWarning(cat) << "MultiByteToWideChar: Cannot convert multibyte text";
will print
qt.core.codes.windows: MultiByteToWideChar: Cannot convert multibyte text
while output from qWarning etc will show unaltered output. This should
help users to discover categories, and to group output together.
Change-Id: Iac2e1514f7dc5671966c36a440a119c857564cfc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
Since Mac lacks a compatibility profile, we often use the highest
supported compatible version, 2.1; this lacks vertex-array-object (VAO)
support in the API, but Apple provide a compatible extension. Extend
the helper object to detect this case and make VAO support work.
Change-Id: I75a74e048a0d188cec76bc5a4a9eafa4c9143740
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
When using the mouse to show a context menu on Mac then even if the
window is not active then it will show the menu for native applications.
So this ensures that this is respected for context menus in Qt too.
Task-number: QTBUG-31497
Change-Id: Ibfcb4b893b0e31d4ce36926a83c9214d130d8fa2
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
but this time without reshuffling it. it's actually easy with awk.
this makes the resulting qconfig.pri cleaner (and thus easier to debug).
and configure needs a few millisecs less to finish. ^^
QMAKE_DEFAULT_INCDIRS doesn't appear to contain dupes to start with.
Change-Id: I9eed2cf853cd15d0d24a885b1c3d69f22ffafb36
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
the consumers of these variables use the strings for naive text-based
"subtraction", which of course doesn't work particularly well when the
paths contain "../", "./", and trailing slashes.
Task-number: QTBUG-33714
Change-Id: I893c90e6f5c7cf18c9e6cb1e5be825a16509a2a4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
the function is a trivial wrapper for the QTextCodec one, so there is
little point in explicitly testing it.
Change-Id: I0c4950e5a54b7ffff9ba73a001cedb517497a596
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Having several QWidgetWindow in our hierarchy translates as as many NSViews.
Clicking will make the NSView under the mouse cursor key, meaning it will
receive all the Cocoa key events. In order to make sure the QWidgets hierarchy
sees the key event "as usual," we climb the QWindow hierarchy in search for the
top-level QWidgetWindow. (Something similar is already being done in -[QNSView
becomeFirstResponder]).
Task-number: QTBUG-32914
Change-Id: Idc700309d202820de326d4e2990fad24d7b692ae
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Change-Id: I2e874af4f5bf22a3028b7099c39436c400136386
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
When building for x86, the prefix for the tools is not equal
to the prefix for the toolchain directory, so we need a separate
option for this.
Task-number: QTBUG-34110
Change-Id: Iefe8c37892eb6c31fc8762bfb7bc7c6c23cd8b1e
Reviewed-by: BogDan Vatra <bogdan@kde.org>
The source includes shouldn't be used by installations, so
don't install the extra file, but only use it if the package
is used from the build-dir.
Task-number: QTBUG-33970
Change-Id: I08f91b8a716e935cb04d1233d44cf5c092e240ce
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
The DLLDESTDIR is not related to the install location and is not
populated for prefix_build configurations.
That resulted in the CMake files attempting to find the dlls in the lib/
directory instead of the bin/ directory.
Change-Id: Iec6a7c9b6dd656278b70ab128f3df9e8c45bbe4a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This patch partially reverts ad443dfb1d,
the test that was added is still there as it can be used to compare
against Chrome and to check that indenting works correctly.
The original behavior of clipping the bullets is correct because the
specified indent is where the text itself should be positioned, the bullet
uses the available space to the side of it. This is how other web browsers
handle the same situation.
Change-Id: I63440e037d8efec356459c09228ef4817ccb9cb6
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
When we don't know if a key event is caused by autorepeat, then
the safest assumption is that it is not.
Task-number: QTBUG-30793
Change-Id: Iea6aba164e299f0f2c772547b45df6a49639b7e9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
There are a few problems with the Quadruplor setup in Qt 5.
First of all, it doesn't work with modules, since it has
a hard coded library dependency list. Second of all, it
duplicates the application template, so changes need to also
be duplicated. This often gets out of sync. Third of all,
it duplicates a lot of deployment rules which are now contained
in androiddeployqt.
Task-number: QTBUG-33996
Change-Id: I0630a38aeba7d0075df8fae671abc311fc36de61
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>