[partition] Apply coding style
This applies the new(er) style to the whole module, rather than just the files that recently changed.
This commit is contained in:
parent
c4eee7bb11
commit
cf913b87ff
@ -675,7 +675,11 @@ PartitionViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
||||
// because it could take a while. Then when it's done, we can set up the widgets
|
||||
// and remove the spinner.
|
||||
m_future = new QFutureWatcher< void >();
|
||||
connect( m_future, &QFutureWatcher< void >::finished, this, [this] {
|
||||
connect( m_future,
|
||||
&QFutureWatcher< void >::finished,
|
||||
this,
|
||||
[ this ]
|
||||
{
|
||||
continueLoading();
|
||||
this->m_future->deleteLater();
|
||||
this->m_future = nullptr;
|
||||
|
@ -28,9 +28,9 @@
|
||||
static void
|
||||
sortDevices( DeviceModel::DeviceList& l )
|
||||
{
|
||||
std::sort( l.begin(), l.end(), []( const Device* dev1, const Device* dev2 ) {
|
||||
return dev1->deviceNode() < dev2->deviceNode();
|
||||
} );
|
||||
std::sort( l.begin(),
|
||||
l.end(),
|
||||
[]( const Device* dev1, const Device* dev2 ) { return dev1->deviceNode() < dev2->deviceNode(); } );
|
||||
}
|
||||
|
||||
DeviceModel::DeviceModel( QObject* parent )
|
||||
|
@ -262,9 +262,7 @@ PartitionCoreModule::doInit()
|
||||
// Gives ownership of the Device* to the DeviceInfo object
|
||||
auto deviceInfo = new DeviceInfo( device );
|
||||
m_deviceInfos << deviceInfo;
|
||||
cDebug() << Logger::SubEntry
|
||||
<< device->deviceNode()
|
||||
<< device->capacity()
|
||||
cDebug() << Logger::SubEntry << device->deviceNode() << device->capacity()
|
||||
<< Logger::RedactedName( "DevName", device->name() )
|
||||
<< Logger::RedactedName( "DevNamePretty", device->prettyName() );
|
||||
}
|
||||
@ -685,9 +683,8 @@ PartitionCoreModule::lvmPVs() const
|
||||
bool
|
||||
PartitionCoreModule::hasVGwithThisName( const QString& name ) const
|
||||
{
|
||||
auto condition = [name]( DeviceInfo* d ) {
|
||||
return dynamic_cast< LvmDevice* >( d->device.data() ) && d->device.data()->name() == name;
|
||||
};
|
||||
auto condition = [ name ]( DeviceInfo* d )
|
||||
{ return dynamic_cast< LvmDevice* >( d->device.data() ) && d->device.data()->name() == name; };
|
||||
|
||||
return std::find_if( m_deviceInfos.begin(), m_deviceInfos.end(), condition ) != m_deviceInfos.end();
|
||||
}
|
||||
@ -695,7 +692,8 @@ PartitionCoreModule::hasVGwithThisName( const QString& name ) const
|
||||
bool
|
||||
PartitionCoreModule::isInVG( const Partition* partition ) const
|
||||
{
|
||||
auto condition = [partition]( DeviceInfo* d ) {
|
||||
auto condition = [ partition ]( DeviceInfo* d )
|
||||
{
|
||||
LvmDevice* vg = dynamic_cast< LvmDevice* >( d->device.data() );
|
||||
return vg && vg->physicalVolumes().contains( partition );
|
||||
};
|
||||
@ -1089,7 +1087,11 @@ void
|
||||
PartitionCoreModule::asyncRevertDevice( Device* dev, std::function< void() > callback )
|
||||
{
|
||||
QFutureWatcher< void >* watcher = new QFutureWatcher< void >();
|
||||
connect( watcher, &QFutureWatcher< void >::finished, this, [watcher, callback] {
|
||||
connect( watcher,
|
||||
&QFutureWatcher< void >::finished,
|
||||
this,
|
||||
[ watcher, callback ]
|
||||
{
|
||||
callback();
|
||||
watcher->deleteLater();
|
||||
} );
|
||||
|
@ -19,7 +19,8 @@
|
||||
* to bother with one-byte accuracy (and anyway, a double has at least 50 bits
|
||||
* at which point we're printing giga (or gibi) bytes).
|
||||
*/
|
||||
static inline QString formatByteSize( qint64 sizeValue )
|
||||
static inline QString
|
||||
formatByteSize( qint64 sizeValue )
|
||||
{
|
||||
return Capacity::formatByteSize( static_cast< double >( sizeValue ) );
|
||||
}
|
||||
|
@ -176,7 +176,11 @@ ChoicePage::init( PartitionCoreModule* core )
|
||||
|
||||
|
||||
// We need to do this because a PCM revert invalidates the deviceModel.
|
||||
connect( core, &PartitionCoreModule::reverted, this, [=] {
|
||||
connect( core,
|
||||
&PartitionCoreModule::reverted,
|
||||
this,
|
||||
[ = ]
|
||||
{
|
||||
setModelToComboBox( m_drivesCombo, core->deviceModel() );
|
||||
m_drivesCombo->setCurrentIndex( m_lastSelectedDeviceIndex );
|
||||
} );
|
||||
@ -303,7 +307,11 @@ ChoicePage::setupChoices()
|
||||
#else
|
||||
auto buttonSignal = &QButtonGroup::idToggled;
|
||||
#endif
|
||||
connect( m_grp, buttonSignal, this, [this]( int id, bool checked ) {
|
||||
connect( m_grp,
|
||||
buttonSignal,
|
||||
this,
|
||||
[ this ]( int id, bool checked )
|
||||
{
|
||||
if ( checked ) // An action was picked.
|
||||
{
|
||||
m_config->setInstallChoice( id );
|
||||
@ -401,7 +409,9 @@ ChoicePage::applyDeviceChoice()
|
||||
if ( m_core->isDirty() )
|
||||
{
|
||||
ScanningDialog::run(
|
||||
QtConcurrent::run( [=] {
|
||||
QtConcurrent::run(
|
||||
[ = ]
|
||||
{
|
||||
QMutexLocker locker( &m_coreMutex );
|
||||
m_core->revertAllDevices();
|
||||
} ),
|
||||
@ -493,11 +503,14 @@ ChoicePage::applyActionChoice( InstallChoice choice )
|
||||
if ( m_core->isDirty() )
|
||||
{
|
||||
ScanningDialog::run(
|
||||
QtConcurrent::run( [=] {
|
||||
QtConcurrent::run(
|
||||
[ = ]
|
||||
{
|
||||
QMutexLocker locker( &m_coreMutex );
|
||||
m_core->revertDevice( selectedDevice() );
|
||||
} ),
|
||||
[=] {
|
||||
[ = ]
|
||||
{
|
||||
PartitionActions::doAutopartition( m_core, selectedDevice(), options );
|
||||
Q_EMIT deviceChosen();
|
||||
},
|
||||
@ -514,7 +527,9 @@ ChoicePage::applyActionChoice( InstallChoice choice )
|
||||
if ( m_core->isDirty() )
|
||||
{
|
||||
ScanningDialog::run(
|
||||
QtConcurrent::run( [=] {
|
||||
QtConcurrent::run(
|
||||
[ = ]
|
||||
{
|
||||
QMutexLocker locker( &m_coreMutex );
|
||||
m_core->revertDevice( selectedDevice() );
|
||||
} ),
|
||||
@ -532,11 +547,14 @@ ChoicePage::applyActionChoice( InstallChoice choice )
|
||||
if ( m_core->isDirty() )
|
||||
{
|
||||
ScanningDialog::run(
|
||||
QtConcurrent::run( [=] {
|
||||
QtConcurrent::run(
|
||||
[ = ]
|
||||
{
|
||||
QMutexLocker locker( &m_coreMutex );
|
||||
m_core->revertDevice( selectedDevice() );
|
||||
} ),
|
||||
[this] {
|
||||
[ this ]
|
||||
{
|
||||
// We need to reupdate after reverting because the splitter widget is
|
||||
// not a true view.
|
||||
updateActionChoicePreview( m_config->installChoice() );
|
||||
@ -772,7 +790,8 @@ ChoicePage::doReplaceSelectedPartition( const QModelIndex& current )
|
||||
|
||||
ScanningDialog::run(
|
||||
QtConcurrent::run(
|
||||
[this, current, homePartitionPath]( bool doReuseHomePartition ) {
|
||||
[ this, current, homePartitionPath ]( bool doReuseHomePartition )
|
||||
{
|
||||
QMutexLocker locker( &m_coreMutex );
|
||||
|
||||
if ( m_core->isDirty() )
|
||||
@ -853,7 +872,8 @@ ChoicePage::doReplaceSelectedPartition( const QModelIndex& current )
|
||||
}
|
||||
},
|
||||
m_reuseHomeCheckBox->isChecked() ),
|
||||
[this, homePartitionPath] {
|
||||
[ this, homePartitionPath ]
|
||||
{
|
||||
m_reuseHomeCheckBox->setVisible( !homePartitionPath->isEmpty() );
|
||||
if ( !homePartitionPath->isEmpty() )
|
||||
m_reuseHomeCheckBox->setText( tr( "Reuse %1 as home partition for %2." )
|
||||
@ -1006,7 +1026,8 @@ ChoicePage::updateActionChoicePreview( InstallChoice choice )
|
||||
connect( m_afterPartitionSplitterWidget,
|
||||
&PartitionSplitterWidget::partitionResized,
|
||||
this,
|
||||
[this, sizeLabel]( const QString& path, qint64 size, qint64 sizeNext ) {
|
||||
[ this, sizeLabel ]( const QString& path, qint64 size, qint64 sizeNext )
|
||||
{
|
||||
Q_UNUSED( path )
|
||||
sizeLabel->setText(
|
||||
tr( "%1 will be shrunk to %2MiB and a new "
|
||||
@ -1020,7 +1041,8 @@ ChoicePage::updateActionChoicePreview( InstallChoice choice )
|
||||
m_previewAfterFrame->show();
|
||||
m_previewAfterLabel->show();
|
||||
|
||||
SelectionFilter filter = []( const QModelIndex& index ) {
|
||||
SelectionFilter filter = []( const QModelIndex& index )
|
||||
{
|
||||
return PartUtils::canBeResized(
|
||||
static_cast< Partition* >( index.data( PartitionModel::PartitionPtrRole ).value< void* >() ),
|
||||
Logger::Once() );
|
||||
@ -1069,17 +1091,22 @@ ChoicePage::updateActionChoicePreview( InstallChoice choice )
|
||||
eraseBootloaderLabel->setText( tr( "Boot loader location:" ) );
|
||||
|
||||
m_bootloaderComboBox = createBootloaderComboBox( eraseWidget );
|
||||
connect( m_core->bootLoaderModel(), &QAbstractItemModel::modelReset, [this]() {
|
||||
connect( m_core->bootLoaderModel(),
|
||||
&QAbstractItemModel::modelReset,
|
||||
[ this ]()
|
||||
{
|
||||
if ( !m_bootloaderComboBox.isNull() )
|
||||
{
|
||||
Calamares::restoreSelectedBootLoader( *m_bootloaderComboBox, m_core->bootLoaderInstallPath() );
|
||||
Calamares::restoreSelectedBootLoader( *m_bootloaderComboBox,
|
||||
m_core->bootLoaderInstallPath() );
|
||||
}
|
||||
} );
|
||||
connect(
|
||||
m_core,
|
||||
&PartitionCoreModule::deviceReverted,
|
||||
this,
|
||||
[this]( Device* dev ) {
|
||||
[ this ]( Device* dev )
|
||||
{
|
||||
Q_UNUSED( dev )
|
||||
if ( !m_bootloaderComboBox.isNull() )
|
||||
{
|
||||
@ -1110,7 +1137,8 @@ ChoicePage::updateActionChoicePreview( InstallChoice choice )
|
||||
}
|
||||
else
|
||||
{
|
||||
SelectionFilter filter = []( const QModelIndex& index ) {
|
||||
SelectionFilter filter = []( const QModelIndex& index )
|
||||
{
|
||||
return PartUtils::canBeReplaced(
|
||||
static_cast< Partition* >( index.data( PartitionModel::PartitionPtrRole ).value< void* >() ),
|
||||
Logger::Once() );
|
||||
@ -1217,7 +1245,11 @@ ChoicePage::createBootloaderComboBox( QWidget* parent )
|
||||
comboForBootloader->setModel( m_core->bootLoaderModel() );
|
||||
|
||||
// When the chosen bootloader device changes, we update the choice in the PCM
|
||||
connect( comboForBootloader, QOverload< int >::of( &QComboBox::currentIndexChanged ), this, [this]( int newIndex ) {
|
||||
connect( comboForBootloader,
|
||||
QOverload< int >::of( &QComboBox::currentIndexChanged ),
|
||||
this,
|
||||
[ this ]( int newIndex )
|
||||
{
|
||||
QComboBox* bootloaderCombo = qobject_cast< QComboBox* >( sender() );
|
||||
if ( bootloaderCombo )
|
||||
{
|
||||
|
@ -325,7 +325,10 @@ CreatePartitionDialog::updateMountPointUi()
|
||||
void
|
||||
CreatePartitionDialog::checkMountPointSelection()
|
||||
{
|
||||
validateMountPoint( selectedMountPoint( m_ui->mountPointComboBox ), m_usedMountPoints, m_ui->mountPointExplanation, m_ui->buttonBox->button( QDialogButtonBox::Ok ));
|
||||
validateMountPoint( selectedMountPoint( m_ui->mountPointComboBox ),
|
||||
m_usedMountPoints,
|
||||
m_ui->mountPointExplanation,
|
||||
m_ui->buttonBox->button( QDialogButtonBox::Ok ) );
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -69,7 +69,10 @@ EditExistingPartitionDialog::EditExistingPartitionDialog( Device* device,
|
||||
|
||||
replacePartResizerWidget();
|
||||
|
||||
connect( m_ui->formatRadioButton, &QAbstractButton::toggled, [this]( bool doFormat ) {
|
||||
connect( m_ui->formatRadioButton,
|
||||
&QAbstractButton::toggled,
|
||||
[ this ]( bool doFormat )
|
||||
{
|
||||
replacePartResizerWidget();
|
||||
|
||||
m_ui->fileSystemLabel->setEnabled( doFormat );
|
||||
@ -295,5 +298,8 @@ EditExistingPartitionDialog::updateMountPointPicker()
|
||||
void
|
||||
EditExistingPartitionDialog::checkMountPointSelection()
|
||||
{
|
||||
validateMountPoint( selectedMountPoint( m_ui->mountPointComboBox ), m_usedMountPoints, m_ui->mountPointExplanation, m_ui->buttonBox->button( QDialogButtonBox::Ok ));
|
||||
validateMountPoint( selectedMountPoint( m_ui->mountPointComboBox ),
|
||||
m_usedMountPoints,
|
||||
m_ui->mountPointExplanation,
|
||||
m_ui->buttonBox->button( QDialogButtonBox::Ok ) );
|
||||
}
|
||||
|
@ -28,7 +28,8 @@
|
||||
* Since we don't have an oracle that can answer that question,
|
||||
* just pretend every system can do it.
|
||||
*/
|
||||
static inline bool systemSupportsEncryptionAcceptably()
|
||||
static inline bool
|
||||
systemSupportsEncryptionAcceptably()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -54,9 +54,10 @@ PartitionBarsView::PartitionBarsView( QWidget* parent )
|
||||
setSelectionMode( QAbstractItemView::SingleSelection );
|
||||
|
||||
// Debug
|
||||
connect( this, &PartitionBarsView::clicked, this, [=]( const QModelIndex& index ) {
|
||||
cDebug() << "Clicked row" << index.row();
|
||||
} );
|
||||
connect( this,
|
||||
&PartitionBarsView::clicked,
|
||||
this,
|
||||
[ = ]( const QModelIndex& index ) { cDebug() << "Clicked row" << index.row(); } );
|
||||
setMouseTracking( true );
|
||||
}
|
||||
|
||||
@ -410,7 +411,8 @@ PartitionBarsView::setSelectionFilter( std::function< bool( const QModelIndex& )
|
||||
}
|
||||
|
||||
|
||||
QModelIndex PartitionBarsView::moveCursor( CursorAction, Qt::KeyboardModifiers )
|
||||
QModelIndex
|
||||
PartitionBarsView::moveCursor( CursorAction, Qt::KeyboardModifiers )
|
||||
{
|
||||
return QModelIndex();
|
||||
}
|
||||
|
@ -80,7 +80,8 @@ setSelectedMountPoint( QComboBox& combo, const QString& selected )
|
||||
}
|
||||
}
|
||||
|
||||
bool validateMountPoint( const QString& mountPoint, const QStringList& inUse, QLabel* label, QPushButton* button )
|
||||
bool
|
||||
validateMountPoint( const QString& mountPoint, const QStringList& inUse, QLabel* label, QPushButton* button )
|
||||
{
|
||||
QString msg;
|
||||
bool ok = true;
|
||||
|
@ -451,7 +451,9 @@ void
|
||||
PartitionPage::onRevertClicked()
|
||||
{
|
||||
ScanningDialog::run(
|
||||
QtConcurrent::run( [this] {
|
||||
QtConcurrent::run(
|
||||
[ this ]
|
||||
{
|
||||
QMutexLocker locker( &m_revertMutex );
|
||||
|
||||
int oldIndex = m_ui->deviceComboBox->currentIndex();
|
||||
@ -459,7 +461,8 @@ PartitionPage::onRevertClicked()
|
||||
m_ui->deviceComboBox->setCurrentIndex( ( oldIndex < 0 ) ? 0 : oldIndex );
|
||||
updateFromCurrentDevice();
|
||||
} ),
|
||||
[this] {
|
||||
[ this ]
|
||||
{
|
||||
m_lastSelectedBootLoaderIndex = -1;
|
||||
if ( m_ui->bootLoaderComboBox->currentIndex() < 0 )
|
||||
{
|
||||
@ -606,7 +609,8 @@ PartitionPage::updateFromCurrentDevice()
|
||||
m_ui->partitionBarsView->selectionModel(),
|
||||
&QItemSelectionModel::currentChanged,
|
||||
this,
|
||||
[=] {
|
||||
[ = ]
|
||||
{
|
||||
QModelIndex selectedIndex = m_ui->partitionBarsView->selectionModel()->currentIndex();
|
||||
selectedIndex = selectedIndex.sibling( selectedIndex.row(), 0 );
|
||||
m_ui->partitionBarsView->setCurrentIndex( selectedIndex );
|
||||
|
@ -159,7 +159,9 @@ PartitionSplitterWidget::setSplitPartition( const QString& path, qint64 minSize,
|
||||
m_itemToResizePath.clear();
|
||||
}
|
||||
|
||||
PartitionSplitterItem itemToResize = _findItem( m_items, [path]( PartitionSplitterItem& item ) -> bool {
|
||||
PartitionSplitterItem itemToResize = _findItem( m_items,
|
||||
[ path ]( PartitionSplitterItem& item ) -> bool
|
||||
{
|
||||
if ( path == item.itemPath )
|
||||
{
|
||||
item.status = PartitionSplitterItem::Resizing;
|
||||
@ -184,7 +186,9 @@ PartitionSplitterWidget::setSplitPartition( const QString& path, qint64 minSize,
|
||||
|
||||
qint64 newSize = m_itemToResize.size - preferredSize;
|
||||
m_itemToResize.size = preferredSize;
|
||||
int opCount = _eachItem( m_items, [preferredSize]( PartitionSplitterItem& item ) -> bool {
|
||||
int opCount = _eachItem( m_items,
|
||||
[ preferredSize ]( PartitionSplitterItem& item ) -> bool
|
||||
{
|
||||
if ( item.status == PartitionSplitterItem::Resizing )
|
||||
{
|
||||
item.size = preferredSize;
|
||||
@ -358,7 +362,9 @@ PartitionSplitterWidget::mouseMoveEvent( QMouseEvent* event )
|
||||
|
||||
m_itemToResize.size = qRound64( span * percent );
|
||||
m_itemToResizeNext.size -= m_itemToResize.size - oldsize;
|
||||
_eachItem( m_items, [this]( PartitionSplitterItem& item ) -> bool {
|
||||
_eachItem( m_items,
|
||||
[ this ]( PartitionSplitterItem& item ) -> bool
|
||||
{
|
||||
if ( item.status == PartitionSplitterItem::Resizing )
|
||||
{
|
||||
item.size = m_itemToResize.size;
|
||||
|
@ -46,9 +46,10 @@ ReplaceWidget::ReplaceWidget( PartitionCoreModule* core, QComboBox* devicesCombo
|
||||
m_ui->bootStatusLabel->clear();
|
||||
|
||||
updateFromCurrentDevice( devicesComboBox );
|
||||
connect( devicesComboBox, &QComboBox::currentTextChanged, this, [=]( const QString& /* text */ ) {
|
||||
updateFromCurrentDevice( devicesComboBox );
|
||||
} );
|
||||
connect( devicesComboBox,
|
||||
&QComboBox::currentTextChanged,
|
||||
this,
|
||||
[ = ]( const QString& /* text */ ) { updateFromCurrentDevice( devicesComboBox ); } );
|
||||
|
||||
CALAMARES_RETRANSLATE( onPartitionSelected(); );
|
||||
}
|
||||
|
@ -47,7 +47,11 @@ ScanningDialog::run( const QFuture< void >& future,
|
||||
theDialog->show();
|
||||
|
||||
QFutureWatcher< void >* watcher = new QFutureWatcher< void >();
|
||||
connect( watcher, &QFutureWatcher< void >::finished, theDialog, [watcher, theDialog, callback] {
|
||||
connect( watcher,
|
||||
&QFutureWatcher< void >::finished,
|
||||
theDialog,
|
||||
[ watcher, theDialog, callback ]
|
||||
{
|
||||
watcher->deleteLater();
|
||||
theDialog->hide();
|
||||
theDialog->deleteLater();
|
||||
|
@ -45,12 +45,20 @@ VolumeGroupBaseDialog::VolumeGroupBaseDialog( QString& vgName, QVector< const Pa
|
||||
updateOkButton();
|
||||
updateTotalSize();
|
||||
|
||||
connect( ui->pvList, &QListWidget::itemChanged, this, [&]( QListWidgetItem* ) {
|
||||
connect( ui->pvList,
|
||||
&QListWidget::itemChanged,
|
||||
this,
|
||||
[ & ]( QListWidgetItem* )
|
||||
{
|
||||
updateTotalSize();
|
||||
updateOkButton();
|
||||
} );
|
||||
|
||||
connect( ui->peSize, qOverload< int >( &QSpinBox::valueChanged ), this, [&]( int ) {
|
||||
connect( ui->peSize,
|
||||
qOverload< int >( &QSpinBox::valueChanged ),
|
||||
this,
|
||||
[ & ]( int )
|
||||
{
|
||||
updateTotalSectors();
|
||||
updateOkButton();
|
||||
} );
|
||||
|
@ -26,7 +26,9 @@ Calamares::JobResult
|
||||
AutoMountManagementJob::exec()
|
||||
{
|
||||
cVerbose() << "this" << Logger::Pointer( this ) << "value" << Logger::Pointer( m_stored )
|
||||
<< ( m_stored ? "restore" : m_disable ? "disable" : "enable" );
|
||||
<< ( m_stored ? "restore"
|
||||
: m_disable ? "disable"
|
||||
: "enable" );
|
||||
if ( m_stored )
|
||||
{
|
||||
CalamaresUtils::Partition::automountRestore( m_stored );
|
||||
|
@ -157,9 +157,11 @@ getLVMVolumes()
|
||||
QStringList lvscanLines = QString::fromLocal8Bit( process.readAllStandardOutput() ).split( '\n' );
|
||||
// Get the second column (`value(1)`) sinec that is the device name,
|
||||
// remove quoting.
|
||||
std::transform( lvscanLines.begin(), lvscanLines.end(), lvscanLines.begin(), []( const QString& lvscanLine ) {
|
||||
return lvscanLine.simplified().split( ' ' ).value( 1 ).replace( '\'', "" );
|
||||
} );
|
||||
std::transform( lvscanLines.begin(),
|
||||
lvscanLines.end(),
|
||||
lvscanLines.begin(),
|
||||
[]( const QString& lvscanLine )
|
||||
{ return lvscanLine.simplified().split( ' ' ).value( 1 ).replace( '\'', "" ); } );
|
||||
return lvscanLines;
|
||||
}
|
||||
else
|
||||
|
@ -32,9 +32,9 @@ getPartitionsForDevice_other( const QString& deviceName )
|
||||
{
|
||||
QProcess process;
|
||||
process.setProgram( "sh" );
|
||||
process.setArguments(
|
||||
{ "-c",
|
||||
QString( "echo $(awk '{print \"/dev/\"$4}' /proc/partitions | sed -e '/name/d' -e '/^$/d' -e '/[1-9]/!d' | grep %1)" )
|
||||
process.setArguments( { "-c",
|
||||
QString( "echo $(awk '{print \"/dev/\"$4}' /proc/partitions | sed -e '/name/d' -e '/^$/d' "
|
||||
"-e '/[1-9]/!d' | grep %1)" )
|
||||
.arg( deviceName ) } );
|
||||
process.start();
|
||||
process.waitForFinished();
|
||||
|
Loading…
Reference in New Issue
Block a user