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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
Fix the corner case when called on empty buffer.
Change-Id: I1316de7fbe69f3db40a7fdde06336e53d82675c9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
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>
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>
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>
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>
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>
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>
This allows end users to create QSystemTrayIcons that are properly
displayed as monochrome images on OS X, which is especially important
on Yosemite and above when Dark Mode is turned on.
[ChangeLog][QtGui][QIcon] Add ability for QIcons to be marked
as template images. This allows end users to create QSystemTrayIcons
that are properly displayed as monochrome images on OS X, which is
especially important on Yosemite and above when Dark Mode is turned on.
Task-number: QTBUG-42109
Change-Id: I095fb71355ffa572d0abb4769341f68b89b877c4
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
They are held in QStack, thus QVector.
Change-Id: I0673b68632b384d6428e881e24ff830d12aecfab
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
The latest version of Haiku provides the implementation
for pthread_condattr_setclock, so we can enable the code
in QWaitCondition again to make it use the monotonic clock
correctly.
Change-Id: Ibb9ad33d873c3b34f2c516087c4e0aeac04cc83f
Reviewed-by: Augustin Cavalier <waddlesplash@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We have ownership for a reason - and there seems to be
no good reason not to accept it here.
[ChangeLog][QtWidgets][QComboBox] QComboBox::setView no longer
deletes the old view directly. It now checks the ownership first.
Change-Id: Icb5e5c0a6e9dc93c1d1c1a90ff57fbcc0786aa60
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Previously, directory nodes in the resource tree generated empty
file names in the --list output. They do not add value.
Change-Id: I04ac495ba5f57802de9796ec663c28facfee89f2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Simon Warta
It might get new features, but it probably won't so don't create
false expectations.
Change-Id: Icbdae9242822798c681f75988c968fc9e6f0d081
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Some window managers don't reparent the client window into the frame,
so the old method of calculating frame margins by the geometries of the
window and it's frame window is not suitable for them. Use it only as a
fallback.
Change-Id: Ie4d62370425effef4dd91bf27d98e3746e8a375e
Task-number: QTBUG-2280
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
Reviewed-by: Uli Schlachter <psychon@znc.in>
Its not known if the call to flush() is required in
Qt 5. It has been compiled out until now; remove it.
Change-Id: I7033e02af8ac7ea2a357d1287e368b541d1d6776
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
This is in preparation of adding -Wzero-as-null-pointer-constant (or similar)
to the headers check.
Task-number: QTBUG-45291
Change-Id: Ie14e5280c430b6a254f8f686534450c1e5995374
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Saves one full iteration and memory allocation.
Change-Id: Ice527499b5f5f62bd1e47d76fdf40119948ee3a1
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
... by marking the ctors (if any) explicit and the
function-call operator const.
Change-Id: Ia65fbad0dfdccbb31d630a5501c4d6f0f5aa3623
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
They are already held in QVector.
Change-Id: Ib1266956c860ecd4671501ab12ab932a8ce9b7d6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Nuiouser.h seems to be missing in WEC2013.
But it can be re-enabled according to Gunnar,
thus disable it conditionally.
Change-Id: I01be629fc309f04d2a43a9153c124a4e332b6ed0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Gunnar Roth
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
Micro optimization, because it's called a lot.
Change-Id: I50f775b39393f1f450e09ae9dc59a77d584f3c10
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Was placed under an unrelated enum. Move it to the
correct one.
Change-Id: I0cf1ffc678c4cffae16660acde95183d5ebcad03
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
These types 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 them movable, and holding in a QVector instead.
Change-Id: I3d5cf78c1597bd1b743ed3692aaa5e2e750a85f9
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>