Device scanner documentation fixes.

This commit is contained in:
Andrius Štikonas 2017-10-02 23:39:11 +01:00
parent f19c6b39f6
commit 2b428f4f4f
1 changed files with 6 additions and 4 deletions

View File

@ -89,10 +89,12 @@ Alternatively, you can use KPMcore device scanner which also finds
LVM Volume Groups.
```
DeviceScanner *deviceScanner = new DeviceScanner(this, operationStack()))
// 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()`.