Commit Graph

8914 Commits

Author SHA1 Message Date
Jani Honkonen
d2bba5e553 Fix a QListViewItem width when spacing is set
The listitem width was calculated incorrectly because spacing was
not considered. This fixes the second part of the reported bug where
spacing is set. Added some tests to catch the issue relating to the
reported bug.

Also added a test to check spacing in general.

Task-number: QTBUG-21804
Change-Id: Icc6326bce914264d882a60a9fc0ebe7d2a08dbf6
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-08-19 08:52:09 +02:00
Jani Honkonen
d4385e48b8 Fix QListWidget scrolling with keys when there are hidden items
If the selected item is scrolled with keyboard keys the selected item
will go outside the visible area. The scrolling did not take hidden
items into account when calculating the amount to be scrolled.

Task-number: QTBUG-21804
Change-Id: I63da0248cec43be464898f9dc8167e739f00ccd0
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-08-19 08:51:57 +02:00
Geir Vattekar
f20472efa7 Doc: Small addition to QAbstractTextDocumentLayout::registerHandler()
Task-number: QTBUG-23345
Change-Id: I6f768472aaef95f5dd88cf896ef3e635d223b635
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@nokia.com>
Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
2012-08-18 21:08:33 +02:00
Geir Vattekar
a69425ff3f Doc: Add FOV to rogue example.
Change-Id: Ib0f4caad9bc828a94616466f303d879fc967970d
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-08-18 21:08:33 +02:00
Martin Smith
6f09e100c9 doc: Fixed qdoc errors in SSL
Fixed some bad camel case, marked some parameters with \a,
and changed a \enum to a \typedef. Removed some obasolete
text.

Change-Id: I1e69dd9f3b74129230770addc80fe1c125faf268
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-08-18 21:08:33 +02:00
Jeremy Katz
8f7a135a10 Ignore Q_DECL_NOTHROW in qdoc for Qt Core
This change was already made in the qtdoc repo, but qtcore doesn't
pick up the configuration from there.

Change-Id: I72e747d748705e508521aeba1992d0c47faf2dac
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-08-18 21:08:33 +02:00
Thiago Macieira
c9bfd34fa0 Enable QAtomicInteger for char16_t and char32_t
Those are regular, integer types, of 16- and 32-bit width,
respectively. C++11's std::atomic supports them, so we should too.

C++11 also supports wchar_t, but since that type's size can change, I
don't feel like support for it in Qt is pressing.

Change-Id: I945b641c91a8a98be82715f878c382dee58ac98b
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-08-18 18:35:50 +02:00
Thiago Macieira
2b00f97ab0 Add Q_DECL_CONSTEXPR to the isXXX functions in the new atomics.
This allows one to write code that depends on these values at
compile-time.

Change-Id: I7d78524ed9c70d4141360496d1d764dcbfa92e62
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-18 18:35:36 +02:00
Marc Mutz
624911e481 Fix -Wclobbered warnings
GCC warns:

  warning: argument 'x' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered]

Apparently, the real fix would be annotating the functions correctly
with noreturn and returns_twice attributes, but there's also workarounds
for these, at least in the png case, so adding volatile was the easier
way out here.

Needed a cast to lose the volatile again, passing the argument to qMin().

Change-Id: Id820cf9b65752359f3b8f268172ba71bc9a76784
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-18 13:59:27 +02:00
J-P Nurmi
ed7b50fdb4 Updated .gitignore
Change-Id: Ic5abac7bbcd74180dbe762b7871bb865bd2fbb76
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-18 13:59:11 +02:00
J-P Nurmi
fd234c2fc6 Auto test for passing QTextEdit as QSyntaxHighlighter parent
Change-Id: Ia225723de5b0b2085a72a2af26e2a563b65955d8
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-08-18 10:58:46 +02:00
J-P Nurmi
468c22f673 Register QTextDocument* as a meta type to fix QTextEdit::document type
Change-Id: I666845049749bfa6f88b764eefaefb0dcf05cb3f
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-08-18 10:58:37 +02:00
Thiago Macieira
129c9842ce Modernise, update and fix errors in the QUrl documentation
Update the documentation of the deprecated API to match the current
behaviour. Notably, the current behaviour is to check the correctness of
the percent-encoding even in the "encoded" functions. Also, the use of
QUrlQuery makes the matching work on canonical forms, so "%73earch" does
match "search".

Elsewhere, make sure we do not refer to the deprecated API in the
documentation of non-deprecated functions.

Change-Id: If3505ac3c6121177ad6ab18199e143775bef44b9
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-08-18 10:55:47 +02:00
Thiago Macieira
bc7e940f6b Bring back the documentation on QUrl deprecated methods
The deprecated query methods were removed along with their documentation
in commit 1c2144c39f, so restore it from
before that commit.

The rest of the encoded methods were removed along with their
documentation in commit 1372d60bde.
Restore their documentation from the previous commit to that one.

All the documentation from this commit is brought back unchanged, except
for the addition of \deprecated.

Change-Id: I1851b0dc922c681e1623359b35dfd0f505d258d2
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-08-18 10:55:47 +02:00
Lars Knoll
1bf5865a41 Fix a couple of qdoc errors
Change-Id: I79f689e08ed4a496052529af38fca72c3d4e04cb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-18 10:55:47 +02:00
aavit
94ac17c2cc Clean up QScreen::grabWindow()
Handle 0 WId parameter as meaning "desktop window"/whole screen.
Also, re-add the default values for the grab area, both for
convenience and compatibility with QPixmap::grabWindow() in Qt4.
Update the screenshot example so it doesn't comlain about usage of
deprecated QPixmap::grabWindow().

Change-Id: I2ad229113ddb8ded0388f2ebc0e8c703c6657f1f
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-08-18 10:55:47 +02:00
Stephen Kelly
f6c58d242a Add a changes file entry for QMetaType QObject related change.
Change-Id: I2f902ffe6b18034047114626dd4cbe9d2f96c2fc
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-08-18 10:55:47 +02:00
Stephen Kelly
d3a8b7db50 Exclude the qplatformdefs CMake test on Windows.
The fix for this failing test is not yet agreed to. Disable it to
allow progress with the CI system while the fix is decided.

Task-number: QTBUG-26869
Change-Id: Ia8089b8e66d750353e7c1c69597916af0d042856
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-08-18 10:55:47 +02:00
Stephen Kelly
4d9d88af6f Remove QWidgetStar.
This allows us to remove the odd hacks to get the static metaobject
for the QWidget* metatype.

The QWidget* is still an automatic metatype thanks to the QObject
partial template specialization. It is registered as a metatype
at runtime automatically in qwidgetsvariant.cpp.

Change-Id: Ie01b69eadf2cbe87af1a86c3284550f60dcf9e94
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-08-18 10:55:47 +02:00
Lars Knoll
33b2984271 Add Q_DECL_NOTHROW to the tokens qdoc ignores
This fixes a couple of qdoc errors on methods that
are declared as nothrow.

Change-Id: I22bcd18253665280a5c1c3a38539dacf8f869c57
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-18 08:34:53 +02:00
Lars Knoll
d9b1c7aa83 Fix most qdoc errors for QMap
Change-Id: I8cac3b63cab32c655f722aca467489730c3f0a42
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-18 08:34:53 +02:00
Lars Knoll
5b24e614a4 Move the statemachine documentation into qtcore
Moved the documentation from qtdoc to here, so the
statemachine class docs can link to it.

Change-Id: I49a10cc7c418d415c64ea538376eb9bd7b031c27
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-08-18 08:34:53 +02:00
Lars Knoll
cbaee92846 Move the animation overview doc into QtCore
Moved here from the qtdoc module.

Change-Id: Ib263848e0637204ec3b0cba973076ca79a25a953
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-18 08:34:53 +02:00
Lars Knoll
b963bd4e59 Fix qdoc erros in qfile and related classes
Change-Id: I56b66e6eeb06c84e1157a701a814aebb1ddf4845
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-18 08:34:53 +02:00
Rafael Roquetto
1ef74a763a Pass NEON_ASM directly to SOURCES.
This guarantees that qmake gives them the proper flags (non C++) while
building these asm files.

Change-Id: I41150f543b8fac81bcd0da963b4d0e0a19b9db2f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-18 08:34:53 +02:00
Thiago Macieira
8ab5679327 Mark simple static methods in QThread as Q_DECL_NOTHROW
These methods aren't often used, but currentThreadId() gets used in the
recursive mutex code to store the identity of the thread with multiple
locks.

Change-Id: I031cf3893aa6e7fd7a53733fc1088d295bdb9079
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-18 08:34:53 +02:00
Stephen Kelly
2ef3ac72fc Emit layoutChange signals when changing QPersistentModelIndexes.
This is necessary whenever QPersistentModelIndexes are changed. Omitting
it means that views are not able to react to the change, such as QTreeView
clearing its (manually held) QModelIndex cache, and the QItemSelectionModel
clearing the item from its storage.

It is necessary to change a QSortFilterProxyModel test which assumed setItem
does not have any such effect. That test is ported to setData instead.

Task-number: QTBUG-18539
Change-Id: Id7a602f18b9773ba4d11019418de886860d26d3e
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-08-18 08:34:53 +02:00
J-P Nurmi
72604f8eb9 QAbstractSlider: fix qdoc warnings
Change-Id: I996d45513a0239d0ed11669ce6e238955ec8a31b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-08-18 06:17:47 +02:00
J-P Nurmi
73d8a13c96 QSlider: fix qdoc warnings
Removed some Qt3 support leftovers and docs for qt_qsliderStyleOption()
that qdoc wasn't able to tie to anything.

Change-Id: I49bb886b639fe11e4923ef8486e0b9f8a966b10c
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-08-18 06:17:45 +02:00
J-P Nurmi
28288b531c QLCDNumber docs: cleanup Qt3 support leftovers
Change-Id: I22378c5334ac830e94060f20568e200f0ee49280
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-08-18 06:17:37 +02:00
Frederik Gladhorn
a5ab0a472a Remove docs for removed functions.
Change-Id: I75ec0137c56581653ee0dd6fd84f10f0a6c3429c
Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com>
2012-08-18 06:17:07 +02:00
Frederik Gladhorn
3cc7eab39f Reference proper example.
Change-Id: Icda7e21f7e1eee8d4a6939ce3a50d1874ecda1e6
Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com>
2012-08-18 06:15:53 +02:00
Frederik Gladhorn
575f6f5325 Remove outdated docs.
Change-Id: I6eaffdad3b800b7d90478cb7c4044ec27e659ec9
Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com>
2012-08-18 06:15:34 +02:00
Marc Mutz
d297989ad2 QMessageLogger: mark noDebug() as nothrow
Change-Id: Ib01ad955844e8da376c687876141ad8f21776613
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-18 06:15:18 +02:00
Marc Mutz
3d3c5dc44e QMessageLogger: make member functions const
Just because we can :)

It looks a bit weird that QMessageLogger has a constexpr
constructor, but no const methods...

Change-Id: I794dd2b3326c45be17b29decb47c9cac4778d397
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-08-18 06:15:14 +02:00
J-P Nurmi
24bc6342ca Moved guibooks.qdoc from qtdoc to qtwidgets
Change-Id: I69e07b7a343c99ebafc7bf4587041b6f9ddbd37e
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-08-18 03:34:50 +02:00
Jan-Arve Saether
126b0ccf67 Exclude snippets
Change-Id: Ia31d7923e9a121eb7c16a1fe059dc8c9a5b61bd1
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-08-17 22:45:27 +02:00
Sergio Ahumada
64d22311d8 Doc: Fix spelling errors
Change-Id: Ibae8d10183f6b15a16b1499daa2df8802dbb014e
Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
2012-08-17 22:45:27 +02:00
Frederik Gladhorn
751743af4b Make qdoc ignore Q_WIDGETS_EXPORT.
Change-Id: Ic76ba6260a219f5a7f336e6bc15654bc827dfcd3
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-08-17 19:41:59 +02:00
J-P Nurmi
f3caf6d8b1 QTabWidget docs: cleanup Qt3 support left overs
Change-Id: If73848b0b8dc424b3429f845aff383d088a6a367
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-08-17 19:41:48 +02:00
J-P Nurmi
f0c883defa QTabBar docs: cleanup Qt3 support left overs
Change-Id: If2c9245ad454b1f34c44f1d0a0c61700cea53cf3
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-08-17 19:41:39 +02:00
J-P Nurmi
e8a59c1770 QDate/TimeEdit: fix qdoc warnings
Warnings caused by c3e1ab:
../widgets/qdatetimeedit.h:208: No documentation for 'QTimeEdit::time'
../widgets/qdatetimeedit.h:220: No documentation for 'QDateEdit::date'

Both 'date' and 'time' are declared and documented in QDateTimeEdit.

Change-Id: I287b5f20568e4055e6922eb1a70aeedf220de823
Reviewed-by: Shawn Rutledge <shawn.rutledge@nokia.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-08-17 19:41:28 +02:00
J-P Nurmi
c199297b65 QMenuBar: fix qdoc warnings
Removed Qt3 support left overs, marked QMenuBar::platformMenuBar()
as internal, and removed the reference to
qt_mac_set_native_menubar() that was removed in 2922f8.

Change-Id: Ia6af9bd399c88fafab26789278b4c82312d6d9c7
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-08-17 19:41:09 +02:00
J-P Nurmi
a7f6853923 QScrollBar: fix qdoc warnings
Removed some Qt3 support leftovers

Change-Id: Idd8e05fd96f5eb0816f79e6684293c9477d4d52f
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-08-17 19:40:38 +02:00
J-P Nurmi
e7c98254d0 QFrame docs: cleanup Qt3 support leftovers
Change-Id: I8c51f0a379c03e4bdd9dbdccc6cdc98a7013c40e
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-08-17 19:32:32 +02:00
Jan-Arve Saether
526da72e99 Fix a bug in qdocs handling of excludedirs
The bug was there because the way qdoc tries to exclude the directories
given in the "excludedirs" variable:
It did a simple string comparision on the candidate path (to include)
with every string in the "excludedirs" variable.

However, this did not work for all cases, since the paths are not
canonicalized.
For instance, the problem I faced was that the following qdocconf
fragment: (config file located in doc/qtwidgets.qdocconf)
sourcedirs  += ..
excludedirs += snippets

Since qdoc would recursively parse all subfolders of sourcedirs, it
would at one point visit the snippets folder, but it would have the
relative path "../doc/snippets", which did not match with "snippets",
causing snippets to not be excluded.

In addition, it seems that qdoc tries hard not to use absolute paths
(maybe because of more human-friendly error messages). I therefore
chose to canonicalize the relative paths.

As a side-effect this also give a better output from qdoc, as
../doc/foo.qdoc:42: Missing link
will become
foo.qdoc:42: Missing link

Change-Id: If9c25fa569abd03542bd12675acd44d8f4e0282c
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-08-17 19:31:50 +02:00
Jan-Arve Saether
8160ca6dfd Clean up docs for graphicsview.
* doc/snippets/graphicsview.cpp is moved from the qtdoc repo
* doc/images/graphicsview-parentchild.png is taken from 4.8

There are still some problems with references to examples, but
Casper meant that Jerome was working on that, so I'll leave
those fixes out.

Change-Id: Ieac8e6564344851fe8e77f2b346b152e57f8485c
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-08-17 19:30:38 +02:00
J-P Nurmi
45982e6c57 QComboBox docs: cleanup Qt3 support leftovers
Change-Id: I59352edee99321c6119aee9c0f5e428a5371c997
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-08-17 19:29:35 +02:00
Rafael Roquetto
f4f185edd9 Decouple -lang-c++ from CXX command on QNX mkspecs
Making -lang-c++ integral part of the $CXX command was wrong, because there are
cases where $CXX must be called without the -lang-c++ file (when building asm
files for instance). This commit moves the -lang-c++ to $CXX_FLAGS where it
belongs.

Change-Id: I667c8d722105c6117fcd8ff3102dbdfcb890b24f
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2012-08-17 17:06:44 +02:00
Marc Mutz
727039c8e8 QThreadPool: fix race on 'queue' in stealRunnable()
The code under mutex protection already implicitly handles the case where
queue.empty(), so just removing the pre-lock check suffices.

Change-Id: I01467aff62e61bb4efd16359dd64546ff51c6bad
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-08-17 16:28:01 +02:00