mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-23 10:22:52 +00:00
partitionmanager: keep references to QByteArray objects in LibPartedDevice::createPartitionTable()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
7c847f3a8f
commit
2854d0dbde
1 changed files with 4 additions and 2 deletions
|
@ -93,7 +93,8 @@ CoreBackendPartitionTable* LibPartedDevice::openPartitionTable()
|
|||
|
||||
bool LibPartedDevice::createPartitionTable(Report& report, const PartitionTable& ptable)
|
||||
{
|
||||
PedDiskType* pedDiskType = ped_disk_type_get(ptable.typeName().toAscii());
|
||||
const QByteArray ptableBytes = ptable.typeName().toAscii();
|
||||
PedDiskType* pedDiskType = ped_disk_type_get(ptableBytes.constData());
|
||||
|
||||
if (pedDiskType == NULL)
|
||||
{
|
||||
|
@ -101,7 +102,8 @@ bool LibPartedDevice::createPartitionTable(Report& report, const PartitionTable&
|
|||
return false;
|
||||
}
|
||||
|
||||
PedDevice* dev = ped_device_get(deviceNode().toAscii());
|
||||
const QByteArray nodeBytes = deviceNode().toAscii();
|
||||
PedDevice* dev = ped_device_get(nodeBytes.constData());
|
||||
|
||||
if (dev == NULL)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue