This is an enabler for using the QGlyphRun in the selection
code of the scene graph node. In this case, we need to
know exactly which of the characters in the text are represented
by the glyph run, as a single range of text may result in
several glyph runs.
Change-Id: Ie8ec942693dceea45ab548f6cefc4f78e4c6d524
Task-number: QTBUG-41808
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Since commit cd1dff75, we use QMAKE_LFLAGS_CONSOLE when linking DLLs that
are built with CONFIG+=console. Thus, we must not pass options that are
specific to linking executables.
[ChangeLog][qmake] WinCE makespecs must not add /ENTRY: to
QMAKE_LFLAGS_CONSOLE and more. The flag is hard-coded in console.prf now.
This is a side effect of making it possible to specify a subsystem for
DLLs.
Change-Id: Ib481fd45b12140f9f05bf123db7152a3ddf0fa04
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
If you had the following lines in .qdocconf:
qhp.QtFoo.subprojects.examples.title = Examples
qhp.QtFoo.subprojects.examples.indexTitle = Qt Foo Examples
qhp.QtFoo.subprojects.examples.selectors = fake:example
The expected outcome is to see an unsorted list of examples. This
didn't work however, because QDoc assumed to find a chain of
\nextpage links for the indexTitle, and these are rarely used
in Qt documentation nowadays.
This commit ensures that all pages matching the defined selectors
will be listed under the section title, even when the sortPages flag
is not set.
Task-number: QTBUG-41737
Change-Id: I1e7e2a2953de949c9b52763165c406a64d1d46f7
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Clang always sets __mips to 1, unlike GCC. To detect a higher MIPS arch,
we need to rely on the _MIPS_ARCH_MIPSxxx macros being defined -- or, in
this case, _MIPS_ARCH_MIPS1 not being defined.
Change-Id: Ib6846a6892a4c1e17e595a69305b7e46a5303ee7
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Adrian Perez de Castro <aperez@igalia.com>
The were made 'protected' as a side effect of a change enabling
support of template friends for MSVC. However, accessibility
is part of the MSVC's name mangling and thus BC was broken.
Task-number: QTBUG-41810
Change-Id: I5ce4c7010673c06d5b75219c89c7ebd337bac6c0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
[NSView setWantsBestResulutionOpenGLSurface] is a
hint and the driver may ignore it, for example when
using software OpenGL on a virtual machine.
In these cases devicePixelRatio() must return a value
corresponding to the actual OpenGL surface size. Use
[NSView convertSizeToBacking] which is one of the
recommended methods.
Task-number: QTBUG-41767
Change-Id: Ia79242219908a2454a83b44b6eb7463372764162
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Document is moved to qtdoc/doc/src/howtos
Including snippet files.
Task-number: QTBUG-38412
Change-Id: Iba15689ad63e17c370c21c9ee5a1fff40c79fcec
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
Instead of initializing paintOnScreenEnv to -1 (thus forcing the
variable into the data segment), and then overwriting the -1 with
a read from the env-var, dynamically initialize the variable from
the env-var directly, thus allowing the variable back into the bss
segment (which doesn't occupy storage in the executable).
There may have been a reason to do it this way when the old code
could fail due to the memory allocation involved, but now with
qEnvironmentVariableIntValue(), that is no longer a reason.
Change-Id: I6547a81f69b0b57dc49bb4dd3ba1865ce8ac5b86
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
The code shifts "1" by a uint32 number. If that number is >= 32,
we're triggering undefined behavior, and Coverity rightfully complains
about that. Add some asserts to silence those warnings.
Change-Id: Ib91085a279b0a2b7ad37afad05ec1d764c0496b1
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Change buffer fill strategy to have more cached data for next read call.
This avoids unnecessarily many small reads from device implementation layer.
Change-Id: If1a039524afc03c02d2299babbfccef09f3f1cf0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Pass QMAKE_LFLAGS_WINDOWS and QMAKE_LFLAGS_CONSOLE to QMAKE_FLAGS
regardless of the project template.
The /SUBSYSTEM linker switch is not exclusively meant for executables
but can also be applied when linking dynamic libraries.
This is needed when building DLLs for Windows XP with VS >= 2012.
Task-number: QTBUG-41504
Change-Id: I5966cba1b6756e15275fa5d7fdbc42b99c95c07b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Fixup after d44781730c, which would override whatever the user passed
on the command line.
Change-Id: If4d260801866ff53de3e6dfd6d37016fd8453d8d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Change 9c3a58a913 causes any window to
be re-created when the screen it is shown on is destroyed. This
is for the use case of detaching one monitor while another remains.
In QWindow::setScreen(), if the screen is null, it will be set to
the primary screen. However during application shutdown, it may be
that the primary screen has been destroyed before all the windows
are destroyed; so trying to set it anyway will cause a crash.
qtdeclarative/tests/auto/quick/qquickwindow was segfaulting,
especially when running testWindowVisibilityOrder by itself.
Change-Id: Ice6b30320ac563f0c70264aa5c57de21d2e4d56e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
In cb8445f032 we removed the historical
+1 in font heights and the corresponding -1 in the descent measurement
for all font engines. But the change to the direct write font engine
was lost at some point during the transition to QPA, where we seem
to have integrated an older version of the source file.
[ChangeLog][Windows][Fonts] Fix off-by-one in font descent when using
the DirectWrite font engine.
Task-number: QTBUG-41783
Change-Id: Iffa24b5f2b4f6cc3a1f0034fdff63a1ee62ea9f7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
... so that a user can have more fine-grained uploadProgress signal
emissions if desired.
Change-Id: I9f77fd80c100dbe249beaf3057e6e8974680ec59
Reviewed-by: Markus Goetz <markus@woboq.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
The change asked for by the comment is apparently done.
Change-Id: I7ef2b58eb8c38192904e83b1c2386d3c762e0bed
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
If detach() was called with a newStyle corresponding to a gradient,
but with d->style not a gradient, it would execute an invalid cast
and read invalid memory.
The reason this has not been seen in practice is that a non-gradient
brush instance can currently never become a gradient one. But that
may change when someone adds an operator=(QGradient), so in the
interest of robust code, add a check to verify the old style was a
gradient before accessing the corresponding member.
Change-Id: I216a144d31a9ed7145bcd829f3ae5f44a41672db
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
- Ensure top level widgets are cleaned up.
- Place wizards beside each other for comparison.
- Use classic style on Windows to avoid interference by Vista style.
Change-Id: I223a40ea14eefe65dc2e9e8ddee44b0f0c806e3d
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
Apparently, this causes problems with the completer due
to the fact that it matches the root drive "C:\" on Windows.
Task-number: QTBUG-41681
Change-Id: Iaf96675067e22e679371139a1a2fbf011a5edbdc
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
It doesn't allocate memory, so cannot throw and is a lot faster
than qgetenv().
Change-Id: I5b5aec194aab66c7cea8da736655cc7270ade272
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
When the UISupportedInterfaceOrientations key is missing, iOS will start
up the application in the orientation defined by UIInterfaceOrientation,
and if that key is also missing, it will default to portrait orientation.
Unfortunately, when the application has finished launching on an iPad,
there is no way to re-evaluate the current device orientation unless the
user actively rotates the device, so for example if the device is physically
in landscape orientation, and the application is started up in portrait,
the application will not auto-rotate to landscape after starting up.
It would seem that [UIViewController attemptRotationToDeviceOrientation]
would be the right API to do this, but even after telling the device
to beginGeneratingDeviceOrientationNotifications the device orientation
will still match the startup orientation until the device is physically
rotated. For iPod/iPhones this is not an issue, as the OS will update
the device orientation after startup. Presumably the difference in
behavior between the two device classes is due to the iPad supporting
any orientation for the application grid.
Since we would prefer the application to either start up in the right
orientation directly, or at least rotate to it after startup, and the
latter can't be done, we apply UIInterfaceOrientationMaskAll to the
Info.plist file. This also has the benefit that the application will
show any splash screens in the right orientation.
Change-Id: If0421bc7b82b7f14a510fa1f34eac4f6407f570f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
We were missing brackets, but luckily the only result was that we
unconditionally flushed events through flushWindowSystemEvents.
Change-Id: If10bcc6a07501b9fb0db891e01b8ecc9d794ab30
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
When the focus object changes to an object that does not have
IM enabled, we should hide the keyboard instead of resetting it.
This happens, for instance, if you change to a different tab in
an application while a text input in the previous tab had focus.
Previously the input panel would stay open and overlap part of the
new tab.
[ChangeLog][Android] Hide input panel when focus changes to an
object that does not accept input.
Change-Id: I4009d203559582fa02c15fdc1a3f009396af2531
Task-number: QTBUG-32399
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Fix a minor mistake in the the function parameter documentation,
and add a code snippet.
Task-number: QTBUG-39782
Change-Id: Ia5d88a983ad683ae5bde9f332d51adc4afda77a8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
...by implementing it via std::equal().
This might also enable STL implementations to choose a
hand-optimized version of the algorithm for C++ builtin types.
Change-Id: I1347a7f365b3d2947f19a81b95aa8d89b8ad303d
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
...by implementing it via std::find().
This might also enable STL implementations to choose a
hand-optimized version of the algorithm for C++ builtin types.
Change-Id: I86e94d63ff58332f2fa6eafb3c1baccd125a6f34
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
primeForCount tries to calculate a rough base 2 logarithm of the argument,
in order to access the array of deltas between primes.
However, the usage of an arithmetic shift instead of a logical shift
could cause "high" to stay at 32 -- if the argument is INT_MAX, for instance,
the condition of the if clause in the loop is always true. The loop
would go this way:
* precond: low = 0 , high = 32
* i = 0 : mid = 16, if TRUE, low = 16, high = 32
* i = 1 : mid = 24, if TRUE, low = 24, high = 32
* i = 2 : mid = 28, if TRUE, low = 28, high = 32
* i = 3 : mid = 30, if TRUE, low = 30, high = 32
* i = 4 : mid = 31, if TRUE, low = 31, high = 32
and hence the subsequent access of the 33rd position of the array
(by passing index 32) is out of bounds.
Now the if at i = 4 is true because "1 << 31" is an arithmetic shift,
not a logical one, and gives - (2^31) as result. Making it a logical shift
fixes this (INT_MAX is 2^31-1, the shift gives 2^31, so the if is false).
Spotted by Coverity.
Change-Id: Ied89f4c87d603a209284e22c30f18a3e464d84fd
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
121e712935 fixed it into QHash,
so copy the same ranges here.
Change-Id: Ia7738f878965b5593d6ca641d6b8911abfdd2dd3
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
- Streamline code and remove code that has no effect.
- Create temporary directory and files only when it is actually
required (empty start path).
- Remove try/catch as it is not commonly used in Qt autotests.
Its original purpose was apparently to ensure temporary file
cleanup, but that should now work since smart pointers are used
for temporary files and directories.
- Introduce variable for case sensitivity.
Task-number: QTBUG-41681
Change-Id: Ie5f621c30fc461b880292b853e0660b8fba316eb
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
The previous patch was flawed since by the time the QEglPlatformIntegration
destructor was called the virtual function table did not point to the methods in
QEglFsPlatformIntegration any more.
Change-Id: I310e5e3e734a22b44645ba912b579f193bcfae86
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
When:
- i == 0 (at end of current POINTBLOCK),
- numFullPtBlocks == 1 (only one more POINTBLOCK left) and
- iCurPtBlock == 0 (last block contains no points),
Valgrind rightfully complained about an invalid read:
Conditional jump or move depends on uninitialised value(s)
at 0x517B08B: PolygonRegion(QPoint const*, int, int) (qregion.cpp:3480)
Fixed by setting 'next' to nullptr when !numFullPtBlocks OR !iCurPtBlock.
Change-Id: If5225fdfa66f2910a8aafb675cd02b40c0a81ad9
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
GCC and Clang support compiler intrinsic error detections tools:
address, memory, thread, undefined
Let users conveniently enable it in qmake, for instance with
CONFIG += sanitizer sanitize_address
Also add a -sanitize [...] option to configure to use it by default
for both the Qt libraries, and user applications.
[ChangeLog][configure] Added support for GCC/Clang -fsanitize= options
Change-Id: Ie5418abcdf41842566df510d7707e41739e66f87
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>