Commit Graph

2791 Commits

Author SHA1 Message Date
Jason McDonald
94fc875079 Cleanup corelib autotests
Tidy the autotest .pro files.  Most autotest .pro files should look like
this:

CONFIG += testcase
TARGET = tst_something
QT = core testlib
SOURCES = tst_something.cpp

Change-Id: I877c2194e9fa9dd13478d117895e1e255a948ad7
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-11 02:45:05 +01:00
Caroline Chao
b0a7af6b4d Add missing naming for libraries built statically.
Extension .a for Mac and Linux and .lib for Windows.

Change-Id: I1e979b2a6b29eeab35620aa0bbabb27f10cdda68
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-11-11 02:45:05 +01:00
Caroline Chao
f3b46a0f4d Split TARGET_BASEPATH from breakpad.
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>
2011-11-11 02:45:05 +01:00
Shane Kearns
d457f148cf Fix warning when using QXmlInputSource with non opened QIODevice
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>
2011-11-11 02:45:05 +01:00
Olivier Goffart
96611a677f Fix parsing of #if defined expression
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>
2011-11-11 02:45:05 +01:00
David Boddie
c888e20f22 Doc: Added more appropriate links to help reduce confusion.
Task-number: QTBUG-19919
(cherry picked from commit 26c29a2dd7efa4c66063d1255e1f694462cbae85)
(cherry picked from commit 8304ca4edd7bd71dd0398451e62a281eac54d0a6)

Change-Id: Icd45465723f9077f109459df002556be81dddb33
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2011-11-11 00:01:10 +01:00
Olivier Goffart
e6abf81046 Removed include to qdatastream.h from qmetatype.h
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>
2011-11-10 13:33:02 +01:00
Aaron Kennedy
bcd16f9453 Update V8
Change-Id: Ic239ef1e55bed06260e4a04cc2199f64c2d30059
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2011-11-10 13:22:13 +01:00
João Abecasis
95d7abb694 Fix Q_STATIC_ASSERT on Mac
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>
2011-11-10 13:17:52 +01:00
Pekka Vuorela
5665c6a55a Updated Qt::InputMethodQuery documentation
Change-Id: Ibd27231366e4af2780bfe2f8f735da74dc04a1cf
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-11-10 13:08:00 +01:00
Pekka Vuorela
a806887992 Document QInputMethodQueryEvent class
Change-Id: I6e98f9e690b733a06ee165e5b01ab6a5a784791b
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-11-10 13:07:51 +01:00
Pekka Vuorela
dc2a1aff9b QWidget text editors to commit text on their own on losing focus
Change-Id: I3b907661e8a24a6dbdaabf607c5c528b1b471c98
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-11-10 13:07:38 +01:00
Pekka Vuorela
b5c37d9e13 QTextEdit to use tentative commit instead of QInputPanel::commit()
Latter to be deprecated.

Change-Id: I2c302c73a7ab2f4201af6a3c6fb4a64a4760263e
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-11-10 13:07:30 +01:00
Pekka Vuorela
1dbfbf4c66 Implement partial tentativeCommit support in QTextEdit
Available on plain text for now, html support still pending.

Change-Id: I0818b97874e80c8c1b33a9127aa7bb3330a8761d
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-11-10 13:07:20 +01:00
aavit
77082cd7c9 Add isDebugBuild() query function to QLibraryInfo
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>
2011-11-10 13:02:34 +01:00
Morten Sorvig
95c007e1f5 Compile.
QNSPanel must be a NSPanel and not a QNSWindow
subclass.

Change-Id: I1de31e147757824610f4aabc0ef66ae3906dc0f6
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2011-11-10 12:55:36 +01:00
Jo Asplin
582bb9e467 Re-enabled passing tests in tst_qabstractprintdialog
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>
2011-11-10 09:32:30 +01:00
Jo Asplin
ef9b2b6aef Re-enabled passing tests in tst_exceptionsafety_objects
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>
2011-11-10 09:32:17 +01:00
Jason McDonald
8e11f7c93a Cleanup corelib autotests
Remove literal tabs.

Change-Id: I210a0259773cceb20d35ebc80b889e3ebb88b540
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-10 04:42:45 +01:00
Jason McDonald
2cd4710715 Remove redundant #define
Change-Id: I27a47653d2c41741f39ee1fea6a1fed063279994
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-10 04:42:23 +01:00
Andrew den Exter
7125dd7186 Propagate QTest::mouseEvent keyboard modifiers.
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>
2011-11-10 03:09:58 +01:00
Bradley T. Hughes
b36e6c4319 Remove unused MMX/3DNOW/SSE/SSE2/SSSE3/NEON custom compiler logic
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>
2011-11-10 00:41:33 +01:00
Johannes Zellner
08c2368911 Fix build when QEGL_EXTRA_DEBUG is defined for debug output
Also shift EGL configuration plot above window surface creation

Change-Id: I2de860e087cb2648b6e8e9b75365fbe78fe7687a
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-11-09 22:13:20 +01:00
Oswald Buddenhagen
76beb4bbb2 support the obj-c #import statement in the dependency generator
Task-number: QTBUG-21965
Reviewed-by: joerg
(cherry picked from commit d2c7193107a170e2884db52272f4d0ee0da62856)
Change-Id: I8a5eb47bfd2c2ee9d064f054565915e64e4902f8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-11-09 20:35:13 +01:00
Johannes Zellner
b44011fb77 Adopt eglfs platform plugin to changed QEGLPlatformContext API
eglClientVersion is not used anymore

Change-Id: I8595a17386c1466d7766522adbdbd7cd5002ecf8
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-11-09 18:20:00 +01:00
Bradley T. Hughes
fb01907050 Correctly normalize timevals before calling select()
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>
2011-11-09 18:20:00 +01:00
Friedemann Kleint
9c9bbfc13c QVariant: Fix MSVC compiler warning about unused variable null.
Use static method isnull().
Introduced by ca26fefc06.

Change-Id: I752f8d8a5ec473dcc5f50fbda47d061b8d3a7e13
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2011-11-09 16:52:48 +01:00
Bradley T. Hughes
67a9b95009 Remove unnecessary variable self-assignment
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>
2011-11-09 15:28:36 +01:00
Bradley T. Hughes
3c74720f74 Assign function argument to class member, not to itself
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>
2011-11-09 15:28:36 +01:00
Pekka Vuorela
767d553fc2 Un-internalized QDBusServer
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>
2011-11-09 15:28:36 +01:00
Jo Asplin
df9405b8d3 Removed obsolete host.pro from qtbase
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>
2011-11-09 14:05:19 +01:00
Jo Asplin
540e368e04 Deleted qtipc autotest from qtbase
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>
2011-11-09 14:05:19 +01:00
Jo Asplin
145357bf58 Fixed typo: private-tests -> private_tests
Change-Id: I8bc53061a6b7a8605290dca0d90e67d7660b4c33
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-09 14:05:19 +01:00
Jo Asplin
f7d5d07ace Re-enabled passing tests in tst_qopengl
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>
2011-11-09 14:05:19 +01:00
Morten Sorvig
2fd3dbb00c Cocoa: Implement mouse and keyboard grab.
Change-Id: Id53ff19d43213d79aaf8f1a6617a06ef9d0cfb4b
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
2011-11-09 12:16:58 +01:00
Friedemann Kleint
260416393e Widgets: Remove dialog functionality from QGuiPlatformPlugin.
(as QGuiPlatformPlugin is deprecated)
Clean up qdialog.cpp.

Acked-by: Morten Johan Sorvig <morten.sorvig@nokia.com>

Change-Id: Id49d6cfe235d5afb4c89b0697c6b3980130a5299
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-11-09 10:41:09 +01:00
Jędrzej Nowacki
ca26fefc06 [optimization] QVariants comparison
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>
2011-11-09 10:12:34 +01:00
Jędrzej Nowacki
5bd377274e Add QPolygonF to metatype system.
That was strange that QPolygon was know to QMetaType class but QPolygonF
not.

Change-Id: I67bb99644b8b1d0fe1aec730619d8048cb78219b
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-11-09 10:12:18 +01:00
Jędrzej Nowacki
8fd64d22ac Make usage of internal QVariant space.
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>
2011-11-09 10:11:34 +01:00
Jędrzej Nowacki
2b39be6dd5 Implement QMetaTypeSwitcher.
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>
2011-11-09 10:11:14 +01:00
Jędrzej Nowacki
eda469d3a0 Add QTypeModuleInfo template class
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>
2011-11-09 10:11:09 +01:00
Jędrzej Nowacki
7f35d5849e Refactor QMetaType types.
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>
2011-11-09 10:11:02 +01:00
Bradley T. Hughes
7ae1e39455 Silence warnings from clang
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>
2011-11-09 09:42:20 +01:00
Jason McDonald
9de6257657 Remove redundant copies of QTRY_COMPARE.
QTRY_COMPARE is now part of qtestlib, so there's no need for copies of
it.

Change-Id: Ied4e7d3b30c1cf16ddcbf8655e4d976e74c2bd8a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-09 01:09:27 +01:00
David Faure
eb41f4be1e Update .gitignore
Change-Id: Ie304ec2776d6fdef734da8bbc22e8dea77417c78
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-11-08 17:20:39 +01:00
Friedemann Kleint
635cf1badf Widgets: Remove remains of Windows file dialog.
Also remove Windows-specific binary compatility hack from Qt4.

Change-Id: I4b6914b357f21737e392745f907c770db9f7a641
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-11-08 17:20:39 +01:00
Aurindam Jana
124044613d QGlobal: Define a default message handler
Currently, qInstallMsgHandler() does not return the
handle to the default message handler. This patch defines
a default message handler. This is returned by
qInstallMsgHandler() when called for the first time. A call
to qInstallMsgHandler(0) will restore the default message
handler as was the case previously.

Change-Id: I42f06654d45fb0e633f3c6d912fc8f05c23249aa
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-11-08 17:20:39 +01:00
Olivier Goffart
a4f446704e QNAM: Fix authentication cache when the password is in the URL
Two problems:
 - The signal cacheCredidentials was not connected in the synchronous
   case while it must be connected. (Regression when the threaded http
   was merged)
 - We cannot cache the credidentials when we proceed the url because
   at that point, we do not know the realm (this basically reverts
   9bc5a32b875b812c3a706034c8c27614f86bd138)

Task-number: QTBUG-18411

Change-Id: I8ea11fa23db4314c3f17ed06d2d7f9ee934ccdba
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2011-11-08 17:20:39 +01:00
Jiang Jiang
1c70cd9980 Avoid double initialize of platform font database
Since platform font database will be populated in QFontDatabase::load,
no need to do it here in QFont::initialize.

The change was in cd781b732e but lost
in previous merge.

Change-Id: Iaa56fea5765d94e4f7b58409654bc218808086cd
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2011-11-08 15:52:28 +01:00
Peter Hartmann
7a78248e9c SSL: blacklist intermediate certificates that issued weak certs
... as did browser vendors.
Tested manually with affected CA certificates.

Reviewed-by: Richard J. Moore <rich@kde.org>
(cherry picked from commit e1d6df4e5931ee49b4b68dd5a33146f5639268b7)

Change-Id: I5bf6c147abf6d2de0f313d65faa2d9a1e9684cea
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2011-11-08 15:52:28 +01:00