Commit Graph

23206 Commits

Author SHA1 Message Date
Liang Qi
4cee9928f2 Merge "Merge remote-tracking branch 'origin/5.5' into dev" into refs/staging/dev 2015-04-08 06:52:22 +00:00
Martin Smith
0d4232f531 qdoc: No longer creates empty subdirectories
qdoc was creating the scripts and used-in-examples subdirectories
whether or not there were any scripts or images used in examples.
Now qdoc creates these subdirectories only if there is something
to put in them.

Change-Id: Ied0e1b38ee28973313c68754c821b34edfd5f505
Task-number: QTBUG-44655
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
2015-04-07 19:36:38 +00:00
Marc Mutz
7064bf2b9b QErrorMessage: sort statements in ctor
This has no influence on text size, but by executing similar functions
temporally close to each other, we should make better use of the i-cache.

It's also more readable.

Change-Id: Ia211e562d798d4f16f3fd17f87f1e2cad2e0359d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-04-07 18:52:11 +00:00
Marc Mutz
b6b17c2040 QErrorMessage: streamline conditionals in done()
...to avoid checking the same conditions a second time.

Saves 32B in text size on my machine, too.

Change-Id: I0368408b9f5feb02e811dc15ade79d9796031896
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-04-07 18:52:04 +00:00
Marc Mutz
bb7b20b446 QErrorMessage: avoid some code duplication
...by using the predicate from nextPending() in the two
showMessage() functions, too, which thus become identical,
when substituting type -> QString().

Also saves around 250B in text size.

Change-Id: Ibf5d081dbec3438b7b1be4e240879e26d0455d6b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-04-07 18:51:57 +00:00
Marc Mutz
3cb7a1b957 QErrorMessage: add some strategic qMove()s
Saves 56 bytes in text size on my machine.

Change-Id: Ic92943356e0e27620346854e02c129cdfa00f894
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-04-07 07:45:50 +00:00
Marc Mutz
414dd4bf12 QErrorMessage: replace inefficient QQueue with std::queue
QQueue is-a QList, so it inherits the trait that types larger than
a void* cause a heap-allocation when inserted, which is horribly
inefficient.

Use a std::queue instead, which, by default, is backed by std::deque.

Requires rewriting the API calls, since QQueue uses non-standard
function names.

Text and data size increase negligibly (23 and 8 bytes, respectively),
even though we're instantiating a completely new type (std::deque)
instead of QList<QPair<QString, QString>>, which is probably still
used, despite the inefficiency.

Change-Id: I9bb04a2ec32bb1b9fa2eb83780f0aaa26e872d49
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-04-07 07:45:39 +00:00
Marc Mutz
2d7128956f QErrorMessage: put local types into the unnamed namespace
Change-Id: I20f8ea7dc95fdecc4bb1190fb8acda19d99cc234
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-04-07 07:44:29 +00:00
Liang Qi
20cac3d9c9 Merge remote-tracking branch 'origin/5.5' into dev
Change-Id: If9fd98525b6b4ca07e5e006fc98bf372a73b8a21
2015-04-06 19:10:25 +02:00
Thiago Macieira
9eb0b09abc Removed unused code on QT_STRING_UCS4 macro
This isn't defined or used anywhere else.

Change-Id: I9a75ad8521ae4e5cbbe5ffff13d2356883b82dbc
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2015-04-05 19:40:04 +00:00
Marc Mutz
8ce85d74b6 qppdprintdevice.h: Don't rely on indirect includes
Change-Id: Ib8c2c308cf360b2e3c530ef38249af10ededc44c
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-04-05 17:03:19 +00:00
Marc Mutz
274677a3cb qgtk2dialoghelpers.h: Don't rely on indirect includes
Change-Id: I78e519e32bf3f40e742030926f8dd32a9a7e11a2
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-04-05 17:03:11 +00:00
Marc Mutz
b5a3a02d51 QString::section: scope a variable better
Improves code clarity.

Change-Id: If77eb644b1505c84783c907333526a4f08bb75a9
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-04-05 17:02:37 +00:00
Marc Mutz
f1530d0be1 Optimize QString::section(QString)
The port from split() to splitRef() speeds up typical section()
calls (where the separator is included) by ca. 1/3.

The complete truth includes that section() calls where the
separator is not found seem to have gotten twice slower.
But that's a corner-case.

Change-Id: I7e957cb65fccfd095ac522d523aef3464425e4e4
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-04-05 17:02:30 +00:00
Olivier Goffart
f02b849e97 Add Q_DECL_RELAXED_CONSTEXPR to QChar
Change-Id: I7c5a951bcd952ce5c1aaa62e107a800d49038f22
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-04-05 16:58:25 +00:00
Marc Mutz
be67eccc26 QChar: plaster API with Q_DECL_NOTHROW
This is mostly straight-forward, but some things are worth noting:

1. Yes, this is necessary. The noexcept operator looks for noexcept tagging,
   not at the contents of the function to determine whether to return true.
   The more conditionally-noexcept functions are used, the more important it
   becomes that low-level classes are correctly marked noexcept. In that, it
   is like constexpr.
2. The decomposition() functions, returning a QString, can throw (bad_alloc).
   Consequently, they're not marked nothrow. they're the only ones.

Change-Id: Iae50283aaa2d0596a265b7e2652c9fb04cedc706
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-05 16:58:14 +00:00
Marc Mutz
947da471f7 QChar: move definitions of inline methods into the class body
This hopefully prevents buggy compilers from choking on the definitions
outside the class as inconsistent, even though they are consistent.

Also helps developers, as the rather lengthy attribute lists for
C++11 functions does not need to be repeated.

This is in preparation of plastering the QChar API with Q_DECL_NOTHROW.

I had to keep operator== and operator< outside the class because
Clang on OS X 10 didn't find it when called with types implicitly
convertible to QChar.

Change-Id: I8bd634bc756d1bf5d208d7a2ce7e7ded73c4ce56
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-05 16:58:04 +00:00
Marc Mutz
cc164f9ac7 QVarLengthArray: add {const_,reverse_iterator}, {c,}r{begin,end}()
[ChangeLog][QtCore][QVarLengthArray] Added rbegin(), crbegin(), rend(), crend(),
and reverse_iterator and const_reverse_iterator typedefs.

Task-number: QTBUG-25919
Change-Id: Ifda5d420802a3594c3181f54036279f16a7da16e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-05 16:57:49 +00:00
Marc Mutz
f276dd5b7f QVarLengthArray: add relational operators <,<=,>,>=
std::vector has them, too.

[ChangeLog][QtCore][QVarLengthArray] Added relational operators <, <=, >, >= if the element
type supports operator<.

Change-Id: I69e16d361fd4738a56b292ebfa78316d28871eda
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-05 16:57:44 +00:00
Marc Mutz
f7b5f0cfd2 QList: add {const_,reverse_iterator}, {c,}r{begin,end}()
[ChangeLog][QtCore][QList] Added rbegin(), crbegin(), rend(), crend(),
and reverse_iterator and const_reverse_iterator typedefs.

Task-number: QTBUG-25919
Change-Id: Icce870c22931e68cdcedd1519651bfa374ac44af
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-05 16:57:41 +00:00
Marc Mutz
dfb00bd479 QList: add relational operators <,<=,>,>=
std::vector has them, too.

[ChangeLog][QtCore][QList] Added relational operators <, <=, >, >= if the element
type supports operator<.

Change-Id: Id2bd905e92c0365ad9f439d49908045c8df309c3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-05 16:57:37 +00:00
Alex Trotsenko
a03c633e4f Virtualize options setting on TCP server socket
Currently, socket options setting is hardcoded in QTcpServer::listen()
function after the engine initialization and before a binding to the
address. This disallows a socket tuning in further QTcpServer inheritance.

Add a private virtual configureCreatedSocket() method that gives an
ability to set the socket options before listening.

Change-Id: Ice9b477e64f21daee96c0ec6d27a8408f9e1aa93
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-05 15:00:01 +00:00
Olivier Goffart
70d4b35b93 QStyleSheetStyle: do not style the moving tab of a QTabBar
QTabBar uses a palette brush on a child QWidget. But if that
widget get styled, it sets the palette on it overwriting the
existing palette.
Make sure that no stylesheet is applied to it.

[ChangeLog][QtWidgets][QTabBar] Fixed moving tab when a
stylesheet is applied.

Task-number: QTBUG-45173
Task-number: QTBUG-15128
Change-Id: I07aee0f369fa715d852556620c8e74bcffd836da
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2015-04-02 23:24:05 +00:00
Marc Mutz
c4ed23b3e0 Optimize QString::section(QReg*Exp*)
Instead of creating lots of temporary QString objects, use QStringRefs.

Together with the two other (micro) optimizations before, this speeds
up section() by up to 2x (section_regex(IPv6)).

No test has become slower.

Change-Id: I514667004f82ddc1518fe3ee699ec5fbf96bb82f
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2015-04-02 19:30:29 +00:00
Marc Mutz
4bd81e0b82 Add missing QString::prepend(QStringRef)/(const QChar*,int) overloads
QString::append(QStringRef) exists, and so should prepend().
QString::append(const QChar *,int) exists, and so should prepend().

[ChangeLog][QtCore][QString] Added prepend(QStringRef) and prepent(const QChar *, int) overloads.

Change-Id: I3eca41045f7c481be473507e23e92690f3ed7ba3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2015-04-02 19:30:05 +00:00
Marc Mutz
2a15c83c90 Add QString::insert() overloads for QStringRef, const char*, QByteArray
The corresponding QString::append() overloads exists,
and so should insert().

[ChangeLog][QtCore][QString] Added insert(int, QStringRef),
insert(int, const char*) and insert(int, QByteArray).

Change-Id: I1cf43fe8908319e2a57415945718b72e69ca0fb3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2015-04-02 19:29:54 +00:00
Marc Mutz
d543b1c3d4 tst_QString: refactor the op+= tests
... using the framework developed for testing QString::append.

Change-Id: I29011eba6438bf9b3daad354cbec4b8e2b98ed81
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-02 19:29:30 +00:00
Marc Mutz
dd350ec2e7 tst_QString: refactor the insert tests
It is tedious to test all the overloads of QString::insert,
so get the help of the compiler to do it. The framework
was originally developed for testing append.

This change showed that the insert(int, QStringRef),
insert(int, const char*) and insert(int, QByteArray)
overloads were missing. They will be added in a separate
commit.

Change-Id: I609b8a05203f8a1ea12827d1798313ace5b719f2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-02 19:29:16 +00:00
Marc Mutz
5ba36ec29e tst_QString: refactor the prepend tests
It is tedious to test all the overloads of QString::prepend,
so get the help of the compiler to do it. The framework
was originally developed for testing append.

This change showed that prepend(QStringRef) and
prepend(const QChar*, int) overloads were missing. They will
be added in a separate commit.

Change-Id: Ic3d6ad011bedc6ee7d5024094d7c3529b1b9d669
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-02 19:29:04 +00:00
Marc Mutz
ec75c0f684 tst_QString: refactor the append tests
It is tedious to test all the overloads of QString::append(),
so get the help of the compiler to do it. The framework
developed for this will be used in subsequent commits for
prepend and insert, too.

Change-Id: I89df581b6d037a5af80b34dd6b5d37ac7484c774
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-02 19:28:50 +00:00
Marc Mutz
e486d69133 QString: preserve embedded NULs when converting from QByteArray
Unearthed an off-by-one error in a QByteArray::fromRawData() call in
tst_qtextdocumentfragment. Fixed by porting to QStringLiteral.

[ChangeLog][Important Behavior Changes] All conversions from QByteArray
to QString now preserve embedded NULs. This is done in order to provide a
faster conversion from QByteArray to QString that does not involve a call to
strlen. If you need the old behavior, convert from QByteArray::constData()
instead. If you are porting from Qt 4, we suggest to make your source compile
with QT_NO_CAST_FROM_BYTEARRAY before porting to Qt 5.

Change-Id: Ibca40f503920fee6f3a5f0d74a04b38b8849796f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-02 19:28:31 +00:00
Marc Mutz
6f145707eb QString::from{Utf8,Latin1,Local8Bit}(QByteArray): preserve nullness of argument
Currently, calling these functions with a null QByteArray will return
a non-null QString because QByteArray::data() never returns nullptr.

This behavior leads to inconsistencies between QString::append overloads,
in particular the QByteArray vs. all others (null + null test always
returns a null QString, except for the QByteArray overload before this
change).

It also is inconsistent with the const char* overloads of these methods,
which explicitly preserve nullness (as verified by test cases).

Fixed by an explicit check for nullness and return of null QString.

Alternative would have been to check for nullness and pass nullptr
instead of ba.data() to the _helper() functions, which do the correct
thing in that case. But since we'd have the check anyway and with the
chosen strategy we can avoid a call to a non-inline method, I opted
against that.

[ChangeLog][QtCore][QString] fromLatin1(), fromAscii(), fromUtf8() and
fromLocal8Bit() now return a null QString when called with a null
QByteArray.

Change-Id: I5f2c0bad27fb73c7d535085af0271823bf6ed1da
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-02 19:28:18 +00:00
Marc Mutz
ffedd0cf64 QVector: add {const_,}reverse_iterator, {c,}r{begin,end}()
[ChangeLog][QtCore][QVector] Added rbegin(), crbegin(), rend(), crend(),
and reverse_iterator and const_reverse_iterator typedefs.

Task-number: QTBUG-25919
Change-Id: I8dea52a08e7b1a4442e034c22b83be4d25dc2303
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-02 18:49:28 +00:00
Marc Mutz
34c6fbf846 QVector: add relational operators <,<=,>,>=
std::vector has them, too.

[ChangeLog][QtCore][QVector] Added relational operators <, <=, >, >= if the element
type supports operator<.

Change-Id: I0bcb22dfcc43cb0362f17b4e06154ce18646580a
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-02 18:49:20 +00:00
Samuel Gaist
929cc27ffe Add QRegularExpression based regexp tool
Currently only the QRegExp based regexp tool is available to help build
regular expression. This patch aims to add the equivalent that use the
new QRegularExpression class.

Change-Id: Ie5f711640b32a6d10ce44d2c7795062c1aacce3f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-04-02 13:19:30 +00:00
Pino Toscano
da8c3e5807 Hurd: Implement QStorageInfo for Hurd
Make use of the Linux implementation for Hurd as well, as the mntent API
is available there too (including getmntent_r, specific to GNU libc).

Since PATH_MAX is not available on Hurd, and the current bufferSize is
a lot more larger than it is needed, restrict bufferSize to 1024 bytes,
which should be enough to cover 3 paths in mtab and it is usually used
also in other projects.

Change-Id: Ied43be2ab1eb95b48eb9f55a92064e7549efaefd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-02 08:37:21 +00:00
Liang Qi
0e6ee136c9 Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
	src/testlib/qtestblacklist.cpp
	src/widgets/accessible/qaccessiblewidgets.cpp

Change-Id: If032adb9296428f62384ed835dbf41ee7a0b886c
2015-04-01 09:10:26 +02:00
Martin Smith
17294c5e4d doc: Correct error in QProxyStyle() doc.
Constructing the QProxyStle object with a null QStyle
pointer causes the QProxyStyle to use the default native
style.

Change-Id: If624ed7a805aef839ca8a51242d12b2f6d777e83
Task-number: QTBUG-42231
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
2015-03-31 07:13:26 +00:00
Thiago Macieira
00f5d26499 Make Creator happy with qobjectdefs_impl.h parsing
This is just so the Q_COMPILER_xxx macros get defined properly.

Change-Id: Iee8cbc07c4434ce9b560ffff13d066aa0a8671cc
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-03-31 07:05:47 +00:00
Thiago Macieira
26edd5a3b1 Use QStringLiteral where applicable in QtDBus
Move to qdbusutil_p.h the string constants that are used often and in
multiple places; use QStringLiteral in qdbusintegrator.cpp for the
strings that are used often.

Change-Id: I8e1325b9ba015bda91bf01c42175d8032ea32f62
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-03-31 06:50:42 +00:00
Thiago Macieira
418869d915 Autotest: fix incorrect test message ignoring
Commit 748abf9347 changed the message, but
the CI either did not run the QtDBus tests when integrating or it
ignored the results.

Task-number: QTBUG-45317
Change-Id: Iee8cbc07c4434ce9b560ffff13d058f21b73ac05
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net>
2015-03-31 06:50:16 +00:00
Kai Koehne
635f95846e Windows: Fix QT_NO_OPENGL build
Change-Id: Ieb99dce5389c37fb28a28691c75bf879740398e1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-03-31 06:27:23 +00:00
Shawn Rutledge
641b8d2b84 xcb: set WM_NAME window property
Some older window managers and utilities still ignore _NET_WM_NAME.

Task-number: QTBUG-42209
Change-Id: Iff93c8188a0a73b04cdf361add153cd818ac670f
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Martin Gräßlin <mgraesslin@kde.org>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-03-31 06:15:09 +00:00
Shawn Rutledge
be242ed094 D-Bus system tray: emit activated on middle and right click
The ActivationReason provides the type of click.  If the icon has a
D-Bus menu, then QStatusNotifierItemAdaptor::ContextMenu will not be
called: the tray is responsible for opening the context menu.  But
an application can alternatively do something different with a
right-click by not providing a menu, and instead handling the
QSystemTrayIcon::activated signal with the Context reason.
Simplified the code by emitting the signal directly in
QStatusNotifierItemAdaptor.

Task-number: QTBUG-44929
Change-Id: Ia062a9a2fd99554418d58a1ff6ecd4e862035198
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-03-31 06:14:53 +00:00
Shawn Rutledge
0e55d8dfad D-Bus system tray: emit QPlatformSystemTrayIcon::activated on click
This was incomplete functionality in
38abd65377

Task-number: QTBUG-44929
Change-Id: I7120a3de011c5df57ef5a9fbdfe056eee42d572b
Reviewed-by: Marco Martin <mart@kde.org>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-03-31 06:14:28 +00:00
Thiago Macieira
9212244294 Fix running of dbus-send on some systems
It was printing the following error:

arguments to dbus_validate_bus_name() were incorrect, assertion "name !=
NULL" failed in file dbus-syntax.c line 248.
This is normally a bug in some application using the D-Bus library.

Change-Id: Iee8cbc07c4434ce9b560ffff13d0586189ba3a79
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-03-31 05:55:55 +00:00
Shawn Rutledge
509f77cca2 D-Bus tray icon menus: support submenus
In this case GetLayout will be called with the D-Bus menu ID of the
menu item which contains the submenu.

Task-number: QTBUG-45191
Change-Id: Ia8108272910eac10f040db5865ec4e070da80edb
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-03-30 22:01:16 +00:00
Thiago Macieira
ffc74e6d70 Use Q_NULLPTR for the null pointers used in macros
User code should build with -Werror=zero-as-null-pointer-constant

Task-number: QTBUG-45291
Change-Id: Iee8cbc07c4434ce9b560ffff13d0031979b4c2fe
Reviewed-by: Matthew Woehlke <mw_triad@users.sourceforge.net>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-03-30 21:22:20 +00:00
Glen Mabey
046f325483 Adds qFindFirstSetBit() and qFindLastSetBit().
Two new function families have been added: qFindFirstSetBit() and
qFindLastSetBit() for a variety of integer sizes.  Fast implementations
are included for most platforms.

[ChangeLog][QtCore][QtAlgorithms] Added qFindFirstSetBit() and
qFindLastSetBit().

Change-Id: I89d9d1637ea26070aee5a60be95be1b51bfc84dc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-03-28 00:05:50 +00:00
Timur Pocheptsov
5e9f7b9579 Cocoa integration - menus and Qt::Tool windows
If an app has only Qt::Tool window(s) at start,
menu is not updated, since Qt::Tool is also
a Qt::Popup (included) and we have a special logic for
Qt::Popup in QCocoaMenuBar::updateMenuBarImmediately.
Using QCocoaApplicationDelegate (ivar 'inLaunch') we
can avoid this problem.

Change-Id: Ie1c4ef241cd19fa0af93c54de2b36e6e932cb77c
Task-number: QTBUG-32539
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2015-03-27 15:31:40 +00:00