Commit Graph

9057 Commits

Author SHA1 Message Date
Eskil Abrahamsen Blomfeldt
1349299f45 doc: Fix several text-related qdoc warnings
Also adds a new snippet which is just copy-pasted from the
old documentation, because the snippet-file previously referenced
seems to have disappeared.

Change-Id: I0180715544321e076acda769cbdcbf19d50a971b
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-08-25 19:04:56 +02:00
Oswald Buddenhagen
72a7c43e90 filter standard paths from mysql_config & pg_config
standard paths should never be added to compiler/linker lines, as they
are likely to mess up the lookup order.
pkg-config does that filtering for us, but the home-grown config tools
don't, so we need to take care of it.

configure.exe does not have such auto-detection, so the change is not
necessary there.

Task-number: QTBUG-26850
Change-Id: I2f523d5cffb27c3d0a16cdef6ca8a4877c9983c0
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Reviewed-by: Mitch Curtis <mitch.curtis@nokia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-08-25 17:03:17 +02:00
Thiago Macieira
ab9fde6c0c Split the futexFlags() function in two: a hot and a cold path
We could mark the cold path with __attribute__((cold)) (since GCC 4.3),
but quick tests locally indicate that the compiler is smart enough to
determine that by itself.

It will inline the hot path in _q_futex, which in turn is inlined in the
lockInternal and unlockInternal functions, whereas the cold path is kept
outside.

Change-Id: I8ae7d851d4f050498bfb491ba87d3e25453a14f8
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-08-25 10:35:34 +02:00
Thiago Macieira
c28204066c Mark mutex locking and unlocking functions with noexcept
Unlocking a mutex can never throw an exception. That doesn't make
sense and our code should make sure it can't happen. Right now,
provided that the system-level functions don't throw, we don't either.

Locking a mutex cannot throw on Linux because we use futexes
directly. A non-recursive mutex is just a futex, whereas a recursive
mutex uses a mutex (a futex) to manage a lock count.

However, on other platforms, due to the freelist, there can be memory
allocation, which means it might throw std::bad_alloc. Not because of
the freelist itself (that uses malloc and will just crash if malloc
fails) but because of Q_GLOBAL_STATIC. In 5.1, the global static will
be noexcept provided the type's constructor is so too (it is, in this
case).

Change-Id: I4c562383f48de1be7827b9afb512d73eaf0792d5
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-25 10:35:26 +02:00
Thiago Macieira
98437f0e2e Add a way for QtDBus to force a call to dbus_shutdown
This will ask the D-Bus library to free its caches. It's useful for
running valgrind on a D-Bus based application, so we can detect real
leaks.

We can't run this by default because there could be other users of
libdbus-1. Calling the shutdown function would make them stop working.

Change-Id: I9854b82afcdbc4955d6f0a1a1b49a673186242c8
Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
2012-08-25 10:34:39 +02:00
Thiago Macieira
292350f70d Print some debugging from QDBusConnection when disconnecting
Change-Id: I6e19cd8b16513faad6435d1713eab56675d07289
Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
2012-08-25 10:34:11 +02:00
J-P Nurmi
1dbdf0c580 Do not build qpa/gui dependant plugins in no-gui mode
Change-Id: I725e9127e640c0dd3cbd7f1488b16dcf4eb06377
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-25 10:30:02 +02:00
J-P Nurmi
30707eb0b6 src.pro: remove redundant & incorrect platformsupport dependency
it's already added conditionally below

Change-Id: I4df89b2822a3e6e46d8254c08fd69d0c98e680b7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-25 10:29:53 +02:00
Thiago Macieira
caa22ff8ad Use nanosleep instead of pthread_cond_timedwait for thread sleeping
There's a comment saying nanosleep's availability is questionable, but
the information of what systems don't have that is now lost in
time. It's quite likely that they were older, Unix systems we no
longer support anyway.

nanosleep comes from POSIX.1b-1993, which is merged into POSIX.1-2001,
so chances are that it's supported almost everywhere where Qt runs
(except for Windows anyway).

Change-Id: I4fd18f8715c43a42429000f3b3d2c3b7343f94b4
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-08-25 05:41:14 +02:00
Frederik Gladhorn
88c7c35b21 Improve docs.
Change-Id: I073398e4da14a1c6489c951200f022a346f4d2fa
Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-08-25 01:54:27 +02:00
Thiago Macieira
75cb66c04e Don't define QT_NO_ICONV on Windows: that comes from qconfig.h
Both the configure script and configure.exe add QT_NO_ICONV to qconfig.h
in case they can't find iconv. Since Windows doesn't use iconv anyway,
we don't need to set QT_NO_ICONV here.

MSVC likes to print a warning that a macro is redefined. That gets quite
spammy...

Change-Id: Ide9800f6f848bc0c2d8bdbcb41875a709d3e249c
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-08-25 01:54:27 +02:00
Thiago Macieira
c0c5b47a47 Add qiterator.h to tools.pri
Change-Id: I2c8182adbf513231bcef5dc2de60217753a54b76
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-08-25 01:54:27 +02:00
Marc Mutz
5254ac1f31 QDBusMetaType: #if -> #ifdef QT_BOOTSTRAPPED
The rest of the code uses #ifdef/#ifndef, so do so here, too.

Change-Id: I4811755f9a1c2a1cab371e3bea78d3c5f9af086e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-25 01:54:27 +02:00
Marc Mutz
210f762f7d qdbus_loadLibDBus: remove unneeded volatile qualification
The variable is only ever accessed under mutex protection, and
doesn't otherwise look like it could be changed by the hardware,
so remove the volatile qualifier.

Change-Id: I3bb00ed6f8017d662bbf73425a70d52116cc9297
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-25 01:54:27 +02:00
Frederik Gladhorn
85299793ba Fix doc: qglcolormap is not the opengl module
Change-Id: I134aeafbabc62e36da20e0a6df667b6c1aa0c477
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-08-24 21:32:03 +02:00
Kent Hansen
3b65c716e5 fbbackingstore: Don't overload inherited virtual function
The QPlatformBackingStore::endPaint function does not take any
parameters.

Change-Id: If15d7824d65a52c38332c6676c12a954469a58ab
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-08-24 20:29:17 +02:00
Olivier Goffart
4d5f3cf627 Test for quadratic behaviour when rendering long line in QTextEdit
QTextEdit showing long lines using lots of text format (for example
with a syntax highlighter) used to expose a quadratic behaviour which
make it impossible to edit files with long lines.

It was fiexed in the few previous commit

Task-number: QTBUG-8389
Change-Id: Ib7203497a7699a85ae1dfb70fe65d5fb36884b58
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-08-23 23:31:10 +02:00
Olivier Goffart
b1e082ec9f Fix performence problem while shaping a lines with many scripts
Fix quadradic behaviour regression introduced in commit
2e6b8b4734

Task-number: QTBUG-22275
Change-Id: I343452c6b1cd0e571770e5dadd3cd6fd3167c96d
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-08-23 23:31:10 +02:00
Olivier Goffart
c13011829f Speed up QTextEngine::setBoundary
Before, setBoundary was O(N), now it is O(log N) assuming the boundaries
are added in order. (splitItem might still be linear because of the call
to QVector::insert)

This speeds up a lot QTextEngine::addRequiredBoundaries when there is a
lot of addFormats. (For example if there is a very long line with syntax
highlighting)

Task-number: QTBUG-8389
Change-Id: I10c9fca72343f46db24b1d4f519f7747188d4009
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-08-23 23:31:10 +02:00
Olivier Goffart
4f6efe1641 Speed up QTextEngine::resolveAdditionalFormats
Don't call the linear QTextEngine::format in the loop.
Instead, keep track of the current formats by indexing their start and end position.

Task-number: QTBUG-8389
Change-Id: I89c18b804111edfab6254442cbee33da39d1a273
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-08-23 23:31:10 +02:00
Eskil Abrahamsen Blomfeldt
7dfe25e2cd doc: Fix some qdoc warnings
QDoc doesn't supported nested tags, and there doesn't seem to be
any way to trick it into thinking you've mentioned the argument
(\omit didn't work), so actually rephrasing is the only way to
kill the warning. Also add a const modifier to a signature to
make it match the declaration.

Change-Id: Ie02a488c42565205e827602959111c53e2d05a83
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-08-23 21:26:20 +02:00
Thiago Macieira
3705b93c43 Compile without the deprecated filterEvent function
Use the filterNativeEvent function, which also takes the name of the
event.

Change-Id: Ifa3dd6285a2a526b5c3de5a86a74ead706534759
Reviewed-by: David Faure <faure@kde.org>
2012-08-23 18:05:31 +02:00
Marc Mutz
c879cf0dcf xcb: fix unused static warning
The variable ptrXcursorLibraryLoadCursor is only used in code
wrapped in XCB_USE_XLIB.

Change-Id: If0b4997ac6e80a3709263d9793d1ca0dfd5907f3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-08-23 18:05:31 +02:00
Marc Mutz
75bf40ae13 linuxfb: remove unused function
debug() isn't even referenced in commented-out code, and GCC warns
about it being unused, so remove.

Change-Id: I2830b7932e18cdd3643925973995bea7fea9f277
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-08-23 18:05:31 +02:00
Marc Mutz
55819341a9 QSystemTrayIcon: fix narrowing warning
GCC complained:

  warning: narrowing conversion of
  ‘((QSystemTrayIconSys*)this)->QSystemTrayIconSys::<anonymous>.QWidget::winId()’
  from ‘WId {aka long long unsigned int}’ to ‘long int’ inside { } [-Wnarrowing]

Change-Id: I63908c884b51db203ee0ed659a152af77c295292
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-08-23 18:05:31 +02:00
Marc Mutz
8967e731a6 QNetworkDiskCache: avoid a 31-bit truncation
Network operations whose content size exceed 2G are not unheard of, and
they probably shouldn't be cached, so use the correct toX() function, one
that doesn't truncate the value in the header.

Change-Id: Ie4e68a3120c85952dd2cc9feb73c5844e20b9aa3
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-08-23 18:05:31 +02:00
Eskil Abrahamsen Blomfeldt
2f9f16a01c doc: Remove documentation for removed function
Function was removed in 1582407fc7,
but the documentation was left behind.

Change-Id: Ib59197221e3be0e13db958ab3efdcc95b7c52452
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-08-23 15:54:30 +02:00
Marc Mutz
d16b02bd17 QtNetwork: declare some classes as shared
Change-Id: Ib3eaba59836529ad0cf8e4353b54dd0cd31fd1ad
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-08-23 15:54:02 +02:00
Joerg Bornemann
8633f7ac0d qmake: fix manifest resource for non-trivial target names
The Microsoft Resource Compiler bails out if the rc file contains
non-trivial file name references. In particular it doesn't like
dashes in file names. We're now always quoting the file name.

Change-Id: I67b8d2c13010a0b2ec26cac915ebd1be95f1c274
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-23 15:54:02 +02:00
Stephen Kelly
022e3a358d Extract the QMetaMethodPrivate::ownMethodIndex method.
Change-Id: Ic96e3582ff4332ac489f7c51ed40eb1b1a0ac42d
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2012-08-23 15:54:02 +02:00
Samuel Rødal
62565321a6 Fixed missing window decorations on compiz.
Task-number: QTBUG-26954
Change-Id: I6981338d4bbc9cf1440c9d67e9d034e0553dfeae
Reviewed-by: Jason Barron <jason.barron@nokia.com>
2012-08-23 15:54:02 +02:00
Stephen Kelly
96d5c28a11 Make QAbstractItemModel::sibling virtual.
This would allow implementations to create an optimized way to create
sibling indexes.

A typical pattern of QAIM implementation is to use the same internalPointer
for each row of a subtable of a model (such that the internalPointer is
related to the common parent of each set of rows) and differentiate on the
row value in the QModelIndex. Alternatively, it is also common to have the
internalPointer correspond directly to the row value for the QModelIndex.

In both cases it is possible for the implementation to optimally create a
sibling QModelIndex in the same column as a known row. Provide a virtual
method for them to do so.

Change-Id: I3b076abcd5f6087a4cb108fbc6dceeef15529987
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-08-23 15:54:02 +02:00
Lars Knoll
25c57e3188 Make sure we don't get duplicated doc pages.
\group generates a page with the same name
as the \page comand afterwards.

Change-Id: Iaca6da21485532c8c3b13982bd06a06f3dbc0375
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-08-23 13:22:23 +02:00
Thiago Macieira
7b39a06fab Doc: Add \inmodule QtCore to all QtCore class doc bodies
Change-Id: I19100755c97cc155c76a859e19940e9f9222d34e
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-08-23 13:22:23 +02:00
Thiago Macieira
acc4c28ef7 Doc: Add \inmodule QtDBus to all QtDBus class doc bodies
Change-Id: I0aa273c355314effd563cfeda74ce7bacbef3db8
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-08-23 13:22:23 +02:00
Andy Nichols
94b7832e31 Doc: replace occurrence of \starslash in widget docs
Change-Id: I93c370e3d53b955057741bc3bf503e781fbb6244
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-08-23 13:22:23 +02:00
Jeremy Katz
adc5626f4f change http example default URL to http[s]://qt-project.org
This example used to refer by default to qt.nokia.com.

Change-Id: Iecb682d0deb6270da91baf26897d44b16b39d09e
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-08-23 11:20:37 +02:00
Andy Nichols
fc924ae47e Doc: Fix snippet and example referencing widget examples
Widget examples were moved into a widgets subfolder, but
qdoc references were not updated.

Change-Id: Id2a4573e723745b9827c664c852807d6116f8f6d
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-08-23 11:20:37 +02:00
Thiago Macieira
8e0bac89d4 tst_QMutex: add markers to the tryLock tests
Just to make it clear which two sections go together.

Change-Id: If3724d1c84172a61bdd7931cc567f4b7140d4f8a
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-08-23 11:20:37 +02:00
Pekka Vuorela
2292bf0669 Remove remaining bits of deprecated QInputPanel
Introduced during Qt5 development and renamed to QInputMethod.

Change-Id: If6744648dc98b779e65c449ae32626db574181df
Reviewed-by: Joona Petrell <joona.petrell@gmail.com>
2012-08-23 11:20:37 +02:00
Thomas McGuire
b6f92043e0 Remove unused inotify includes in the filesystem watcher test
Change-Id: I346ef6ccf7b09390bef6d35c82ecee6dee1711fc
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-08-23 11:20:37 +02:00
Kai Koehne
e177a35dfe ICU: Fix crash in codecForMib(2107)
availableMibs() unconditionally adds 2107 to the list of mibs. The patch
ensures that codecForMib() also knows about this special TSCII codec.

(Note that the autotest only really checks this code path if only this
test case is run. The other tests already fill the internal codec cache
otherwise).

Change-Id: Id987d7cecd5f5700cca75e9b85b37011f8e5c622
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-08-23 11:20:37 +02:00
Stephen Kelly
e9bc07c4f2 Remove qWaitForWindowShown(QWindow*) overload.
The QWindow* overload was introduced for Qt 5.0, but is unused already.

Change-Id: Ic07f19eac87bc93a589017407668760fceb2f632
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-08-23 08:32:17 +02:00
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