The QNetworkReply::uploadProgress signal is intended for updating UI
elements such as a progress bar.
Limit the signal emissions to 10 per second to prevent overloading
the UI with updates.
As with the downloadProgress choke, this is implemented by dropping
signals that occur within 100ms of the previous emission.
The 100% signal is always emitted (bytesSent == bytesTotal)
When the upload size is initially unknown, this behaviour is still
provided by the upload device emitting a suitable readProgress
signal when EOF is reached.
Task-number: QTBUG-20449
Change-Id: I77e03c8a49109106e1c375ee00380293fd326b63
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
The QNetworkReply::downloadProgress signal is intended for updating
user interface components (e.g. a progress bar).
Limit signal emissions to 10 times per second, with an additional
signal just before the finished() signal to provide the 100% progress.
For the size of download where a progress bar is necessary, this
update frequency seems sufficient.
The implementation is done by dropping signals which would be emitted
less than 100ms after the previous signal emission.
Task-number: QTBUG-20449
Change-Id: I9c2dbe16c70f3270cbf98f3c74cf9d9a3f0ab900
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Markus Goetz <markus@woboq.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
Instead of expanding the scripts table with script values for the code points
>= 0x10000, it has been merged with the properties table in order to
increase perfomance of the script itemization code (not affected yet).
(Stats: the properties table grew up in 97428-89800 = 7628 bytes;
the old scripts table was of size 7680 bytes)
The outdated ScriptsInitial.txt and ScriptsCorrections.txt file has been removed
(they were just empty, the "corrigendum" script corrections should be applied
to Scripts.txt directly, *no customization allowed*!).
More script testcases has been added - at least one per supported script.
Task-number: QTBUG-6530
Change-Id: I40a9e76f681e2dd552fd4c61af0808d043962e79
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Calling QString::fromUcs4() for the single UCS-4 -encoded character is quite suboptimal
since the BOM detections and the resulting QString aren't really used;
all we need is to split the UCS-4 code point into the UCS-2 surrogate pair.
Change-Id: Ia5b68312909bf551cf2493d9e2752a7d7d837fb9
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Use binary search in glyph name lookup, drop the linear search sentinel (0xFFFF);
Pass the reverse map by ref, initialize with memset.
Change-Id: I56de64bf2352af0615787e4cc0e13c922c640822
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
- Introduce API to do size grip handling (mouse press
and move).
- Move Windows code to Windows plugin.
- Move X11 code to XCB plugin and activate it.
Change-Id: I2f61d6ddc1fa07447e668554d41ecc820efca23f
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Do not call QPlatformFontDatabase::populateFontDatabase(), which
tries to load qpf2-fonts from the Qt library directory.
This directory is not installed on Windows.
Note: This affects non-in-source builds only.
Task-number: QTBUG-26066
Change-Id: I5782e61965958fc48e0edd7a3d50eef325529708
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This solved QTBUG-26111 in which qtjsbackend gets built with an
incomplete framework on Mac OSX. This was traced back to commit
6a6fd56e66 which moved QMAKE_CONFIG
values from .qmake.cache to mkspecs/qmodule.pri. Since qtjsbackend
contains config tests it creates its own .qmake.cache which was
previously masking this issue.
QMAKE_CONFIG incorrectly contained debug for debug_and_release builds
even though debug and release are already present in the CONFIG variable
in mkspecs/qconfig.pri. The changes to configure prevent CONFIG in
qmodule.pri from containing debug and release variables and ensure
that QT_CONFIG contains build_all and debug_and_release if appropriate.
Configure.app is also adjusted to match this behaviour.
The other part of the change is to qt_module_config.prf and
qt_plugin.prf. These changes take care of populating CONFIG with
the appropriate debug_and_release and build_all variables depending
upon what is present in QT_CONFIG. This ensures that the Qt modules
and plugins get built with the same configuration as qtbase.
The special handling for the qcocoa QPA plugin ensures that it is
built in release mode only to preserve the behaviour introduced by
commit 5603f94eaa.
Task-number: QTBUG-26111
Change-Id: I6f65aba50709e1b2431b8b4411ff30a06f7d8aed
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
qvector.cpp no longer contains any code, now that inline functionality
has been deferred to QArrayData.
Change-Id: I000ef8507e5b8438edd32a762750e4ceaa8aa8ee
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Previously it was possible to insert exactly the same index file in the
map twice by specifying an -indexdir which is the same as -installdir.
Probably you can also have two indexes with the same name that happen to
have the same creation time, but changes of that happening are slim to
none.
Change-Id: I6be5fb9d04839026830b9948887b282489b379c0
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
The QNX toolchain can use Neon on ARM and SSE<X> on x86/x86_64.
Change-Id: I36c61fa12b65d806b3cc60a0aefcb63964f9ab7e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The generic input plugins do not set the window parameter. So,
use the same technique we use with mouse event handling to determine
the window to deliver the event to.
Done-with: Johannes Zellner
Change-Id: I950c0ad2f330dccfdcc41b8d01f62cd39902bc9c
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
gitorious.org's IP no longer resolves back to gitorious.org.
This fix is temporary, again.
Change-Id: I85b5fe1c5e603d23dd3226b843ef42165d4c417b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
The current cursor implementation can be a bit hard to read
without hints about which methods are overriden.
Change-Id: I3376890a13be46e1ece03d1442dd5a15ccd61382
Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
qdatetime.h uses std::min/max and on Windows windows.h (or some subsequent
header file) may under certain circumstances define min/max as macros.
The easiest way to prevent the windows header files from doing that is to
define NOMINMAX in the place right before windows.h is included. The other
way is to define min and max to min/max themselves to prevent windows.h
from doing its evil thing.
If a user of Qt (WebKit in this case) chooses the approach of defining
min/max to themselves and then includes qdatetime.h, then a subsequent
inclusion of windows.h doesn't work because qdatetime.h undefines min/max.
We should not enforce the type of workaround needed, therefore this patch
removes the workaround from qdatetime.h and requires user code that
happens to include windows header files before qdatetime.h (seldom case)
to choose either workaround.
Change-Id: I7347eec7369491a065e894cff557004e069453d5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Frequent calls to editorForIndex/indexForEditor are very slow because of an implicit
conversion from QModelIndex to QPersistentModelIndex.
This fix allows to avoid unnecessary conversions when there are no open
editors (most common case)
Change-Id: Ic072880c9f33a43a20b2a61a42c3ba215c5c33cb
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Since local thread storage is used we need to turn this on for the xlc
compiler with the -qtls flag.
Change-Id: Ib40ec87edada56a062b0c72b7d47b38a6d0b5b13
Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This extension doesn't work for e.g. default arguments
in function declarations.
Change-Id: I32b7afa6e01b6af55fb2409179b4fd94cb04cd8d
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
If we have it in different functions, then different out-of-line
implementations could be selected for each object file, resulting in
invalid states. The error I caught was when wrapper.cpp was compiled
without tracking and, therefore, did not place a call to
internalSafetyCheckAdd. However, it called an out-of-line copy of
QtSharedPointer::ExternalRefCountWithCustomDeleter::create, which did
set the deleter to remove the safety check.
Therefore, keep everything in one function.
Change-Id: Ib2c6a606699db49d102704bccdd331ec22a8bd78
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Let the constructor initialise the "value" member.
In the case of create(), which already initialised "value", simply
merge the two functions for more readability.
Change-Id: I5638b3d42af3d0f5988f815e0f91d591fa1897a8
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Completing the work of the previous commit: we don't need separate
classes. Merge into the main class's body.
Change-Id: I2f89b34cb6b7f5f9e8d8b809bebd86656f458644
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
The basic class existed for legacy only, when internal reference
counting was a goal. Since it isn't anymore, we can remove the
distinction and simply merge the two classes.
Change-Id: Ib7a1c4158a8d71e71fa6afa447938b8b85ddae87
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
The two classes are QtSharedPointer::ExternalRefCountData and
ExternalRefCountWithDestroyFn. The split existed because of what Qt
4.5 did before custom deleters existed: the ExternalRefCountData class
was a virtual class that contained a destroy() virtual, which was in
charge of deleting the data or returning false if it didn't.
Turns out that virtual classes was a mistake. This commit
de-virtualises them -- we couldn't do it in Qt 4 because of binary
compatibility. This saves us one pointer-size in the size of the
private, plus the fact that fewer symbols are required (there is no
virtual table to be initialised).
Additionaly, since a deleter is always stored with the reference
count, we don't need the split between the two classes anymore.
Change-Id: I1cd9400561dcee089a406a57bd856b1730f18afc
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This allows a QSharedPointer to be used in contexts where the class in
question is still forward-declared. This produced a warning in Qt 4 due
to the expansion of the template, even if there was no chance of the
pointer being deleted there (because the reference count could not drop
to zero).
Now, not only is the warning removed, but you can actually have the
reference count drop to zero in a forward-declared class and it will
do the right thing. That's because the deleter function is always
recorded from the point of construction and we're sure that it wasn't
forward-declared.
The unit test for forward-declarations had to be rewritten. The
previous version was passing only because the QSharedPointer object
was created under the "tracking pointers" mode, which causes a custom
deleter to be used in all cases.
Task-number: QTBUG-25819
Change-Id: Ife37a4cea4551d94084b49ee03504dd39b8802c1
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
$VAL just happens to work in resolveDeviceMkspec because it is
set in the parent shell environment when the function is called.
Change-Id: I67350f2a9e790cc7eca2a73ef6a4a0d7f09b8d3c
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Follow-up to 6a51062e99 which did this
for win32-g++.
Change-Id: I3ba0dd8ffca46853844b55b16dc92270fa8a623a
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Separate dsp and dspr2 handling. The configure script allows to disable
them separately and with this patch it is possible to compile a dspr2
only libQtGui.so.
Change-Id: Ifca583c9b46a25c93751967a31ac77eafc5d51e4
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Follow-up to 0074cc5d34.
The configure script can be used for cross-building for Windows on
unix.
Change-Id: Ie7f9d0ff308ad5763cdf7b2664fa255e89bd5013
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Since we only support XCode 3 and later, then all of the legacy code can
be safely removed.
Change-Id: I9be8555aaa62c716b2277c2b97f41aa02d27ef13
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Commit d839564c94 was incomplete. It
added the Q_CORE_EXPORT macro to qmalloc.cpp, but the qMemSet and
qMemCopy function bodies are in qglobal.cpp.
Change-Id: I24ee44f04365d8dbdf3f1c0f22b6a72cae9f96bb
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
SSSE3 was first available on the original Intel Core 2 processors, so
add the "Merom" codename. SSE4.1 was available on the 45 nm shrink of
those processors, codename "Penryn", not on the next architecture.
Change-Id: I5fd92db62aa409b7f4e46f9b24d960519177f811
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Modify configure.exe to run some configure-time tests and check if
the SSE and AVX compiler features are supported.
The tests themselves required a bit of changes to compile with
MSVC. The include in sse4_2.cpp was wrong. And for whatever reason, it
didn't like the volatile variables, which GCC, Clang and ICC have been
happy with. This should produce no effect in compilation, though: even
dead code must be syntactically correct. We're not running the output.
Change-Id: Ibe5d0904a378a7efed853c7215f88a2ddcefb1b3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
The old macro was leading to symbol clashes.
Change-Id: I090c511d4090bc96fc6c88537fae7bbe7f143b6c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
The getUrl: and appleEventQuit: handlers are only called if we register
them with the NSAppleEventManager. The Cocoa documentation says the best
place to do this is in the applicationWillFinishLaunching: delegate
method, so add this method and move the code from
qcocoaeventdispatcher.mm to there. Since QCocoaApplicationDelegate is
only used when AA_MacPluginApplication is not set, we do not need to
check again in the delegate code. Be sure to remove these event handlers
when shutting down the application.
For the getUrl: handler, send file open events when receiving this
event. This restores Qt 4 behavior.
Remove the qDebug() from the appleEventQuit: handler.
Change-Id: Ibcbdd541695176e3d236366d4d541e4811882d6c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>