Commit Graph

17375 Commits

Author SHA1 Message Date
Andy Shaw
93500422d1 Delete the children before updating the Cocoa menubar
When the Cocoa menubar is updated then it ensures that the merged native
menu items are visible if appropriate. However when the old menubar is
deleted then it causes the merged native items to be hidden. Therefore
we ensure the children are deleted first which causes the native items
to be hidden and then update the menubar so that they can be correctly
visible if they should be.

Change-Id: I426864a5d2ec1f34c03290ac66371b12bf77cc00
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-02-12 18:11:20 +01:00
Joerg Bornemann
9b59e51c50 fix warning when generating VS 2013 project
/FS forces the compiler to synchronize pdb file writes.
This option is not needed when building with Visual Studio itself.
Still, qmake needs to know it when parsing the compiler flags.

Task-number: QTBUG-36535
Change-Id: Id5b68c4028844e0b95904e08b5121310a4ff13d6
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2014-02-12 17:55:51 +01:00
Friedemann Kleint
5ae5bebb93 Added function returning build information to QLibraryInfo.
Useful for bug reports and test logs.

[ChangeLog][QtCore] QLibraryInfo provides information on how
Qt was built.

Change-Id: I867197fd7d2e10bcdf01a8eb47c9c1e03647e2c1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-02-12 17:24:33 +01:00
Friedemann Kleint
5adba7cba7 Check whether exposed widget is mapped in QWidgetBackingStore::sync(QWidget*).
Qt::WA_Mapped corresponds to 'exposed' in Qt 5, hence a parent window
fully obscured by its children may not have the attribute set.
In that case, go by the attribute of the child widget.

Task-number: QTBUG-33520

Change-Id: Ia08f283172daaa58f58e5636004461b2c48784f7
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-02-12 17:24:28 +01:00
Gabriel de Dietrich
4beafcd944 Cocoa: Bring back two-class native window system
While inheriting from NSPanel proved to be robust enough, it is
not really future proof as we're at the mercy of Apple changing
NSPanel's behavior. On the other hand, we can't inherit exclu-
sively from NSWindow as the tool window case, where the QWindow
should look like an NSPanel, can't be emulated perfectly without
using private APIs.

This reverts commits 79fb39a87c and df86721bb4.

Change-Id: I9021193e3614633a943578df9e2794b00094a1f7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-02-12 17:13:37 +01:00
Frederik Gladhorn
a9c88c1f39 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/gui/image/qimage.cpp
	src/gui/text/qtextengine.cpp
	src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp
	src/printsupport/kernel/qprintengine_win.cpp

Change-Id: I09ce991a57f39bc7b1ad6978d0e0d858df0cd444
2014-02-12 16:28:07 +01:00
Maurice Kalinowski
ff23fb6cf7 Implement native message box for WinRT
Added a basic theme class, which creates accessors for the
QPlatformMessageDialogHelper. This handles creation of the
native dialog, but also spawning an event loop around it.

There are some limitations shared with the Android implementation.
First you cannot create custom labelled buttons and also selecting
the default button is not possible. This will be added at a later
point.

Note that Windows Phone is not supported.

Change-Id: I2dec83dcded7919835a6dcdf8dc2a56282024a7e
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-02-12 09:13:28 +01:00
Thiago Macieira
8e22d71b22 Disable disabling exceptions with ICC
There's a bug found in ICC 14.0 that causes the compiler to assert when
compiling QtDeclarative. Let's leave this here until at least one year
after the fix is released.

Intel task: DPD200253124
Task-number: QTBUG-36577
Change-Id: I76d4b41da7e60397dac65862a3a6ec024b840744
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-02-12 01:41:39 +01:00
Richard J. Moore
fd00bfc788 Correct the documentation of the return types of subjectInfo and issuerInfo.
These functions now return a QStringList to reflect the possibility of
there being more than one entry of a given type, but the documentation
did not reflect this.

Task-Number: QTBUG-36304
Change-Id: Iba2eda5e2c3174c8dcea640b5aed9cdc9a432392
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2014-02-12 01:41:34 +01:00
Sérgio Martins
8f899cd198 Fix build with QT_NO_GRAPHICSEFFECT
Change-Id: Iadc78c270f541067dbbebcf77748077cc3a8be13
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-02-12 01:41:26 +01:00
J-P Nurmi
4d6cb199b8 Make QToolButtonPrivate::popupTimerDone() more robust
Avoid dereferencing the q-pointer if the button has been
destructed meanwhile popup was open.

Task-number: QTBUG-26956
Change-Id: I68190e9fe84c669229ae0ce4d573ee7a02a8a141
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2014-02-12 01:41:15 +01:00
Friedemann Kleint
db98d65415 Windows: Fix potential crash in font database when family name is empty.
Task-number: QTBUG-36651

Change-Id: Icd3edc7dbed3e692b32374b0ab6251e7f939589d
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-02-11 20:59:15 +01:00
Friedemann Kleint
ae4243df1e Windows: Restore maximized/full screen widgets to correct screen.
Partially revert 54865d47cfd859a0e84ba8e1bbff3b56c93d4e0d and
bring back parts from abba37cd0eff959edf2d011842cbf2b36cce8467 which
failed some tests on other platforms and never made it in.

Avoid setting a geometry on maximized windows since that leaves
them in a broken state. Instead, if there is a need to restore
maximized windows to a different screen, clear the maximized flag
before applying the geometry.

[ChangeLog][QWidget][Windows] QWidget::restoreGeometry() now restores
maximized/full screen widgets to the correct screen.

Task-number: QTBUG-21371
Task-number: QTBUG-4397

Change-Id: Ibd5b736e921f20d4b7365c06c6f9c5dd4469c781
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2014-02-11 20:59:15 +01:00
Kai Koehne
c1bea0b532 Configure: Disable widgets module too if gui module is disabled
Use the same logic as in the Unix configure script, and disable
"widgets" if "gui" is disabled.

Change-Id: Ica338ad10b965eea297dddaaedeea61a3ae3ebe9
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-02-11 20:59:15 +01:00
Kai Koehne
a2bfd11493 Allow configuration of logging rules from file system
Allow configuration of logging rules from outside of the application,
either through a configuration file (.config/QtProject/qtlogging.ini),
or through a file specified by a QT_LOGGING_CONF environment
variable.

The logging rules from the different sources are concatenated: First
the rules from QtProject/qtlogging.ini are applied, then
QLoggingCategory::setLoggingRules(), finally from the environment.
This allows an application to overwrite/augment the system wide rules,
and in turn that can be tailored for a specific run by setting a
configuration in the environment variable.

[ChangeLog][QtCore][Logging] The logging framework can now be configured
with an .ini file.

Change-Id: I442efde1b7e0a2ebe135c6f6e0a4b656483fe4b1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-02-11 20:59:15 +01:00
Sérgio Martins
dc09a02e3a Fix warning with QT_NO_GRAPHICSVIEW
Change-Id: I96064f0db359fbf5c615e48633398b79872e0bc5
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-02-11 20:59:15 +01:00
Sérgio Martins
63cf8ad33a Fix build with QT_NO_GRAPHICSVIEW
Change-Id: I81cfed124a2e9e1c46c966c4819e89df5abd4f74
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-02-11 20:59:15 +01:00
Richard Moe Gustavsen
34dba9261e Widgets: update widget transform upon receiving QEvent::FocusIn
QWidgetPrivate::updateWidgetTransform will only update the
transform if the widget is the current focus object.
But if someone calls QApplication::setActiveWindow, Qt will
call QWindow::requestActivate and then send focus
in/out events, all in the same event loop recursion.

The problem now is that requestActivate is not guaranteed to be
synchronous (it's not on iOS). So the window activation
(together with updating the focus object) will still be pending
when the widget receives the focus-in event. As such, the
transform update will also fail.

This patch will give the event as input to the function, so
that we don't depend on window activation being synchronous.

This will fix IM spell checking popups on iOS to show at the
correct place, also after closing font popups etc.

Change-Id: If0ee70f55692bbd613821b126923364e39ed1199
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-02-11 20:59:15 +01:00
Andrew Knight
2a9944e281 WinRT qmake vcproj: Fix icon locator
This was broken for shadow builds. Adding the output directory to the
manifest file name fixes the problem.

Change-Id: I9e5b47a08f80f7afcfd76e13784fbaec912e50ad
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-02-11 18:53:10 +01:00
J-P Nurmi
062d2a1f80 Promote the scrollbar style animation to qstyleanimation_p.h
Makes it possible for QFusionStyle to utilize the same animation.

Change-Id: Ifac9eaa3138cf1068439d5b0271a2acce54a3c16
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2014-02-11 18:36:05 +01:00
Samuel Gaist
be51772d02 Cleanup TSLib plugin
This patch cleans up the coding style and includes

Change-Id: I710d4a60795e9975d4f8ee79599018e05d85debe
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-02-11 16:03:02 +01:00
Frederik Gladhorn
2a68cffa84 Accessibility Linux: Report Active state
The fixme comment is invalid since QAccessibleWidget actually checks for
isWindow and sets the active state.
This is messed up because in Qt 4 there was a work-around to set active
for windows in a different code path.

[ChangeLog][QtGui] Accessibility on Linux now reports the active state
correctly.

Change-Id: I9e2cf436b3ffa7ef28286ee49d6e582f179930c6
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-02-11 16:03:02 +01:00
Peter Hartmann
c5042d68ea network tests: do not rely on external servers
They cause test failures from time to time.

Change-Id: I917bef340401d25bf54e133be9d9562b3b133c9f
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Niels Weber <niels.weber@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-02-11 16:03:02 +01:00
Kai Koehne
e14885a18a Enable categorized logging for bootstrapped tools
Change-Id: Ie908a175bda103fd8d73031024a823a4c4d3dbb7
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-02-11 15:53:10 +01:00
Peter Hartmann
42cfb5fe4d SSL: add support for the Next Protocol Negotiation extension
... which is needed to negotiate the SPDY protocol.

[ChangeLog][QtNetwork][QSslConfiguration] Added support for the Next
Protocol Negotiation (NPN) TLS extension.

Task-number: QTBUG-33208

Change-Id: I3c945f9b7e2d2ffb0814bfdd3e87de1dae6c20ef
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
2014-02-11 15:37:10 +01:00
Frederik Gladhorn
df62c31807 Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2014-02-11 15:12:00 +01:00
Laszlo Agocs
17de86f282 kms: Adapt to initialize() pattern
Right now socket notifiers are attempted to be created before having
the event dispatcher up. This is wrong.

Change-Id: Ica3034b9fa790c037f28982db23c71342f6597d7
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
2014-02-11 14:59:55 +01:00
Andrew Knight
b4fe9ce225 qmake: Provide feature for windeployqt
windeployqt is a tool that aids in the deployment of Qt libraries and
other files on Windows. This feature (CONFIG+=windeployqt) adds
automatic invocation of windeployqt for qmake projects as a post-link
action. For Visual Studio projects, windeployqt is added as a custom
target which runs after linking, automatically adding the output as
deployment items.

Task-number: QTBUG-35630

Change-Id: I4cdcb1a7f70cedccb4a4e17be5eb9f5de35a4d66
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-02-11 14:52:16 +01:00
Topi Reinio
12769d539c Doc: Fix issues with QOpenGLTexture enumerations
Use correct parameters for \enum commands, and add documentation
for QOpenGLTexture::Filter enumeration.

Task-number: QTBUG-35576
Change-Id: If7099da0b2b570c28e683126f0ba3a885d80f741
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2014-02-11 13:35:00 +01:00
Joerg Bornemann
cbc6387a28 support c'tor as second parameter in foreach macro
Passing a constructor as second argument to foreach didn't work when
building with gcc.
For MSVC this already worked as a different foreach implementation is
used.

Change-Id: Id98444c699b4cebc14ea62076c5f7cba33ffb824
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-02-11 13:28:35 +01:00
David Faure
5428db88de Document moc -f<...> behavior change in Qt-5.2.0
Better late than never :)
Task-number: QTBUG-33749

Change-Id: I5035255e66a56754b609441f5b81ab119565a7cb
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-02-11 12:59:08 +01:00
David Faure
1865104d9e Doc: Adjust QDir::tempPath docu as recommended by Ossi.
Change-Id: I709d8ce8151f2bb480865067a3e80ed838b26e4a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-02-11 12:59:05 +01:00
Kai Koehne
dc05fe7a5b Fix out-of-tree compilation of widget examples
'styles' are only defined in the qt build internals, when the
examples are compiled inside a configured Qt source. That's not
the case for the examples e.g. in the Qt SDK.

(windows is a default style on all platforms, anyway. So I
think the check is superfluous in the first place.)

Task-number: QTBUG-36655
Change-Id: I7114619efd479408dad99c8514f8e33ddcab7c7c
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-02-11 12:35:03 +01:00
Konstantin Ritt
bbdea065aa Minor optimization for QTextEngine::shapeText()
Remember the engine index for each sub-item and avoid moveGlyphData()
where possible (ie. when there are no glyph indexes to care about).
Also don't memmove data we didn't ever initialize.

Change-Id: Ib8e5fd937a10e4e3c8c0e18961a2e2c1a4167924
Reviewed-by: Ahmed Saidi <justroftest@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-02-11 05:01:05 +01:00
Konstantin Ritt
c77222c0e7 Fix log_clusters calculation in HarfBuzz-NG code path
The old code wasn't good enough to catch all the glyph (de)composition cases,
thus leading to an assertion in QTextLayout's addNextCluster() helper.

The new code catches all the corner cases and introduces somewhat
better performance to the HB-NG shaper backend.

Change-Id: I5b6c673395a4a039dc55b200abbf74b0ba5d0829
Reviewed-by: Ahmed Saidi <justroftest@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-02-11 05:01:01 +01:00
Allan Sandfeld Jensen
15f3191981 Fix drawing vertical gradients in RGBA8888 formats
The RGBA8888 formats was incorrectly using the qt_gradient_quint32
which is argb specific. This caused vertical gradients but only
vertical gradients to be drawn incorrectly.

This changes the RGBA8888 formats formats to use the generic gradient
method and renames qt_gradient_quint32 to qt_gradient_argb32 to
indicate its limitation.

Change-Id: Ia1cd48ca7f4f78b64f31d6263e81cd8ac3b0954e
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-02-10 23:02:47 +01:00
Thiago Macieira
49df5fc3d2 Fix compilation when including files created in shadow dirs
For normal #includes, moc simply ignores the missing file, but it could
generate problems later. It's a problem when the file being sought is
the FILE from plugin metadata. A very good example of this is Qt
Creator:

coreplugin.h:49: Error: Plugin Metadata file "Core.json" does not exist.

Change-Id: I16af04b477f52c6bd53c14147ec777b358dfdf50
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-02-10 20:41:22 +01:00
Friedemann Kleint
97d8e3b200 Windows: Fix return value of WM_QUERYENDSESSION.
LRESULT should be non-zero if the application can quit,
and it is always handled.

Task-number: QTBUG-35986

Change-Id: Ic8b0ecc731d3efaf94e2a62491918d379fe59f5c
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-02-10 20:30:26 +01:00
Giorgos Tsiapaliokas
d61e774307 Print qCDebugs in arbitrary categories by default
The debug output of all categories will be visible by default,
except from the "qt.*" categories. "qt.*" categories are private
and their default debug output will be hidden.

[ChangeLog][QtCore][Logging] Enable qCDebug's for all categories except qt one's

Change-Id: Ibe147c8bbe0835a63b3de782288b9c3251321d8f
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-02-10 16:28:30 +01:00
Allan Sandfeld Jensen
2a3f635953 Fix assert when converting RGBx8888 to ARGB32_PM
RGBx8888 to ARGB32_PM is incorrectly using the RGBA8888 to ARGB32_PM
which asserts the input format is RGBA8888. Since the routine also
performs an unnecessy premul, we should be using a the generic rgba2argb
routine.

Change-Id: I7b67328f804f5f2a9664a35c04836679e8c8b8e5
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-02-10 16:22:52 +01:00
Thiago Macieira
fbc554b42c Make QUrl::isLocalFile fast by storing a flag
The XDG specification for file URIs requires us to use triple slashes in
file:/// for URLs with absolute paths. I don't like special-casing any
particular scheme, but we've done it for file for many years now.

Since we need to test this situation in a couple of places, it's easier
to just cache the result once, in setScheme (both functions).

Change-Id: I078b45b5b6c861f4caee082b4730fd6f67684ae4
Reviewed-by: David Faure <david.faure@kdab.com>
2014-02-10 16:20:49 +01:00
Morten Johan Sørvig
3d08681169 Cocoa: Add setNSToolbar(QWindow *, NSToolBar *)
Calling this function associates the given native
toolbar with the QWindow. QWindow will then set
it on the native NSWindow at the appropriate time
during window creation.

Change-Id: I2a50f79b2a0453cc739f8d68e965e37b95998083
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-02-10 12:49:06 +01:00
Gabriel de Dietrich
df86721bb4 Cocoa: Neuter -[QNSView cancelOperation:] for normal windows
QNSWindow inherits QNSPanel regardless of the kind of QWindow. With
NSPanels, pressing escape is equivalent to dismissing the panel.
That is not the behavior we aim at for normal toplevel QWindows.

Task-number: QTBUG-36694
Change-Id: I1a1c138183cc43c968249442021f334cd37f7ce0
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-02-10 12:49:06 +01:00
Allan Sandfeld Jensen
a7b8ef0841 Export optimized premultiply and unpremultiply methods
This patch optimizes the unpremultiply method further by using a
lookup table to avoid any divisions at all.

The opportunity is taken to export both premultiply and unpremultiply
since they are commonly used methods relevant to the exported QRgb type
that can be both premultiplied and unpremultipled ARGB.

[ChangeLog][QtGui][QColor] Exported highly optimized methods for
premultiply and unpremultiply of QRgb values.

Change-Id: I658bcf57b0bc73c34c1765b64617d43b63ae820b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-02-10 12:49:06 +01:00
Andrew Knight
143d591aab WinRT: Fix use of std::thread in QThread
Don't delete the thread object without detaching it, use detach()
instead of CloseHandle(), and avoid a double-delete.

Change-Id: Ia169a96fb32805e06abe099c3c35e97ce485f088
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-02-10 12:49:06 +01:00
Jorgen Lind
a80253ae4c QOpenGLTextureBlitter
private api, but useful for 2d gui code that suddenly finds itself
needing to get a set of textures onto some fbo

I didn't want to include ARB_copy_image since it looks like its from
texture/renderbuffer -> texture/renderbuffer while this class implies
texture -> write fbo. We could wrap ARB_copy_image in QOpenGLTexture or
some other class or we can add it later.

I have not added any QOpenGLTexture functions since this class opperates
on the GLuint identifier. We can add overloads later.

Change-Id: I3e565b33466c1c183a249a33c3e82c6786debd55
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-02-10 12:49:06 +01:00
Frederik Gladhorn
7f0d6c4529 Remove useless if
Change-Id: Ide9f06b71159e86fdd2aa178cd3aa0ab2faf5d2c
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-02-10 11:19:21 +01:00
Frederik Gladhorn
b96c075d22 Accessibility: Fix reporting the same name/value twice
NVDA for example reads name and value, so that most of our
accessibles would lead to the same text being read twice in a row.
Instead use Name as that's best supported on all platforms.

[ChangedLog][QtWidgets] Fixed accessibility issues that would lead to
screen readers reading the same text twice.

Task-number: QTBUG-36678

Change-Id: I6c5c9cdcf5392c7135a65bd30f87a590c3c07fb4
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-02-10 11:01:15 +01:00
David Faure
c8eb6d99d4 Doc: fix typo in QDebugStateSaver docu
Change-Id: I12e0a725141a570903004c63369c991d383ac82c
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-02-10 11:00:41 +01:00
David Faure
9ce3b0d953 qdoc: fix memory leaks, unchecked open(), hardcoded path - in debugging code
Change-Id: I3b065dd18f60214a858543d062dfb2f0f1dc1b36
Reviewed-by: Laurent Montel <laurent.montel@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-02-10 11:00:41 +01:00