Do not overwrite stdout/stderr by default, but only if requested.
This restores the behavior of QProcess::startDetached of Qt 5.9.
Task-number: QTBUG-67905
Change-Id: Idccf7b0da7bd80f88a0624286ddf2851bc974fb1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
The ppm format specifies that the maximum color value field must be
less than 65536. The handler did not enforce this, leading to
potentional overflow when the value was used in 16 bits context.
Task-number: QTBUG-69449
Change-Id: Iea7a7e0f8953ec1ea8571e215687d12a9d77e11c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
It appears that by default our keychain auto-locks when the
system sleeps. This makes the keychain totally useless, since
its password is a random 256 bytes our user never has a chance
to know. Thanks to Mårten for the hint about SecKeychainSetSettings,
the way to properly fix it.
Task-number: QTBUG-69677
Change-Id: I2603c26b8422a1bcace3336e9b4ebe0381c952d7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The width of the icon was subtracted out of the available text area
width even when the value of the `decorationPosition` was Top/Bottom.
Task-number: QTBUG-69404
Task-number: QTBUG-30116
Change-Id: I501ffc0dab0cff25e525c26adf9bdb060408927b
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Some distributions do not define MINGW_HAS_SECURE_API globally,
resulting in methods like wgetenv_s not being declared in the
headers.
This is probably to keep compatibility with Windows XP. Anyhow,
we don't support Windows XP anymore, so we can safely add the
define.
Note that this is not necessary for the mingw-builds distro,
which is the only one we test and support. Anyhow, I don't
see any risk in adding these for other distributions.
Diff was provided by Philippe Dunski in the bug report.
Task-number: QTBUG-67443
Change-Id: I3a64b11541fe95e527ed44bbf8ad94469d457d3d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Use platform window directly for setting a mask to prevent bitmap
scaling if pixmap and window DPR are the same.
Amends: 42f788ffe2
Task-number: QTBUG-61948
Change-Id: I5eec85c01f20bdefff7343e83ff10cbcb2c79508
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
with a case when we fail to ignore/pre-set one of possible
verification errors.
Change-Id: I23b06243b61acef1ef3576c51529f3ef6601ba7d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The logic seems to be incorrect (or the naming is misleading): it
only adds 'appMenu' if it was found in the previous 'mainMenu',
failing otherwise. Consider the following example:
while (true){
QApplication app(a,b);
MainWindow w;
w.show();
app.exec();
}
It's quite a contrived but apparently allowed API use (OP claims
they have to switch languages in their app). The main window and the
app are destroyed, so is the menu bar. Then a new main window is
created, with a new menu bar. Now the current [NSApp mainMenu]
(the one set after we deleted the previous) does not have 'appMenu'
anymore (we removed it when initializing the first menu bar).
So as a result we have app menu missing and add new menus/items
to a wrong menus/at wrong index.
Change-Id: I64fce766d6c12ebf7ae12bb94af41c8c1de3d78b
Task-number: QTBUG-69496
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
They said "By default, this function is case sensitive"
but this makes no sense when you're using a regexp for searching,
the regexp is case sensitive or not by itself, QStringList does
not influence that.
Change-Id: I7446cb52a9f915c6551af6046ce89cbc8bab96ed
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
After trying to fix (work around) system resize/move issues in various
ways from within the platform plugin, it has been concluded that it is a
bug at widget layer and should be fixed there instead: QTBUG-69716.
This patch reverts parts of 3bc0f1724a and disables system move / resize
on XCB plugin. Meaning, QSizeGrip will use its own implementation for
resizing a window.
Task-number: QTBUG-68501
Task-number: QTBUG-69628
Change-Id: Ib4744a93fb3e3c20f690a8f43713103856cb7d1a
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* The plugin IID with version number was removed in transition to new
plugin system, see efde205586.
* This change re-adds the version number, so that we deliver on the best
practices as mentioned in the documentation for the example.
Task-number: QTBUG-59487
Change-Id: I88596e71cf18be88d0b1d28d56b6d3bb72fe756b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
The channel pipes are only set up if the channel's type is
Redirect. Fix the conditions accordingly.
This amends commit 7ad55ca6.
Change-Id: Ie8a800fbe2bf9f5f6709b14ba03133b80e9b4bef
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Override cursors can be modified externally when for example crossing
window borders. Add helper function to enforce the cursor again to
QWindowsWindow::applyCursor() which is called for enter events.
Task-number: QTBUG-69637
Change-Id: Ibea4da9f2aac81377002b626daae64b1102f6c2b
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
QTestEventList refers to QTestEvent, which is an
implementation detail that should not appear in
documentation.
Task-number: QTBUG-68109
Change-Id: Id132889427b757ea17165c8b15ed47bcfb9e1c3f
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
The title of the external page 'Creating a Mobile Application' in the
Qt Creator docs has changed to include a space between 'Qt' and
'Creator'. This caused the filename to change, thus breaking the
incoming links from the Qt for (iOS|Android) Examples pages.
Task-number: QTBUG-69678
Change-Id: I7819a9e2b483bc760af5bb636841bccf0c6cb739
Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
Use this as context in connect to functors/lambdas.
Add description of the use of context in connects.
Update the simple example to make it slightly less
confusing for (new) readers.
Task-number: QTBUG-69483
Change-Id: Ibbbe98c4282cea4ebd860b1d174871559b7f195b
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
QLocale has various methods that deal in date-time formats, which may
be supplied as strings; but does not document the form of a format
string. That's documented in QDate, QTime and QDateTime, so link to
them for the details.
Task-number: QTBUG-23307
Change-Id: I6347d80a87dc03f6a4065e3d5bf4d535f05af93f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When the connection has been encrypted we will,
in QHttpNetworkConnectionChannel::_q_encrypted, emit 'reply->encrypted'
in which user slots can be called.
In the event that the user calls abort it will, however, not abort until
the next time it goes back to the event loop (which might not happen
until after the request has already been sent).
Task-number: QTBUG-65960
Change-Id: I96865f83c47f89deb9f644c86a71948dbb0ec0d0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The function does not exist. QRandomGenerator::generate() is the equivalent
function
Change-Id: I5d65f2913fc5a9e60004d206733993254885a5e6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
qtbase/src/plugins/sqldrivers/mysql/qsql_mysql.cpp:78:21: error: conflicting declaration ‘using my_bool = bool’
using my_bool = bool;
^
In file included from /home/nierob/dev/qtbase/src/plugins/sqldrivers/mysql/qsql_mysql_p.h:60,
from /home/nierob/dev/qtbase/src/plugins/sqldrivers/mysql/qsql_mysql.cpp:40:
/usr/include/mysql/mysql.h:53:14: note: previous declaration as ‘typedef char my_bool’
typedef char my_bool;
^~~~~~~
Seems that type was implemented with char not bool.
Ammends 82b4c79fb9.
Change-Id: Iccb70303a3af5c298922525b219dc6ed6168ba0b
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
That's actually how ignoreVerificationErrors (and QSslSocket::ignoreSslErrors)
are used to set the expected/known verification errors before handshake.
Auto-test updated too.
Change-Id: I9c700302d81ddb383a4a750fafd594373fb38ace
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Makes it easier to run a test repeatedly until it crashes, and then
attach a debugger.
Change-Id: I8ad5d706becd77a2743a51927c837f3d1da08624
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This prevents the view from triggering display of its superview when
being temporarily added, which is both inefficient and causes issues
when those dirty-rects are wrong due to the wrong frame position of
the added view.
Task-number: QTBUG-67998
Task-number: QTBUG-68023
Change-Id: Idc87d0540216e2e39cc84cc57cb818110c9d00e2
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
We now treat -o foo/bar/baz as a request to generate the output in the
foo/bar directory with baz as the output name, or if foo/bar/baz is already
a directory, in the foo/bar/baz directory with the default output name.
We take care to handle generator specific directory structures, so
that the project directory does not get merged into OUT_PWD. This is
done in runQmake(), before parsing the project file, so that OUT_PWD
will be correct during project parsing. The individual generators are
then passed the filename relative to the final output directory.
Each generator now also makes sure to add the right project suffix
to the output file, so -o foo will result in foo.pro or foo.vcproj,
instead of just foo.
Task-number: QTBUG-44408
Change-Id: I26990cec0c0458bee2b88dbb86322617a85f54b5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
A default-constructed QJsonObject has no data payload, it is only a pair of null
pointers. So, when it becomes necessary to 'materialize' such an object, a
special global emptyObject constant is used as the substitute payload. There is
a small problem with this global constant though, namely that it's is_object
flag is unset. In other words, the emptyObject is not an object, but an array.
Fix by setting the is_object flag on emptyObject.
The example code in the bug report
QJsonObject parent;
QJsonObject child;
parent["child"] = child; // 1
child = parent["child"].toObject(); // 2
child["test"] = "test"; // 3
runs into this problem on line 1. Inserting the default-constructed child means
inserting a copy of emptyObject. On line 2 a pointer to this copy of emptyObject
is retrieved and cast to an object. But it's not an object, it's an array, so
things go wrong hereafter.
Specifically, on line 3, two inserts are performed, one from operator[] and one
from operator=. Each insert increments a compaction counter. The second insert
triggers compaction (QJsonObject::insert calls Value::requiredStorage calls
Data::compact) and compaction branches based on the is_object flag. Replacing
line 3 with
child.insert("test", "test");
causes the example to appear to work since compaction is not triggered and the
JSON serializer does not look at the is_object flag. Still, any further insert()
calls would trigger compaction and memory corruption.
Task-number: QTBUG-69626
Change-Id: I8bd5174dce95998bac479c4b4ffea70bca1a4d04
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Using QTextCursor::Left and QTextCursor::Right moves the cursor visually to right or
left, which does not work with Right to left text, where moving left means advancing to
the next character, and vice versa.
By using QTextCursor::PreviousCharacter and QTextCursor::NextCharacter we leave it up to
the engine for deciding where to move depending on the context.
Task-number: QTBUG-50619
Change-Id: Ibf0a886f3ff6bf9ca2c953aeff8c235612bbc01d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Makes it a bit more clear why all the Xcode settings were lost.
Task-number: QTBUG-45113
Change-Id: I3b19edb02a24673f56e77d3a1fb7cc76584c73fd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* order and sort includes
* use functor connect
* use nullptr
* use member init
* added sanity check for nextPendingConnection()
* small cleanup here and there
Change-Id: I72c6758b5fedea0937a1f2cb9031cb7203f5d955
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
If we ever need to add QCborValue to the bootstrap library, it's
unlikely that we'll need this part. And by splitting it, I can make the
code handle more cases, that hadn't been properly handled before.
Change-Id: I2f630efbbce54f14bfa9fffd154160c0ad893695
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
There is no such file, if one of the "directory" components of its
path is not, in fact, a directory. Added a test for non-existent file
(specified to give empty canonical file path) as well as a test for a
file in a sub-directory of a known file. The former incidentally
tests for QTBUG-29402, fixed long ago.
Change-Id: I60b80acc0f99f0a88cdb1c4d191af7384f3a31c5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Makes clear that this is what it is; and ensures we'll get compiler
warnings if someone adds a new entry to the FileName enum without code
to handle it here.
Change-Id: I36e383066728cefcc75e0a760e36222cebd1dff0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Use one QStringLiteral instead of repeating a QLatin1String(), that
was passed to a function that has to convert it to unicode; do the
conversion at compile-time.
Reducing i % 256 is fatuous when i ranges from 1 to 100.
A QFile will close() itself on destruction, no need to do it explicitly.
Especially when *not* close()ing the *other* QFile that was left open.
Change-Id: Idb39312d9c9beaf082b7cead574bc6bb9bb3a775
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>