[partition]: fix cDebug() format

This commit is contained in:
Philip 2017-12-27 10:13:05 -05:00
parent 63f126d98f
commit 138fd82a8c
2 changed files with 20 additions and 7 deletions

View File

@ -403,8 +403,9 @@ PartitionCoreModule::jobs() const
foreach ( auto job, lst ) foreach ( auto job, lst )
jobsDebug.append( job->prettyName() ); jobsDebug.append( job->prettyName() );
cDebug() << "PartitionCodeModule has been asked for jobs. About to return:" cDebug() << "PartitionCodeModule has been asked for jobs. About to return:";
<< jobsDebug.join( "\n" ); for ( const auto item: jobsDebug )
cDebug() << " .." << item;
return lst; return lst;
} }
@ -427,9 +428,9 @@ PartitionCoreModule::dumpQueue() const
cDebug() << "# Queue:"; cDebug() << "# Queue:";
for ( auto info : m_deviceInfos ) for ( auto info : m_deviceInfos )
{ {
cDebug() << "## Device:" << info->device->name(); cDebug() << " .. Device:" << info->device->name();
for ( auto job : info->jobs ) for ( auto job : info->jobs )
cDebug() << "-" << job->prettyName(); cDebug() << " .." << job->prettyName();
} }
} }

View File

@ -73,21 +73,33 @@ CreatePartitionTableJob::exec()
PartitionTable* table = m_device->partitionTable(); PartitionTable* table = m_device->partitionTable();
cDebug() << "Creating new partition table of type" << table->typeName() cDebug() << "Creating new partition table of type" << table->typeName()
<< ", uncommitted yet:\n" << table; << " - Uncommitted yet: " << table;
QProcess lsblk; QProcess lsblk;
lsblk.setProgram( "lsblk" ); lsblk.setProgram( "lsblk" );
lsblk.setProcessChannelMode( QProcess::MergedChannels ); lsblk.setProcessChannelMode( QProcess::MergedChannels );
lsblk.start(); lsblk.start();
lsblk.waitForFinished(); lsblk.waitForFinished();
cDebug() << "lsblk:\n" << lsblk.readAllStandardOutput();
QByteArray byte = lsblk.readAllStandardOutput();
QStringList lines = QString(byte).split(("\n"),QString::SkipEmptyParts);
cDebug() << "CreatePartitionTableJob asked for lsblk output:";
for (const auto line: lines)
cDebug() << " .." << line;
QProcess mount; QProcess mount;
mount.setProgram( "mount" ); mount.setProgram( "mount" );
mount.setProcessChannelMode( QProcess::MergedChannels ); mount.setProcessChannelMode( QProcess::MergedChannels );
mount.start(); mount.start();
mount.waitForFinished(); mount.waitForFinished();
cDebug() << "mount:\n" << mount.readAllStandardOutput();
QByteArray mbyte = mount.readAllStandardOutput();
QStringList mlines = QString(mbyte).split(("\n"),QString::SkipEmptyParts);
cDebug() << "CreatePartitionTableJob asked for mount output:";
for (const auto mline: mlines)
cDebug() << " .." << mline;
CreatePartitionTableOperation op(*m_device, table); CreatePartitionTableOperation op(*m_device, table);
op.setStatus(Operation::StatusRunning); op.setStatus(Operation::StatusRunning);