diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-11-17 13:40:00 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-11-23 09:50:21 +0100 |
commit | f61f8bb966fdc04662fb4e6597698b573fcb8b94 (patch) | |
tree | 80871d6271c059376edb205b8aa69d0b4621c9a3 | |
parent | 03ab48657d0486bd0e3754f1447a6fcd05846a5d (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>
-rw-r--r-- | src/corelib/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/corelib/global/global.pri | 1 | ||||
-rw-r--r-- | src/corelib/global/qmemory_p.h | 71 | ||||
-rw-r--r-- | src/corelib/io/qfile.cpp | 6 | ||||
-rw-r--r-- | src/corelib/io/qfiledevice.cpp | 4 | ||||
-rw-r--r-- | src/corelib/io/qurl.cpp | 5 | ||||
-rw-r--r-- | src/corelib/serialization/qjsondocument.cpp | 16 | ||||
-rw-r--r-- | src/corelib/serialization/qxmlstream.cpp | 3 | ||||
-rw-r--r-- | src/network/ssl/qsslsocket_openssl_symbols.cpp | 7 | ||||
-rw-r--r-- | src/platformsupport/input/evdevtablet/qevdevtabletmanager.cpp | 3 | ||||
-rw-r--r-- | src/platformsupport/input/evdevtouch/qevdevtouchmanager.cpp | 3 | ||||
-rw-r--r-- | src/widgets/graphicsview/qgraphicswidget_p.cpp | 8 | ||||
-rw-r--r-- | src/widgets/kernel/qwidget.cpp | 12 | ||||
-rw-r--r-- | src/widgets/kernel/qwidgetrepaintmanager.cpp | 4 | ||||
-rw-r--r-- | src/widgets/widgets/qtoolbox.cpp | 4 | ||||
-rw-r--r-- | tests/benchmarks/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp | 5 |
16 files changed, 30 insertions, 123 deletions
diff --git a/src/corelib/CMakeLists.txt b/src/corelib/CMakeLists.txt index 11b3c220c8..18345a2fde 100644 --- a/src/corelib/CMakeLists.txt +++ b/src/corelib/CMakeLists.txt @@ -43,7 +43,6 @@ qt_internal_add_module(Core global/qlibraryinfo.cpp global/qlibraryinfo.h global/qlogging.cpp global/qlogging.h global/qmalloc.cpp - global/qmemory_p.h # global/qnamespace.h # special case global/qnumeric.cpp global/qnumeric.h global/qnumeric_p.h global/qoperatingsystemversion.cpp global/qoperatingsystemversion.h global/qoperatingsystemversion_p.h diff --git a/src/corelib/global/global.pri b/src/corelib/global/global.pri index 4e9a0a0c8b..5850792bdb 100644 --- a/src/corelib/global/global.pri +++ b/src/corelib/global/global.pri @@ -8,7 +8,6 @@ HEADERS += \ global/qcompilerdetection.h \ global/qcontainerinfo.h \ global/qprocessordetection.h \ - global/qmemory_p.h \ global/qnamespace.h \ global/qendian.h \ global/qendian_p.h \ diff --git a/src/corelib/global/qmemory_p.h b/src/corelib/global/qmemory_p.h deleted file mode 100644 index ac791385bd..0000000000 --- a/src/corelib/global/qmemory_p.h +++ /dev/null @@ -1,71 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2019 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Marc Mutz <marc.mutz@kdab.com> -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the QtCore module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#ifndef QMEMORY_P_H -#define QMEMORY_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include <QtCore/qglobal.h> - -#include <memory> -#include <type_traits> -#include <utility> - -QT_BEGIN_NAMESPACE - -// Like std::make_unique, but less ambitious, so keep as private API, for use in Qt itself: -template <typename T, typename... Args> -typename std::enable_if<!std::is_array<T>::value, std::unique_ptr<T>>::type -qt_make_unique(Args &&...args) -{ - return std::unique_ptr<T>{new T(std::forward<Args>(args)...)}; -} - -QT_END_NAMESPACE - -#endif /* QMEMORY_P_H */ diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp index 36e2b4476a..223745b73c 100644 --- a/src/corelib/io/qfile.cpp +++ b/src/corelib/io/qfile.cpp @@ -55,8 +55,6 @@ # include "qcoreapplication.h" #endif -#include <private/qmemory_p.h> - #ifdef QT_NO_QOBJECT #define tr(X) QString::fromLatin1(X) #endif @@ -87,7 +85,7 @@ QFilePrivate::openExternalFile(int flags, int fd, QFile::FileHandleFlags handleF Q_UNUSED(fd); return false; #else - auto fs = qt_make_unique<QFSFileEngine>(); + auto fs = std::make_unique<QFSFileEngine>(); auto fe = fs.get(); fileEngine = std::move(fs); return fe->open(QIODevice::OpenMode(flags), fd, handleFlags); @@ -102,7 +100,7 @@ QFilePrivate::openExternalFile(int flags, FILE *fh, QFile::FileHandleFlags handl Q_UNUSED(fh); return false; #else - auto fs = qt_make_unique<QFSFileEngine>(); + auto fs = std::make_unique<QFSFileEngine>(); auto fe = fs.get(); fileEngine = std::move(fs); return fe->open(QIODevice::OpenMode(flags), fh, handleFlags); diff --git a/src/corelib/io/qfiledevice.cpp b/src/corelib/io/qfiledevice.cpp index f916071504..58c78108c8 100644 --- a/src/corelib/io/qfiledevice.cpp +++ b/src/corelib/io/qfiledevice.cpp @@ -42,8 +42,6 @@ #include "qfiledevice_p.h" #include "qfsfileengine_p.h" -#include <private/qmemory_p.h> - #ifdef QT_NO_QOBJECT #define tr(X) QString::fromLatin1(X) #endif @@ -66,7 +64,7 @@ QFileDevicePrivate::~QFileDevicePrivate() = default; QAbstractFileEngine *QFileDevicePrivate::engine() const { if (!fileEngine) - fileEngine = qt_make_unique<QFSFileEngine>(); + fileEngine = std::make_unique<QFSFileEngine>(); return fileEngine.get(); } diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index 2b5839923a..b019fe65a9 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -418,7 +418,6 @@ #include "private/qipaddress_p.h" #include "qurlquery.h" #include "private/qdir_p.h" -#include <private/qmemory_p.h> QT_BEGIN_NAMESPACE @@ -617,7 +616,7 @@ inline QUrlPrivate::~QUrlPrivate() std::unique_ptr<QUrlPrivate::Error> QUrlPrivate::cloneError() const { - return error ? qt_make_unique<Error>(*error) : nullptr; + return error ? std::make_unique<Error>(*error) : nullptr; } inline void QUrlPrivate::clearError() @@ -631,7 +630,7 @@ inline void QUrlPrivate::setError(ErrorCode errorCode, const QString &source, in // don't overwrite an error set in a previous section during parsing return; } - error = qt_make_unique<Error>(); + error = std::make_unique<Error>(); error->code = errorCode; error->source = source; error->position = supplement; diff --git a/src/corelib/serialization/qjsondocument.cpp b/src/corelib/serialization/qjsondocument.cpp index 6ef657d50d..6b015d759d 100644 --- a/src/corelib/serialization/qjsondocument.cpp +++ b/src/corelib/serialization/qjsondocument.cpp @@ -52,8 +52,6 @@ #include "qjson_p.h" #include "qdatastream.h" -#include <private/qmemory_p.h> - QT_BEGIN_NAMESPACE /*! \class QJsonDocument @@ -139,7 +137,7 @@ QJsonDocument::QJsonDocument(const QJsonArray &array) \internal */ QJsonDocument::QJsonDocument(const QCborValue &data) - : d(qt_make_unique<QJsonDocumentPrivate>(data)) + : d(std::make_unique<QJsonDocumentPrivate>(data)) { Q_ASSERT(d); } @@ -158,7 +156,7 @@ QJsonDocument::QJsonDocument(const QJsonDocument &other) { if (other.d) { if (!d) - d = qt_make_unique<QJsonDocumentPrivate>(); + d = std::make_unique<QJsonDocumentPrivate>(); d->value = other.d->value; } else { d.reset(); @@ -184,7 +182,7 @@ QJsonDocument &QJsonDocument::operator =(const QJsonDocument &other) if (this != &other) { if (other.d) { if (!d) - d = qt_make_unique<QJsonDocumentPrivate>(); + d = std::make_unique<QJsonDocumentPrivate>(); else d->clearRawData(); d->value = other.d->value; @@ -239,7 +237,7 @@ QJsonDocument QJsonDocument::fromVariant(const QVariant &variant) doc.setArray(QJsonArray::fromVariantList(variant.toList())); break; case QMetaType::QStringList: - doc.d = qt_make_unique<QJsonDocumentPrivate>(); + doc.d = std::make_unique<QJsonDocumentPrivate>(); doc.d->value = QCborArray::fromStringList(variant.toStringList()); break; default: @@ -320,7 +318,7 @@ QJsonDocument QJsonDocument::fromJson(const QByteArray &json, QJsonParseError *e QJsonDocument result; const QCborValue val = parser.parse(error); if (val.isArray() || val.isMap()) { - result.d = qt_make_unique<QJsonDocumentPrivate>(); + result.d = std::make_unique<QJsonDocumentPrivate>(); result.d->value = val; } return result; @@ -405,7 +403,7 @@ QJsonArray QJsonDocument::array() const void QJsonDocument::setObject(const QJsonObject &object) { if (!d) - d = qt_make_unique<QJsonDocumentPrivate>(); + d = std::make_unique<QJsonDocumentPrivate>(); else d->clearRawData(); @@ -420,7 +418,7 @@ void QJsonDocument::setObject(const QJsonObject &object) void QJsonDocument::setArray(const QJsonArray &array) { if (!d) - d = qt_make_unique<QJsonDocumentPrivate>(); + d = std::make_unique<QJsonDocumentPrivate>(); else d->clearRawData(); diff --git a/src/corelib/serialization/qxmlstream.cpp b/src/corelib/serialization/qxmlstream.cpp index e56877082b..769b33931e 100644 --- a/src/corelib/serialization/qxmlstream.cpp +++ b/src/corelib/serialization/qxmlstream.cpp @@ -63,7 +63,6 @@ public: \ { return QString::fromUtf8(sourceText); } \ private: #endif -#include <private/qmemory_p.h> #include <iterator> #include "qxmlstream_p.h" @@ -875,7 +874,7 @@ void QXmlStreamReaderPrivate::parseEntity(const QString &value) if (!entityParser) - entityParser = qt_make_unique<QXmlStreamReaderPrivate>(q); + entityParser = std::make_unique<QXmlStreamReaderPrivate>(q); else entityParser->init(); entityParser->inParseEntity = true; diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp index 9396516670..b9b23a5a0c 100644 --- a/src/network/ssl/qsslsocket_openssl_symbols.cpp +++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp @@ -67,7 +67,6 @@ #if defined(Q_OS_UNIX) #include <QtCore/qdir.h> #endif -#include <QtCore/private/qmemory_p.h> #include <QtCore/private/qduplicatetracker_p.h> #if defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID) #include <link.h> @@ -658,12 +657,12 @@ struct LoadedOpenSsl { static bool tryToLoadOpenSslWin32Library(QLatin1String ssleay32LibName, QLatin1String libeay32LibName, LoadedOpenSsl &result) { - auto ssleay32 = qt_make_unique<QSystemLibrary>(ssleay32LibName); + auto ssleay32 = std::make_unique<QSystemLibrary>(ssleay32LibName); if (!ssleay32->load(false)) { return FALSE; } - auto libeay32 = qt_make_unique<QSystemLibrary>(libeay32LibName); + auto libeay32 = std::make_unique<QSystemLibrary>(libeay32LibName); if (!libeay32->load(false)) { return FALSE; } @@ -700,7 +699,7 @@ struct LoadedOpenSsl { static LoadedOpenSsl loadOpenSsl() { - LoadedOpenSsl result = {qt_make_unique<QLibrary>(), qt_make_unique<QLibrary>()}; + LoadedOpenSsl result = { std::make_unique<QLibrary>(), std::make_unique<QLibrary>() }; # if defined(Q_OS_UNIX) QLibrary * const libssl = result.ssl.get(); diff --git a/src/platformsupport/input/evdevtablet/qevdevtabletmanager.cpp b/src/platformsupport/input/evdevtablet/qevdevtabletmanager.cpp index d9888c5b97..d0da367d2d 100644 --- a/src/platformsupport/input/evdevtablet/qevdevtabletmanager.cpp +++ b/src/platformsupport/input/evdevtablet/qevdevtabletmanager.cpp @@ -48,7 +48,6 @@ #include <QtDeviceDiscoverySupport/private/qdevicediscovery_p.h> #include <private/qguiapplication_p.h> #include <private/qinputdevicemanager_p_p.h> -#include <private/qmemory_p.h> QT_BEGIN_NAMESPACE @@ -96,7 +95,7 @@ QEvdevTabletManager::~QEvdevTabletManager() void QEvdevTabletManager::addDevice(const QString &deviceNode) { qCDebug(qLcEvdevTablet, "Adding device at %ls", qUtf16Printable(deviceNode)); - auto handler = qt_make_unique<QEvdevTabletHandlerThread>(deviceNode, m_spec); + auto handler = std::make_unique<QEvdevTabletHandlerThread>(deviceNode, m_spec); if (handler) { m_activeDevices.add(deviceNode, std::move(handler)); updateDeviceCount(); diff --git a/src/platformsupport/input/evdevtouch/qevdevtouchmanager.cpp b/src/platformsupport/input/evdevtouch/qevdevtouchmanager.cpp index a1226ac66a..b3e90cdca8 100644 --- a/src/platformsupport/input/evdevtouch/qevdevtouchmanager.cpp +++ b/src/platformsupport/input/evdevtouch/qevdevtouchmanager.cpp @@ -48,7 +48,6 @@ #include <QtDeviceDiscoverySupport/private/qdevicediscovery_p.h> #include <private/qguiapplication_p.h> #include <private/qinputdevicemanager_p_p.h> -#include <private/qmemory_p.h> QT_BEGIN_NAMESPACE @@ -96,7 +95,7 @@ QEvdevTouchManager::~QEvdevTouchManager() void QEvdevTouchManager::addDevice(const QString &deviceNode) { qCDebug(qLcEvdevTouch, "evdevtouch: Adding device at %ls", qUtf16Printable(deviceNode)); - auto handler = qt_make_unique<QEvdevTouchScreenHandlerThread>(deviceNode, m_spec); + auto handler = std::make_unique<QEvdevTouchScreenHandlerThread>(deviceNode, m_spec); if (handler) { connect(handler.get(), &QEvdevTouchScreenHandlerThread::touchDeviceRegistered, this, &QEvdevTouchManager::updateInputDeviceCount); m_activeDevices.add(deviceNode, std::move(handler)); diff --git a/src/widgets/graphicsview/qgraphicswidget_p.cpp b/src/widgets/graphicsview/qgraphicswidget_p.cpp index c1a24932fe..0580c6d938 100644 --- a/src/widgets/graphicsview/qgraphicswidget_p.cpp +++ b/src/widgets/graphicsview/qgraphicswidget_p.cpp @@ -51,8 +51,6 @@ #include <QtWidgets/QStyleOptionTitleBar> #include <QtWidgets/QGraphicsSceneMouseEvent> -#include <private/qmemory_p.h> - QT_BEGIN_NAMESPACE void QGraphicsWidgetPrivate::init(QGraphicsItem *parentItem, Qt::WindowFlags wFlags) @@ -121,7 +119,7 @@ QGraphicsWidgetPrivate::~QGraphicsWidgetPrivate() void QGraphicsWidgetPrivate::ensureMargins() const { if (!margins) - margins = qt_make_unique<QMarginsF>(); + margins = std::make_unique<QMarginsF>(); } /*! @@ -133,7 +131,7 @@ void QGraphicsWidgetPrivate::ensureMargins() const void QGraphicsWidgetPrivate::ensureWindowFrameMargins() const { if (!windowFrameMargins) - windowFrameMargins = qt_make_unique<QMarginsF>(); + windowFrameMargins = std::make_unique<QMarginsF>(); } /*! @@ -145,7 +143,7 @@ void QGraphicsWidgetPrivate::ensureWindowFrameMargins() const void QGraphicsWidgetPrivate::ensureWindowData() { if (!windowData) - windowData = qt_make_unique<WindowData>(); + windowData = std::make_unique<WindowData>(); } void QGraphicsWidgetPrivate::setPalette_helper(const QPalette &palette) 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); diff --git a/src/widgets/widgets/qtoolbox.cpp b/src/widgets/widgets/qtoolbox.cpp index cbb25ec159..787554551d 100644 --- a/src/widgets/widgets/qtoolbox.cpp +++ b/src/widgets/widgets/qtoolbox.cpp @@ -52,8 +52,6 @@ #endif #include <qabstractbutton.h> -#include <private/qmemory_p.h> - #include "qframe_p.h" QT_BEGIN_NAMESPACE @@ -349,7 +347,7 @@ int QToolBox::insertItem(int index, QWidget *widget, const QIcon &icon, const QS Q_D(QToolBox); connect(widget, SIGNAL(destroyed(QObject*)), this, SLOT(_q_widgetDestroyed(QObject*))); - auto newPage = qt_make_unique<QToolBoxPrivate::Page>(); + auto newPage = std::make_unique<QToolBoxPrivate::Page>(); auto &c = *newPage; c.widget = widget; c.button = new QToolBoxButton(this); diff --git a/tests/benchmarks/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp b/tests/benchmarks/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp index b0b19471e1..12059b375f 100644 --- a/tests/benchmarks/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp +++ b/tests/benchmarks/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp @@ -28,7 +28,6 @@ #include <QtCore/QtCore> #include <QtTest/QtTest> -#include <QtCore/private/qmemory_p.h> #include <mutex> #if __has_include(<shared_mutex>) #if __cplusplus > 201103L @@ -154,7 +153,7 @@ void testReadOnly() Mutex lock; std::vector<std::unique_ptr<Thread>> threads; for (int i = 0; i < threadCount; ++i) { - auto t = qt_make_unique<Thread>(); + auto t = std::make_unique<Thread>(); t->lock = &lock; threads.push_back(std::move(t)); } @@ -215,7 +214,7 @@ void testWriteOnly() Mutex lock; std::vector<std::unique_ptr<Thread>> threads; for (int i = 0; i < threadCount; ++i) { - auto t = qt_make_unique<Thread>(); + auto t = std::make_unique<Thread>(); t->lock = &lock; threads.push_back(std::move(t)); } |