Commit Graph

24407 Commits

Author SHA1 Message Date
Thiago Macieira
c84625f0d5 Fix compilation with GCC 4.9.2 and up in debug mode
Somehow the const int is no longer understood to be an immediate. GCC
4.8 still compiles this fine.

qstring.cpp:316:34: error: the fifth argument must be an 8-bit immediate

Change-Id: Ib056b47dde3341ef9a52ffff13ef24d541833abc
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-15 04:53:32 +00:00
Thiago Macieira
02418d1aaa Set the state of QTemporaryFileEngine properly prior to reopening
QTemporaryFileEngine does not store the pattern, so it needs to get it
again from QTemporaryFilePrivate prior to reopening the file. It's
possible to lose the pattern when remove() is called on the object.

Task-number: QTBUG-46156
Change-Id: I66a35ce5f88941f29aa6ffff13dfc7f83d4fa3a2
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2015-07-15 04:53:30 +00:00
Thiago Macieira
ca60311a60 Fix build on FreeBSD: kinfo_getproc is in libutil
I can't find the function for NetBSD and OpenBSD. There's a good chance
QtCore simply fails to compile.

Change-Id: Ib056b47dde3341ef9a52ffff13efaff642bd7bb9
Link: http://www.freebsd.org/cgi/man.cgi?query=kinfo_getproc
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-07-15 04:53:30 +00:00
Tasuku Suzuki
7839979c07 fix running libQtCore.so failure
It fails when "program interpreter:" is translated.
./lib/libQt5Core.so: cannot execute binary file: Exec format error

Change-Id: I5154decb0401eeb1ba38b286b660b830c6136c22
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-07-15 04:53:27 +00:00
Lorn Potter
c056e63cea Make sure to report correct NetworkAccessibility
Task-number: QTBUG-46323
Change-Id: Ibdeb3280091a97d785d4314340678a63e88fb219
Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-07-15 01:55:12 +00:00
Milian Wolff
f337e22401 Optimize moc: Remove another temporary list allocation.
In the common case, macroExpandIdentifier was called in the
"not a macro" case, and a temporary vector with a single item was
allocated. Now, we catch this common case at the caller site
and put the single item directly into the result set, bypassing
the temporary list.

Change-Id: I71d92afc486ccdaae5930405d028f53f48073b8c
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-14 22:09:28 +00:00
Mitch Curtis
a889faf0b8 QDial: remove documentation for non-existent functions.
f6dd3ab553 forgot to remove these.

Change-Id: Ia10048d551b309ea3c49818ef51819c93a92c8d3
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-07-14 13:11:12 +00:00
Melanie Cappelaere
1dc96612c8 Mangle QNSApplication and methods into a namespace
[OS X] Mangle the event handle related calls on QNSApplication, so that
the events are passed through the correct QApplications when several
Qt5's with different namespaces do UI in the same process.

Change-Id: Ibb44246fbcf4a2bc3af5a93c48db0382a1380328
Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-07-14 12:48:34 +00:00
Marc Mutz
a545715c83 QSslSocket: remove code duplication
Since findAllLibSsl() and findAllLibCrypto() differ only in the
filter passed to QDir::entryList(), so Extract Method findAllLibs().

In the new function, cache the filters QStringList instead of re-create
it in every loop iteration.

Change-Id: I1bdd05e83fa1f9bb3f47b9b2ae5da9654ec1525b
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-07-13 22:28:17 +00:00
Marc Mutz
639ef6ca1a QPointer: remove user-declared empty destructor
It prevents the compiler from synthesizing move assignment
and move constructor.

Change-Id: I864d143d5a6233e45f3f2fc343a147db89559f33
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-07-13 22:27:33 +00:00
Marc Mutz
a082b41d2c QTextEngine: don't hold ItemDecoration in QList
ItemDecoration is larger than a void*, so holding it in QLists
is needlessly inefficient. Worse, the code could come to depend
on the fragile property of (inefficient) QLists that references
to elements therein never are invalidated.

Fix by marking the type movable and holding in QVector instead.

Change-Id: I06d7a77529f7cff2ba503c5e8d6e5df0ad801a21
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2015-07-13 22:27:14 +00:00
Marc Mutz
f5243c0591 QtWidgets: mark some private types movable or primitive
They are held in Qt containers or QVariant.

Change-Id: Ida1b904120d4fb53a5596f1c3cbc973bd2ca315e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-13 22:27:08 +00:00
Milian Wolff
c19e67eb73 Optimize moc: Remove temporary allocations during macro expansion.
Previously, a temporary list was allocated and then fed into the
bigger list of results. Now, we push data into the final list
directly, removing the overhead of the temporary allocation.

Change-Id: I9bea0fd3c23b1434b4be2728c60ac22a66908efc
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
2015-07-13 22:27:01 +00:00
Sebastian Schuberth
4efd2ebb27 RegistryKey: Move member variable initialization to the ctor-init-list
In cause of doubt this is more efficient, see

https://isocpp.org/wiki/faq/ctors#init-lists

This also fixes the initialization order to match the declarartion order
of the variables in the class which some versions of GCC otherwise would
complain about.

Change-Id: I642f7156d624c2c65f2f3525d813f5289c092f96
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-07-13 22:26:45 +00:00
Friedemann Kleint
0d81316dcc Use QImageReader::setAutoTransform() in examples.
Change-Id: If80616d680f1aa6c9d5cd1a4080710e5ad67d603
Reviewed-by: Rainer Keller <rainer.keller@theqtcompany.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
2015-07-13 20:16:35 +00:00
Friedemann Kleint
f1f9489d08 Windows: Fix crash when using wmain() and passing a fake argv.
Return true from isArgvModified() when  __argv is null (as is the
case when using wmain()) indicating arguments are modified.

Task-number: QTBUG-47023
Task-number: QTBUG-30330
Change-Id: I44329ed3369cd4db79ba1b7c19303895f67b1616
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-07-13 20:16:27 +00:00
Jeremy Lainé
3ebbd5db7b ssl: fix SecureTransport handling of remote host disconnect
Currently when the remote server disconnects gracefully (for example upon
returning an HTTP request with Connection: close) the call to SSLRead
will return errSSLCloseGraceful which is incorrectly reported as
QAbstractSocket::SslInternalError.

This patch aligns the behavior with that of the OpenSSL backend and instead
reports QAbstractSocket::RemoteHostClosedError.

Change-Id: I8c6679280ac0c6fbd71d5f0d29b25f692eca5b24
Task-number: QTBUG-47154
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
2015-07-13 20:15:01 +00:00
Christoph Schleifenbaum
c9dd554ea6 QComboBox: Fix compilation with QT_NO_COMPLETER
Change-Id: Ie57b06ebbddaa0801e265e6908da1548fe02085a
Task-number: QTBUG-46871
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2015-07-13 19:40:25 +00:00
Keith Gardner
17d6b2d1f0 doc: mark QVersionNumber as \since 5.6
Change-Id: Id109eb34a34504f01358080cb2c4c447e1288f03
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-07-13 10:38:31 +00:00
Marc Mutz
ed7f5375e1 QSslSocket: use function objects and algorithms when sorting library paths
The first change is to make libGreaterThan a function object.
This allows all compilers to inline the comparison into the
sort implementation.

The second change is to use QString::splitRef instead of
QString::split to extract the components.

The third is to extract the element comparison into a
function object and replace the rest of libGreaterThan
with a suitable call to std::lexicographical_compare,
rendering most code comments (present or missing) moot.

Change-Id: I3a761d721aa7cf5fa727dcc4ddca4b922f413899
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-07-13 10:38:25 +00:00
Marc Mutz
35eb5c8678 rcc: make qt_rcc_compare_hash a functor
This allows the compiler to inline the function call into the
std::sort instantiation.

Change-Id: If2b948c1d7202d6a81afd8a58cc9fab50a9709c1
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2015-07-13 10:38:11 +00:00
Marc Mutz
b3364cd8bf QLineEdit: don't hold SideWidgetEntry's in a QList
SideWidgetEntry is larger than a void*, so holding it in QList
is needlessly inefficient. Worse, the code could come to depend
on the fragile property of (inefficient) QLists that references
to elements therein never are invalidated.

Fix by marking it movable, and holding in a QVector instead.

Change-Id: Ia87b9ac634ad9386bc667355e6e236bc3d56ab29
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-13 10:38:04 +00:00
Marc Mutz
4a24de06f6 widgets: add missing qheaderview_p.h to itemviews.pri
Change-Id: I35ddca35ba7b3ef4f6587b6d4db6a58a60576e6f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-07-13 10:37:57 +00:00
Marc Mutz
ddfeae974d QAbstractItemView: don't hold QItemViewPaintPair in a QList
QItemViewPaintPair is larger than a void*, so holding it in QList
is needlessly inefficient. Worse, the code could come to depend
on the fragile property of (inefficient) QLists that references
to elements therein never are invalidated.

Fix by holding in a QVector instead (was already marked movable
as a QPair of movable types).

Change-Id: I6f4042d2df306ecf0ec576ecbc6678736268014e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-13 10:37:52 +00:00
Marc Mutz
14235ada48 QGraphicsItem: don't hold ExtraStruct in a QList
ExtraStruct is larger than a void*, so holding it in QList
is needlessly inefficient. Worse, the code could come to depend
on the fragile property of (inefficient) QLists that references
to elements therein never are invalidated.

Fix by marking it movable, and holding in a QVector instead.

Change-Id: I02f2089859c2deccf0e6c451bf80da07893cc3f0
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-13 10:37:31 +00:00
Marc Mutz
827d1ed633 QMenu: don't hold QPointers in QList
QPointer is larger than a void*, so holding them in a QList is needlessly
inefficient. Worse, the code could come to depend on the fragile property
of (inefficient) QLists that references to elements therein never are
invalidated.

Change-Id: Ia224a4fe01acc1d4ca9b57c62941dd0f37780c67
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-13 10:37:24 +00:00
Marc Mutz
53ec85637c QImageIOHandler: don't create QLists just to count their elements
Q(Multi)Map::keys() returns duplicated keys, so keys().size() will
always be the same as the map's size().

So use that directly instead of creating temporary QLists to check
the size.

Change-Id: I0600d1845e25be3b825e4ae470c1ef41a3a5d2c9
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-13 10:37:15 +00:00
Marc Mutz
cf0ddf24c0 QKeySequence: replace an inefficient QList with QVector
QModifKeyName is larger than a pointer, so holding it
in a QList is horribly inefficient.

Fix by marking it movable and using QVector instead.

The logic for filling the lists-turned-vectors is a bit
fishy in that it is not thread-safe. Maybe it doesn't
have to, it's not marked as \reentrant.

Change-Id: I8421e6d8b980eff022badfe3c61b3537783b5cfa
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-13 10:36:49 +00:00
Marc Mutz
4d7f528dde QSequentialAnimationGroupPrivate: replace an inefficient QList with QVector
ints are only half the size of void* on 64-bit, so
QVector<int> uses only 50% of per-element memory,
compared to a QList.

Change-Id: I18db97d2ec0e46ec4301e8939ac21dff558172b2
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-13 10:36:34 +00:00
Marc Mutz
a89c62c17d QStateMachinePrivate: replace an inefficient QList with QVector
QPropertyAssignment is larger as a void*, and wasn't marked as
movable, so QList<QPropertyAssignment> is horribly inefficient.

Fix by marking it movable and using a QVector.

Change-Id: I34e21e3f28f64dd8b187c144fb5bee022414216b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-13 10:36:28 +00:00
Marc Mutz
fa4b57e8c5 QPlatformFontDatabase: compress requiredUnicodeBits table
All values in the table fit into 8 bits, so don't use a
16-bit type.

Change-Id: I685727e16a264a49ea501d36eb6815c6d5aaa9b2
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2015-07-13 10:36:22 +00:00
Marc Mutz
91ab18c0c9 QKeySequence: use QKeySequencePrivate::MaxKeyCount everywhere
The MaxKeyCount symbolic constant was introduced for use by QKeySequenceEdit,
but never applied to QKeySequence itself. To prevent the two from getting
out of sync, use it in the QKeySequence implementation itself, too.

This required re-writing most expressions involving QKeySequenceEditPrivate::keys
with algorithms, but we already determined in the discussion around 1cf9a139
that GCC generates the same code as the loops unrolled by hand, and if Clang
doesn't, it's its own fault.

Where using MaxKeysCount was not possible, e.g. in documentation,
static_asserts were used to indicate the need for manual changes.

Change-Id: I559fffdfd552d488448ba4a5a1ac10708c16a2ae
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-13 10:36:10 +00:00
Marc Mutz
05bcc9d2fc qcocoahelpers: make qtKey2CocoaKeySortLessThan a function object
This allows all compilers to inline the function call into the
std::sort instantiation.

Change-Id: I3d831ee9160dd89208f42b258ff2463f942a7630
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-13 10:35:58 +00:00
Friedemann Kleint
b693900da5 Polish the widgets/mainwindows/application example.
- Introduce Qt 5 signals & slot syntax
- Use QCommandLineParser to obtain file arguments
- Merge MainWindow::createMenus()/createQToolBars()
  into MainWindow::createActions(), removing the need
  to store the actions as member variables.
  Use QMenu::addAction() for brevity.
- Use QIcon::fromTheme() to obtain system icons and use
  resource icons as fallback.
- Rewrite settings code to use
  QWidget::saveGeometry(), Widget::restoreGeometry() since
  saving size and position does not work well with multiple
  screens. Query the available size when determining
  the initial size instead of using hard-coded values
  for High-DPI screens.
- Fix minor issues in code, use multi-argument version
  of QString::arg(), QDir::toNativeSeparators() to
  present file paths to the user.
- Fix snippet references accordingly.

Change-Id: I1bc49a8913aa6d669e0e666f04be3f1f42eaba10
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-07-13 10:18:40 +00:00
Alejandro Exojo
4b17bc3497 doc: Correction in access(): signals are now public
Change-Id: I7c3ea57103a3e68ec5fadd082c11fbc0db960b0b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-12 19:47:44 +00:00
Mitch Curtis
554d54b432 Fix typo in EnterKeyType documentation.
Change-Id: I14018e20ace77e97fdb3cc0c38449802875b71c5
Reviewed-by: Kai Uwe Broulik <kde@privat.broulik.de>
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-07-11 06:31:54 +00:00
Kai Koehne
4672e319e6 Core: Replace QProcess::error signal with QProcess::errorOccurred
Make the name of the signal and the name of the getter unambiguous,
which in turn allows the easy use of Qt 5-style connects.

[ChangeLog][QtCore] Deprecated QProcess::error() signal in favor
of new QProcess::errorOccurred() one.

Change-Id: Ic5bcf7d6878e6985f1b4fed9dbe247527d13758c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-07-10 18:31:38 +00:00
Friedemann Kleint
a299ae3dc4 Fix some qdoc-warnings.
qtbase/src/corelib/io/qdatastream.cpp:501: warning: Undocumented enum item 'Qt_5_6' in QDataStream::Version
qtbase/src/corelib/itemmodels/qitemselectionmodel.cpp:1764: warning: Undocumented parameter 'model' in QItemSelectionModel::setModel()
qtbase/src/corelib/statemachine/qabstractstate.cpp:216: warning: Undocumented parameter 'active' in QAbstractState::activeChanged()
qtbase/src/corelib/statemachine/qstatemachine.cpp:3262: warning: Undocumented parameter 'running' in QStateMachine::runningChanged()
qtbase/src/corelib/tools/qchar.cpp:160: warning: Undocumented enum item 'Unicode_7_0' in QChar::UnicodeVersion
qtbase/src/gui/image/qimagereader.cpp:1168: warning: Undocumented parameter 'enabled' in QImageReader::setAutoTransform()
qtbase/src/gui/image/qimagewriter.cpp:621: warning: Undocumented parameter 'transform' in QImageWriter::setTransformation()
qtbase/src/gui/itemmodels/qstandarditemmodel.cpp:1268: warning: Undocumented parameter 'tristate' in QStandardItem::setAutoTristate()
qtbase/src/gui/kernel/qscreen.cpp:590: warning: Undocumented parameter 'orientation' in QScreen::orientationChanged()
qtbase/src/gui/kernel/qscreen.cpp:599: warning: Undocumented parameter 'orientation' in QScreen::primaryOrientationChanged()
qtbase/src/gui/text/qtextdocument.cpp:1455: warning: No such parameter 'from' in QTextDocument::find()
qtbase/src/gui/text/qtextdocument.cpp:533: warning: Undocumented parameter 'option' in QTextDocument::setDefaultTextOption()
qtbase/src/widgets/itemviews/qtableview.cpp:2546: warning: Undocumented parameter 'enable' in QTableView::setSortingEnabled()
qtbase/src/widgets/statemachine/qkeyeventtransition.cpp:119: warning: Undocumented parameter 'key' in QKeyEventTransition::setKey()
qtbase/src/widgets/widgets/qplaintextedit.cpp:1610: warning: Can't link to 'toText()'
qtbase/src/opengl/qgl.cpp:4371: warning: No documentation for 'QGLWidget::event()'

Remove the documentation as they are properties:
qtbase/src/widgets/widgets/qfontcombobox.cpp:407: warning: Undocumented parameter 'font' in QFontComboBox::setCurrentFont()
qtbase/src/widgets/widgets/qfontcombobox.cpp:403: warning: Undocumented parameter 'script' in QFontComboBox::setWritingSystem()

Change-Id: If599a3ce747bbb8a3418dd973810923b87246371
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
2015-07-10 18:01:39 +00:00
Martin Smith
19751d368a qdoc: Add the noautolist command to qdoc
This update adds the \noautolist command to qdoc.
This command can be used in the qdoc comment for
a \module or \qmlmodule to tell qdoc not to write
the automatic annotated list of C++ classes or
QML types to the HTML page because the documenter
has listed them manually. The qdoc manual is also
updated to include the \noautolist command.

Change-Id: I2eac5ceebfcd83a41bca7384b3da038fffbe6e66
Task-number: QTBUG-46821
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-07-10 18:01:38 +00:00
Friedemann Kleint
a6b0ac266c Remove documentation of QTextCodec::setCodecForTr().
This function has been removed. Fixes documentation warning:

qtbase/src/corelib/codecs/qtextcodec.cpp:1160: warning: Cannot find 'setCodecForTr(...)' in '\fn' QTextCodec::setCodecForTr ( QTextCodec * c )

Change-Id: I8d17705291b414d9c27827af4248bbf9e090962e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-07-10 18:01:34 +00:00
Marc Mutz
e4fa9a1fcd QDBusObjectPath / QDBusSignature: add missing =0 on qHash seed argument
Change-Id: I68396e319d9204f7e1e9ef8562ffefa7db565057
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-07-10 17:31:33 +00:00
Frederik Gladhorn
a2c829f339 Disable spdy test on Windows
The test is crashing regularly (see bugreport).
Currently the test is not run in the regular CI system, that is why
the failures were not noticed.

Task-number: QTBUG-47128
Change-Id: I70d4ada0872316cc63d7629bb9ab2d055d70cf2a
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-07-10 16:38:07 +00:00
Alex Trotsenko
964d767976 QRingBuffer::reserveFront(): do not leave empty array in buffer list
Fix the corner case when called on empty buffer.

Change-Id: I1316de7fbe69f3db40a7fdde06336e53d82675c9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-07-10 16:34:53 +00:00
Milian Wolff
a576ef4c3d Optimize moc: Implement fast operator== for Symbols.
Previously, this allocated temporary QByteArrays in the frequent
QVector<Symbols>::indexOf calls (macro.arguments.indexOf(s)).

Now, the we reuse the fast SubArray::operator== implementation.

Change-Id: Idbc6e3cf5fd353e8e36d51ba88d31e4c3bfd121d
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-10 12:42:59 +00:00
Marc Mutz
58f0b6b5a8 qdoc: don't hold ParsedParameter in a QList
ParsedParameter is larger than a void*, so holding it in QList
is needlessly inefficient. Worse, the code could come to depend
on the fragile property of (inefficient) QLists that references
to elements therein never are invalidated.

Fix by marking it movable, and holding in a QVector instead.

Change-Id: I5b1bea9ef7b796a790d8e86404531ae19a4aca66
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-07-10 12:21:07 +00:00
Marc Mutz
32a5026f36 QtDBus: replace some inefficient QLists with QVector
QDBusIntrospection::Argument and the QPair are larger than a void*, so holding
them in QLists is needlessly inefficient. Worse, the code could come to depend
on the fragile property of (inefficient) QLists that references to elements
therein never are invalidated.

Fix by marking the types movable, if not already done, and holding them in
QVector instead.

Change-Id: I1cf88287cc3a1d87e1fcd5061ed8d6d19d2f0722
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-07-10 12:21:02 +00:00
Friedemann Kleint
4018cd3529 Add support for PNG to QWindowsMimeImage::convertFromMime().
GIMP asks for image data in PNG format when doing a "paste" which
was previously handled only in convertToMime(). Add handling
to convertFromMime() and register format.

Task-number: QTBUG-46848
Change-Id: Ib11de27d301c8632869c7276e421e48e4f34e1d0
Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
2015-07-10 04:11:03 +00:00
Friedemann Kleint
3719744b39 Windows XP style: Pass widget to XPThemeData.
Previously, 0 was passed which causes QWindowsXPStylePrivate::winId() to
go on a hunt trying to find a window handle needlessly looping over top
levels, slowing down painting.

Task-number: QTBUG-42245
Change-Id: Ic702d9a73c4f749fd5988950280aef632a3308c4
Reviewed-by: Marko Kangas <marko.kangas@theqtcompany.com>
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
2015-07-10 04:09:43 +00:00
Keith Gardner
6094ae1ff5 Added QVersionNumber to QtCore's public API
[ChangeLog][QtCore] Added QVersionNumber.

Change-Id: I11acc1fae3dc9368a72593afcfa2e462c53a620e
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Keith Gardner <kreios4004@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-07-10 00:47:03 +00:00
Frederik Gladhorn
8c7a9bfbbc Do not support static QIcon instances
There was an attempt to allow static instances of QIcon in
7727a4355876607a1a022ff54e2570dae883f79c (Qt 4). This patch does only
solve some of the corner cases and broke with
aa5f70c00a. Since the "breakage" has been
there for two years, let's officially declare it unsupported instead of
trying to work around the issue.

Change-Id: I61e12fd03953763ee2e70eae58bcaecabdcb85b8
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-09 10:53:29 +00:00