Commit Graph

9014 Commits

Author SHA1 Message Date
Shawn Rutledge
41ca2b4453 A few more random documentation fixes
@p replaced by \a, \QD replaced by {Qt Designer}, couple of enums etc.

Change-Id: I315510690bf52e42db519292b4122fa24c73bbc9
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-08-23 02:55:17 +02:00
Marc Mutz
70d8e363df tst_QTreeView: fix unused variable warning
Change-Id: Idf18e4615754d3b7b8a09d6fdec91344a7408c18
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-08-23 02:55:17 +02:00
Harald Fernengel
57e750e620 De-inline QVariant(float)
All QVariant constructors are not inline, so change QVariant(float) as
well. This allows for refactoring of QVariant during lifetime of Qt 5
without breaking QVariant(float) case.

Change-Id: Icd1fc331a1ef8a2872be811aa7d1160406038f06
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-08-23 02:55:17 +02:00
Jan-Arve Saether
80462ee678 Fix bug in configure where Qt did not compile with QT_ICONV=no
It did not compile because at the time qconfig.h was preprocessed,
QT_NO_ICONV was already defined, causing the #define QT_NO_ICONV to
fail. It should be guarded like most other defines in qconfig.h.
Also fix QT_CUPS=no, QT_ICONV=no, QT_GLIB=no, QT_NOTIFY=no and
QT_LARGEFILE_SUPPORT=64 the same way.

Change-Id: Ic9e0295756c35cb7c62e18eb9b63b1410e7de051
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-23 02:55:17 +02:00
Frederik Gladhorn
d7e1426e1e Move Qt::CursorMoveStyle docs to the right file.
Change-Id: I26cc7336b33495a2649285cfeddeadec62e94d83
Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-08-23 02:55:17 +02:00
Pekka Vuorela
2a1700f7e2 Fix accessibility unit test compilation
Change-Id: I72c931e0704175b6b48d66a6df54784bcec6860c
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-08-23 02:55:17 +02:00
Marc Mutz
6d56a21621 Logging: make qEmergencyOut() not allocate from the heap
Commit 6e6b74c0 introduced heap allocation in the form of
QString::fromLatin1().utf16() into qEmergencyOut(), a function
that's called in OOM situations and in cases where another
exception is still in flight.

Luckily, QString::fromLatin1().utf16() is just a funny way of
copying an array of chars into an array of wchar_ts, so we do
that manually now and use a static wchar_t buffer. While at it,
also throw text elision into the mix.

This commit also fixes the message passed to _CrtDbgReportW().
What should be displayed is the emergency_buf, not the format
string.

Also remove a similar allocation in qt_message_output().

Change-Id: I2c44a298fc0927bb992de4977a7e4a7b47b16b26
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-23 02:55:17 +02:00
Thiago Macieira
a3e563c091 Simple optimisation in toLocal8Bit(): call codecForLocale once only
The function is only slow the first time we call it, but there's no
reason we can't do this simple optimisation anyway.

Change-Id: Icacbbeb340838b32f5278b76d1860ad22dc9f7b7
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-08-23 00:19:25 +02:00
Laszlo Agocs
12491f35bb Fix transformation in eglfs backingstore
While not visible with forced-fullscreen windows, the formula
used to set up positioning on the Y axis is wrong. (with the GL
coordinate system Y goes 1..-1 when moving top-to-bottom)

Taken from kms' version of the backingstore which had the formulas
corrected.

Change-Id: I460a4eec925e47b08453af4e093d719567af22ea
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-08-22 22:08:54 +02:00
Friedemann Kleint
38bd71e04d Remove deprecation from enumerations in QtGui.
Referencing them in a (deprecated) function declaration causes
a deprecation warning to be emitted each time the header is
included, which causes a massive amount of warnings for qevent.h.

It should be sufficient to deprecate them in the documentation
and to deprecate function using them.

Change-Id: I531b7c893e73428703cfb302615bff382abce54f
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-08-22 22:05:55 +02:00
Thiago Macieira
88a2efaddc Move the QT_COMPILER_SUPPORTS_xxx defines to qconfig.h
This reduces dramatically the command-line for compiling Qt sources.

These are private macros, only to be used by Qt's own modules, so the
compiler setting is either the same or, possibly, better. In other
words, in the worst case, when compiling a module with a better
compiler than for qtbase, such module might not enable all the
functionality it could otherwise do.

If we switch to a buildsystem that can support this properly in the
future, these macros should be removed.

Change-Id: I71f2d12ec98c9dd40eaab9de4a17446bd1066020
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-22 21:58:45 +02:00
Marc Mutz
ebaddb62bc tst_QColumnView: fix unused variable warning
Change-Id: I41a71faa64a20cebab058cf69181104eceea2339
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-08-22 21:51:48 +02:00
Stephen Kelly
9f821f384b Optimize QAbstractItemModel::sibling a bit.
QModelIndex::sibling has a simliar optimization.

Change-Id: Ic0717d480ba0d46a4c0c88064bc9eda4c4ffe6f6
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-08-22 18:40:17 +02:00
Joerg Bornemann
d45ef22158 qmake: fix embedding of generated manifests in debug mode
The existence of the manifest backup is used as a marker to decide
whether to embed the manifest in a second link step or not.
If it's present, the embedding took place in the first link step.
If it's not present, we must link again incrementally.
That logic was implemented faulty.

Change-Id: I10154dbbbe70c7981795ac66d46a166907ba13ec
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-22 18:40:17 +02:00
Stephen Kelly
1839151992 Make keyboard search work in the current column, not only the first.
Task-number: QTBUG-26540
Change-Id: I1c365aeb013f5ddedd0589aa4c4844be759a3882
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-08-22 18:40:17 +02:00
Stephen Kelly
0c955b4976 Fix indexAbove and indexBelow to return indexes in the correct column.
They used to always return indexes in column 0.

Change-Id: I2cf4239e0a975b37548de00a1deb916fcd88b4c7
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-08-22 18:40:17 +02:00
Yuchen Deng
2b57a8ebfe Add -pipe option of win32-g++'s QMAKE_CFLAGS
Change-Id: Iad155d6340666283a31f82f8c7381f23018f7e40
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-22 18:40:17 +02:00
Oswald Buddenhagen
4d7921b819 make configure set up QMAKE_DEFAULT_{INC,LIB}DIRS
hard-coding it in unix.conf was no particularly good idea for hopefully
obvious reasons.

the windows version is so far just a stub that does what the makespecs
hard-coded - more doesn't seem worth the effort. the guys interested in
x-building may want to rectify it at some point, but it's not going to
be easy.

Change-Id: I8fedd841a8416f8c0c57018752eae9510b5d00d0
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-22 18:40:17 +02:00
Joerg Bornemann
0330798037 qmake: fix generated rc file for embedding manifests
The rc file is in the same directory as the manifest file.
Therefore the include must consist of the filename and must not include
the file's path.

Change-Id: I4f5ac11b131f39ea8c425aca93fcf82d150c0204
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-22 18:40:17 +02:00
Jens Bache-Wiig
3591c6ceda Clean up borders in cleanlooks
This aligns the dockwidget appearance in cleanlooks with
that we use for Gtk style. It should look a lot cleaner this
way as most of the borders were redundant.

Change-Id: Idf20a105f583ca8cdbba0bcb6f22b298d53cc40d
Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com>
2012-08-22 18:40:17 +02:00
Geir Vattekar
05a3420381 Doc: Fix snippet bug in State Machine overview.
Task-number: QTBUG-24719
Change-Id: Ia0c802f275eaf009e42ffef4cc538f3b3d7561d0
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-08-22 09:08:02 +02:00
Samuel Rødal
015a5e0dca Fixed non-GL applications crashing when GLX/EGL initialization fails on xcb.
Change-Id: I5a08d6067272575aa56074aaebe308c3d49299bb
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-08-22 09:08:02 +02:00
Andy Nichols
1ed8251667 Doc: change \menu to \uicontrol in application example docs
\menu command has been replaced by \uicontrol in qdoc

Change-Id: Ib105df58c565c96b34579720acb62fe64e7806c4
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-08-22 09:08:02 +02:00
Jeremy Katz
a0c017d83f remove a '.' at the end of \sa that confuses qdoc
Change-Id: I74532ba206a7e869328541599d5f184f18c224f1
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-08-22 09:08:02 +02:00
Sergio Ahumada
75901712f0 Doc: Really minor typo fix
Task-number: QTBUG-26891
Change-Id: I9b726d8766337fbb001afcb9ecbc45f51b6e363f
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-08-22 09:08:02 +02:00
Berthold Krevert
8fb8011e6a Make Qt compile with -DQDND_DEBUG and fix debug messages
Change-Id: Idf34880179e27cdd48ea3365108d2c7bca07e596
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-08-22 09:08:02 +02:00
Stephen Kelly
5eb230615d Fix minor typo in cmake files.
LIB_LOCATION is a cmake variable, not a qmake variable.

Change-Id: I1ec2feaca0c52400bd21dec371c9170dc95227b1
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2012-08-22 09:08:02 +02:00
Stephen Kelly
6b5cffdad5 Only set the IMPLIB target properties on Windows.
Change-Id: I5362ae87c90fe08460599602b54484b6d4491db8
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-08-22 09:08:02 +02:00
Morten Johan Sorvig
6c1670d8c2 Add hint for touch -> mouse event synthesizing
Commit 7808ec79 changes QApplication to synthesize
mouse events from (unhandled) touch events.

On Mac OS X this creates a conflict for two-finger
scroll swipes, which generates both touch events and
mouse wheel events: scrolling in QTextEdit will also
select the text.

Add a SynthesizeMouseFromTouchEvents platform style
hint that enables the event synthesising. Set to true
by default and false in Cocoa.

Change-Id: I1ffa5a141476aa38b81ce92a87eff676c7ec2276
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-08-22 07:01:17 +02:00
Mitch Curtis
09dd19df5c Do not consider sign in qIsNull.
The current implementation of qIsNull only returns true if the value is
positive zero. This behaviour is not useful for use cases like
QPointF::isNull, where QPointF(-0, -0).isNull() will return false.
There doesn't seem to be a reason why the function exhibits this
behaviour (-0.0 is not accounted for in the unit tests), and for the
case of QSizeF::scale it causes a bug: qIsNull is used to check for
division by 0.0 before it proceeds, which fails in the case of -0.0.

Task-number: QTBUG-7303
Change-Id: I767e5280bd26614e8e78ae62b274eb9bc4ade385
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-08-22 04:04:57 +02:00
Jens Bache-Wiig
7f469ef4cc Remove icons from buttons with Cleanlooks
The icon buttons in cleanlooks were modeled after an early version of
the Gtk 2.0 Clearlooks theme. At the time, GNOME was using
icons on all buttons. For the past couple of years, GNOME has dropped
icons on buttons by default and as this is the common behavior on
other platforms as well, I think it is time to remove them.

The button size hack was also removed due to previously emulating
a GNOME behavior. The end result at the moment is only that it makes
the button height inconsistent with other widgets.

Change-Id: I22fe8c0b3a799a807cfff74a81cebf50e8ec33d3
Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
2012-08-21 22:25:31 +02:00
Frederik Gladhorn
c3b9db438a Sort qdoc ignores.
Change-Id: Icada1b073f12273fe8d7712a82a94bc7f3595d8b
Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com>
2012-08-21 16:20:25 +02:00
Martin Smith
5f4d793d81 doc: Replaced FakeNode with DocNode
The name FakeNode was a bad choice. It was used
to represent something that wasn't derived from
a C++ declaration in a .h file. Any generic page
or QML item or any special kind of qdoc construct
was stored in a FakeNode. The name was unfortunate
because the constructs stored in FakeNodes were
just as real as C++ constructs.

So FakeNode has been renamed to DocNode, which
just refers to a documentation node. The node
type Fake has been replaced with node type
Document.

Change-Id: Ida9de8288b7b8915bf9273fd890ca84aaf05e182
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-08-21 16:15:21 +02:00
Jason Barron
6276acb59a Fix docs for QRawFont.
Use correct function name for 'swap' and replace QGlyphs -> QGlyphRun.

Change-Id: I4997a59ef643c688e8084a2013208fb760a2784a
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2012-08-21 16:13:38 +02:00
Friedemann Kleint
82860b133c Propagate initial size constraints to QWidgetWindow.
Size constraints set on a widget before the creation of
the QWidgetWindow were lost (for example, Qt Creator's
preference page).

Task-number: QTBUG-26745
Change-Id: I7c2f5aed9c8817795603e5ad3c24418d66627bab
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: hjk <qthjk@ovi.com>
2012-08-21 16:13:38 +02:00
Thiago Macieira
8133af2503 Try to work around GCC 4.6's noexcept bugs, again
Commit 7315296e9c blacklisted GCC 4.6.0
and 4.6.1 on the grounds that the bug regarding noexcept was fixed in
4.6.2. However, we have evidence of the issue remaining in 4.6.3, so it
looks like it was not the issue that the GCC team fixed.

For that reason, declare noexcept support in GCC 4.6 fatally broken and
enable it only for 4.7. It has been working fine for a month for me on
4.7.1.

Change-Id: Ic5a542235867f20657db12e0e809b83522dc7d23
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-08-21 13:41:01 +02:00
Jiang Jiang
bc7cf82dc1 Replace deprecated ATS calls with CTFontManager calls in 10.8
Change-Id: I81c0361059319575e55621123d40b7c6f3c6b699
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-08-21 13:41:01 +02:00
Jiang Jiang
a59906e0f3 Fix a bunch of Mac/clang specific warnings
Change-Id: I0ecc67d58fb7e727a88a5f546eeca01ff7554502
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-08-21 13:41:01 +02:00
Mitch Curtis
46bef9f29f Fix typo in QAbstractNetworkCache documentation.
"used be" => "used by"

Change-Id: Ibde738facab357d21604779f8b2145d32815ed66
Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-08-21 13:41:01 +02:00
Gabriel de Dietrich
4410e66f45 Making trivial snippets inline
Change-Id: I8d8b5586579d3ee460b234b5a09462586ac1cfd0
Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@nokia.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-08-21 13:41:01 +02:00
Shawn Rutledge
ed4389b055 Minor documentation fixes in item views.
Change-Id: I986662ba48840e0195f0cfd4264e4d5d8b186c51
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-08-21 13:41:01 +02:00
Peter Kümmel
2dc3181bdc merge mingw mkspec changes for cross compiling
Change-Id: I0f4705717c38ee4c05b5618c006d3cf066d75f49
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-21 11:05:20 +02:00
Shawn Rutledge
ef98762dc6 Whitespace fixes
Change-Id: Ibfb48076ad62804344db6e9e97ac90fdcf82dc04
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-08-21 11:05:20 +02:00
Martin Smith
083e4c7e51 doc: Fixed qdoc errors
These classes will not be public until Qt 5.1.
This change marks a few things internal, so they
don't cause qdoc errors in Qt 5.0. It also adds
a few qdoc comments for future use in Qt 5.1.

Change-Id: If90692b97653223d8a986f2ae1fff49c20cd444b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-08-21 11:05:20 +02:00
Shawn Rutledge
5a07e87fd2 Reuse the same QAbstractTableModel implementation for 4 snippets
They were really the same anyway.  This makes the source distro a bit
more compact and eliminates some qdoc errors of the form
../doc/snippets/reading-selections/model.cpp:51: Overrides a previous doc
../doc/snippets/itemselection/model.cpp:51: (The previous doc is here)

Change-Id: I7956f457422e9078c32de65cd421685f589c8a6c
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@nokia.com>
2012-08-21 11:05:20 +02:00
Mitch Curtis
3a7b6a74a8 Disregard milliseconds in QTime::secsTo().
"The documentation states that "secsTo() does not take into account any
milliseconds", however, this is not the case. Given times 12:30:01.500
and 12:30:02.400 secsTo returns 0. If milliseconds are not taken into
account, I would expect this to return 1 (i.e. interprets the times as
12:30:01 and 12:30:02 thus truncating the milliseconds)."

Note that tests were also written for QDateTime::secsTo(), as it uses
QTime::secsTo internally. This addresses Javier's issue in the
comments of QTBUG-9304.

Task-number: QTBUG-9304
Change-Id: I9efe0c8f710db859c1d086d67ba3e5b349a56c4e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-21 11:05:20 +02:00
Mitch Curtis
718a2251be Serialise QDateTime as UTC and timeSpec() instead of private spec.
QDateTime currently serialises its private Spec enum. If a user was to
deserialise the individual components of a QDateTime separately, the
resulting timeSpec may be invalid when cast to the Qt::TimeSpec enum.

E.g.:

QDateTime dateTime(QDate(2012, 8, 14), QTime(8, 0, 0), Qt::UTC);
// ... serialise
// ... deserialise date, time, spec separately.
// spec == 2, the value of QDateTimePrivate::UTC.
// spec != UTC, will be set to LocalUnknown.
QDateTime deserialised(date, time, spec);

This patch serialises QDateTime objects in UTC and the value of
timeSpec() as opposed to QDateTimePrivate's spec. This changes the
serialisation behaviour of QDateTime for version 13 of QDataStream.

Task-number: QTBUG-4057
Change-Id: If650e7960dca7b6ab44b8233410a6369c41df73a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-21 11:05:20 +02:00
Andreas Holzammer
17c89d157a make it possible to pass configure zlib lib name
Change-Id: I82fde11436261dab51393b35dfbf2a753df58ec9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-21 11:05:20 +02:00
Peter Kümmel
07a978d3d4 cross compile with mingw
- improve defaults
  - fix linker errors

Change-Id: I7e1deb55fb616a3890510806593a0ab9a0a31d9a
Reviewed-by: Yuchen Deng <loaden@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-21 11:05:20 +02:00
Martin Smith
194b62fb38 doc: Added \relates command to some function qdoc comments
When a documented function is global, it must be related
to a namespace or class, or its documentation won't be
included anywhere.

When a documented function is a class member, the function
signature in the \fn command must include the class name
qualifier, e.g. QImage::isValid(), not just isValid()

Change-Id: I53e2230fa9468f94d51aec8cc76781d7ab755a13
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-08-21 11:05:20 +02:00