We also remove overriding the background when polishing the palette
in QMacStyle. This is a leftover from pre-10.5 styling.
Change-Id: Icaa6d9c864ab01783d83cc02192981136c417d24
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Refactors the logic to parse the font configuration from fontconfig, so
that it maybe reused for custom fonts in a later patch.
Also fixes a minor mistake that meant we defaulted to medium hinting,
where we tried to default full hinting.
Change-Id: I1e135b8b1e3faeb213aa370ea59ebde3a671273d
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
Removing symbols when defining QT_NO_DEBUG is a bad idea.
In this case it means that you can't compile corelib as a
release build and widgets as debug without getting an
undefined symbol.
Instead leave the method in the release build, but simply don't
call it.
Change-Id: I50426aefd62e82bccd933323aa0f67c6e5294961
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We need to send key events when the user hits enter, otherwise
there is no way to know when the user has 'confirmed' the
text he wrote. This is on par with how it's done for the
Android port.
Change-Id: I585d4198de24b0d251e5e0dd2956ce81b6483f82
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Before this patch there were no way for the user to hide
the keyboard on iPhone for multi-line edit fields unless
the app had a separate button added for it. And even that
would be problematic since we scroll the screen (and
perhaps the button) to track the cursor.
This patch implements a gesture that resembles the 'hide
keyboard' gesture that UIScrollView implements on iOS 7.
Note that if you start the gesture inside the edit field,
you will start selecting text as well. This will also cause
the cursor to move and the screen to scroll. After some
testing and failing, it seems like we need to live with such
artifacts until we do get around to do the only sensible thing;
fix up how we do text selection on touch platforms. Working
around it becomes just to messy.
Change-Id: I1c0d9c88ff1f5430587a49591f165b9708e5dc60
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Change 287fa94fe2 created a freeze
in the assets file engine because it will try locking the mutex
twice. Since prepopulateCache() is only called from create(),
we don't need to lock it recursively.
Task-number: QTBUG-37661
Change-Id: I00d0fed132a86c1be5603484eb6ee05454da9ef0
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Report for correct geometry for QMacNativeWidget
and other QWindows that are embedded in a NSView
hierarchy. This also makes mapFrom/ToGlobal work.
The implementation is different than for the other
cases: Add a QCoocaWindow::geometry() overload and
query the geometry there, instead of using a geometry
change notification which sets the geometry on the
QWindow.
Task-number: QTBUG-36322
Change-Id: Iab5f0c96b89610c8a4b4a7de49887b0683d551dd
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Add registerContentBorderArea() to the Cocoa native
interface which allows registering multiple "unified
toolbar" areas for each window.
Use this function in QToolBarLayout::setGeometry()
to register the area for each TopToolBarArea toolbar.
Task-number: QTBUG-36700
Change-Id: I52efcc5662556bb94f25f504be3710d0491f79b9
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Denis Dzyubenko <denis@ddenis.info>
Instead of requiring that QPlatformFontDatabase::populateFontDatabase()
populates every single font in the system by calling registerFont(), we
now allow the platform database to call registerFontFamily() instead, and
then keep track of which families we've yet to fully populate in the font
database.
Once a property of a family is requested (such as its writing system,
style, etc), the family is lazily populated by calling back to the
platform database through QPlatformFontDatabase::populateFamily(),
which in turn does the final call to registerFont() as before.
This cuts application startup on OS X and iOS (of which the font population
used to be a major limiting factor) from roughly one second to about 350ms.
Task-number: QTBUG-37165
Change-Id: Ic2fc3447beb818ffe23635a5b7816ed7e70c93a7
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
This was a regression from Qt 4.7.
[ChangeLog][Widgets][QScrollArea] Respect scrollbar setting for
click-position on Mac.
Task-number: QTBUG-36314
Change-Id: I8bdb1aec9b308b0907f5db29d3519998bc843c18
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
finishComposingText is called when the composing text is finished also
when the sw keyboard is hidden.
Task-number: QTBUG-37631
Change-Id: I4f4e90e60ac3f89784755b591f578e07fdbfdd2a
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
tested manually with internal proxy.
Patch-by: Jonathan Lauvernier <Jonathan.Lauvernier@gmail.com>
Change-Id: Ief5b4579b3444ce70eb99637edf771d37d3971fb
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
... so that the socket notifiers are enabled after selecting and thus
emit signals even after selecting (select() is called e.g. by the
waitFor* methods).
Task-number: QTBUG-36144
Change-Id: I385f288e8c42f92a9c84e53bce843e52f8094ada
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Fanda Vacek <fvacek@blackberry.com>
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
The flag is not orthogonal to the rest, and e.g. checking with
flags & Invalid
will fail. Rather make it explicit by comparing with 0.
Change-Id: I428d5e71f5ecd05f61d543aaa78532548ef93d5a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
The RenderRule for the stylesheet has the correct font information, it
just wasn't being set on the painter that draws the label.
Task-number: QTBUG-8990
Change-Id: I7cbaffc570421db04ebf3254cb6a21a68f7b868b
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
The following omitted enum description can be seen at [1]:
"Ensures that the longest variant is always used when computing the
size of a multi-variant string. (Internal)"
This is because \omitvalue does not allow a description (whereas
\value does).
The description was moved to the qnamespace.h as a code comment.
[1] http://qt-project.org/doc/qt-5/qt.html#TextFlag-enum
Change-Id: I7983613bffa90f3071a4e2d678696391048c8757
Reviewed-by: Martin Smith <martin.smith@digia.com>
Set scroll phase correctly for propagated wheel events, and do not
let Qt::ScrollBegin/End steal focus when using Qt::WheelFocus policy.
Change-Id: Ia38b64059d96a228c3b83c9b455db6e30dfb9a46
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Not sure where "OpenGL/ES" is coming from but there is no such thing.
The correct name is OpenGL ES.
Change-Id: If071ee5bd928fea1a2f1aebc11155344df1efe2d
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
During the Qt 4 -> 5 migration the setting of the extension flags
in QOpenGLFunctions/Extensions suffered a regression: flags like
GenerateMipmap were never set. This led to the unfortunate sitation
that features that were tied to these flags, like compressed texture
support or mipmap generation, got disabled.
This is now corrected by checking for the extensions like Qt 4 did.
Task-number: QTBUG-37588
Change-Id: I4a7beb1b435af11e05f5304aa04df2ec63b34c18
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Some level 9 hardware does not support 32-bit indices, and in most
places this is already checked. It would appear that most phone
hardware actually does support 32-bit indices, and so this bug wasn't
caught until testing on the Surface RT. This is not surprising, as some
level 9 resources are only a minimum for the hardware spec, not the
true limit of the device/driver.
This patch provides the general fix to use 16-bit indices on such
hardware, but a whitelist of known good GPUs should be added to enable
32-bit indices where available.
Change-Id: I282ede5dd4a323037ade6c44b7cfac2c6445b491
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Print a warning when an invalid logging rule is parsed.
Change-Id: I3bf9a6df4053d36b3803652b2faa86168d5222bc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Crash occurs after warnings like:
QSslSocket: cannot call unresolved function SSL_get0_next_proto_negotiated
Task-number: QTBUG-37515
Task-number: QTBUG-33208
Change-Id: I18b803e4709b9d5f6b33717c2ac43179676351a4
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
mkpath was not working consistently on WinRT. The reason is that
createDirectory() starts from C:/ which is outside the sandbox and an
illegal access error has been returned.
In case the chunk is still inside the "known" writable area, we continue
to the next chunk. Known writable is derived from QStandardPaths. All
but Temp are children of the DataLocation on WinRT.
Task-number: QTBUG-35472
Change-Id: I3b4ab390bd321285da51d02f5eeaf06da4d56298
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Change-Id: Icd150787f9ff0878fafd459b3741d1b1e008f8bc
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Clear and test for the correct button according to
the m_sendUpAsRightButton flag.
(Fixes the warning mentioned QTBUG-35804)
Task-number: QTBUG-35804
Change-Id: I5d724d1cfa66b88b8f54e228bd7fb73a04a9f4c9
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
The NSWindow releasing code in recreateWindow() has
regressed to not handle the m_contentViewIsToBeEmbedded
case.
Release the NSWindow directly instead of calling
recreateWindow()
Change-Id: Ibc6d10faf4c6dae42e02c400b16f28a1d28eb192
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
This will raise the window in front of windows from
other processes as well. Following Qt 4, only do this
for top-level windows.
Task-number: QTBUG-29087
Change-Id: Iae1b9c2928a627501112f97728198ed6dd614b2d
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
With this patch reading QTextEdit line by line works with VoiceOver.
Task-number: QTBUG-37204
Change-Id: Id9d7c4294254aaa8fe51ee8b612bfbb43348b777
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
[ChangeLog][QtGui][Accessibility] Allow assistive apps such as VoiceOver
to set the focus on widgets and controls.
Change-Id: I657bf7d827c5e5293cfd628dbb6b8f0592a84f24
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
EditableTextInterface was implemented but not reported to the
accessibility bridges.
Newlines in QTextEdit when using QCursor::selectedText are returned as
unicode paragraphs, replace them by newlines.
[ChangeLog][QtWidgets][Accessibility] Fixed QTextEdit not reporting
newlines to accessibility frameworks and add editable text interface.
Change-Id: Iac21e70f5468a16f8abf242ae148290dbab3f8e4
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
[ChangeLog][QtGui][Accessibility] Implemented text attributes to
enable VoiceOver to read QTextEdit and QPlainTextEdit.
Task-number: QTBUG-37204
Change-Id: Ie2fa8086a1bcf4907ac59850dc5c6c08b5f0b7f2
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
The cmd shell on Windows sets special environment variables starting
with a '='.
Task-number: QTCREATORBUG-8716
Change-Id: Id2852188897522558907d9846fb2af069600235f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Desktop OpenGL has GL_UNPACK_ROW_LENGTH which we
can use use to specify the image row stride.
This removes the need to call QImage::copy(). On
a retina MacbBok pro this reduces toTexture's share
of the total run time by 1-4%. (on tests/manual/
qopenglwidget/openglwidget)
Change-Id: Ia7f49d5c4ffcc347a495701bbaca6aecc2dc3433
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Make QOpenGLContext::create() return false when the native context
could not be initialized. This way the return value and isValid()
become equivalent.
Relying on on having a non-NULL platform context is not enough, many
platforms will return a new instance even if the underlying platform
code failed to create a native context. To ensure that a platform
context is really usable, isValid() has to be checked too.
Change-Id: I6b4e9fdb24347ad52fbd6edbb8d144d51e16c301
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
The default pen width is 1 as of Qt 5.
Task-number: QTBUG-37277
Change-Id: I5b7b9c2019bd0e812384e67812b7bcfde37d0b53
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Adapt the stringification code, that is used to produce the
keys for QSqlQuery::boundValues() return value, to keep the
right order of the binding values.
Task-number: QTBUG-12186
Change-Id: Ic11a455bfd9ffd1418b1b021ce5cf78cae9b4504
[ChangeLog][QtSql] Fixed the order of values with positional binding in a QSqlQuery
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
This will enable qmake and its users to make decisions based
on the Visual Studio version without guessing it from the
mkspec's name.
Change-Id: I1bb46161111b109c2b4302bfc8c428b5f63c32d9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
don't make it add -g flags all of its own, but instead rely on debug
info being already present.
Change-Id: Ifb6b33709689e979768963ae0b9f3dca4fc77eef
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
clearly, this was a poor man's implementation of -force-debug-info.
Change-Id: Ib5c7e390bd0e3a6912af8c4027074a114ed33f8a
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
as the option needs to be explicitly requested, just error out when
objcopy is bad.
also, disabling it after performing the test successfully isn't a very
clever thing to do. hpux is dead anyway, so just remove that logic.
Change-Id: I923a3912fc29da646c492c27aa29091ffeb2e42d
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Calling NewGlobalRef() throws an exception if it gets an invalid ref.
If one of the jni object-calls throws an exception and the returned
reference is invalid, the subsequent call to NewGlobalRef() will trigger
the second exception and the process will be terminated.
Change-Id: I50c622e695542373d5b2eebd911c882e8e0f6bf7
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
In Qt 5.2.x, the platform plugin inherited from the EGLFS platform
plugin, so calling the super class implementation of hasCapability()
would return true for ThreadedOpenGL. Since this link was removed
in Qt 5.3, we would return false for all devices, giving us a large
performance regression.
Task-number: QTBUG-37586
Change-Id: I27758649ee9c0921902787b93be943751c839eb8
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Do not query scrollarea's own style whether the scrollarea itself is
a transient scrollbar, but query both scrollbar's style individually.
Change-Id: I6397a29bc7b276a92c538cbb7fc0dd921595d093
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>