Skip on crashing tst_qvulkan test
Blacklisted completer_data on qfiledialog
(8d76c5af51 should have been enough but
it is still failing)
Task-number: QTBUG-108328
Task-number: QTBUG-108329
Change-Id: Iad5573af60cca16d16ba0462293e276186e25653
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
The qfiledialog test was failing on completer_data test. The fix
available for Android 11 also works in Android 7, so removed the if
clause.
Task-number: QTBUG-105377
Change-Id: I76a4c1073a754c9b299cfe731f42b80da1a6f8e2
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This is a semantic patch using ClangTidyTransformator as in
qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8, but extended to
handle typedefs and accesses through pointers, too:
const std::string o = "object";
auto hasTypeIgnoringPointer = [](auto type) { return anyOf(hasType(type), hasType(pointsTo(type))); };
auto derivedFromAnyOfClasses = [&](ArrayRef<StringRef> classes) {
auto exprOfDeclaredType = [&](auto decl) {
return expr(hasTypeIgnoringPointer(hasUnqualifiedDesugaredType(recordType(hasDeclaration(decl))))).bind(o);
};
return exprOfDeclaredType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes))));
};
auto renameMethod = [&] (ArrayRef<StringRef> classes,
StringRef from, StringRef to) {
return makeRule(cxxMemberCallExpr(on(derivedFromAnyOfClasses(classes)),
callee(cxxMethodDecl(hasName(from), parameterCountIs(0)))),
changeTo(cat(access(o, cat(to)), "()")),
cat("use '", to, "' instead of '", from, "'"));
};
renameMethod(<classes>, "count", "size");
renameMethod(<classes>, "length", "size");
except that the on() matcher has been replaced by one that doesn't
ignoreParens().
a.k.a qt-port-to-std-compatible-api V5 with config Scope: 'Container'.
Added two NOLINTNEXTLINEs in tst_qbitarray and tst_qcontiguouscache,
to avoid porting calls that explicitly test count().
Change-Id: Icfb8808c2ff4a30187e9935a51cad26987451c22
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
The function is used the internal window activation machinery and
should not be called by user code.
Many tests still use this function, and should be ported over to
QWidget::activateWindow(). For now they are using the private
helper in QApplicationPrivate, so that we can progress with the
public API deprecation.
Change-Id: I29f1575acf9efdcbae4c005ee9b2eb1bb0c8e5b5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
CMakeLists.txt and .cmake files of significant size
(more than 2 lines according to our check in tst_license.pl)
now have the copyright and license header.
Existing copyright statements remain intact
Task-number: QTBUG-88621
Change-Id: I3b98cdc55ead806ec81ce09af9271f9b95af97fa
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Files that have to be modified by hand are modified.
License files are organized under LICENSES directory.
Task-number: QTBUG-67283
Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
And remove their uses.
[ChangeLog][QtCore][Deprecation Notice] Deprecated QString::count()
and QByteArray::count() that take no parameters, to avoid confusion
with the algorithm overloads of the same name. They can be replaced
by size() or length() methods.
Change-Id: I6541e3235ab58cf750d89568d66d3b1d9bbd4a04
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
tst_qfiledialog was disabled because it crashed. It does not any more.
Task-number: QTBUG-87671
Task-number: QTBUG-101194
Pick-to: 6.2 6.3
Change-Id: Icfda2cd01677f3a076b74429fcf66a1de79d2aa9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Check that a file name, not the full path, contains a dot.
Fixes: QTBUG-59401
Pick-to: 5.15 6.2
Change-Id: I193b2ae457a3ac6a460524dbf200786eb3461cef
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Replace custom SRCDIR define with QT_TESTCASE_SOURCEDIR. The latter is
automatically available to all tests to use and serves the same purpose
but is not terminated by a slash.
Change-Id: I62896d0fd84ac63ac1b74a459ec1646c6bde0a46
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Remove the qmake project files for most of Qt.
Leave the qmake project files for examples, because we still test those
in the CI to ensure qmake does not regress.
Also leave the qmake project files for utils and other minor parts that
lack CMake project files.
Task-number: QTBUG-88742
Change-Id: I6cdf059e6204816f617f9624f3ea9822703f73cc
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Complete search and replace of QtTest and QtTest/QtTest with QTest, as
QtTest includes the whole module. Replace all such instances with
correct header includes. See Jira task for more discussion.
Fixes: QTBUG-88831
Change-Id: I981cfae18a1cabcabcabee376016b086d9d01f44
Pick-to: 6.0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This time based on grepping to also include documentation, tests and
examples previously missed by the automatic tool.
Change-Id: Ied1703f4bcc470fbc275f759ed5b7c588a5c4e9f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Modify special case locations to use the new API as well.
Clean up some stale .prev files that are not needed anymore.
Clean up some project files that are not used anymore.
Task-number: QTBUG-86815
Change-Id: I9947da921f98686023c6bb053dfcc101851276b5
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Remove around 1000 compiler warnings about missing overrides
in our auto tests.
This significantly reduce the compiler warning noise in our auto
tests, so that one can actually better see the real problems
inbetween.
Change-Id: Id0c04dba43fcaf55d8cd2b5c6697358857c31bf9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Use pro2cmake with '--api-version 2' to force regenerate
projects to use the new prefixed qt_foo APIs.
Change-Id: I055c4837860319e93aaa6b09d646dda4fc2a4069
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This is required to remove the ; from the macro with Qt 6.
Task-number: QTBUG-82978
Change-Id: I3f0b6717956ca8fa486bed9817b89dfa19f5e0e1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
QFileSystemModel is the documented replacement. It uses threads to
populate the model, which QDirModel doesn't.
Change-Id: I7818ecd8f849eb566ac176612f382e17a0471c47
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
And a few cleanups of out-dated comments and dead code.
Change-Id: I59c6b9129a21b8953626cb63c3ebbf9b6c49a657
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Either by testing for platform name or window activation.
After this gets in, we can enable widget tests in the Wayland bot, which
hopefully will reduce the number of regressions in the Wayland plugin.
Fixes: QTBUG-62188
Change-Id: I71ce8abd6b5891e5b953126b1c35345892585931
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
- Replace the usages of deprecated APIs by corresponding
alternatives in the library code and documentation.
- Build docs for deprecated APIs conditionally, based on deprecation
version. Remove the docs of methods deprecated since 5.0.0, these
methods are not compiled anymore.
- Modify the tests to make them build when deprecated APIs disabled:
* Make the the parts of the tests testing the deprecated APIs to
be compiled conditionally, only when the corresponding methods
are enabled.
* If the test-case tests only the deprecated API, but not the
corresponding replacement, add tests for the replacement
Task-number: QTBUG-76491
Task-number: QTBUG-76540
Task-number: QTBUG-76541
Change-Id: I6aaf0a1369c479fb880369a38f2b8e1e86b46934
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Extend the history by a persistent model index list
reflecting the selection.
[ChangeLog][QtWidgets][QFileDialog] The widgets-based dialog now
remembers the selected files when navigating the history
Fixes: QTBUG-71415
Change-Id: I86774439be070c1b922acd0e9a27d029f02f68d3
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Mark some long obsolete functions as deprecated so the can be removed
with Qt6:
- QFileDialog::setConfirmOverwrite()/confirmOverwrite()
- QFileDialog::setReadOnly()/isReadOnly()
Change-Id: I3cc1df76c8e40e95b8e9893ae06ef488fad26fb6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Mark some long obsolete functions as deprecated so the can be removed
with Qt6:
- QDialog::setOrientation()/orientation()
- QDialog::setExtension()/extension()/showExtension()
- QFileDialog::setNameFilterDetailsVisible()/isNameFilterDetailsVisible()
- QFileDialog::setResolveSymlinks()/resolveSymlinks()
Change-Id: Ibbd5b4192ea8ab483d6b2a8dbf9879f29f9ee86d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
The test had some shortcomings:
- Flakyness due to not waiting for the file dialog list
to be populated.
- It assumed that the hardcoded directory name
____aaaa... always would show first in the list. This may
not be true on Windows, where names like .designer show above.
- On failure, the test directory would leak.
This manifested in failures like:
FAIL! : tst_QFiledialog::clearLineEdit() '(fd.directory().absolutePath() != QDir::home().absolutePath())' returned FALSE. ()
To fix this, use QTemporaryDir and introduce predicates that
can be used to check whether the dialog has been populated
and the right file/directory is selected by pressing cursor down.
Use the temporary directory as not to pollute the home directory.
Change-Id: Ic504b91325993dcd6099c99e125e7ed8ff1d7672
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Faure <david.faure@kdab.com>
QFileDialog::selectedMimeTypeFilter() returns either an empty
filter in the case when a platform file dialog doesn't implement
mime type filters, or initiallySelectedMimeTypeFilter() in the
case of Qt's file dialog. In both cases the result is incorrect.
Make it return a mime type filter corresponding to a selected
name filter. As a result, tst_QFiledialog::setMimeTypeFilters()
has to be fixed: QFileDialog::selectMimeTypeFilter() can't select
a name filter for an invalid mime type, and "application/json"
is not supported by RHEL 6.6, so replace it by "application/pdf".
Change-Id: I58d3be860a9b5e8a72cba86d74b520178115a812
Reviewed-by: David Faure <david.faure@kdab.com>
The test was failing because the files it expected to create were not actually
visible on the disk.
This was because 189e9c93d7 made QTemporaryFile
use unnamed files if the file name is not actually requested. Fix by forcing the
temporary file to be made with the requested name.
CI has not caught this because the test executable is marked insignificant_test
on Linux.
Change-Id: Ibe0244fdfcc66acf3be4314da51b4c0b3b520b71
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
selectFile() is a no-op if the dialog is visible and
its line edit has focus, which will happen at some
point after show() is called.
In other words this is a race, and the test will pass/fail
depending on the timing of the platform implementation.
Task-number: QTBUG-66536
Change-Id: I03957edb6496d17af7a8ed1d4ca86435375e0d40
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Don’t assume that there is an active modal widget
on QApplication::focusChanged(). That signal can also
be emitted on focus clear during dialog destruction.
Task-number: QTBUG-66536
Change-Id: I20c64339c56a52b39c26a7683b62779deba576d9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>