Commit Graph

18560 Commits

Author SHA1 Message Date
Jake Petroules
5953109a04 Fix QSysInfo::windowsVersion() for good.
Task-number: QTBUG-38439
Task-number: QTBUG-43444
Change-Id: I9870200806f2ca378b0977dee0674d89e2c6836c
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-09-06 02:23:14 +00:00
Thiago Macieira
041fae0035 Fix crash on exit caused by QStringLiterals
These QStringLiterals are passed to QtDBus, which records them. They
will be used even after the libQt5XcbQpa.so library is unloaded, which
causes a crash on exit, one that even valgrind gets lost on.

Change-Id: I7de033f80b0e4431b7f1ffff13fc4888e45a346a
Reviewed-by: Albert Astals Cid <aacid@kde.org>
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-09-05 07:42:01 +00:00
Andy Shaw
c5068866cf Add a window title for the QPrintDialog Properties dialog
Change-Id: Ia74edf45e78fb81256da86d572459b3ed38663d4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-09-03 22:06:17 +00:00
Friedemann Kleint
c486cacba8 Testlib/Windows: Output crash information on stdout instead of stderr.
Make it easier to capture information about crashing tests in log files,
since it is not possible to do something like
foo > log.txt 2> errlog.txt
on Windows.
Adapt selftest.

[ChangeLog][QtTest][Important Behavior Changes] Crash/exception
information is now logged to standard output on Windows.

Task-number: QTBUG-47370
Change-Id: I3e6a2d25855ed0f20516418a031990b562f5f757
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-09-03 14:16:30 +00:00
Oliver Wolff
4b340402b9 WinRT: Fixed possible integer overflow in timer registration code
Task-number: QTBUG-48012
Change-Id: If1b80e59c13230bc0a62c6fa3d45b6e2272b9e28
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-09-02 10:21:37 +00:00
Oliver Wolff
8981703817 QUuid: Also use CoCreateGuid on WinRt/Winphone and WinCE
Change-Id: Ie44bd50fa1f2d4224f65d08fb4d721c3651b49ac
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-09-02 10:21:33 +00:00
Tor Arne Vestbø
54dbdc26ba Move min left/right bearing calculations to QFontEngine baseclass
The logic used in the FreeType font engine can be generalized
and move to the QFontEngine baseclass. This allows the CoreText
font engine to correctly report the minimum left/right bearings,
which decreases the chance that an optimization in QTextLayout's
line breaking algorithm will produce wrong results.

The calculation of left and right bearing has been moved to the
glyph_metrics_t type to reduce code duplication. This allows us
to use the with and height of the bounding box to determine if
the glyph has any contours.

Change-Id: I864697d3f31ed56f22f04666199b6c5023c5e585
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-09-02 09:11:31 +00:00
Morten Johan Sørvig
ba94e26b8b Cocoa: Clean up context creation.
Make the fallback to creating an unshared context
actually work by using correct [initWithFormat: ]
code.

Warn and return early on context creation failure
instead of continuing and crashing.

Change-Id: Ic88f419eaa717436aefc9c1da36c47e0ccb3e956
Task-number: QTBUG-47825
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-09-02 07:20:04 +00:00
Kai Koehne
1b459a8124 QAbstractSocket: Always set errorString right after socketError
Otherwise errorString() might not match error() in a
statusChanged handler.

Change-Id: If1250b4552412eabe88457dee031e4ef3f533838
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-09-02 07:05:55 +00:00
Friedemann Kleint
29af8741b6 Windows: Improve debug output of mime conversion handling.
Introduce convenience function for obtaining the format
name and use that.
Add debug operator for struct FORMATETC including format name.
Replace all code enclosed in #ifdef QMIME_DEBUG by qCDebug().

Task-number: QTBUG-47656
Change-Id: Ibb3c860c57edee4a31e8f5f37e3245feebed52a1
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-09-01 12:06:52 +00:00
Samuel Nevala
fb60f225e6 winrt: Enable window visibility for the root window.
- Minimized and Hidden: hide the status bar and collapse winrt native ui element.
- Windowed and Maximized: show the status bar and re-size the window.
- FullScreen and AutomaticVisibility: hide the status bar and re-size the window.

Showing & hiding the status bar and re-sizing the window affect only the
windows phone build.

Change-Id: Iaa412382bffc14e470720f2213bb3f6851f57a6b
Task-Id: QTBUG-47811
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-08-31 11:57:56 +00:00
Samuel Nevala
8c1fcbcd83 Declare StandardButton & ButtonRole types for cross-thread use.
On windows phone native dialog interaction is handled from
XMAL thread. Declare and register dialog helpers StandardButton
and ButtonRole for cross-thread usage.

Change-Id: Ic1842a5af8a1122fdffb766b4f723d272bdbcac2
Task-Id: QTBUG-47941
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-08-31 11:57:48 +00:00
Samuel Nevala
9ff74f1487 winrt: Work around broken screen rotation on Windows Phone 8.1.
Expose on orientation change clears bad frames caused by race between
Qt and ANGLE.

Change-Id: I8970c6be36133d861c718a946d9e9b7a5e88cc2c
Task-Id: QTBUG-44333
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-08-31 11:56:58 +00:00
Morten Johan Sørvig
c4015f13f3 Document handleWindowSystemEvent()
Document asynchronous and synchronous mode behavior.

Change-Id: I2dc1256af5b3a8014025c89c65d41480f18f0701
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-08-27 21:58:49 +00:00
Morten Johan Sørvig
ee767c838a Implement threaded synchronous WS events
Make handleWindowSystemEvent() support being called
from secondary threads in synchronousWindowSystemEvent
mode.

This is implemented by posting the event to the Gui
event queue (which will wake the Qt Gui thread), and
then calling flushWindowSystemEvents which will block
the calling thread until the event has been processed.

Change-Id: I7e8e68c1e0290c17105563268e316b0f8205b3ce
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-08-27 21:58:39 +00:00
Morten Johan Sørvig
ac9643c85f Make flushWindowSystemEvents return ev. accepted
flushWindowSystemEvents() now returns whether the
most recent event added to the queue was accepted
by Qt or not.

Use QAtomicInt to store the accepted state in order
to avoid a data race on it between the Gui thread
and the event poster thread.

Change-Id: I6c111fdaecda5c514307ca0749a54075fe8e872f
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-08-27 21:58:24 +00:00
Simon Hausmann
6d51697f1d Merge "Merge remote-tracking branch 'origin/5.5' into 5.6" into refs/staging/5.6 2015-08-27 22:29:28 +00:00
Allan Sandfeld Jensen
3fe645ecc9 Optimize set color component in RGBA64
After the removal of direct access through type punning,
the direct color setters can be better optimized.

Change-Id: Icaa5b1f8c8fe90863dd42fa4dfb5a2998c273465
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-08-27 20:02:34 +00:00
Friedemann Kleint
79a4cb1e4f Fix some qdoc-warnings.
qtbase/src/widgets/kernel/qaction.cpp:1257: warning: Can't link to 'QApplication::setAttribute()'
qtbase/src/widgets/kernel/qapplication.cpp:519: warning: Can't link to 'arguments()'
qtbase/src/widgets/kernel/qapplication.cpp:1939: warning: Can't link to 'quit()'
qtbase/src/widgets/kernel/qapplication.cpp:2946: warning: Can't link to 'quit()'
qtbase/src/widgets/kernel/qapplication.cpp:2946: warning: Can't link to 'exit()'
qtbase/src/widgets/kernel/qapplication.cpp:2946: warning: Can't link to 'processEvents()'
qtbase/src/widgets/widgets/qmenu.cpp:1354: warning: Can't link to 'Recent Files Example'
qtbase/examples/widgets/doc/src/tetrix.qdoc:28: warning: Can't link to 'QApplication::quit()'
qtbase/src/testlib/qtestcase.cpp:268: warning: Undocumented parameter 'timeout' in QTRY_VERIFY2_WITH_TIMEOUT()
qtbase/src/corelib/global/qnamespace.qdoc:2427: warning: Can't link to 'QApplication::setLayoutDirection()'
qtbase/src/corelib/global/qnamespace.qdoc:751: warning: Can't link to 'QApplication::setDesktopSettingsAware()'

Change-Id: Ic8170a40fb1cd84e3fb4dd75d9429f4b485f8bd9
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-08-27 19:27:38 +00:00
Friedemann Kleint
2117a76136 QPlatformFileDialogHelper::cleanFilterList(): Allow for ',' in glob.
RCS files (text/plain) have the glob pattern "*,v", which caused
the regular expression match to fail.

Task-number: QTBUG-47923
Change-Id: I7d8682ef51306cb4da58a2b3880842bd99892ea3
Reviewed-by: David Faure <david.faure@kdab.com>
2015-08-27 19:27:26 +00:00
Samuel Nevala
9cdbf48c33 winrt: Fix MessageDialog show on windows phone.
Run native dialog show on XAML thread.

Change-Id: I6273340e87d70aae21c838d9d7646a233c1f48be
Task-Id: QTBUG-47938
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-08-27 09:47:38 +00:00
Samuel Nevala
df49755d74 winrt: Add missing Q_DECL_OVERRIDE and fix white space.
Change-Id: Ibbcb637dac4d531934786fff25f7b8c36ef5ebed
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-08-27 09:47:23 +00:00
Liang Qi
afab1546a7 Merge remote-tracking branch 'origin/5.5' into 5.6
Conflicts:
	qmake/doc/snippets/code/doc_src_qmake-manual.pro
	qmake/doc/src/qmake-manual.qdoc
	src/corelib/io/qstorageinfo_unix.cpp
	src/corelib/tools/qbytearray.cpp
	src/widgets/kernel/qwidgetwindow.cpp
	tests/auto/corelib/io/qprocess/tst_qprocess.cpp
	tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp
	tests/auto/network/access/qnetworkreply/BLACKLIST

Change-Id: I9efcd7e1cce1c394eed425c43aa6fce7d2edf31c
2015-08-26 20:06:57 +02:00
Stanislav Baiduzhyi
06b457c693 Adding plasma5 support for QKdeTheme
Plasma 5 uses the same config files structure, but follows XDG spec
instead of storing them in custom locations.
Added '5' to supported KDE session version, and passing it to other
methods because 'kdeglobals' is located directly under XDG config
dirs and not deeper inside.

[ChangeLog][QtPlatformSupport][QKdeTheme] adding plasma5 support

Change-Id: I5f1d8d8f8d02449328db3ffc391ad23506cd67c7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2015-08-26 10:19:01 +00:00
Topi Reinio
c3a0f22b60 qdoc: allow 'void' function parameter without a parameter name
There are a few functions using a C-style function declaration:

    void foo(void);

meaning that foo() takes no parameters. This change allows this
for QDoc, making it successfully match documented \fn blocks
with the correct declaration, and not print out warnings.

Change-Id: I8191c55094371431b0e9c2ad22d19cadcb7facfb
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-08-26 09:46:19 +00:00
Topi Reinio
191b7237bf qdoc: Use lowercase names for modules read from index files
The module names are used as keys in the map that defines the
forest of module trees. A physical module name (lowercase) is
used as the primary tree name, but modules read from index
were using a name written to the index file (project name,
typically CamelCase) as-is.

This caused issues for resolving link commands that have a
module name in the square bracket parameters. To ensure that
such links work, convert module names read from index to
lowercase, too.

Change-Id: I698e01fd1df888e4a78c06a76ad72b5eb1a70892
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-08-26 09:46:08 +00:00
Topi Reinio
a5f46bc647 Doc: Fix QDoc warnings for QOpenGLFunctions and QOpenGLExtraFunctions
- Use \a commands when listing the arguments for OpenGL methods
    - Document functions taking a single argument of type 'void'
      verbatim. Otherwise, QDoc refuses to generate their docs
    - Add constructor docs for QOpenGLExtraFunctions (copied from
      QOpenGLFunctions).

Change-Id: I64a436365572a80319ba0a8eaba2f5d9b751e84d
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-08-26 09:46:01 +00:00
Olivier Goffart
5a50010058 Be more tolerant with multiple differerent metatype registrations
There is a qFatal in qmetatype.cpp that checks that the flags are the same.

There is a binary compatibility break because if any cause build with Qt 5.5
is loaded, this qFatal will quit the application, due to the change in
commit 54a09a4188:

  Type flags for type 'QtMetaTypePrivate::QPairVariantInterfaceImpl' [1034]
  don't match. Previously registered TypeFlags(0x103), now registering
  TypeFlags(0x107). This is an ODR break, which means that your application
  depends on a C++ undefined behavior.

This is a false positive since it is an internal type, the MovableType in
QMetaType is only being used for performance reason, it is perfectly fine
to change it.

This commit changes the qFatal to complain only about flags that could
only be caused by a binary incompatible change.

Change-Id: I87b9bf8cf54b6c7f4b1277d411ce5107642435ab
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-08-26 06:46:05 +00:00
Takao Fujiwara
418824dc69 ibus: Return correct scan code to windows
ibus keycode is qt scancode - 8 and needs to be returned to app windows
as the right value.
Use QWindowSystemInterface::handleExtendedKeyEvent() instead of
QCoreApplication::sendEvent() in qtbase 5.6 to follow
QXcbKeyboard::handleKeyEvent().
Also qApp->focusObject() returns QMdiChild which is a QWidget and 
that is not a QWindow.

Task-number: QTBUG-47833
Change-Id: Ie634a86d7790d8093cfca2dc8666f726844ae654
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-08-25 19:41:46 +00:00
Morten Johan Sørvig
53ecaade10 Cocoa: Fix backing store performance regression.
Commit 916dfcb8 introduced a regression where QNSView
would hold a copy if the backing store QImage, which
would cause a detach and deep copy if/when the image
was painted on while the copy was held.

Revert back to the previous share-by-pointer scheme.
Make sure the following bugs stays fixed:
    QTBUG-38377
    QTBUG-42206
    QTBUG-44313

Change-Id: Ib8049051d51947113f23b66ee61dc34c22388914
Task-number: QTBUG-46959
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2015-08-25 13:51:00 +00:00
Giuseppe D'Angelo
dbb1e1936c Bump PCRE to r1594
Get a couple of fixes for important bugs (1667, 1672).

The WinCE build patch has also been merged upstream,
so remove it from our tree.

Change-Id: I933c2d824612a70d7bc52648df5f5c481ae066d7
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-25 12:07:46 +00:00
Friedemann Kleint
4c3fa449ac Fix potential crash in QWindowsWindow::setDropSiteEnabled().
Release drop target after CoLockObjectExternal() to prevent
a potential access violation.

Change-Id: I2c3bde9f8008b1d567544596f56ebfd61fe6ad86
Task-number: QTBUG-47737
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-08-25 11:41:13 +00:00
Friedemann Kleint
b14550fa45 Windows/Input context: Update enabling of IME in in update(), too.
Amend change b55f88caba by splitting
out the enabling into a separate function and call that when
QWindowsInputContext::update() is triggered to reflect updates
of the microfocus in QGraphicsView or item view widgets.

Task-number: QTBUG-47679
Task-number: QTBUG-47705
Task-number: QTBUG-40691
Change-Id: I84a6647944f1aaedcd72d7060cc90e29a177f577
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
2015-08-25 11:41:04 +00:00
Richard Moe Gustavsen
2518c4c907 iOS: calculate bounds in desktop view using transformed window bounds for both width and height
Depending on the orientation, UIKit might shrink either the width or the height
of the view to fit the status bar. Since we anyway want the view to fill the whole
window, we simply ignore this, and use the bounds of the whole window directly.

Task-number: QTBUG-47506
Change-Id: I73294e5792f8d98fb0c0b0a42198207baca08e3c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-08-25 11:39:22 +00:00
Sérgio Martins
df276787d5 QRasterPaintEngine: Don't detach QImage
Caught being detached a few thousand times per second.

Change-Id: I6dd5fd69d7d4f32048cdb7e4ac707f24df6c15f8
(cherry picked from commit 2a81516835)
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
2015-08-25 11:12:19 +00:00
Kai Koehne
ffbc2d3dc0 Doc: Mention Windows limitations in QFileInfo permission methods
The limitation is already mentioned in the class documentation, but
IMO is severe enough to be highlighted in the documentation of the
respective methods, too.

Change-Id: I16c68eb41ab9d3a7698d7ef06f747cfd98a8aaff
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-08-25 11:01:22 +00:00
Friedemann Kleint
bc867b1794 QWindowsMimeImage: Revert image format handling back to Qt 4.
Effectively revert 9150563940 for
QTBUG-11463 (offering only CF_DIB5 for images of format ARGB32) and
4018cd3529 for QTBUG-46848 adding support
for "PNG".

The changes broke pasting images into MS Office since it can only handle
plain CF_DIB and gets confused if "PNG" is returned as available format.

Task-number: QTBUG-47656
Task-number: QTBUG-11463
Task-number: QTBUG-46848
Change-Id: I9b641b4b912b7b16a2f58bc84fa09c28a64e91c8
Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
2015-08-25 10:56:46 +00:00
Bernd Weimer
b46fe39d94 Harmonize input context selection
Input context selection works differently across platforms. On some
platforms it is not possible to request a specific context at all
(e.g. Wayland). This will be unified, depending on the environment
variable "QT_IM_MODULE", you will get:
- null:  default (platform) context, if defined (otherwise no context)
- empty: no context
- set:   set one, if it exists and is valid (otherwise no context)

[ChangeLog][Platform Specific Changes] Haromnized input context selection.
QT_IM_MODULE environment variable will be taken into account.

Change-Id: Ic8f826fbc6ace25941cd19b9b086943e848fbe01
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Nedim Hadzic <nedim.hadzic@pelagicore.com>
2015-08-25 07:04:19 +00:00
Louai Al-Khanji
31fb4379c8 Fix module reference in license header
Change-Id: I8efa30869e716d827e8463ef4285f8ff9357cc0e
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-08-25 06:01:31 +00:00
Louai Al-Khanji
aab5698dd9 Remove unused kms plugin
The old kms plugin has been replaced by EGLFS's KMS backend. The EGLFS
backend is smaller and has more features.

The kms plugin cannot be built automatically since Qt 5.5 and is
therefore also not tested for changes in QPA API by the CI. Therefore
removing the plugin from the tree should not be a regression from the
previous release.

Change-Id: Icb9ea8c4a5d6421397a2e3f2e2195fb6bfad2293
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-08-25 06:01:26 +00:00
Louai Al-Khanji
cf68d764ab Document QStateMachine::running property in single place
This fixes a number of qdoc warnings due to e.g. missing documentation
for setter argument.

Change-Id: If9ae43f70f0e42fe8b8a4f04f49d522cd7d69099
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-08-25 06:01:19 +00:00
Louai Al-Khanji
e6d5e4167c Fix documentation typo
Change-Id: Ic6271a19999555ef2a1dfa90cebfb92b270a3809
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-08-25 06:01:15 +00:00
Louai Al-Khanji
a49477df95 Fix qdoc warning by documenting function argument
Change-Id: I3d80af0b1226fbe601619420dbb35106bb3d4eec
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-08-25 06:01:11 +00:00
Louai Al-Khanji
056328d3cb Add #ifdef to avoid qdoc missing function warning
Change-Id: I1cba5543a519030a5b06bc80b6fd7410327c86c8
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-08-25 06:01:00 +00:00
Louai Al-Khanji
16a506f418 Fix warning due to undocumented function argument
Change-Id: Ia3a54f296b1edcdce5950bf7acad1b4436d9564a
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-08-25 06:00:49 +00:00
Louai Al-Khanji
789b79fd8a Fix warning due to undocumented function argument
Change-Id: I00654b72a654c7b2a762ace773a9caef37b1bdd5
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-08-25 06:00:46 +00:00
Louai Al-Khanji
6c21a0ea0e Fix invalid documentation function reference
Change-Id: Iccf62e3f2f7843c14dd6540400241bdd264ad376
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-08-25 06:00:43 +00:00
Louai Al-Khanji
b4a48d2578 Move QCoreApplication::quitLockEnabled documentation to single place
Moving the documentation to one spot reduces repetition, is more
canonical, and avoids a warning due to undocumented function argument in
the setter.

Also document the default setting.

Change-Id: Idcedacf4bf101909689025d044e96801255a3332
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-08-25 06:00:38 +00:00
Thiago Macieira
b30feab6e0 Fix permissions on qalgorithms.h
Commit 046f325483 accidentally made it
executable.

Change-Id: I7de033f80b0e4431b7f1ffff13fc9872fa64ae9d
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
2015-08-25 01:08:49 +00:00
Thiago Macieira
ad080fa311 Fix compilation with ICC on Windows
Unlike MSVC, ICC *does* support constexpr, but on Windows it will not
define __GNUC__, so we ended up in the multi-line alternative. That is
not permitted in C++11, only in C++14.

qalgorithms.h(659): error: statement may not appear in a constexpr function

Change-Id: I7de033f80b0e4431b7f1ffff13fc96245ee9a846
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-08-25 01:08:42 +00:00
Jocelyn Turcotte
1977855f31 Avoid recreating QVariantLists when extracted from a QVariant
Wrapping a QVariantList in a QVariant to pass it to QML would
trigger a deep copy each time QML would try to access elements
in the list (specifically in QQmlListAccessor::at).

This reverts a part of 8c4deff51c
by specifying the associative array conversions explicitly without
including the current type in the list of types to convert through
an iteration.

Task-number: QTBUG-41403
Change-Id: If9fddfe6d36f789ac4aa61a7c32677cd1dd077d8
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-08-24 21:03:24 +00:00
Allan Sandfeld Jensen
2f43ac9dcd Fix double initialization of QRgba64 with C++14
Use constructors with C++11/C++14 where it is allowed to avoid hack
that caused double initialization and thereby performance regression
with C++14.

Change-Id: I7ae86df8aa34000b2c186e22bd9917303354b794
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-08-24 08:36:50 +00:00
Shawn Rutledge
bc8d325926 xcb: set QTabletEvent's timestamp from the window system event
The intention is for it not to include any delays that Qt's event
processing has introduced.  And we are already doing it this way
for touch and scroll events.

Task-number: QTBUG-39459
Change-Id: Ie01cc2f8c6290ab66ef1b9180471afaa3da2e9da
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-08-24 07:28:44 +00:00
Shawn Rutledge
bd2ebbdb9a QInputEvent: document that timestamp() is in milliseconds
Task-number: QTBUG-39459
Change-Id: Ie76f3c2f6fe81746d3ea646f0c2f0d47ec3ef252
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-08-24 07:28:40 +00:00
Shawn Rutledge
5c9e94fb9b Windows: set QTabletEvent's timestamp from the window system event
Task-number: QTBUG-39459
Change-Id: I8439846482a52b358bcdc4d8a5f6f4b9bbe55fa5
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-08-24 07:28:34 +00:00
Kai Koehne
cb6ab05648 QLoggingRegistry: Look up logging configuration in Qt data path
Distributions like Fedora would like to disable logging globally, without
having to patch Qt. Fedora right now therefore adds a
/etc/xdg/qtlogging.ini file, which unfortunately though also messes with
Qt versions compiled by the user.

This patch lets QLoggingRegistry look up logging configurations also
in QLibraryInfo::DataPath, which would allow to tweak the values per
Qt installation.

See also https://bugzilla.redhat.com/show_bug.cgi?id=1227295

Change-Id: I0fca304a47f45739d0c08a9e4e715673bf10aa80
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-08-24 07:17:29 +00:00
Andrew Knight
5c95c2077c winphone: Fix keyboard show/hide calls
These need to occur on the XAML thread.

Change-Id: Id42a37df95b09e6d3c0a1b6e593bbf8cbfe5a129
Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2015-08-24 07:02:58 +00:00
Thiago Macieira
b626a5859a Remove vestiges of Qt's own sockaddr_in6 and sockaddr_storage
We weren't using qt_sockaddr_storage, so it's not a problem. But since
we're not using it anyway, we don't really need it. The storage is only
needed if we needed to get a bigger socket address and that only happens
with Unix sockets (paths).

sockaddr_in6, however, was just wrong. Some systems derived from BSD,
like OS X, have a sXX_len field containing the length of the socket
address structure and our qt_sockaddr_in6 was missing sin6_len. As a
result, setting sin6_family was just plain wrong on little-endian
systems. Like all modern systems running BSDs and OS X...

Change-Id: I7de033f80b0e4431b7f1ffff13f900f004c55443
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-22 22:26:50 +00:00
Thiago Macieira
452924c6ff QNativeSocketEngine Unix: do the same as for Windows
Change-Id: Iee8cbc07c4434ce9b560ffff13ca9d9858cf7111
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-22 22:26:47 +00:00
Thiago Macieira
2c64e05d49 QNativeSocketEngine Windows: bring bind() in line with Unix
The IPv4+IPv6 dual stack code that has been in Qt since 5.0 has been
giving test failures for tst_qudpsocket: some binds that shouldn't
succeed do succeed. Instead, copy the core code from the Unix version so
the two OSes will behave the same way.

The one difference in behavior between Windows and Unix is that on Unix
you can bind an IPv4 address to a multicast IP and on Windows you can't.
So I left the "correction" that was in the original code, but I'm unsure
if it is the right thing to do. Are people expecting to join the
multicast group this way?

Change-Id: Iee8cbc07c4434ce9b560ffff13caa1c3d5a7e8fd
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-22 22:26:43 +00:00
Thiago Macieira
f35b8c004e QNativeSocketEngine Windows: simplify the conversion to struct sockaddr
We have qt_sockaddr, which has enough storage for our needs and is a
union of all the types. We don't need them to be separate like that.

Change-Id: Iee8cbc07c4434ce9b560ffff13ca9cb960ccf1d7
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-22 22:26:40 +00:00
Thiago Macieira
28dfc33c3a QNativeSocketEngine: add code to send extra IP header data
Change-Id: Iee8cbc07c4434ce9b560ffff13ca48c053bd88ed
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-22 22:26:37 +00:00
Thiago Macieira
abe269bb72 QNativeSocketEngine: add code to receive IP header data
Change-Id: Iee8cbc07c4434ce9b560ffff13ca466263abcb1b
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-08-22 22:26:33 +00:00
Thiago Macieira
ef05ad0ac5 QNativeSocketEngine: use sendmsg/recvmsg instead of sendto/recvfrom
We'll need to use these functions instead of the ones we're currently
using in order to access the ancillary data.

Note that on Windows the two functions aren't globals, but must be
obtained via ioctl, which means they can fail. If they do, we fall back
to using WSARecvFrom/WSASendTo

Change-Id: Iee8cbc07c4434ce9b560ffff13ca4284acd24132
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-22 22:26:30 +00:00
Thiago Macieira
89efa7333d QAbstractSocketEngine: introduce QIpPacketHeader for datagrams
This commit changes the readDatagram() and writeDatagram() virtual
functions to take a QIpPacketHeader as meta data, instead of a
QHostAddress/quint16 pair. As previously, the header is an "out"
parameter for readDatagram() and an "in" parameter for writeDatagram().

The header pointer in readDatagram() is allowed to be null if the
PacketHeaderOptions indicates WantNone. Otherwise, it must not be null.
The extra options parameter is introduced because we may not always want
all the metadata upon reception. For sending, we know what to include or
not based on what's set in the incoming header parameter.

QIpPacketHeader splits sender and destination because we'll be able to
return both on datagram reception.

Change-Id: Iee8cbc07c4434ce9b560ffff13ca4213255008c7
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-22 22:26:23 +00:00
Friedemann Kleint
53251e23cf Set QAction::NoRole on dock widget view actions.
Prevent the actions from being shuffled around in OS X
menus since the default is QAction::TextHeuristicRole.

Task-number: QTBUG-47739
Change-Id: Ib68bb7c51eb9278a99d277473f9d4cfcf740431c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-08-22 22:26:19 +00:00
Thiago Macieira
3997321199 Remove Q_DECLARE_TYPEINFO that causes a build error
ICC doesn't like it
qdbusintrospection_p.h(162): error: explicit specialization of class "QTypeInfo<QDBusIntrospection::Argument>" must precede its first use

It's used by the QVector in the same class

Change-Id: I7de033f80b0e4431b7f1ffff13f958971617b657
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-08-22 22:26:16 +00:00
Thiago Macieira
39c2b8c5c1 Add support for same-file intrinsics with Clang 3.7
It supports the same feature that GCC does

Change-Id: Ib306f8f647014b399b87ffff13f1f3159898741b
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-08-22 00:10:39 +00:00
Laszlo Agocs
b409b1a0e4 libinput: Fix key mapping
Prevent generating 2 character long 'text' strings with some garbage as
second char.

This matches how xcb works.

Change-Id: I88a248a89c80b0e100c1c4871cfab4f2c287535e
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2015-08-21 21:02:56 +00:00
Markus Goetz
bc32c0ebc0 QNAM: Fix reply deadlocks on server closing connection
The _q_readyRead can also be called from readMoreLater() because we implemented
it so that bandwidth limited reading can be implemented.
This can lead to a race condition if the socket is closing at the specific moment
and then deadlock the channel: It will stay unusable with a zombie request.
The fix in QHttpProtocolaHandler checks if there is actually bytes available to read
from the socket and only then continue.

The fix in the HTTP channel needs to be done to properly finish the reply in
cases of a server replying with HTTP/1.0 or "Connection: close".
The delayed incovation of _q_receiveReply will properly finish up the reply.

Change-Id: I19ce2ae595f91d56386cc7406ccacc9935672b6b
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-20 12:02:32 +00:00
Andy Shaw
d99c9bcf2c Fix regression in reading certain compressed bmp images
For BITFIELDS compressed images, the image data may be preceded by
bitmask fields. The file positioning code that should make sure those
were read correctly was erroneously included in the block of code that
was moved in 6f1b82fccd.

Task-number: QTBUG-45559
Task-number: QTBUG-40890
Done-with: Eirik Aavitsland
Change-Id: Id2b3ce078f67ac6ebf75ab0cc463dc719af83393
Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
2015-08-20 11:25:19 +00:00
Jorgen Lind
025d6a778c Fix unnecessary enter leave events
Task-number: QTBUG-45565
Change-Id: I92c1dc0a14440259349eeae40372221dbc3c548f
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
2015-08-20 10:37:20 +00:00
Samuel Nevala
b349289fa0 winrt: Hide status bar on windows phone.
Task-Id: QTBUG-47789
Change-Id: I9ca5f336ba9ee7524d4a4bbff3bbf4fbbb56fd54
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-08-20 05:41:26 +00:00
Thiago Macieira
cc5e84c878 Avoid overflow in QTime::addSecs with too big a number of seconds
QDateTime::addSecs needs to do something similar, but not identical
because it needs the number of days too. And then there are daylight
savings transitions...

Task-number: QTBUG-47717
Change-Id: I7de033f80b0e4431b7f1ffff13f976f4f5e5a059
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
2015-08-19 22:13:40 +00:00
Thiago Macieira
5bf5fe964b Fix Clang warning about copy elision
Found by Clang 3.7:

qcommandlineoption.cpp:287:12: error: moving a local object in a return statement prevents copy elision [-Werror,-Wpessimizing-move]

Change-Id: I7de033f80b0e4431b7f1ffff13f97fb480001d36
Reviewed-by: David Faure <david.faure@kdab.com>
2015-08-19 22:13:23 +00:00
Shawn Rutledge
cc6a06632b xcb: send QTabletEvent before QMouseEvent
It was a regression: drawing applications which can handle both mouse
and tablet events should not need to wait to see whether a mouse event
will be followed by a corresponding tablet event.  The tablet event is
preferred because it has all the tablet parameters (pressure etc.)
Also, show the timestamp of each mouse event in the log message,
which helps to verify the correspondence.

Task-number: QTBUG-47702
Change-Id: I9e832c19de935ec1243138eb4c1484284f61cbfc
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-08-19 14:14:21 +00:00
Topi Reinio
e525d1f44d Doc: Remove invalid uses of \relates command
A function cannot be both a member and a non-member of the same class.

Change-Id: I07d1e04c09fea2ba1171b3692e716660044cd37a
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-08-19 12:06:05 +00:00
Topi Reinio
2473f4fac3 qdoc: Check and warn if \relates is used incorrectly
There are instances in the documentation where a member function
tries to set itself also a related non-member of its parent. This
should be treated as invalid behavior, as it likely causes also
problems during deletion of the node tree.

QDoc now checks for and warns about these instances.

Change-Id: I951e0de6be4d48618c60b8a0382e2c70700cc402
Task-number: QTBUG-47751
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-08-19 12:06:00 +00:00
Topi Reinio
d558100aa7 qdoc: Improve resolving related non-members and their overload numbers
There were several problems related to resolving related non-member
(RNM) functions for classes. This commit does the following changes:

  - Overload numbers for RNMs are now calculated at the time the
    \relates command is processed, instead of a separate step.
  - If a \relates refers to an entity outside the module boundary,
    write the argument passed to it as-is into the index file.
  - Delay the destruction of QDocIndexFiles singleton, to resolve
    the RNMs read from the index files prior to generating docs.
  - Remove the redundant call to normalizeOverloads() for single-
    exec mode as unnecessary.

These changes ensure that all RNMs are listed in the documentation
for the node that they belong to.

A remaining issue is that if a function relates to a class outside
the module boundary, that function documentation will be empty
because the doc content is not stored into the index file (for
obvious reasons). Single-exec mode does not have this problem.

Change-Id: I33f038120728932cd9fd70da28d9090023068bd6
Task-number: QTBUG-47589
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-08-19 11:30:23 +00:00
Friedemann Kleint
53762b102b Exclude ANGLE from translations.
Fix lupdate warning:
qtbase/src/3rdparty/angle/src/libANGLE/HandleAllocator.cpp:20: Ignoring definition of undeclared qualified class

Change-Id: Ica6b560ce7f80319f4fc9d550f91d6baf61a8241
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-08-19 11:19:09 +00:00
Thiago Macieira
dd92002416 QHostAddress: Improve code generation
Mostly related to IPv6, because Q_IPV6ADDR is an array of char, so the
compilers were generating byte access to each value. Instead, force
access as 32- and 64-bit in most places that make sense (64-bit access
decays to 32-bit on 32-bit machines). In one isLoopback(), this is now a
128-bit access for best improvement.

Some smaller improvements relating to SpecialAddress by combining the
three IPv4 special addresses.

Change-Id: I7de033f80b0e4431b7f1ffff13f932b1cd7b5d21
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-19 06:13:33 +00:00
Simon Hausmann
b479d5befb Disable the testlib watchdog if a debugger is present
Currently this is only implemented on Linux and Windows. But it's an
improvement nevertheless when debugging Qt unit tests :)

Change-Id: Iea307dad0e12c24f305c16f0a1805e7c246ee372
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-08-19 05:03:26 +00:00
Friedemann Kleint
e50629cc0d qthread_win.cpp: Fix compiler warnings by MSVC2015 (64bit).
thread\qthread_win.cpp(121): warning C4312: 'reinterpret_cast': conversion from 'DWORD' to 'Qt::HANDLE' of greater size
thread\qthread_win.cpp(343): warning C4312: 'reinterpret_cast': conversion from 'DWORD' to 'Qt::HANDLE' of greater size
thread\qthread_win.cpp(416): warning C4312: 'reinterpret_cast': conversion from 'DWORD' to 'Qt::HANDLE' of greater size

Change-Id: I5e60e4bb91a32491562748755d34a2c5a1e264b4
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-08-18 20:03:35 +00:00
Julien Brianceau
6a57a260fc Doc: remove type() reference from QApplication and QGuiApplication
QApplication::type() is gone since Qt 5.0.

Task-number: QTBUG-28093
Change-Id: I8700c69a42271e8b99f3e86a5014c8abf7711f53
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-08-18 14:59:39 +00:00
Giuseppe D'Angelo
ee15bef3ea QRegularExpression: fix matching over QStringRefs
Playing with the offset argument of pcre_exec is not equivalent to
adjusting the pointer to the subject string. In particular, PCRE
can go behind the offset to check for lookbehinds or "transition"
metacharacters (\b, \B, etc.).

This made the code that deals with QStringRefs not matching in behavior
with the corresponding code dealing with QStrings. For instance,

   QString subject("Miss");
   QRegularExpression re("(?<=M)iss");
   re.match(subject.mid(1));           // doesn't match
   re.match(subject.midRef(1));        // matches!!!

Instead, actually adjust the pointer to the subject string so that
the behavior is identical. A broken test that relied on the
equivalence is also removed.

Change-Id: If96333241ef59621d7f5a6a170ebd0a186844874
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-08-18 14:18:48 +00:00
Friedemann Kleint
4dccb2ca67 Handle action events in QLineEditIconButton.
Ensure QAction::setVisible() is
handled and reposition if visibility changes.

Task-number: QTBUG-39660
Change-Id: I14f0659aedc8dc89ddef3159d3a500b40b1563ff
Reviewed-by: David Faure <david.faure@kdab.com>
2015-08-18 12:47:17 +00:00
Laszlo Agocs
ba84e346b8 egl: Do not do any further ops when context creation fails
Change-Id: I54bf4a720e8d414d310ecdb88f08a9705023aef9
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
2015-08-18 12:32:39 +00:00
Joni Poikelin
fae725d451 Fix potential SIGFPEs in QRasterizer::rasterizeLine()
Task-number: QTBUG-46985
Change-Id: If9897a6d4014dbcbc1f6cac1c6dd5dc648694b96
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-08-18 09:31:14 +00:00
Laszlo Agocs
df80753134 linuxfb: Use libinput by default when available
Can be overridden by setting QT_QPA_FB_NO_LIBINPUT.

On systems where libinput is present it is usually a better choice
to rely on it instead of evdev*.

Change-Id: I8532c923bacd605434cfca1c7e314cb95d41b372
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
2015-08-18 08:07:31 +00:00
Laszlo Agocs
95aad72e84 eglfs: Use libinput by default when available
Can be overridden by setting QT_QPA_EGLFS_NO_LIBINPUT.

On systems where libinput is present it is usually a better choice
to rely on it instead of evdev*.

Change-Id: I78857ff91c837f58fdc7d1e119260bd6819fbf4e
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
2015-08-18 08:07:27 +00:00
Laszlo Agocs
1fe890317a libinput: Rename logging category to prevent clashes
Anything linking to platformsupport may use the same name so use
something less generic.

Change-Id: I657dd5dfcad9cf22585fcb17eda62deaf26ea6c4
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
2015-08-18 08:07:21 +00:00
Alexander Volkov
be18d6fb01 Fix shortcuts with keypad keys
The way of searching a shortcut match for a key without the keypad
modifier introduced in 547a1bea49 is
not correct. QKeyEvent::setModifiers() doesn't change native scan code
so we get the incorrect QKeyEvent object which is eventually passed to
the implementation of QPlatformIntegration::possibleKeys().
And then QPlatformIntegration::possibleKeys() returns the same result
as for the original QKeyEvent object.

So to fix it we have to remove Qt::KeypadModifier from keys after
calling the implementation of QPlatformIntegration::possibleKeys(),
as it was before 547a1bea49.

Task-number: QTBUG-33093
Task-number: QTBUG-44577
Change-Id: I5b33c9b6cf2c06b133166a31eba9aff9181c9483
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-08-18 06:27:30 +00:00
Oswald Buddenhagen
5a039bf53e Merge dev into 5.6
Change-Id: I061f2513ef58f696e75b11928d89aaaf059659a3
2015-08-17 19:55:41 +02:00
Laszlo Agocs
08150122aa Do not add GLSL line statements for old drivers
Older VMware virtual machines do not like the #line statements. These
were introduced in 5.5.0, meaning that when upgrading from 5.4 in such
a VM, shader compilation via QOpenGLShaderProgram stops working. This
should be avoided.

Task-number: QTBUG-47598
Change-Id: I8cccd76119350e7ce40da96d24a7a6e9eb399052
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2015-08-17 13:17:51 +00:00
Alexander Volkov
0636ec4ff5 Open menu on the third click on QMenuBar on X11
We don't replay mouse events after closing popups on X11.
This leads to the bug when the menu doesn't show after
clicking three times on the menu bar. It can be fixed by
reverting 78d7192338, but
then we need an alternative fix for QTBUG-32807 on Windows.
So don't replay mouse events for the menu bar on all
platforms.

Change-Id: I3db8e24a6de6f35b0a17dffac6a131f1cad42e6d
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-08-17 09:03:22 +00:00
Joerg Bornemann
507625d984 fix assertion in QProcess/Win
Do not call bytesAvailableInChannel if the source pipe end is
invalid. This is the case when redirecting channels on Windows.
The assertions in bytesAvailableInChannel were triggered whenever
an output process or output file was set and waitForBytesWritten
was called.

Task-number: QTBUG-45548
Change-Id: I225dfea2c5e27e122f75008a3a06d425554e00fe
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-08-17 08:25:19 +00:00
Thiago Macieira
dbcf5730ac QHostAddress hashing: use qHashBits
Instead of constructing a temporary QByteArray, which could conceivably
fail, to hash those bits.

Change-Id: I7de033f80b0e4431b7f1ffff13fa376302d9720f
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-16 18:12:54 +00:00
Thiago Macieira
3ae90ed371 QNetworkInterface: remove fallback code for Windows pre-XP and CE pre-4
All versions we support have support for the WinXP-style functions we
need, so we don't need the Win2k fallback.

Change-Id: I7de033f80b0e4431b7f1ffff13f99175a507a2ed
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-16 18:12:51 +00:00
Thiago Macieira
4fbc63f03b Fix thread-safety of qnetworkinterface_win.cpp:resolveLibs
Change-Id: Ia4b5103c9c590c24de9a43c5c7097b0c7b83e679
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-16 18:12:47 +00:00
Thiago Macieira
c72311440b QNetworkInterface: make the name lookup search numbers in string forms
That's how QHostAddress::scopeId() stores them, so we ought to look them
up the same way.

Change-Id: I7de033f80b0e4431b7f1ffff13f98cf87d45ebc6
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-16 18:12:44 +00:00
Thiago Macieira
8fa44b382f QNetworkInterface: Merge the two sections of code that do SIOCGIFxxx
The separation was accidental due to refactoring. It does not need to
exist.

Change-Id: I7de033f80b0e4431b7f1ffff13f988adc47d57d5
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-16 18:12:42 +00:00
Thiago Macieira
1bf9cb44e2 QNetworkInterface: prefer SIOCGIFINDEX over if_nametoindex
On Linux (on a bad system without getifaddrs), the ioctl for
SIOCGIFINDEX should be faster than if_nametoindex. The ioctl on the
already open socket will require one syscall, while if_nametoindex will
require at least one more (to open the socket), probably more.

Change-Id: I7de033f80b0e4431b7f1ffff13f9888bf2044105
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-16 18:12:39 +00:00
Martin Smith
89302b8b88 doc: Add a few missing const keywords in \fn commands
This adds "const" to a few \fn commands for new operators
in QHash and QMap.

Change-Id: I93cf7aaf88fcb4db17de5810b555b978e8119e20
Task-number: QTBUG-47669
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-08-16 14:48:13 +00:00
Martin Smith
330da82cc2 qdoc: Instantiator::objectAt now appear in docs
There was a bug in bool CppCodeParser::splitQmlMethodArg(),
which has now been fixed. The bug occurred when there was a
"::" in the return type.

Change-Id: Id31ed0d4a03d84e76fb69403441a3491ec884ddc
Task-number: QTBUG-47438
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-08-16 14:48:06 +00:00
Martin Smith
8c5ce68fcf qdoc: Allow formal parameters in link targets
This update allows qdoc to handle \l commands for linking
to functions, where the formal parameters are included in
the link target.

For example, \l {QWidget::find(QString name)} will only match
a member function of QWidget that has a single parameter of type
QString. The parameter name is not used in the search.

Change-Id: I8a31c9a7ed632f12a0e6d8a33cbb5cd361098317
Task-number: QTBUG-47286
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-08-16 14:47:58 +00:00
Alex Trotsenko
6dde874c32 QProcess: discard unwanted output from the child process
Drop process output to nullDevice(), if an application does not request
forwarding, redirecting or reading from the device channel. This
prevents from accumulation of unnecessary data which can not be read.

Change-Id: Ia311a8c658a46cf580ffa9484c5369f3fc5f98a7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-08-16 14:22:32 +00:00
David Faure
4ccf5c6f4a QMimeDatabase: adapt to changes in shared-mime-info 1.3
The generated xml file is now lowercase.
This was changed in shared-mime-info 3805d0bcf2.
It led to runtime warnings "No file found for ...", which helped notice the bug.

Change-Id: I31f0fc7f0fe8a098c3f79c0bcbeeb1909d2cc05a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-08-16 13:33:21 +00:00
Olivier Goffart
f029468b8d Add QMainWindow::resizeDocks
This API allows to programatically resize QDockWidgets

Task-number: QTBUG-32001
Change-Id: I58072a391f8e7f325a26745b5bedd3fe49508e91
Reviewed-by: Jocelyn Turcotte (Woboq GmbH) <jturcotte@woboq.com>
2015-08-16 08:23:32 +00:00
Thiago Macieira
1ff66a7962 QProcess: Ensure that the stdin buffer is cleared on start()
The buffer may have been left dirty if we were unable to write all the
data to the child process in the previous run. So ensure we clear it
before starting a new one. We already did that for stdout and stderr,
for some reason.

Task-number: QTBUG-44517
Change-Id: I1a800c709d3543699131ffff13c419da3bbffacf
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-08-15 21:59:26 +00:00
Thiago Macieira
3bfba054cb Add QHostAddress::isMulticast
This complements QHostAddress::isLoopback. The only missing check now is
for the "Any" address types, though operator== is quite fast nowadays.

Change-Id: Iee8cbc07c4434ce9b560ffff13cc2691e15014b6
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-15 04:35:42 +00:00
Thiago Macieira
060b7ffe5b QtTest: Add QHostAddress support for QCOMPARE failures
Change-Id: Iee8cbc07c4434ce9b560ffff13cc6dad04a5a554
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-15 04:35:34 +00:00
Thiago Macieira
45e59556ed Fix warning of unused variable
Only happens on systems without getifaddrs, which we aren't usually
testing.

Change-Id: I7de033f80b0e4431b7f1ffff13f9889f5cfdea5b
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-15 04:35:23 +00:00
Sérgio Martins
385202c27c OSX FreeType: Add support for sub pixel font rendering.
Task-number: QTBUG-42839
Change-Id: Iea4552d766936a55fd177e4287591d2715202d9c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-08-14 23:34:26 +00:00
Andreas Hartmetz
ea3e2ca6ea OSX FreeType: respect hinting preference
Task-number: QTBUG-42839
Change-Id: I2bccd7bda74ccbbb752181f1caea7ecf4672c01c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-08-14 23:34:22 +00:00
Thiago Macieira
c21113f9ee QHostAddress: don't inline the parse() function
It's called everywhere due to QT_ENSURE_PARSED and it's big. There's no
need to duplicate it everywhere.

Change-Id: I7de033f80b0e4431b7f1ffff13fa383f29114712
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-14 20:17:43 +00:00
Andreas Hartmetz
b71b36fa22 Move setter for QFont::HintingPreference to QFontEngineFT.
Preparation for also using it from QCoreTextFontDatabase.

Change-Id: I9cbef59c21f343a88a5cb3fdbee1ed4791d7a36e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-08-14 19:07:11 +00:00
Samuel Gaist
40a4105fae Fix QChar char constructors documentation
Reverts the wrongly added \internal and adds a warning for users that
the constructors will not be available if QT_NO_CAST_FROM_ASCII is
defined

Task-number: QTBUG-39862
Change-Id: I038eea3f4eef0b914b470309a2f515741eec35a9
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2015-08-13 21:04:27 +00:00
Morten Johan Sørvig
7a0222fba3 Call sendWindowSystemEvents() on deferred flush
Calling it directly is less confusing than calling
it indirectly via the "else" branch in
flushWindowSystemEvents.

Change-Id: I085deff09162137606922a5af7ead23e21497b11
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-08-13 18:34:05 +00:00
Morten Johan Sørvig
65cbf263a3 Propagate keyboard event accept status
Set the accepted bit on the QWindowsystemInterface
keyboard event after processing the key event.

Change-Id: I2d8c9382f14840e464153870dff909000e64ddcd
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-08-13 18:33:39 +00:00
Morten Johan Sørvig
e5d54c8af7 Propagate event accepted state to platform plugins
Add en "eventAccepted" field to WindowSystemEvent,
where the event subclasses can record the event
acceptance status. Make handleWindowSystemEvent()
return the accepted status.

This works for synchronous event processing only. If
the event is placed on the QPA event queue then there
is no way to return the accepted state immediately.
In the latter case handleWindowSystemEvent() always
returns "true".

Change-Id: I081aecc54f43588d42d3aaeec7f8458f06937601
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-08-13 18:33:03 +00:00
Morten Johan Sørvig
a50db99d15 Add QPlatformWindow::windowFrameGeometry()
Convenience accessor for use by the Wayland
platform plugin.

Change-Id: I420209138cfc285f8396913548b9e158a35ee9c1
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2015-08-13 18:28:51 +00:00
Morten Johan Sørvig
8f747efcc1 Make QT_SCALE_FACTOR work on Wayland
Propagate the line stride when creating the high-dpi
backing store image.

Change-Id: I15f41965d8eaf1d01ddac0a1a012b71148f757e3
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2015-08-13 18:28:28 +00:00
Morten Johan Sørvig
ce651b961d Remove Q_DEAD_CODE_FROM_QT4_MAC sections
The native OS X color dialog wrapper is now implemented
in qcocoadialoghelper.mm in the Cocoa platform plugin.

Change-Id: Idc4088df93960dd68507d11a9895277e34a18b96
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
2015-08-13 18:27:28 +00:00
Ulf Hermann
c65b8381bb Use QScopedPointer for library paths
This way we can remove some life cycle management code.

Change-Id: I8e0c9db0a8c5f0941bbd834380d3e3b3a9d2f306
Reviewed-by: Adam Majer <adamm@zombino.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-08-13 17:09:43 +00:00
Alex Trotsenko
6fca88607b QAbstractSocket::canReadLine(): remove code duplication
Contents of the QIODevice's buffer is handled in the base
implementation.

Change-Id: I5a3d68e4e8dcb16d7f5ad695ac43127b8047a061
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-08-13 17:08:28 +00:00
Milian Wolff
194403a348 Remove temporary string allocations when reading prepared statement.
Instead, we use the binary MySQL encoding and copy the data directly
into the QVariant of the desired type. This gets rid of the temporary
string allocations and greatly improves the performance of the added
benchmark. On my machine, the results are:

Before:
     0.562 msecs per iteration (total: 563, iterations: 1000)
     1,922,479.330 instructions per iteration (total: 1,922,479,330, iterations: 1000)

After:
     0.381 msecs per iteration (total: 381, iterations: 1000)
     774,132.957 instructions per iteration (total: 774,132,958, iterations: 1000)

Note that the same could be applied to floating point data types in
the future. Additionally, special support for MYSQL_TIME structure
coult be added to get rid of the string conversions there.

To ensure everything keeps working, a new auto test is added as well
that verifies the select statements and insertions of integral data
into a MySql table works as intended.

[ChangeLog][QtSql] Improve performance when reading integer values
from MySQL databases via prepared statements.

Change-Id: I21dd9277661971ded934546f09535014b63f8eb8
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-08-13 16:53:45 +00:00
Thiago Macieira
1183fb3ea9 Doc: Remove the section about IPv6 site-local addresses
Site-local addresses were deprecated in RFC 3879 (September 2004) and
RFC 4193 (October 2005) replaced them with Unique Local Address. ULAs
are part of the global range but supposedly unique to an organization.

Change-Id: I7de033f80b0e4431b7f1ffff13f98d2124c5cffc
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-08-13 16:35:23 +00:00
Thiago Macieira
6d8c7a61f5 Fix -Wcast-qual warnings
qwidget.cpp:12864:70: error: cast from type ‘const QWidget*’ to type ‘void*’ casts away qualifiers [-Werror=cast-qual]

Change-Id: I7de033f80b0e4431b7f1ffff13f956cb26108af7
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-08-13 16:35:14 +00:00
Thiago Macieira
01d0b1d6e3 Merge the multiple implementations of getting the local hostname
This commit moves the functionality from QtNetwork's QHostInfo to
QtCore. Note that due to Windows ws2_32.dll's quirky behavior of
requiring WSAStartup before calling gethostname, this change required
moving the initialization to QtCore too.

On Linux systems, gethostname() gets the name from uname(), so we bypass
the middle man and save one memcpy.

Change-Id: I27eaacb532114dd188c4ffff13d32655a6301346
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-08-13 16:34:51 +00:00
Andrew Knight
807ec8ea48 winrt: Refactor platform plugin for XAML support
By using XAML as the platform compositor, many benefits are possible:
 - Better input context handling for tablets
 - Better multiple window support (including non-fullscreen windows)
 - Support for transparent windows and window opacity
 - Integration with native platform controls
 - Simpler orientation handling on Windows Phone with built-in transitions

This patch applies only the minimal parts to make XAML mode work just as
the raw D3D mode. It does this by:
 - Moving all OpenGL parts into QWinRTEGLContext. This will allow us to
   have non-OpenGL windows later (e.g. Direct2D raster surfaces).
 - Moving more window-specific parts into QWinRTWindow. Each window creates
   a SwapChainPanel which can then be used for ANGLE (or Direct2D) content.
 - Moving non screen-specific parts into QWinRTIntegration.
 - Having QWinRTScreen create the base XAML element Canvas.
 - Running certain calls on the UI thread where necessary.

The following code parts were removed:
 - The UIAutomationCore code in QWinRTInputContext, as this is incompatible
   with XAML automation.
 - The D3D Trim and device blacklist, as these have been fixed in ANGLE.
 - Core dispatcher processing in QEventDispatcherWinRT. Now there is only
   one native event dispatcher; it is always running and never needs to be
   pumped.

Future commits should address:
 - Maintaining the window stack list and visibility using the XAML Canvas.
 - Allowing for windows (e.g. popups) to be sized and positioned instead
   of fullscreen.
 - Using the XAML automation API to improve the platform input context.

[ChangeLog][QPA][winrt] Windows Store apps are now composited inside a
XAML container, allowing for tighter integration with the native UI layer.

Change-Id: I285c6dea657c5dab2fda2b1bd8e8e5dd15882c72
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-08-13 16:12:37 +00:00
Andrew Knight
ebc2b963aa winrtmain: Start in XAML mode
This allows the platform plugin to start using XAML interfaces in the
windowing system.

Change-Id: Ifcd29b8b8d83b138af69786dfc6a1adec21be37e
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2015-08-13 16:12:18 +00:00
Andrew Knight
130083a7fc ANGLE: Use pixel sizes in the XAML swap chain
This is necessary for Qt applications, as they render to GL in physical
pixels. This is consistent with the CoreWindow swap chain behavior.

This includes a partial revert of "ANGLE: Improve Windows Phone Support"
as the modifications to SwapChain11 are incompatible with the XAML swap
chain.

This change only affects Windows Runtime targets.

Change-Id: I401ae81028a9dfdb9da37f51c60844467c476f76
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-08-13 16:12:10 +00:00
Andrew Knight
cea03fa3e3 ANGLE: check for out of date swap chain even when size is empty
This allows the XAML swap chain to work properly, as otherwise it never
got a resize after it was passed into ANGLE with an empty size. This is
fixed by upstream commit 3799c3014a9e4ba4a3853c014a7127254ec19d50, so no
patch is necessary for Qt's local copy.

Change-Id: I43b030fa74f6b30c2aa42a36db2031a84eedf60b
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-08-13 16:12:02 +00:00
David Faure
6c09b9e553 QStandardPaths: on Windows, add APPDIR and APPDIR/data for GenericDataLocation
This allows multiple applications installed into the same directory,
to share data files without polluting a more global directory
like C:/ProgramData.

Change-Id: Id5f4f9bc9d2ccb7ec677babcc08c1c5a641178f6
Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-08-13 15:23:01 +00:00
Andrew Knight
68c915f3df ANGLE: call flex/bison by their standard names
qt5.git now contains the winflexbison tools as flex/bison.

Task-number: QTBUG-46852
Change-Id: I8b86cd4211ae8fb120f955be1f423f94b10b318e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2015-08-13 10:24:53 +00:00
David Faure
109cdeda30 qprintdialog_unix.cpp: fix out-of-bounds when cwd is empty.
This happens when the cwd got deleted meanwhile; this warning is printed out:
QFileSystemEngine::currentPath: getcwd() failed
and currentPath() is empty. Not a problem in itself, but qprintdialog
should not assume it's not empty, then.

Change-Id: I5c89992b36ca58b6325ced399cff33aca9efb7ec
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-08-13 08:54:47 +00:00
Olivier Goffart
314c83c0c2 Do not use Q_GLOBAL_STATIC in the implementation of QMutex
Since Q_GLOBAL_STATIC might use QMutex and cause a stack overflow.

Task-number: QTBUG-47554
Change-Id: I4853c5e9b9168d4a417200e2a45a1bf9cb103a30
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-08-13 07:03:23 +00:00
Michael Klein
e3d7cf7c96 Cocoa: fix integer multiplication overflow in qt_gettime()
Task-number: QTBUG-24031
Change-Id: Iae00b10b6a7423508669ef173a80a03b3dd388c6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-08-13 01:16:17 +00:00
Milian Wolff
af3152adee QMimeProvider: Do not crash when globPatterns is empty.
Change-Id: I351a533a1f03ac2e7bdec876b657a80fac60b2ed
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
2015-08-12 13:20:20 +00:00
Oswald Buddenhagen
a47cd2cc82 Merge "Merge remote-tracking branch 'origin/5.4' into 5.5" into refs/staging/5.5 2015-08-12 09:53:52 +00:00
David Faure
34130b9caf QMimeDatabase: use QElapsedTimer instead of QDateTime::currentDateTime()
This reduces the number of syscalls greatly, by avoiding the timezone
conversion every time.

Change-Id: I39a54def4b45f25c6e037ced6943b05ddc749c9d
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
2015-08-12 09:03:09 +00:00
Thiago Macieira
2366ca059e Fix warning about unused local variables
qopenglengineshadermanager.cpp(430): warning #177: variable "none" was declared but never referenced
qopenglengineshadermanager.cpp(431): warning #177: variable "br" was declared but never referenced

Change-Id: I7de033f80b0e4431b7f1ffff13f958e4a4cca16e
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-08-12 03:55:21 +00:00
Thiago Macieira
0ec809e027 forkfd: Add support for FreeBSD's pdfork(2) system call
pdfork(2) has semantics very close to what we want in forkfd, but not
quite. Differences:
 - we still get SIGCHLD and need to do a wait4
 - no support for atomic FD_CLOEXEC and O_NONBLOCK

On the SIGCHLD case: this commit is an improvement over the generic Unix
case, since we no longer need to install a SIGCHLD handler and do not
need to keep the arrays for matching PIDs and file descriptors. That
matching is done entirely inside the kernel.

However, since SIGCHLD is still sent to the process, an uncooperative
SIGCHLD handler can still "steal" our response. At least Glib is
documented not to reap children it wasn't explicitly asked to watch for
(source code matches), but other libraries are known to do waitpid(-1)
(e.g., EFL's Ecore). At least now the behavior is consistent: we will
never install a handler, so the behavior won't depend on the order in
which the handlers are installed.

Change-Id: Iee8cbc07c4434ce9b560ffff13cb4c63306e43ef
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-08-11 16:37:58 +00:00
Milian Wolff
6129be8a4b Prefer QT_PLUGIN_PATH over compiled-in paths.
Currently, when one compiles a Qt plugin that is also installed
system wide to a local path added to QT_PLUGIN_PATH, you have no
way to ever load it as the global plugin will always be preferred.
This is due to the order in which the QCoreApplications::libraryPaths
are constructed, which always appended the QT_PLUGIN_PATH contents
to the end.

Now, the QT_PLUGIN_PATH contents are put first, such that the plugins
in there are preferred and loaded.

[ChangeLog][QtCore][QPluginLoader] Fixed the search order of Qt plugins
so that paths specified by the QT_PLUGIN_PATH environment variable
are searched before built-in paths.

Change-Id: Iad8ca2cd34e7a622c191a416c01c1c5cc1812fc9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-08-11 14:33:20 +00:00
Kai Uwe Broulik
fc410c1398 Android: Add support for EnterKey
QAndroidInputContext now sends along the EnterKey type provided by the
EnterKey input method query enabling the QtActivityDelegate to set the
imeOptions for the TextView accordingly.

Change-Id: Ic96077ab4b11cf6dec52283ecf66b2cabe7af665
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2015-08-11 13:14:26 +00:00
Erik Verbruggen
d44ca1ed0b Remove type punning from QRgba64.
In C++, type punning with a union is not allowed. It will result in
compiler defined behavior at best, and undefined behavior at worst.
Specifically, if QRgba64 is passed to a function by value, the different
members of a struct might be passed in separate registers. This means
that any write to the quint64 might not blank out the values of the
struct whenever the compiler looses track with TBAA.

Change-Id: I991b5492fe4bb13a14bb670fef5bf13dacbe6c0a
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
2015-08-11 11:01:27 +00:00
Erik Verbruggen
670cb2edbc Move Q_ALWAYS_INLINE next to Q_NEVER_INLINE in qglobal.h.
Change-Id: I7e3b7ecca6b5f142fa6cb5db2e9521ed3212afe8
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-08-11 11:00:31 +00:00
Richard Moe Gustavsen
afaeecd4e8 iOS: ensure that we restore text selection with correct cursor and anchor pos
Qt keeps track of the selection direction since a selection anchor can be placed
both to the left or to the right of the cursor. On iOS, the selection should
instead always be specified from left to right (using a position together with a
positive length). So when restoring the selection after performing the
calculation of the text rect, we need to ensure that we follow this format.

Change-Id: Id8bea6c35e2781e1431ee963f601b6e9ef05dbf5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-08-11 10:13:38 +00:00
Richard Moe Gustavsen
0cf00efced iOS: support cut/copy/paste shortcuts when using Bluetooth keyboard
Change-Id: Iaa602771227f64c3a477a27656362a361f78e8dd
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-08-11 10:13:32 +00:00
Alex Trotsenko
70da0b71fb QNetworkReplyImpl: remove unused declarations
Change-Id: I844864d53d4644d57f3ca5f20b4a3f30a95fead3
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
2015-08-11 09:40:47 +00:00
Mathias Hasselmann
bf013c9e74 OSX: Add initial FreeType support
This permits text rendering consistent with other FreeType enabled platforms,
like Windows and Linux.

Task-number: QTBUG-42839
Change-Id: I8c99bcaa3fb07c16e935a0c3705af467bc3da584
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
2015-08-11 09:40:30 +00:00
Allan Sandfeld Jensen
5551295028 Fix repremultiply from RGB64 to RGB30
Just like from RGB32 to RGB30 we must also repremultiply when converting
from RGB64 because the alpha channel loses more precision than the other
color channels.

Since this is not approximated accurately in the simple blending
functions and the functions are no longer needed now the main render
engine supports higher accuracy, the simple blending routines for RGB30
have been removed.

Change-Id: I2b7b8eb015e330a487848fc4370ad3a1e966be91
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-08-11 09:33:06 +00:00
Richard Moe Gustavsen
7f0f6380b1 QComboBox: make editable comboboxes usable with input methods
QComboBox uses a QLineEdit for text editing. But while editing, the
combobox is the widget having focus, not the line edit. Instead the
combobox forwards all the IM events to the line edit internally. This
causes a problem since the line edit will not be able to update the
platforms IM state in QWidget::updateMicroFocus() since it doesn't
have focus. The result will be that the platforms IM state will
get out of sync with the QLineEdit.

This patch will add the missing connections that lets QComboBox
update the platforms IM state when the inner QLineEdit signals
that its needed.

Change-Id: Ic3e0fdbf155d4dbeab31e2cd859f6e425ae87375
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-08-11 07:46:12 +00:00
Richard Moe Gustavsen
22e752bada QLineEdit: update IM status after selection change
As it stood, we only told the platform about a selection change if
the cursor also changed position. But if you have a selection, and
press key left, the selection will be cleared without moving the
cursor. And for those cases, we didn't report the selection change
back to the platform. The result was that the IM status in the platform
plugin got out of sync with the widget.

This patch will add the missing connection that updates the platform
whenever the selection changes.

Change-Id: Iab0848f27207b63ed4fb47f0d4f24a6d02e87db1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-08-11 07:46:08 +00:00
Andy Shaw
d2f0f46c45 When the focus changes make sure that the IME finishes correctly
When clicking onto another widget while in the middle of composing should
cause it to be seen as an acceptance of the composed text so far instead
of just cancelling it outright.

This was validated against the Japanese, Korean and Chinese IMEs on
Windows 7.

Task-number: QTBUG-42344
Change-Id: I03be0cd099840f51a9550929f33e2afbbf31e85a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-08-10 12:30:48 +00:00
Allan Sandfeld Jensen
bec8c726bf Fix out-of-buffer read on image upscale
Avoid reading from the next pixel when the sample is fully based on the
current pixel. This is particular important for the last pixel in an
image when the next pixel might be outside the image buffer.

Change-Id: I3607f9c6c332d11ff944ca35d216d417368f9fd5
Task-number: QTBUG-47228
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-08-10 10:22:36 +00:00
Thiago Macieira
dc3dd4f634 Set the socketType and socketProtocol early
The type is known (usually) right after createNewSocket, so let's just
set it. They may get overwritten later (in fetchConnectionParameters),
but this allows early use of setOption when we need to know the socket
type.

Change-Id: Iee8cbc07c4434ce9b560ffff13ca09fccb8e1662
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-10 03:41:46 +00:00
Thiago Macieira
3bf4c222e5 Make Qt::Initialization a C++11 class enum
And declare Qt::Uninitialized to be the same value because we're not
interested in the scoping rules of C++11 class enums. We're only
interested in avoiding the cast from Qt::Uninitialized to an integer.
That is to avoid the mistaken:

    QVector<Custom> vector(5, Qt::Uninitialized);

which is actually implicitly:

    QVector<Custom> vector(5, Custom(Qt::Uninitialized));

and likely not what the developer wanted.

Change-Id: I27eaacb532114dd188c4ffff13d374eb698bfbab
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-08-10 03:41:43 +00:00
Thiago Macieira
d9d9420d8d Add a dedicated QListData::realloc_grow for growing QList
This hides the call to ::grow to now two places in the source code, so
it will be easier to fix the inefficient call to qAllocMore.

Change-Id: I5d1e6f7607404caa96e4ffff13e80a3e4cb0ee93
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
2015-08-10 03:41:41 +00:00
Thiago Macieira
dafa3618d2 Add QTypeInfo::isRelocatable
It's the same as movable (i.e., the opposite of QTypeInfo::isStatic),
except that it won't trigger the QList change in memory layout.

For Qt 6, we should merge the two.

Change-Id: Ib306f8f647014b399b87ffff13f1ece29e4b6e5c
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-08-10 03:41:37 +00:00
Thiago Macieira
2faa5f9d09 Silence warning about unused parameter
Happened on an iOS build

io/qlockfile_unix.cpp:217:51: error: unused parameter 'pid' [-Werror,-
Wunused-parameter]

Change-Id: Id3d5c7bf4d4c45069621ffff13f7f7a30728c071
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
2015-08-10 03:41:33 +00:00
Simon Hausmann
d82e1d145d Reduce memory usage of dynamic properties
The dynamic property variants are stored as QList<QVariant>, which unfortunately
results in QList to behave as array-list because of the size of QVariant. By storing
the variants in a vector directly we can eliminate the array-list element pointers.

Change-Id: I8736e1cf48b9fc97df3007df4a439b793933f346
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-08-10 03:41:28 +00:00
Allan Sandfeld Jensen
01c15a9438 Always return grayscale indexed8 from QImage::alphaChannel()
We shouldn't short-cut alpha8 formats in alphaChannel, the method is
used under the assumption that the returned alpha map has encoded the
alphas as an indexed grayscale image. The method is also documented
as not returning alpha8.

Task-number: QTBUG-47138
Change-Id: I1cf16957d12e65d44f2b586d9f127fcb33c549b6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-08-09 09:13:30 +00:00
Timur Pocheptsov
5bfac9d653 Merge "Merge remote-tracking branch 'origin/5.5' into dev" into refs/staging/dev 2015-08-09 07:06:52 +00:00
Paul Olav Tvete
f08e1ecdc8 Add Mir client platform plugin
Contributed by Canonical, Ltd.

Change-Id: I77752a1fd56641342be6c84e01b013d3df36ad73
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2015-08-09 06:27:26 +00:00
Tasuku Suzuki
26b4ec448c Support logging direct to syslog, if enabled.
[ChangeLog][QtCore][Logging] Systems with syslog may now pass -syslog to
configure to send logging output to syslog.

Change-Id: I80d58ee6e70d8deb2409fc666e7e7f2d7f52b8e1
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2015-08-09 04:16:38 +00:00
Laszlo Agocs
89cb92f838 Document AA_* that must be set before app construction
After seeing multiple apps falling into the trap of setting
AA_ShareOpenGLContexts after constructing the q(gui)app, it
is time to add some more docs regarding this.

Task-number: QTBUG-47637
Change-Id: I01b5be0980d038efc56fd649d4a1fee26c33aef8
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2015-08-08 22:52:43 +00:00
Laszlo Agocs
9b27f27d17 windows: Fix the OpenGL blacklist
Change-Id: I860feffee46de14cb92435e4199e6bae6afae249
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2015-08-08 22:52:37 +00:00
Laszlo Agocs
87666d391c Make compressed textures work with mutable storage
1. glTexImage*D does not accept compressed formats.

2. Replacing it with glCompressedTexImage*D is not an option as per GLES 2.0 spec
since passing null data is not allowed.

3. glCompressedTexSubImage*D must always be preceded by a glCompressedTexImage*d
(or glTexStorage*D) call.

4. Therefore the only way is to do nothing in allocateStorage() and switch to
glCompressedTexImage*D in setCompressedData() whenever mutable storage is in use.

This makes ETC1 textures working on the Beaglebone (and presumably others).

Change-Id: I21a040f6ed4aecaa494b6e5a6c6cd75b7389c15c
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2015-08-08 22:52:31 +00:00
Tor Arne Vestbø
e92c2e119b Improve readability of QTextLine's handling of (negative) right bearing
- Helper functions in LineBreakHelper have been renamed from
    adjustFoo to calculateFoo, to signal that they do work, and
    are not adjusting something relative to something else.

  - The use of QFixed(1) and >= 0 has been replaced with an explicit
    constant for the case of the bearing not being calculated yet.

  - A helper function negativeRightBearing() has been added that
    returns the absolute value of any negative right bearing, making
    the width computations simpler.

  - Comments have been added and rewritten to make the logic clearer.

Change-Id: I1d3a0214cfa8b4fed4551f3444b43a37d55bd69b
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-08-07 15:46:18 +00:00
Andy Shaw
4d572362e8 Fix link to QQ article
Change-Id: I04d373778b243fdeb281c98e292359996639c95e
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-07 08:00:27 +00:00
Samuel Gaist
63cd55b172 QTreeView: add size hint handling information to uniformRowHeights
Task-number: QTBUG-10802
Change-Id: I6aa60d8fd7678f02003a229e191a5ab4f93c4b9d
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
2015-08-06 20:50:02 +00:00
Samuel Gaist
141f03a814 Doc: mark private QChar constructors as internal
Task-number: QTBUG-39862
Change-Id: Ie0d533e3897200589248c803069c41661b15997e
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-08-06 20:49:53 +00:00
Samuel Gaist
64b53ddf56 Doc: add clarification about signals not being buffered when blocked
Task-number: QTBUG-15238
Change-Id: Id762007415245f104ffe5cdfd100889f9a73ae95
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-08-06 20:49:44 +00:00
Samuel Gaist
6e0a6be105 Doc: Fix wrong reference QApplication::setStandardPalette
Task-number: QTBUG-46078
Change-Id: Ifb1c650467a0fc30a0d11ad58708a64e5f9fabd5
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-08-06 20:49:41 +00:00
Samuel Gaist
925822eca5 QProcessEnvironment documentation typo fix
Task-number: QTBUG-45985
Change-Id: I42de961ca6d57847c135abd8395494d0e416ab05
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2015-08-06 20:49:37 +00:00
Samuel Gaist
24dc597386 Add reference to QRegularExpression
Currently there's no mention of QRegularExpression in QRegExp's
documentation. This makes it hard to find QRegularExpression for user
used to QRegExp. This patch adds that missing reference.

Task-number: QTBUG-46816
Change-Id: If3a981d5759fbed3eecd07e046882e6da378cc4e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2015-08-06 20:49:33 +00:00
Lorn Potter
51cf05c1bd Add env variable to control bearer backend polling timers.
Scanning and updating networks can cause transmission jitters
when scanning every 10 seconds.
setting QT_BEARER_POLL_TIMEOUT, in milliseconds will set
polling timer for those bearer backends that require
polling, such as generic and windows.

Task-number: QTBUG-46015
Change-Id: I0338cd34ad78488ebef250a0114d17ce190434e8
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-08-06 19:36:59 +00:00
Morten Johan Sørvig
79ae2b3963 QMacStyle: Disable progress bar animations
Disable progress bar animations on 10.10 Yosemite
and higher - the native style does not animate them
any more. Keep the indeterminate progress bar animation.

Change-Id: If15fa0321e184101ef19b1050eb5e9d8f27480d8
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2015-08-06 19:30:41 +00:00
Simon Hausmann
f18dc91da5 Fix crash when mixing widgets with QtQuick 1 and Qt Quick 2
Apply the fix from commit 313a74cc4a also to
the QWidget and the QGraphicsObject destructor.

Task-number: QTCREATORBUG-10273
Change-Id: I47983b49cc4d9b75a2e1ee838e13403bc4b95a59
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-08-06 16:58:22 +00:00
Paul Olav Tvete
62a56adfa6 Compile-time option for disabling high-DPI scaling
Even if QHighDpiScaling::isActive() returns false, there
is a small overhead from calling functions and multiplying
with 1.0. This change adds a QT_NO_HIGHDPISCALING #ifdef
that replaces all conversion functions with empty inline
functions.

Task-number: QTBUG-46615
Change-Id: Idf85e1700e3adf7f7174c6fa3f5e1d006d74c826
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-08-06 11:45:28 +00:00
Morten Johan Sørvig
6c4bd85c1f OS X adaptations to the high-DPI API
Use QPlatformWindow::windowGeometry() and friends
instead of the QWindow API, which now returns
(possibly scaled) values in device-independent pixels.

Rename QCocoaWindow::windowGeometry() -> nativeWindowGeometry()

Change-Id: I70279145079c3df793059d16fed9aafba2d49a6d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2015-08-06 11:06:26 +00:00
Tim Blechmann
11de131053 platforms: cocoa - fix QCocoaWindow::bottomLeftClippedByNSWindowOffset
bottomLeftClippedByNSWindowOffset did not take multiple clippings into
account. with this patch, we compute the offset via NSView-visibleRect.

Change-Id: If4ec02eb983e30f7cc5a6a1cb73e8f5c28fe1551
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-08-06 10:48:44 +00:00
Timur Pocheptsov
462e537e03 Fix a memory leak
We create dirtyOnScreenWidgets even if QT_NO_OPENGL is defined,
but dtor deletes this object  only if no QT_NO_OPENGL is defined.
Also, copy ctor/assignment operator must be disabled for such a class.

Task-number: QTBUG-47499
Change-Id: I9f8b5721ff6324fa7b28b715af68d0a5496c5eb5
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-08-06 10:30:57 +00:00
Antonin Stefanutti
e9eeb68a65 Add support for drawing a hyperlink in QPdfEngine
Adds the drawHyperlink method so that clients can draw a hyperlink
pointing to the specified URL at the specified rectangle. That new
method is to be used by GraphicContext::setURLForRect implementations
that want to render anchors as clickable links in PDF documents.

Task-number: QTBUG-44563
Change-Id: I7b0c602da37ee157d18115c531ab1b11fe304c13
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-08-06 09:40:02 +00:00
Frederik Gladhorn
77da617dc8 Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
	doc/global/qt-cpp-defines.qdocconf
	src/3rdparty/forkfd/forkfd.c
	src/corelib/codecs/qtextcodec.cpp
	src/corelib/kernel/qmetatype.cpp
	src/corelib/tools/qset.qdoc
	src/gui/accessible/qaccessible.cpp
	src/gui/image/qpixmapcache.cpp
	src/opengl/qgl.cpp
	src/tools/qdoc/generator.cpp
	src/widgets/kernel/qwidget.cpp
	tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp

Change-Id: I4fbe1fa756a54c6843aa75f4ef70a1069ba7b085
2015-08-06 10:54:01 +02:00
Thiago Macieira
40cbf1927b Don't add qmutex_xxx.cpp to SOURCES, as qmutex.cpp #include's them
Normally qmake catches the #include and drops the source from SOURCES.
But the parser has bugs, so help it by never adding the files.

The false: SOURCES += is left so that the sources can be found by Qt
Creator.

Task-number: QTBUG-46582
Change-Id: I049a653beeb5454c9539ffff13e667877350346b
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
2015-08-06 07:35:13 +00:00
Thiago Macieira
fd57ec5c5f QDBusError: Disable function that isn't used in bootstrapped builds
Change-Id: Id3d5c7bf4d4c45069621ffff13f7b73144537d81
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-08-06 07:34:20 +00:00
Laszlo Agocs
4e6e71aa8d Add ETC1 to QOpenGLTexture formats
On mobile and embedded ETC1 (via GL_OES_compressed_ETC1_RGB8_texture) is
still the most common (and sometimes the only) option for compressed textures,
at least until GLES3 (with ETC2) becomes widely available.

Note that we treat this format as unsized to prevent going on the immutable storage
path as there is no word on glTexStorage and friends in the extension so that may
just fail as well.

Change-Id: Icbc3c6f62f314d63c4df289ef456f047c5e84cf3
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2015-08-06 07:30:57 +00:00
Laszlo Agocs
4d39da8734 eglfs: save state in the cursor
Running an example like hellogles3 with eglfs and the mouse cursor visible
breaks due to the cursor implementation not being aware of vertex array
objects. The cursor drawing code uses client side pointers and having a
VAO bound breaks this. Instead, the VAO should be reset to 0.

In addition, the same applies to all touched state: naive applications
doing custom OpenGL rendering expect the state to be unchanged between
frames and this is not unreasonable. So introduce saving and restoring
for all touched state, with the exception of Quick where there is no
need to waste time with this.

Change-Id: Ib79039e80993ab5fc8368357fc1147ee7863d055
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
2015-08-06 07:30:50 +00:00
Topi Reinio
5677176d76 qdoc: Don't use QStringLiteral in string comparisons
Using QStringLiteral to compare strings performs poorly
compared to QLatin1String.

These cases were previously fixed by commit 1a5c0b26, but
some were reintroduced with new commits to QDoc.

Change-Id: I272376052e876d88817606deb0a6dda92867dcbf
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2015-08-06 07:03:35 +00:00
Thiago Macieira
01f3530650 Don't check if Pentium's CPUID leaf 1 exists
It does. When CPUID was introduced in late 486, it already supported
leaf 1. That means all Pentium-class systems (including Intel's new
Quark systems) have CPUID and they have at least leaf 1.

Change-Id: Ib306f8f647014b399b87ffff13f1d5d2530d9ddd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-08-06 04:53:44 +00:00
Thiago Macieira
f549916d18 Doc: update QDebug documentation to talk about the escaping
Task-number: QTBUG-47316
Change-Id: Ib306f8f647014b399b87ffff13f303badb2a7a63
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-08-06 04:53:41 +00:00
Thiago Macieira
644ac04af0 Change how QDebug escapes QStrings in the output
[ChangeLog][Important Behavior Changes] QDebug output for QStrings
changed compared to Qt 5.5.0 to more closely match the output of
previous Qt versions. Like Qt 5.5.0, QDebug will escape non-printable
characters, the backslash and quote characters, but will no longer
escape the printable characters.

Task-number: QTBUG-47316
Change-Id: I52dd43c12685407bb9a6ffff13f62ef68cbc80c5
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2015-08-06 04:53:38 +00:00
Thiago Macieira
007ad9e859 FreeBSD has pipe2, so enable it in forkfd.c
Change-Id: Ib056b47dde3341ef9a52ffff13efd1a15748e44d
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2015-08-06 04:53:35 +00:00
Thiago Macieira
84e1bb4951 Fix warnings about unused variables
Found by ICC
qglengineshadermanager.cpp(427): warning #177: variable "none" was declared but never referenced

Change-Id: Id3d5c7bf4d4c45069621ffff13f758ffaf1744d7
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
2015-08-06 04:53:33 +00:00
Andrew Knight
c17134e2db winphone: Remove old code
The platform message dialogs are always used on WP.

Change-Id: If55e1ea804981201fded796adaaf11eb17bc5050
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2015-08-05 19:54:08 +00:00
Andrew Knight
18c4a08623 winphone: Remove old non-DirectWrite code
Since 8.1, DirectWrite is always used on WinRT platforms.

Change-Id: I742e4a48be6c478a62c16a32cf89852b850aff9d
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2015-08-05 19:54:03 +00:00
Laszlo Agocs
4a552d95f6 Avoid multisampled contexts in QOpenGLWidget
as it is not needed at all. Multisampled FBOs do not need multisampled
configs.

What's more, this fixes crashing Mesa with Intel and EGL, where creating
a pbuffer for a config with multisampling simply crashes. (and due to
other issues we disable surfaceless QOffscreenSurface for Intel so
the pbuffer cannot be avoided)

Task-number: QTBUG-47509
Change-Id: I3ae3fae8513a6dc64ca4ab11c61d4777c6c09cec
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
2015-08-05 18:18:56 +00:00
Frederik Gladhorn
4067bbc24c Fix shortcut handling with modifiers
Since d7ca800a87 the shortcut events were
only sent once. The one sent by QGuiApplication did not create a
QKeyEvent with the full native modifier state - basically the extended
key event expected everywhere.
That means that shortcuts on some keyboard layouts - like ctrl-shift-7 on
the German keyboard (resulting in ctrl+/) - would not work when the
shortcut override was tested from QGuiApplication, but then the same shortcut was
sent from QApplication with the full information, so it worked the
second time. Shortcuts of this type in Qt Quick were broken before.

Task-number: QTBUG-47062
Change-Id: I8390b9a96d0d998a2a538ac65503702e0d299cc7
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
2015-08-05 16:15:05 +00:00