From 6fff8996972b936709569f14ccc4d684846dbb1a Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Wed, 27 Mar 2019 15:42:12 +0100 Subject: Document in which Qt version a qmake function was introduced ...starting with Qt 5.0.0. The text is manually inserted there, because \since does not work within sections. Task-number: QTBUG-74737 Change-Id: I0fe2d0a113d48be0266030c8466b062c6f743aab Reviewed-by: Robert Szefner Reviewed-by: Leena Miettinen --- qmake/doc/src/qmake-manual.qdoc | 64 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/qmake/doc/src/qmake-manual.qdoc b/qmake/doc/src/qmake-manual.qdoc index 84e3fb6df4..1e1b365141 100644 --- a/qmake/doc/src/qmake-manual.qdoc +++ b/qmake/doc/src/qmake-manual.qdoc @@ -3031,6 +3031,8 @@ \snippet code/doc_src_qmake-manual.pro 159 + This function was introduced in Qt 5.0. + See also \l{clean_path(path)}{clean_path()}, \l{relative_path(filePath[, base])}{relative_path()}. @@ -3065,6 +3067,8 @@ redundant ones removed, and "."s and ".."s resolved (as far as possible). This function is a wrapper around QDir::cleanPath. + This function was introduced in Qt 5.0. + See also \l{absolute_path(path[, base])}{absolute_path()}, \l{relative_path(filePath[, base])}{relative_path()}, \l{shell_path(path)}{shell_path()}, \l{system_path(path)}{system_path()}. @@ -3079,6 +3083,8 @@ Returns a list of all defined variable names. + This function was introduced in Qt 5.0. + \section2 escape_expand(arg1 [, arg2 ..., argn]) Accepts an arbitrary number of arguments. It expands the @@ -3142,6 +3148,8 @@ \snippet code/doc_src_qmake-manual.pro 163 + This function was introduced in Qt 5.0. + \section2 fromfile(filename, variablename) Evaluates \c filename as a qmake project file and returns the value assigned @@ -3156,6 +3164,8 @@ The \c getenv function, however, supports environment variables with parentheses in their name. + This function was introduced in Qt 5.12. + \section2 join(variablename, glue, before, after) Joins the value of \c variablename with \c glue. If this value is @@ -3245,6 +3255,8 @@ sum = $$num_add($$first, $$second_neg) \endcode + This function was introduced in Qt 5.8. + \section2 prompt(question [, decorate]) Displays the specified \c question, and returns a value read from stdin. @@ -3273,6 +3285,8 @@ \note This function is available only on Windows hosts. + This function was introduced in Qt 5.12.1. + \section2 relative_path(filePath[, base]) Returns the path to \c filePath relative to \c base. @@ -3285,6 +3299,8 @@ directory; in that case, this function effectively acts as $$clean_path(). + This function was introduced in Qt 5.0. + See also \l{absolute_path(path[, base])}{absolute_path()}, \l{clean_path(path)}{clean_path()}. @@ -3304,10 +3320,14 @@ This is an internal function that you will typically not need. + This function was introduced in Qt 5.0. + \section2 reverse(variablename) Returns the values of \c variablename in reverse order. + This function was introduced in Qt 5.0. + \section2 section(variablename, separator, begin, end) Returns a section of the value of \c variablename. This function is a @@ -3323,6 +3343,8 @@ This function returns \c path for in-source builds. It returns an empty string if \c path points outside of the source tree. + This function was introduced in Qt 5.0. + \section2 shell_path(path) Converts all directory separators within \c path to separators that are @@ -3330,12 +3352,16 @@ the shell that is invoked by the make tool). For example, slashes are converted to backslashes when the Windows shell is used. + This function was introduced in Qt 5.0. + See also \l{system_path(path)}{system_path()}. \section2 shell_quote(arg) Quotes \c arg for the shell that is used while building the project. + This function was introduced in Qt 5.0. + See also \l{system_quote(arg)}{system_quote()}. \target fn_size @@ -3349,6 +3375,8 @@ This is an internal function that you will typically not need. + This function was introduced in Qt 5.0. + \section2 sorted(variablename) Returns the list of values in \c variablename with entries sorted @@ -3357,6 +3385,8 @@ Numerical sorting can be accomplished by zero-padding the values to a fixed length with the help of the \l{format_number()} function. + This function was introduced in Qt 5.8. + \section2 split(variablename, separator) Splits the value of \c variablename into separate values, and returns them @@ -3403,6 +3433,8 @@ See also \l{member()}, \l{num_add()}. + This function was introduced in Qt 5.8. + \target str_size() \section2 str_size(arg) @@ -3410,6 +3442,8 @@ See also \l{fn_size}{size()}. + This function was introduced in Qt 5.8. + \target system_replace \section2 system(command[, mode[, stsvar]]) @@ -3438,6 +3472,8 @@ invoke commands. For example, slashes are converted to backslashes for the Windows shell. + This function was introduced in Qt 5.0. + See also \l{shell_path(path)}{shell_path()}. \section2 system_quote(arg) @@ -3445,6 +3481,8 @@ Quotes \c arg for the shell that is used by the \c{system()} functions. + This function was introduced in Qt 5.0. + See also \l{shell_quote(arg)}{shell_quote()}. \target take_first() @@ -3455,6 +3493,8 @@ This provides convenience for implementing queues, for example. + This function was introduced in Qt 5.8. + See also \l{take_last()}, \l{fn_first}{first()}. \target take_last() @@ -3465,6 +3505,8 @@ This provides convenience for implementing stacks, for example. + This function was introduced in Qt 5.8. + See also \l{take_first()}, \l{fn_last}{last()}. \target unique @@ -3485,6 +3527,8 @@ Escapes the values of \c variablename in a way that enables parsing them as qmake code. + + This function was introduced in Qt 5.0. */ /*! @@ -3508,6 +3552,8 @@ This is an internal function that you will typically not need. + This function was introduced in Qt 5.0. + \section2 CONFIG(config) This function can be used to test for variables placed into the @@ -3714,6 +3760,8 @@ Prints a message on the console. Unlike the \c message function, neither prepends text nor appends a line break. + This function was introduced in Qt 5.0. + See also \l{message(string)}{message()}. \section2 message(string) @@ -3739,6 +3787,8 @@ Creates the directory path \c dirPath. This function is a wrapper around the QDir::mkpath function. + This function was introduced in Qt 5.0. + \section2 requires(condition) Evaluates \c condition. If the condition is false, qmake skips this @@ -3765,6 +3815,8 @@ Updates the time stamp of \c filename to match the time stamp of \c reference_filename. + This function was introduced in Qt 5.0. + \section2 unset(variablename) Removes \c variablename from the current context. @@ -3781,12 +3833,16 @@ the string will be ignored. Comparison is performed segment-wise from left to right; if one version is a prefix of the other, it is considered smaller. + This function was introduced in Qt 5.10. + \section2 versionAtMost(variablename, versionNumber) Tests that the version number from \c variablename is less than or equal to \c versionNumber. Works as \l{versionAtLeast(variablename, versionNumber)}{versionAtLeast()}. + This function was introduced in Qt 5.10. + \section2 warning(string) Always succeeds, and displays \c string as a warning message to the user. @@ -3798,6 +3854,8 @@ an empty file. If \c mode is \c append and the file already exists, appends to it instead of replacing it. + This function was introduced in Qt 5.0. + \section1 Test Function Library Complex test functions are implemented in a library of .prf files. @@ -3844,6 +3902,8 @@ \snippet code/doc_src_qmake-manual.pro 178 + This function was introduced in Qt 5.0. + \section2 qtCompileTest(test) Builds a test project. If the test passes, true is returned and @@ -3884,10 +3944,14 @@ See also \l{load(feature)}{load()}. + This function was introduced in Qt 5.0. + \section2 qtHaveModule(name) Checks whether the Qt module specified by \c name is present. For a list of possible values, see \l{Variables#QT}{QT}. + + This function was introduced in Qt 5.0.1. */ /*! -- cgit v1.2.3 From ab475878567e5ad014e82f726b5ae3ee10bce2d5 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 3 Apr 2019 14:20:27 +0200 Subject: Windows QPA/File dialog: Avoid UI hangs caused by empty results Typing in invalid URLs results in empty result lists. Emit rejected() in this case. Task-number: QTBUG-71785 Change-Id: Ia257b85a5c4370227f753752f6a473bbb3a054be Reviewed-by: Joerg Bornemann --- src/plugins/platforms/windows/qwindowsdialoghelpers.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp index 6da7265cfd..1b17759b5f 100644 --- a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp +++ b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp @@ -967,7 +967,9 @@ void QWindowsNativeFileDialogBase::doExec(HWND owner) const HRESULT hr = m_fileDialog->Show(owner); QWindowsDialogs::eatMouseMove(); qCDebug(lcQpaDialogs) << '<' << __FUNCTION__ << " returns " << hex << hr; - if (hr == S_OK) { + // Emit accepted() only if there is a result as otherwise UI hangs occur. + // For example, typing in invalid URLs results in empty result lists. + if (hr == S_OK && !m_data.selectedFiles().isEmpty()) { emit accepted(); } else { emit rejected(); -- cgit v1.2.3 From 7518da2441852a243dc1f5ac23b3e59f7389cb3c Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 2 Apr 2019 10:02:03 +0200 Subject: Update scanline documentation Change-Id: I019b102e99f99377b528ad5c8a4ccb2a7929f14f Reviewed-by: Thiago Macieira --- src/gui/image/qimage.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index ed6f23ee56..aca1f86bcb 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -1566,7 +1566,9 @@ void QImage::setColor(int i, QRgb c) Returns a pointer to the pixel data at the scanline with index \a i. The first scanline is at index 0. - The scanline data is aligned on a 32-bit boundary. + The scanline data is as minimum 32-bit aligned. For 64-bit formats + it follows the native alignment of 64-bit integers (64-bit for most + platforms, but notably 32-bit on i386). \warning If you are accessing 32-bpp image data, cast the returned pointer to \c{QRgb*} (QRgb has a 32-bit size) and use it to -- cgit v1.2.3 From 5caaa0b6a20bdcd76fbc55b0cc64885f14179f4a Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Mon, 1 Apr 2019 10:11:10 +0200 Subject: Doc: Update QImage::depth to indicate we support 64 bpp now Change-Id: Icbd4920ed03655cec483a402de9d0ae3378ff3ef Reviewed-by: Allan Sandfeld Jensen --- src/gui/image/qimage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index aca1f86bcb..ef0481bdb2 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -1325,7 +1325,7 @@ QRect QImage::rect() const The image depth is the number of bits used to store a single pixel, also called bits per pixel (bpp). - The supported depths are 1, 8, 16, 24 and 32. + The supported depths are 1, 8, 16, 24, 32 and 64. \sa bitPlaneCount(), convertToFormat(), {QImage#Image Formats}{Image Formats}, {QImage#Image Information}{Image Information} -- cgit v1.2.3 From 4eb865cd38200263da034a3ee05f972b6e39d876 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Thu, 4 Apr 2019 11:08:40 +0200 Subject: Remove superfluous inclusion of qtwidgets-config.pri Every module already includes its own config. Change-Id: I1ef630092f61f118d79dc9b39ce38f4bdea14f43 Reviewed-by: Kai Koehne --- src/widgets/styles/styles.pri | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/widgets/styles/styles.pri b/src/widgets/styles/styles.pri index 821c40af81..be535c1846 100644 --- a/src/widgets/styles/styles.pri +++ b/src/widgets/styles/styles.pri @@ -33,8 +33,6 @@ SOURCES += \ RESOURCES += styles/qstyle.qrc -include($$OUT_PWD/qtwidgets-config.pri) - qtConfig(animation) { HEADERS += styles/qstyleanimation_p.h SOURCES += styles/qstyleanimation.cpp -- cgit v1.2.3 From 7d02fb304536047164e0d9c5041cf2cfc1d676ae Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 4 Apr 2019 15:58:47 +0200 Subject: Fix recursive include qatomic.h included qbasicatomic.h which included qatomic.h. Due to a define in qbasicatomic.h, the definitions from QAtomic would change depending on which was included first. Fortunately qbasicatomic does not need qatomic.h so the include can be removed. Change-Id: I086009f2e16a6e20b2b76fc6b3bf66a343414206 Reviewed-by: Thiago Macieira --- src/corelib/thread/qbasicatomic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/thread/qbasicatomic.h b/src/corelib/thread/qbasicatomic.h index a0304697b8..6b6ac10713 100644 --- a/src/corelib/thread/qbasicatomic.h +++ b/src/corelib/thread/qbasicatomic.h @@ -38,7 +38,7 @@ ** ****************************************************************************/ -#include +#include #ifndef QBASICATOMIC_H #define QBASICATOMIC_H -- cgit v1.2.3 From 808758ad14ab3cc752cb69e9ae791b4fbd462380 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Thu, 4 Apr 2019 22:58:29 +0300 Subject: QFileSystemEngine: Fix typo Change-Id: I538ef771dcf6b757025c8d31f13a91222c2ebd3e Reviewed-by: Thiago Macieira --- src/corelib/io/qfilesystemengine_unix.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp index b2d81066db..5bab897d43 100644 --- a/src/corelib/io/qfilesystemengine_unix.cpp +++ b/src/corelib/io/qfilesystemengine_unix.cpp @@ -805,11 +805,11 @@ QByteArray QFileSystemEngine::id(const QFileSystemEntry &entry) } //static -QByteArray QFileSystemEngine::id(int id) +QByteArray QFileSystemEngine::id(int fd) { QT_STATBUF statResult; - if (QT_FSTAT(id, &statResult)) { - qErrnoWarning("fstat() failed for fd %d", id); + if (QT_FSTAT(fd, &statResult)) { + qErrnoWarning("fstat() failed for fd %d", fd); return QByteArray(); } QByteArray result = QByteArray::number(quint64(statResult.st_dev), 16); -- cgit v1.2.3