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>
On Yosemite checkable toolbuttons look differently
when highlighted - this modification tries to imitate such look
without pixmaps we used on OS X >= 10.5 && < 10.10.
Change-Id: I0fcdff42a67fa6d5188c9dc64401f0f27ae60b5d
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
This is an opt-in trade-off between type safety and user
code convenience.
QT_NO_CAST_FROM_ASCII is highly beneficial to avoid unintended
conversions from 8 bit data with potentially "unsuitable"
encodings to QString. However, it has the undesirable side-effect
to require user code to wrap character and string literals
in QLatin1Char(...) and QLatin1String(...) or use similar
construction, cluttering the code significantly.
This patch introduces a QT_RESTRICTED_CAST_FROM_ASCII macro
that works almost as QT_NO_CAST_FROM_ASCII, except that it
enables the QChar(char) constructor and adds an additional
QString(const char (&ch)[N]) constructor that matches
C++ string literals, but no arbitrary character pointers.
This avoids a significant share of the need to clutter the
user code by only a slight relaxation of the type-safety.
[ChangeLog][QtCore][QString] Added QT_RESTRICTED_CAST_FROM_ASCII
macro as less intrusive alternative to QT_NO_CAST_FROM_ASCII.
Change-Id: Iac72f1f90f81fbcae9bfb1fe68b0fec6ffb36c50
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Make getProperties() return a reference and directly call value() on it.
Almost is a tail-call now, if it wasn't inlined and if the dtor of the
default argument didn't have to be called.
Saves 288bytes in text size even so.
Change-Id: Ie841501c1ce1379ca928f7474b90bc6487d77ab2
Reviewed-by: Valerio Valerio <valerio.valerio@jollamobile.com>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
The rest of the code uses Q_SIGNALS, even Q_EMIT, so be consistent,
if nothing else.
Change-Id: I6441d0a630e7b592d15431c2b9ff4398223bbe9c
Reviewed-by: Valerio Valerio <valerio.valerio@jollamobile.com>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
And no, I didn't investigate why a Q_UNUSED line with a missing
semicolon compiled so far...
Change-Id: I72f9bad758932fb617f43e712ac09c9e72436ff4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
It doesn't allocate memory, so cannot throw and is a lot faster
than qgetenv().
Change-Id: I3bd7b79b520ddbb9d4dd6adb3a495e214f111c2c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
It doesn't allocate memory, so cannot throw and is a lot faster
than qgetenv().
Change-Id: I78ced6a0207e3a9c6deb71c6ce097eb79fe5e8cf
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Instead of initializing accelEnv 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: I619fe45d8eb2a50515f5fb255cabd23a5966b11e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
It doesn't allocate memory, so cannot throw and is a lot faster
than qgetenv().
Change-Id: I7efe6124ab78092f05ef4296e37bd0d123deb064
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
The types are already defined by qopengl.h, and the GLchar could be
incorrectly defined in the Qt namespace for GLES2 namespaced builds.
Change-Id: Ia2052599538af51fdadc434935d51bbfe8437453
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
It doesn't belong in QIOScreen, and simplifies the flow when changing
the focus window or the window state of the focus window. Both will
result in calling updateProperties on the view-controller, which will
re-configure the statusbar visibility and hide/show it as appropriate,
before triggering a re-layout of its own view, which will in turn
trigger an update of the screen properties based on the new statusbar
state, before re-layouting of QWindow based on the new screen state.
Change-Id: I89077a3fb5f843949ce833e4e727d2c753ea2eb6
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
This reverts commit dbbb4d1654.
This change should enable QDoc to generate documentation for the
Mac-specific widgets, QMacCocoaViewContainer and QMacNativeWidget.
Change-Id: If0dd6530906e3e13921384372badc73ba4727b9d
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
OpenVG support and the -graphicssystem command-line option
is not available since Qt 5.0.
Change-Id: I19c89cd3bb2c4a2215cdfae9fd783dece637b30f
Task-number: QTBUG-41265
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
This lifts the documentation into a more recent context. One might
argue that Qt is a little bit older too.
Change-Id: I3e85f21bbad1179136629c2025e3499481fc8334
Task-number: QTBUG-16809
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Add missing transformation for first rectangle of a region
consisting of multiple rectangles.
Task-number: QTBUG-41300
Change-Id: I1a25c422c93ceade79de79d5c49891e0a7211943
Reviewed-by: MihailNaydenov <garfieldhq@yahoo.com>
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
Print a warning when the developer/user has explicitly
requested the software backend, but loading openglsw.dll fails.
Change-Id: I8b1f079538ac70ceacbf1a397a276659c760a4cc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
The code which extracts style assets for the Android style
is licensed under the Apache license, which is not compatible
with LGPLv2.1. It is, however, compatible with LGPLv3. This
means that the Android platform plugin cannot be LGPLv2.1
as long as this code is included.
To minimize licensing confusion, we default to only providing
LGPLv3 for Android. If you want to build a LGPLv2.1-compatible
library, you can add -no-android-style-assets to the
configuration. This will in turn enable the LGPLv2.1 in
the configure output, and it will disable the extraction
code in the platform plugin.
Running the Android style with an LGPLv2.1-compatible platform
plugin will work, but it will look horrible.
[ChangeLog][Android] Default open-source license for
Qt for Android is now LGPLv3. For compatibility with the LGPLv2.1
license, add "-no-android-style-assets" to your configuration.
Change-Id: I6c7b52140f38138520871fa7c69debbb4ee90e6c
Task-number: QTBUG-41365
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
This license file has to exist, since much of the code is licensed under
LGPLv3.
Change-Id: I2795a7cc62f6de65a35921e38d2ab5f8f0233f71
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
We don't have an explicit XPLATFORM_OSX, but XPLATFORM_MAC applies
to both OS X and iOS (as now clarified), so we move the default
out of the XPLATFORM_IOS scope and to a XPLATFORM_MAC scope.
Change-Id: I6b9ba9c881c28def08b9ab863d0165fbd9dedc6d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
On API-11+ we are going to use PopupMenu instead of ContextMenu to show
context menus. A PopupMenu displays a Menu in a modal popup window
anchored to a View. The popup will appear below the anchor view if there
is room, or above it if there is not.
Task-number: QTBUG-39736
Change-Id: Ie412ab0935b868348ce5c8bb0bf53571ffefd582
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>