Commit Graph

12168 Commits

Author SHA1 Message Date
Fredrik Höglund
69701cb8c4 Fix the GL_CONTEXT_PROFILE_MASK check
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>
2013-02-13 21:35:24 +01:00
Oswald Buddenhagen
c8a8ca3059 remove QMAKE_TARGET_* overrides
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>
2013-02-13 19:42:47 +01:00
Oswald Buddenhagen
8e74d136fe purge vestiges of QMAKE_LFLAGS_QT_DLL
Change-Id: Ia86b9cee1044ab915854e0e231e1b3d5d66e1f7d
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-13 19:42:43 +01:00
Oswald Buddenhagen
172b381307 purge QMAKE_LIBS_OPENGL_QT
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>
2013-02-13 19:42:39 +01:00
Oswald Buddenhagen
2ed081a88b fix & simplify quoting
$$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>
2013-02-13 18:42:38 +01:00
Oswald Buddenhagen
566d28316d remove automatic splitting from $$() expansions
$$(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>
2013-02-13 18:42:38 +01:00
Fredrik Höglund
15177905ff Fix the GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT check
Change-Id: I83dc92085c81b8b0c71502ea71878b5e85cbbacc
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-02-13 18:42:38 +01:00
Fredrik Höglund
fa167d2afa Check for GLX_ARB_create_context_profile before specifying a profile
Change-Id: Idc4982c039f8a6a304d9ce5ce6736d518fb0ef00
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-02-13 18:42:38 +01:00
Friedemann Kleint
b5119f9d4e Move TR_EXCLUDE to qdoc.pro.
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>
2013-02-13 15:48:20 +01:00
Stephen Kelly
cc7239da8d Make it possible to use QPointer<const T>
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>
2013-02-13 15:15:56 +01:00
Jonas Gastal
60cde0bd14 Fix undefined reference to XSetTransientForHint.
Change-Id: If137fbfd566fdd2950f012013031d74e84b16d00
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-02-13 15:15:56 +01:00
Stephen Kelly
0fb979fe23 Remove QPointerBase bic check.
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>
2013-02-13 15:06:53 +01:00
Frederik Gladhorn
310235593f Fix build with old MinGW
Change-Id: I9d7c40c146bb3d14cd1dccab10a70b28722c7c27
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-13 13:05:23 +01:00
Samuel Rødal
d0da1f533c QMetaMethod is needed in qtreeview.cpp even without accessibility.
Change-Id: I195c4d591a1908e17ad45338d6b9a19b8948b804
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2013-02-13 12:55:56 +01:00
Christoph Schleifenbaum
44f6dcf054 Mac: Fix transient scroll bar appearance.
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>
2013-02-13 12:43:46 +01:00
Oswald Buddenhagen
d061cfde88 fix platform conditional for using our gnuwin tools
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>
2013-02-13 12:42:40 +01:00
Oswald Buddenhagen
8204e3f045 fix angle build under msys
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>
2013-02-13 12:42:40 +01:00
Oswald Buddenhagen
e3554d7274 remove useless unset()s
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>
2013-02-13 12:42:40 +01:00
Oswald Buddenhagen
707f0a20b4 remove abuse of eval()
Change-Id: I8fdba2998f9e4d03c37235c377b5db0aadc27608
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-13 12:42:40 +01:00
Oswald Buddenhagen
7f95a57844 produce shorter/nicer source paths
Change-Id: Ia71410fdc6ee30192239e9c9efa716cfa811c13e
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-13 12:42:40 +01:00
Joerg Bornemann
93b155a850 fix check for Windows CE platform
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>
2013-02-13 12:42:40 +01:00
Martin Smith
cd84491aad qdoc: inherited members do not show up for QML components
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>
2013-02-13 10:11:48 +01:00
J-P Nurmi
d1fe252d6a QSystemTrayIcon: fix the activation signal
QObject::connect: No such slot QSystemTrayIcon
    ::emitActivated(QPlatformSystemTrayIcon::ActivationReason)

Change-Id: I64dda8fb863de10d8b1d1cda1b8e6a513238b245
Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-13 10:10:16 +01:00
Bjoern Breitmeyer
ad05af534d Fixed QT_NO_ACCESSIBILITY build.
Change-Id: I14229753fc2e3b54da8a285ae9d27201b73e24be
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-13 09:50:28 +01:00
Tor Arne Vestbø
d1ee718955 Add support for color glyphs (Emoji) on Mac OS X and iOS
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>
2013-02-13 02:04:16 +01:00
Stephen Kelly
e95a758236 If the libdir is absolute, make the config file non-relocatable.
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>
2013-02-13 01:14:42 +01:00
Stephen Kelly
8943a5a28e Don't calculate the install prefix again in the extra cmake files.
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>
2013-02-13 01:14:42 +01:00
Jian Liang
a65157e5b7 replay mouse press event after a popup widget has been closed
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>
2013-02-12 23:52:56 +01:00
El Mehdi Fekari
640374d052 QLocale: add autotests for Japanese and Czech locales
Change-Id: Id4351ab49bfbdf91b65ccb5153c5d01f53acdf72
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-02-12 22:47:14 +01:00
Fredrik Höglund
82eaff97d1 Don't ignore QSurfaceFormat::Options in the XCB plugin
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>
2013-02-12 22:46:54 +01:00
Thiago Macieira
9253509f3e Mark public non-member non-static variables as Q_DECL_UNUSED
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>
2013-02-12 22:46:38 +01:00
Thiago Macieira
d52b5d37e2 Add Q_DECL_UNUSED to a function only used in Q_ASSERT
Change-Id: I18697037db742d38874c8a95df12c189ccc51068
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
2013-02-12 22:46:33 +01:00
Thiago Macieira
adb0cfc24c Add Q_DECL_UNUSED, marking functions or variables unused
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>
2013-02-12 22:46:21 +01:00
Giuseppe D'Angelo
ad0a4eaf8d Improve QRegularExpression captureCount / namedCaptureGroups docs
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>
2013-02-12 22:40:29 +01:00
Giuseppe D'Angelo
d57731b0d7 QRegularExpression: print a warning if (?J) is used in a pattern
(?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>
2013-02-12 22:40:21 +01:00
Giuseppe D'Angelo
bcd04af4e8 QRegularExpression: don't use study data when getting the pattern info
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>
2013-02-12 22:40:11 +01:00
Caroline Chao
a317ee0a6f Fix sizeHint for QAbstractSpinBox
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>
2013-02-12 20:20:03 +01:00
Thiago Macieira
8f00f2020b Leave some Qt 6 remarks for QStringRef
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>
2013-02-12 20:19:43 +01:00
Oleg Shparber
3a2276c6f3 QNX: Fix QInputMethod::keyboardRectangleChanged() signal
Change-Id: Iad3ee07ba85854d2eb0cf36710643b75993bf61c
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-02-12 17:56:10 +01:00
Sergio Martins
3fb356f531 QNX: Fix qFatal() statements.
"QQNXQBBWindow" doesn't make sense.
Change-Id: I0e56d5be4a9bb7a0336f71ea3348621be730dee1
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-02-12 17:56:10 +01:00
Friedemann Kleint
9a74bbf34f Fix developer-build of qsslsocket_onDemandCertificates_member.
Do not include qsslsocket_p.h unless SSL is present.

Change-Id: I7e56b7758729907892d85f97d5a9d3ccaf7a3314
Reviewed-by: Peter Hartmann <phartmann@rim.com>
2013-02-12 17:56:10 +01:00
Samuel Rødal
c76ec20e55 Fixed QSurfaceFormat documentation about DebugContext requiring GL3+.
GL_ARB_debug_output only requires OpenGL 1.1 and above.

Change-Id: Ib79d370fac36fa737817ea678f0dee25283dfa31
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-02-12 17:56:10 +01:00
Tor Arne Vestbø
74f9664f95 Use CTFontCopyDefaultCascadeListForLanguages for font fallback if available
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>
2013-02-12 17:43:24 +01:00
Tor Arne Vestbø
183e04a439 Don't use the fallback list to decide if the CoreText font db was populated
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>
2013-02-12 17:43:15 +01:00
Samuel Rødal
62d25e4d4f Fixed QPixmapCache associating path with wrong QPixmap.
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>
2013-02-12 15:21:57 +01:00
Samuel Rødal
23b11e792c Added QWindow::Visibility convenience API to QWindow.
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>
2013-02-12 15:02:53 +01:00
Morten Johan Sørvig
f5acd545a8 Mac: Remove broken platformPluginPath code.
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>
2013-02-12 14:58:59 +01:00
Mark Brand
60c1f9f274 QSqlQuery tests: fix create table failures
Change-Id: Id20517cc68d03ac008650374fadd96cd6626d3fe
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-02-12 12:42:54 +01:00
Eskil Abrahamsen Blomfeldt
fe6add818e Enablers in fbconvenience for Android port
Additions to make the convenience classes work for the
Qt for Android port.

Change-Id: I25ba0faf93c7e09ab04a3fa0784e04631e5ab036
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-02-12 12:25:22 +01:00
Thorbjørn Lund Martsum
686dcce5fb Make QGraphicsViewPrivate::updateRubberBand more readable
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>
2013-02-12 12:01:16 +01:00