Commit Graph

33616 Commits

Author SHA1 Message Date
Morten Johan Sørvig
8b3a120a3b macOS: Simplify and correct style mask determination
This function had accumulated a fair bit of accidental
complexity over the years.

- No early returns, make sure to preserve fullscreen
  state for all windows.

- Use windowIsPopupType() directly to set borderless
  for Qt::Popup (but not Qt::Tool).

- Handle Qt::Tool explicitly.

- Deduplicate Qt::CustomizeWindowMask handling.

- Remove case that used the absence of NSResizableWindowMask
  to remove the maximize button. Maximize is now
  disabled elsewhere (setWindowZoomButton). All windows
  now get NSResizableWindowMask by default.

- Qt::ForeignWindow now gets a standard window style
  mask instead of NSBorderlessWindowMask. The old
  code did not handle this case and left the mask
  value unmodified.

Change-Id: I56499e9f05c3f481b5a96e0507da2fb195f207fa
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-08-22 08:06:31 +00:00
Giuseppe D'Angelo
12c5264d9a QCryptographicHash: re-add support for Keccak hashing
88a8feeacb fixed QCryptographicHash's
implementation of SHA-3 -- before, QCryptographicHash was
calculating Keccak, not SHA-3. The change however breaks downstreams
that were relying on the "wrong" values calculated by earlier
versions of Qt. To restore compatibility with such calculations,
add the support for Keccak back, as deprecated and to-be-removed
in Qt 6.

[ChangeLog][QtCore][QCryptographicHash] In order to preserve
compatibility with earlier versions of Qt, QCryptographicHash is
now able to calculate Keccak message digests.

Task-number: QTBUG-59770
Change-Id: I740684cb3d0774292fa837a06b444c73fb4eed52
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-22 07:54:31 +00:00
Thiago Macieira
9c112a37ba QFileSystemEngine::cloneFile: expand the Linux cloning process
FICLONE only works on (currently) btrfs and xfs, and then only if it's
the same mount, so it's of very limited use. There are a couple other
techniques we may try that do not involve I/O through user-space, though
not immediate:
 - sendfile(2) can be used on regular files, even across mountpoints
 - sendfile(2) can be used on block devices too, but we need to get the
   device's size first
 - splice(2) can be used on pipes (FIFOs)

We only implement the first technique (earlier iterations of this patch
implemented all).

Change-Id: I81480fdb578d4d43b3fcfffd14d4b47cd70495a3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-08-22 06:56:25 +00:00
Thiago Macieira
974b3adf8a QFileSystemEngine::cloneFile: add support for fcopyfile(3) on macOS
For some reason, fcopyfile(3) works on directories, so we need to make
we aren't operating in one.

Change-Id: I81480fdb578d4d43b3fcfffd14d4f2f485348515
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-08-22 06:56:16 +00:00
Thiago Macieira
26094982f8 Move the file-cloning code from QFSFileEngine to QFileSystemEngine
Change-Id: I02d22222fff64d4dbda4fffd14d1c1bbf48385ff
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-08-22 06:56:08 +00:00
Friedemann Kleint
1fc9c8d8f3 Windows QPA: Call raise unconditionally for popups
A case of nested Qt::WindowStaysOnTopHint may occur when
context menus are created on windows with Qt::WindowStaysOnTopHint
set. Raise the popup in that case.

Amends 329a029c36.

Task-number: QTBUG-62004
Change-Id: Ifb761edbd42b1447bec30735810c006d02e1aa97
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-08-22 06:18:03 +00:00
Jake Petroules
0f4cce2630 QOperatingSystemVersion: add Android Oreo (v8.0, API level 26)
[ChangeLog][Binary Compatibility Note] The variable
QOperatingSystemVersion::AndroidOreo was added in this release.
Code that uses this variable will not run under Qt 5.9.1.
If backwards compatibility is desired, use instead
  QOperatingSystemVersion(QOperatingSystemVersion::Android, 8)

Change-Id: I1da5a5577bf6b719e543a1ded1f9b912a83665c3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-22 05:45:17 +00:00
Morten Johan Sørvig
750a252b89 Blacklist tst_QMessageBox::defaultButton on osx ci
Has become flaky on CI. Does not fail locally.

Change-Id: I42938849571938db78b16a72c215442a69f7c2d5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-08-22 05:10:54 +00:00
Morten Johan Sørvig
d044b0b1e3 Remove timer checks from testQuitLock
This test sets up two timers:
	- a 100ms recurring timer
	- a series of 10 200ms single-shot timers.

After quitLock lets exec() return it then uses a signal
spy to check if the 100ms timer fired at least 17/20
of the times it should.

However there is no guarantee that the 100ms timer
will fire more often than the 200ms timer. If the
native timer callbacks happen at 500ms intervals then
Qt will fire both timers (once) at that interval.

In practice this seems to happen on macOS CI under
system load and/or with the test app napping.

The primary goal for the test is to verify that exec()
returns when it should; we can remove the timer signal
spy.

Remove testQuitLock from BLACKLIST.

Timely timer:

  524429311.389913 runLoopTimerCallback
  524429311.389979 200ms fire
  524429311.389997 100ms fire
  524429311.490056 runLoopTimerCallback
  524429311.490130 100ms fire
  524429311.589752 runLoopTimerCallback
  524429311.589929 200ms fire
  524429311.589976 100ms fire

Delayed timer:

  524429428.690887 runLoopTimerCallback
  524429428.691002 100ms fire
  524429428.691143 200ms fire
  524429433.692103 runLoopTimerCallback
  524429433.692205 100ms fire
  524429433.692331 200ms fire

Change-Id: Iff4faaa1de3741cf4e217949d5ed17d4e70c6af2
Task-number: QTBUG-61499
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-08-22 05:10:48 +00:00
Morten Johan Sørvig
1497e5853b QTestLib: Disable App Nap on macOS
App Nap may cause stalls or timer delays during test runs.

Change-Id: I828282d12127918439a9a2a4f7d7be6cac457b42
Task-number: QTBUG-61499
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-08-22 05:10:43 +00:00
Morten Johan Sørvig
8b8578a155 macOS: Add support for OpenGL Core Profile 4.1
NSOpenGLProfileVersion4_1Core is available starting
with macOS 10.10.

Task-number: QTBUG-62333
Change-Id: I75d8c3bc1093ff38c6ca1db2d2da50fd448a149f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-08-22 05:08:04 +00:00
Topi Reinio
2ea3c0d5f6 Doc: Clean up Qt::ApplicationAttribute docs
Move deprecated and obsoleted enum values to the end, as there already
was a category for them.

Fix linking to 'Q(Gui)Application'.

Update the usage of the name macOS.

To make the table more readable in online style, add zero-width spaces
to long strings, allowing browsers to word-break them, thus avoiding
text overflow/horizontal scroll bar.

Task-number: QTWEBSITE-783
Change-Id: I0a96156d24cba4a0405c4edd8d3829def30c69bf
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2017-08-21 12:31:56 +00:00
Tor Arne Vestbø
0a7eb034f4 macOS: Restore support for layered mode
After 871966 we now do drawing as a result of drawRect calls, but layer
backed mode was not taken into account. This restores support for both
pull and push-mode drawing in layer-backed mode.

Change-Id: I35039ee9eb4486206f9f92f8230df104473368c9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2017-08-21 10:18:12 +00:00
Paul Olav Tvete
4700a32f21 Android: stop composing before pasting new text
We have to exit composition mode before inserting text. Otherwise, the
state of the input method will be out of sync with the contents of the
text editor.

Task-number: QTBUG-61717
Change-Id: I58bf3988ae9e0acf3302e810e46bb0ebeda30d17
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2017-08-21 07:26:00 +00:00
David Faure
2282ca44e4 Fix compilation on 64-bit CPUs when QPROCESS_DEBUG is enabled
Change-Id: Iad4bea50805b59bd6e985f5830315a7437880b99
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-20 21:23:51 +00:00
Pier Luigi Fiorini
4e3917587b kms: Send enter and leave events to all screens
Propage event to all sibling screens resulting in enter and leave
events being properly sent.

Change-Id: Ia89d53105f6303fae3f304ce0920b5a4a24f86ae
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-08-20 10:38:13 +00:00
Tor Arne Vestbø
23697466ca Reduce usage of QDesktopWidget to resolve screen properties in QtWidgets
Removes the need to initialize QDesktopWidget, just to look up which
screen a widget would map to, the geometry of a screen, number of
screens, etc.

Change-Id: Ieb153b9ff6d3fba645fc528d6e430e8392f990bf
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-08-18 13:10:23 +00:00
Tor Arne Vestbø
52ad5afe1c macOS: Redraw window bottom corners after synchronous backing store flush
Flushing outside of the display cycle does not care about any ordering
between views, including the NSThemeFrame responsible for drawing the
rounded corners of the window.

Since Qt Widgets is doing a lot of synchronous flushing (for now, until
we plumb update() to requestUpdate(), or enable layer-backing), we add
a workaround that explicitly draws the corners after flushing, just like
the logic in [NSView displayIfNeeded]. This is the same workaround used
by WebKit: https://trac.webkit.org/changeset/85376/webkit

Change-Id: I884152cdb2685569704e577b64b5ae278ed82c21
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-08-18 13:10:21 +00:00
Shawn Rutledge
dfdb94410a Revert "macOS: Create NSView as initially hidden, to match QWindow behavior"
It seems to break the ability to grab an offscreen QQuickView.
That in turn breaks the tst_qquickimage::hugeImages autotest.
This reverts commit 096b56f336.

Task-number: QTBUG-62548
Change-Id: I11ce452341bfc2cc3cbc832b613c7366049b31d5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-08-18 12:40:01 +00:00
Eirik Aavitsland
73573fce29 Fix huge painting artefact of certain dashed lines
The artefacts appeared for square-capped dashed pens when the end of
the line fell a tiny fraction into the start of a new dash. At that
point in the dashing algorithm, accumulated precision errors in the
'length' variable could make it slightly differ from the actual length
between the start and end points of the line fragment. Although both
values would be "almost zero", the rasterizeLine() function's square
capping would make the error very visible; see the bug report.
Fix by calculating the precise length of the last line fragment.

Task-number: QTBUG-56969
Change-Id: I7b69c0d465649be61fb87ac7b8348f0c299486ee
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-08-18 11:37:19 +00:00
Joerg Bornemann
5f7287cfb6 Add MSVC manifest backup file to "clean" target
The $${TARGET}_manifest.bak file was not removed on "nmake clean".

Task-number: QTBUG-59827
Change-Id: Ia5b636f4917f3e7a2df8d753824b72e63d278005
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-08-18 10:46:59 +00:00
Oswald Buddenhagen
7cbd13b76a fix configure PSQL_*= being ignored, take 2
amends 09e2fc43ab.

Task-number: QTBUG-62402
Change-Id: I63ca700b12646e8be97735b67c1519b0b4625798
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-08-18 10:45:06 +00:00
Mårten Nordheim
7c4c93a76a Avoid dereferencing nullptr
Change-Id: Id9558fa1db6a7a8f29149e26c761450f58b74b81
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-08-18 10:36:01 +00:00
Eskil Abrahamsen Blomfeldt
b5d762ae87 macOS: Fix padding around tab label with icon
Change c12072c685 fixed a problem
where tab labels would overlap with the icons if the tab became
too small to contain the text. But it did not properly account
for the full area occupied by the icon, because the horizontal
padding is hardcoded to 4 in the mac style, whereas in the
common style (where the icon is drawn) it uses the pixel metric
for this.

In addition, the change only allocated space on the left side,
causing the label to no longer be centered.

Task-number: QTBUG-61235
Change-Id: Ieec4f7044584361f92045addbc8bbd81bd5c9fc7
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-08-18 07:27:52 +00:00
Alex Trotsenko
362466c7d2 QProcess/Unix: fix possible race condition inside waitForXXX() loops
Calling QCoreApplication::processEvents() from a slot connected to the
readyRead() signal might cause desynchronization in the waitForXXX()
loop, if the process has been finished during the event processing.
This results in unnecessary timeouts and causes waitForFinished() to
fail unexpectedly.

So, a proposed solution is to check the state on each iteration of the
loop, as Windows implementation does.

Given issue is tested by tst_QProcess::processEventsInAReadyReadSlot()
which was unstable in CI.

Task-number: QTBUG-62584
Change-Id: I7438cf67b0163bbf49314008a9dc660c0977fb7b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-18 07:25:52 +00:00
BogDan Vatra
1cd91a0ee5 Android: Fix compile using ndkr15 clang and unified headers
Add missing includes

Change-Id: I6fd58c9ebb5a8099c99928e3a7a0cbf3aa23ba43
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-18 04:47:42 +00:00
BogDan Vatra
0027d73b02 Android: Dissable internal hack when using libc++
libc++ has proper wstring support

Change-Id: Ifae98676974bfd660b7f849d4466efc5486d3fca
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-18 04:47:32 +00:00
Alex Trotsenko
3ce555a3de QProcessPrivate::tryReadFromChannel(): remove dead code
'readBytes == 0' condition is checked in the code above.

Change-Id: I9448f47939b174fdef9f0cd5413254d41a8b4273
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-17 18:27:23 +00:00
Andreas Hartmetz
90749ecf09 QLineEdit: Create a separate undo entry for each middle-click paste
Previously, a sequence of middle-click pastes produced just one undo
item to undo/redo all of the pastes at once.
The new code seems to be the intended way to paste the selection anyway.

Change-Id: Ifc2e9714628da9e394053ff8c34709578656f54d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-08-17 18:05:53 +00:00
BogDan Vatra
b525ec2eb0 Android: Fix compile with unified headers
Unified headers now defines _POSIX_THREAD_SAFE_FUNCTIONS but not all
libc functions are available in all Android API versions.

Change-Id: I01c94f0b89e7f8aa8575e7bbda28d9fe41a68ff1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-17 17:21:35 +00:00
BogDan Vatra
39852ce60f Android: Fix warning for __fp16
Change-Id: I65cd64dfc0ed357555e8b5276109303377a67e0e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-17 15:19:28 +00:00
Paul Olav Tvete
2e1ad4335c Don't send extra mouse press to popups on dblClick
QWidget::event() will turn an unhandled double click into a
mouse press. Therefore, we must avoid sending a separate mouse press
in that case.

This copies the logic from 9063edef79,
the previous fix for QTBUG-25831, which only applied to the non-popup
case.

Task-number: QTBUG-25831
Change-Id: I616f398a5ebe1f95d4b65b9f6ce2fe39a6fad83e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-08-17 12:25:10 +00:00
Edward Welbourne
b9557296cb Fix crash when reading a PKCS12 file with no private key
The only reason our code wants PKCS12 files is for a private key, but
a valid file needn't contain one; and reading a file without lead to a
crash in QSslKeyPrivate::fromEVP_PKEY().  So check for missing key and
fail the load, since the file is useless to us.  Also ensure the
caller's pkey is initialized, as we aren't promised that
PKCS12_parse() will set it when there is no private key.

Add a test for this case (it crashes without the fix) and update the
instructions for how to generate test data to cover it also.
(Corrected the wording there, too; at the interactive prompt,
"providing no password" really provides an empty password.)

Task-number: QTBUG-62335
Change-Id: I617508b903f6d9dee40d539b7136b0be8bc2c747
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-08-17 06:43:49 +00:00
Thiago Macieira
0dee566e98 QFileSystemEngine: verify that the file name isn't empty
Making system calls with empty file names is not a good idea. When you
run qmake $srcdir, you see this in strace:

 stat("", 0x7ffed229e250)                = -1 ENOENT (No such file or directory)
(twice)

I've also inlined the isEmpty() function for better code generation.

Some functions take QSystemError and some don't. That needs to be
corrected at some point, possibly with something like std::expected.

Change-Id: I1eba2b016de74620bfc8fffd14ccbfa162f93631
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-08-17 04:45:29 +00:00
Giuseppe D'Angelo
d7db2b4359 QPicture: check that pictureFormat doesn't return dangling pointers
The function returns a const char * out of a QByteArray. We must
be sure that the QByteArray outlives the function, otherwise the
pointer returned would be dangling. Add an assertion for that.

Found by clazy.

Change-Id: I3416af4eb5ec79ddb3e4baf3bdcfe046b44d4225
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2017-08-16 16:19:52 +00:00
Thiago Macieira
cdc79f5ebc XCB: Don't core-dump if we can't connect to the X displayName
Exit with error, but don't crash.

Change-Id: Ie05c6480d8a44fda817ffffd14d9dfd8c951beef
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2017-08-16 15:52:02 +00:00
Tor Arne Vestbø
9a50333dd0 Fix CMake version resolving
Otherwise 3.8.1 is treated as not recent enough than the required 2.8.3

Change-Id: I198fc7d54e3da935fd163c9b9bb7dc12b986d1c2
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
2017-08-16 15:35:40 +00:00
Ville Voutilainen
38db7b1464 Fix an ABI break caused by too-aggressive deprecation
Task-number: QTBUG-62516
Change-Id: Ia3b36cddae982cc6fb9f857505be6e38bc8aaa64
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-08-16 15:35:26 +00:00
Andy Shaw
baf1158c48 Doc: Mark the dbmsType() function and DbmsType enum as internal
The function and type is only used in the tests and has no benefit in
applications so it should be marked as internal to avoid confusion for
those implementing their own drivers.

Task-number: QTBUG-56278
Change-Id: I0f2ae27d41b133c4f0d3b0d390688fd3307592ce
Reviewed-by: Andre Somers <andre.somers@kdab.com>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2017-08-16 13:14:33 +00:00
Andy Shaw
a3d59c7c7f Block input to a window shown while an application modal dialog is visible
Although the window is refused input for the most part from the system,
it does not act like that it is blocked by the application modal dialog.
This ensures that it is the case and prevents things like being able to
double click on the title bar to maximize the window on Windows.

Task-number: QTBUG-49102
Change-Id: If1582819b90cb2ec9d891f664da24f13bfec7103
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2017-08-16 13:13:55 +00:00
Eskil Abrahamsen Blomfeldt
a26a3cfbc7 macOS: Fix matching of font weights for application fonts
5ad2e1cea1 exposed a
latent bug when matching font weights that do not exactly
match any of the canonical weights in the system .

It seems that when we registered the font with FontManager,
it would modify the font weight to match a system weight,
while we now get raw values from the font instead.

So for Roboto Medium, for instance, we would now get
0.2 instead of 0.23, and since our conversion logic
would convert everything between Light (-0.4) to
Medium (0.23) to QFont::Normal, we would regard this
as normal weight instead of medium.

But on a linear scale, it makes more sense to match
to the closest canonical weight instead of requiring
exact matches.

Note that the definition says that the middle between
two weights should tend upwards, therefore we do the
comparisons in decreasing order.

[ChangeLog][QtGui][Text] Fixed matching of non-regular
font weights for application fonts on macOS.

Task-number: QTBUG-61520
Change-Id: Ieda4927c2c69ec72125257340cf06c683b031d05
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-08-16 12:48:15 +00:00
Tony Sarajärvi
f9f5b35e73 Blacklist tst_QFont::DefaultFamily in B2Qt
Task-number: QTBUG-62528
Change-Id: Iadf9a923b2a624c5082fd1bd61691f8100178f94
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-08-16 07:32:09 +00:00
Gabriel de Dietrich
5c21c3c23a QMenu: Prevent torn-off menus from extending behind the taskbar
On Windows and macOS, that area of the menu can become inaccessible
if the menu is tall enough. Since these are not popups but tool
windows, the test for UseFullScreenForPopupMenu should not apply
for torn-off menus.

Change-Id: Ife7836bef568896a5bb67d42a2af412f06a871d6
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-08-16 04:08:46 +00:00
Volker Krause
bad6b8e400 Propagate all module defines to CMake config files
So far this only covered the QT_xxx_LIB define, but not any other defines
a module might export (such as QT_NO_QML_DEBUGGER which hasn't been ported
to the new configure system yet).

Change-Id: I8aae2354fed77a6f0e527ad8d63d25654bb067d0
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-08-15 16:44:38 +00:00
Liang Qi
106d3b9bf9 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/plugins/platforms/cocoa/qcocoamenu.h
	src/plugins/platforms/cocoa/qcocoamenu.mm
	src/plugins/platforms/cocoa/qcocoawindow.mm
	src/widgets/styles/qstylehelper_p.h

Change-Id: I54247c98dd79d2b3826fc062b8b11048c9c7d9bb
2017-08-15 16:31:48 +02:00
Mårten Nordheim
eb2b635154 Check for loopback address if network access is unavailable
A loopback address warrants the same exception as local files.

Task-number: QTBUG-59219
Change-Id: Ie0a75faa558d6596455da38656c8749c994d0fd8
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-15 14:26:51 +00:00
Oswald Buddenhagen
8bebded9ab qmake: don't limit command line length when not actually on windows
QMAKE_LINK_OBJECT_MAX is actually a property of the host, not the
target.

this works around binutil's inability to use thin LTO objects in
conjunction with an MRI script
(https://sourceware.org/bugzilla/show_bug.cgi?id=21702).

Task-number: QTBUG-61335
Change-Id: I90a1334b9c905c433b35546e8f3f3b5089d2c65b
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-08-15 10:55:52 +00:00
Oswald Buddenhagen
d64abf8166 refuse to build examples inside the qt source tree stand-alone
doing so is somewhat likely to cause follow-up issues, as it turns the
source tree into a build tree as a side effect.

note that this change does not affect building examples inside an
install tree, even if doing that is still ugly.

Change-Id: I386bf2ab959269f55553c70b7551dd9afec2bcba
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-08-15 10:55:48 +00:00
Oswald Buddenhagen
1da25fe85a fix excessive execution of code meant for examples only
qt_example_installs.prf is loaded by every sub-project inside the qt
tree, as qt_build_config adds it.

Change-Id: Ice7e81b280b6964ed5cc1b9f1501bf74df737d7e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-08-15 10:55:44 +00:00
Oswald Buddenhagen
1480066592 employ return() inside qt_example_installs.prf gainfully
reduces the indentation level.

Change-Id: I7851ffc5e9ecaaa3ae375d14fd245ea3747f61b2
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-08-15 10:55:40 +00:00