From f4b5fa76d76a38c8cd97ac410981a2209d100180 Mon Sep 17 00:00:00 2001 From: Sze Howe Koh Date: Tue, 9 Jul 2019 22:11:47 +0800 Subject: [Doc] Fix minor typos Change-Id: I7e74806218dcc07d800f4ec08e94abce32483f5e Reviewed-by: Samuel Gaist --- src/corelib/plugin/qpluginloader.cpp | 2 +- src/corelib/serialization/qcborarray.cpp | 6 +++--- src/corelib/serialization/qjsonarray.cpp | 2 +- src/corelib/serialization/qjsoncbor.cpp | 2 +- src/corelib/tools/qalgorithms.qdoc | 4 ++-- src/corelib/tools/qstring.cpp | 4 ++-- src/gui/painting/qpagedpaintdevice.cpp | 2 +- src/widgets/dialogs/qfontdialog.cpp | 2 +- src/widgets/doc/src/widgets-and-layouts/layout.qdoc | 2 +- src/widgets/graphicsview/qgraphicsscene.cpp | 2 +- src/widgets/widgets/qcombobox.cpp | 2 +- src/widgets/widgets/qcommandlinkbutton.cpp | 2 +- 12 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/corelib/plugin/qpluginloader.cpp b/src/corelib/plugin/qpluginloader.cpp index 00480198bd..4e0c3a511b 100644 --- a/src/corelib/plugin/qpluginloader.cpp +++ b/src/corelib/plugin/qpluginloader.cpp @@ -92,7 +92,7 @@ QT_BEGIN_NAMESPACE but if other instances of QPluginLoader are using the same library, the call will fail, and unloading will only happen when every instance has called unload(). Right before the unloading - happen, the root component will also be deleted. + happens, the root component will also be deleted. See \l{How to Create Qt Plugins} for more information about how to make your application extensible through plugins. diff --git a/src/corelib/serialization/qcborarray.cpp b/src/corelib/serialization/qcborarray.cpp index 28ae40f3df..ca0156e07d 100644 --- a/src/corelib/serialization/qcborarray.cpp +++ b/src/corelib/serialization/qcborarray.cpp @@ -273,7 +273,7 @@ QCborValue QCborArray::at(qsizetype i) const not be empty. QCborValueRef has the exact same API as \l QCborValue, with one important - difference: if you assign new values to it, this map will be updated with + difference: if you assign new values to it, this array will be updated with that new value. \sa operator[](), at(), last(), insert(), prepend(), append(), @@ -287,7 +287,7 @@ QCborValue QCborArray::at(qsizetype i) const not be empty. QCborValueRef has the exact same API as \l QCborValue, with one important - difference: if you assign new values to it, this map will be updated with + difference: if you assign new values to it, this array will be updated with that new value. \sa operator[](), at(), first(), insert(), prepend(), append(), @@ -302,7 +302,7 @@ QCborValue QCborArray::at(qsizetype i) const with undefined entries, until it has an entry at the specified index. QCborValueRef has the exact same API as \l QCborValue, with one important - difference: if you assign new values to it, this map will be updated with + difference: if you assign new values to it, this array will be updated with that new value. \sa at(), first(), last(), insert(), prepend(), append(), diff --git a/src/corelib/serialization/qjsonarray.cpp b/src/corelib/serialization/qjsonarray.cpp index 7dfa9b43f0..f5f02b886a 100644 --- a/src/corelib/serialization/qjsonarray.cpp +++ b/src/corelib/serialization/qjsonarray.cpp @@ -845,7 +845,7 @@ bool QJsonArray::operator!=(const QJsonArray &other) const The return value is of type QJsonValueRef, a helper class for QJsonArray and QJsonObject. When you get an object of type QJsonValueRef, you can use it as if it were a reference to a QJsonValue. If you assign to it, - the assignment will apply to the character in the QJsonArray of QJsonObject + the assignment will apply to the element in the QJsonArray or QJsonObject from which you got the reference. \sa operator+() diff --git a/src/corelib/serialization/qjsoncbor.cpp b/src/corelib/serialization/qjsoncbor.cpp index e0c390f610..d6a0c8c48a 100644 --- a/src/corelib/serialization/qjsoncbor.cpp +++ b/src/corelib/serialization/qjsoncbor.cpp @@ -421,7 +421,7 @@ QJsonArray QCborArray::toJsonArray() const } /*! - Recursively converts every \l QCborValue value in this array to JSON using + Recursively converts every \l QCborValue value in this map to JSON using QCborValue::toJsonValue() and creates a string key for all keys that aren't strings, then returns the corresponding QJsonObject composed of those associations. diff --git a/src/corelib/tools/qalgorithms.qdoc b/src/corelib/tools/qalgorithms.qdoc index a73ec1e22a..c86e69f9c3 100644 --- a/src/corelib/tools/qalgorithms.qdoc +++ b/src/corelib/tools/qalgorithms.qdoc @@ -155,8 +155,8 @@ \section2 Porting guidelines - Most of the times, an application using the deprecated Qt algorithmic functions - can be easily ported to use the equivalent STL functions. You need to + Most of the time, an application using the deprecated Qt algorithmic functions + can be easily ported to use the equivalent STL functions. You need to: \list 1 \li add the \c{#include } preprocessor directive; diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index a0e33d4e45..b3ea553b51 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -2130,7 +2130,7 @@ int QString::toUcs4_helper(const ushort *uc, int length, uint *out) If \a size is negative, \a unicode is assumed to point to a \\0'-terminated array and its length is determined dynamically. The terminating - nul-character is not considered part of the string. + null character is not considered part of the string. QString makes a deep copy of the string data. The unicode data is copied as is and the Byte Order Mark is preserved if present. @@ -5884,7 +5884,7 @@ QString QString::trimmed_helper(QString &str) The return value is of type QCharRef, a helper class for QString. When you get an object of type QCharRef, you can use it as if it - were a QChar &. If you assign to it, the assignment will apply to + were a reference to a QChar. If you assign to it, the assignment will apply to the character in the QString from which you got the reference. \sa at() diff --git a/src/gui/painting/qpagedpaintdevice.cpp b/src/gui/painting/qpagedpaintdevice.cpp index 72b2834470..0c2123f9a6 100644 --- a/src/gui/painting/qpagedpaintdevice.cpp +++ b/src/gui/painting/qpagedpaintdevice.cpp @@ -85,7 +85,7 @@ QPagedPaintDevicePrivate::~QPagedPaintDevicePrivate() \class QPagedPaintDevice \inmodule QtGui - \brief The QPagedPaintDevice class is a represents a paintdevice that supports + \brief The QPagedPaintDevice class represents a paint device that supports multiple pages. \ingroup painting diff --git a/src/widgets/dialogs/qfontdialog.cpp b/src/widgets/dialogs/qfontdialog.cpp index 2b81180ecb..d53d57db86 100644 --- a/src/widgets/dialogs/qfontdialog.cpp +++ b/src/widgets/dialogs/qfontdialog.cpp @@ -163,7 +163,7 @@ QFontDialog::QFontDialog(QWidget *parent) \since 4.5 Constructs a standard font dialog with the given \a parent and specified - \a initial color. + \a initial font. */ QFontDialog::QFontDialog(const QFont &initial, QWidget *parent) : QFontDialog(parent) diff --git a/src/widgets/doc/src/widgets-and-layouts/layout.qdoc b/src/widgets/doc/src/widgets-and-layouts/layout.qdoc index e507d66451..65569a9cd2 100644 --- a/src/widgets/doc/src/widgets-and-layouts/layout.qdoc +++ b/src/widgets/doc/src/widgets-and-layouts/layout.qdoc @@ -220,7 +220,7 @@ When you make your own widget class, you should also communicate its layout properties. If the widget uses one of Qt's layouts, this is already taken - care of. If the widget does not have any child widgets, or uses manual + care of. If the widget does not have any child widgets, or uses a manual layout, you can change the behavior of the widget using any or all of the following mechanisms: diff --git a/src/widgets/graphicsview/qgraphicsscene.cpp b/src/widgets/graphicsview/qgraphicsscene.cpp index 3897823e98..5238ea2f5c 100644 --- a/src/widgets/graphicsview/qgraphicsscene.cpp +++ b/src/widgets/graphicsview/qgraphicsscene.cpp @@ -2805,7 +2805,7 @@ QGraphicsPolygonItem *QGraphicsScene::addPolygon(const QPolygonF &polygon, Note that the item's geometry is provided in item coordinates, and its position is initialized to (0, 0). For example, if a QRect(50, 50, 100, 100) is added, its top-left corner will be at (50, 50) relative to the - origin in the items coordinate system. + origin in the item's coordinate system. If the item is visible (i.e., QGraphicsItem::isVisible() returns \c true), QGraphicsScene will emit changed() once control goes back to the event diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp index a143b2e799..483cfd8c55 100644 --- a/src/widgets/widgets/qcombobox.cpp +++ b/src/widgets/widgets/qcombobox.cpp @@ -2611,7 +2611,7 @@ bool QComboBoxPrivate::showNativePopup() /*! Displays the list of items in the combobox. If the list is empty - then the no items will be shown. + then no items will be shown. If you reimplement this function to show a custom pop-up, make sure you call hidePopup() to reset the internal state. diff --git a/src/widgets/widgets/qcommandlinkbutton.cpp b/src/widgets/widgets/qcommandlinkbutton.cpp index 68dfefb3b7..2b9258fd91 100644 --- a/src/widgets/widgets/qcommandlinkbutton.cpp +++ b/src/widgets/widgets/qcommandlinkbutton.cpp @@ -58,7 +58,7 @@ QT_BEGIN_NAMESPACE \ingroup basicwidgets \inmodule QtWidgets - The command link is a new control that was introduced by Windows Vista. It's + The command link is a new control that was introduced by Windows Vista. Its intended use is similar to that of a radio button in that it is used to choose between a set of mutually exclusive options. Command link buttons should not be used by themselves but rather as an alternative to radio buttons in -- cgit v1.2.3 From 605062b21fccff919b7894db91b197d120e528f6 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Wed, 10 Jul 2019 08:16:56 +0200 Subject: Fix MinGW cross-build with precompiled headers on Linux We need localtime_r() in several places. To have this function declared when including time.h, _POSIX_THREAD_SAFE_FUNCTIONS must be defined. E.g. qdatetime.cpp includes unistd.h before time.h to define said macro. However, this falls apart when precompiled headers are used, because of the following include chain in qt_pch.h: qcoreapplication.h -> qobject.h -> chrono -> time.h This patch ensures that _POSIX_THREAD_SAFE_FUNCTIONS is defined before including time.h in qt_pch.h by including unistd.h early. Fixes: QTBUG-76680 Change-Id: I3875072edf37f45492f29d84fc297a9682e11db4 Reviewed-by: Oliver Wolff Reviewed-by: Friedemann Kleint --- src/corelib/global/qt_pch.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/corelib/global/qt_pch.h b/src/corelib/global/qt_pch.h index 3972991618..0dfd6c745f 100644 --- a/src/corelib/global/qt_pch.h +++ b/src/corelib/global/qt_pch.h @@ -55,6 +55,10 @@ #include #include #ifdef Q_OS_WIN +# ifdef Q_CC_MINGW +// must be included before any other header pulls in . +# include // Define _POSIX_THREAD_SAFE_FUNCTIONS to obtain localtime_r() +# endif # define _POSIX_ # include # undef _POSIX_ -- cgit v1.2.3 From ffaf3cfc21586febc2bba93c87b130278d07e433 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 10 Jul 2019 11:50:19 +0200 Subject: doc: Enable a declaration for qdoc A declaration of fromStdVariant() was not visible to qdoc because it was ifdef'ed out. This update ensures that qdoc sees the declaration. Change-Id: I4b00a895aa61175296ec80806b43311eff4f25ca Reviewed-by: Paul Wicking --- src/corelib/kernel/qvariant.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h index 3cc6d559c1..bb9db3d1ad 100644 --- a/src/corelib/kernel/qvariant.h +++ b/src/corelib/kernel/qvariant.h @@ -367,7 +367,7 @@ class Q_CORE_EXPORT QVariant static inline QVariant fromValue(const T &value) { return qVariantFromValue(value); } -#if QT_HAS_INCLUDE() && __cplusplus >= 201703L +#if (QT_HAS_INCLUDE() && __cplusplus >= 201703L) || defined(Q_CLANG_QDOC) template static inline QVariant fromStdVariant(const std::variant &value) { -- cgit v1.2.3 From 36a15a87de2b954b1cef24acd4a8cd4ef5aef6cd Mon Sep 17 00:00:00 2001 From: Felix Barz Date: Sat, 6 Jul 2019 20:28:48 +0200 Subject: syncqt: Fix module header install target creation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Modified a regular expression in syncqt.pl so that the special case of a class beginning with another class does not lead to the exclusion of the first one. This affects the generation of the install target for generated class headers of Qt modules. Now the expression verifies the class names are not identical. Fixes: QTBUG-71323 Change-Id: I210b4d4c3ed64cf189594b95b10aa0e8495a19d2 Reviewed-by: Jörg Bornemann --- bin/syncqt.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/syncqt.pl b/bin/syncqt.pl index 7793811c9f..8226edfb76 100755 --- a/bin/syncqt.pl +++ b/bin/syncqt.pl @@ -1092,7 +1092,7 @@ foreach my $lib (@modules_to_sync) { # } my $class_header = "$class "; $pri_install_gfiles .= $class_header - unless ($shadow || $pri_install_gfiles =~ $class_header); + unless ($shadow || $pri_install_gfiles =~ m/\b$class_header/); $injection .= ":$class"; } -- cgit v1.2.3 From 3bee5a470a20fcfb46528b020d18f2210519bd41 Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Thu, 20 Jun 2019 12:54:49 +0200 Subject: Fix typos in readme Change-Id: Ifecb1bac475512241de9bcf195955409bb3adaff Reviewed-by: Edward Welbourne Reviewed-by: Paul Wicking --- tests/libfuzzer/README | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/libfuzzer/README b/tests/libfuzzer/README index 7327e76eff..57140cebfb 100644 --- a/tests/libfuzzer/README +++ b/tests/libfuzzer/README @@ -7,7 +7,7 @@ of the test and track the code execution. Should the test crash, libFuzzer will data which triggered the crash. You can then use this to debug and fix the called code. ! Please note: The purpose of fuzz testing is to find unexpected code paths. Running fuzz tests may! -! result in unforeseen bevavior, including loss of data. Consider running the tests in an isolated ! +! result in unforeseen behavior, including loss of data. Consider running the tests in an isolated ! ! environment, e.g. on a virtual machine. You have been warned. ! To run a test with libFuzzer: @@ -21,7 +21,7 @@ To run a test with libFuzzer: to add the needed code coverage instrumentation. Since speed of execution is crucial for fuzz testing, it's recommendable to also use the switches -release -static - It might also make sense to add sanitzers by passing + It might also make sense to add sanitizers by passing -sanitize <...> 4. Build Qt. 5. Build one of the tests using this Qt build. @@ -29,7 +29,7 @@ To run a test with libFuzzer: Depending on the expected input format of the tested function, you will get results faster if you: * provide a set of interesting input data by passing the path of a directory which contains - these data, each in one file. You can find such datasets in the subdirectory "testcases". + these data, each in one file. You can find such data sets in the subdirectory "testcases". * pass a so-called dictionary listing keywords of the input format using -dict= A couple of such dictionaries are provided by AFL (http://lcamtuf.coredump.cx/afl/) -- cgit v1.2.3 From 3f8e754f07db944dc74d84cc1c24d3e11677ad09 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Thu, 11 Jul 2019 14:08:59 +0200 Subject: CMake: Properly escape '.lib' in regex In a CMake regex, you need two backslashes to escape a character. The .in file therefore needs four backslashes ... This amends ba4fdd99fff80 Fixes: QTBUG-76698 Change-Id: Ic757354ba596bf020c3ee5e90ee6d2d0fe3ba352 Reviewed-by: Alexandru Croitor --- mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in index 8a3f202c53..d4fd057682 100644 --- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in @@ -75,7 +75,7 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura # Handle normal libraries passed as -lfoo set(_lib \"${CMAKE_MATCH_1}\") foreach(_standard_library ${_standard_libraries}) - if(_standard_library MATCHES \"^${_lib}(\\.lib)?$\") + if(_standard_library MATCHES \"^${_lib}(\\\\.lib)?$\") set(_lib_is_default_linked TRUE) break() endif() -- cgit v1.2.3