Commit Graph

35523 Commits

Author SHA1 Message Date
Oswald Buddenhagen
3a32ad7859 syncqt: fix fallback of -builddir
it needs to fall back to -outdir if only the latter is specified, as
otherwise funny things will happen.

this didn't affect the calls in qt_module_headers.prf (both options
used) and the unix configure script (neither option used), but it
affected configure.bat, and possible callers outside qt's build system,
which apparently includes our packaging scripts.

amends ede6c44756.

Task-number: QTBUG-66626
Change-Id: I08633033c04152616545501490c9b3fb939cab6c
Reviewed-by: Lionel CHAZALLON <longchair@hotmail.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-02-28 18:15:49 +00:00
Lars Knoll
7f504283ef Update the Unicode BiDi algorithm to be compliant with Unicode 10
The UBA in Qt was out of date, implementing the spec from pre
Unicode 6.3 days. It missed handling of directional isolates and
paired brackets.

This adds a completely new implementation of the UBA, that is
compliant with Unicode 10.

Added the test data from Unicode 10 to the qcomplextext auto
test and ensure that we pass the test suite.

Task-number: QTBUG-57743
Change-Id: Ie2d957bc9775d82f0a51d1c78dc6bd154f22847c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-02-28 17:11:43 +00:00
Lars Knoll
4804d42ab8 Fix ligature handling in QTextLine::cursorToX()
If the script item is rtl, we need to subtract the offset inside the
ligature again, as the full width of the ligature would have already
been added in the loop before.

Change-Id: I544ac6fa19484b35335767e1ba1befc3dfa07693
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-02-28 17:11:37 +00:00
Tor Arne Vestbø
5d365b96b9 macOS: Warn the user when KVO-observing QCocoaNSWindow
We recreate the window of our QNSView in various situation such as changing
the styleMask, which results in either a new QNSwindow or QNSpanel being
set as the window of the view. KVO-observing the window property of the
view will fail we then have a new window instance, and will crash when
trying to remove the observer from the new window.

Unfortunately catching the NSRangeException that happens when removing
an observer from a 'switched' window is not possible, so the user is
left with:

  Terminating app due to uncaught exception 'NSRangeException', reason:
    Cannot remove an observer <Foo 0xabc> for the key path "bar"
    from <QNSPanel 0xdef> because it is not registered as an observer.

Change-Id: Ib2adbb99f19303a054fb1eb65e959aecd32b1162
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-02-28 17:06:41 +00:00
Nico Vertriest
df3da2c1d1 Doc: Add doc for QSKIP
Change-Id: Ib8cd1b4926652984b41b5a05bf4dbf3214f2856f
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-02-28 12:51:37 +00:00
Ville Voutilainen
71cdc95006 Silence a GCC 8 warning in qpainter
qtbase/src/gui/painting/qpainter.cpp:5625:68: error: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct QFixed’; use assignment or value-initialization instead [-Werror=class-memaccess]
         memset(advances.data(), 0, advances.size() * sizeof(QFixed));

Change-Id: I563b1b0c5dfaf381a9521bc9a4dc3197f0f38d11
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-02-28 07:18:35 +00:00
Ville Voutilainen
ea1137ff5e Silence a GCC 8 warning in qoutlinemapper
qtbase/src/gui/painting/qoutlinemapper.cpp: In member function ‘QT_FT_Outline* QOutlineMapper::convertPath(const QVectorPath&)’:
qtbase/src/gui/painting/qoutlinemapper.cpp:182:76: error: ‘void* memcpy(void*, const void*, size_t)’ copying an object of non-trivial type ‘class QPointF’ from an array of ‘const qreal’ {aka ‘const double’} [-Werror=class-memaccess]
             memcpy(m_elements.data(), path.points(), count* sizeof(QPointF));

Change-Id: Ieca99f0262c57e58adbcf48ac923ae11bd428b00
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-02-28 07:18:24 +00:00
Ville Voutilainen
d62d51c7e6 Silence a GCC 8 warning in qringbuffer
qtbase/src/corelib/tools/qvector.h:782:16: error: ‘void* memmove(void*, const void*, size_t)’ writing to an object of type ‘class QRingChunk’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Werror=class-memaccess]
         memmove(b + 1, b, (d->size - offset) * sizeof(T));
         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../../include/QtCore/5.11.0/QtCore/private/qringbuffer_p.h:1,

Change-Id: I6583241223fe3fc76c0b792779993a34aa9485fe
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-02-28 07:18:14 +00:00
Kari Oikarinen
d5af78230d Blacklist tst_QWidget::saveRestoreGeometry on openSUSE
Has been flaky in CI.

Task-number: QTBUG-66708
Task-number: QTBUG-66216
Change-Id: I69878574a98139681100c1424d5bbf46cc4a87b8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2018-02-28 07:07:58 +00:00
Kari Oikarinen
b55a32cd4b tst_QLocalSocket: Fix flakiness of processConnection
The test's client processes are prepared for the server not being ready when
they try to connect and handle QLocalSocket::ServerNotFoundError by waiting and
trying again.

However, on Ubuntu 16.04 and 17.10 and possibly other systems, sometimes the
error returned by qt_safe_connect inside QLocalSocket is ECONNREFUSED instead of
ENOENT. This has caused flaky failures in CI, so wait and try again in the case
of QLocalSocket::ConnectionRefusedError also.

Task-number: QTBUG-66679
Task-number: QTBUG-66216
Change-Id: I61e3d5b052d84c5ba9d1746f2c71db37cedbf925
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-02-28 07:06:43 +00:00
Sami Nurmenniemi
eba652a99f Blacklist tst_QNetworkReply::ioHttpRedirectPolicy
Has been failing a lot lately

Task-number: QTBUG-66247
Change-Id: Id940a573eb299379cacceb836890cbe0b3c896b7
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-02-28 06:51:08 +00:00
Friedemann Kleint
a8aa3dc5c7 QDate/Time,QTimeZone: Fix empty documentation section titles
Change-Id: I674c4bb1805a7f7bc95512b07b0278446ebe7772
Reviewed-by: Martin Smith <martin.smith@qt.io>
2018-02-27 15:18:17 +00:00
Ville Voutilainen
1b72d3e645 Silence a GCC 8 warning in qxcbnativeinterface
qtbase/src/plugins/platforms/xcb/qxcbnativeinterface.cpp:309:65: error: cast between incompatible function types from ‘void (*)(const char*)’ to ‘QPlatformNativeInterface::NativeResourceForIntegrationFunction’ {aka ‘void* (*)()’} [-Werror=cast-function-type]
         return NativeResourceForIntegrationFunction(setStartupId);

Change-Id: I83409b3a6cc67ccb4c9e91e592e6a01bb6ce45ea
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-02-27 14:57:14 +00:00
Ville Voutilainen
7eac2e7350 Silence a GCC 8 warning in evdevtablet
qtbase/src/platformsupport/input/evdevtablet/qevdevtablethandler.cpp:85:36: error: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct QEvdevTabletData::<unnamed>’; use assignment or value-initialization instead [-Werror=class-memaccess]
     memset(&state, 0, sizeof(state));

Change-Id: I3b18ffa7fdf9c7aa1bd4977f12858fd1f176c020
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-02-27 14:57:04 +00:00
Ville Voutilainen
00f89d61b9 Widen the blacklists for flaky udp tests
Task-number: QTBUG-66216
Change-Id: I52688bf41ef12b2ec67887b1a5d26f89d4556d5b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
2018-02-27 11:44:17 +00:00
Ville Voutilainen
2eec3272c7 Make qWaitForWindowActive more robust
Based on the information we got from Unity developers, we need
to check for window's frame geometry to be set, not just window's
position to be set. On various window managers, a window is
'ready' once the frame geometry is set. This fixes autotest
flakiness of tests that use qWaitForWindowActive.

Task-number: QTBUG-66216
Change-Id: Icb664e7b802b474919f3b058c00681574522ccbe
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-02-27 08:53:09 +00:00
Friedemann Kleint
1f6bd8bfb2 Windows QPA: Ensure a mouse release event is sent after DnD
Windows does not send a mouse release by itself, which can
leave Quick controls believing the mouse is still pressed.
Synthesize an event.

Task-number: QTBUG-66447
Change-Id: Ia865edddc0c77a1b42b9ad2c38323379e74b6704
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2018-02-26 20:35:02 +00:00
BogDan Vatra
b2d2b655e5 Fix compile with sanitize address & undefined
On Debian 9, the sanitize library exports only dlopen symbol, but
it doesn't export the other ones.
We need to check all dl symbols that we use, otherwise "-ldl" will
not be added to the libs list.

Task-number: QTBUG-64864
Change-Id: I3e62b82985348c40b8b61302ba589d5564598e18
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-02-26 08:58:34 +00:00
Morten Johan Sørvig
8bb33c2509 Cocoa: Fix incorrect QSystemTrayIcon::geometry()
The coordinate conversion was wrong. Use
QCocoaScreen::mapFromNative() instead.

Task-number: QTBUG-53184
Change-Id: I50f18d68ba5d7e1cb5046523a608bfa2e076d7ea
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-02-26 07:00:29 +00:00
Gatis Paeglis
669070c404 xcb: simplify handling of keymap updates
The old code was somewhat too scattered.

Change-Id: Ib0445c66653f757ccac28778f34f4bcb5df49a70
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-02-25 13:18:41 +00:00
Gatis Paeglis
1a341d8333 xcb: cleanup TODOs for KeyboardLayoutChange
Change-Id: I5d2207fdb21cbabb04460faf73c35275bc76b7b0
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-02-25 13:18:34 +00:00
Gatis Paeglis
50865aeeef xcb: minor refactoring in QXcbKeyboard::checkForLatinLayout()
We don't need xkb state APIs to check for keys on first level.

Change-Id: I728e6bfe09bce127ad8eae78ecee7cefd620f52e
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-02-25 13:18:27 +00:00
Gatis Paeglis
6c88dc0c16 xcb: remove X11 deps from QXcbKeyboard::checkForLatinLayout/lookupLatinKeysym()
This will allow us to reuse these functions on systems that
do not rely on X11, but use libxkbcommon for handling keyboard
input.

Task-number: QTBUG-65503
Change-Id: I78034238771be96fbb38e8187801fefbee1a5fed
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-02-25 09:50:07 +00:00
Gatis Paeglis
7c01c759ae xcb: have a proper detection of key events originating from SendEvent
This is a more correct fix for QTBUG-48795. The original fix
was unnecessarily using non-XKB code path for updating state
for all incoming key events. This would result in losing some
valuable bits from xkb state.

Task-number: QTBUG-48795
Change-Id: Ic4fb28b2d834272f1db2cbf5888cafb209707847
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-02-25 09:49:58 +00:00
Gatis Paeglis
1219fc26a0 xcb: use keysym defs from xkbcommon, instead of X11 headers
xkbcommon-keysyms.h is generated from X11 header files, so it
contains all the same values.

Removed all of #ifndef XK_* as those keysyms are present in
xkbcommon-keysyms.h (checked the header from 0.4.1, the minimal
required version). The same for XF86XK_* defines.

This will allow to reuse some of this code on platforms that
don't depend on X11, for details see QTBUG-65503.

Task-number: QTBUG-65503
Change-Id: I68083e11cea1f29d775a6ed46503a06b04b9a05c
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-02-25 09:49:49 +00:00
Gatis Paeglis
9df6f3367e xcb: minor cleanup in QXcbKeyboard::handleKeyEvent()
- Use smart pointer for handling xkb state.

- Make it more clear (in the code and the comment) when a latin
  keysym is used.

Change-Id: Iee8106c72177c22b1a8fe875027b1dda82196b36
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-02-24 18:52:47 +00:00
Gatis Paeglis
7878bb685f xcb: refactor QXcbKeyboard::keysymToQtKey() and fix bug
Now also digits from other alphabets e.g ۲ (arabic two) are mapped
to Qt::Key_* digit keys.

Re-factored logic:

- All known dead keys have direct mappings since
1d86e5f84a. Don't special treat them
in "unicode mapping" code path.

- Removed the ISO8859-1 legacy logic, which is leftover from Qt4
where keysym to Qt decoding was done from raw data. In Qt5 we always
get a utf8 string from xkb_state_key_get_utf8(). Furthermore,
ISO8859-1 and utf8 encode ASCII exactly the same way.

- Set Qt::KeypadModifier from key input handler methods. This logic
does not belong in keysymToQtKey().

Note:

KeyTbl[] and keysymToQtKey() have been duplicated in several places
in Qt. That stuff will be cleaned up as part of QTBUG-65503. This
change will make those cleanups easier.

Task-number: QTBUG-58865
Task-number: QTBUG-65503
Change-Id: Iaf10205a26804f7fc03eb8a16a0879f1bd7bf332
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-02-24 18:52:39 +00:00
Gatis Paeglis
d5abf54597 xcb: re-factor QXcbKeyboard::updateKeymap() to remove various fallbacks
3edcd9420e added more robust support
for keyboard input on XKeyboard-less X servers. The various fallbacks
that we had did not work that well in practice. We can remove them now.

The xkb_keymap_new_from_names() function relies on reading XKB config
files from a file system. Since we don't use this function anymore, we
can also simplify xkb context creation (see XKB_CONTEXT_NO_DEFAULT_INCLUDES),
as we don't care about DFLT_XKB_CONFIG_ROOT (which we previously set
via -xkb-config-root for the bundled libxkbcommon).

This patch also changes the code to use smart pointers for managing
the global xkb context, keymap and state.

[ChangeLog][X11] The -xkb-config-root command line switch has been
removed as it it no longer needed when configuring with -qt-xkbcommon-x11.

Change-Id: I80eecf83adae90af5cd20df434c1fba0358a12fd
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-02-24 12:15:08 +00:00
Gatis Paeglis
9280a04afe xcb: remove xlib dependency from core keymap assembling
Remove the Xlib dependency by extracting XConvertCase
from libxkbcommon sources (xkbcommon/src/keysym.c).

libxkbcommon >= 0.8.0 exposes case conversion APIs, but
we should prefer using the slightly adjusted version (see
the patch for more details).

This change also is necessary for follow-up cleanups.

Change-Id: Icf1716e0ad26f46a7aefb23722cfc57957754d5e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-02-24 12:15:00 +00:00
Samuli Piippo
bcd5532fcb Fix thread_local test
If _Thread_local is used on a block-scope declaration, it must be
combined with either static or extern to decide linkage.

Change-Id: I228b3520767197c6cdf5134ff5a666ab2aca33ea
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-02-23 13:23:01 +00:00
Liang Qi
ab28ef132e Reapply 1514b4e853 on 5.11
This change amends 305dd1b61f, which lost
1514b4e8 and brought src/corelib/json/qjsonarray.cpp back, which got
removed in c9c9adeef9. In
a6b697ca13, it was moved to
src/corelib/serialization/qjsonarray.cpp in 5.11.

Change-Id: Ic6134a78d75a9c245934cf70a67a54c80a3e7c85
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-02-23 11:28:30 +00:00
Liang Qi
3fcedcbabb Reapply 403343039d on 5.11
This change amends 305dd1b61f, which lost
40334303 and brought src/corelib/xml/qxmlstream_p.h back. In
a6b697ca13, it was moved to
src/corelib/serialization/qxmlstream_p.h in 5.11.

Change-Id: Ia1e9841b866ff49f7274b1b13fd224c0a20a017e
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-02-23 11:28:24 +00:00
Oswald Buddenhagen
5cfd5fd9d7 configure: introduce 'subarch' term to expression evaluator
... and make use of it.

it's a logical continuation of the 'arch' term, and will be used also in
qt3d's configure.

Started-by: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: I940917d6763842499b18fffd1514c96889a0cc63
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-02-22 21:39:36 +00:00
Gatis Paeglis
d98f17d434 doc: improve QPlatformIntegration::possibleKeys() documentation
- There is no need to mention qkeymapper, which is an internal
implementation detail.

- Describe the encoding of int.

- Add a note that calling possibleKeys() outside key event
handler context is not valid.

Change-Id: Ife9b7d1496f04b5a433ed2d56f29c4f01f174441
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-02-22 21:38:07 +00:00
Gatis Paeglis
5d3f540fc6 tests: improve shortcut manual test
Change-Id: Id45bbe77a59917f25a031539f8414dc27d8fe19f
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-02-22 21:37:58 +00:00
Gatis Paeglis
1aec1a2d8d xcb: remove fragile and unnecessary missing-latin-keymap workaround
... which was trying to fix a rarely occurring situation where system
settings from a desktop environment does not set any latin keymap on
X. This is a DE bug and it has a simple workaround (details in the patch).

Ubuntu has fixed this issue sometime between 12.10 -> 14.04. Gnome 3
always appends 'us' layout, even if you have only e.g. 'gr' listed in
keyboard layouts (can be checked via setxkbmap -query). In KDE, the
global system shorcuts seem to stop working as soon as latin keymap
is not the first in the list, which means that KDE users won't be
affected as they will likely always have a latin keymap present in
the list.

This patch removes parts of 2b666d9576,
the parts that in the commit message I was referring to by this quote:

"lookupLatinKeysym() also handles the cases that did not work in Qt4
with XLookupString".

Since finding a latin key is not working by XLookupString() in this
rare case, then it would not work pretty much across the whole desktop.
And users would be more interested at finding a solution that works
across the desktop. We should not workaround this issue. Desktops that
are doing it wrong should learn about this and not repeat the same mistakes
on Wayland systems, where XKB keymap is assembled by compositor and passed
to clients. Clients should work with the provided keymap as is.

The missing-latin-keymap workaround is considered fragile for several
reasons - it might not work with legacy or enterprise X server key codes
and it relies on global _XKB_RULES_NAMES (there might be several connected
keyboards). And theoretical limitation: client might be running in a
restricted environment where we don't have access to keymaps on the
file system.

Change-Id: Ib445b2ea46174248cfa0e5da0eb642cd2a5cf2f6
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-02-22 21:37:50 +00:00
Marco Trevisan (Treviño)
ff169e8859 dbustray: add NewMenu signal and emit it when menu changed
This is a signal that is not actually supported by the
StatusNotificationIcon standard, but it comes to be important
for the Qt implementation of it, in fact qt apps might
not have a menu, when exporting the Menu path as /NO_DBUSMENU
or they could add this later in the execution.
So, currently there's no way for the StatusNotificationWatcher
to know when a menu has been added (or changed).

Adding a NewMenu signal won't cause any troubles, but will
allow watchers to be notified properly on menu addition.

Change-Id: I9a8b00213f5023950811af1d62cd91bc51744b78
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-02-22 21:05:43 +00:00
Jan Arve Sæther
2dc578a8f2 un-crash QPlainTestLogger::printMessage()
Commit cf4a611115 refactored out test
identifier buildup into a standalone function, but it returned the
QTestCharBuffer as a value type, which ultimately caused it to crash:

Unfortunately QTestCharBuffer is not copied correctly: Since it uses the
default copy ctor it will copy the buf pointer and create a deep copy of
the staticBuf pointer. When the dtor was later called it would then end up
calling free(buf) (where buf pointed to the staticBuf of the original
QTestCharBuffer).

Task-number: QTBUG-66607
Change-Id: Ifa290658be6f077a0d6613451c26aeeffc8df41c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 6ffb358822)
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-02-22 19:29:26 +00:00
Sami Nurmenniemi
d266ac3a6b Blacklist tst_QNetworkReply::ioHttpRedirectMultipartPost
Task-number: QTBUG-66216
Change-Id: I5eaa2122ebeb8f003c961a156834a0c6360581b0
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-02-22 19:08:30 +00:00
J-P Nurmi
9c2783c6c7 QGtk3Menu: take GTK's scale factor into account
GTK's scale factor, which can differ from Qt's scale factor, must
be taken into account in the native GTK menu positioning function
qt_gtk_menu_position_func().

Task-number: QTBUG-55251
Change-Id: I4ad460baab54facd25564ad85ded383c9321d597
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-02-22 19:08:11 +00:00
Christian Ehrlicher
a924b4d58f psql: do not try to get table name when PQftable returns InvalidOid
When the table for a selected column can't be determined (e.g. because
there is no table for it), PQftable returns InvalidOid. This was not
covered and a query to determine the table name was executed every
time which slowed down calls to QSqlQuery::value(QString).

Task-number: QTBUG-65226
Change-Id: Idd8fbaaef7b01ca4151439f46cad2cce6f1c93e9
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-02-22 19:00:08 +00:00
Thiago Macieira
988c3e4fc0 filetest: Make the "ls" command actually list the dirs
Change-Id: I940917d6763842499b18fffd15143af77c036d69
Reviewed-by: David Faure <david.faure@kdab.com>
2018-02-22 18:59:37 +00:00
Alexander Shevchenko
7ff3032b22 unify windows mkspecs: define c++ flags explicitly
with 40e87491 merged, 'QMAKE_CXXFLAGS' variable in
'win32-g++' toolchain became defined via 'QMAKE_CFLAGS'.
the similar can be found in 'win32-clang-msvc' and
'win32-icc' toolchains too.

this works for now, because such definitions just duplicates code
from includes, like 'gcc-base.conf', 'msvc-desktop.conf', etc.
but it would became broken, if changes would be applied to
'QMAKE_CXXFLAGS' definitions in that includes, prior
to the redefinitions in 'win32-*/qmake.conf' toolchains.

thus 'QMAKE_CXXFLAGS' definitions in 'win32-*/qmake.conf' toolchains
should not depend on 'QMAKE_CFLAGS' and be done explicitly.

in order to apply this change correctly to 'win32-icc' toolchain,
its 'QMAKE_CFLAGS' variable should become dependent on definitions
in the includes, similar to 'win32-clang-msvc' and
'win32-msvc' toolchains.

Change-Id: I5e820e44a769a590ba63f70dcb3a115311093311
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-02-22 18:45:15 +00:00
Pablo Marcos Oltra
17b73b0d2b Cocoa: fix grabWindow when mixing highDPI and non-highDPI screens
CGDisplayCreateImageForRect seems to have a weird behavior when mixing
highDPI and non-highDPI screens since it may take part of the
non-highDPI screen when the highDPI display is at the left or at the
top of the main monitor.

To workaround this issue, we capture the whole screen and then crop the
image to the desired size.

Task-number: QTBUG-47643
Change-Id: Ib2a3850a0a549964c7fe272abb563bd23518c234
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-02-22 10:28:08 +00:00
Tor Arne Vestbø
8ef9a0ae89 windowflags: Make it easier to debug windows without a frame
Without any content it was hard to see the window. Put some lipstick on it.

Change-Id: I0fefffb0a4deba7ac91e67a6153a9a27308fe493
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-02-22 09:51:49 +00:00
Tor Arne Vestbø
8702e28628 windowflags: Lock fixed size to current size instead of 300x300
The latter would allow one final resize that would immediately
jump to 300x300.

Change-Id: I566e5e9dc1fb07f748f528f002166a8438344173
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-02-22 09:51:44 +00:00
Kai Koehne
a7f3d1c6c5 Add Linux-syscall-note exception to 3rdparty testlib documentation
Change-Id: Ib2e0ee2b7397e65ebd79a92fc83c9e08780d626e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-02-22 09:32:43 +00:00
Martin Storsjö
b97765efd4 moc: Only use the init_priority attribute when targeting windows
While both GCC and the GCC compatible clang support this attribute in
general, GCC doesn't support it when targeting macOS, ending up with
errors like these:
error: 'init_priority' attribute is not supported on this platform

This error isn't a property of the platform itself though, since
clang supports the attribute just fine on macOS.

The attribute is only used to work around an issue with dllimport
on windows, so limit its use to that platform, to avoid issues
with it potentially being unsupported on platforms other than
macOS as well.

This fixes compiling with GCC for macOS.

Change-Id: I0235e6365635d73233951566c10ad869b26a0fc6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-02-22 05:14:36 +00:00
Pasi Petäjäjärvi
02eb264aa2 Fix build when ftp feature is disabled
Configuring Qt with -no-feature-ftp cause build to fail.

Change-Id: I47f1cdc400702d0211a9f620c8606983f08fa70c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-02-21 18:54:52 +00:00
Thiago Macieira
604e5e340e Revert "JSON doc: update the RFC we link to"
This reverts commit 71090f0950. Changing
the link was wrong because we do not actually comply with the new RFC.

Task-number: QTBUG-66470
Change-Id: I940917d6763842499b18fffd15147cb93c27b7f4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-02-21 18:51:40 +00:00