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>
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>
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>
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>
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>
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>
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>
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>
For child widgets we must use the windowHandle of the toplevel widget.
Change-Id: If7bad8ed4bba694806a2c8b77bae3d25cc200b8b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Use QTRY_VERIFY for the mappped attribute check.
Change-Id: I3cbde9122405bf7067f3702193e80636edc8c5c6
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
This is a forward-port of 6b10fc91 from Qt 4.
Change-Id: I58878bf24e4f1b50ebfd0457c37eef58696f4a4c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>