The implementation of QProgressBar::setMinimum and setMaximum did not
repaint the widget. This caused the widget to be shown incorrectly in
case you call setMinimum or setMaximum but not setValue.
Task-number: QTBUG-22121
(cherry picked from commit b1998f4f59c3b10700963b2d13a17a0cc77ef665)
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Change-Id: I331d37ab4451d9e096cdf91a9e0a0286bc3cdffb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
On Windows you will get a lot of timer events if you use QProgressBar
widget. This is because QWindowsStyle uses a timer to animate a
progress bar with unknown state (min and max values both zero). The
issue was fixed by starting the timer only if needed.
Task-number: QTBUG-10501
(cherry picked from commit 72e61b127470b044e370af7017fa8a5b0538244f)
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Change-Id: If9ff2ab99929d9b85a7ffa8f6fd47b045b982f67
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
I added unit tests _fast_cbrt() taken from qeasingcurve.cpp
Change-Id: Id3afd26efac92f594d6358dc2e11f94e8c524da2
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
For -O2 gcc activates -fstrict-aliasing. As a result the compiler is
allowed to assume that pt[1]=px[1]/3+B1 does not affect t.
Therefore the result of _fast_cbrt() was always 0.
Using a union for casting avoids this issue.
For more details see:
http://labs.qt.nokia.com/2011/06/10/type-punning-and-strict-aliasing
Also the updated code respect endianness.
Change-Id: Id4bed16efac52e494e7357dc2f23f94e8c525df1
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Use QVERIFY2 to provide better test diagnostics.
Change-Id: I128004f4ee133ceed4d8f373bbbe4a0eee431ebf
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Extension .a for Mac and Linux and .lib for Windows.
Change-Id: I1e979b2a6b29eeab35620aa0bbabb27f10cdda68
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
TARGET_BASEPATH becomes QMAKE_RESOLVED_TARGET.
QMAKE_RESOLVED_TARGET will be reused for future implementation
of code coverage tool TestCocoon.
Creating of resolve_target.prf.
Clean unused "unset(SYMBOLFILENAME)" in default_post.prf.
Change-Id: I054efb0065fa06697b60ac60a9ddf364f2f40366
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Calling setTextModeEnabled on a QIODevice that is not open generates
a warning as a result of QTBUG-20905. Previously, it caused incorrect
behaviour when called with true.
Now only call it if the QIODevice passed in is already opened.
If not open, then it is opened by the xml reader without text mode,
so there is no difference in behaviour.
xml autotests still pass, although this removes several QWARN messages
from the qdom autotest.
Task-number: QTBUG-22659
Change-Id: Ie3137e44fe776bff6371ebd008428110168717ec
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
We only need to match the closing parentheses if there was an opening one
This has caused mis-parsing of tst_qbytearray.cpp
Change-Id: I9d52916e3ed8549c5ddd968092451fef7389a952
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Added forward reference to QDataStream instead
In the new connection syntax, I want to include qmetatype.h from qobject.h,
in order to handle metatype for queued connection.
So qdatastream cannot be included here (as it inherit qobject) else it would
lead to circular inclusion.
QDataStream is only used in templated code that is dependent on the
template parametter so it is fine to have it forward declared.
Change-Id: I08ea479f481262a80451a277ee29533c42cb9f89
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
gcc 4.2.1 complains about the use of C++-style cast in the macro.
error: template argument 1 is invalid
. Changing the bool-cast to a C-style cast makes the test compile.
Change-Id: Ie9082a3adbfd53147bfd0bfe36dd9e7328e01ee8
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Available on plain text for now, html support still pending.
Change-Id: I0818b97874e80c8c1b33a9127aa7bb3330a8761d
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Also cleaned up the doc, removing references to the buildkey() function
that has been removed.
Change-Id: I2cb403f93d93c0b2f71c8502818d669f7bfbfbec
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
QNSPanel must be a NSPanel and not a QNSWindow
subclass.
Change-Id: I1de31e147757824610f4aabc0ef66ae3906dc0f6
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
To increase the effective test coverage, this patch
re-enables the tst_qabstractprintdialog test case as such, and
instead disables only the test functions that are currently
failing in CI.
Task-number: QTBUG-22453
Change-Id: Ic09a03ed405bf6f85917410a7a86e17f2fe22cba
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
To increase the effective test coverage, this patch
re-enables the tst_exceptionsafety_objects test case as such, and
instead disables only the test functions that are currently
failing in CI.
Task-number: QTBUG-22453
Change-Id: If1fbf59c9d941453b9fd7feb43c59e27e087ce50
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
The QWindowSystemInterface mouse functions now have keyboard
modifiers parameter, make use of them.
Task-number: QTBUG-21743
Change-Id: I65ba1095825b81d575d314c1de2a45cef28e697a
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
The QtWidgets module doesn't contain any code that needs these custom
compilers (that code has been move to QtGui).
Change-Id: I655e478908bfa0b646e68210f6215d9ffbb1f81e
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
When normalizing timevals, we need to bound the tv_usec member to
0-999999 inclusive, otherwise select() may return EINVAL.
When rounding timevals to the nearest millisecond in the UNIX event
dispatcher, pass the timeval through normalizeTimeval() when returning.
As discovered on Mac OS X with tst_QFutureWatcher, starting a 10 second
timer would end up calling select() with timeval = { 9l, 1000000 },
resulting in numerous "select: Invalid argument" warnings being printed
to the console.
Change-Id: Ic539e935bf847e0d4c22a73ad203e3a7a81d0690
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Assigning an int variable to itself is unnecessary and pointless, remove
them.
styles/qplastiquestyle.cpp:932:23: warning: explicitly assigning a
variable of type 'int' to itself [-Wself-assign]
width = width;
~~~~~ ^ ~~~~~
styles/qplastiquestyle.cpp:939:23: warning: explicitly assigning a
variable of type 'int' to itself [-Wself-assign]
width = width;
~~~~~ ^ ~~~~~
Change-Id: I0118874028bf43992bcce07f87b46b48868436cc
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
The 'worker' function argument shadows the class member of the same
name, and 'worker = worker;' assigns the function argument to itself,
not to the member as intended.
examples/tutorials/threads/movedobject/thread.cpp:69: warning:
explicitly assigning a variable of type 'QObject *' to itself [-Wself-
worker = worker;
~~~~~~ ^ ~~~~~~
Change-Id: If4adf486a86a4ba4e7f7040a7771a70b7dd9aa86
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Was marked internal earlier because of missing implementation. That
should be now in place.
Change-Id: I9005da4455299386556e567847474c8d8b6fd5ea
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Note that the uiloader test has been moved
from qtbase to qttools (see QTBUG-19453).
Change-Id: I326fa0da435701eeaad7026160e3203a27cb3666
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
The qtipc autotest needs to live in qtscript due to dependencies
to that module. This commit is the first of two steps to move qtipc.
The second step is a commit in qtscript that adds qtipc there
(with a proper reference to the first commit, i.e. this one).
Change-Id: I233ee459be76fd1938868c05232ce732cfc913a8
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
To increase the effective test coverage, this patch
re-enables the tst_qopengl test case as such, and
instead disables only the test functions that are currently
failing in CI.
Task-number: QTBUG-22453
Change-Id: Ifa9ccab81efb1577767465c150fc64a9d9e3f8e0
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
QMetaType::isRegistered and QMetaType::typeName are quite expensive.
To compare two custom objects we need to have their type name (for
dereferenced comparison). If the name exist we know for sure that the
type is registered and we do not have to call QMetaType::isRegistered
anymore.
Change-Id: Iba631e012504c8633868a902880fa30d38afb917
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
That was strange that QPolygon was know to QMetaType class but QPolygonF
not.
Change-Id: I67bb99644b8b1d0fe1aec730619d8048cb78219b
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Each QVariant instance has internal storage which may be
used for well-know basic types. This patch changes the
behavior by delegating type dependent operation to QMetaType
class which knows more types than QVariant itself.
The patch significantly reduce amount of code in QVariant
implementation.
There are few side effects of this patch:
- better performance:
* for Core types when using Gui (QGuiVariant is able to
construct Core types)
* for small custom types (QVariant::Private::Data is used for all
types that has size small enough)
- comparing two QVariants can give different result for small custom
types (binary comparison instead of pointer comparison)
Change-Id: Ic17fa500d6a882110bfba896fd456c8e6c7a63a9
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Currently one of the most common coding pattern, when working with
QMetaType types, is to switch over all types ids to convert a given
type id to a real c++ type. The pattern is not perfect, because of:
- code duplication - to convert type id to a real type a user has to
write own switch case
- maintenance - adding new type to QMetaType::Types doesn't propagate
to other parts of code.
Proposed type switcher can solve the issue by switching type id and
delegating found c++ type.
The class is created for internal use only and was created to simplify
common problems in QtDeclarative, QtScript and QVariant.
Change-Id: I0567ef908024b3b05ee18126f98a73a74748fbd2
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
From time to time it is necessary to know from which module a type comes
from. This information couldn't be part of QTypeInfo as id doesn't work
for forward declared types.
QTypeModuleInfo should stay for Qt internal usage only.
Change-Id: Ia53747c88293fc0cdaffef919b94c653412779d3
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
QMetaType::Type enum is the main source of type ids. Currently
there are many tasks that can be replaced by a smart macro that
can iterate over all types. The patch introduces series of FOR_EACH_
macros that may be used for code generation.
As the first step the macro was used for Q_DECLARE_BUILTIN_METATYPE
to make sure that no type was forgotten.
Second step was to use created macros in autotest to improve tests
coverage.
Change-Id: I34e9ad7bacf02b44b028bc1aad20b1241aacebd3
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Many enumerator values were not handled in msbuild_objectmodel.cpp. For
each unhandled value, add a case statement that simply breaks.
Change-Id: I018fc5e641200568c88ccc6acb3f5b6ee6b3fd6f
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>