Commit Graph

8604 Commits

Author SHA1 Message Date
Joerg Bornemann
a992a12bec don't change a widget's active state in QWindowsWindow::setWindowState
QWindow::setWindowState is not supposed to set the window active.
The method requestActivateWindow() should be used for that.

When switching from and to fullscreen mode we're always passing
SWP_NOACTIVATE to SetWindowPos to not change the activation state
of the window. This is inverse to the old behaviour, which did not
have an effect.

Change-Id: I339337935cdad76b3ef252202e92177f37543038
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-08-01 02:26:52 +02:00
Christian Kamm
30ec535cb6 Doc: QVarLengthArray::length is new in 5.0
Change-Id: I796e67d677309460d79a7a64a6890dfbcfbace69
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-01 02:25:42 +02:00
Thomas Senyk
1865405826 Adding configure option: -no-gcc-sysroot
This option is important if you want to use configure's
and qmake's -sysroot (e.g. PKG_CONFIG settings, device-files),
but the toolchain (in combination with the rootfs)
is not able to handle gcc's --sysroot.
One known case is freescale's ltib setup where the toolchain
itself comes with all the essential files (e.g. crt1.o),
while the rootfs has none of those files, so gcc's
--sysroot can't be used. The rootfs on the other hand contains
all kinds of "less important" files/packages (e.g. libdbus).
For those "less important" files/packages Qt needs pkg-config
to be able to include/link properly. Therefore one needs
configures -sysroot without gcc's --sysroot.

Change-Id: Iaec9b07012f2945f3ecb3ced0ed95176721b5ecd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-01 02:25:37 +02:00
Michael Goddard
019b97fc4f Add a .prf file for SIMD qmake variables.
So you can get AVX/NEON etc source compiled by assigning to the
corresponding variable (e.g. AVX_SOURCES).

This was previously used in just the gui module, but other
external modules might like it too.

Change-Id: I51aa64760c469c7dc4c71e6f089c2ddef4f509c5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-01 02:25:26 +02:00
Laszlo Papp
1610b6df06 Use QtCore instead of QtGui for the standardpaths comments to be correct
Change-Id: I98004fed565ac9653947ec70a3197b0372abcf2b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: David Faure <faure@kde.org>
2012-08-01 00:14:41 +02:00
Harald Fernengel
8fb040b6c0 Lazy initialize library paths
For a lot of command line tools, library loading is not required, so
don't waste a lot of time computing them. According to callgrind, this
makes the QCoreApplication constructor factor 6 faster, and also removes
a lot of stat() calls and other file system access.

Change-Id: I0211f5303712fa0dcfc4168cce7025283c63c9d1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-01 00:14:41 +02:00
Kent Hansen
39df773eb5 Avoid qobject_cast
This is slightly faster, and also avoids accessing the object's meta
object that would cause any lazily created meta objects (e.g., for
QML) from being built.

This is just a port of commit a5972f8ec3
(which fixed QGuiApplication, but not QApplication).

Change-Id: I0d5080495aa4fd4486db297968c4d06bbfacf89b
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-08-01 00:14:41 +02:00
Andreas Holzammer
a0be8ef271 Add command line options to windowgeometry test
Add -widgetminimized, -widgetmaximized, -widgetfullscreen,
-windowminimized, -windowmaximized, -windowfullscreen
as command line option to test creation of windows in
these modes

Change-Id: If192c131c8996d3b67648427e5784da47ffee971
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-08-01 00:14:41 +02:00
Friedemann Kleint
b5ad1fcd08 Fix compilation: Move qHash(const T &t, uint seed) up.
It needs to be visible from
qHash(const QPair<T1, T2> &key, uint seed).

Change-Id: Ibb63ce6da1e655bfb841c5e580e184ef66c5b766
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-08-01 00:14:41 +02:00
Lars Knoll
47c48ea87a Fix reloading of plugins
Unloading and reloading a plugin didn't work correctly,
because we didn't reset instance to 0 on unload.

Task-number: QTBUG-26098
Change-Id: Ic3e4497f359b1ca455be949dce9cafa9d67d8039
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-01 00:14:41 +02:00
Lars Knoll
3e3790b2c7 Fix some syncqt warnings.
Change-Id: I6f432ee991f4bde217fa27d4004ef318f1d480e0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-01 00:14:41 +02:00
Andreas Holzammer
8f1fd5ecc8 Fix showFullScreen for QWindow
If the setWindowState is called in a early stage,
where the window is not yet shown, the fullscreen
flag is cached in the QWindow. Then in the call to
setVisible(true) the window gets generated, but the
fullscreen is not handled there. So set the state
while window is generated.

Change-Id: I0ea53ed8a2465da6a9973d84fb4579381543e89b
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-31 20:26:31 +02:00
Joerg Bornemann
f6169ae4b1 fix QWidget::activateWindow for child widgets
For child widgets we must use the windowHandle of the toplevel widget.

Change-Id: If7bad8ed4bba694806a2c8b77bae3d25cc200b8b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-31 20:26:08 +02:00
Joerg Bornemann
0d8795fcb4 fix window activation in tst_qmdiArea::subWindowActivated2
QApplication::setActiveWindow doesn't activate the native window but
marks the widget as active inside Qt.
We need to use QWidget::activateWindow instead. See docs.

Also moved the activation call further down because on Windows a
minimized window cannot be activated using the activation-by-focus
fake we're currently using.

Change-Id: I752f6ada1f463931fa9cfb3c35f42dbec0207bfa
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-31 20:25:59 +02:00
Friedemann Kleint
5b49793d80 Implement synchronous WS events by flushing.
Previously synchronous window system events were
implemented by bypassing the queue and processing
the event immediately. This is not ideal since the
event order is not preserved - there might be "happened
before" events waiting in the queue.

Add QWindowSystemInterface::flushWindowSystemEvents
and change all handleSynchronous* to 1) queue the
event 2) call flushWindowSystemEvents.

flushWindowSystemEvents is almost identical to the
already existing sendWindowSystemEvents with the
exception that it does not call QApp::sendPostedEvents.
Move the common implementation to a new private function.

Task-number: QTBUG-20778

Change-Id: Ie98a83875bc0a14e335e36bed0dd9e0ed4a1dea0
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-31 20:25:36 +02:00
Sergio Ahumada
0e904279bd Adding missing QT_BEGIN_HEADER/QT_END_HEADER
Change-Id: I1144497ec8376ec41c714b7a55c05637b6feee66
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-07-31 20:05:01 +02:00
Eike Ziller
67d082223c Mac: Don't crash if language preferences can't be retrieved.
That can happen when e.g. running an application with sudo.

Task-number: QTBUG-26547
Change-Id: Ib16ef7798ebcd1c9b8d661dd2e3ce3aadc393489
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
2012-07-31 11:58:08 +02:00
Friedemann Kleint
58ab483cdb Stabilize the QHeaderView test.
The test has a member QWidget *topLevel which it recreates
and shows in init() without waiting for it to be exposed
although it is not used in every test case. This apparently
interferes with some tests that create separate top levels.
Do not show in init(), delete the topLevel.
Add wait to the cases where the topLevel is shown.

Change-Id: Ib428020b36dc82991d41e68478fd583bdfb004c7
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2012-07-31 11:57:21 +02:00
Frederik Gladhorn
05815679d8 Accessibility: fix updates for models with rootIndex set.
The accessible table/list implementation would ignore
when a root index is set, resulting in trying to use row/column
for the top level index, leading to accessing invalid indexes.

(cherry picked from commit def2ee829435c705055733a0f99c0ca44a012c50)

Conflicts:

	src/plugins/accessible/widgets/itemviews.cpp

Change-Id: Ic2745ab3e262ccee2d43e0d532e165d2958f519e
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-07-31 11:53:35 +02:00
Joerg Bornemann
a03b14f685 build host tools in release mode again
CONFIG does not contain build_all anymore,
thus we need to check QT_CONFIG in bootstrap.pr{i,o}.

Change-Id: Ia505fa101adc49f185908ca575d3211caed612db
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-31 11:51:55 +02:00
Joerg Bornemann
12a40a7cbb tst_qwidget task reference fixed
Change-Id: I8d65f5912bfc2daa1e35be33a3c4d986508eebeb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-31 11:51:51 +02:00
Peter Kümmel
952788d64b add configure options for debug/release OpenSSL
msvc cannot use the same library for debug and release builds
if openssl libraries are linked statically into the network library.

Change-Id: Ic27ede2d9531b94aff4c50c1699947ce72caf286
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-31 11:47:39 +02:00
Oswald Buddenhagen
9a8d74de0a remove second argument from $$eval() (access to global scope)
sam added this based on a vague notion of backwards compatibility when
he fixed the function to use the local scope, but it kind of makes no
sense - there is very little reason for accessing the global scope from
within a function. google doesn't find any relevant hits except our
source code, so let's just nuke it.

Change-Id: Ie957bb47b531f7e9b5dfcceb4e09f65dd826b422
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-31 11:17:50 +02:00
Oswald Buddenhagen
c748cf489c don't set -rpath-link in qmodule.pri
qt.prf takes care of that already

Change-Id: Ibc426583a007edbbe2f53cc21ce676eb60b33485
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-31 11:17:46 +02:00
Oswald Buddenhagen
c595405124 run processPrlFiles() over QMAKE_LIBS_PRIVATE as well
there is no reason why private libs should not have prls resolved.

the two variables are resolved independently, so it's possible that
(even more) libraries will appear duplicated on the linker command line,
but that seems easiest for the time being.

Change-Id: I9070ba53808a0661fa72949db8111106b7aca487
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-31 11:17:43 +02:00
Oswald Buddenhagen
14bf7ef504 inline MakefileGenerator::processPrlVariable()
the visitor-pattern like approach is not needed any more

Change-Id: I990db681cbeee91d89ecba97745a8104595247e7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-31 11:17:40 +02:00
Oswald Buddenhagen
f71a5c8cde make the windows prl processing more like the unix variant
it's more elegant, and more similar code is better.

Change-Id: I2b8b036cb70a932fd171e23cf7d3389188401924
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-31 11:17:37 +02:00
Oswald Buddenhagen
202f08dc09 remove apparently useless code
it wouldn't actually *do* anything, as l is not a reference. i cannot
figure out the original intention, so let's just drop it.

Change-Id: Ic0a3457a1872cde827259ee5530959120456e934
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-31 11:17:34 +02:00
Oswald Buddenhagen
02cbc0746d stub out MakefileGenerator::processPrlFiles()
the unix and windows variants don't rely on it.
not making it purely virtual only because the project generator inherits
MakefileGenerator as well but does not need an implementation.

Change-Id: I80099b3f5d07cd037b408cf1099c58ff3a2904cd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-31 11:17:30 +02:00
Lars Knoll
a806c6a8b2 Search the include paths for json files containing plugin info
This fixes shadow builds with autogenerated .json files as
e.g. used by Qt Creator.

Change-Id: Ibb783b05d97d996100da4b0dca859fa3f310dc83
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-31 11:13:43 +02:00
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