order is either Ascending or Descending (0 or 1), so this comparison is
unnecessary.
Change-Id: Ieceacf18f1bf3c7a7555205a140b738daa92bd04
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Ask for an uninitialized byte array, since we're about to memset(3) it
anyway. And don't overwrite the initial byte either.
Change-Id: I2caa2ef395ad5684416e6cd336c0444de7787b5d
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
It took me several minutes reading the code to figure out why it was
there. It wasn't immediately obvious.
Change-Id: Ic36b3fd24ce84a1b08c73986d3b7ab8a5bfff133
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This actually looks very wrong. First, it would try to read bits for
len == 0, which means it was actually reading the implicit NUL from
QByteArray (so valgrind would never catch the error).
Second, there was a corner case for testing the 8th bit (bit 7) in the
last byte. For len == 8 or 16 at the beginning of the last loop, it
would read bits[len / 8], which is again the implicit NUL from
QByteArray.
Compare to testBit (simplified):
return d.constData()[1+(i>>3)] & (1 << (i & 7)) != 0;
Task-number: QTBUG-11625
Change-Id: Idb361163de596b629cab42f2367ddd09456c2a98
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
The check is bogus anyway. It was bogus when it was added. The bug is
not because of "GCC on IRIX", it's simply a GCC bug and was probably
tied to some GCC versions. It should have been reported and followed up.
I don't even remember what GCC versions we had on the IRIX machines
(plastkrakk, I can't remember the other two machine names). But I could
bet they were GCC 3.4 or 4.0.
Change-Id: I84ce4e1ad68bb0520b63c210f841e0c604dbd03a
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
The ! binds to a only, which is most likely wrong here.
Change-Id: I4aa09407a8acc68f97bef474781193774e4a7597
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Before we went through non hidden indexes, but we never considered
the visual order. This patch fixes that issue.
Though it was wrong before, it probably never was a big problem
since it was unlikely that the tree (on logical index 0) was
swapped or hidden, but
658e42e77a
makes it more likely that problems with wrong focus could occur.
Change-Id: Ic7b6cd2df1f8638be1a7c9e6df27f428685869fc
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Make the documented QScopedPointer functions that take rvalue
references visible in the documentation.
Task-number: QTBUG-32675
Change-Id: If65af91d9379a6c0486e43c33434cca8505fc5c3
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
qdoc interprets the double-ampersand in function parameters
using rvalue references (e.g. 'Type &&other') incorrectly
as a logical AND operator, resulting in a syntax error.
This change works around the issue by treating '&' the same
as '*', and defining Q_COMPILER_RVALUE_REFS for qdoc.
Task-number: QTBUG-32675
Change-Id: I499611f16f22c33ff5b878da0cd59d67ddf53d72
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
The new Cocoa event dispatcher made apparent some deficiencies in the
way the dialog helpers were being hidden. In particular, we would not stop
a dialog helper's modal loop when closing the dialog, resulting in the
auto-tests hanging. Also, since the QApplication event loop is runnig with
[NSApp run] in the stack, the previous workarounds are no longer needed.
Task-number: QTBUG-24321
Change-Id: Ifba713c286638d78a699c319a15683d09714f06f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Since we don't spin any QEventLoop, we need to make sure events posted
by the window system interface are processed.
Change-Id: I0e7b541d86a7a14f2ecd3702e7cbdbdee9920859
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
We follow the same pattern as for iOS and Windows ports, making
sure the user's main() runs in a platform friendly environment. In
this particular case, it means calling the user's main() during the
call of NSApplicationMain(), and calling the user's main() function
(renamed to qMain() as in Windows) after receiving
NSApplicationDidFinishLaunchingNotification. In practice, this means
that NSApp is running when qMain() is called, and therefore when
QCoreApplication::exec() is called.
For those command-line utilities running on QGuiApplication, or any
deriving class, and that do not provide a bundle, we override the main
bundle's dictionary and get NSApplicationMain() to run as usual.
Added cocoa/cocoamain "subdir" to build libqtcocoamain.a (together with
cocoa/cocoaplugin -- plugins/platforms/cocoa is made a subdirs project).
This library is linked against all GUI Qt apps and provides the actual
main() function. It also catches the launching NSApplication notifications,
and calls the user's qMain() function. Note that this will happen in the
same cases when the user's application will run with the Cocoa QPA plugin.
Launch related code in QCocoaApplicationDelegate is moved to libqtcocoamain,
QNSApplication is removed (but sendEvent: redirection still there), and
code in QCocoaEventDispatcher dealing with calling [NSApp run] and related
has been removed since it's become unreachable.
ChangeLog: [Qt for Mac] Make QGuiApplication::exec() run within NSApplicationMain()
Change-Id: I790e5138c29aac2e0215a9147d0148fece40ca22
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Currently just a convenience method for setNameFilters(), it uses
QMimeType to create a name filter from the glob patterns and
description defined in each MIME type.
In the longer term, this API could be used to do proper mimetype-based
filtering using QMimeDatabase::mimeTypeForFile() in the builtin
QFileDialog (aka "not native"), instead of only looking at globs via the
name filters.
Change-Id: I0edccf5f30c514481b47cd100d743d1ed7a24024
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Before:
=======
Qt User Interface Compiler version 5.2.0
Usage: uic [options] <uifile>
-h, -help display this help and exit
-v, -version display version
-d, -dependencies display the dependencies
-o <file> place the output into <file>
-tr <func> use func() for i18n
-p, -no-protection disable header protection
-n, -no-implicit-includes disable generation of #include-directives
for forms generated by uic3
-g <name> change generator
After:
======
Usage: uic [options] [uifile]
Qt User Interface Compiler version 5.2.0
Options:
-h, --help Displays this help.
-v, --version Displays version information.
-d, --dependencies Display the dependencies.
-o, --output <file> Place the output into <file>
-p, --no-protection Disable header protection.
-n, --no-implicit-includes Disable generation of #include-directives.
--postfix <postfix> Postfix to add to all generated classnames.
--tr, --translate <function> Use <function> for i18n.
-g, --generator <java|cpp> Select generator.
Arguments:
[uifile] Input file (*.ui), otherwise stdin.
Notes:
* "-dependencies" etc. still work.
* -n option still has effect, but technically not only for ui3 files
* the fact that the <uifile> parameter is optional wasn't documented
* -postfix option was undocumented
* -translate alternative for -tr was undocumented
The last two points show the benefit of using QCommandLineParser.
Change-Id: Ie05cfb9bbe50f4ac2788aa7b6011b2daa1acde6a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
(dacf9961da)
In order to see 2 active threads, we must check activeThreadCount() before
the runnable finishes.
Change-Id: I1a48b41e0c1fd81a65d915b9bd1e741ff267ed2b
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Before:
=======
Qt resource compiler
Usage: rcc [options] <inputs>
Options:
-o file write output to file rather than stdout
-name name create an external initialization function with name
-threshold level threshold to consider compressing files
-compress level compress input files by level
-root path prefix resource access path with root path
-no-compress disable all compression
-binary output a binary file for use as a dynamic resource
-namespace turn off namespace macros
-project Output a resource file containing all
files from the current directory
-version display version
-help display this information
Undocumented: -verbose and -list !
After:
======
Usage: rcc [options] inputs
Qt Resource Compiler version 5.2.0
Options:
-h, --help Displays this help.
-v, --version Displays version information.
-o, --output <file> Write output to <file> rather than stdout.
--name <name> Create an external initialization function with <name>.
--root <path> Prefix resource access path with root path.
--compress <level> Compress input files by <level>.
--no-compress Disable all compression.
--threshold <level> Threshold to consider compressing files.
--binary Output a binary file for use as a dynamic resource.
--namespace Turn off namespace macros.
--verbose Enable verbose mode.
--list Only list the files, do not generate code.
--project Output a resource file containing all files from the current directory.
Arguments:
inputs Input files (*.qrc).
Change-Id: If20958afd6c01df5d0d755e13e8581bc1cb9af51
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This extends the QLinkedList auto test. This is copy paste
with small edits from the QList auto test.
Change-Id: I5bce7ee304998d1c7258f11b2f31a7fb87706936
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add convenience methods for fromMSecsSinceEpoch() and
fromTime_t() to enable direct creation of other time specs
than LocalTime without the overhead of unncessary conversions.
For example instead of:
QDateTime dt = fromMSecsSinceEpoch(12345).toUtc();
the following saves two conversions:
QDateTime dt = fromMSecsSinceEpoch(12345, Qt:UTC);
This will improve the performance of the new QTimeZone class.
[ChangeLog][QtCore][QDateTime] Added convenience methods for
fromMSecsSinceEpoch() and fromTime_t() to take time spec to be used in
returned datetime.
Change-Id: I133635bfe3d35ee496a287257e13b2d600225a38
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
The Qt::OffsetFromUtc TimeSpec was made public in Qt 4.4 but the access
methods were never made public in the apidox effectively meaning the
feature was never used. The implementation was also incomplete and
inconsistent.
This change cleans up the implementation and exports new public API for
using the TimeSpec using new method names consistent with the new
QTimeZone support.
This change increases the QDataStream Version number for Qt 5.2 to 15.
The behavior of one constructor has changed slightly to be consistent
with the rest of the feature, but this behavior was never documented.
[ChangeLog][QtCore][QDateTime] Fully implement support for Qt::TimeSpec
of Qt::OffsetFromUTC, added new methods for offsetFromUTC(),
toTimeSpec(), and toOffsetFromUTC().
Task-number: QTBUG-26161
Task-number: QTBUG-29666
Change-Id: If3cc7fc9778ca2b831644408ae749448d5975a3a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Maliit upstream has its own IC which is more advanced than this one, as well as
being supported.
Change-Id: I4b820fc7f39468e53c113699c4c43c75d490f65b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
The application state is tied to the QtActivity lifecycle.
Mapping of states between Android and Qt is as follows:
onResume --> ApplicationActive
onPause --> ApplicationInactive
onStop --> ApplicationSuspended
Change-Id: Iefef08d6c7a7fde28fba1f4886882458cda6a0c0
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
QButtonGroup emits signals on clicked, pressed and released for
buttons in the group, but for some (insuffienct) reason it did
not emit anything for toggle (the only signal that it didn't emit
anything for).
This patch changes that, by adding handling of that signal to
QButtonGroup.
Task-number: QTBUG-14857
Change-Id: I88bcd7b060b78c7ff05ea1adf7baaddfe6d463be
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
-Documentation looks weird when viewed in a narrow window because
much of the text are long.
-Qt Project's CSS uses "left".
-This change affects any documentation which uses the global
templates.
Change-Id: I8605a191904cb727b4818d8a1abf127ce2e45eb9
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Starting with Windows Vista, we can control the compositing window
manager using the DWM APIs. This allows us to make truly transparent
OpenGL windows.
We also have to detect and listen if compositing is enabled, otherwise
enabling transparency will cause glitches all over the place.
This (partially) fixes
Task-number: QTBUG-28214
Change-Id: I0fe1ec7adec8181b788c32de03c59142731d9e7f
Done-with: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
The previous commit was unnecessary.
The value of QMAKE_CFLAGS is used for QMAKE_CXXFLAGS as well.
This is done in qcc-base.conf, which is included via
blackberry-armv7le.conf -> qcc-base-qnx-armv7le.conf -> qcc-base-qnx.conf -> qcc-base.conf
Currently, the BlackBerry arm compiler calls show duplicate entries.
This reverts commit 539f90e971.
Change-Id: I6e055ce9aafd16e91e15817946b7561bd76ee43e
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Commit 93ffb81df6 introduced this bug. As
it is in the header, it affects downstreams.
Change-Id: I02e86927e648153ca7c0b66ac945a7f99cc4cd89
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Done with Jan Arve
Task-number: QTBUG-33104
Change-Id: I8319748536d448d1c37a26527ced53156d8c2f56
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
As a side effect, this fixes wrong line break in "Third Party Libraries" section.
Change-Id: Ie6510fa94626a1c586621948a4681efdcf61f8b2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Change-Id: Ia786d4fab64da974bb60f24c05325925d42a1e70
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Distance fields are stored using a one-byte alpha component per pixel, a
format that QImage doesn't currently support. The Indexed8 format was used
instead, limiting what could be done with the QImage.
This patch introduces a new private class, QDistanceField, with a similar
API to QImage and using the Alpha8 pixel format. Unlike QImage which
aligns scanlines on a 4-byte boundary, QDistanceField tightly packs
scanlines together.
Task-number: QTBUG-30908
Task-number: QTBUG-32861
Change-Id: Ic273259ea07dfbd2b81a6358c0ca11a2330eb749
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
This reverts commit 9fa1bdeeb2 which
is no longer needed because the Android NDK now contains a
toolchain without the bug for which it was a work-around.
Task-number: QTBUG-31051
Change-Id: I601ba2fccb927ee7e818644de4474700e2eec8f1
Reviewed-by: BogDan Vatra <bogdan@kde.org>
sync up; this doesn't actually do anything in qmake.
if we end up calling cache() from within the initialization of the base
context, we cannot wait for for the completion of that initialization
before we proceed, obviously.
Change-Id: If30c6f3665fe423e767373a8821c406b2f5e0eca
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
(cherry picked from qtcreator/b64b4431c20afd9e39c1463e736f998ef450688f)
sync up; this doesn't actually do anything in qmake.
as we modify the environment, it must be properly locked.
this implies that initFrom() also needs to be called with a lock.
Task-number: QTCREATORBUG-9835
Change-Id: I48bae9af9adaa0518e5a9db0ba08ff057ae14f9f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
(cherry picked from qtcreator/d022a2d19cecb00397c2a215fc4e3bf64b1e627b)
sync up; this doesn't actually do anything in qmake.
creator's file watcher can trigger many parallel, entirely
non-hierarchical project reloads. if there is enough of them to exceed
the thread pool size, some will be serialized already by qtconcurrent,
not by our wait condition. these should notice a faulty spec, too.
Change-Id: I8ce40cb90fbc28045127881d57ec94e125df79af
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
(cherry picked from qtcreator/759d0a69dd3973b4785b6f9412f46666a05cdf85)
It's a nice feature to have.
MSVC also complains about using doubles to create enum values, so
the ugly workaround is:
enumValue = MyEnum(qRound(json["myEnumValue"].toDouble()));
[ChangeLog][QtCore][QJsonValue]Added QJsonValue::toInt().
Change-Id: I1a200b912abf66b2e96390b1980caff26cfa2685
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Controlling the layout from different functions is not easy, so
lets move it to the setupLayout function.
Change-Id: I3120a2e98b2f8425befa135595d4ad7ce1b8ca56
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Makes it possible for QElapsedTimer to be non-POD.
Change-Id: I5ffc59c7a93c187a4a814e6959f8383fa8d4cc44
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
It sounds like a good thing to have this warning, but for
future-proofing we can't have it. The system libraries might change
and add deprecation marks (OS X does that often). If they do that, we
don't want poor developers to have to fix all warnings before they can
build Qt again.
Change-Id: I4ff317da0de596c470bb1efe6e59bcf70aeec8fc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>