summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qwidget.cpp
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/qwidget.cpp
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/qwidget.cpp')
-rw-r--r--src/widgets/kernel/qwidget.cpp12
1 files changed, 5 insertions, 7 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());