Revamp Shared Memory Example: Change the used QSharedMemory constructor
Use QSharedMemory(const QNativeIpcKey &key) constructor to port away from the deprecated QSharedMemory(const QString &) constructor. Task-number: QTBUG-108858 Change-Id: I05615100f77f571fe32a3cf627c3df46baaa7f7a Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit 976f30dc5939d887606cc4df33b80f6e9d3563ab)
This commit is contained in:
parent
f39f1bfd9e
commit
cfa2ff60a3
@ -5,6 +5,9 @@
|
||||
|
||||
#include <QBuffer>
|
||||
#include <QFileDialog>
|
||||
#include <QNativeIpcKey>
|
||||
|
||||
using namespace Qt::StringLiterals;
|
||||
|
||||
/*!
|
||||
\class Dialog
|
||||
@ -30,8 +33,9 @@
|
||||
each button.
|
||||
*/
|
||||
//! [0]
|
||||
|
||||
Dialog::Dialog(QWidget *parent)
|
||||
: QDialog(parent), sharedMemory("QSharedMemoryExample")
|
||||
: QDialog(parent), sharedMemory(QNativeIpcKey(u"QSharedMemoryExample"_s))
|
||||
{
|
||||
ui.setupUi(this);
|
||||
connect(ui.loadFromFileButton, &QPushButton::clicked,
|
||||
|
Loading…
x
Reference in New Issue
Block a user