Reformat the MSVC feature detection to be similar to other compilers, ie.
1. Inside the C++11 features section instead of where the compilers
are detected
2. In one block for the compiler, with sub-blocks for the version.
However, it's now not 100% compatible with the previous version,
since Q_CC_INTEL is now explicitly excluded while before it was
implicitly included in the MSVC case. I have no idea whether
that matters, since Q_CC_INTEL is handled for itself further up
already.
Change-Id: Id9e8da0a5394ad5643bcb29493f14bc6e8264c13
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
A recursive mutex operates on top of a non-recursive mutex. Therefore,
we can bypass the test for recursive.
The end result is simply that the compiler can inline the locking and
unlocking a little better inside the lock() and unlock() functions
Change-Id: Ic06d1344ccd411c22cbdef74536f3a4d368d75d7
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This detected the same missing detach()s in QUrl::resolve.
Everything else works, no need for a mutex in Qt5's QUrl.
Change-Id: I0da51b7b0c6b810d314a26d4b638383cd17de12b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
No other call to fileInfoGatherer.getInfo(info) is #ifndef'ed on
QT_NO_FILESYSTEMWATCHER, so this one shouldn't be, either.
Change-Id: If145226c13d77460d6169a9ed3028647b0f565b5
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Majid Khan <mkhan3189@gmail.com>
When dragging and dropping within the same application, the QDropEvent
should contain exactly the same instance of QMimeData as it was set to
QDrag.
This solves the problem in
https://bugreports.qt-project.org/browse/QTBUG-26953
Change-Id: I3bc4da845ff4293c509343c1c8c62fc331416ec0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
\Auml for a with umlaut doesn't seem to work with qdoc anymore,
so replace this with the unicode value instead. Also, add
reference to arguments in glyphRuns() function.
Change-Id: I31861b384b822d1fbdcafbeeac07ea68a0e5fd07
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
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>
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>
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>
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>
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>
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>
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>
The rest of the code uses #ifdef/#ifndef, so do so here, too.
Change-Id: I4811755f9a1c2a1cab371e3bea78d3c5f9af086e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
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>
The QPlatformBackingStore::endPaint function does not take any
parameters.
Change-Id: If15d7824d65a52c38332c6676c12a954469a58ab
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
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>
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>
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>
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>
Use the filterNativeEvent function, which also takes the name of the
event.
Change-Id: Ifa3dd6285a2a526b5c3de5a86a74ead706534759
Reviewed-by: David Faure <faure@kde.org>
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>
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>
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>
Function was removed in 1582407fc7,
but the documentation was left behind.
Change-Id: Ib59197221e3be0e13db958ab3efdcc95b7c52452
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
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>
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>
\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>
This example used to refer by default to qt.nokia.com.
Change-Id: Iecb682d0deb6270da91baf26897d44b16b39d09e
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
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>
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>