Device scanner documentation fixes.
This commit is contained in:
parent
f19c6b39f6
commit
2b428f4f4f
10
README.md
10
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
|
If you want only devices from the loaded backend you can call
|
||||||
|
|
||||||
```
|
```
|
||||||
QList<Device*> devices = backend->scanDevices( excludeReadOnly );
|
QList<Device*> devices = backend->scanDevices( excludeReadOnly );
|
||||||
```
|
```
|
||||||
|
|
||||||
where bool option `excludeReadOnly` specified whether to exclude
|
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.
|
LVM Volume Groups.
|
||||||
|
|
||||||
```
|
```
|
||||||
DeviceScanner *deviceScanner = new DeviceScanner(this, operationStack()))
|
// First create operationStack with another QObject as parent.
|
||||||
deviceScanner->start();
|
OperationStack *operationStack = new OperationStack(parent);
|
||||||
|
DeviceScanner *deviceScanner = new DeviceScanner(parent, *operationStack));
|
||||||
|
deviceScanner->start();
|
||||||
```
|
```
|
||||||
|
|
||||||
The `deviceScanner` scans for the devices in a background thread. After
|
The `deviceScanner` scans for the devices in a background thread. After
|
||||||
scanning is complete `DeviceScanner::finished()` signal will be emitted.
|
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()`.
|
||||||
|
|
Loading…
Reference in New Issue