diff options
| author | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2024-10-07 17:38:05 +0300 |
|---|---|---|
| committer | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2024-10-07 17:44:32 +0300 |
| commit | 183d0101f41fd5a1007708a9416d1f12db31c1cb (patch) | |
| tree | 969a5e91aef3b4c6805331e56c24fa6be8738f6b /src/core/clipboard_qt.cpp | |
| parent | 17e9f29577ea6573c7c348083ff510ee60c7e8cc (diff) | |
| parent | 13381ca9e80578d038835c8a4dc609d75dfdec4c (diff) | |
Merge tag 'v6.2.10-lts' into tqtc/lts-6.2-opensourcev6.2.10-lts-lgpl6.2.10
Qt 6.2.10-lts release
Conflicts solved:
CHROMIUM_VERSION
dependencies.yaml
src/core/web_engine_context.cpp
Change-Id: Ia54316ba0df3488d8e13c8f14fead1d90099519b
Diffstat (limited to 'src/core/clipboard_qt.cpp')
| -rw-r--r-- | src/core/clipboard_qt.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/clipboard_qt.cpp b/src/core/clipboard_qt.cpp index 009235a72..fe56a5db1 100644 --- a/src/core/clipboard_qt.cpp +++ b/src/core/clipboard_qt.cpp @@ -27,6 +27,8 @@ #include <QImageWriter> #include <QMimeData> +#include <memory> + namespace QtWebEngineCore { static void registerMetaTypes() @@ -60,12 +62,12 @@ using namespace QtWebEngineCore; namespace { -QScopedPointer<QMimeData> uncommittedData; +std::unique_ptr<QMimeData> uncommittedData; QMimeData *getUncommittedData() { if (!uncommittedData) uncommittedData.reset(new QMimeData); - return uncommittedData.data(); + return uncommittedData.get(); } } // namespace @@ -104,7 +106,7 @@ void ClipboardQt::WritePortableAndPlatformRepresentations(ui::ClipboardBuffer ty // Commit the accumulated data. if (uncommittedData) - QGuiApplication::clipboard()->setMimeData(uncommittedData.take(), + QGuiApplication::clipboard()->setMimeData(uncommittedData.release(), type == ui::ClipboardBuffer::kCopyPaste ? QClipboard::Clipboard : QClipboard::Selection); |
