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>
After much head-scratching, we found no reason for the backwards iteration.
Indeed, forward iteration should be slightly faster than backwards, because
it operates in the direction in which cache-lines are filled, usually.
This is in preparation of using std algorithms instead of hand-written
loops. It avoids having to use std::reverse_iterator.
Change-Id: Id2388eab2339c24deb93095495d87056a9c57133
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
After much head-scratching, we found no reason for the backwards iteration.
Indeed, forward iteration should be slightly faster than backwards, because
it operates in the direction in which cache-lines are filled, usually.
This is in preparation of using std algorithms instead of hand-written
loops. It avoids having to use std::reverse_iterator.
Change-Id: I180c52e0bb90e823216b77d3f49f2a3fd395567d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
After much head-scratching, we found no reason for the backwards iteration.
Indeed, forward iteration should be slightly faster than backwards, because
it operates in the direction in which cache-lines are filled, usually.
This is in preparation of using std algorithms instead of hand-written
loops. It avoids having to use std::reverse_iterator.
Change-Id: Ib62cf0a6f2a33d186cb174b23b0d6bb2891b6c63
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
After much head-scratching, we found no reason for the backwards iteration.
Indeed, forward iteration should be slightly faster than backwards, because
it operates in the direction in which cache-lines are filled, usually.
This is in preparation of using std algorithms instead of hand-written
loops. It avoids having to use std::reverse_iterator.
Change-Id: I31be6ad2b6d78ccce7e8a8f8f8b9e0af62f7471b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
MSVC 2013 complains about the use of 's' if a variable 's' is already
defined in the context:
error C2373: 's' : redefinition; different type modifiers
error C3493: 's' cannot be implicitly captured because no default capture
mode has been specified
This looks like a compiler bug. Anyhow, it's easy to avoid the clash in
most cases by using a more distinctive name ...
Task-number: QTBUG-41706
Change-Id: Iaff1b6d37897fa8cf9e4913effa0498f9fd7bb07
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Tracking the file, line, function means the information has to be stored
in the binaries, enlarging the size. It also might be a surprise to some
commercial customers that their internal file & function names are
'leaked'. Therefore we enable it for debug builds only.
[ChangeLog][QtCore][Logging] File, line, function information are not
recorded anymore for logging statements in release builds. Set
QT_MESSAGELOGCONTEXT explicitly to enable recording in all configurations.
Change-Id: I454bdb42bcf5b5a8de6507f29f2a61109dca9b91
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
The example suggested that QProcess searches the PATH variable to find
the executable for the child process. That's not true. The environment
that's passed with setProcessEnvironment is just passed to the child
process. Removed the misleading example and fixed the function's
description.
Task-number: QTBUG-7321
Change-Id: I8ac4b6b02002eb0a99686f09bcf45f9bc677c8e2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Even when we do not intend to display the text, we still need to go
through the processing of mnemonics to remove them from the text.
Instead of capping the max underlines to 0, the TextDontPrint option now
just saves adding the underline formats.
Task-number: QTBUG-41593
Change-Id: I67790650dbed0092de2c63e5d5a9349dc02d5846
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
The proper init/destruction order is as follows:
QEglFsHooks::platformInit()
eglInitialize()
eglTerminate()
QEglFsHooks::platformDestroy()
Prior to this patch platformDestroy() was called before eglTerminate(),
leading to a crash on some platforms.
Additionally we need to destroy the native windows before deleting the
screen, otherwise the QEglFSWindow destructor ends up calling into the
deallocated screen.
Change-Id: Id08ccbac9bb44a778bcf1a55f73c0057e0a7b3af
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
otherwise we'll produce lines with tens of thousands columns when
dealing with QMAKE_BUNDLE_DATA.
Change-Id: Ia2a70f25e4ee1d3fe976027a7c46d234809a3f70
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
with qmake now de-duplicating the paths properly, we should version
these QMAKE_BUNDLE_DATA entries as well, so we don't depend on the
symlinking of the regular headers being done first.
Change-Id: Idaa2ccc1ba9b5684b0c8d84f7f760735f54432e1
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
According to Apple's documentation [1], framework bundles don't
have a 'Contents' folder. Instead, each version folder gets a
'Resources' folder which contains the Info.plist file, and which
is also symlinked at the top-level framework folder.
[1]: https://developer.apple.com/library/mac/documentation/macosx/conceptual/BPFrameworks/Concepts/FrameworkAnatomy.html
Task-number: QTBUG-32895
Change-Id: I5e55cc097b179012add0ceb7c567dace8e282895
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
the target path may have multiple components, e.g. Headers/private.
obviously, only the first component must be linked in such cases.
Task-number: QTBUG-32895
Change-Id: If632b3b72c170a9fde36e62c165e06ded53deda3
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
multiple QMAKE_BUNDLE_DATA entries can install into the same directory,
but it obviously makes no sense to symlink that repeatedly.
Change-Id: If65f7acdf4e158e33511917a027a380e642e2f28
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
instead of duplicating the plist/icon/bundled_files logic just to obtain
the dependencies, create them as a side effect of the actual target
creation.
Change-Id: I6a0fe26c82c490b1040a7a06d5d0e7a4567ae1af
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Add @FULL_VERSION@ -> Qt version substitution to
unixmake2.
This makes the Qt-generated Info.plist files compliant
with the bundle signing/validation process.
Task-number: QTBUG-32896
Change-Id: I1818f028c2f740d699629dd78cc0fe6ffaf94a1c
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
We do so by setting a 'no_plist' config property. Can be overridden
with 'force_debug_plist'.
The debug version of Info.plist would overwrite the release version,
and it also happens to contain invalid data. In particular,
CFBundleExecutable would contain the _debug suffixed libname, which
it shouldn't. See the entry about CFBundleExecutable on
https://developer.apple.com/library/ios/documentation/general/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
Task-number: QTBUG-32894
Change-Id: Ideb018e4768a7c4e276e1b07d77937451f6db6a2
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
this allows us to extend its dependencies, which we will make use of later.
Change-Id: I8809bdffb435455338e88e97049b10beeab0468a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
QFileSystemWatcher hangs at a mutex or semaphore when adding network
paths on OS X system.
There is an else block that does not increment the 'it' iterator
with ++it; inside the QFseventsFileSystemWatcherEngine::checkDir() call.
Change-Id: I6c250c7f3d25399c3a0a58ce864e9466320b166b
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
This is needed for dynamicgl support in QtWebKit.
Change-Id: I4d1769394ccdeaf449cac4f002c03ca8013f62f6
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
It may be rounded down to 0, thus losing its magic value.
Task-number: QTBUG-41324
Change-Id: I5a5b98bb24bd0478c10940a90a7dc691e2663f4d
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
avoids that we needlessly initialize QMLIMPORTSCANNER in addition to
QMLIMPORTSCANNER_SYS (by making the former have the contents of the
latter).
Change-Id: Ib8a12975de426ae94bd78d489099157c94cea189
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
to this end, add a mode to qtPrepareTool() which prepares the primary
variable for system() use (instead of use in makefiles).
Task-number: QTBUG-41032
Change-Id: If6aa6c206a70ecdbc2ea05bbb3cb470414fb02b1
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>