Commit Graph

8574 Commits

Author SHA1 Message Date
Friedemann Kleint
be4f8393e4 Stabilize QWidget-test alienwidgets on XCB.
Use QTRY_VERIFY for the mappped attribute check.

Change-Id: I3cbde9122405bf7067f3702193e80636edc8c5c6
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-07-31 11:13:35 +02:00
Friedemann Kleint
7b655eef48 qclass_lib_map.h: Fix include of the QDeclarativeView widget.
Task-number: QTBUG-25196

Change-Id: If25c4df29297435b159706257d9f37a9ef2f3d7a
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2012-07-31 11:13:28 +02:00
Lars Knoll
4970fa366b Align the CP949 codec name with ICU
It's name is windows-949 according to ICU. Keep
CP949 as an alias for compatibility with Qt 4.

Change-Id: I115ba2593da6f7b47e25136c3fadb19c7f798ff0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-07-31 11:13:18 +02:00
Lars Knoll
1ee272568b Fixes to the qdom autotest
Don't rely on a black list of codecs for the serialization
test. This breaks badly when new codecs get added to Qt
(e.g. through ICU). Instead use a white list of known
codecs that can encode/decode the test data.

Change-Id: I1dc55a25e852198bb935f070a4a21e8369f56268
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-07-31 11:13:15 +02:00
Lars Knoll
6c8f8ff1b0 Add missing namespace macros
Change-Id: I7cfeece0914b03b6113207de96b931dc54377f77
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-07-31 11:13:10 +02:00
Lars Knoll
9d0b1fc0bc Small doc fixes about the list of supported codecs.
Change-Id: I98b8ec9d5de9e69f1bb6187b4d820d61f7ce03e5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-07-31 11:13:05 +02:00
Lars Knoll
8a883d972d Do not preload any codecs anymore when using ICU
When using ICU we can now avoid pre loading any codecs
at startup. Instead QTextCodecs will always be created
lazily when first asked for.

Change-Id: Ic668f2824700896d2eca7d0de54f978404826163
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-07-31 11:12:58 +02:00
Lars Knoll
bb3637d33c Add a factory method to QIsciiCodec and fix the names
Make the names all lower case to be in line with what ICU
reports. Add a factory method to create the codecs according
to their name.

Change-Id: Ia3dddaa7701a0645d9d8fbcb52f1f8d58f79cf98
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-07-31 11:12:51 +02:00
Lars Knoll
b23f048cf9 Use ICU instead of iconv/windows codecs for the locale
With ICU there's no need to use the windows locale or iconv
codecs anymore as locale codecs.

Change-Id: I50c94a97ed6acbf4c6f05b2a88593a57ebfa8342
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-07-31 11:12:44 +02:00
Lars Knoll
34721c4d36 Make codecForLocale atomic
Change-Id: I8017b1c2aa1df8d613e83919a945fd5f320713d6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-07-31 11:12:35 +02:00
Lars Knoll
88d2e92b39 ICU code page conversion support
Use ICU to do code page conversion instead of the
builtin text codecs. With this QTextCodec simply
becomes a wrapper around ICU's ucnv_* methods.

We only keep our own codecs for UTF-*, ISO-8859-1,
ISO-8859-15 for performance reasons, and for TSCII
and iscii-* because they aren't supported by ICU.

Change-Id: I4fc49eba55cf772b9772c6dac606a47a44346a60
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-07-31 11:12:28 +02:00
Lars Knoll
865a9465f3 Rename some codecs to be in line with ICU
Change-Id: If523d2a12ef64c79e3860da1f430f128d24ff600
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-07-31 11:12:11 +02:00
Lars Knoll
39bdbc2cb5 Disable iconv on utf-8 based platforms
There's no need to use iconv on Mac,
iOS, Android or QNX, as all these
platforms are fully utf-8 based.

Change-Id: I2a03c8dea72ad91f6ec83da0a838de20e46babef
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-07-31 11:12:07 +02:00
Lars Knoll
46e3aa2908 Lazily initialize iconv in the iconv codec
Avoid dlopen'ing libiconv and initializing
it's members until the codec gets used for
the first time. This avoids some memory
and startup time overhead in case we can
use the utf8 codec instead of iconv.

It also removes a circular dependency
between codec initialization during app
startup.

Change-Id: I119c010c288dc59ab32279d8a213ae1f4347cace
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-07-31 11:12:00 +02:00
Lars Knoll
d4510d0d31 Use utf-8 as the locale codec where it makes sense
Use utf8 as the fallback codec in case we can't determine
something else instead of latin1.
Also use utf8 for Mac, iOS, Android and QNX.

Change-Id: I15dc85d2406b1ebdfacff25f45f8b6854c52b97e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-07-31 11:11:54 +02:00
Lars Knoll
e41129c859 Remove encoding detection according to LANG
This code is left over from the 90's, and should not
get used anymore. In all relevant cases we will use UTF-8
or iconv nowadays.

Change-Id: Ie3776f671de33f782fa77f6359bf6e105bd9c1b8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-07-31 11:11:48 +02:00
Lars Knoll
5af9ecafd9 Move the text codec list to qcoreglobaldata.
This removes some global statics in QTextCodec and
makes the code better to maintain in the longer term.

Remove QT_NO_THREAD defines around mutexes as this
isn't required in Qt 5 anymore.

Change-Id: I15ede75f53b16f134f4053f3188c4b47e86fcd8a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-07-31 11:11:43 +02:00
Thiago Macieira
920dcb0158 Ensure that QAtomicPointer of forward-declared classes works
This is working, but let's just be sure by adding a testcase.

Change-Id: I8c6b5ded0c7b6c90645dbf70a7ce6c1ba447a284
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-07-30 10:43:50 +02:00
Martin Petersson
4d38a3b2da QtNetwork: Better detection of connection failures on Windows
If the error code from WSAConnect is WSAEWOULDBLOCK, then the
operation proceeds but the outcome is not known at that time. We then
check SO_ERROR's value to detect errors. But if that call returns 0
this could indicate that the value is still not know. In this case
we try one more time to increase the chance of getting the correct
value.

This fixed the tst_QNetworkReply::getFromUnreachableIp auto test
on Windows.

Change-Id: I25008aca062b2f823e3d93ebb0ae456d7e4a6ecc
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-07-30 10:43:50 +02:00
Marc Mutz
ada38c75cc QUrl: document that setIdnWhitelist isn't thread-safe
This is a forward-port of 6b10fc91 from Qt 4.

Change-Id: I58878bf24e4f1b50ebfd0457c37eef58696f4a4c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-07-30 10:43:50 +02:00
Rohan McGovern
650cdb62bd Make benchmarks compile without QtWidgets
Ensure benchmarks which need QtWidgets are gracefully disabled when
that module is unavailable.

Fixed one unnecessary usage of "QT+=widgets".

Change-Id: I8031b5dca585749f0f4d22e0637adc3f57f4e418
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2012-07-30 10:43:50 +02:00
Martin Smith
d294ac8d68 qdoc: Added safety checks to findUnambiguousTarget()
This is a blind attempt to fix QTBUG-26615. I can't
reproduce the crash on OSX.

Task nr: QTBUG-26615

Change-Id: Ifc6b68b7f302b9cd7d02129be8ae56841a35e5de
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-07-30 10:43:50 +02:00
Jeremy Katz
ff1ea44b67 fix QEventLoop qdoc errors
Change-Id: I17bb720d539a7ccf5d9a3b20853897ff052fc8a6
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-07-30 08:45:15 +02:00
Rohan McGovern
6a5dc7eb3f tests: fixed check for QtOpenGL
contains(QT_CONFIG,opengl) tells whether Qt itself is able to use
OpenGL, which is not the same thing as whether the QtOpenGL API is
available. Make the check correct; fixes compilation when Qt is
configured with -no-widgets (which also disables QtOpenGL).

Change-Id: Iaa296c2b10650971ef4846f8bc6f44761fadcf7c
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2012-07-30 06:06:12 +02:00
Rohan McGovern
3f5f692630 tests: disable qstandarditemmodel test when building without QtWidgets
This test uses QTreeView.

Change-Id: I6ba56ad6ec3687a5b90d516be10d6f88e248d53d
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2012-07-30 06:06:10 +02:00
Rohan McGovern
8b6f8d66ec tests: removed QtWidgets dependency from tst_qsignalmapper
This test was using some QSpinBox instances to generate signals for
testing. Use our own QtTestObject to generate the signals instead.

Change-Id: I3714955ae040d541c3b613a478945c38a18be18d
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2012-07-30 06:06:05 +02:00
Kevin Krammer
1772168c00 QNX: Reduce dependency on QtWidgets
Use QObject::inherits() to check if the current input focus object is
a numerical input instead of trying to cast.

Change-Id: Ie476fba3d2f9f20a1ce0328043430cb6a96a8a3d
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2012-07-29 14:28:14 +02:00
Laszlo Agocs
05c07c7636 Send the native scancode in evdevkeyboard
Until now the native scancode was not specified which meant
when qwindow-compositor (or any other Qt-based compositor using
the standard Wayland protocol, i.e. sendKeyPress() and such) tried
to send the native scancode over to the clients, all it got was a
code of 0.

This fixes keyboard input when running qwindow-compositor on top
of kms and EvdevKeyboard.

Change-Id: I5d9a882f249634fb7584900b5f298f794befee3b
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-07-28 15:23:07 +02:00
Mitch Curtis
10cd17d0d3 Document QEvent::EnterEditFocus and QEvent::LeaveEditFocus properly.
These enums are only accessible if QT_KEYPAD_NAVIGATION is defined.

Task-number: QTBUG-15631
Change-Id: Ifa826ac8f2bf28225572e0c664f18ffa5e78c302
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-07-28 04:32:07 +02:00
Jeremy Katz
e2f40da257 removed duplicated docs in android qsharedmemory and systemsemaphore
Qdoc sees all source and header files, rather than the subset selected
by qmake. This leads to qdoc errors when the same functions are
documented in multiple implementations.

In the cases fixed here, all documentation was duplicated, so no
information was lost.

Change-Id: Id7f8e2e617862a3778d0b05b38d8811aad456ac5
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-07-28 04:30:38 +02:00
Stephen Kelly
339dc331fd Specialize QTypeInfo for QUrlTwoFlags to mark it PRIMITIVE.
QTypeInfoMerger combines the typeinfos for the (PRIMITIVE) flag arguments.

Change-Id: I5abf00489491d099f2bf7ba25c191a771a383d78
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-07-28 04:30:19 +02:00
Stephen Kelly
bb0ef1cc5b Mark the QFlag and QIncompatibleFlag as primitive.
Change-Id: I7dab4d029e7840fe4778a750a8dd7367675d7a27
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-07-28 04:29:48 +02:00
Oswald Buddenhagen
5e965df21d do not look for frameworks in library path
it's just wrong

Change-Id: Ia21e9fb7e67623d6c4f70eab1f76360624ba314b
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-28 00:09:45 +02:00
Oswald Buddenhagen
5bc9541e7a insert explicit library search paths before system search paths
... as the linker does.

Change-Id: I4a030d9e2f281b892b78ba25b11f6df6b0893712
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-28 00:09:45 +02:00
Oswald Buddenhagen
baf1f46b21 look into /Library/Frameworks as well in processPrlFiles()
Change-Id: I445b9d1d3cd349eb7981b1aec824e6878b0c16e7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-28 00:09:45 +02:00
Oswald Buddenhagen
b9a41f9630 unify default search paths between findLibraries() & processPrlFiles()
i see no reason why they should deviate

Change-Id: Iaa0445b79a95d348f51df74a74c7c89216c468ec
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-28 00:09:45 +02:00
Oswald Buddenhagen
c451a1087e fix lookup of libraries with a full path but without extension
given that nobody noticed so far how broken this was, this doesn't
appear to be a particularly common path. but anyway ...

Change-Id: Ic17b239d724a4d69ff414a24be2e8588732bc8dd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-28 00:09:45 +02:00
Oswald Buddenhagen
ad5e583956 don't actually resolve frameworks in findLibraries()
the code wouldn't actually *do* anything with them, because it was
completely broken. didn't seem to hurt, so just remove it.
we still need to parse -framework, though, so we don't do funny things
with its possible argument.

Change-Id: Ia3266538612d3314a72f4965ee9c1ea2d3046ac9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-28 00:09:45 +02:00
Oswald Buddenhagen
e07372ff50 fix host vs. makefile directory separator mess
the system path separator and shell are bound to the host system
(system() will use cmd even on mingw with sh.exe in path).
the makefiles otoh may depend on what the qmakespec defines.

consequently, add $$system_path() and $$system_quote() (for use with
system() & $$system()). $$native_path() is renamed to $$shell_path() and
should be used with $$shell_quote() to produce command lines in
makefiles.
$$QMAKE_DIR_SEP needs to be applied to Option::dir_sep right after
parsing the spec, so it is available to $$shell_{path,quote}().

Change-Id: If3db4849e7f96068cf03a32348a24f3a72d6292c
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2012-07-28 00:09:45 +02:00
Thiago Macieira
d9048bef20 Make 'nmake qmake' work with the stub (fast) Makefiles
Without this, if you ran 'nmake qmake' or 'jom qmake' in qtbase's
top directory, it would simply tell you that 'qmake' was up to date.
After all, there is a directory called 'qmake' there.

Change-Id: I6cdb405e8106c137ecbab27923e524b924b19c84
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-07-28 00:09:45 +02:00
Friedemann Kleint
2f587ee689 Work on the QWidget-autotest.
- Introduce smart pointers to delete widgets and resources
  to ensure tests are not affected by left-over widgets
  also in case of failure.
- Replace deprecated QTest::qWaitForWindowShown() by
  QTest::qWaitForWindowExposed() and use QVERIFY,
  remove some hard-coded timeouts.
- Set some titles and object names.
- Add verbose debug output of event lists in tests
  childEvents.
- Set minimum sizes on widgets to avoid Windows warnings.
- Stabilize GDIWidget, trigger on first event only.

Change-Id: I64119a2e7113e4a9f0156d00c72ce0935d03bb81
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-28 00:09:45 +02:00
David Faure
8cf7cf0cb9 QDebug: Add getter/setter for auto-insert-spaces.
This is useful for inserting a string without space-handling, given that
dbg.nospace() followed by dbg.space() inserts a space.

It's also useful for QDebug operators for custom types, so that they
can disable space handling and then restore to whatever it was before
(rather than forcing it to space() mode).

Change-Id: I9d72e9ffbcbc581ed093168752c29af924405b33
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-07-27 22:05:26 +02:00
David Faure
54e3ce1705 QDebug: adjust documentation of space(), nospace() and maybeSpace()
Reality is that they control a "current mode" in the stream, not a
"bool that remembers if the last character was a space".

Change-Id: Ic907c34bcb458039b73ddff48021e19f0c24c78c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-07-27 22:04:55 +02:00
Mitch Curtis
8e49def48e Correct method name referred to in QFont's detailed description.
The detailed description of the QFont class reference contains
the wrong method name (and link) setPointSizeFloat().
This change replaces it with the correct name: setPointSizeF().

Task-number: QTBUG-15536
Change-Id: Ieb2e398b8e1d0b637a6bac16a3ec48522c5dddc1
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2012-07-27 18:01:25 +02:00
Martin Smith
be46199c62 qdoc: Updated qdoc manual and qdoc guide
These documents now include the \qmltype and
\instantiates commands, and the \qmlclass command
is deprecated.

Task nr: QTBUG-26648

Change-Id: I62da273be51609e651e33b9088e1667e4c6c1e76
Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
2012-07-27 17:03:27 +02:00
Oswald Buddenhagen
022f8ebd13 merge QMAKE_LIBDIR into QMAKE_LIBS early
dealing with the directories separately doesn't buy us anything. it's
easier to mix them into the libs, as that contains some paths, too, both
in projects and in prl files.

this brings the windows generators in line with the unix ones.

Change-Id: I1f58f7edd8e21d28bfabf04384bac2e315aaf446
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-27 16:29:38 +02:00
Oswald Buddenhagen
10fba42d71 unifiy initialization of QMAKE_LIBS{,_PRIVATE} among windows generators
Change-Id: Ib24ec6e290bfb277232c2483768c1b863f961462
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-27 16:29:34 +02:00
Oswald Buddenhagen
b053aaa9ef clean up fixTargetExt()
there doesn't appear to be a point in having the function virtual; the
part in the mingw generator can be inlined somewhere else just fine.

Change-Id: I50d66d505095b43fce601928c6240a684389a4b7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-27 16:29:29 +02:00
Oswald Buddenhagen
a102f1abf2 de-virtualize some more functions
they are not re-implemented anywhere

Change-Id: I444a967bb39ec6b5994747c9fa3f605b4c53ce4f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-27 16:29:23 +02:00
Oswald Buddenhagen
e38af23470 dispose of QMAKE_LIBDIR_FLAGS, "demote" QMAKE_FRAMEWORKPATH_FLAGS
merge their content as early as possible into QMAKE_LIBS. that's where
they ultimately end up anyway, and this approach is way simpler.
QMAKE_FRAMEWORKPATH_FLAGS is also used for the compiler flags, so it
remains as such in this second function.

Change-Id: Idc3ba4a9b2569fce3252d5f5ddc3f6ebf93650cf
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-27 16:29:18 +02:00