Information about the pattern (number of capturing groups, newline
settings, etc.) are grabbed when the pattern is compiled the first time.
Studying (=> optimizing) is always done later, after a certain amount
of usages. In case this ever changes, add an assert.
Besides, we're not grabbing any info that require studying the pattern
first.
Change-Id: Ica15fa21f7bf13213288d7090d3396a89900078e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The current size hint is not correct and the text is truncated
when using prefix/suffix.
Update QCommonStyle::sizeFromContents() to get the button
and frame widths into account for the QSpinBox width.
Update sizeFromContents() in the different styles to be
consistent with the change in QCommonStyle.
Update minimumSizeHint(), calculate it using the prefix and
data range. The SpinBox can shrunk over the suffix if any.
Task-number: QTBUG-28863
Change-Id: Ia742232edf8b11d0283e8136c2818928f8755103
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
QStringRef could have been trivial. The destructor is empty, the copy
constructor copies exactly the members and has an empty body and all the
members are POD. Both functions should be removed or defaulted in Qt 6.
When the destructor is defaulted, we can make the constructor constexpr.
We can't do that now because QStringRef is exported and some nasty
compilers (MSVC) like to export all functions, even inline ones, and
then call them without emitting a local copy.
Change-Id: Ie7509fd1a3f737a6c9156ea078d13bb347fc6be0
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Do not include qsslsocket_p.h unless SSL is present.
Change-Id: I7e56b7758729907892d85f97d5a9d3ccaf7a3314
Reviewed-by: Peter Hartmann <phartmann@rim.com>
GL_ARB_debug_output only requires OpenGL 1.1 and above.
Change-Id: Ib79d370fac36fa737817ea678f0dee25283dfa31
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
On Mac OS 10.8 and iOS 6.0 we can use CTFontCopyDefaultCascadeListForLanguages
to get the list of fallback fonts, which is preferable to reading the plist
file from the filesystem. The latter doesn't work (is not allowed) on iOS
in any case, so for iOS < 6.0 we use a static list of fallback fonts.
Change-Id: Ibb5e1b4dedd6bfb936f66b53a20f7ced83536ed7
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
In some situation (such as iOS currently) we may end up with an empty
fallback list, and we don't want to re-populate the font database
on every call to fallbacksForFamily().
We do not guard populateFontDatabase(), since it's called both initially
and every time the font database has been invalidated.
Change-Id: Ief1342c40f75e5d393e054e9a20bc94bc357d482
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
QPixmap::load() would not detach, so multiple paths could get associated
with the same QPixmap, causing the wrong pixmap to be shown.
Task-number: QTBUG-29639
Change-Id: I064dd6a9611b5996853bec9fb20b6224a0adcf62
Reviewed-by: aavit <eirik.aavitsland@digia.com>
This finally makes it possible to make windows fullscreen etc from
QML by doing "visibility: Window.FullScreen". I don't see any reason
from not having the API at the QWindow-level instead of at the
QQuickWindow-level since this way it can benefit other use cases too.
Change-Id: If27344306eb563bc2ccd83296a46b1f2862e2db1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
The missing "/" in front of "../Plugins" prevents
this from working - platformPluginPath is never
set.
Deployed platform plugin loading works in spite of
this via qt.conf which adds the plugin path to
QCoreApplication::libraryPaths().
Change-Id: I7ae4d13c65a380ddad72bffd29b776c39ea91c8a
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Additions to make the convenience classes work for the
Qt for Android port.
Change-Id: I25ba0faf93c7e09ab04a3fa0784e04631e5ab036
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
This patch changes QGraphicsViewPrivate::updateRubberBand to return
at once in case some of the first conditions (which were needed to
do something with the rubberband) are not true.
The indentation after these ifs is fixed, and there are a few style
fixes, but beside the first 2 ifs, there are only white-space
and new-line changes.
Change-Id: I7e2edb7bfd334b35ee8ab246f733d854bff7e0f7
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
VxWorks has defined variables with same name as in Qt's headers.
Remove these undefines because that has already done in file
src/corelib/kernel/qfunctions_vxworks.h. See related change
f7bd8652ca.
Change-Id: I994ac9d00ca223b9fa955dfcba8ad6c8dcbd0549
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Vxworks DKM mode does not have rand_r function, use function
implementation from qfunctions_vxworks.h/cpp instead.
Change-Id: I8f23c3453ab9f31280eb90f66dd83d7a64ee98c9
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
It was only used in the now removed OpenGL 1.x paint engine.
Change-Id: I2237172de700bfd31ca25279fbed21d601785962
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
For implementing to/fromMacCGImageRef in QtMacExtras.
These do not depend on internal Qt state. The main
reason for exporting them is to keep the implementation
in one place to ease maintenance.
Refactor qt_mac_cg_context to support QImage.
Add qt_mac_toQImage.
Change-Id: Ia9c226ed52d087b2c6b47aa8210ed8f2645b9cf2
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Currently, using QDate::maxJd() in tests will fail. This patch changes
some ints to qint64s to prevent overflows where necessary.
Change-Id: I61ebf8f233411a7544689fd5bfa9c3abee54e933
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QTextCodec::codecForHtml currently fails to detect the charset for this
HTML:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=9,chrome=1">
<title>Test</title>
</head>
This patch makes the detection of charsets more flexible, allowing for
the use of the HTML 5 charset attribute as well more terminator characters
("'", and ">").
I also added a *_data function for the unit tests.
Task-number: QTBUG-5451
Change-Id: I69fe4a04582f0d845cbbe9140a86a950fb7dc861
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Denis Dzyubenko <denis@ddenis.info>
ICC thinks that the return statement is missing:
src/plugins/accessible/widgets/itemviews.cpp(867): error #1011: missing return statement at end of non-void function "QAccessibleTableHeaderCell::parent"
Clearly it's wrong, but the function is overly complex for no good
reason. So just simplify it instead.
Change-Id: Ic63029df18b4712d9864a4dc66b6751b2d4574b7
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
That's what the macro did anyway, except it had an extra "static"
keyword. This allows us now to use Q_ALWAYS_INLINE in non-static
contexts, if we wanted to (e.g., certain template cases).
Change-Id: I899d359f46234e93d1912ef9125080dc84e15c93
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
... like e.g. in QAbstractSocket::connectToHost().
We can set the scheme on the query URL based on well-known ports; even
if the port is not well-known, we can just query the URL anyhow and let
the netstatus API resolve the right proxy for us.
In addition, return early for local schemes like "file" and "qrc".
Task-number: QTBUG-29425
Change-Id: I900f1ecbac6dd380bb8a77470b39de2c07aa7f6e
Reviewed-by: Andrey Leonov <aleonov@rim.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
all non-installed tools are properly registered, so they don't need the
fallback. conversely, we can assume that non-registered tools are
already installed.
this enables us to build docs in qtbase after an incremental
build+install up to qttools.
Change-Id: I95a55f6b84e01885bcf6dd656caf0dd2b679bb73
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
so that *really* all non-installed tools are properly registered.
if some day we have more build scripts, this code should be centralized
in a .prf file.
Change-Id: I5b292a4b30199cb59838319f2dc9f88cd54bb57d
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Calling popUpMenuPositioningItem:atLocation:inView: will swallow any
mouse up/released event, if we popup on mouse down/pressed. Since we
cache the button state in QNSView, the safest way seems to be to clear
this button state. Another option would be to send Cocoa mouse up
events for each mouse button, but we prefer to keep things simple.
Change-Id: I7f3f369c45e9f5ed9d2ab693bffd8be4a4596ae6
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Change-Id: I491edcae84c149775cf3640626ccff8cbf0d69fe
Reviewed-by: Jon Severinsson <jon@severinsson.net>
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
The compilers checked here are not supported in Qt 5. Additionally,
the QSharedPointer implementation has similar operators without such
guards, so in reality these compilers may not have worked
with Qt 4.6+ either.
Change-Id: I208f3cde7c689770ae15245a555e3a58b749a8a3
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Rename qt_gl_read_framebuffer function to qt_gl_read_frame_buffer in
Qt5OpenGL. This fixes an error when linking statically against both Qt5Gui
and Qt5OpenGL:
Qt5Guid.lib(qopenglframebufferobject.obj) : error LNK2005: "class QImage
__cdecl qt_gl_read_framebuffer(class QSize const &,bool,bool)"
(?qt_gl_read_framebuffer@@YA?AVQImage@@ABVQSize@@_N1@Z) already defined in
Qt5OpenGLd.lib(qgl.obj)
Creating library debug\composition.lib and object debug\composition.exp
The function was duplicated in 6e28e844 .
Change-Id: I9e3b78e0ec5b25264575d563538587b45cd93e86
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Addon modules may not be in the standard Qt namespace and therefore do
not use the QT_{BEGIN,END}_NAMESPACE macros. Instead module specific
QT_{BEGIN,END}_NAMESPACE_FOO macros are used. Extend the syncqt test
to allow for this and ensure that the QT_END_NAMESPACE suffix matches
the QT_BEGIN_NAMESPACE suffix.
Change-Id: I33110c01118b0fb4376307db7447f747fc38bb29
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
the translation infrastructure is disabled in the bootstrapped tools, so
the translations are wasted.
Change-Id: Ief5d13f09242e03aaf0d4a3d9b1645f9c7a1ab3a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
m_nsWindow is not set for non-toplevel QWindows,
causing devicePixelRatio to always return 1.
Use [m_contentView window] instead.
Change-Id: I6689a70812c9484f103b5e706fe4c1b76406b750
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
The index set by setRootIndex is the root of the visible part of the
model. Expanding more than that is not needed.
Change-Id: I0015e313ef046ff63c67338c4f00c37e1aa71ca7
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This is the <prefix>/include directory which is independent of the
module and which only has to be used once. As everything uses QtCore,
it is enough to set it only there.
The CI system is a special case, in that it tests things before
installation. Handle that case too.
Change-Id: Idcdf9617e199b7d490cb3553cce07f1f464b3bec
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>