Merge "Merge remote-tracking branch 'origin/dev' into wip/qt6"
This commit is contained in:
commit
f44850b5c3
@ -1,6 +1,8 @@
|
||||
load(qt_build_config)
|
||||
CONFIG += warning_clean
|
||||
|
||||
DEFINES += QT_NO_JAVA_STYLE_ITERATORS
|
||||
|
||||
QT_SOURCE_TREE = $$PWD
|
||||
QT_BUILD_TREE = $$shadowed($$PWD)
|
||||
|
||||
|
1
doc/config/exampleurl-qt3d.qdocconf
Normal file
1
doc/config/exampleurl-qt3d.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qt3d.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtactiveqt.qdocconf
Normal file
1
doc/config/exampleurl-qtactiveqt.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtactiveqt.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtandroidextras.qdocconf
Normal file
1
doc/config/exampleurl-qtandroidextras.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtandroidextras.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtbase.qdocconf
Normal file
1
doc/config/exampleurl-qtbase.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtbase.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtcharts.qdocconf
Normal file
1
doc/config/exampleurl-qtcharts.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtcharts.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtconnectivity.qdocconf
Normal file
1
doc/config/exampleurl-qtconnectivity.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtconnectivity.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtdatavis3d.qdocconf
Normal file
1
doc/config/exampleurl-qtdatavis3d.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtdatavis3d.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtdeclarative.qdocconf
Normal file
1
doc/config/exampleurl-qtdeclarative.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtdeclarative.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtdoc.qdocconf
Normal file
1
doc/config/exampleurl-qtdoc.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtdoc.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtgamepad.qdocconf
Normal file
1
doc/config/exampleurl-qtgamepad.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtgamepad.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtgraphicaleffects.qdocconf
Normal file
1
doc/config/exampleurl-qtgraphicaleffects.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtgraphicaleffects.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtimageformats.qdocconf
Normal file
1
doc/config/exampleurl-qtimageformats.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtimageformats.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtlocation.qdocconf
Normal file
1
doc/config/exampleurl-qtlocation.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtlocation.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtlottie.qdocconf
Normal file
1
doc/config/exampleurl-qtlottie.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtlottie.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtmacextras.qdocconf
Normal file
1
doc/config/exampleurl-qtmacextras.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtmacextras.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtmultimedia.qdocconf
Normal file
1
doc/config/exampleurl-qtmultimedia.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtmultimedia.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtnetworkauth.qdocconf
Normal file
1
doc/config/exampleurl-qtnetworkauth.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtnetworkauth.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtpurchasing.qdocconf
Normal file
1
doc/config/exampleurl-qtpurchasing.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtpurchasing.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtquickcontrols.qdocconf
Normal file
1
doc/config/exampleurl-qtquickcontrols.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtquickcontrols.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtquickcontrols2.qdocconf
Normal file
1
doc/config/exampleurl-qtquickcontrols2.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtquickcontrols2.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtremoteobjects.qdocconf
Normal file
1
doc/config/exampleurl-qtremoteobjects.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtremoteobjects.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtscript.qdocconf
Normal file
1
doc/config/exampleurl-qtscript.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtscript.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtscxml.qdocconf
Normal file
1
doc/config/exampleurl-qtscxml.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtscxml.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtsensors.qdocconf
Normal file
1
doc/config/exampleurl-qtsensors.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtsensors.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtserialbus.qdocconf
Normal file
1
doc/config/exampleurl-qtserialbus.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtserialbus.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtserialport.qdocconf
Normal file
1
doc/config/exampleurl-qtserialport.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtserialport.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtspeech.qdocconf
Normal file
1
doc/config/exampleurl-qtspeech.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtspeech.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtsvg.qdocconf
Normal file
1
doc/config/exampleurl-qtsvg.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtsvg.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qttools.qdocconf
Normal file
1
doc/config/exampleurl-qttools.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qttools.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtvirtualkeyboard.qdocconf
Normal file
1
doc/config/exampleurl-qtvirtualkeyboard.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtvirtualkeyboard.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtwayland.qdocconf
Normal file
1
doc/config/exampleurl-qtwayland.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtwayland.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtwebchannel.qdocconf
Normal file
1
doc/config/exampleurl-qtwebchannel.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtwebchannel.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtwebengine.qdocconf
Normal file
1
doc/config/exampleurl-qtwebengine.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtwebengine.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtwebsockets.qdocconf
Normal file
1
doc/config/exampleurl-qtwebsockets.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtwebsockets.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtwebview.qdocconf
Normal file
1
doc/config/exampleurl-qtwebview.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtwebview.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtwinextras.qdocconf
Normal file
1
doc/config/exampleurl-qtwinextras.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtwinextras.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtx11extras.qdocconf
Normal file
1
doc/config/exampleurl-qtx11extras.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtx11extras.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtxmlpatterns.qdocconf
Normal file
1
doc/config/exampleurl-qtxmlpatterns.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtxmlpatterns.git/tree/examples/\1?h=$QT_VER"
|
@ -118,6 +118,7 @@ Cpp.ignoretokens += \
|
||||
Q_POSITIONING_EXPORT \
|
||||
Q_MULTIMEDIA_EXPORT \
|
||||
Q_NAMESPACE \
|
||||
Q_NAMESPACE_EXPORT \
|
||||
Q_NETWORK_EXPORT \
|
||||
Q_NEVER_INLINE \
|
||||
Q_NORETURN \
|
||||
|
@ -79,6 +79,32 @@ QVariant addAuthor(QSqlQuery &q, const QString &name, const QDate &birthdate)
|
||||
return q.lastInsertId();
|
||||
}
|
||||
|
||||
const auto BOOKS_SQL = QLatin1String(R"(
|
||||
create table books(id integer primary key, title varchar, author integer,
|
||||
genre integer, year integer, rating integer)
|
||||
)");
|
||||
|
||||
const auto AUTHORS_SQL = QLatin1String(R"(
|
||||
create table authors(id integer primary key, name varchar, birthdate date)
|
||||
)");
|
||||
|
||||
const auto GENRES_SQL = QLatin1String(R"(
|
||||
create table genres(id integer primary key, name varchar)
|
||||
)");
|
||||
|
||||
const auto INSERT_AUTHOR_SQL = QLatin1String(R"(
|
||||
insert into authors(name, birthdate) values(?, ?)
|
||||
)");
|
||||
|
||||
const auto INSERT_BOOK_SQL = QLatin1String(R"(
|
||||
insert into books(title, year, author, genre, rating)
|
||||
values(?, ?, ?, ?, ?)
|
||||
)");
|
||||
|
||||
const auto INSERT_GENRE_SQL = QLatin1String(R"(
|
||||
insert into genres(name) values(?)
|
||||
)");
|
||||
|
||||
QSqlError initDb()
|
||||
{
|
||||
QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");
|
||||
@ -93,26 +119,26 @@ QSqlError initDb()
|
||||
return QSqlError();
|
||||
|
||||
QSqlQuery q;
|
||||
if (!q.exec(QLatin1String("create table books(id integer primary key, title varchar, author integer, genre integer, year integer, rating integer)")))
|
||||
if (!q.exec(BOOKS_SQL))
|
||||
return q.lastError();
|
||||
if (!q.exec(QLatin1String("create table authors(id integer primary key, name varchar, birthdate date)")))
|
||||
if (!q.exec(AUTHORS_SQL))
|
||||
return q.lastError();
|
||||
if (!q.exec(QLatin1String("create table genres(id integer primary key, name varchar)")))
|
||||
if (!q.exec(GENRES_SQL))
|
||||
return q.lastError();
|
||||
|
||||
if (!q.prepare(QLatin1String("insert into authors(name, birthdate) values(?, ?)")))
|
||||
if (!q.prepare(INSERT_AUTHOR_SQL))
|
||||
return q.lastError();
|
||||
QVariant asimovId = addAuthor(q, QLatin1String("Isaac Asimov"), QDate(1920, 2, 1));
|
||||
QVariant greeneId = addAuthor(q, QLatin1String("Graham Greene"), QDate(1904, 10, 2));
|
||||
QVariant pratchettId = addAuthor(q, QLatin1String("Terry Pratchett"), QDate(1948, 4, 28));
|
||||
|
||||
if (!q.prepare(QLatin1String("insert into genres(name) values(?)")))
|
||||
if (!q.prepare(INSERT_GENRE_SQL))
|
||||
return q.lastError();
|
||||
QVariant sfiction = addGenre(q, QLatin1String("Science Fiction"));
|
||||
QVariant fiction = addGenre(q, QLatin1String("Fiction"));
|
||||
QVariant fantasy = addGenre(q, QLatin1String("Fantasy"));
|
||||
|
||||
if (!q.prepare(QLatin1String("insert into books(title, year, author, genre, rating) values(?, ?, ?, ?, ?)")))
|
||||
if (!q.prepare(INSERT_BOOK_SQL))
|
||||
return q.lastError();
|
||||
addBook(q, QLatin1String("Foundation"), 1951, asimovId, sfiction, 3);
|
||||
addBook(q, QLatin1String("Foundation and Empire"), 1952, asimovId, sfiction, 4);
|
||||
|
@ -269,7 +269,7 @@
|
||||
\codeline
|
||||
\snippet itemviews/stardelegate/main.cpp 4
|
||||
|
||||
Notice the call to qVariantFromValue to convert a \c
|
||||
Notice the call to QVariant::fromValue to convert a \c
|
||||
StarRating to a QVariant.
|
||||
|
||||
\section1 Possible Extensions and Suggestions
|
||||
|
@ -64,9 +64,9 @@ void NorwegianWoodStyle::polish(QPalette &palette)
|
||||
QColor beige(236, 182, 120);
|
||||
QColor slightlyOpaqueBlack(0, 0, 0, 63);
|
||||
|
||||
QPixmap backgroundImage(":/images/woodbackground.png");
|
||||
QPixmap buttonImage(":/images/woodbutton.png");
|
||||
QPixmap midImage = buttonImage;
|
||||
QImage backgroundImage(":/images/woodbackground.png");
|
||||
QImage buttonImage(":/images/woodbutton.png");
|
||||
QImage midImage = buttonImage.convertToFormat(QImage::Format_RGB32);
|
||||
|
||||
QPainter painter;
|
||||
painter.begin(&midImage);
|
||||
@ -311,11 +311,12 @@ void NorwegianWoodStyle::drawControl(ControlElement element,
|
||||
//! [37]
|
||||
void NorwegianWoodStyle::setTexture(QPalette &palette, QPalette::ColorRole role,
|
||||
//! [37] //! [38]
|
||||
const QPixmap &pixmap)
|
||||
const QImage &image)
|
||||
{
|
||||
for (int i = 0; i < QPalette::NColorGroups; ++i) {
|
||||
QColor color = palette.brush(QPalette::ColorGroup(i), role).color();
|
||||
palette.setBrush(QPalette::ColorGroup(i), role, QBrush(color, pixmap));
|
||||
QBrush brush(image);
|
||||
brush.setColor(palette.brush(QPalette::ColorGroup(i), role).color());
|
||||
palette.setBrush(QPalette::ColorGroup(i), role, brush);
|
||||
}
|
||||
}
|
||||
//! [38]
|
||||
|
@ -80,7 +80,7 @@ public:
|
||||
|
||||
private:
|
||||
static void setTexture(QPalette &palette, QPalette::ColorRole role,
|
||||
const QPixmap &pixmap);
|
||||
const QImage &image);
|
||||
static QPainterPath roundRectPath(const QRect &rect);
|
||||
};
|
||||
//! [0]
|
||||
|
@ -57,8 +57,10 @@
|
||||
#include <pwd.h>
|
||||
#include <grp.h>
|
||||
|
||||
#include "../posix/qplatformdefs.h"
|
||||
#define __LINUX_ERRNO_EXTENSIONS__
|
||||
#include <errno.h>
|
||||
|
||||
#include "../posix/qplatformdefs.h"
|
||||
|
||||
#ifdef __STRICT_ANSI__
|
||||
#undef __STRICT_ANSI__
|
||||
|
@ -31,7 +31,7 @@ QMAKE_LIBS_OPENGL_ES2 = $${VC_LINK_LINE} -lGLESv2
|
||||
# The official opt vc EGL references GLESv2 symbols: need to link it
|
||||
QMAKE_LIBS_EGL = $${VC_LINK_LINE} -lEGL -lGLESv2
|
||||
|
||||
QMAKE_LIBDIR_BCM_HOST = $$VC_LIBRARY_PATH
|
||||
QMAKE_LIBDIR_BCM_HOST = =$$VC_LIBRARY_PATH
|
||||
QMAKE_INCDIR_BCM_HOST = $$VC_INCLUDE_PATH
|
||||
QMAKE_LIBS_BCM_HOST = -lbcm_host
|
||||
|
||||
|
6
mkspecs/features/android/spec_post.prf
Normal file
6
mkspecs/features/android/spec_post.prf
Normal file
@ -0,0 +1,6 @@
|
||||
load(spec_post)
|
||||
|
||||
# Work around idiosyncracy in Android NDK's make executable
|
||||
# which tries to call the shell-builtin "move" as direct process
|
||||
equals(QMAKE_HOST.os, Windows):equals(QMAKE_MOVE, move): \
|
||||
QMAKE_MOVE = cmd /c move
|
@ -34,10 +34,20 @@ CMAKE_INCLUDE_NAME = $$eval(QT.$${MODULE}.name)
|
||||
|
||||
# TARGET here is the one changed at the end of qt_module.prf,
|
||||
# which already contains the Qt5 prefix and QT_LIBINFIX suffix :
|
||||
# Qt5Core_suffix, Qt5Network_suffix, Foo_suffix
|
||||
# (or QtCore_suffix, Foo_suffix on macos with -framework)
|
||||
# Qt5Core_{libinfix_suffix}, Qt5Network_{libinfix_suffix}, Foo_{libinfix_suffix}
|
||||
# (or QtCore_{libinfix_suffix}, Foo_{libinfix_suffix} on macos with -framework).
|
||||
CMAKE_QT_STEM = $${TARGET}
|
||||
|
||||
# On macOS when building just a debug configuration which is not part of debug_and_release,
|
||||
# $${TARGET} already contains a _debug suffix, as per the following call chain:
|
||||
# qt_module.prf -> qt5LibraryTarget -> qtLibraryTarget -> qtPlatformTargetSuffix.
|
||||
# Remove the _debug suffix in the stem, to keep all further uses of CMAKE_QT_STEM consistent.
|
||||
# The _debug suffix is then re-added where needed regardless if it's a debug_and_release build
|
||||
# or just debug.
|
||||
darwin:!qt_framework:!debug_and_release:CONFIG(debug, debug|release) {
|
||||
CMAKE_QT_STEM = $$replace(CMAKE_QT_STEM, _debug$, )
|
||||
}
|
||||
|
||||
!generated_privates {
|
||||
isEmpty(SYNCQT.INJECTED_PRIVATE_HEADER_FILES):isEmpty(SYNCQT.PRIVATE_HEADER_FILES): \
|
||||
CMAKE_NO_PRIVATE_INCLUDES = true
|
||||
@ -211,18 +221,18 @@ CMAKE_INTERFACE_QT5_MODULE_DEPS = $$join(aux_lib_deps, ";")
|
||||
|
||||
mac {
|
||||
!isEmpty(CMAKE_STATIC_TYPE) {
|
||||
CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}.a
|
||||
CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}_debug.a
|
||||
CMAKE_LIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a
|
||||
|
||||
CMAKE_PRL_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}.prl
|
||||
CMAKE_PRL_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}_debug.prl
|
||||
CMAKE_PRL_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.prl
|
||||
} else {
|
||||
qt_framework {
|
||||
CMAKE_LIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}.framework/$${CMAKE_QT_STEM}
|
||||
CMAKE_LIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}.framework/$${CMAKE_QT_STEM}_debug
|
||||
CMAKE_LIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.framework/$${CMAKE_QT_STEM}
|
||||
CMAKE_BUILD_IS_FRAMEWORK = "true"
|
||||
} else {
|
||||
CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}.$$eval(QT.$${MODULE}.VERSION).dylib
|
||||
CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}_debug.$$eval(QT.$${MODULE}.VERSION).dylib
|
||||
CMAKE_LIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.$$eval(QT.$${MODULE}.VERSION).dylib
|
||||
}
|
||||
}
|
||||
|
@ -56,10 +56,17 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura
|
||||
get_filename_component(_qt5_install_libs \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/lib\" ABSOLUTE)
|
||||
|
||||
if(EXISTS \"${prl_file_location}\")
|
||||
file(STRINGS \"${prl_file_location}\" _prl_strings REGEX \"QMAKE_PRL_LIBS[ \\t]*=\")
|
||||
string(REGEX REPLACE \"QMAKE_PRL_LIBS[ \\t]*=[ \\t]*([^\\n]*)\" \"\\\\1\" _static_depends ${_prl_strings})
|
||||
string(REGEX REPLACE \"[ \\t]+\" \";\" _static_depends ${_static_depends})
|
||||
string(REGEX REPLACE \"[ \\t]+\" \";\" _standard_libraries ${CMAKE_CXX_STANDARD_LIBRARIES})
|
||||
file(STRINGS \"${prl_file_location}\" _prl_strings REGEX \"QMAKE_PRL_LIBS_FOR_CMAKE[ \\t]*=\")
|
||||
|
||||
# file(STRINGS) replaces all semicolons read from the file with backslash semicolons.
|
||||
# We need to do a reverse transformation in CMake. For that we replace all backslash
|
||||
# semicolons with just semicolons, but due to the qmake substitution feature
|
||||
# creating this file, we need to double the amount of backslashes, so the final file
|
||||
# should have three backslashes and one semicolon.
|
||||
string(REGEX REPLACE \"\\\\\\;\" \";\" _prl_strings \"${_prl_strings}\")
|
||||
|
||||
string(REGEX REPLACE \"QMAKE_PRL_LIBS_FOR_CMAKE[ \\t]*=[ \\t]*([^\\n]*)\" \"\\\\1\" _static_depends \"${_prl_strings}\")
|
||||
string(REGEX REPLACE \"[ \\t]+\" \";\" _standard_libraries \"${CMAKE_CXX_STANDARD_LIBRARIES}\")
|
||||
set(_search_paths)
|
||||
string(REPLACE \"\\$\\$[QT_INSTALL_LIBS]\" \"${_qt5_install_libs}\" _static_depends \"${_static_depends}\")
|
||||
foreach(_flag ${_static_depends})
|
||||
|
@ -21,7 +21,9 @@ RUN echo "#!/usr/bin/env bash\n" \
|
||||
RUN chmod +x startup.sh
|
||||
|
||||
# rewrite the default configurations of avahi-daemon
|
||||
# Disable IPv6 of avahi-daemon to resolve the unstable connections on Windows
|
||||
ARG test_domain
|
||||
RUN sed -i -e "s,#domain-name=local,domain-name=${test_domain:-test-net.qt.local}," \
|
||||
-e "s,#publish-aaaa-on-ipv4=yes,publish-aaaa-on-ipv4=no," \
|
||||
-e "s,use-ipv6=yes,use-ipv6=no," \
|
||||
/etc/avahi/avahi-daemon.conf
|
||||
|
38
mkspecs/features/data/testserver/docker-compose-common.yml
Normal file
38
mkspecs/features/data/testserver/docker-compose-common.yml
Normal file
@ -0,0 +1,38 @@
|
||||
version: '2.1'
|
||||
|
||||
# This is a template docker-compose file shared with all modules. It is based
|
||||
# on 'extending services' feature of compose file version 2.1.
|
||||
# See https://docs.docker.com/compose/extends/#extending-services for details.
|
||||
#
|
||||
# Example: testserver/docker-compose.yml
|
||||
# services:
|
||||
# foo:
|
||||
# extends:
|
||||
# file: ${SHARED_DATA}/docker-compose-common.yml
|
||||
# service: ${SHARED_SERVICE}
|
||||
# container_name: qt-test-server-foo
|
||||
# hostname: ${HOST_NAME:-foo}
|
||||
# build:
|
||||
# context: .
|
||||
# args:
|
||||
# provisioningImage: qt-test-server-foo:537fe302f61851d1663...
|
||||
# serviceDir: ./foo
|
||||
# command: service/foo.sh
|
||||
|
||||
x-services:
|
||||
&default-service
|
||||
domainname: ${TEST_DOMAIN}
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ${SHARED_DATA}/Dockerfile
|
||||
args:
|
||||
test_domain: ${TEST_DOMAIN}
|
||||
entrypoint: ./startup.sh
|
||||
|
||||
services:
|
||||
bridge-network: *default-service
|
||||
host-network:
|
||||
<< : *default-service
|
||||
network_mode: "host"
|
||||
extra_hosts:
|
||||
- "qt-test-server.${TEST_DOMAIN}:${MACHINE_IP}"
|
@ -1,4 +1,6 @@
|
||||
CONFIG(release, debug|release) {
|
||||
static:no-static-ltcg {
|
||||
# Static library but no-static-ltcg enabled: skip LTCG
|
||||
} else: CONFIG(release, debug|release) {
|
||||
# We need fat object files when creating static libraries on some platforms
|
||||
# so the linker will know to load a particular object from the library
|
||||
# in the first place. On others, we have special ar and nm to create the symbol
|
||||
@ -22,7 +24,7 @@ CONFIG(release, debug|release) {
|
||||
}
|
||||
}
|
||||
|
||||
fat-lto {
|
||||
fat-lto|if(static:fat-static-lto) {
|
||||
QMAKE_CFLAGS_LTCG += $$QMAKE_CFLAGS_LTCG_FATOBJECTS
|
||||
QMAKE_CXXFLAGS_LTCG += $$QMAKE_CXXFLAGS_LTCG_FATOBJECTS
|
||||
}
|
||||
|
@ -291,6 +291,12 @@ load(qt_targets)
|
||||
QMAKE_PKGCONFIG_REQUIRES += $$replace(QT.$${i}.name, ^Qt, Qt$$section(QT.$${i}.VERSION, ., 0, 0))$$qtPlatformTargetSuffix()
|
||||
isEmpty(QMAKE_PKGCONFIG_DESCRIPTION): \
|
||||
QMAKE_PKGCONFIG_DESCRIPTION = $$replace(TARGET, ^Qt, "Qt ") module
|
||||
!isEmpty(lib_replace0.match) {
|
||||
pclib_replace0.match = $$lib_replace0.match
|
||||
pclib_replace0.replace = $$QMAKE_PKGCONFIG_LIBDIR/
|
||||
pclib_replace0.CONFIG = path
|
||||
QMAKE_PKGCONFIG_INSTALL_REPLACE += pclib_replace0
|
||||
}
|
||||
pclib_replace.match = $$lib_replace.match
|
||||
!isEmpty(lib_replace.replace): \
|
||||
pclib_replace.replace = $$QMAKE_PKGCONFIG_LIBDIR
|
||||
@ -303,6 +309,12 @@ load(qt_targets)
|
||||
QMAKE_LIBTOOL_LIBDIR = $$[QT_HOST_LIBS]
|
||||
else: \
|
||||
QMAKE_LIBTOOL_LIBDIR = "=$$[QT_INSTALL_LIBS/raw]"
|
||||
!isEmpty(lib_replace0.match) {
|
||||
ltlib_replace0.match = $$lib_replace0.match
|
||||
ltlib_replace0.replace = $$QMAKE_LIBTOOL_LIBDIR/
|
||||
ltlib_replace0.CONFIG = path
|
||||
QMAKE_LIBTOOL_INSTALL_REPLACE += ltlib_replace0
|
||||
}
|
||||
ltlib_replace.match = $$lib_replace.match
|
||||
!isEmpty(lib_replace.replace): \
|
||||
ltlib_replace.replace = $$QMAKE_LIBTOOL_LIBDIR
|
||||
|
@ -94,29 +94,33 @@ isEmpty(TESTSERVER_VERSION) {
|
||||
# binds the same port on the host. An alternative solution is to deploy
|
||||
# the docker environment into VirtualBox using docker-machine.
|
||||
isEmpty(TESTSERVER_COMPOSE_FILE): TESTSERVER_COMPOSE_FILE = \
|
||||
$$dirname(_QMAKE_CONF_)/tests/testserver/docker-compose-for-macOS.yml
|
||||
$$dirname(_QMAKE_CONF_)/tests/testserver/docker-compose-host-network.yml
|
||||
|
||||
# The connection configuration for the target machine
|
||||
MACHINE_CONFIG = $(shell docker-machine config qt-test-server)
|
||||
|
||||
# The environment variables passed to the docker-compose file
|
||||
TEST_ENV = 'MACHINE_IP=$(shell docker-machine ip qt-test-server)'
|
||||
TEST_ENV += 'HOST_NAME=qt-test-server'
|
||||
TEST_ENV += 'TEST_DOMAIN=$$DNSDOMAIN'
|
||||
TEST_ENV += 'SHARED_DATA=$$PWD/../data/testserver'
|
||||
TEST_ENV += 'SHARED_SERVICE=host-network'
|
||||
TEST_CMD = env
|
||||
} else:equals(QMAKE_HOST.os, Windows) {
|
||||
# There is no docker bridge on Windows. It is impossible to ping a container.
|
||||
# Use docker-machine to deploy the docker environment into VirtualBox.
|
||||
isEmpty(TESTSERVER_COMPOSE_FILE): TESTSERVER_COMPOSE_FILE = \
|
||||
$$dirname(_QMAKE_CONF_)/tests/testserver/docker-compose-for-windows.yml
|
||||
$$dirname(_QMAKE_CONF_)/tests/testserver/docker-compose-host-network.yml
|
||||
|
||||
# The connection configuration for the target machine
|
||||
MACHINE_CONFIG = (docker-machine config qt-test-server)
|
||||
|
||||
# The environment variables passed to the docker-compose file
|
||||
TEST_ENV = '\$\$env:MACHINE_IP = docker-machine ip qt-test-server;'
|
||||
TEST_ENV += '\$\$env:HOST_NAME = $$shell_quote(\"qt-test-server\");'
|
||||
TEST_ENV += '\$\$env:TEST_DOMAIN = $$shell_quote(\"$$DNSDOMAIN\");'
|
||||
TEST_ENV += '\$\$env:SHARED_DATA = $$shell_quote(\"$$PWD/../data/testserver\");'
|
||||
TEST_ENV += '\$\$env:SHARED_SERVICE = $$shell_quote(\"host-network\");'
|
||||
|
||||
# Docker-compose CLI environment variables:
|
||||
# Enable path conversion from Windows-style to Unix-style in volume definitions.
|
||||
@ -126,12 +130,18 @@ isEmpty(TESTSERVER_VERSION) {
|
||||
CONFIG += PowerShell
|
||||
} else {
|
||||
isEmpty(TESTSERVER_COMPOSE_FILE): TESTSERVER_COMPOSE_FILE = \
|
||||
$$dirname(_QMAKE_CONF_)/tests/testserver/docker-compose.yml
|
||||
$$dirname(_QMAKE_CONF_)/tests/testserver/docker-compose-bridge-network.yml
|
||||
# The environment variables passed to the docker-compose file
|
||||
TEST_ENV = 'TEST_DOMAIN=$$DNSDOMAIN'
|
||||
TEST_ENV += 'SHARED_DATA=$$PWD/../data/testserver'
|
||||
TEST_ENV += 'SHARED_SERVICE=bridge-network'
|
||||
TEST_CMD = env
|
||||
}
|
||||
|
||||
# If $$TESTSERVER_COMPOSE_FILE defined by platform doesn't exist, the default
|
||||
# docker-compose.yml is used as a fallback.
|
||||
!exists($$TESTSERVER_COMPOSE_FILE): TESTSERVER_COMPOSE_FILE = \
|
||||
$$dirname(_QMAKE_CONF_)/tests/testserver/docker-compose.yml
|
||||
!exists($$TESTSERVER_COMPOSE_FILE): error("Invalid TESTSERVER_COMPOSE_FILE specified")
|
||||
|
||||
|
||||
|
@ -22,15 +22,15 @@ dumpcpp_impl.depends += ${QMAKE_FILE_BASE}.h
|
||||
QMAKE_EXTRA_COMPILERS += dumpcpp_impl
|
||||
|
||||
|
||||
# Create dependencies from every object file to our generated header files.
|
||||
if(isEmpty(BUILDS)|build_pass):have_target:!contains(TEMPLATE, vc.*) {
|
||||
# Call dumpcpp the first time if the files do not exist to help find dependencies
|
||||
!build_pass:have_target:!contains(TEMPLATE, vc.*) {
|
||||
for(tlb, TYPELIBS) {
|
||||
tlbCopy = $$replace(tlb, \", )
|
||||
hdr = $$basename(tlb)
|
||||
hdr = $$section(hdr, ., 0, -2).h
|
||||
TYPELIB_HEADERS += $$hdr
|
||||
hdr = $$section(hdr, ., 0, -2)
|
||||
tmp_command = $$QMAKE_DUMPCPP $$system_quote($$absolute_path($$tlb, $$_PRO_FILE_PWD_)) \
|
||||
-o $$system_quote($$OUT_PWD/$$hdr)
|
||||
qaxcontainer_compat: tmp_command += -compat
|
||||
!exists($$OUT_PWD/$${hdr}.h): system($$tmp_command)
|
||||
}
|
||||
|
||||
objtgt.target = $(OBJECTS)
|
||||
objtgt.depends += $$TYPELIB_HEADERS
|
||||
QMAKE_EXTRA_TARGETS += objtgt
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
isEmpty(QMAKE_INCDIR_VULKAN) {
|
||||
# Pick up the VULKAN_SDK env var set by the LunarG SDK so that the Vulkan
|
||||
# headers are found out-of-the-box on typical Windows setups.
|
||||
QMAKE_INCDIR_VULKAN = $$(VULKAN_SDK)\\include
|
||||
QMAKE_INCDIR_VULKAN = $$(VULKAN_SDK)/include
|
||||
|
||||
# Do not export the include dir but resolve it on every qmake call.
|
||||
QMAKE_EXPORT_INCDIR_VULKAN = -
|
||||
|
@ -1015,6 +1015,14 @@ MakefileGenerator::writePrlFile(QTextStream &t)
|
||||
for (ProStringList::Iterator it = libs.begin(); it != libs.end(); ++it)
|
||||
t << qv(project->values((*it).toKey()));
|
||||
t << Qt::endl;
|
||||
|
||||
t << "QMAKE_PRL_LIBS_FOR_CMAKE = ";
|
||||
QString sep;
|
||||
for (ProStringList::Iterator it = libs.begin(); it != libs.end(); ++it) {
|
||||
t << sep << project->values((*it).toKey()).join(';').replace('\\', "\\\\");
|
||||
sep = ';';
|
||||
}
|
||||
t << Qt::endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -3441,7 +3449,7 @@ QString MakefileGenerator::installMetaFile(const ProKey &replace_rule, const QSt
|
||||
QString ret;
|
||||
if (project->isEmpty(replace_rule)
|
||||
|| project->isActiveConfig("no_sed_meta_install")) {
|
||||
ret += "-$(INSTALL_FILE) " + escapeFilePath(src) + ' ' + escapeFilePath(dst);
|
||||
ret += "$(INSTALL_FILE) " + escapeFilePath(src) + ' ' + escapeFilePath(dst);
|
||||
} else {
|
||||
QString sedargs;
|
||||
const ProStringList &replace_rules = project->values(replace_rule);
|
||||
@ -3456,9 +3464,9 @@ QString MakefileGenerator::installMetaFile(const ProKey &replace_rule, const QSt
|
||||
}
|
||||
}
|
||||
if (sedargs.isEmpty()) {
|
||||
ret += "-$(INSTALL_FILE) " + escapeFilePath(src) + ' ' + escapeFilePath(dst);
|
||||
ret += "$(INSTALL_FILE) " + escapeFilePath(src) + ' ' + escapeFilePath(dst);
|
||||
} else {
|
||||
ret += "-$(SED) " + sedargs + ' ' + escapeFilePath(src) + " > " + escapeFilePath(dst);
|
||||
ret += "$(SED) " + sedargs + ' ' + escapeFilePath(src) + " > " + escapeFilePath(dst);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
|
@ -946,10 +946,12 @@ bool QMakeSourceFileInfo::findMocs(SourceFile *file)
|
||||
|
||||
debug_msg(2, "findMocs: %s", file->file.local().toLatin1().constData());
|
||||
int line_count = 1;
|
||||
bool ignore[3] = { false, false, false }; // [0] for Q_OBJECT, [1] for Q_GADGET, [2] for Q_NAMESPACE
|
||||
// [0] for Q_OBJECT, [1] for Q_GADGET, [2] for Q_NAMESPACE, [3] for Q_NAMESPACE_EXPORT
|
||||
bool ignore[4] = { false, false, false, false };
|
||||
/* qmake ignore Q_GADGET */
|
||||
/* qmake ignore Q_OBJECT */
|
||||
/* qmake ignore Q_NAMESPACE */
|
||||
/* qmake ignore Q_NAMESPACE_EXPORT */
|
||||
for(int x = 0; x < buffer_len; x++) {
|
||||
#define SKIP_BSNL(pos) skipEscapedLineEnds(buffer, buffer_len, (pos), &line_count)
|
||||
x = SKIP_BSNL(x);
|
||||
@ -988,6 +990,12 @@ bool QMakeSourceFileInfo::findMocs(SourceFile *file)
|
||||
file->file.real().toLatin1().constData(), line_count);
|
||||
x += 23;
|
||||
ignore[2] = true;
|
||||
} else if (buffer_len >= (x + 30) &&
|
||||
!strncmp(buffer + x + 1, "make ignore Q_NAMESPACE_EXPORT", 30)) {
|
||||
debug_msg(2, "Mocgen: %s:%d Found \"qmake ignore Q_NAMESPACE_EXPORT\"",
|
||||
file->file.real().toLatin1().constData(), line_count);
|
||||
x += 30;
|
||||
ignore[3] = true;
|
||||
}
|
||||
} else if (buffer[x] == '*') {
|
||||
extralines = 0;
|
||||
@ -1015,8 +1023,8 @@ bool QMakeSourceFileInfo::findMocs(SourceFile *file)
|
||||
int morelines = 0;
|
||||
int y = skipEscapedLineEnds(buffer, buffer_len, x + 1, &morelines);
|
||||
if (buffer[y] == 'Q') {
|
||||
static const char interesting[][12] = { "Q_OBJECT", "Q_GADGET", "Q_NAMESPACE"};
|
||||
for (int interest = 0; interest < 3; ++interest) {
|
||||
static const char interesting[][19] = { "Q_OBJECT", "Q_GADGET", "Q_NAMESPACE", "Q_NAMESPACE_EXPORT" };
|
||||
for (int interest = 0; interest < 4; ++interest) {
|
||||
if (ignore[interest])
|
||||
continue;
|
||||
|
||||
|
@ -250,7 +250,7 @@ void MingwMakefileGenerator::init()
|
||||
}
|
||||
|
||||
if(project->isActiveConfig("dll")) {
|
||||
project->values("QMAKE_CLEAN").append(project->first("MINGW_IMPORT_LIB"));
|
||||
project->values("QMAKE_DISTCLEAN").append(project->first("MINGW_IMPORT_LIB"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -517,4 +517,9 @@ ProKey ProFile::getHashStr(const ushort *&tPtr)
|
||||
return ret;
|
||||
}
|
||||
|
||||
QDebug operator<<(QDebug debug, const ProString &str)
|
||||
{
|
||||
return debug << str.toQString();
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -31,6 +31,7 @@
|
||||
|
||||
#include "qmake_global.h"
|
||||
|
||||
#include <qdebug.h>
|
||||
#include <qstring.h>
|
||||
#include <qvector.h>
|
||||
#include <qhash.h>
|
||||
@ -468,6 +469,8 @@ struct ProFunctionDefs {
|
||||
QHash<ProKey, ProFunctionDef> replaceFunctions;
|
||||
};
|
||||
|
||||
QDebug operator<<(QDebug debug, const ProString &str);
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // PROITEMS_H
|
||||
|
@ -504,6 +504,10 @@ EGLint SwapChain11::resize(const gl::Context *context,
|
||||
ASSERT(SUCCEEDED(result));
|
||||
if (SUCCEEDED(result))
|
||||
{
|
||||
#ifndef ANGLE_ENABLE_WINDOWS_STORE
|
||||
if (mNativeWindow->getNativeWindow())
|
||||
InvalidateRect(mNativeWindow->getNativeWindow(), nullptr, FALSE);
|
||||
#endif
|
||||
const auto &format =
|
||||
d3d11::Format::Get(mOffscreenRenderTargetFormat, mRenderer->getRenderer11DeviceCaps());
|
||||
mBackBufferTexture.set(backbufferTexture, format);
|
||||
|
@ -38,6 +38,11 @@
|
||||
#include <double-conversion/strtod.h>
|
||||
#include <double-conversion/utils.h>
|
||||
|
||||
// Fix warning C4244: 'argument': conversion from 'const uc16' to 'char', possible loss of data
|
||||
#ifdef _MSC_VER
|
||||
__pragma(warning(disable: 4244))
|
||||
#endif
|
||||
|
||||
namespace double_conversion {
|
||||
|
||||
const DoubleToStringConverter& DoubleToStringConverter::EcmaScriptConverter() {
|
||||
|
6
src/3rdparty/forkfd/forkfd.c
vendored
6
src/3rdparty/forkfd/forkfd.c
vendored
@ -267,7 +267,7 @@ static int tryReaping(pid_t pid, struct pipe_payload *payload)
|
||||
static void freeInfo(Header *header, ProcessInfo *entry)
|
||||
{
|
||||
entry->deathPipe = -1;
|
||||
entry->pid = 0;
|
||||
ffd_atomic_store(&entry->pid, 0, FFD_ATOMIC_RELEASE);
|
||||
|
||||
(void)ffd_atomic_add_fetch(&header->busyCount, -1, FFD_ATOMIC_RELEASE);
|
||||
assert(header->busyCount >= 0);
|
||||
@ -519,9 +519,9 @@ static void cleanup()
|
||||
ffd_atomic_store(&forkfd_status, 0, FFD_ATOMIC_RELAXED);
|
||||
|
||||
/* free any arrays we might have */
|
||||
array = children.header.nextArray;
|
||||
array = ffd_atomic_load(&children.header.nextArray, FFD_ATOMIC_ACQUIRE);
|
||||
while (array != NULL) {
|
||||
BigArray *next = array->header.nextArray;
|
||||
BigArray *next = ffd_atomic_load(&array->header.nextArray, FFD_ATOMIC_ACQUIRE);
|
||||
free(array);
|
||||
array = next;
|
||||
}
|
||||
|
2
src/3rdparty/sha3/brg_endian.h
vendored
2
src/3rdparty/sha3/brg_endian.h
vendored
@ -42,7 +42,7 @@ Changes for ARM 9/9/2010 [Downstream relative to Gladman's GitHub, upstream to Q
|
||||
#elif defined( __linux__ ) || defined( __GNUC__ ) || defined( __GNU_LIBRARY__ )
|
||||
# if !defined( __MINGW32__ ) && !defined( _AIX ) && !defined(Q_OS_QNX)
|
||||
# include <endian.h>
|
||||
# if !defined( __BEOS__ )
|
||||
# if !defined( __BEOS__ ) && !defined(Q_OS_RTEMS)
|
||||
# include <byteswap.h>
|
||||
# endif
|
||||
# endif
|
||||
|
@ -36,7 +36,7 @@ android {
|
||||
|
||||
compileSdkVersion androidCompileSdkVersion.toInteger()
|
||||
|
||||
buildToolsVersion androidBuildToolsVersion
|
||||
buildToolsVersion '28.0.3'
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
|
@ -0,0 +1,37 @@
|
||||
From 7d300c6e7d05f4e31c966f1298d11da3eae9d679 Mon Sep 17 00:00:00 2001
|
||||
From: Val Doroshchuk <valentyn.doroshchuk@qt.io>
|
||||
Date: Fri, 21 Jun 2019 11:24:06 +0200
|
||||
Subject: [PATCH] ANGLE: Invalidate client window area when resizing swap chain
|
||||
|
||||
Inspired by:
|
||||
https://codereview.appspot.com/6812076/
|
||||
Resizing a window larger results in the newly exposed region being invalidated
|
||||
but the old region is treated as valid.
|
||||
This can result in the old region no longer updating.
|
||||
Was added to D3D9.
|
||||
|
||||
Improving a fix from Filippo Cucchetto:
|
||||
https://codereview.qt-project.org/c/qt/qtbase/+/195336
|
||||
and pushing to D3D11.
|
||||
|
||||
ifndef protects against compilation error for WinRT.
|
||||
Invalidate() should be used only for desktop apps.
|
||||
|
||||
diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp
|
||||
index dcfd06484d..e8f13b388f 100644
|
||||
--- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp
|
||||
+++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp
|
||||
@@ -504,6 +504,10 @@ EGLint SwapChain11::resize(const gl::Context *context,
|
||||
ASSERT(SUCCEEDED(result));
|
||||
if (SUCCEEDED(result))
|
||||
{
|
||||
+#ifndef ANGLE_ENABLE_WINDOWS_STORE
|
||||
+ if (mNativeWindow->getNativeWindow())
|
||||
+ InvalidateRect(mNativeWindow->getNativeWindow(), nullptr, FALSE);
|
||||
+#endif
|
||||
const auto &format =
|
||||
d3d11::Format::Get(mOffscreenRenderTargetFormat, mRenderer->getRenderer11DeviceCaps());
|
||||
mBackBufferTexture.set(backbufferTexture, format);
|
||||
--
|
||||
2.14.2.windows.1
|
||||
|
@ -1,4 +1,5 @@
|
||||
include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
|
||||
include($QT_INSTALL_DOCS/config/exampleurl-qtbase.qdocconf)
|
||||
|
||||
project = QtConcurrent
|
||||
description = Qt Concurrent Reference Documentation
|
||||
|
@ -1,4 +1,5 @@
|
||||
include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
|
||||
include($QT_INSTALL_DOCS/config/exampleurl-qtbase.qdocconf)
|
||||
|
||||
project = QtCore
|
||||
description = Qt Core Reference Documentation
|
||||
|
@ -131,9 +131,10 @@ while (i != set.end()) {
|
||||
//! [10]
|
||||
QSet<QString> set;
|
||||
...
|
||||
QSet<QString>::iterator it = qFind(set.begin(), set.end(), "Jeanette");
|
||||
const auto predicate = [](const QString &s) { return s.compare("Jeanette", Qt::CaseInsensitive) == 0; };
|
||||
QSet<QString>::iterator it = std::find_if(set.begin(), set.end(), predicate);
|
||||
if (it != set.end())
|
||||
cout << "Found Jeanette" << Qt::endl;
|
||||
cout << "Found Jeanette" << endl;
|
||||
//! [10]
|
||||
|
||||
|
||||
@ -150,9 +151,10 @@ for (i = set.begin(); i != set.end(); ++i)
|
||||
//! [12]
|
||||
QSet<QString> set;
|
||||
...
|
||||
QSet<QString>::iterator it = qFind(set.begin(), set.end(), "Jeanette");
|
||||
const auto predicate = [](const QString &s) { return s.compare("Jeanette", Qt::CaseInsensitive) == 0; };
|
||||
QSet<QString>::const_iterator it = std::find_if(set.cbegin(), set.cend(), predicate);
|
||||
if (it != set.constEnd())
|
||||
cout << "Found Jeanette" << Qt::endl;
|
||||
cout << "Found Jeanette" << endl;
|
||||
//! [12]
|
||||
|
||||
|
||||
@ -161,7 +163,7 @@ QSet<QString> set;
|
||||
set << "red" << "green" << "blue" << ... << "black";
|
||||
|
||||
QList<QString> list = set.toList();
|
||||
qSort(list);
|
||||
std::sort(list.begin(), list.end());
|
||||
//! [13]
|
||||
|
||||
|
||||
|
@ -119,8 +119,8 @@ for (i = list.begin(); i != list.end(); ++i)
|
||||
//! [8]
|
||||
QLinkedList<QString> list;
|
||||
...
|
||||
QLinkedList<QString>::iterator it = qFind(list.begin(),
|
||||
list.end(), "Joel");
|
||||
QLinkedList<QString>::iterator it = std::find(list.begin(),
|
||||
list.end(), "Joel");
|
||||
if (it != list.end())
|
||||
cout << "Found Joel" << Qt::endl;
|
||||
//! [8]
|
||||
@ -189,8 +189,8 @@ for (i = list.constBegin(); i != list.constEnd(); ++i)
|
||||
//! [15]
|
||||
QLinkedList<QString> list;
|
||||
...
|
||||
QLinkedList<QString>::iterator it = qFind(list.constBegin(),
|
||||
list.constEnd(), "Joel");
|
||||
QLinkedList<QString>::const_iterator it = std::find(list.constBegin(),
|
||||
list.constEnd(), "Joel");
|
||||
if (it != list.constEnd())
|
||||
cout << "Found Joel" << Qt::endl;
|
||||
//! [15]
|
||||
|
@ -247,7 +247,7 @@ QSet<int> set;
|
||||
set << 20 << 30 << 40 << ... << 70;
|
||||
|
||||
QList<int> list = QList<int>::fromSet(set);
|
||||
qSort(list);
|
||||
std::sort(list.begin(), list.end());
|
||||
//! [23]
|
||||
|
||||
|
||||
|
@ -666,7 +666,7 @@
|
||||
\li \b{Logarithmic time:} O(log \e n). A function that runs in
|
||||
logarithmic time is a function whose running time is
|
||||
proportional to the logarithm of the number of items in the
|
||||
container. One example is qBinaryFind().
|
||||
container. One example is the binary search algorithm.
|
||||
|
||||
\li \b{Linear time:} O(\e n). A function that runs in linear time
|
||||
will execute in a time directly proportional to the number of
|
||||
|
@ -2369,7 +2369,7 @@
|
||||
*/
|
||||
|
||||
/*!
|
||||
\enum Qt::SplitBehavior
|
||||
\enum Qt::SplitBehaviorFlags
|
||||
\since 5.14
|
||||
|
||||
This enum specifies how the split() functions should behave with
|
||||
|
@ -355,6 +355,14 @@ bool QOperatingSystemVersion::isAnyOfType(std::initializer_list<OSType> types) c
|
||||
return false;
|
||||
}
|
||||
|
||||
/*!
|
||||
\variable QOperatingSystemVersion::WindowsVista
|
||||
\brief a version corresponding to Windows Vista (version 6.0).
|
||||
\since 6.0
|
||||
*/
|
||||
const QOperatingSystemVersion QOperatingSystemVersion::WindowsVista =
|
||||
QOperatingSystemVersion(QOperatingSystemVersion::Windows, 6, 0);
|
||||
|
||||
/*!
|
||||
\variable QOperatingSystemVersion::Windows7
|
||||
\brief a version corresponding to Windows 7 (version 6.1).
|
||||
|
@ -60,6 +60,7 @@ public:
|
||||
Android
|
||||
};
|
||||
|
||||
static const QOperatingSystemVersion WindowsVista;
|
||||
static const QOperatingSystemVersion Windows7;
|
||||
static const QOperatingSystemVersion Windows8;
|
||||
static const QOperatingSystemVersion Windows8_1;
|
||||
|
@ -359,17 +359,17 @@ Q_NEVER_INLINE void QRandomGenerator::SystemGenerator::generate(quint32 *begin,
|
||||
quint32 *buffer = begin;
|
||||
qsizetype count = end - begin;
|
||||
|
||||
if (Q_UNLIKELY(uint(qt_randomdevice_control) & SetRandomData)) {
|
||||
uint value = uint(qt_randomdevice_control) & RandomDataMask;
|
||||
if (Q_UNLIKELY(uint(qt_randomdevice_control.loadAcquire()) & SetRandomData)) {
|
||||
uint value = uint(qt_randomdevice_control.loadAcquire()) & RandomDataMask;
|
||||
std::fill_n(buffer, count, value);
|
||||
return;
|
||||
}
|
||||
|
||||
qsizetype filled = 0;
|
||||
if (qt_has_hwrng() && (uint(qt_randomdevice_control) & SkipHWRNG) == 0)
|
||||
if (qt_has_hwrng() && (uint(qt_randomdevice_control.loadAcquire()) & SkipHWRNG) == 0)
|
||||
filled += qt_random_cpu(buffer, count);
|
||||
|
||||
if (filled != count && (uint(qt_randomdevice_control) & SkipSystemRNG) == 0) {
|
||||
if (filled != count && (uint(qt_randomdevice_control.loadAcquire()) & SkipSystemRNG) == 0) {
|
||||
qsizetype bytesFilled =
|
||||
fillBuffer(buffer + filled, (count - filled) * qsizetype(sizeof(*buffer)));
|
||||
filled += bytesFilled / qsizetype(sizeof(*buffer));
|
||||
@ -903,6 +903,10 @@ inline QRandomGenerator::SystemGenerator &QRandomGenerator::SystemGenerator::sel
|
||||
|
||||
\snippet code/src_corelib_global_qrandom.cpp 12
|
||||
|
||||
If the \a highest parameter is negative, the result will be negative too;
|
||||
if it is infinite or NaN, the result will be infinite or NaN too (that is,
|
||||
not random).
|
||||
|
||||
\sa generateDouble(), bounded()
|
||||
*/
|
||||
|
||||
@ -934,7 +938,7 @@ inline QRandomGenerator::SystemGenerator &QRandomGenerator::SystemGenerator::sel
|
||||
\overload
|
||||
|
||||
Generates one random 32-bit quantity in the range between 0 (inclusive) and
|
||||
\a highest (exclusive). \a highest must not be negative.
|
||||
\a highest (exclusive). \a highest must be positive.
|
||||
|
||||
Note that this function cannot be used to obtain values in the full 32-bit
|
||||
range of int. Instead, use generate() and cast to int.
|
||||
@ -946,8 +950,11 @@ inline QRandomGenerator::SystemGenerator &QRandomGenerator::SystemGenerator::sel
|
||||
\fn quint32 QRandomGenerator::bounded(quint32 lowest, quint32 highest)
|
||||
\overload
|
||||
|
||||
Generates one random 32-bit quantity in the range between \a lowest (inclusive)
|
||||
and \a highest (exclusive). The same result may also be obtained by using
|
||||
Generates one random 32-bit quantity in the range between \a lowest
|
||||
(inclusive) and \a highest (exclusive). The \a highest parameter must be
|
||||
greater than \a lowest.
|
||||
|
||||
The same result may also be obtained by using
|
||||
\l{http://en.cppreference.com/w/cpp/numeric/random/uniform_int_distribution}{\c std::uniform_int_distribution}
|
||||
with parameters \a lowest and \c{\a highest - 1}. That class can also be used to
|
||||
obtain quantities larger than 32 bits.
|
||||
@ -968,7 +975,8 @@ inline QRandomGenerator::SystemGenerator &QRandomGenerator::SystemGenerator::sel
|
||||
\overload
|
||||
|
||||
Generates one random 32-bit quantity in the range between \a lowest
|
||||
(inclusive) and \a highest (exclusive), both of which may be negative.
|
||||
(inclusive) and \a highest (exclusive), both of which may be negative, but
|
||||
\a highest must be greater than \a lowest.
|
||||
|
||||
Note that this function cannot be used to obtain values in the full 32-bit
|
||||
range of int. Instead, use generate() and cast to int.
|
||||
@ -1222,7 +1230,7 @@ void QRandomGenerator::_fillRange(void *buffer, void *bufferEnd)
|
||||
quint32 *begin = static_cast<quint32 *>(buffer);
|
||||
quint32 *end = static_cast<quint32 *>(bufferEnd);
|
||||
|
||||
if (type == SystemRNG || Q_UNLIKELY(uint(qt_randomdevice_control) & (UseSystemRNG|SetRandomData)))
|
||||
if (type == SystemRNG || Q_UNLIKELY(uint(qt_randomdevice_control.loadAcquire()) & (UseSystemRNG|SetRandomData)))
|
||||
return SystemGenerator::self().generate(begin, end);
|
||||
|
||||
SystemAndGlobalGenerators::PRNGLocker lock(this);
|
||||
|
@ -122,16 +122,18 @@ public:
|
||||
return quint32(value);
|
||||
}
|
||||
|
||||
int bounded(int highest)
|
||||
{
|
||||
return int(bounded(quint32(highest)));
|
||||
}
|
||||
|
||||
quint32 bounded(quint32 lowest, quint32 highest)
|
||||
{
|
||||
Q_ASSERT(highest > lowest);
|
||||
return bounded(highest - lowest) + lowest;
|
||||
}
|
||||
|
||||
int bounded(int highest)
|
||||
{
|
||||
Q_ASSERT(highest > 0);
|
||||
return int(bounded(0U, quint32(highest)));
|
||||
}
|
||||
|
||||
int bounded(int lowest, int highest)
|
||||
{
|
||||
return bounded(highest - lowest) + lowest;
|
||||
|
@ -76,7 +76,9 @@ Q_CORE_EXPORT QBasicAtomicInteger<uint> qt_randomdevice_control = Q_BASIC_ATOMIC
|
||||
#elif defined(QT_BUILD_INTERNAL)
|
||||
extern Q_CORE_EXPORT QBasicAtomicInteger<uint> qt_randomdevice_control;
|
||||
#else
|
||||
enum { qt_randomdevice_control = 0 };
|
||||
static const struct {
|
||||
uint loadAcquire() const { return 0; }
|
||||
} qt_randomdevice_control;
|
||||
#endif
|
||||
|
||||
inline bool qt_has_hwrng()
|
||||
|
@ -56,8 +56,6 @@ QT_BEGIN_NAMESPACE
|
||||
#define FFD_ATOMIC_RELAXED Relaxed
|
||||
#define FFD_ATOMIC_ACQUIRE Acquire
|
||||
#define FFD_ATOMIC_RELEASE Release
|
||||
#define loadRelaxed load
|
||||
#define storeRelaxed store
|
||||
|
||||
#define FFD_CONCAT(x, y) x ## y
|
||||
|
||||
|
@ -97,6 +97,9 @@
|
||||
#include <QtCore/qset.h>
|
||||
#include <QtCore/qstack.h>
|
||||
#include <QtCore/qvariant.h>
|
||||
#if QT_CONFIG(regularexpression)
|
||||
#include <QtCore/qregularexpression.h>
|
||||
#endif
|
||||
|
||||
#include <QtCore/private/qfilesystemiterator_p.h>
|
||||
#include <QtCore/private/qfilesystementry_p.h>
|
||||
@ -136,8 +139,11 @@ public:
|
||||
const QDir::Filters filters;
|
||||
const QDirIterator::IteratorFlags iteratorFlags;
|
||||
|
||||
#ifndef QT_NO_REGEXP
|
||||
#if defined(QT_BOOTSTRAPPED)
|
||||
// ### Qt6: Get rid of this once we don't bootstrap qmake anymore
|
||||
QVector<QRegExp> nameRegExps;
|
||||
#elif QT_CONFIG(regularexpression)
|
||||
QVector<QRegularExpression> nameRegExps;
|
||||
#endif
|
||||
|
||||
QDirIteratorPrivateIteratorStack<QAbstractFileEngineIterator> fileEngineIterators;
|
||||
@ -162,13 +168,21 @@ QDirIteratorPrivate::QDirIteratorPrivate(const QFileSystemEntry &entry, const QS
|
||||
, filters(QDir::NoFilter == filters ? QDir::AllEntries : filters)
|
||||
, iteratorFlags(flags)
|
||||
{
|
||||
#ifndef QT_NO_REGEXP
|
||||
#if defined(QT_BOOTSTRAPPED)
|
||||
nameRegExps.reserve(nameFilters.size());
|
||||
for (int i = 0; i < nameFilters.size(); ++i)
|
||||
for (const auto &filter : nameFilters) {
|
||||
nameRegExps.append(
|
||||
QRegExp(nameFilters.at(i),
|
||||
QRegExp(filter,
|
||||
(filters & QDir::CaseSensitive) ? Qt::CaseSensitive : Qt::CaseInsensitive,
|
||||
QRegExp::Wildcard));
|
||||
}
|
||||
#elif QT_CONFIG(regularexpression)
|
||||
nameRegExps.reserve(nameFilters.size());
|
||||
for (const auto &filter : nameFilters) {
|
||||
QString re = QRegularExpression::anchoredPattern(QRegularExpression::wildcardToRegularExpression(filter));
|
||||
nameRegExps.append(
|
||||
QRegularExpression(re, (filters & QDir::CaseSensitive) ? QRegularExpression::NoPatternOption : QRegularExpression::CaseInsensitiveOption));
|
||||
}
|
||||
#endif
|
||||
QFileSystemMetaData metaData;
|
||||
if (resolveEngine)
|
||||
@ -335,19 +349,23 @@ bool QDirIteratorPrivate::matchesFilters(const QString &fileName, const QFileInf
|
||||
return false;
|
||||
|
||||
// name filter
|
||||
#ifndef QT_NO_REGEXP
|
||||
#if QT_CONFIG(regularexpression) || defined(QT_BOOTSTRAPPED)
|
||||
// Pass all entries through name filters, except dirs if the AllDirs
|
||||
if (!nameFilters.isEmpty() && !((filters & QDir::AllDirs) && fi.isDir())) {
|
||||
bool matched = false;
|
||||
for (QVector<QRegExp>::const_iterator iter = nameRegExps.constBegin(),
|
||||
end = nameRegExps.constEnd();
|
||||
iter != end; ++iter) {
|
||||
|
||||
QRegExp copy = *iter;
|
||||
for (const auto &re : nameRegExps) {
|
||||
#if defined(QT_BOOTSTRAPPED)
|
||||
QRegExp copy = re;
|
||||
if (copy.exactMatch(fileName)) {
|
||||
matched = true;
|
||||
break;
|
||||
}
|
||||
#else
|
||||
if (re.match(fileName).hasMatch()) {
|
||||
matched = true;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
if (!matched)
|
||||
return false;
|
||||
|
@ -47,7 +47,7 @@
|
||||
#include <qset.h>
|
||||
#include <qtimer.h>
|
||||
|
||||
#if defined(Q_OS_LINUX) || (defined(Q_OS_QNX) && !defined(QT_NO_INOTIFY))
|
||||
#if (defined(Q_OS_LINUX) || defined(Q_OS_QNX)) && QT_CONFIG(inotify)
|
||||
#define USE_INOTIFY
|
||||
#endif
|
||||
|
||||
|
@ -50,6 +50,7 @@
|
||||
#include <qfile.h>
|
||||
#include <qfileinfo.h>
|
||||
#include <qvarlengtharray.h>
|
||||
#include <qscopeguard.h>
|
||||
|
||||
#undef FSEVENT_DEBUG
|
||||
#ifdef FSEVENT_DEBUG
|
||||
@ -338,10 +339,10 @@ QStringList QFseventsFileSystemWatcherEngine::addPaths(const QStringList &paths,
|
||||
bool needsRestart = false;
|
||||
|
||||
WatchingState oldState = watchingState;
|
||||
QStringList p = paths;
|
||||
QMutableListIterator<QString> it(p);
|
||||
while (it.hasNext()) {
|
||||
QString origPath = it.next().normalized(QString::NormalizationForm_C);
|
||||
QStringList unhandled;
|
||||
for (const QString &path : paths) {
|
||||
auto sg = qScopeGuard([&]{ unhandled.push_back(path); });
|
||||
QString origPath = path.normalized(QString::NormalizationForm_C);
|
||||
QString realPath = origPath;
|
||||
if (realPath.endsWith(QDir::separator()))
|
||||
realPath = realPath.mid(0, realPath.size() - 1);
|
||||
@ -362,17 +363,17 @@ QStringList QFseventsFileSystemWatcherEngine::addPaths(const QStringList &paths,
|
||||
continue;
|
||||
directories->append(origPath);
|
||||
watchedPath = realPath;
|
||||
it.remove();
|
||||
} else {
|
||||
if (files->contains(origPath))
|
||||
continue;
|
||||
files->append(origPath);
|
||||
it.remove();
|
||||
|
||||
watchedPath = fi.path();
|
||||
parentPath = watchedPath;
|
||||
}
|
||||
|
||||
sg.dismiss();
|
||||
|
||||
for (PathRefCounts::const_iterator i = watchingState.watchedPaths.begin(),
|
||||
ei = watchingState.watchedPaths.end(); i != ei; ++i) {
|
||||
if (watchedPath.startsWith(i.key() % QDir::separator())) {
|
||||
@ -409,14 +410,14 @@ QStringList QFseventsFileSystemWatcherEngine::addPaths(const QStringList &paths,
|
||||
// ok, something went wrong, let's try to restore the previous state
|
||||
watchingState = std::move(oldState);
|
||||
// and because we don't know which path caused the issue (if any), fail on all of them
|
||||
p = paths;
|
||||
unhandled = paths;
|
||||
|
||||
if (wasRunning)
|
||||
startStream();
|
||||
}
|
||||
}
|
||||
|
||||
return p;
|
||||
return unhandled;
|
||||
}
|
||||
|
||||
QStringList QFseventsFileSystemWatcherEngine::removePaths(const QStringList &paths,
|
||||
@ -430,10 +431,9 @@ QStringList QFseventsFileSystemWatcherEngine::removePaths(const QStringList &pat
|
||||
bool needsRestart = false;
|
||||
|
||||
WatchingState oldState = watchingState;
|
||||
QStringList p = paths;
|
||||
QMutableListIterator<QString> it(p);
|
||||
while (it.hasNext()) {
|
||||
QString origPath = it.next();
|
||||
QStringList unhandled;
|
||||
for (const QString &origPath : paths) {
|
||||
auto sg = qScopeGuard([&]{ unhandled.push_back(origPath); });
|
||||
QString realPath = origPath;
|
||||
if (realPath.endsWith(QDir::separator()))
|
||||
realPath = realPath.mid(0, realPath.size() - 1);
|
||||
@ -447,7 +447,7 @@ QStringList QFseventsFileSystemWatcherEngine::removePaths(const QStringList &pat
|
||||
needsRestart |= derefPath(dirIt->dirInfo.watchedPath);
|
||||
watchingState.watchedDirectories.erase(dirIt);
|
||||
directories->removeAll(origPath);
|
||||
it.remove();
|
||||
sg.dismiss();
|
||||
DEBUG("Removed directory '%s'", qPrintable(realPath));
|
||||
}
|
||||
} else {
|
||||
@ -463,7 +463,7 @@ QStringList QFseventsFileSystemWatcherEngine::removePaths(const QStringList &pat
|
||||
if (filesInDir.isEmpty())
|
||||
watchingState.watchedFiles.erase(pIt);
|
||||
files->removeAll(origPath);
|
||||
it.remove();
|
||||
sg.dismiss();
|
||||
DEBUG("Removed file '%s'", qPrintable(realPath));
|
||||
}
|
||||
}
|
||||
@ -479,7 +479,7 @@ QStringList QFseventsFileSystemWatcherEngine::removePaths(const QStringList &pat
|
||||
}
|
||||
}
|
||||
|
||||
return p;
|
||||
return unhandled;
|
||||
}
|
||||
|
||||
// Returns false if FSEventStream* calls failed for some mysterious reason, true if things got a
|
||||
|
@ -517,7 +517,7 @@ void QProcessPrivate::startProcess()
|
||||
if (stderrChannel.pipe[0] != -1)
|
||||
::fcntl(stderrChannel.pipe[0], F_SETFL, ::fcntl(stderrChannel.pipe[0], F_GETFL) | O_NONBLOCK);
|
||||
|
||||
if (threadData->eventDispatcher) {
|
||||
if (threadData->eventDispatcher.loadAcquire()) {
|
||||
deathNotifier = new QSocketNotifier(forkfd, QSocketNotifier::Read, q);
|
||||
QObject::connect(deathNotifier, SIGNAL(activated(int)),
|
||||
q, SLOT(_q_processDied()));
|
||||
|
@ -197,13 +197,13 @@ Q_DECLARE_TYPEINFO(QResourceRoot, Q_MOVABLE_TYPE);
|
||||
typedef QList<QResourceRoot*> ResourceList;
|
||||
struct QResourceGlobalData
|
||||
{
|
||||
QMutex resourceMutex{QMutex::Recursive};
|
||||
QRecursiveMutex resourceMutex;
|
||||
ResourceList resourceList;
|
||||
QStringList resourceSearchPaths;
|
||||
};
|
||||
Q_GLOBAL_STATIC(QResourceGlobalData, resourceGlobalData)
|
||||
|
||||
static inline QMutex *resourceMutex()
|
||||
static inline QRecursiveMutex *resourceMutex()
|
||||
{ return &resourceGlobalData->resourceMutex; }
|
||||
|
||||
static inline ResourceList *resourceList()
|
||||
|
@ -2048,8 +2048,8 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile,
|
||||
QPixmap, which are part of Qt GUI. In other words, there is no
|
||||
\c toColor(), \c toImage(), or \c toPixmap() functions in QVariant.
|
||||
|
||||
Instead, you can use the QVariant::value() or the qVariantValue()
|
||||
template function. For example:
|
||||
Instead, you can use the QVariant::value() template function.
|
||||
For example:
|
||||
|
||||
\snippet code/src_corelib_io_qsettings.cpp 0
|
||||
|
||||
|
@ -220,7 +220,7 @@ static bool shouldIncludeFs(const QStorageIterator &it)
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
#if defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID)
|
||||
if (it.fileSystemType() == "rootfs")
|
||||
return false;
|
||||
#endif
|
||||
@ -849,7 +849,7 @@ QList<QStorageInfo> QStorageInfoPrivate::mountedVolumes()
|
||||
info.d->device = it.device();
|
||||
info.d->fileSystemType = it.fileSystemType();
|
||||
info.d->subvolume = it.subvolume();
|
||||
if (info.bytesTotal() == 0)
|
||||
if (info.bytesTotal() == 0 && info != root())
|
||||
continue;
|
||||
volumes.append(info);
|
||||
}
|
||||
|
@ -145,10 +145,10 @@ public:
|
||||
bool isUnnamedFile() const override final;
|
||||
|
||||
const QString &templateName;
|
||||
quint32 fileMode;
|
||||
quint32 fileMode = 0;
|
||||
int flags = 0;
|
||||
bool filePathIsTemplate;
|
||||
bool filePathWasTemplate;
|
||||
bool filePathIsTemplate = true;
|
||||
bool filePathWasTemplate = true;
|
||||
bool unnamedFile = false;
|
||||
};
|
||||
|
||||
|
@ -445,3 +445,5 @@ void QTransposeProxyModel::sort(int column, Qt::SortOrder order)
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qtransposeproxymodel.cpp"
|
||||
|
@ -52,8 +52,8 @@
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtCore/private/qglobal_p.h>
|
||||
#include "qplatformdefs.h"
|
||||
#include <QtCore/private/qglobal_p.h>
|
||||
#include "qatomic.h"
|
||||
#include "qbytearray.h"
|
||||
|
||||
|
@ -227,12 +227,14 @@ bool QCoreApplicationPrivate::checkInstance(const char *function)
|
||||
return b;
|
||||
}
|
||||
|
||||
#if QT_CONFIG(commandlineparser)
|
||||
void QCoreApplicationPrivate::addQtOptions(QList<QCommandLineOption> *options)
|
||||
{
|
||||
options->append(QCommandLineOption(QStringLiteral("qmljsdebugger"),
|
||||
QStringLiteral("Activates the QML/JS debugger with a specified port. The value must be of format port:1234[,block]. \"block\" makes the application wait for a connection."),
|
||||
QStringLiteral("value")));
|
||||
}
|
||||
#endif
|
||||
|
||||
void QCoreApplicationPrivate::processCommandLineArguments()
|
||||
{
|
||||
@ -385,8 +387,8 @@ struct QCoreApplicationData {
|
||||
~QCoreApplicationData() {
|
||||
#ifndef QT_NO_QOBJECT
|
||||
// cleanup the QAdoptedThread created for the main() thread
|
||||
if (QCoreApplicationPrivate::theMainThread) {
|
||||
QThreadData *data = QThreadData::get2(QCoreApplicationPrivate::theMainThread);
|
||||
if (auto *t = QCoreApplicationPrivate::theMainThread.loadAcquire()) {
|
||||
QThreadData *data = QThreadData::get2(t);
|
||||
data->deref(); // deletes the data and the adopted thread
|
||||
}
|
||||
#endif
|
||||
@ -486,7 +488,7 @@ QCoreApplicationPrivate::QCoreApplicationPrivate(int &aargc, char **aargv, uint
|
||||
#endif
|
||||
|
||||
QThread *cur = QThread::currentThread(); // note: this may end up setting theMainThread!
|
||||
if (cur != theMainThread)
|
||||
if (cur != theMainThread.loadAcquire())
|
||||
qWarning("WARNING: QApplication was not created in the main() thread.");
|
||||
#endif
|
||||
}
|
||||
@ -862,7 +864,7 @@ void QCoreApplicationPrivate::init()
|
||||
Q_ASSERT(eventDispatcher);
|
||||
|
||||
if (!eventDispatcher->parent()) {
|
||||
eventDispatcher->moveToThread(threadData->thread);
|
||||
eventDispatcher->moveToThread(threadData->thread.loadAcquire());
|
||||
eventDispatcher->setParent(q);
|
||||
}
|
||||
|
||||
@ -1181,7 +1183,7 @@ static bool doNotify(QObject *receiver, QEvent *event)
|
||||
bool QCoreApplicationPrivate::sendThroughApplicationEventFilters(QObject *receiver, QEvent *event)
|
||||
{
|
||||
// We can't access the application event filters outside of the main thread (race conditions)
|
||||
Q_ASSERT(receiver->d_func()->threadData->thread == mainThread());
|
||||
Q_ASSERT(receiver->d_func()->threadData->thread.loadAcquire() == mainThread());
|
||||
|
||||
if (extraData) {
|
||||
// application event filters are only called for objects in the GUI thread
|
||||
@ -1234,7 +1236,7 @@ bool QCoreApplicationPrivate::notify_helper(QObject *receiver, QEvent * event)
|
||||
|
||||
// send to all application event filters (only does anything in the main thread)
|
||||
if (QCoreApplication::self
|
||||
&& receiver->d_func()->threadData->thread == mainThread()
|
||||
&& receiver->d_func()->threadData->thread.loadAcquire() == mainThread()
|
||||
&& QCoreApplication::self->d_func()->sendThroughApplicationEventFilters(receiver, event)) {
|
||||
filtered = true;
|
||||
return filtered;
|
||||
@ -2655,7 +2657,7 @@ QString QCoreApplication::applicationVersion()
|
||||
|
||||
#if QT_CONFIG(library)
|
||||
|
||||
Q_GLOBAL_STATIC_WITH_ARGS(QMutex, libraryPathMutex, (QMutex::Recursive))
|
||||
Q_GLOBAL_STATIC(QRecursiveMutex, libraryPathMutex)
|
||||
|
||||
/*!
|
||||
Returns a list of paths that the application will search when
|
||||
@ -2905,7 +2907,7 @@ void QCoreApplication::installNativeEventFilter(QAbstractNativeEventFilter *filt
|
||||
return;
|
||||
}
|
||||
|
||||
QAbstractEventDispatcher *eventDispatcher = QAbstractEventDispatcher::instance(QCoreApplicationPrivate::theMainThread);
|
||||
QAbstractEventDispatcher *eventDispatcher = QAbstractEventDispatcher::instance(QCoreApplicationPrivate::theMainThread.loadAcquire());
|
||||
if (!filterObj || !eventDispatcher)
|
||||
return;
|
||||
eventDispatcher->installNativeEventFilter(filterObj);
|
||||
@ -2961,7 +2963,7 @@ bool QCoreApplication::hasPendingEvents()
|
||||
*/
|
||||
QAbstractEventDispatcher *QCoreApplication::eventDispatcher()
|
||||
{
|
||||
if (QCoreApplicationPrivate::theMainThread)
|
||||
if (QCoreApplicationPrivate::theMainThread.loadAcquire())
|
||||
return QCoreApplicationPrivate::theMainThread.loadRelaxed()->eventDispatcher();
|
||||
return 0;
|
||||
}
|
||||
@ -2974,7 +2976,7 @@ QAbstractEventDispatcher *QCoreApplication::eventDispatcher()
|
||||
*/
|
||||
void QCoreApplication::setEventDispatcher(QAbstractEventDispatcher *eventDispatcher)
|
||||
{
|
||||
QThread *mainThread = QCoreApplicationPrivate::theMainThread;
|
||||
QThread *mainThread = QCoreApplicationPrivate::theMainThread.loadAcquire();
|
||||
if (!mainThread)
|
||||
mainThread = QThread::currentThread(); // will also setup theMainThread
|
||||
mainThread->setEventDispatcher(eventDispatcher);
|
||||
|
@ -52,7 +52,9 @@
|
||||
//
|
||||
|
||||
#include "QtCore/qcoreapplication.h"
|
||||
#if QT_CONFIG(commandlineparser)
|
||||
#include "QtCore/qcommandlineoption.h"
|
||||
#endif
|
||||
#include "QtCore/qtranslator.h"
|
||||
#if QT_CONFIG(settings)
|
||||
#include "QtCore/qsettings.h"
|
||||
@ -105,7 +107,9 @@ public:
|
||||
|
||||
static bool checkInstance(const char *method);
|
||||
|
||||
#if QT_CONFIG(commandlineparser)
|
||||
virtual void addQtOptions(QList<QCommandLineOption> *options);
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_QOBJECT
|
||||
bool sendThroughApplicationEventFilters(QObject *, QEvent *);
|
||||
|
@ -52,7 +52,6 @@
|
||||
#include "qelapsedtimer.h"
|
||||
#include "qcoreapplication_p.h"
|
||||
#include <private/qthread_p.h>
|
||||
#include <private/qmutexpool_p.h>
|
||||
#include <private/qwineventnotifier_p.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
@ -101,7 +100,7 @@ LRESULT QT_WIN_CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPA
|
||||
|
||||
QEventDispatcherWin32Private::QEventDispatcherWin32Private()
|
||||
: threadId(GetCurrentThreadId()), interrupt(false), internalHwnd(0),
|
||||
getMessageHook(0), wakeUps(0), activateNotifiersPosted(false),
|
||||
wakeUps(0), activateNotifiersPosted(false),
|
||||
winEventNotifierActivatedEvent(NULL)
|
||||
{
|
||||
}
|
||||
@ -270,14 +269,6 @@ static inline UINT inputTimerMask()
|
||||
return result;
|
||||
}
|
||||
|
||||
LRESULT QT_WIN_CALLBACK qt_GetMessageHook(int code, WPARAM wp, LPARAM lp)
|
||||
{
|
||||
QEventDispatcherWin32 *q = qobject_cast<QEventDispatcherWin32 *>(QAbstractEventDispatcher::instance());
|
||||
Q_ASSERT(q != 0);
|
||||
|
||||
return q->d_func()->getMessageHook ? CallNextHookEx(0, code, wp, lp) : 0;
|
||||
}
|
||||
|
||||
// Provide class name and atom for the message window used by
|
||||
// QEventDispatcherWin32Private via Q_GLOBAL_STATIC shared between threads.
|
||||
struct QWindowsMessageWindowClassContext
|
||||
@ -456,38 +447,11 @@ void QEventDispatcherWin32::createInternalHwnd()
|
||||
return;
|
||||
d->internalHwnd = qt_create_internal_window(this);
|
||||
|
||||
installMessageHook();
|
||||
|
||||
// start all normal timers
|
||||
for (int i = 0; i < d->timerVec.count(); ++i)
|
||||
d->registerTimer(d->timerVec.at(i));
|
||||
}
|
||||
|
||||
void QEventDispatcherWin32::installMessageHook()
|
||||
{
|
||||
Q_D(QEventDispatcherWin32);
|
||||
|
||||
if (d->getMessageHook)
|
||||
return;
|
||||
|
||||
// setup GetMessage hook needed to drive our posted events
|
||||
d->getMessageHook = SetWindowsHookEx(WH_GETMESSAGE, (HOOKPROC) qt_GetMessageHook, NULL, GetCurrentThreadId());
|
||||
if (Q_UNLIKELY(!d->getMessageHook)) {
|
||||
int errorCode = GetLastError();
|
||||
qFatal("Qt: INTERNAL ERROR: failed to install GetMessage hook: %d, %ls",
|
||||
errorCode, qUtf16Printable(qt_error_string(errorCode)));
|
||||
}
|
||||
}
|
||||
|
||||
void QEventDispatcherWin32::uninstallMessageHook()
|
||||
{
|
||||
Q_D(QEventDispatcherWin32);
|
||||
|
||||
if (d->getMessageHook)
|
||||
UnhookWindowsHookEx(d->getMessageHook);
|
||||
d->getMessageHook = 0;
|
||||
}
|
||||
|
||||
QEventDispatcherWin32::QEventDispatcherWin32(QObject *parent)
|
||||
: QAbstractEventDispatcher(*new QEventDispatcherWin32Private, parent)
|
||||
{
|
||||
@ -583,10 +547,6 @@ bool QEventDispatcherWin32::processEvents(QEventLoop::ProcessEventsFlags flags)
|
||||
}
|
||||
}
|
||||
if (haveMessage) {
|
||||
// The Direct2d integration unsets getMessageHook. See QTBUG-42428
|
||||
if (!d->getMessageHook)
|
||||
(void) qt_GetMessageHook(0, PM_REMOVE, reinterpret_cast<LPARAM>(&msg));
|
||||
|
||||
if (d->internalHwnd == msg.hwnd && msg.message == WM_QT_SENDPOSTEDEVENTS) {
|
||||
// Set result to 'true', if the message was sent by wakeUp().
|
||||
if (msg.wParam == WMWP_QT_FROMWAKEUP) {
|
||||
@ -1044,8 +1004,6 @@ void QEventDispatcherWin32::closingDown()
|
||||
d->timerDict.clear();
|
||||
|
||||
d->closingDown = true;
|
||||
|
||||
uninstallMessageHook();
|
||||
}
|
||||
|
||||
bool QEventDispatcherWin32::event(QEvent *e)
|
||||
|
@ -73,8 +73,6 @@ class Q_CORE_EXPORT QEventDispatcherWin32 : public QAbstractEventDispatcher
|
||||
|
||||
protected:
|
||||
void createInternalHwnd();
|
||||
void installMessageHook();
|
||||
void uninstallMessageHook();
|
||||
|
||||
public:
|
||||
explicit QEventDispatcherWin32(QObject *parent = 0);
|
||||
@ -115,7 +113,6 @@ protected:
|
||||
|
||||
private:
|
||||
friend LRESULT QT_WIN_CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPARAM lp);
|
||||
friend LRESULT QT_WIN_CALLBACK qt_GetMessageHook(int, WPARAM, LPARAM);
|
||||
};
|
||||
|
||||
struct QSockNot {
|
||||
@ -169,7 +166,6 @@ public:
|
||||
|
||||
// internal window handle used for socketnotifiers/timers/etc
|
||||
HWND internalHwnd;
|
||||
HHOOK getMessageHook;
|
||||
|
||||
// for controlling when to send posted events
|
||||
QAtomicInt wakeUps;
|
||||
|
@ -165,7 +165,7 @@ int QEventLoop::exec(ProcessEventsFlags flags)
|
||||
{
|
||||
Q_D(QEventLoop);
|
||||
//we need to protect from race condition with QThread::exit
|
||||
QMutexLocker locker(&static_cast<QThreadPrivate *>(QObjectPrivate::get(d->threadData->thread))->mutex);
|
||||
QMutexLocker locker(&static_cast<QThreadPrivate *>(QObjectPrivate::get(d->threadData->thread.loadAcquire()))->mutex);
|
||||
if (d->threadData->quitNow)
|
||||
return -1;
|
||||
|
||||
|
@ -74,7 +74,7 @@ template <typename T>
|
||||
class QTypeModuleInfo
|
||||
{
|
||||
public:
|
||||
enum Module {
|
||||
enum Module : bool {
|
||||
IsCore = false,
|
||||
IsWidget = false,
|
||||
IsGui = false,
|
||||
|
@ -219,7 +219,7 @@ QObjectPrivate::QObjectPrivate(int version)
|
||||
QObjectPrivate::~QObjectPrivate()
|
||||
{
|
||||
if (extraData && !extraData->runningTimers.isEmpty()) {
|
||||
if (Q_LIKELY(threadData->thread == QThread::currentThread())) {
|
||||
if (Q_LIKELY(threadData->thread.loadAcquire() == QThread::currentThread())) {
|
||||
// unregister pending timers
|
||||
if (threadData->hasEventDispatcher())
|
||||
threadData->eventDispatcher.loadRelaxed()->unregisterTimers(q_ptr);
|
||||
@ -421,7 +421,7 @@ void QObjectPrivate::ConnectionData::cleanOrphanedConnectionsImpl(QObject *sende
|
||||
ConnectionOrSignalVector *c = nullptr;
|
||||
{
|
||||
QBasicMutexLocker l(signalSlotLock(sender));
|
||||
if (ref > 1)
|
||||
if (ref.loadAcquire() > 1)
|
||||
return;
|
||||
|
||||
// Since ref == 1, no activate() is in process since we locked the mutex. That implies,
|
||||
@ -493,11 +493,11 @@ bool QObjectPrivate::maybeSignalConnected(uint signalIndex) const
|
||||
if (!signalVector)
|
||||
return false;
|
||||
|
||||
if (signalVector->at(-1).first)
|
||||
if (signalVector->at(-1).first.loadAcquire())
|
||||
return true;
|
||||
|
||||
if (signalIndex < uint(cd->signalVectorCount())) {
|
||||
const QObjectPrivate::Connection *c = signalVector->at(signalIndex).first;
|
||||
const QObjectPrivate::Connection *c = signalVector->at(signalIndex).first.loadAcquire();
|
||||
return c != nullptr;
|
||||
}
|
||||
return false;
|
||||
@ -819,8 +819,8 @@ static bool check_parent_thread(QObject *parent,
|
||||
QThreadData *currentThreadData)
|
||||
{
|
||||
if (parent && parentThreadData != currentThreadData) {
|
||||
QThread *parentThread = parentThreadData->thread;
|
||||
QThread *currentThread = currentThreadData->thread;
|
||||
QThread *parentThread = parentThreadData->thread.loadAcquire();
|
||||
QThread *currentThread = currentThreadData->thread.loadAcquire();
|
||||
qWarning("QObject: Cannot create children for a parent that is in a different thread.\n"
|
||||
"(Parent is %s(%p), parent's thread is %s(%p), current thread is %s(%p)",
|
||||
parent->metaObject()->className(),
|
||||
@ -987,11 +987,11 @@ QObject::~QObject()
|
||||
QObjectPrivate::ConnectionList &connectionList = cd->connectionsForSignal(signal);
|
||||
|
||||
while (QObjectPrivate::Connection *c = connectionList.first.loadRelaxed()) {
|
||||
Q_ASSERT(c->receiver);
|
||||
Q_ASSERT(c->receiver.loadAcquire());
|
||||
|
||||
QBasicMutex *m = signalSlotLock(c->receiver.loadRelaxed());
|
||||
bool needToUnlock = QOrderedMutexLocker::relock(signalSlotMutex, m);
|
||||
if (c->receiver) {
|
||||
if (c->receiver.loadAcquire()) {
|
||||
cd->removeConnection(c);
|
||||
Q_ASSERT(connectionList.first.loadRelaxed() != c);
|
||||
}
|
||||
@ -1003,7 +1003,7 @@ QObject::~QObject()
|
||||
/* Disconnect all senders:
|
||||
*/
|
||||
while (QObjectPrivate::Connection *node = cd->senders) {
|
||||
Q_ASSERT(node->receiver);
|
||||
Q_ASSERT(node->receiver.loadAcquire());
|
||||
QObject *sender = node->sender;
|
||||
// Send disconnectNotify before removing the connection from sender's connection list.
|
||||
// This ensures any eventual destructor of sender will block on getting receiver's lock
|
||||
@ -1453,7 +1453,7 @@ bool QObject::blockSignals(bool block) noexcept
|
||||
*/
|
||||
QThread *QObject::thread() const
|
||||
{
|
||||
return d_func()->threadData->thread;
|
||||
return d_func()->threadData->thread.loadAcquire();
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -1500,7 +1500,7 @@ void QObject::moveToThread(QThread *targetThread)
|
||||
{
|
||||
Q_D(QObject);
|
||||
|
||||
if (d->threadData->thread == targetThread) {
|
||||
if (d->threadData->thread.loadAcquire() == targetThread) {
|
||||
// object is already in this thread
|
||||
return;
|
||||
}
|
||||
@ -1516,7 +1516,7 @@ void QObject::moveToThread(QThread *targetThread)
|
||||
|
||||
QThreadData *currentData = QThreadData::current();
|
||||
QThreadData *targetData = targetThread ? QThreadData::get2(targetThread) : nullptr;
|
||||
if (d->threadData->thread == 0 && currentData == targetData) {
|
||||
if (d->threadData->thread.loadAcquire() == 0 && currentData == targetData) {
|
||||
// one exception to the rule: we allow moving objects with no thread affinity to the current thread
|
||||
currentData = d->threadData;
|
||||
} else if (d->threadData != currentData) {
|
||||
@ -2232,6 +2232,8 @@ void QObject::removeEventFilter(QObject *obj)
|
||||
*/
|
||||
|
||||
/*!
|
||||
\threadsafe
|
||||
|
||||
Schedules this object for deletion.
|
||||
|
||||
The object will be deleted when control returns to the event
|
||||
@ -3716,7 +3718,7 @@ void doActivate(QObject *sender, int signal_index, void **argv)
|
||||
|
||||
bool senderDeleted = false;
|
||||
{
|
||||
Q_ASSERT(sp->connections);
|
||||
Q_ASSERT(sp->connections.loadAcquire());
|
||||
QObjectPrivate::ConnectionDataPointer connections(sp->connections.loadRelaxed());
|
||||
QObjectPrivate::SignalVector *signalVector = connections->signalVector.loadRelaxed();
|
||||
|
||||
@ -3773,7 +3775,7 @@ void doActivate(QObject *sender, int signal_index, void **argv)
|
||||
QSemaphore semaphore;
|
||||
{
|
||||
QBasicMutexLocker locker(signalSlotLock(sender));
|
||||
if (!c->receiver)
|
||||
if (!c->receiver.loadAcquire())
|
||||
continue;
|
||||
QMetaCallEvent *ev = c->isSlotObject ?
|
||||
new QMetaCallEvent(c->slotObj, sender, signal_index, 0, 0, argv, &semaphore) :
|
||||
@ -4187,13 +4189,14 @@ void QObject::dumpObjectInfo() const
|
||||
}
|
||||
|
||||
#ifndef QT_NO_USERDATA
|
||||
static QBasicAtomicInteger<uint> user_data_registration = Q_BASIC_ATOMIC_INITIALIZER(0);
|
||||
|
||||
/*!
|
||||
\internal
|
||||
*/
|
||||
uint QObject::registerUserData()
|
||||
{
|
||||
static int user_data_registration = 0;
|
||||
return user_data_registration++;
|
||||
return user_data_registration.fetchAndAddRelaxed(1);
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -4526,6 +4529,24 @@ QDebug operator<<(QDebug dbg, const QObject *o)
|
||||
Q_NAMESPACE makes an external variable, \c{staticMetaObject}, available.
|
||||
\c{staticMetaObject} is of type QMetaObject and provides access to the
|
||||
enums declared with Q_ENUM_NS/Q_FLAG_NS.
|
||||
|
||||
\sa Q_NAMESPACE_EXPORT
|
||||
*/
|
||||
|
||||
/*!
|
||||
\macro Q_NAMESPACE_EXPORT(EXPORT_MACRO)
|
||||
\relates QObject
|
||||
\since 5.14
|
||||
|
||||
The Q_NAMESPACE_EXPORT macro can be used to add QMetaObject capabilities
|
||||
to a namespace.
|
||||
|
||||
It works exactly like the Q_NAMESPACE macro. However, the external
|
||||
\c{staticMetaObject} variable that gets defined in the namespace
|
||||
is declared with the supplied \c{EXPORT_MACRO} qualifier. This is
|
||||
useful f.i. if the object needs to be exported from a dynamic library.
|
||||
|
||||
\sa Q_NAMESPACE, {Creating Shared Libraries}
|
||||
*/
|
||||
|
||||
/*!
|
||||
|
@ -71,12 +71,16 @@ class QObjectPrivate;
|
||||
class QObject;
|
||||
class QThread;
|
||||
class QWidget;
|
||||
class QAccessibleWidget;
|
||||
#ifndef QT_NO_REGEXP
|
||||
class QRegExp;
|
||||
#endif
|
||||
#if QT_CONFIG(regularexpression)
|
||||
class QRegularExpression;
|
||||
#endif
|
||||
#if !QT_DEPRECATED_SINCE(5, 14) || QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
# define QT_NO_USERDATA
|
||||
#endif
|
||||
#ifndef QT_NO_USERDATA
|
||||
class QObjectUserData;
|
||||
#endif
|
||||
@ -405,8 +409,11 @@ public:
|
||||
#endif // QT_NO_PROPERTIES
|
||||
|
||||
#ifndef QT_NO_USERDATA
|
||||
QT_DEPRECATED_VERSION_5_14
|
||||
static uint registerUserData();
|
||||
QT_DEPRECATED_VERSION_X_5_14("Use setProperty()")
|
||||
void setUserData(uint id, QObjectUserData* data);
|
||||
QT_DEPRECATED_VERSION_X_5_14("Use property()")
|
||||
QObjectUserData* userData(uint id) const;
|
||||
#endif // QT_NO_USERDATA
|
||||
|
||||
@ -453,6 +460,7 @@ protected:
|
||||
friend class QCoreApplication;
|
||||
friend class QCoreApplicationPrivate;
|
||||
friend class QWidget;
|
||||
friend class QAccessibleWidget;
|
||||
friend class QThreadData;
|
||||
|
||||
private:
|
||||
|
@ -279,7 +279,7 @@ public:
|
||||
void removeConnection(Connection *c);
|
||||
void cleanOrphanedConnections(QObject *sender)
|
||||
{
|
||||
if (orphaned.loadRelaxed() && ref == 1)
|
||||
if (orphaned.loadRelaxed() && ref.loadAcquire() == 1)
|
||||
cleanOrphanedConnectionsImpl(sender);
|
||||
}
|
||||
void cleanOrphanedConnectionsImpl(QObject *sender);
|
||||
@ -312,7 +312,7 @@ public:
|
||||
}
|
||||
}
|
||||
int signalVectorCount() const {
|
||||
return signalVector ? signalVector.loadRelaxed()->count() : -1;
|
||||
return signalVector.loadAcquire() ? signalVector.loadRelaxed()->count() : -1;
|
||||
}
|
||||
|
||||
static void deleteOrphaned(ConnectionOrSignalVector *c);
|
||||
|
@ -201,12 +201,16 @@ private: \
|
||||
QT_ANNOTATE_CLASS(qt_qgadget, "") \
|
||||
/*end*/
|
||||
|
||||
/* qmake ignore Q_NAMESPACE */
|
||||
#define Q_NAMESPACE \
|
||||
extern const QMetaObject staticMetaObject; \
|
||||
/* qmake ignore Q_NAMESPACE_EXPORT */
|
||||
#define Q_NAMESPACE_EXPORT(...) \
|
||||
extern __VA_ARGS__ const QMetaObject staticMetaObject; \
|
||||
QT_ANNOTATE_CLASS(qt_qnamespace, "") \
|
||||
/*end*/
|
||||
|
||||
/* qmake ignore Q_NAMESPACE */
|
||||
#define Q_NAMESPACE Q_NAMESPACE_EXPORT() \
|
||||
/*end*/
|
||||
|
||||
#endif // QT_NO_META_MACROS
|
||||
|
||||
#else // Q_MOC_RUN
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user