summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-11-17 13:40:00 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-11-23 09:50:21 +0100
commitf61f8bb966fdc04662fb4e6597698b573fcb8b94 (patch)
tree80871d6271c059376edb205b8aa69d0b4621c9a3 /src/widgets/kernel
parent03ab48657d0486bd0e3754f1447a6fcd05846a5d (diff)
Replace qt_make_unique with std::make_unique
We can depend on C++14 now. Change-Id: Iee9796cd22dbfbb70d4bdb25f0eee1662a026d6d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/widgets/kernel')
-rw-r--r--src/widgets/kernel/qwidget.cpp12
-rw-r--r--src/widgets/kernel/qwidgetrepaintmanager.cpp4
2 files changed, 6 insertions, 10 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 43c13aa4aa..27d301f3c6 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -113,8 +113,6 @@
#include "qwindowcontainer_p.h"
-#include <private/qmemory_p.h>
-
// widget/widget data creation count
//#define QWIDGET_EXTRA_DEBUG
//#define ALIEN_DEBUG
@@ -1570,7 +1568,7 @@ void QWidgetPrivate::createTLExtra()
if (!extra)
createExtra();
if (!extra->topextra) {
- extra->topextra = qt_make_unique<QTLWExtra>();
+ extra->topextra = std::make_unique<QTLWExtra>();
QTLWExtra* x = extra->topextra.get();
x->backingStore = nullptr;
x->sharedPainter = nullptr;
@@ -1601,7 +1599,7 @@ void QWidgetPrivate::createTLExtra()
void QWidgetPrivate::createExtra()
{
if (!extra) { // if not exists
- extra = qt_make_unique<QWExtra>();
+ extra = std::make_unique<QWExtra>();
extra->glContext = nullptr;
#if QT_CONFIG(graphicsview)
extra->proxyWidget = nullptr;
@@ -4807,7 +4805,7 @@ void QWidget::setCursor(const QCursor &cursor)
|| (d->extra && d->extra->curs))
{
d->createExtra();
- d->extra->curs = qt_make_unique<QCursor>(cursor);
+ d->extra->curs = std::make_unique<QCursor>(cursor);
}
setAttribute(Qt::WA_SetCursor);
d->setCursor_sys(cursor);
@@ -6028,7 +6026,7 @@ void QWidget::setWindowIcon(const QIcon &icon)
d->createTLExtra();
if (!d->extra->topextra->icon)
- d->extra->topextra->icon = qt_make_unique<QIcon>(icon);
+ d->extra->topextra->icon = std::make_unique<QIcon>(icon);
else
*d->extra->topextra->icon = icon;
@@ -11970,7 +11968,7 @@ QOpenGLContext *QWidgetPrivate::shareContext() const
return nullptr;
if (!extra->topextra->shareContext) {
- auto ctx = qt_make_unique<QOpenGLContext>();
+ auto ctx = std::make_unique<QOpenGLContext>();
ctx->setShareContext(qt_gl_global_share_context());
ctx->setFormat(extra->topextra->window->format());
ctx->setScreen(extra->topextra->window->screen());
diff --git a/src/widgets/kernel/qwidgetrepaintmanager.cpp b/src/widgets/kernel/qwidgetrepaintmanager.cpp
index 595f857847..1997f76b1d 100644
--- a/src/widgets/kernel/qwidgetrepaintmanager.cpp
+++ b/src/widgets/kernel/qwidgetrepaintmanager.cpp
@@ -63,8 +63,6 @@
#include <qpa/qplatformbackingstore.h>
-#include <private/qmemory_p.h>
-
QT_BEGIN_NAMESPACE
#ifndef QT_NO_OPENGL
@@ -653,7 +651,7 @@ static void findAllTextureWidgetsRecursively(QWidget *tlw, QWidget *widget)
// textureChildSeen does not take native child widgets into account and that's good.
if (QWidgetPrivate::get(widget)->textureChildSeen) {
QList<QWidget *> nativeChildren;
- auto tl = qt_make_unique<QPlatformTextureList>();
+ auto tl = std::make_unique<QPlatformTextureList>();
// Look for texture widgets (incl. widget itself) from 'widget' down,
// but skip subtrees with a parent of a native child widget.
findTextureWidgetsRecursively(tlw, widget, tl.get(), &nativeChildren);