Useful for any application that can take URLs on the command-line, so that
full paths and relative paths can also be accepted.
Change-Id: I8a2c50f36d60bdc49c065b3065972fd5d45fa12a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Small improvement to the code by using an enum instead of a boolean.
Change-Id: Ib792cf97224b5204fd36ca215387fc7be34f2c32
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We can do the (atomic) test of studyData before locking the mutex
protecting the entire function body.
Change-Id: I3006e3a0028608f21668ddaebe8a799aed56362f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
If a user doesn't like that QRegularExpression might do an
uncontrolled CPU/memory spike when it decides to optimize a pattern,
offer a way to disable the automatic optimization.
Change-Id: I38a98a3bfb239cfad9f977b0eeb75903268e747f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The fact that we kick in a pattern study and possibly a JIT compilation
after an undocumented number of usages is suboptimal, for a number
or reasons: users may want to JIT compile a pattern immediately,
and at the same time they may not want a random delay in the program
(due to the pattern getting optimized at a random usage).
So: add an optimize() call to force an immediate pattern optimization,
and a pattern option to force an optimization on the first usage.
Change-Id: I95efdecfd31f11ca7cceb9c05037df613601a11c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Determine KDE prefixes in the following priority order:
- KDEHOME and KDEDIRS environment variables
- ~/.kde(<version>)
- read prefixes from /etc/kde<version>rc
- fallback to /etc/kde<version>
Task-number: QTBUG-36184
Change-Id: I9010ea485f1954b21bda73b02993dbddef67eb1d
Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
Reviewed-by: David Faure <david.faure@kdab.com>
The qdoc command \generatelist has an argument that tells
qdoc which list to generate. When the argument is "classes"
qdoc generates the "All C++ Classes" list. qdoc looks for a
common prefix for all the members of the list and sorts the
members of the list using the character that follows the
common prefix. The problem was that the common prefix "Q"
was hardcoded in qdoc.
This update allows the \generate list command to have a
second argument, which is the common prefix. If the common
prefix is not provided, qdoc sorts the members of the list
on the first character.
There is only one use of the \generatelist command with
the classes argument in Qt5. It is changed to be
\generatelist classes Q, and the qdoc user manual is
updated to reflect this change.
Task-number: QTBUG-38226
Change-Id: Ie1011d728819a1e5598bbdf73b7444009377d231
Reviewed-by: Martin Smith <martin.smith@digia.com>
This bug was probably intoroduced when the QmlPropertyGroup
became a first class Node type. Otherwise, there is no way
to explain how it worked at all. But now qdoc includes the
attaching type.
Some debugging code was also cleaned up.
Task-number: QTBUG-35559
Change-Id: I478efb7f4356d51015af9f33c893958d4b4ae301
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
gcc doesn't yet warn when a non-POD return datatype is unused,
but clang does, at least.
Change-Id: Ia4c39001994ac09cf20e458bc5a66710bd11780c
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
[ChangeLog][QtGui][QGuiApplication] Add support for -icon command line
argument on X11, add -qwindowicon on all platforms.
Change-Id: Iacc602466699bf634d8b34aab7ed73c83fd9844f
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This change greatly simplifies the code used for
reading paths from config files: near-identical
functions Config::getCanonicalPathList() and
Config::getPathList() are combined into one, and
the use of Config::getCleanPathList() is
replaced with the above.
Effectively, all paths read from the config files
are now converted into canonical ones.
It also adds support for absolute paths in config
files.
Task-number: QTBUG-36193
Change-Id: I2dc1ee6a67a400e056404ec1c09c6e81f643aa77
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Dynamically load shcore.dll, use SetProcessDpiAwareness() instead
of SetProcessDPIAware() when available. Add command line parameter
to control level.
Task-number: QTBUG-37347
Change-Id: I1259b0943b41e50066e7e3870ed3136afd8f18fe
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
On Windows, DataLocation currently returns the value obtained by
passing CSIDL_COMMON_APPDATA to SHGetSpecialFolderPath(). This is
the local non-roaming path. For actually storing settings, the roaming
path should be used (CSIDL_APPDATA). Introduce new AppDataLocation to
return that path and AppLocalDataLocation for the local path and deprecate
DataLocation.
[ChangeLog][QtCore][QStandardPaths] QStandardPaths now has new
enumeration values AppDataLocation, AppLocalDataLocation to be able
to differentiate between roaming and local paths on the Windows
operating system. DataLocation is deprecated in favor of AppDataLocation.
Task-number: QTBUG-38483
Change-Id: Ib1de8c7031a863ed5eac10c747de6f7ff1a090c7
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: David Faure <david.faure@kdab.com>
... and not duplicate part of the logic in the SPDY code. This code was
also existent in QNetworkRequest.
The next step will be to actually respect the header if set via
QNetworkRequest::setRawHeader().
Change-Id: Ifda2658ea826d039c9dad61ed6fa42aaedaee6b6
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: Id001ff3087e7317bbcd66cd22a91a4a67942567f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
This allows us to use JIT also for partial matching.
Change-Id: I3963a03e769c61ab68d28c617cbeee2bc49c8f9b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
In ES builds configure will now check for OpenGL ES 3.0 and 3.1
availability. This allows qopengl.h to include the correct header
and, by defining QT_OPENGL_ES_3 and QT_OPENGL_ES_3_1, the OpenGL
wrappers can provide support for MapBuffer, VAOs, etc. on GLES 3.0+
too. Right now this is not possible since the only standard way to
use an ES function specific to a given version is to use the function
directly. The extension mechanism (eglGetProcAddress and friends), that
is often used in desktop GL, is not available for such functions.
[ChangeLog][QtGui] QtGui's OpenGL headers are now automatically including
the highest available header (gl31.h, gl3.h or gl2.h) in OpenGL ES builds.
Task-number: QTBUG-38168
Change-Id: Ib857c58fe1696a9546fdd1aa143a9237e80325a5
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Do not link against ICU on Windows, unless it is explicitly requested
('-icu' configure option). This removes the QtCore->ICU dependency
if ICU was detected in the configure environment.
So far ICU has been used in Qt Core for
- support of a larger set of codecs (805 instead of 135)
- more accurate QLocale functionality (QLocale::toUpper,
qLocale::toLower)
- string collation
However, for all functionality there are also backends using the
Windows API/Registry (QLocale, QCollator), or built-in
codecs that are part of QtCore. Since the ICU dependency is quite heavy
(3 libs with about 25 MB) it seems sensible to not require it by default.
QtWebkit is unaffected, since it has it's own ICU check.
[ChangeLog][Windows] Changed configure defaults so that Qt5Core does not
link against ICU libraries anymore. Pass '-icu' to enable it.
Task-number: QTBUG-38259
Change-Id: I3fd3e8ac0f091f532b04945718c0e4a3cc71a087
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
For now only xcb on GLX is supported. Other platforms will follow later.
Add also some missing documentation for the platform OpenGL context factory
functions.
[ChangeLog] QOpenGLContext is now able to adopt existing native contexts.
Task-number: QTBUG-37552
Change-Id: I5dd959f102df178f646b2df5989203b5dc6de376
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Currently a click on e.g. the dock icon is not propagated to the
application so if for example the main widget is hidden, it can't be
brought back. Also neither applicationDidBecomeActive nor
applicationDidResignActive do anything. This patch fixes it
[ChangeLog][QPA][OS X] Add support for ApplicationState capability.
Application can now detect when an application states has changed
as well when the dock icon has been clicked.
Task-number: QTBUG-10899
Change-Id: I53d3e6eed4adc62b343e7aa3e3d8068d3248e7df
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Added the function pointer constructor to QSignalSpy to take advantage
of the new connect syntax.
Change-Id: I94218a096c677cdba73e1b2cfa8b9c09bc28145f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
Its purpose in life will be to describe pixel formats
[ChangeLog][QtGui] Added QPixelFormat class
Change-Id: I74d8f974606520efb3935110ff3d6ddb5ea805a8
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
IteratorOwner pointer specialization was failing for void* because of
an invalid function overload.
Change-Id: I80355ddd2b871c1fa2fa5bf5a4ed8bc7768fc3c9
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
'const void' is not derived from QObject, and is not a type we can use
sizeof to determine that.
Change-Id: I008f444bbed9fc8f9147da0f7f336757f660e224
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This update makes it possible to link to the name of a
QML property group with a \l command. e.g. \l {Item::anchors}
Task-number: QTBUG-35844
Change-Id: I2dc51bd90eadd13754a8f4d3357f3f17605a068d
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
These hooks only worked reliably with LD_PRELOAD on Linux/GCC, on other
platforms they depended on what exactly the compiler optimizer is doing
as well as some nasty assembler rewriting to actually access them. The
new system uses a simple array of function pointers that can be set to
custom hooks by tools that need this (based on ideas from Andre Poenitz).
This also covers qt_startup_hook (similar problem), and the Qt version
number that Andre had asked for.
Change-Id: I2c3e7950fd49b1b1d04176be34c2fff3293981b0
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
The comment shows to which string a QT_MOC_LITERAL is pointing.
Change-Id: Ia389d750b1b1c21e2242bad6beceea4f9298ff8e
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
gcc doesn't yet warn when a non-POD return datatype is unused,
but clang does, at least.
This detected two bugs in qtbase due to the bad QDate method naming,
and will help application developers to avoid this trap too.
Change-Id: I106c1a32d2c6fc8d02f57beb7b61940605c80d76
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Use QSharedPointer<T>::create(), which co-locates the refcount with the payload
in a single memory allocation, instead of QSharedPointer<T>(new T), which causes
two allocations.
Change-Id: I58196b6390dcc9bd52417e279fd9e000ab9ee9cc
Reviewed-by: Richard J. Moore <rich@kde.org>
QStringList = QList<QString> already compiled, but was interpreted as
QStringList = QStringList(QList<QString>), which involves the QList
copy ctor. Adding the overload saves that copy.
Cannot use a using declaration here, since the return type is different.
Change-Id: I9f4feb2f97480d2d6a3b6fa7c71b5d511b623601
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Required to repaint OpenGL content properly.
Task-number: QTBUG-38105
Change-Id: Ie9441d56bd9d1a4eb399210369592f03e19c4929
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
When Xlib detects that its underlying XCB connection got into an error
state, it calls its I/O error handler. However, the default
implementation doesn't print the error code from XCB which might be
useful for debugging.
This commit adds an I/O error handler which prints the error code from
XCB with a string describing the error and then calls Xlib's default
error handler.
Change-Id: I7f1fb3f1e8d0fdc3ac9db03ae7d154330c31db0c
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Use QSharedPointer<T>::create(), which co-locates the refcount with the payload
in a single memory allocation, instead of QSharedPointer<T>(new T), which causes
two allocations.
Change-Id: I84980e98c4fe9773f12533983937eafa0b0ab250
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>