A bit mask can have more than one bit set, so we can't use a switch
statement here. Also use the correct enums, and make sure that the
profile is set to QSurfaceFormat::NoProfile when the OpenGL version
is less than 3.2.
Change-Id: I6d2c4e35d4fb3d87fd47c9724cb415f8619a7b95
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
there is no reason why testlib in particular should have them, while
every other module uses the standard strings.
Change-Id: I9b9e45957dfccbf02939c326dcebf06133098ede
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
it differed from QMAKE_LIBS_OPENGL only for the irix/sco/unixware -cc
specs for not entirely obvious reasons. as all these specs are obsolete,
remove it.
Change-Id: I7d50ffa11ff830371ea52c9ebe25e1f1bc56b307
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
$$quote() doesn't do what you think, unless you did RTFM.
and it's usually just as unnecessary as double quotes,
depending on context.
Change-Id: Iaeadaa75b0650aad383a6e6031b822c04b537fb1
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
$$(FOO) would automatically split the contents of the environment
variable at whitespace (and interpret quoting inside it). the way to
prevent the splitting (but not the quote interpretation) would be using
"$$(FOO)".
this behavior is entirely unexpected and thus an incredibly effective
source of quoting problems - according to a grep over the whole qt
sources, there isn't a single case where things were done right. in qt
creator, well over half the cases are wrong.
also, the "feature" seems entirely pointless: nobody uses spaces as
separators in environment variables.
consequently, simply remove it, even in a patch release. i'm postulating
that nobody will complain.
Change-Id: I9ed3df1b0d1ef602acd78ceb118611d294561da6
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
It does not have any effect in a SUBDIRS-type .pro-file.
Fixes 42a6d405e4 .
Change-Id: If2eafacecfd69b916861bf4b0afddb62628d720f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This is possible with QWeakPointer, so allow it for migrating
code too.
In the process, replace the QPointerBase with a member variable for
simplicity. The functionality of the QPointerBase is replaced
by a TypeSelector template.
Change-Id: I3b4c77bdeda2b863cc33e84a3da8a25bae928c8c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
QPointerBase is not public or exported and it is to be removed
in Qt 5.1.
Change-Id: I060c6b2ebcde8dedde85dc21404fc393150d452c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Transient scroll bars should never be used outside of scroll areas,
since they would be unusable.
Task-Number: QTBUG-29389
Change-Id: Ie52d2093a4ab66085300a19ca9a1b32f13a29e79
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
it's pointless to test the target platform - it's always windows. but it
may make sense to test the host platform (not sure whether it's possible
to x-build angle).
Change-Id: I57847c930d6108a24a1005aa44f94ba0b4f9dfec
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
use library function which deals with shell specifics to set up PATH
Task-number: QTBUG-29427
Change-Id: Ic2bed4d7f0eb072bcce6a9f99be02d3cd08a7c98
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
there is mightily little point in unsetting variables right before
unconditionally assigning to them.
Change-Id: I24c1814ce38bf9aab4496679b1a670f3cd55c536
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
We don't have to do fuzzy mkspec name searches anymore.
The WinCE mkspecs add "wince" to QMAKE_PLATFORM which ends
up in CONFIG.
Change-Id: I6c0576b5504beb416e95eeae0dec579b16b84746
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This was a regression bug owing to a big qdoc cleanup
for Qt5. But the way QML inheritance had been handled
was not a good design, so it has been changed here.
When a .qml file is parsed by qdoc, the base type of
the QML component is detected, and its name is stored
in qdoc's tree node for the component. After qdoc has
parsed all the QML files, it traverses the tree, and
for each QML component that has a base type name but
no base type node pointer yet, it searches the tree
for the base type node and stores the pointer to
the node in the node for the components. Then when
the output generator generates the doc page for the
component, it has access to all the inherited members
in the base type.
Task-number: QTBUG-29569
Change-Id: Ib4958d05f55fa48a572f8ca51ffd57712f29bbc7
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
A new glyph type is added to the glyph caches for ARGB bitmap glyphs,
and the raster and OpenGL paint engines have been modified to support
this glyph type for drawCachedGlyphs().
The CoreText font engine implements support for these glyphs through
the CTFontDrawGlyphs API, since CGContextShowGlyphsWithAdvances does
not handle color glyphs.
Change-Id: Idad9ce75a911cae130d65aebe59142772a16fc12
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
If Qt is configured with -libdir /some/dir/outside/the/install/prefix/,
then for use absolute paths for the executables and include dirs too.
Change-Id: I5ccf62be6f93f97d934df62038fe4cd40dca9a93
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
The parent file has already set a variable for it.
Change-Id: I90ddda355a580f44ea7e1e44cc7df717fa0a8b7b
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
If a popup widget(e.g. a popup menu) has been closed due to a mouse press
event, the mouse press event will be consumed by the popup widget and the
widget under the mouse pointer can't receive the event. This will lead to
confusing behavior such as a push button under the mouse pointer is not
been push down.
This patch replay the mouse press event if a popup widget has been closed.
Change-Id: Id493583dfea9e64ab2964e28d559122c43bbc2a6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
The XCB plugin requested a forward-compatible context regardless
of whether QSurfaceFormat::DeprecatedFunctions was set, and also
ignored the QSurfaceFormat::DebugContext option.
Change-Id: I81c737447b554b3b6f61c2725bce7583e0e887ab
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
This avoids warnings in compilers that check for unused variables. They
can't tell that the the variable came from a header.
Change-Id: I1ea5e5bbc76d676fbb561bdc8ae6543e758de90e
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Change-Id: I18697037db742d38874c8a95df12c189ccc51068
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
It's similar to Q_UNUSED, but this is to be added in the declaration
Change-Id: I2f664129fb1f34f7913ef371d45c2c0fec958174
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We need to clarify what's the status of the implicit capturing
group #0 in both of this methods. The former doesn't include it,
while the latter does for convenience/consistency in the way
we count the capturing groups.
(Note that this last behavior is actually autotested.)
Change-Id: I2170842c2a6dffa34fa56389ceead61a92c07cd1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(?J) inside a pattern string can be used to allow or disallow duplicated
capturing group names in the pattern string itself.
Although PCRE supports duplicated names, in Qt we don't yet.
Change-Id: I21cd0c41273cd7ef42870ced3a0fad6ba7035cbc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
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>