- 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>
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>
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>
A friend operator was declared as a friend in the private part of the
class. qdoc thought this meant the operator should be private and
therefore should not be documented. But the friend operator should be
documented, despite being declared in the private part of the
class. This update changes qdoc so that it always treats a friend as
public.
Change-Id: I7f8bcf0c0fdffd32f67041f7d1a03eefa2a8b924
Task-number: QTBUG-46983
Reviewed-by: Martin Smith <martin.smith@digia.com>
The debug code in puredocparser.cpp and qmlvisitor.cpp was no linger needed.
Change-Id: Idac0b7afe58febb2f89cdce7928b0d806a02d67e
Task-number: QTBUG-46958
Reviewed-by: Martin Smith <martin.smith@digia.com>
Some functions in qstring.h are marked with both friend and inline,
and qdoc ignores them when it sees the friend keyword. Then, when qdoc
finds the documentation for the functions in the cpp file, it reports
an error that it can't associate the documentation with anything it
saw in a .h file.
This update corrects that problem. It also improves qdoc's parsing of
other inline functions in other files.
Change-Id: If94e403809af3ee3238eac0f2861b027197d6d3c
Task-number: QTBUG-46531
Reviewed-by: Martin Smith <martin.smith@digia.com>
Fixed a few qdoc error messages caused by errors in qmetatype.cpp and
qtextlayout.cpp and qtestcase.cpp and qpointer.cpp
Change-Id: I662aa25bedba057e125e289c34787e81793941ff
Task-number: QTBUG-46939
Reviewed-by: Martin Smith <martin.smith@digia.com>
The return value of the function is never used
Change-Id: I75e51bce36eedd42f5527ddb86efd434fe11551d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
The order of member variables is wp, xp, yp, zp. When performing
operations that touch all members, do so in declaration (=memory)
order.
Might enable autovectorization. Probably leads to slightly
better cache behavior.
Change-Id: Id9541e5a8011c349f5d24c5e9322bb232a7607b6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
These are already held in QVectors.
Change-Id: I6fe831ba5b75d792fd13e63ef0d2e178b52e1107
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Not all empty states were considered equal.
[ChangeLog][QtCore][QProcessEnvironment] Fixed a bug in
operator== involving different empty states.
Change-Id: I13c3200897847475bde2f963db0d2c587336b8a7
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Wasn't checked, and with all the mutex locking going
on under the hood, we better rule out that there's a
deadlock.
Change-Id: I5a2ef1a524fb42b7840c9f3c18395cde05b7ef28
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
And use Q_NULLPTR and the ctor-init-list.
Found while looking into QTBUG-45291.
Change-Id: Ie6db7c2ffe4e054781f0666da593df898b8000e0
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
sizeof(QLabelPrivate) only goes down from 640 to 632 (on 64-bit),
but we now have a non-conditional data member as the last member,
so the ctor-init-list doesn't look quite so ugly anymore.
Change-Id: I51f7e56d92cfcca4f35128595c829e2f3f887c72
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
...and move most of the init() code into the ctor-init-list.
Saves 176B of text size on Linux AMD64 GCC 4.9 optimized C++11
builds.
Change-Id: I6cd42e19c40a031456eaf626e32619aed1758a6c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Had to mark {,c,const}{begin,end}() inline, since they are, and mingw
complains about inconsistent dllimport attributes.
[ChangeLog][QtCore][QByteArray] Added rbegin(), crbegin(), rend(), crend(),
and reverse_iterator and const_reverse_iterator typedefs.
Task-number: QTBUG-25919
Change-Id: Id5aefb52635f029305135afcd99db0b036a7af82
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Had to mark {,c,const}{begin,end}() inline, since they are, and mingw
complains about inconsistent dllimport attributes.
[ChangeLog][QtCore][QString] Added rbegin(), crbegin(), rend(), crend(),
and reverse_iterator and const_reverse_iterator typedefs.
Task-number: QTBUG-25919
Change-Id: I1d48729c76e510c1e49c0e5dc41691aa662fdf21
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
ShellSDK isn't always available in WEC2013 and
sadly the define that should tell us if it is
isn't enough as the headers would be in the SDK
but the lib doesn't need to have the symbols.
Change-Id: Iccd11eafd0dbd22ee421c9a08f05bfc2fc5bdd49
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>