Commit Graph

22427 Commits

Author SHA1 Message Date
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
Andrew Knight
b63c721a0e xcb: Fix build with -no-xcb-xlib -qt-xcb
The EGL integration should not call Xlib functions in this case.

Change-Id: I46656b12d603ca1b4b0b41f34c3c0e8410c91db8
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-02-17 05:09:17 +00:00
Sérgio Martins
fbeeaf23fe Introduce QT_NO_MIMETYPE
The mime type stuff generates one of the biggest translation units in QtCore
due to the compressed 1.7MB freedesktop.org.xml resource.

With QT_NO_MIMETYPE, libQt5Core.so is almost 400Kb smaller
(4.8MB->4.4MB gcc 4.9 stripped release build)

Change-Id: I5339090994034355724ff4deddb64720e81baeaf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-02-17 00:06:47 +00:00
Sergio Ahumada
3c1d9911c4 Fix license headers
Change-Id: I964ca9d3aff1a1cbe39dc53d04a408c754e96a77
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2015-02-16 17:08:39 +00:00
Allan Sandfeld Jensen
515e802ae2 Use C++ <cmath> instead of <math.h>
Including math.h can pollute the default namespace, and break
some compilers if cmath versions of the method are declared as using.

Switching to C++ math functions also greatly simplifies handling of
float qreal as C++ automatically chooses the right method.

[ChangeLog][QtCore][QtMath] qmath.h no longer includes math.h, so any
sources depending on that indirect inclusion may fail to build.

Change-Id: I4d0e331dafba354ec05dc5052e61ef4ff8d387fe
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2015-02-16 16:21:15 +00:00
BogDan Vatra
3d835eb62e Android: Fix compile on arm64-v8a
Android arm64-v8a redefines _POSIX_C_SOURCE to 199506 if _XOPEN_SOURCE is defined.

Change-Id: I04ff616eaac6e08094fc1f58f49bc5a2c31733f0
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-02-16 16:05:29 +00:00
Yoann Lopes
710cb8e2fc Add configure option and tests for GStreamer.
Qt Multimedia can be compiled with either GStreamer 0.10 or 1.0.
0.10 takes precedence over 1.0 if both are available (1.0 will be used
by default in Qt 5.6).
Auto-detection can be overridden with -gstreamer <version>.

Change-Id: I74d58d2c146c842902375b4d1e5e6e96d32addac
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-02-16 16:01:34 +00:00
Kai Koehne
478f319df9 LocalSocket: Do not return early in waitForReadyRead
Do not return early on Windows if bytes are still in the buffer.
This is not in line with the behavior on other platforms,
and also breaks apps where the caller knows that the
bytes available are insufficient.

[ChangeLog][Network][QLocalSocket] On Windows, waitForReadyRead
now always waits for more data, even if bytes are still in the
buffer.

Task-number: QTBUG-16688
Change-Id: I1425a5780c7707295374934a6b5446ff8e148cc8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-02-16 16:01:20 +00:00
Laszlo Agocs
effc6b4cd1 Add widget support for requestUpdate() and improve its docs and tests
We must do something when requestUpdate() is called on a QWidgetWindow.
The semantics of UpdateRequest for QWindow and QWidget are unfortunately
different: for widgets an UpdateRequest means "sync the backing store".
For QWindow it also involves marking as dirty.

Change-Id: Idf40b3fc0873652dc081edeb12c96b3007a126ef
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-02-16 15:56:29 +00:00
Richard J. Moore
1748b7e7d2 Use d2i_DHparams instead of poking around inside the DH struct.
This change is a step closer to working with openssl 1.2 which makes
this struct opaque.

Change-Id: I3897142657edc0fa4053142b6ef743c2b00c013e
Reviewed-by: Peter Hartmann <peter-qt@hartmann.tk>
2015-02-16 13:17:47 +00:00
Topi Reinio
0cc37b6e60 qdoc: Clear the list of output files during generator init
QDoc keeps a list of files it generates (or copies) to the output
directory, for writing it to a .qhp file later on.

In single-exec mode, QDoc processes several qdocconf files
without deleting the generator in between. Therefore, we need to
clear the list of files whenever the generator is initialized,
to avoid duplicating the filenames across multiple .qhp files.

Change-Id: Ibc2a6b171466aa1db6cfe3da9a820d5ba2845004
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-02-16 13:10:08 +00:00
Marc Mutz
1d2efe1f27 QDateTime: micro-optimize QDebug op<<
Instead of constructing a QString that describes the QDateTime
instance, stream the constituents of the string into QDebug
directly, using op<< for Q_ENUM, now that it's available.

Adapt test to new format of enums.

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

Change-Id: I1a5ce28904edd7d0f6c8d982fd41c52e3536e036
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-02-15 19:38:59 +00:00
J-P Nurmi
85ecc44eee Add missing QPlainTextEdit::createStandardContextMenu(QPoint)
[ChangeLog][QtWidgets] Added QPlainTextEdit::createStandardContextMenu(QPoint)
overload that takes the position in document coordinates. This method enables
the actions that are sensitive to the given position eg. where the user clicked.

Change-Id: I47ed7a1afc4fcfb3318c9b7af37867aeb7f2aa35
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-02-15 14:25:01 +00:00
J-P Nurmi
25e19acca6 QWidgetTextControl: add object names for standard context menu actions
Mainly for auto testing purposes.

Change-Id: I776f9d7f28f9a04ba3f9a6bbc549d6e86bece876
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-02-15 14:24:58 +00:00
Mikkel Krautz
b6b5ba0e23 QSsl: teach the SecureTransport backend about TlsV1_0OrLater, TlsV1_1OrLater and TlsV1_2OrLater
Change-Id: I001ffebef30b47b63cae6ea9487d9e96ca85ff92
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-02-15 13:26:47 +00:00
Allan Sandfeld Jensen
839f38bcfa Remove support for some very old compilers
Remove code supporting gcc 4.0 and earlier, and MSVC 2005 and earlier.

Change-Id: I3304e11bb38c101f113c124e8e533c5578badf34
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-02-15 12:39:29 +00:00
Richard Moe Gustavsen
4ad83407dd QFileDialog: don't warn about directory url prematurly
The app can set a directory url before showing the dialog.
Since we don't really know if the dialog is going to
be native or not at that point, it is too early to warn.

Change-Id: Ie9875ca90a500258841bad702ee864a46775641c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-02-15 11:13:53 +00:00
Richard Moe Gustavsen
4834439052 QFileDialog: don't clear directory url upon show
If the app sets a directory url that is not a local
file, the url would be cleared just before showing the
dialog. The reason is that we try to convert the url
to a local file when preparing helper options, but fail.
Trying to convert the url in the first place is wrong, since
the app should be able to point the file dialog to any url, not
just local directories.

Since QFileDialogPrivate::init() calls
QFileDialog::setDirectoryUrl(), and setDirectoryUrl() calls
options->setInitialDirectory(), there should be no reason
to set initialDirectory once more in
QFileDialogPrivate::helperPrepareShow(). The easiest fix
is therefore to remove the code in initHelper() that modifies
the initial url.

Change-Id: Ia6c2113e867b1156cf9d59d347116f7df8c06d93
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2015-02-15 11:13:47 +00:00
Richard Moe Gustavsen
f9bb92df24 qstandardpaths_ios: add system path for PicturesLocation
For PicturesLocation we add a second path pointing to
system assets. This url is understood by both QFile (using
a dedicated file engine), and QFileDialog, such that if
you point the dialog to the url, it will show a native
image picker dialog.

Change-Id: Ic79393440ab399ed4802cc6d84ec7ad36cbb9369
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-02-15 11:12:12 +00:00
Richard Moe Gustavsen
bcda398001 iOS: add native file dialog for selecing photos/assets
This will add a file dialog backend on iOS. The implementation
will check if a dialogs initial directory points to the system
picture location, and if so, present a UIImagePickerController.
Otherwise it will return false upon show, which causes
QFileDialog to use the widget based version as fallback.

Change-Id: I276b630911652b6d28f60763decc7ec38f00c817
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-02-15 11:11:59 +00:00
Richard Moe Gustavsen
66a61c7d2c iOS: add a file engine to support loading assets/photos
This patch will add a new file engine that lets the
app load images from the asset library using QFile.
The engine will recognize file names with the scheme
'assets-library', which is the same scheme returned
by UIImagePickerController.

This patch will be the first of a set of patches
that lets the user open a native image picker dialog
by using a QFileDialog with directory set to
QStandardPaths::PictureLocation. This patch will
ensure that the url returned from the dialog can
be loaded using QFile.

AssetsLibrary, which is used in this patch, is actually
deprecated in favor of the new Photos framework. But
since the latter is only supported from iOS8, we
choose to use the former framework for now.

Change-Id: If2a6eb394ae4df55fb4e9e1dc245a1574d38618a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-02-15 11:11:52 +00:00
Olivier Goffart
0b7ec36816 Add conversion between Q_ENUMs and strings in QVariant
Change-Id: I9264a68d162cf20db0167dd3f976a007477786d1
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2015-02-15 08:48:01 +00:00
Jani Heikkinen
2b75c156b6 Updated BSD licensed file headers
Change-Id: I6441ff931dbd33b698d762e6f6784898f3f60fe7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-02-15 07:41:17 +00:00
Thiago Macieira
f5b609cac8 Make the printing of complex byte arrays prettier
Similar to what we've done to QString, only we print each byte that is
not ASCII as \OOO (octal representation).

[ChangeLog][QtTest] QtTest now prints an escaped version of
QByteArrays that failed to compare with QCOMPARE, instead of the hex
dump.

Change-Id: I6a8c43f138c66c998280998a242b43cd579666a0
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-02-15 06:35:43 +00:00
Thiago Macieira
8d9d2a7b85 Optimize the Latin1 conversion code in the JSON parser with SSE2
This also reduces the number of variables modified in each loop from two
(l and i) to one (just i) and avoids calling str.length() all the
time. Those should be no-op changes, but why not help the optimizer?

Change-Id: I8895c35f84d545dba45bffff13bc4147ae53eaab
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-02-15 06:35:38 +00:00
Robin Burchell
dbd21d0879 QTextLayout: Reserve space ahead of time.
We know the size, so use it instead of allowing QVector to reallocate.

Change-Id: I2d18c30ef0d050326bb03c54da61459c40eb7af6
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2015-02-15 03:50:26 +00:00
Robin Burchell
ce86d73850 QFontDatabase: Move style key near usage to avoid heap allocs
Raises delegates_text.qml to 233 ops/frame

Change-Id: I88a26d2a9e4dc12ebbbc07329141976c194555ec
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2015-02-15 03:49:46 +00:00
Robin Burchell
5a23fcfa8a QFontDatabase: Optimize QtFontStyle::Key::Key().
Similar to 46b2c74eaf, skip the translations at
all costs. They allocate, and are very expensive. To ensure we try harder to
skip them, also avoid checking styles at all unless one has been provided.

This increases delegates_text from 209 items to 221 items for me.

Change-Id: Ia18b07de7b48cee356e9506a0c5d7129621d79d2
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2015-02-15 03:49:33 +00:00
Konstantin Ritt
071b286756 Fix indentation and move some variables around
Change-Id: Ice1987242d288b0b18e77c647153e6d133135896
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2015-02-15 03:01:40 +00:00
Kevron Rees
0eec8c86b6 QDBusConnection::registorObject with interface
Currently QDBus relies on a key in QMetaClassInfo to understand the DBus interface name.
This patch allows QDBus to also use a specified interface name in the registerObject call
instead of relying on QMetaClassInfo that might not be there (if the QObject was created
in QML or Javascript for example).

Change-Id: Ie02b2c67e7deb07f43e35eb166c11833fcbf38f3
Task-number: QTBUG-44074
Reviewed-by: Kevron Rees <kevron.m.rees@intel.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-02-15 02:17:53 +00:00
Mikko Harju
06ecd74db1 Do not mark non-existent touch points as stationary
Make sure touches that were already released on an earlier
SYN_REPORT are not re-marked as TouchPointStationary.

This change has no effect on type A event processing since there
the contact state is never zeroed.

Change-Id: I2d4d705d2b3fae424b6245a75d4015dc2d86ad35
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
2015-02-14 22:12:54 +00:00
Friedemann Kleint
e812358ba8 Animation classes: micro-optimize loops.
Don't use index-based iteration, but use iterators assigning
end() to a variable.

Change-Id: Ia87532349855fa3baa748b62224fc8adf3395dc0
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-02-14 16:24:40 +00:00
Friedemann Kleint
4dd7aeee10 Add support for GPU bug list reading.
- Add support for reading out feature lists from GPU bug lists
  in Chromium format (supporting OS + version, exceptions lists,
  device ids and vendor ids).
  Add a overloads allowing for passing file name,
  data or JSON documents.

- Test reading in tst_qopenglconfig

- Prototypically have the Windows plugin read the file
  from the environment variable "QT_OPENGL_BUGLIST" and
  turn off renderers depending on the standard keyword
  "disable_d3d11" and newly introduced keywords
  "disable_d3d9", "disable_desktopgl".

- QT_OPENGL_BUGLIST can point to an absolute or relative
  path, in which case it is resolved via QLibraryInfo::SettingsPath
  and QStandardPaths::ConfigLocation.

[ChangeLog][QtGui][Windows]
Introduce experimental feature allowing the user to specify
a GPU driver buglist with some additional keywords to chooose
the GL renderer backend depending on GPU.

Task-number: QTBUG-43263
Change-Id: I8c20b0e8ee3cf575b91d0672bf405c42d3e9fb64
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-02-14 16:23:47 +00:00
Friedemann Kleint
af495c2042 Windows: Use QVersionNumber in GPU driver version.
Remove custom class.

Task-number: QTBUG-43263
Change-Id: I3399f86bbbe287560917ccda00334e348ac7da4c
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-02-14 16:22:48 +00:00
Marc Mutz
1c4e2b02aa QDateTime: make qt_monthNumberFromShortName() static
It wasn't Q_DECL_EXPORT'ed, and there is no other user in QtCore.

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

Change-Id: Iea0577d58057a145f87a00ec33995d03bacd4f88
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-02-14 08:13:51 +00:00
Marc Mutz
4fbd6ee52e QDateTime: use existing functions for short month name parsing
...instead of rolling a new one on each use.

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

Change-Id: I49e20ea859928d010990fc7a22545dbc1ef106ec
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-02-14 08:13:45 +00:00
Marc Mutz
db569428c6 QDateTimePrivate: enable read caching on m_status in setDateTime()
Help the compiler by building the new status flags in a local
instead of a member variable. Enables value tracking for that
piece of data across several non-inline function calls, leading
to less redundant reads through this->.

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

Change-Id: I2db21439464ad0fff8163a908de3b15df7c4ab6d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-02-14 08:13:38 +00:00
Marc Mutz
9a34fed728 QDateTime: pass explicit length to QLatin1String ctor
Apparently, determining that constant at compile time is a bit too much
work for GCC.

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

Change-Id: I23144e64d57e3a2e1061e69b20f2b72575c273d8
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-02-14 08:13:29 +00:00
Marc Mutz
0d0812db55 QDateTime: avoid relocations
The short month names all have length 3, so store them in a multi-
dimensional const char array instead of as a pointer table.

Effects on Linux GCC 4.9 stripped release builds:
 text   -196B
 data    -64B
 relocs  -12 (est., somehow relinfo.pl reports nonsense on QtCore)

Change-Id: If5f83e4f1eb5ba0b0f54b4144abec8b88fb8529f
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-02-14 08:13:21 +00:00
Tobias Koenig
eff19ed799 Haiku: Adapt tst_qstorageinfo unit test to Haiku
On Haiku the '/' filesystem is a pure namespace to mount
in the actual root partition (/boot), and therefor returns
0 for free/available/total bytes.

Change-Id: I60d4786389e01ee271f6cd1aba6f96b19e6a828f
Reviewed-by: Augustin Cavalier <waddlesplash@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
2015-02-14 08:12:46 +00:00
Tobias Koenig
e731a96ac1 Haiku: Implement QStorageInfo for Haiku
Use Haiku's BVolumeRoster API to provide information
about available mount points in QStorageInfo.

Change-Id: I058bbb5f3f33372edc55d3e51079d3e16815f29f
Reviewed-by: Augustin Cavalier <waddlesplash@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-02-14 08:12:15 +00:00