Commit Graph

22417 Commits

Author SHA1 Message Date
Thiago Macieira
0bcd067193 Fix warning-as-error about member not used with Clang 3.6
Found by Clang 3.6 on Linux:
qxcbeglcontext.h:91:21: error: private field 'm_connection' is not used [-Werror,-Wunused-private-field]

Change-Id: I1a800c709d3543699131ffff13c2fcf8cf013175
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2015-02-20 12:53:05 +00:00
Allan Sandfeld Jensen
9bf8b2a412 Do not attempt to unregister an unregistered dbus service
If a QSystemTrayIcon is created but never shown, it will trigger a
warning on exit when it fails to unregister.

This patch ensures we only try to unregister if the service was
registered in the first place.

Change-Id: I0e245d19be55c58aea180dbcbe5215e738d05280
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2015-02-20 12:52:43 +00:00
Lisandro Damián Nicanor Pérez Meyer
bc20d794cf Fix typo: properly write endianness.
Change-Id: I5240f6eef0eef85cbc6a9107f047f36e97b9a060
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
2015-02-20 11:45:29 +00:00
Shawn Rutledge
26a05fc097 xcb: remove stray QDBusMenuConnection in QXcbNativeInterface
It was unintentionally left in from an earlier version of
38abd65377

Change-Id: I7b0b19ed313493562874642cae8865bb0783e366
Reviewed-by: Daniel Molkentin <daniel@molkentin.de>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-02-20 11:41:49 +00:00
Shawn Rutledge
23e9b57e3d D-Bus system tray: properly check whether StatusNotifierHost available
"org.kde.StatusNotifierWatcher" is just a watcher/helper, whereas the
actual systray object is "org.kde.StatusNotifierHost-$PID".
The org.kde.StatusNotifierWatcher.IsStatusNotifierHostRegistered
property can tell us whether there is an actual system tray.
Also renamed the accessor to isStatusNotifierHostRegistered since we
are checking for the host, and also because it can be confusing
that it's a member of QDBusMenuConnection if the name isn't clear.
See also KDE bug 339707

Change-Id: I218c5357b9cc5a62e5cc07abe980893b826f98f4
Reviewed-by: Martin Klapetek <mklapetek@kde.org>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
2015-02-20 11:41:40 +00:00
Shawn Rutledge
37ce38daec Android: availableTimeZoneIds returns QList not QSet
Fixes error: invalid covariant return type

Change-Id: I5b5fead1b48c2502ae40bc9cd181939444ff715a
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2015-02-20 11:41:28 +00:00
Martin Smith
62a2f46d29 qdoc: Support documentation of JavaScript
This update provides the actual support for documenting
JavaScript. It has been tested with JavaScript commands
in qdoc comments in .qdoc files but not in .js files.
Currently, we have the use case of needing to document
JavaScript using qdoc comments in .qdoc files.

For each qdoc command for QML, i.e. \qmltype, \qmlproperty,
etc, there is now a corresponding JavaScript command, i.e.
\jstype, \jsproperty, etc. Some of these might not be needed,
but they are all provided.

Briefly, document JavaScript in a .qdoc file the same way you
would document QML in a .qdoc file, but instead of using the
\qmlxxx commands, use \jsxxx commands.

Change-Id: Ib68a5f66c16472af87d9f776db162332ca13fbb7
Task-number: QTBUG-43715
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-02-20 11:37:18 +00:00
Martin Smith
fe7c2662b5 qdoc: Mark Genus of each Node object
The concept of Genus was introduced to allow link commands
(\l) to specify what kind of entity should be accepted as the
link target. Possible values were CPP, QML, DOC, and DONTCARE.
This became necessary when we started seeing more cases where
the same name was used for a C++ class and a QML type. The
Genus for an entity was returned by a member function of the
specific subclass of Node that represents that entity. For
example, QmlTypeNode::genus() returns QML, while Class::genus()
returns CPP.

Now we are seeing an increasing need to document Javascript.
Rather than add subclasses of all the QmlXxxNode classes to
represent the javascript entities, the Qml Node subclasses
will be used. JS is added to the Genus enum to mark Nodes
that represent javascript entities. But this requires storing
the Genus value in the node, rather than just having a member
function in each subclass return it. Now there are two member
functions in the Node base class, genus() and setGenus(), and
the value is stored in the Node. This doesn't increase the
size, because there was a byte available.

Change-Id: Ifcee78595f4288792e09bb255d2e8c01ebafac46
Task-number: QTBUG-43715
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-02-20 11:37:07 +00:00
Michal Klocek
edb2ad9117 Fix compilation on Android
Commit 81a45e1f13 replaced QSets with
QLists in QTimeZone, but forgot to adapt the Android code.

This commit fixes it.

Change-Id: I8704a39c44a9dc74147a4bb99a6f5d1bea53afa1
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-02-20 09:36:13 +00:00
Martin Smith
b1ccf65102 qdoc: Let qdoc ignore Q_ENUM and Q_FLAG
Q_ENUM and Q_FLAG were not listed in the Cpp.ignoredirectives variable
in qt-cpp-defines.qdocconf. This never used to cause parsing errors in
qdoc, but now it does. The cause for this change was not determined at
the time of this fix, which is to add Q_ENUM and Q_FLAG to the ignore
directives list.

Change-Id: I717c9101f7706097869f23b53eeca8cb1a0fee0a
Task-number: QTBUG-44510
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-02-20 09:31:33 +00:00
Sean Harmer
c38b6a3fde Disable constexpr support for QNX
Even though the compiler on QNX supports C++11, the stdlib it ships
with is missing constexpr on many important functions. This is required
to make qtbase compile on QNX 6.6.

Change-Id: I59a4263483b1d94b9d2dceb947876e445f9662af
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2015-02-20 09:11:54 +00:00
Topi Reinio
7f12b9da18 qdoc: Omit output subdirectory from paths written to .qhp
When writing the help project file, all the files can be assumed
to be in the same subdirectory, defined by the qhp virtualFolder
variable in the documentation config.

Since commit 77165553, the output subdirectory is stored for each
documentation node, which caused the subdir to be written to paths
in .qhp as well. The result was duplication of the subdir in paths
passed to Assistant, giving page not found errors.

Change-Id: I69fd74874f9d8eac6957287941193917728476fd
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
2015-02-20 08:02:05 +00:00
Martin Smith
765a8343d7 qdoc: Reduce size of Node class
The Node class represents every entity to be documented.
By changing some of its data members from enum to uchar,
it's size has been reduced from 176 bytes to 160 bytes.

Change-Id: Idd43866a435f1b0f1ac932870597631b5bbde523
Task-number: QTBUG-43715
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-02-20 07:11:09 +00:00
Eskil Abrahamsen Blomfeldt
fd18d13612 Use qrc for test data in QFileInfo test on all platforms
To make the test compatible with cross-compilation, we need
to bundle test data in qrc, and then extract files to the file
system during initialization. We did this for Android before,
but the change is required on many platforms and since it will
also work on desktop platforms, we consistently just do it this
way everywhere.

Change-Id: I7f65bd9e1dd6f217e6adffda44a40da7599cfe72
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-02-18 12:09:16 +00:00
Alexander Volkov
72d5c84407 Doc: Fix QTextStream::readLine() snippet
The old snippet is incomplete because it misses an extra check
in the loop body that the line is not null.
Use the new readLine() overload to keep it simple.

Change-Id: Ie9f13291ca6ff6f546b81f100ce58d747f0dd12f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-02-18 08:54:27 +00:00
Rainer Keller
2d9c2a0b08 Testlib: Add function to extract files from resources to disk
Change-Id: I7ae1cdfea751a759298cf277e36cfef7a9c46edb
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-02-18 08:19:10 +00:00
Marc Mutz
3769f7c974 QDate/QTime: mark some functions constexpr
Change-Id: Icbac388337d561f61a9a53163c3ddfc748935a2f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-02-17 19:58:32 +00:00
Tobias Koenig
fa93d0ceec Haiku: Initial version of QPA plugin for Haiku
Change-Id: Ib4d1d75a11602af8423970e12c7cc594576e1c4d
Reviewed-by: Augustin Cavalier <waddlesplash@gmail.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2015-02-17 19:21:58 +00:00
Alexander Volkov
64d7bb9f55 xcb: Check for the presence of XInput 2.2 before selecting touch events
Change-Id: I5309f9cdaadb87e0a577a0701d2c100d29525424
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2015-02-17 18:58:03 +00:00
Jani Heikkinen
cb95fff1c7 Fixed license headers
Change-Id: Ibebe1318d1c2de97601aa07269705c87737083ee
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-02-17 18:46:09 +00:00
Oswald Buddenhagen
b6f0060f60 support spaces in build and install dirs
spaces in the source dir are not supported for now, as that requires
some more profound refactoring of the bootstrap makefiles.

Change-Id: Ie0c07a1558b8326f642f2ea144bc1cd85ee761af
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-17 18:28:00 +00:00
Oswald Buddenhagen
7e71eec3c8 use relative paths for build dir references
apart from being more readable, it has the side effect of being resistant
to spaces in the build path.

Change-Id: Id12603c3a96765913e747fba4070d49de0705315
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-17 18:27:57 +00:00
Oswald Buddenhagen
217f21c479 remove nonsensical path stripping
we strip the path a few lines above already.

Change-Id: If7524b8e744d2f1ab2f5a6920097d25671449829
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-17 18:27:54 +00:00
Oswald Buddenhagen
0812b5b318 untangle handling extra compiler .clean member
it's easy when it is a simple list of files (or just absent). however,
it can also contain expandos, and in this case it's definitely not a
good idea to treat it partly (but not really) as a single shell command.

Change-Id: I7ef32a56f276b06579fc7094357c5f7612eaf205
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-17 18:27:51 +00:00
Oswald Buddenhagen
6c4d8ee835 fix fixPathToTargetOS() nesting
first replaceExtraCompilerVariables(..., NoShell), then fix the final result.

Change-Id: If8cebeaa59f48d91b33b5a74e6a48a0d2d049643
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-17 18:27:49 +00:00
Oswald Buddenhagen
5527411437 remove pointless fixPathToTargetOS() calls
it makes no sense to call it on paths that are fixified right before or
after, as fileFixify() calls it itself.

and verifyExtraCompiler() calls normalizePath() on its file argument.

Change-Id: I8fb21e129fd29428d1855de73483087842bc1bdd
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-17 18:27:47 +00:00
Oswald Buddenhagen
e0962270d7 replace incorrect uses of fixPathToLocalOS() (mostly)
in most cases, it actually means normalizePath() (because the file name is
used with qt i/o functions afterwards).
this affects QMakeLocalFile::local() as well, so many not immediately
obvious places are affected as well.
there was also one case of fixPathToTargetOS() falling into this category.
this is mostly a no-op, as the qt functions are agnostic to the path
separator.

in some other cases (in particular in the vcproj generator), it actually
means fixPathToTargetOS().
this is mostly a no-op as well, as the two functions are equal except on
msys anyway.

in the <meta file>FileName() functions, the use of a fixPath*() function
is bogus in the first place - fileFixify() already does
fixPathToTargetOS(), and this is correct when the file name is used
verbatim in a make command (which it is). otherwise it's irrelevant.

Change-Id: I26712da8f888c704f8b7f42dbe24c941b6ad031d
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-17 18:27:44 +00:00
Oswald Buddenhagen
1cacf1e70d more autotests for spaces, destdirs and library linking
Change-Id: Ie106d1151e61a50081bccea0a6d0d70728451a5b
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-17 18:27:40 +00:00
Oswald Buddenhagen
70f8567429 remove pointless path trimming
there is no reason why there should be unexpected leading or trailing
whitespace in an extra compiler's .depends list.

Change-Id: I46be75063180131e135fc6eea0238a482073618a
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-17 18:27:37 +00:00
Oswald Buddenhagen
e3a7237d82 fix quoting issues. all of them. (*)
instead of quoting more or less random variable contents early,
consistently quote everything only right before it is needed. this way
we can be sure that everything is correctly quoted, but not over-quoted.

this removed the need for the insanity that unescapeFilePath() and
similar ad-hoc contraptions were.
this had the somewhat counter-intuitive effect that it was possible to
remove escapeFilePath() calls from PBX::writeSettings() calls - these
were actually only unescaping.

[ChangeLog][qmake][Important Behavior Changes] A lot of quoting issues
have been fixed. As a side effect, qmake has become more sensitive to
over-quoted file names in project files.

(*) ok, maybe not. close enough.

Task-number: fatal: out of memory
Change-Id: I8c51cfffb59ccd156b46bd5c56754c480667443a
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-17 18:27:29 +00:00
Oswald Buddenhagen
c0d67bb5c9 fix filename handling in replaceExtraCompilerVariables()
fixing and escaping is now a tri-state option:
- none (this removes the need to unescape the result right afterwards in
  some cases)
- local shell (for system())
- target shell (for Makefile)

Change-Id: I5b78d9b70630fe4484dc964eff5f62793da35764
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-17 18:27:25 +00:00
Fawzi Mohamed
6ccf0a326e Use relative path for QMAKE_BUNDLE_DATA
Use of FileFixifyAbsolute with non-default in_dir and out_dir
is not defined (and produces bogus results).
Using FileFixifyRelative when handling QMAKE_BUNDLE_DATA as a relative
path is fine.

Change-Id: I49902dc9f5b8029d092a4419c0cff5483e419c30
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-02-17 17:28:57 +00:00
hjk
f727ffa1eb compose: Rename main.cpp to qcomposeplatforminputcontextmain.cpp
Files with same base name cause extra trouble for debuggers.
Similarly to 26cf0f0d5a, it can be avoided here.

Change-Id: Ide47170f417d636aa031b0d84a1951df8bf32316
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-02-17 15:36:21 +00:00
Eskil Abrahamsen Blomfeldt
57ca50cbc7 Android: Fix tst_QFileInfo::isExecutable()
Use correct path for executable file.

Change-Id: I50283fc43fe6561cb8eb687f739f21a3d5cbadbd
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-02-17 15:15:47 +00:00
Marc Mutz
1649b973fd QPair: add noexcept to ctors and assignment operators
Change-Id: Id201d1f1e7a087083ca6c13ab31c721e672ef566
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-02-17 15:05:40 +00:00
Marc Mutz
ddd61b4aec QList: share implementation of operator== with QVector where possible
Same change as was already applied for count() and contains().

Change-Id: Ibd62e4b36e03741993ba33e730c9449ef19bff5f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-02-17 15:05:23 +00:00
Marc Mutz
18885297de QList: share the implementations of contains()/count() with QVector where possible
If QList data-layout-compatible with QVector and a C array, implement count()
via std::count() and contains() via std::find() and use const_pointer
instead of const_iterator as the iterators. This essentially makes
the QVector and QList implementations identical to each other, at least for
important cases such as QString.

To switch between the different implementations, use tag dispatching instead
of the previously used technique "use 'if' as if it were 'static if'", which
imposes accidental requirements on the element types (something that esp.
QVector is plagued with).

Change-Id: I6caf74442a22059676b5bf115a6089768f3a0952
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-02-17 15:05:15 +00:00
Marc Mutz
40d6e8adf5 QList: prepare for tag dispatching based on memory layout
Add one tag class for each of QList's three different memory layouts
to QListData, and inherit QList<T>::MemoryLayout from exactly one of
them.

To simplify overloading, added tag classes that express the negation
of the two extreme poles of memory layout (C-compatible and heap),
too. The "missing" one could be added when needed, too.

Change-Id: I45ea603731499fd3fdfb37d60a0a98fb22ac15ec
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-02-17 15:05:07 +00:00
Marc Mutz
4c4940a744 tst_QList: test all memory layouts
The Movable type, surprisingly, was as large as sizeof(void*), so on
32-bit platforms, we were not testing the QList memory layout where
items are placed directly into the void*-slots, but are too small,
leaving gaps.

Fixed by making sure that Movable is smaller than void* and adding
a variant of Movable, Optimal, that is guaranteed to be the same
size as void*, and replacing the int tests with tests of Optimal.

Had to demote the State variable to uchar, since MSVC will apparently
not make a collection of bit-fields smaller than the largest type used
in any of the consituent bitfields, so State s : 8 wouldn't work.

Change-Id: I4f0e24bd6928f076b4ce60e8d977d5d98a724161
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-02-17 15:04:49 +00:00
Marc Mutz
647ad3fe25 QDate: optimize QDate::toString()
Instead of using a QString::arg() cascade, which creates tons of
temporaries, use good 'ol sprintf().

Effects on Linux GCC 4.9 stripped release builds:
 text   -216B
 data    +-0B
 relocs  +-0

Change-Id: I6ff551cb9f42e0c05a64f03a8e177fb527915481
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-02-17 15:04:36 +00:00
Marc Mutz
8f553484fa QDateTime: optimize toOffsetString()
Instead of using a QString::arg() cascade, which creates tons of
temporaries, use good 'ol sprintf(). As a consequence, this
function is now inlined into all four callers and the total
executable size _still_ goes down:

Effects on Linux GCC 4.9 stripped release builds:
 text   -420B
 data    +-0B
 relocs  +-0

Change-Id: I10d6abd94b489db7c2f01dc5424f30a798602522
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-02-17 15:04:24 +00:00
Marc Mutz
5b7729ae79 QDateTimePrivate: make bit manipulation code more readable
...by using var op= ... instead of var = var op ...

No change in executable code size.

Change-Id: I1c29ff6700f0f21be07768af8d002f0823c89fbd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-02-17 15:04:13 +00:00
Marc Mutz
94078f8645 QDateTimePrivate: remove pointless comparisons
For any 1-bit flag:
   bool(var & flag) <=> (var & flag) == flag
but gcc didn't seem to get it:

(Surprising) effects on Linux GCC 4.9 stripped release builds:
 text  -4936B (!!)
 data    +-0B
 relocs  +-0

It seems this enables some dead code detection, but
I must confess I don't quite understand how such a
small change can have such a dramatic effect on the
executable size, even after diffing the assembler
output.

Change-Id: Ia307fde0de16160ea51bbb3ed6c1ff203d4f9091
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-02-17 15:04:01 +00:00
Marc Mutz
df0d933db5 QDateTimePrivate: remove pointless copy ctor
The compiler-generated one is just as fine, more maintainable,
and doesn't inhibit moves (which probably doesn't matter here).

No change in executable code size.

Change-Id: Ideee493a5911808430d3e09e6eb07e91d7a19b12
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-02-17 15:03:47 +00:00
Marc Mutz
70bfc75d18 QDateTime: replace out parameters with return-by-value in rfcDateImpl()
Compilers *really* don't like out parameters.

(Impressive) effects on Linux GCC 4.9 stripped release builds:
 text  -2512B
 data    +-0B
 relocs  +-0

Change-Id: I0fe370a438f7b82aaa9cc04ddd56e45a5969e7a9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-02-17 15:03:34 +00:00
Marc Mutz
d8d114989a QDateTime: optimize rfcDateImpl()
Get the captured texts once and use indexing into the QStringList
instead of repeatedly calling QRegExp::cap(n).

(Impressive) effects on Linux GCC 4.9 stripped release builds:
 text  -2876B
 data    +-0B
 relocs  +-0

Change-Id: I3a02eab1a691f31c30654cd89a0c030414b40de0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-02-17 15:03:18 +00:00
Marc Mutz
62475eb8b0 QDateTime: change an instance of out parameters to return-by-value
Compilers don't like out parameters.

Effects on Linux GCC 4.9 stripped release builds:
 text   -528B
 data    +-0B
 relocs  +-0

Change-Id: I32ee1a6c4388900bacfc6eb20feb4b81d71cb1f2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-02-17 15:03:08 +00:00
Eskil Abrahamsen Blomfeldt
c3e680c3b1 Android: Fix tst_QDir::cdBelowRoot()
The /tmp directory doesn't exist on Android, and the test needs
a directory that it can cd into which is one level above root.
So we just use /system which should be available on all devices.

Change-Id: I8e6a15f278429491fd871f87af497e5d7184ddf8
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2015-02-17 15:03:07 +00:00
Eskil Abrahamsen Blomfeldt
12d6f70037 Fix QTextDocument test when default font is pixel-sized
When the default font has the pixel size set instead of point
size, then pointSize() will return -1 and the output from the
HTML will include the pixel size instead. This happens e.g.
on Android when we extract font information from the system.

Change-Id: I26dc49fff215c9887cf0b78dcfff88df0f74450d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-02-17 15:02:48 +00:00
Marc Mutz
81a45e1f13 QTimeZone: don't use QSet, use sorted QList
QSet, as a node-based container, requires one memory allocation per element
inserted. QList, as a contiguous-memory container (at least in the case of
a QByteArray payload), requires one memory allocation per container.

The higher lookup speed might still speak for using QSet, but there are only
two uses of the sets:

1. Checking for existence (or lack thereof) of timezone names.
   For this, first generating a container full of data just to check for
   existence of one item of data is extremely wasteful. The QTZPrivate
   API should be extended to allow said lookup to be performed on the
   native data store instead.

That leaves

2. Returning a sorted(!) list(!) from the public QTimeZone API.
   There is no reason why, during the construction of those sorted
   lists, the data should be held in a set. Instead, the well-known
   technique of first cramming everything into a result container,
   which is subsequently sorted and has its duplicates removed,
   can be used here.

Saves more than 8K of text size on AMD64 stripped release builds.

Change-Id: I71c2298e94e02d55b0c9fb6f7ebeaed79a1fe2db
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-02-17 15:02:45 +00:00