summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2019-09-23 08:35:49 +0200
committerLiang Qi <liang.qi@qt.io>2019-09-23 08:35:49 +0200
commit6572650641a2f64f0dd4f41b0426bbd3698f6530 (patch)
treeb28400a2983e044dc7911607ff57b27a9c8cd1bc /src
parent60e20abf19f58c34cb3a878636d955993b81cf2e (diff)
parentac5e198db4eea4670a5a4a22fb44eb8a6acc4c47 (diff)
Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts: src/widgets/styles/qstylesheetstyle.cpp Change-Id: If11da7799075cc2d5768da5603c5fc46773c4eae
Diffstat (limited to 'src')
-rw-r--r--src/corelib/kernel/qobject.cpp12
-rw-r--r--src/gui/painting/qpainter.cpp2
-rw-r--r--src/sql/kernel/qsqldatabase.cpp8
-rw-r--r--src/widgets/styles/qstylesheetstyle.cpp5
4 files changed, 18 insertions, 9 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index f62eac61ed..0b396343af 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -4399,22 +4399,18 @@ QDebug operator<<(QDebug dbg, const QObject *o)
\relates QObject
\obsolete
+ In new code, you should prefer the use of the Q_ENUM() macro, which makes the
+ type available also to the meta type system.
+ For instance, QMetaEnum::fromType() will not work with types declared with Q_ENUMS().
+
This macro registers one or several enum types to the meta-object
system.
- For example:
-
- \snippet code/src_corelib_kernel_qobject.cpp 38
-
If you want to register an enum that is declared in another class,
the enum must be fully qualified with the name of the class
defining it. In addition, the class \e defining the enum has to
inherit QObject as well as declare the enum using Q_ENUMS().
- In new code, you should prefer the use of the Q_ENUM() macro, which makes the
- type available also to the meta type system.
- For instance, QMetaEnum::fromType() will not work with types declared with Q_ENUMS().
-
\sa {Qt's Property System}
*/
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index 84b34e390b..3ce54c20be 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -1716,8 +1716,8 @@ void QPainter::restore()
static inline void qt_cleanup_painter_state(QPainterPrivate *d)
{
+ qDeleteAll(d->states);
d->states.clear();
- delete d->state;
d->state = 0;
d->engine = 0;
d->device = 0;
diff --git a/src/sql/kernel/qsqldatabase.cpp b/src/sql/kernel/qsqldatabase.cpp
index 99aa3e96c4..01726d79ef 100644
--- a/src/sql/kernel/qsqldatabase.cpp
+++ b/src/sql/kernel/qsqldatabase.cpp
@@ -881,6 +881,14 @@ bool QSqlDatabase::rollback()
connection name must be passed to addDatabase() at connection
object create time.
+ For the QSQLITE driver, if the database name specified does not
+ exist, then it will create the file for you unless the
+ QSQLITE_OPEN_READONLY option is set.
+
+ Additionally, \a name can be set to \c ":memory:" which will
+ create a temporary database which is only available for the
+ lifetime of the application.
+
For the QOCI (Oracle) driver, the database name is the TNS
Service Name.
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp
index 48d2e268b8..88c6c288e8 100644
--- a/src/widgets/styles/qstylesheetstyle.cpp
+++ b/src/widgets/styles/qstylesheetstyle.cpp
@@ -2735,6 +2735,11 @@ static void updateObjects(const QList<const QObject *>& objects)
if (auto widget = qobject_cast<QWidget*>(const_cast<QObject*>(object))) {
widget->style()->polish(widget);
QCoreApplication::sendEvent(widget, &event);
+ QList<const QObject *> children;
+ children.reserve(widget->children().size() + 1);
+ for (auto child: qAsConst(widget->children()))
+ children.append(child);
+ updateObjects(children);
}
}
}