From 2b428f4f4f4518454bde18309f1f2585a9c244e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Mon, 2 Oct 2017 23:39:11 +0100 Subject: [PATCH] Device scanner documentation fixes. --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 49b81db..91683ea 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ After the backend is initialized you can scan for available devices. If you want only devices from the loaded backend you can call ``` -QList devices = backend->scanDevices( excludeReadOnly ); + QList devices = backend->scanDevices( excludeReadOnly ); ``` where bool option `excludeReadOnly` specified whether to exclude @@ -89,10 +89,12 @@ Alternatively, you can use KPMcore device scanner which also finds LVM Volume Groups. ``` -DeviceScanner *deviceScanner = new DeviceScanner(this, operationStack())) -deviceScanner->start(); + // First create operationStack with another QObject as parent. + OperationStack *operationStack = new OperationStack(parent); + DeviceScanner *deviceScanner = new DeviceScanner(parent, *operationStack)); + deviceScanner->start(); ``` The `deviceScanner` scans for the devices in a background thread. After scanning is complete `DeviceScanner::finished()` signal will be emitted. -Then the devices can accessed using `operationStack().previewDevices()`. +Then the devices can accessed using `operationStack->previewDevices()`.