Commit Graph

10162 Commits

Author SHA1 Message Date
Martin Smith
9dbe3dc3a6 qdoc: qdoc now can run in 2 passes
Two command line options have been added, -prepare and -generate.
If you run qdoc with -prepare, qdoc reads and parses the source
files but does not generate the documentation. It only creates
the .index file for the module you are running qdoc on.

If you run qdoc with -generate, qdoc reads and parses the source
files as well as the .index files created by running qdoc with
-prepare, and it generates the documentation but no .index file.

If you run without either option, qdoc runs as before, i.e. it
runs both passes as a single pass.

Task number: QTBUG-27539

Change-Id: Idbfe3f0f9dff58283596b504f00dff3f70f6e371
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2012-10-13 05:51:19 +02:00
Martin Smith
8473b6d05c qdoc: Allow empty character literal ''
qdoc's tokenizer was reporting an error for the
empty character literal ''. Now it allows it.
Apparently it makes sense in .js files.

Task number: QTBUG-25775

Change-Id: If407427fad9b65a035c2c4785d53c9e3d5202e62
Reviewed-by: Martin Smith <martin.smith@digia.com>
2012-10-13 05:51:19 +02:00
Konstantin Ritt
264eeb68b2 QFont: Fix build with QFONTCACHE_DEBUG
Change-Id: Ifc89af71cdf6a5f9e4114266030cf265042db626
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2012-10-13 03:18:58 +02:00
Konstantin Ritt
ec4593d6d0 QGlyphRun: Fix isEmpty() and boundingRect() didn't work after setRawData()
Change-Id: I44a347ef24961493d6b8353abbb215c713ccce52
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2012-10-13 03:17:53 +02:00
Konstantin Ritt
4717d36c91 Fix QTextBoundaryFinder usage cases in QAccessible2
Make the implementation safer and closer to what
http://www.linuxfoundation.org/collaborate/workgroups/accessibility/ia2/ia2_implementation_guide#boundaries
requires us to do.

Change-Id: I00af4697e52a9b6e7f5d7b3f403b29126fa1517b
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-10-13 03:17:39 +02:00
Konstantin Ritt
539ef45689 Update/fix QTextBoundaryFinder simple usage cases in qtbase
Change-Id: I4d3000558bce86e2de3c32247915868ba18fc8b7
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-10-13 03:17:28 +02:00
Martin Smith
5a1e30df86 qdoc: qdoc now can run in 2 passes
Two command line options have been added, -prepare and -generate.
If you run qdoc with -prepare, qdoc reads and parses the source
files but does not generate the documentation. It only creates
the .index file for the module you are running qdoc on.

If you run qdoc with -generate, qdoc reads and parses the source
files as well as the .index files created by running qdoc with
-prepare, and it generates the documentation but no .index file.

If you run without either option, qdoc runs as before, i.e. it
runs both passes as a single pass.

Task number: QTBUG-27539

Change-Id: Idbfe3f0f9dff58283596b504f00dff3f70f6e371
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2012-10-12 15:57:46 +02:00
Martin Smith
206f100a0d qdoc: Allow empty character literal ''
qdoc's tokenizer was reporting an error for the
empty character literal ''. Now it allows it.
Apparently it makes sense in .js files.

Task number: QTBUG-25775

Change-Id: If407427fad9b65a035c2c4785d53c9e3d5202e62
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2012-10-12 15:57:34 +02:00
Tor Arne Vestbø
6234dadf09 doc: Fix a few doc errors for QtSQL
The examples include path already contains 'sql', so we can't prefix the
includes with 'sql' as well. Changing the include path to also include
the parent examples directory is not an option, as qdoc will then try to
generate output for example single example.

Change-Id: Ifae07af86e60e6105a0625f29fbd6bc8f73b2550
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2012-10-12 15:06:30 +02:00
Tor Arne Vestbø
9f657424aa doc: add missing dep from qtcore to qtgui
Change-Id: Ie7cf8236b376376a320e2de5ca65d2cd7da91c2f
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2012-10-12 15:05:48 +02:00
Michele Caini
a895359c19 Review of documentation.
Documentation has been updated to reflect changes in Qt5.

Change-Id: I3d54d1875962bd27c43bb360ae7b3fda0b7702ba
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-10-12 08:15:17 +02:00
Stephen Kelly
ff1a514913 Mark QTreeView test as significant.
I can't find any failures in the CI logs, as reported by the bug.

Even if there is still an unstable test here, it is not appropriate
to mark the entire test as insignificant, as that hides regressions
in the entire class.

Task-number: QTBUG-23638
Change-Id: I1aeaf6e725bf28e9ac03c9330a67e51241b9272b
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-10-12 07:52:50 +02:00
Konstantin Ritt
da7111be51 QTextBoundaryFinder: Fix handling of break opportunities
Add BoundaryReason::BreakOpportunity flag that will be returned by the
boundaryReasons() when the boundary finder is at the break opportunity
position that might be not an item boundary.
This is the same as (StartWord || EndWord) in Grapheme and Sentence modes;
in Word and Line modes, BreakOpportunity flag might occur between the words
or in between of Line boundaries (e.g. in conjunction with SoftHyphen flag).
In other words, the text boundaries are always break opportunities, but not vice versa.

StartWord and EndWord flags has been deprecated by new StartOfItem and EndOfItem
flags which are not about the word boundaries only. In line breaking,
StartOfItem and EndOfItem are set for the mandatory breaks only.

Change-Id: I79bf297e2b988f5976f30cff0c8ca616385f6552
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2012-10-12 07:44:51 +02:00
Konstantin Ritt
8b41f22f5c Fix tst_QTextEdit::fullWidthSelection2() for shadow build
Search for the test data files in the test data directory, not in the current dir.

Change-Id: I746e717bae575364102c1bb5c2888332d94c374f
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2012-10-12 07:44:34 +02:00
Samuel Rødal
dfb55f8a6c Fixed cosmetic line drawing where begin and end points are equal.
This case has typically required specific work-arounds in other
rendering paths as well.

Task-number: QTBUG-25153
Change-Id: I217e710a30222792ebca3bf297e438d944c32992
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-10-11 13:11:48 +02:00
Peter Kümmel
47b99599e8 QVarLengthArray: use memory on stack if possible
After allocating memory on the heap it is ATM not possible to use the
memory on the stack again, QVarLengthArray then uses/resizes only
the memory on the heap. But the memory on stack could be used
if it is big enough.

Change-Id: I566003c25dd1093eb6ba8087a1e5378a11712934
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-10-11 02:47:52 +02:00
Peter Kümmel
a47f21edd6 Make QVarLengthArray exception safe in case of OOM
After a exception is thrown in resize(), QVarLengthArray has an
invalid state with ptr == 0. On the next resize call when malloc
returns a valid pointer, oldPtr is 0 and it could crash in
memcpy because the pointer to the source is 0.
The patch ensures the valid pointer isn't overwritten with NULL.
When exceptions are disabled the user must ensure that malloc will
not fail.

Change-Id: Id12a5e3e1eacc551e4d1b64cba8e8414cfebd6e1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-10-11 02:47:40 +02:00
Jocelyn Turcotte
191c0e300b Fix a "warning: 'operator+=' is deprecated" when building with clang
Any file including qstringbuilder.h would trigger a warning when
compiled with QT_ASCII_CAST_WARNINGS defined since it implicitely
converts a QString to QByteArray.

Explicitely call toUtf8() to fix the issue.

Change-Id: If20f9d4571c5d1ed789564196c9f1331e1efd1d9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-10-11 02:47:36 +02:00
Jocelyn Turcotte
e3b7c23ec7 Remove trivial debug output from QSpiAccessibleBridge
This information can get noisy when windows get opened/closed frequently
during auto tests.

Change-Id: I2777b51c97b3108be3d784794e12e20985d4d65b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2012-10-11 02:47:34 +02:00
Jerome Pasion
dd8fd13f3f Qt Widgets: Added a landing page
-Landing page which lists articles in the module, including:
    -Graphics View, Model/View, Style Sheet, and widget galleries
-Renamed some titles and a whitespace fix.

Change-Id: I84be14d9a425ef380162e9a55ce2742c6812f510
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
2012-10-11 02:47:23 +02:00
Tor Arne Vestbø
087efb572a Modularize documenation build
qdocconf files can now reference $QT_INSTALL_DOCS to pick up e.g. global
includes, instead of using relative paths. Qt modules will automatically
get a doc target that builds and installs into the right place (including
supporting shadow-builds) if they set QMAKE_DOCS before loading(qt_module).

Change-Id: Ia408385199e56e3ead0afa45645a059d1a8b0d48
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2012-10-10 23:27:03 +02:00
Pierre Rossi
9adf7fb708 Revert "Handle additional format ranges when itemizing."
This reverts commit 101d04681f.
That change seems to have introduced a few regressions, and
Creator hits an assertion that it introduced because it assumes
the additionalFormats consists of well-formed ranges
(QTCREATORBUG-7995).

Change-Id: Ic4ae761e6e7f6df8a6b5ca565ceb250647420c15
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2012-10-10 23:27:03 +02:00
Giuseppe D'Angelo
361ab4fe86 Move QValidator tests to QtGui
Q*Validator classes are not in QtWidgets,
so move them where they should stay.

Change-Id: Ie6ea45a026e640fad131002bc9762c575235f3f4
Reviewed-by: David Faure <david.faure@kdab.com>
2012-10-10 23:27:03 +02:00
Morten Johan Sorvig
d4d81fe68a Remove handleSynchronous* functions.
There are now two different ways to implement synchronous
event processing. The platform plugins can choose which
one to use.

1) flushWindowSystemEvents()
   Use to flush the event queue at one point, making
   preceding calls synchronous.

2) setSynchronousWindowsSystemEvents(bool enable)
   Makes all handle* functions synchronous, bypassing
   the event queue completely.

Change-Id: I020b80c731fd13f855a377d7c91d06a4e39b6a0b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2012-10-10 19:49:22 +02:00
Frederik Gladhorn
d242c951be Do not handle invalid accessibles in atspi bridge.
Change-Id: I13a7dd1e190c5d3a5bb8be0ee66c2f18d0d3a1b5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-10-10 17:07:46 +02:00
Tor Arne Vestbø
3f7388bc1e Centralize place where we ensure qdoc is built before generating docs
Change-Id: Ie0220d3c76990f6052edcd8c738e4e2807f35c71
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2012-10-10 14:44:51 +02:00
Tor Arne Vestbø
96bc659ea1 Ensure that Qt.module.docs is set when first creating the module-fwd file
This is a follow-up fix to aef441b1.

Change-Id: Ie5e92ecc55ddcbab3e7830a99a77d3748a5568c1
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2012-10-10 14:44:47 +02:00
J-P Nurmi
c0893962ef QGtkStyle: use gtk_widget_get_style()
Do not access GtkWidget::style directly, it doesn't exist in GTK3.

Change-Id: I947776848f5dd64011a40446fcdb9079f295f182
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-10-10 14:43:59 +02:00
Jan Arve Saether
9f96bf2023 Fix a regression with regards to hfw behavior in QStackedWidget
This is a regression because we made QStackedWidget actually
support heightForWidth in 4.8. This was done with change
4780f94e391b5e881497c5228661dead42c821fa.

The problem was that heightForWidth was not calculated correctly
because some of the pages were hidden. The hidden pages were
actually not contributing to the hfw of the QStackedWidget at all.
This again caused the QStackedWidget to change its heightForWidth()
value when the current tab changed, which again could cause "jumps"
in the UI when switching tabs (as demonstrated in the task).

The problem was that the patch relied on calling
QWidgetItem::heightForWidth(), and this function would return -1
if the widget was hidden. However, QWidget::heightForWidth() does
not have this magic and returns the proper hfw value regardless
of its visibility.

One could argue about the correctness of this patch, but since
QStackedLayout::sizeHint() disregards QWidgetItem::sizeHint() (it
asks the widget directly), we do the same in
QStackedLayoutHFW::heightForWidth() for consistency.

In addition, QStackedLayout enforces that only widgets can be added
to it, and you cannot add your own QLayoutItem subclasses to it:

  qWarning("QStackedLayout::addItem: Only widgets can be added");

Task-id: QTBUG-24758

Change-Id: I349cf8f4215e4581ea237ef773d53dcdf3db176b
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2012-10-10 14:22:58 +02:00
J-P Nurmi
f92f78094d tst_QMenuBar: remove QSKIP's -> omit whole test cases instead
Change-Id: I2cf356c5790fd7f2b27a9032e2effacd098b3d05
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2012-10-10 14:04:02 +02:00
Konstantin Ritt
f0ee31dc93 QTextBoundaryFinder: Introduce BoundaryReason::MandatoryBreak flag
that will be returned by boundaryReasons() when the boundary finder
is at the line end position (CR, LF, NewLine Function, End of Text, etc.).
The MandatoryBreak flag, if set, means the text should be wrapped at a given position.

Change-Id: I32d4f570935d2e015bfc5f18915396a15f009fde
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-10-10 13:26:13 +02:00
Konstantin Ritt
008e5ba61a Invalidate old QImage data if load()/loadFromData() has failed
This guarantees one will never get `!img.isNull()` after
load()/loadFromData() has failed, even if the image was
not null before.
Apply the same fix to QPixmap and QPicture.

Change-Id: Ida1ad6a6f0fc830df8e75ada0c163fc2d3360dea
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-10-10 13:24:23 +02:00
Konstantin Ritt
34c31cd74c Avoid warnings about an unreachable code
Change-Id: I57c2967db4c1bd2c39ecb3eac9b18eb7455c6a50
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-10-10 13:24:17 +02:00
Gabriel de Dietrich
06332df743 Mac: Bring back "Text boxes and list only" tab navigation
Added ThemeHint::TabAllWidgets as a mean to access that platform
specific bool. The default implementation returns always true when
querying QPlatformTheme::themeHint().

Several auto-tests had to be updated to reflect for qt_tab_all_widgets'
type change. One XFAIL removed from tst_QApplication::focusChanged().

Task-number: QTBUG-24372
Change-Id: Ie1f0486c19898fe54c53aa4a27e378485075e512
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2012-10-10 13:15:57 +02:00
Gabriel de Dietrich
5715455901 tst_QApplication: Make sure the native style is being used
The tst_QApplication::args() auto-test sets the style to windows style
but there is no way to reset the style back to the native one. This
makes tst_QApplication::focusChanged() fail on Mac in some cases,
since not all the styles respond the same way to tab vs. strong
focus changes.

Change-Id: I91e39c1dd0fad4d90f3a13ab50a5e9758922ac28
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2012-10-10 13:03:00 +02:00
Martin Smith
9418be80ec qdoc: Implements the -no-link-errors option
The -no-link-errors flag tells qdoc not to print any link error
messages at all. This is useful for finding and fixing all non-link
errors in a module.

Task number: QTBUG-26870

Change-Id: Id4b0eebb6c0509c57d2f01763b6dedbfb6756a91
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2012-10-10 10:44:12 +02:00
Morten Johan Sorvig
c12b4f2685 Cocoa: Send keyboard modifiers with mouse events.
Task-number: QTBUG-27462

Change-Id: Icb9352fcae6f92885d4f1381aa8014fef039149b
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2012-10-10 10:44:12 +02:00
Samuel Rødal
3192cd88c5 Added missing keysym to handleExtendedKeyEvent in xcb plugin.
Now it's propagated to QKeyEvent::nativeVirtualKey() as it should.

Task-number: QTBUG-27353
Change-Id: I40921b99662951decc83d2278e0cd337266dd530
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2012-10-10 10:44:12 +02:00
Friedemann Kleint
0de7440cc6 Windows: Filter out events sent during DestroyWindow().
Task-number: QTBUG-26933

Change-Id: Ie7aaf9f0c9c12a33b059e796a3be161a2d60c64e
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
2012-10-10 10:44:12 +02:00
Miikka Heikkinen
fe8eb057fa Fix scrolldown arrow not showing on popup for QMenu
Scrolldown arrow was not shown when a taller than screen QMenu was
opened because the check to draw it used the size that was already
adjusted to the screen.

Fixed by using the actual menu size in the check. Also fixed the case
where the menu was scrolled, closed, and reopened, in which case the
size hint would return incorrect cached value. This led to scrolldown
arrow not being shown in case the menu was previously fully scrolled
down.

Task-number: QTBUG-27445
Change-Id: Icd8d774071662a9317b3ac53cb05b31cadba96ff
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-10-10 08:45:22 +02:00
Stephen Kelly
43325a23f3 Delete the QVariant ctors taking global Qt enum values.
They have unexpected results in Qt 5 (the Qt::GlobalColor one works
as expected in Qt 4, but was removed in Qt 5):

 QVariant v = QVariant(Qt::red);
 qDebug() << v; // QVariant(int, 7)
 v = Qt::red;
 qDebug() << v; // QVariant(int, 7)

The correct way is to use:

 QVariant v = QVariant::fromValue(QColor(Qt::red));

The deleted constructors are the ones for which there is a class
with an implicit constructor taking the enum, and that class is
a built-in metatype.

QLocale::Language and QKeySequence::StandardKey would also fit
the description, but I can't include the header for QKeySequence
as it is in QtGui, and I don't want to include the qlocale header
in qvariant.h. Putting a QLocale::Language is probably very
uncommon anyway.

The QTextFormat test is doing the wrong thing, but the result isn't
being tested. Added new tests which fail before the patch.

Change-Id: Ia38a0784990f4d40ff7457a86daf58aabd4964eb
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2012-10-10 08:45:22 +02:00
J-P Nurmi
05541111ae QGtkStyle: use gtk_widget_get_parent() and gtk_widget_is_toplevel()
GtkWidget::parent does not exist in GTK3, and GTK_WIDGET_TOPLEVEL has
been deprecated since GTK 2.20 - > use gtk_widget_is_toplevel()
(available since GTK 2.18) instead.

Change-Id: I0f082b2d69a795cadb321802f25c9993029f6865
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-10-10 08:45:22 +02:00
J-P Nurmi
e91b27b610 QGtkStyle: use gtk_widget_get/set_allocation()
Do not access GtkWidget::allocation directly, it doesn't exist in GTK3.

Change-Id: I8ce69fab19ce8f3afe35d0d30d4e28b0348fdaf1
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-10-10 08:45:22 +02:00
J-P Nurmi
3c05a0f3e7 qmake: fix .pc install target dir separators on windows
Task-number: QTBUG-26455
Change-Id: I578345b1676d0d2e812e0ab2e48468b4a8013ee9
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-10-10 08:45:22 +02:00
David Sansome
c3ffcbd9a2 Scale icons returned by QIcon::fromTheme.
The icon engine behind icons that are loaded from QIcon::fromTheme does
not scale any pixmaps that it returns. When using an icon theme with an
incomplete set of icons (for example, only a "128x128" folder),
QIcon::pixmap will always return 128x128 pixmaps even if you ask for
one of size 22x22.

This is contrary to the QIcon::pixmap documentation that says "The
pixmap might be smaller than requested, but never larger."

This patch uses the same code that is in the main QIcon class in the
PixmapEntry QIconLoaderEngineEntry to scale pixmaps if they are too big.

Change-Id: Ic25a3628ac82cfb899574245f658490a2dd49d54
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-10-10 08:45:22 +02:00
Samuel Rødal
3d52d67096 Compile fix for when XCB_USE_GLX is not defined.
Fixes compile failure introduced by 394249616c.

Change-Id: I5794d22ee87eb18c08ea1de227b943f2e675356c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-10-10 08:45:22 +02:00
Thiago Macieira
267b1a791d Optimise the deletion of a QSharedPointer with no custom deleter
When QSharedPointer is created with no user-specified custom deleter,
instead of storing a pointer in ExternalRefCount::destroyer to a
static function which, in turn, calls normalDeleter<T> indirectly (via
another function pointer), specialise the CustomDeleter class and make
it not store the pointer, but instead do the deleting directly.

The benefits are:
 - the QSharedPointer's private data is smaller
 - there is no double-indirection via indirect jumps to the actual
 deleter

Change-Id: Ice5653c144912efb1226e432267a047b9799aaca
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-10-10 08:45:22 +02:00
Joerg Bornemann
1c8739eda1 fix links in INSTALL
Change-Id: I633dc1e2a4af8fbf27ae6ee85878768210197def
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-10-10 08:45:22 +02:00
Thiago Macieira
66324e3049 QElapsedTimer: Instead of two ints, store only the clock type
We don't need two ints if we can do it with one. We need to store only
the clock type to be used, which is either CLOCK_MONOTONIC or
CLOCK_REALTIME. In addition, we need an invalid value to indicate that
the test hasn't been done yet.

This also gets rid of an atomic that wasn't QBasicAtomicInt.

Disassembly of the compiled code indicates this is the most optimal
solution:
 - one single variable load
 - one test-and-branch to verify that a test is needed
 - straight call to clock_gettime afterwards

Change-Id: I49788e45b50b6b7fcb7ba4e9332e5352a4428933
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-10-10 08:45:22 +02:00
Jon Severinsson
4ec79a151f Simplify QDate::addDays() impementation
No need to check for overflows since the change to qint64. as less than
half the qint64 range is a valid julian day, any overflow will be
detected as an invalid date anyway.

Change-Id: I3b6cad24e245ed9418c5804484f846b0b692153a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-10-10 08:45:22 +02:00