diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2022-11-11 11:11:22 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2022-11-15 12:27:41 +0100 |
commit | 5a36ee7028b9138639a6c821056d9c69e8092e7f (patch) | |
tree | 49cd09ae7296f4c80fc3c4c4b2e876a8dc8473ae /examples | |
parent | 523496984cf286f69dbbf1f3e19fdb7153adef1b (diff) |
sharedmemory example: Show error string when failing to create shared memory
Change-Id: I27edc27aec742e1e34c060e48810c4cfba096ee8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/corelib/ipc/sharedmemory/dialog.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/corelib/ipc/sharedmemory/dialog.cpp b/examples/corelib/ipc/sharedmemory/dialog.cpp index 67e4f012a3..ac171ef943 100644 --- a/examples/corelib/ipc/sharedmemory/dialog.cpp +++ b/examples/corelib/ipc/sharedmemory/dialog.cpp @@ -89,7 +89,8 @@ void Dialog::loadFromFile() int size = buffer.size(); if (!sharedMemory.create(size)) { - ui.label->setText(tr("Unable to create shared memory segment.")); + ui.label->setText(tr("Unable to create shared memory segment: %1") + .arg(sharedMemory.errorString())); return; } sharedMemory.lock(); |