From f61f8bb966fdc04662fb4e6597698b573fcb8b94 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 17 Nov 2020 13:40:00 +0100 Subject: Replace qt_make_unique with std::make_unique We can depend on C++14 now. Change-Id: Iee9796cd22dbfbb70d4bdb25f0eee1662a026d6d Reviewed-by: Lars Knoll --- src/widgets/kernel/qwidget.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/widgets/kernel/qwidget.cpp') 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 - // 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(); + extra->topextra = std::make_unique(); 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(); + extra = std::make_unique(); 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(cursor); + d->extra->curs = std::make_unique(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(icon); + d->extra->topextra->icon = std::make_unique(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(); + auto ctx = std::make_unique(); ctx->setShareContext(qt_gl_global_share_context()); ctx->setFormat(extra->topextra->window->format()); ctx->setScreen(extra->topextra->window->screen()); -- cgit v1.2.3