Commit Graph

27131 Commits

Author SHA1 Message Date
Tony Sarajärvi
12705f70c9 Blacklist a font dialog test that fails
This test has failed already in openSUSE 13.1 where
it has been marked as insignificant. Incorrect font
size is returned from a font dialog in tst_qfontdialog.

Task-number: QTBUG-46056
Change-Id: I7b5841e90d4cbe9d9573b46ec7dec64432160473
Reviewed-by: Akseli Salovaara <akseli.salovaara@theqtcompany.com>
2016-02-26 10:57:50 +00:00
Tony Sarajärvi
78904a38f6 Blacklist tst_QStyleSheetStyle::hoverColors as it is flaky
Task-number: QTBUG-51400
Change-Id: I29793b2da26951ace3a32df7e5e0d0a2dfdac759
Reviewed-by: Akseli Salovaara <akseli.salovaara@theqtcompany.com>
2016-02-26 10:57:45 +00:00
Jake Petroules
fcfe2a5f67 Also search the main bundle plugin path for plugins on Apple OSes.
The default value of QLibraryInfo::PluginsPath is $prefix/plugins,
where $prefix is the path to the bundle's contents directory
(for example, .../foo.app/Contents/ on OS X, or .../foo.app/ on iOS).

On Apple platforms the directory is actually called "PlugIns".
Plugins could previously be loaded on OS X by coincidence, but
if the system is using an HFS+ Case Sensitive filesystem (and this
is ALWAYS the case on iOS-like operating systems), the case
mismatch would cause plugins in an application bundle not to be
found/loaded.

This change allows plugins to be located in application bundles
on Apple platforms regardless of the HFS+ case sensitivity mode
and without needing to specify a qt.conf file.

Change-Id: Ie0a0f7448fbf5fb410aa77944ba0d01895bb05e3
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-02-25 16:52:38 +00:00
Liang Qi
3ed944b843 Merge "Merge remote-tracking branch 'origin/5.7' into dev" into refs/staging/dev 2016-02-25 12:23:23 +00:00
Liang Qi
5439451def Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	mkspecs/features/qt_module.prf
	src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm

Change-Id: I7912c23b02b186831f0e465dbe5d1f9936205439
2016-02-25 09:55:25 +01:00
Tony Sarajärvi
d8f4d4452d Adjust tst_qabstracttextdocumentlayout for border cases
OpenSUSE 42.1 failed this case for some reason. With this change
the test tests the anchor from the middle of the string instead
of looking for it from the end.

Task-number: QTBUG-51345
Change-Id: I2fc7496399f46926f261c7a1f48756bfaf782f7b
Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-02-25 07:37:49 +00:00
Anton Kudryavtsev
97965a0908 QtGui: use reserve to optimize memory allocation.
Change-Id: I34a571b67840557de19ab496cadebd698c7f4f6a
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-02-25 04:56:31 +00:00
Marc Mutz
8dc024adc6 QtCore: replace QStringLiteral with QLatin1String when appending
It makes little sense to use QStringLiteral for strings which are
immediately appended to, or which are appended to other strings,
because no dynamic memory allocation is saved by doing so. But if
the only advantage of QStringLiteral does not apply, all its
disadvantages dominate, to wit: injection of calls to qstring dtor,
non-sharability of data between C strings and QStringLiterals and
among QStringLiterals, and doubled storage requirements.

Fix by replacing QStringLiteral with QLatin1String.

Saves 1156B in text size on stripped optimized Linux AMD64 GCC 4.9
builds.

Change-Id: If805e431f570ec1d2ac62c548f516f1b17390c3a
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-02-25 02:21:07 +00:00
Jake Petroules
4e551aeb0e qmake: Fix name of header-only modules when doing simulator builds.
This solves an issue where header only modules in a simulator build with
frameworks on Apple platforms would result in a module like
"QtZlib_iphonesimulator.framework" being created. This patch removes
the "_iphonesimulator" infix from the name.

Change-Id: I60e818042d776cc6ac430413ccea1be1a1a1e48b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-02-25 01:16:52 +00:00
Jake Petroules
c5001b9db3 qmake: Fix unwanted concurrency in simulator_and_device builds.
Change-Id: Ia73fe903e5157fb1262878ede1fb1cc1af1c80f4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-02-25 01:16:48 +00:00
Marc Mutz
8b5651eb41 QtNetwork: don't use Boyer-Moore for single-character needles
Using Boyer-Moore for single-character search strings makes
no sense since there can be no skipping beyond the normal
sequential search anyway.

So, port to QByteArray::indexOf(char).

Change-Id: I848e2ceea5ceafd0ebae402798b410f682348a75
Reviewed-by: Richard J. Moore <rich@kde.org>
2016-02-24 23:29:48 +00:00
BogDan Vatra
3376e67abe Perfect (almost) Qt on Android splash screen.
There is no need to show the splash image immediately when the
application starts, because it will be removed shortly in
QtActivityDelegate.java, therefore show the splash in
QtActivityDelegate.java.
This patch also adds a new option to AndroidManifest.xml which keeps
the splash screen visible until user to decides to hide it,
by using the QtAndroid::hideSplashScreen() function.

Change-Id: I8a29a5a757d626c4c9d6a2748a60ca3091ebf82d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2016-02-24 17:19:38 +00:00
Marc Mutz
c05f2985eb QMimeTypeParser: scope a variable better
The variable being a QVector, this means replacing
default construction followed by one move-assignment
per loop iteration with a StartElement state with
RVO-catching a return value.

Saves ~320b in text size on optimized GCC 5.3 Linux
AMD64 builds.

Change-Id: I618d31ad0816f9ad1a89a6b2e39481258f1e0878
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-02-24 17:14:30 +00:00
Marc Mutz
aca859cbc4 QMimeTypeParser: don't use the heap to create QMimeMagicRules
The function createMagicMatchRule() returned a heap-allocated
QMimeMagicRule, and the caller code did not check the return
value for nullptr, but copied the rule into a container before
deleting the original again.

Fix by returning by-value instead. Every C++ compiler will
use RVO for this. On top, add an optimistic std::move()
when inserting the rule into the container (currently QList,
so no rvalue-push_back, yet).

While touching the return value, also remove an unholy
out-parameter with just local effects by returning a Result
struct instead. The rest of the code remains full of out-
parameters, of course.

Add one Q_UNLIKELY and two qUtf16Printable() as drive-bys.

Saves ~300b in text size on optimized GCC 5.3 Linux AMD64
builds.

Change-Id: I4374ab41f38502cd5c64ac37d106ca4bc6e00327
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-02-24 17:14:25 +00:00
Marc Mutz
a4dee8e274 QMimeTypeParser: use QStringBuilder more
Replace QString::arg() with QStringBuilder, use QStringLiteral
where appropriate, and remove it where it isn't (e.g. in
QStringBuilder expressions).

Saves ~750b in text size on optimized GCC 5.3 Linux AMD64 builds.

Change-Id: I2471c849db79f477677213f9a155053248800590
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-02-24 17:14:20 +00:00
Marc Mutz
71b106ab43 QMimeTypeParser: use QStringRef more
Keep the return values of QXmlStream*::value() around as QStringRefs
for as long as possible. Avoids conversions to QString, among other
things, for:

- comparison to another string
- conversion to int
- conversion to UTF-8 or Latin-1 byte arrays

Add a pair of Q_UNLIKELY as a drive-by.

Saves ~900b in text size on optimized GCC 5.3 Linux AMD64 builds.

Change-Id: I17d440a11aeb8675979483f89e66d0a088ccc605
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-02-24 17:14:15 +00:00
Marc Mutz
215bda50f9 QtGui: replace QStringLiteral with QLatin1String when appending
It makes little sense to use QStringLiteral for strings which are
immediately appended to, or which are appended to other strings,
because no dynamic memory allocation is saved by doing so. But if
the only advantage of QStringLiteral does not apply, all its
disadvantages dominate, to wit: injection of calls to qstring dtor,
non-sharability of data between C strings and QStringLiterals and
among QStringLiterals, and doubled storage requirements.

Fix by replacing QStringLiteral with QLatin1String.

Saves 104B in text size on stripped optimized Linux AMD64 GCC 4.9
builds.

Change-Id: I36b6a9bb1963b69361cc3a3db0971e1db92f0080
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-02-24 17:14:12 +00:00
Marc Mutz
68a85a03f9 QtWidgets: replace QStringLiteral with QLatin1String when appending
It makes little sense to use QStringLiteral for strings which are
immediately appended to, or which are appended to other strings,
because no dynamic memory allocation is saved by doing so. But if
the only advantage of QStringLiteral does not apply, all its
disadvantages dominate, to wit: injection of calls to qstring dtor,
non-sharability of data between C strings and QStringLiterals and
among QStringLiterals, and doubled storage requirements.

Fix by replacing QStringLiteral with QLatin1String.

Saves 288B in text size on stripped optimized Linux AMD64 GCC 4.9
builds.

Change-Id: Ie632f25883163f57991264b29e8753fe4c4f738e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-02-24 17:14:07 +00:00
Mark Brand
3ca2eea00d QSqlDriver:sqlStatement: respect generated flags for WHERE too
Change-Id: I90034cd1a8dc0473c36d788c6737493a51641b02
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
2016-02-24 16:38:17 +00:00
Błażej Szczygieł
c5687704e9 xcb: Remove unneeded null pointer checks
Since a094af0017 we don't need any null
pointer checks for xcb screens.

This reverts patch 7532fb4e61

Change-Id: I8b90ed538aad4403650ef42aab6f39de5861d9ed
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2016-02-24 14:56:47 +00:00
Liang Qi
b736151c2b Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7 2016-02-24 14:47:20 +00:00
Liang Qi
1fadc7292b Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java
	src/plugins/platforms/windows/qwindowsfontengine.cpp
	src/plugins/platforms/windows/qwindowsnativeimage.cpp
	tests/auto/gui/kernel/qwindow/BLACKLIST
	tests/auto/gui/kernel/qwindow/tst_qwindow.cpp

Change-Id: I649b32b260ce0ed2d6a5089021daa0d6a8db85f7
2016-02-24 13:31:14 +01:00
Oswald Buddenhagen
b6f84ea2aa Bump version
Change-Id: Ie10f5c3a922b810b2f5b09f6ebb65aae918d30f1
2016-02-24 12:50:05 +01:00
Alex Trotsenko
ff76300a5c QRingBuffer::read(): remove unneeded byte array allocation
QRingBuffer already works fine with empty list of arrays.

Change-Id: I5cd388709686d2980efa3d5129c726e75c0b5c09
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-02-24 11:42:55 +00:00
Eskil Abrahamsen Blomfeldt
d8e65d5756 Fix font dialog with missing font family and pixel sizes
Two related errors: When a non-existent font was set on
the font dialog, the GTK native font dialog would just pick
a default one. Also, if the font size was specified with
pixel size, we would request -1 as the point size from
Pango.

The fix for both is to resolve the font before applying
it to the font dialog, and set the actually resolved family,
as well as point size. Note that if the point size is
explicitly set, then we pass this to the font dialog,
since the one returned by QFontInfo will always be
calculated based on the (rounded) pixel size, so it will
usually not match the request.

This fixes tst_qfontdialog::setFont().

[ChangeLog][GTK2][Dialogs] Fixed requesting a font from
font dialog with a non-existent family name and/or pixel
size.

Task-number: QTBUG-51148
Change-Id: Id9c783407778546b0cf3f9c3ab19f124e76c878e
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
2016-02-24 09:06:06 +00:00
Timur Pocheptsov
5ec108eb7a Cocoa integration - handle didResignKey correctly
When we receive didResignKey notification, before setting active window to
null we check that [NSApp keyWindow] is nil, but it's not. At the same moment,
[NSApp keyWindow] == windowNotification.object - so it's indeed the window that
resigned the key status, it's just NSApp keyWindow that is not nil yet.

Change-Id: Iedc85d806c7d583a2054dc4d7168af13c9c7a4e0
Task-number: QTBUG-49925
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2016-02-24 09:05:44 +00:00
Błażej Szczygieł
544bbcbcda QtWidgets: Always deliver the wheel event to submenus
When mouse events are delivered using XInput2 then the wheel event is
missing on submenus, because XInput2 delivers the wheel event only to
the root menu.

Task-number: QTBUG-50996
Change-Id: I757c0b5e3aea4606d2e45dfc8180c263e02167ca
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2016-02-24 09:03:53 +00:00
Błażej Szczygieł
7091be1b79 xcb: Deliver mouse enter event to window when closing modal window
When a modal window is closed and the mouse is not under the modal
window - find a proper window and send a fake enter event.

Added auto test for checking enter event on window when modal window
is closed.

Task-number: QTBUG-35109
Change-Id: I370b52d386503820ac9de21e6d05fd019ca456ec
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2016-02-24 09:03:14 +00:00
Eskil Abrahamsen Blomfeldt
63b5f5cb98 Disable ligatures using existing mechanism in HB, not workaround
This is a partial revert of fef629cd91.
When doing the original fix, I didn't realize that there was a
mechanism for disabling specific OpenType features in Harfbuzz.

This commit reverts the hack to disable GSUB completely and disables
the ligature features instead.

Task-number: QTBUG-44393
Change-Id: I30f0080eb3897f37219df7f2d50843f3a4556e13
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2016-02-24 09:01:29 +00:00
Friedemann Kleint
bf44f002ca Blacklist tst_QTreeView::setSortingEnabledChild() on Windows.
Task-number: QTBUG-51149
Change-Id: I7887aea5a6046353e235655665e53b5953f0854b
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
2016-02-24 08:20:11 +00:00
Anton Kudryavtsev
ea711d0f59 QPlatformWindow: don't call QScreen::virtualSiblings()
... when QT_NO_CURSOR is enabled. Then, result of this
function is unneeded.

Change-Id: I0e74e1aa5253de2608c4c18cb2c4b4e2e9f4c9e2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2016-02-24 08:11:59 +00:00
Anton Kudryavtsev
ad9340de99 QListView: avoid quadratic complexity in selectedIndexes().
Use std::remove_if(), which is linear, instead of looping
over erase(it), which turns the loop quadratic.

Reorder condition: call cheap non-virtual QModelIndex::column()
first, then virtuals parent(), and isIndexHidden().

Change-Id: Id46ee1297b91906332eeca98f69372ef887ac330
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
2016-02-24 08:06:32 +00:00
Błażej Szczygieł
57ecd5aeeb QtWidgets: Proper delivery of enter/leave event to context menus
First-level context menu grabs the mouse, so all mouse events are
delivered to it. This menu passes the mouse events to submenus. Any
platform delivers mouse enter/leave event differently when window is
grabbed. This patch unifies event delivery to context menus - it can
block some unwanted events and it emulates fake events if necessary.

This patch can reduce duplicated events and can provide proper enter
or leave event to additional widgets in the context menu. It can also
prevent submenu from unwanted close on Windows and X11.

Added autotest.

Task-number: QTBUG-45565
Task-number: QTBUG-45893
Task-number: QTBUG-47515
Change-Id: I7dd476d0be23afa34e947e54aef235012d173dcf
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2016-02-24 04:33:36 +00:00
Christian Strømme
d392826959 Make it possible to preserve the library/plugin path in tst_selftest
If QT_PRESERVE_TESTLIB_PATH is set, then LD_LIBRARY_PATH and
QT_PLUGIN_PATH won't be filtered out for the sub-tests started by
tst_selftest.

Change-Id: Ic43ba9b4d882ee36b2f7495b1c880f26aefd2629
Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
2016-02-23 21:16:44 +00:00
Dmitry Shachnev
b6a824d0a3 Add native support for D-Bus global menu
The protocol was originally developed by Canonical, currently supported
by Unity and Plasma.

Adjust some tests to use the non-native menu bar when they require it.

[ChangeLog][XCB / X11] QMenuBar uses the unified D-Bus AppMenu menubar
when the desktop environment supports it.

Change-Id: Iea74b40522573bcc4f70168fe7fa2a49b4f3fc21
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2016-02-23 20:56:07 +00:00
Timur Pocheptsov
2613317512 QCocoaFileDialog - disclose accessory view
Since 10.11 accessory view is hidden by default (making file filters invisible).
Setting accessoryViewDisclosed = YES solves this problem.

Change-Id: I140347b850645df613f6e818fab1c3d35ec0a473
Task-number: QTBUG-50086
Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
2016-02-23 14:53:42 +00:00
Dan Cape
57a1224eb3 PlaceHolderText doesn't appear in RTL
Since placeholderText was using the layoutDirection from the control,
it was always getting LTR since there was no text added yet to the
control. By calling the isRightToLeft function on the placeholderText,
we can determine if it is RTL or not and apply that when drawing the
placeholderText. A change was also made to use the proper elide mode
depending on if it is LTR or RTL.

Task-number: QTBUG-36499
Change-Id: Ic4c9cb9b41d9180185ed35492518152c1122839f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2016-02-23 14:38:59 +00:00
Eirik Aavitsland
950bb7185c Autotests: if cross-compiling, ignore dbus status on compilation host
The auto.pro file would bail out or skip based on the availability of
the session bus at qmake time. That does not make sense for cross
compilation: the session bus may be available on the target even if it
is not on the compilation host.

Change-Id: I459a518f3411acb39e8dcdad9d32ded1f9b57029
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-02-23 12:19:31 +00:00
Hannah von Reth
eadd7e9cfb Set QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO for win32-g++
The win32-g++ mkspec is not based on gcc-base, so
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO is not inherited. Therefore,
-release -force-debug-info would build with neither -O2 nor -g.

Change-Id: I4e97cb08f577062dd342fb3e91c02adfd636a310
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-02-23 07:53:50 +00:00
Friedemann Kleint
20a29fbfe8 Windows QPA: Send synthesized expose events when window shrinks.
Fix the condition to check for plain move events and gain in
one dimension in which case Windows will send events.

Task-number: QTBUG-51038
Change-Id: I60433657f37275ee302f745291e79e465d52064d
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2016-02-23 07:53:02 +00:00
Friedemann Kleint
b8f89d8ef3 Windows QPA: Use window flags stored in QWindowsWindow for frame geometry.
Querying the flags of the QWindow fails when inside
QWindowsWindow::setWindowFlags() since the new flags do not take
effect.

Task-number: QTBUG-40578
Task-number: QTBUG-51224
Change-Id: Ida8c23b64ddfde34ebc0af95c84954e666865240
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2016-02-23 07:49:39 +00:00
Simo Fält
0ac8c8698c Autotest: Blacklist tst_QFontDialog::setFont()
This test fails in distros using GNOME due to
most likely bad usage of native dialogs.

Task-number: QTBUG-51148
Change-Id: I6e539b429266e298ce413565e0191bffa7fbe6bc
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-02-23 07:30:34 +00:00
Friedemann Kleint
fc6d5ed18d QFileDialogOptions: Expose default name filter setting.
Move the bool QFileDialogPrivate::defaultFileTypes to QFileDialogOptions
as defaultNameFilters and add a static function returning the
translated default filter string. Let QFileDialogOptions::nameFilters()
return the default filter until a value has been set.

This removes the need for special handling for empty filter lists
in the QPA plugins. As a side effect, Qt Quick Controls's FileDialog
will then also default to "All files" if no filters have been set.

Task-number: QTBUG-50644
Change-Id: I9ba271a472d4fa03767b540ef6f1399f5ca4408e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
2016-02-22 09:13:04 +00:00
Topi Reinio
eec3aa499a Doc: Evaluate QT_VERSION >= QT_VERSION_CHECK(6,0,0) to false
This check is used in many places in the public header files,
and correctly documenting the affected declarations depend on
QDoc evaluating it correctly.

As QDoc currently cannot evaluate complex preprocessor
directives, work around this by explicitly evaluating
the version check to false.

Change-Id: If22eff76f6831c92375d9a0b25d04aa46422da13
Task-number: QTBUG-51262
Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
2016-02-22 08:33:57 +00:00
Samuel Gaist
6129aade00 QListWidget: setup connections when changing selection model.
QListWidget uses a set of slots for its selection model that are
connected only at creation time. This patch adds the missing
connections cleanup and setup when a user changes the selection
model.

Task-number: QTBUG-50891
Change-Id: I942bae6c471ea1ae22637d09b96d6fbd422f653f
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-02-21 20:50:18 +00:00
Friedemann Kleint
8ce7441892 QFontEngineFT: Fix Clang warning about using uninitialized variables.
gui/text/qfontengine_ft.cpp(1743,5) :  warning: variable 'bytesPerLine' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized]
gui/text/qfontengine_ft.cpp(1743,5) :  warning: variable 'format' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized]

The default branch is marked Q_UNREACHABLE, but apparently Clang does
not recognize it.

Task-number: QTBUG-50804
Change-Id: Idfce8cb2b9a481dd67a18d9952b920ad4f71e0f4
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2016-02-21 20:04:14 +00:00
Andre Somers
923be3f78c Fix small textual error in documentation for QFlags::setFlag
Change-Id: I075932cfb9fdd38fb8d54da19e7d72b8cdec49f3
Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
2016-02-21 09:09:33 +00:00
Anton Kudryavtsev
7ce90fe6fa QFileSystemModelPrivate: remove unused code
Change-Id: I83df0d0bbac66957dc06e2805acf2c47d172fed8
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-02-20 18:53:29 +00:00
Marc Mutz
a425b5f19c QWindowsGLContext: replace homebrew Array with std::vector
std::vector is all that the Array original author dreamed about,
and more: never shrinks capacity, non CoWed, ...

Appart from append(), the Array API was modeled after std::vector
(size_t size_type, etc) already, so the port to std::vector is
minimal. The only change besides append() -> push_back() was not
assuming const_iterator being const T*.

Remove now-unused Array.

Change-Id: I02bc71441d01e554e320746d82dbc00f74c5466d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2016-02-20 13:36:19 +00:00
Marc Mutz
20af1ad7ef QInputMethodEvent::Attribute: add ctor that doesn't take a QVariant
Many callers passed QVariant() as the last ctor argument.
Micro-optimize by providing an overload that default-
constructs the variant in-place.

Change-Id: I9aab40c6e5a025c9a502c706e4cc7b10879ac418
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Takao Fujiwara <takao.fujiwara1@gmail.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-02-20 13:35:55 +00:00