[partition] merge with upstream master branch
This commit is contained in:
parent
666ea16303
commit
2e07c28db0
@ -5,64 +5,72 @@ include(GenerateExportHeader)
|
|||||||
find_package( Qt5 REQUIRED DBus )
|
find_package( Qt5 REQUIRED DBus )
|
||||||
find_package( KF5 REQUIRED Config CoreAddons I18n WidgetsAddons )
|
find_package( KF5 REQUIRED Config CoreAddons I18n WidgetsAddons )
|
||||||
|
|
||||||
find_package( KPMcore 3.3 REQUIRED )
|
find_package( KPMcore 3.3 )
|
||||||
|
set_package_properties(
|
||||||
include_directories( ${KPMCORE_INCLUDE_DIR} )
|
KPMcore PROPERTIES
|
||||||
include_directories( ${PROJECT_BINARY_DIR}/src/libcalamaresui )
|
PURPOSE "For partitioning module"
|
||||||
|
|
||||||
add_subdirectory( tests )
|
|
||||||
|
|
||||||
calamares_add_plugin( partition
|
|
||||||
TYPE viewmodule
|
|
||||||
EXPORT_MACRO PLUGINDLLEXPORT_PRO
|
|
||||||
SOURCES
|
|
||||||
core/BootLoaderModel.cpp
|
|
||||||
core/ColorUtils.cpp
|
|
||||||
core/DeviceList.cpp
|
|
||||||
core/DeviceModel.cpp
|
|
||||||
core/KPMHelpers.cpp
|
|
||||||
core/PartitionActions.cpp
|
|
||||||
core/PartitionCoreModule.cpp
|
|
||||||
core/PartitionInfo.cpp
|
|
||||||
core/PartitionIterator.cpp
|
|
||||||
core/PartitionModel.cpp
|
|
||||||
core/PartUtils.cpp
|
|
||||||
gui/BootInfoWidget.cpp
|
|
||||||
gui/ChoicePage.cpp
|
|
||||||
gui/CreatePartitionDialog.cpp
|
|
||||||
gui/DeviceInfoWidget.cpp
|
|
||||||
gui/EditExistingPartitionDialog.cpp
|
|
||||||
gui/EncryptWidget.cpp
|
|
||||||
gui/PartitionPage.cpp
|
|
||||||
gui/PartitionBarsView.cpp
|
|
||||||
gui/PartitionLabelsView.cpp
|
|
||||||
gui/PartitionSizeController.cpp
|
|
||||||
gui/PartitionSplitterWidget.cpp
|
|
||||||
gui/PartitionViewStep.cpp
|
|
||||||
gui/PrettyRadioButton.cpp
|
|
||||||
gui/ScanningDialog.cpp
|
|
||||||
gui/ReplaceWidget.cpp
|
|
||||||
jobs/ClearMountsJob.cpp
|
|
||||||
jobs/ClearTempMountsJob.cpp
|
|
||||||
jobs/CreatePartitionJob.cpp
|
|
||||||
jobs/CreatePartitionTableJob.cpp
|
|
||||||
jobs/DeletePartitionJob.cpp
|
|
||||||
jobs/FillGlobalStorageJob.cpp
|
|
||||||
jobs/FormatPartitionJob.cpp
|
|
||||||
jobs/PartitionJob.cpp
|
|
||||||
jobs/ResizePartitionJob.cpp
|
|
||||||
jobs/SetPartitionFlagsJob.cpp
|
|
||||||
UI
|
|
||||||
gui/ChoicePage.ui
|
|
||||||
gui/CreatePartitionDialog.ui
|
|
||||||
gui/CreatePartitionTableDialog.ui
|
|
||||||
gui/EditExistingPartitionDialog.ui
|
|
||||||
gui/EncryptWidget.ui
|
|
||||||
gui/PartitionPage.ui
|
|
||||||
gui/ReplaceWidget.ui
|
|
||||||
LINK_PRIVATE_LIBRARIES
|
|
||||||
kpmcore
|
|
||||||
calamaresui
|
|
||||||
KF5::CoreAddons
|
|
||||||
SHARED_LIB
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if ( KPMcore_FOUND )
|
||||||
|
include_directories( ${KPMCORE_INCLUDE_DIR} )
|
||||||
|
include_directories( ${PROJECT_BINARY_DIR}/src/libcalamaresui )
|
||||||
|
|
||||||
|
add_subdirectory( tests )
|
||||||
|
|
||||||
|
calamares_add_plugin( partition
|
||||||
|
TYPE viewmodule
|
||||||
|
EXPORT_MACRO PLUGINDLLEXPORT_PRO
|
||||||
|
SOURCES
|
||||||
|
core/BootLoaderModel.cpp
|
||||||
|
core/ColorUtils.cpp
|
||||||
|
core/DeviceList.cpp
|
||||||
|
core/DeviceModel.cpp
|
||||||
|
core/KPMHelpers.cpp
|
||||||
|
core/PartitionActions.cpp
|
||||||
|
core/PartitionCoreModule.cpp
|
||||||
|
core/PartitionInfo.cpp
|
||||||
|
core/PartitionIterator.cpp
|
||||||
|
core/PartitionModel.cpp
|
||||||
|
core/PartUtils.cpp
|
||||||
|
gui/BootInfoWidget.cpp
|
||||||
|
gui/ChoicePage.cpp
|
||||||
|
gui/CreatePartitionDialog.cpp
|
||||||
|
gui/DeviceInfoWidget.cpp
|
||||||
|
gui/EditExistingPartitionDialog.cpp
|
||||||
|
gui/EncryptWidget.cpp
|
||||||
|
gui/PartitionPage.cpp
|
||||||
|
gui/PartitionBarsView.cpp
|
||||||
|
gui/PartitionLabelsView.cpp
|
||||||
|
gui/PartitionSizeController.cpp
|
||||||
|
gui/PartitionSplitterWidget.cpp
|
||||||
|
gui/PartitionViewStep.cpp
|
||||||
|
gui/PrettyRadioButton.cpp
|
||||||
|
gui/ScanningDialog.cpp
|
||||||
|
gui/ReplaceWidget.cpp
|
||||||
|
jobs/ClearMountsJob.cpp
|
||||||
|
jobs/ClearTempMountsJob.cpp
|
||||||
|
jobs/CreatePartitionJob.cpp
|
||||||
|
jobs/CreatePartitionTableJob.cpp
|
||||||
|
jobs/DeletePartitionJob.cpp
|
||||||
|
jobs/FillGlobalStorageJob.cpp
|
||||||
|
jobs/FormatPartitionJob.cpp
|
||||||
|
jobs/PartitionJob.cpp
|
||||||
|
jobs/ResizePartitionJob.cpp
|
||||||
|
jobs/SetPartitionFlagsJob.cpp
|
||||||
|
UI
|
||||||
|
gui/ChoicePage.ui
|
||||||
|
gui/CreatePartitionDialog.ui
|
||||||
|
gui/CreatePartitionTableDialog.ui
|
||||||
|
gui/EditExistingPartitionDialog.ui
|
||||||
|
gui/EncryptWidget.ui
|
||||||
|
gui/PartitionPage.ui
|
||||||
|
gui/ReplaceWidget.ui
|
||||||
|
LINK_PRIVATE_LIBRARIES
|
||||||
|
kpmcore
|
||||||
|
calamaresui
|
||||||
|
KF5::CoreAddons
|
||||||
|
SHARED_LIB
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
calamares_skip_module( "partition (missing suitable KPMcore)" )
|
||||||
|
endif()
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2016, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2016, Teo Mrnjavac <teo@kde.org>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
||||||
*
|
*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014-2017, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2014-2017, Teo Mrnjavac <teo@kde.org>
|
||||||
* Copyright 2017, Adriaan de Groot <groot@kde.org>
|
* Copyright 2017, Adriaan de Groot <groot@kde.org>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2017, Adriaan de Groot <groot@kde.org>
|
* Copyright 2017, Adriaan de Groot <groot@kde.org>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org>
|
||||||
*
|
*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
||||||
*
|
*
|
||||||
@ -340,4 +340,26 @@ isEfiSystem()
|
|||||||
return QDir( "/sys/firmware/efi/efivars" ).exists();
|
return QDir( "/sys/firmware/efi/efivars" ).exists();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
isEfiBootable( const Partition* candidate )
|
||||||
|
{
|
||||||
|
/* If bit 17 is set, old-style Esp flag, it's OK */
|
||||||
|
if ( candidate->activeFlags().testFlag( PartitionTable::FlagEsp ) )
|
||||||
|
return true;
|
||||||
|
|
||||||
|
|
||||||
|
/* Otherwise, if it's a GPT table, Boot (bit 0) is the same as Esp */
|
||||||
|
const PartitionNode* root = candidate;
|
||||||
|
while ( root && !root->isRoot() )
|
||||||
|
root = root->parent();
|
||||||
|
|
||||||
|
// Strange case: no root found, no partition table node?
|
||||||
|
if ( !root )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
const PartitionTable* table = dynamic_cast<const PartitionTable*>( root );
|
||||||
|
return table && ( table->type() == PartitionTable::TableType::gpt ) &&
|
||||||
|
candidate->activeFlags().testFlag( PartitionTable::FlagBoot );
|
||||||
|
}
|
||||||
|
|
||||||
} // nmamespace PartUtils
|
} // nmamespace PartUtils
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
||||||
*
|
*
|
||||||
@ -67,6 +67,11 @@ OsproberEntryList runOsprober( PartitionCoreModule* core );
|
|||||||
*/
|
*/
|
||||||
bool isEfiSystem();
|
bool isEfiSystem();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Is the given @p partition bootable in EFI? Depending on
|
||||||
|
* the partition table layout, this may mean different flags.
|
||||||
|
*/
|
||||||
|
bool isEfiBootable( const Partition* candidate );
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // PARTUTILS_H
|
#endif // PARTUTILS_H
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014-2017, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2014-2017, Teo Mrnjavac <teo@kde.org>
|
||||||
* Copyright 2017, Adriaan de Groot <groot@kde.org>
|
* Copyright 2017, Adriaan de Groot <groot@kde.org>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org>
|
||||||
*
|
*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
||||||
@ -403,9 +403,8 @@ 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:"
|
||||||
for ( const auto item: jobsDebug )
|
<< jobsDebug.join( "\n" );
|
||||||
cDebug() << " .." << item;
|
|
||||||
|
|
||||||
return lst;
|
return lst;
|
||||||
}
|
}
|
||||||
@ -428,9 +427,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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -505,16 +504,7 @@ PartitionCoreModule::scanForEfiSystemPartitions()
|
|||||||
}
|
}
|
||||||
|
|
||||||
QList< Partition* > efiSystemPartitions =
|
QList< Partition* > efiSystemPartitions =
|
||||||
KPMHelpers::findPartitions( devices,
|
KPMHelpers::findPartitions( devices, PartUtils::isEfiBootable );
|
||||||
[]( Partition* partition ) -> bool
|
|
||||||
{
|
|
||||||
if ( partition->activeFlags().testFlag( PartitionTable::FlagEsp ) )
|
|
||||||
{
|
|
||||||
cDebug() << "Found EFI system partition at" << partition->partitionPath();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
} );
|
|
||||||
|
|
||||||
if ( efiSystemPartitions.isEmpty() )
|
if ( efiSystemPartitions.isEmpty() )
|
||||||
cDebug() << "WARNING: system is EFI but no EFI system partitions found.";
|
cDebug() << "WARNING: system is EFI but no EFI system partitions found.";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
*
|
*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
*
|
*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
*
|
*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2017, Adriaan de Groot <groot@kde.org>
|
* Copyright 2017, Adriaan de Groot <groot@kde.org>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
||||||
*
|
*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
||||||
*
|
*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014-2017, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2014-2017, Teo Mrnjavac <teo@kde.org>
|
||||||
* Copyright 2017, Adriaan de Groot <groot@kde.org>
|
* Copyright 2017, Adriaan de Groot <groot@kde.org>
|
||||||
@ -300,6 +300,16 @@ ChoicePage::selectedDevice()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
ChoicePage::hideButtons()
|
||||||
|
{
|
||||||
|
m_eraseButton->hide();
|
||||||
|
m_replaceButton->hide();
|
||||||
|
m_alongsideButton->hide();
|
||||||
|
m_somethingElseButton->hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief ChoicePage::applyDeviceChoice handler for the selected event of the device
|
* @brief ChoicePage::applyDeviceChoice handler for the selected event of the device
|
||||||
* picker. Calls ChoicePage::selectedDevice() to get the current Device*, then
|
* picker. Calls ChoicePage::selectedDevice() to get the current Device*, then
|
||||||
@ -311,7 +321,10 @@ void
|
|||||||
ChoicePage::applyDeviceChoice()
|
ChoicePage::applyDeviceChoice()
|
||||||
{
|
{
|
||||||
if ( !selectedDevice() )
|
if ( !selectedDevice() )
|
||||||
|
{
|
||||||
|
hideButtons();
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ( m_core->isDirty() )
|
if ( m_core->isDirty() )
|
||||||
{
|
{
|
||||||
@ -342,11 +355,14 @@ ChoicePage::continueApplyDeviceChoice()
|
|||||||
// applyDeviceChoice() will be called again momentarily as soon as we handle the
|
// applyDeviceChoice() will be called again momentarily as soon as we handle the
|
||||||
// PartitionCoreModule::reverted signal.
|
// PartitionCoreModule::reverted signal.
|
||||||
if ( !currd )
|
if ( !currd )
|
||||||
|
{
|
||||||
|
hideButtons();
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
updateDeviceStatePreview();
|
updateDeviceStatePreview();
|
||||||
// Preview setup done. Now we show/hide choices as needed.
|
|
||||||
|
|
||||||
|
// Preview setup done. Now we show/hide choices as needed.
|
||||||
setupActions();
|
setupActions();
|
||||||
|
|
||||||
m_lastSelectedDeviceIndex = m_drivesCombo->currentIndex();
|
m_lastSelectedDeviceIndex = m_drivesCombo->currentIndex();
|
||||||
@ -562,7 +578,11 @@ ChoicePage::onLeave()
|
|||||||
{
|
{
|
||||||
if ( m_bootloaderComboBox.isNull() )
|
if ( m_bootloaderComboBox.isNull() )
|
||||||
{
|
{
|
||||||
m_core->setBootLoaderInstallPath( selectedDevice()->deviceNode() );
|
auto d_p = selectedDevice();
|
||||||
|
if ( d_p )
|
||||||
|
m_core->setBootLoaderInstallPath( d_p->deviceNode() );
|
||||||
|
else
|
||||||
|
cDebug() << "WARNING: No device selected for bootloader.";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1156,6 +1176,9 @@ ChoicePage::setupActions()
|
|||||||
else
|
else
|
||||||
m_deviceInfoWidget->setPartitionTableType( PartitionTable::unknownTableType );
|
m_deviceInfoWidget->setPartitionTableType( PartitionTable::unknownTableType );
|
||||||
|
|
||||||
|
// Manual partitioning is always a possibility
|
||||||
|
m_somethingElseButton->show();
|
||||||
|
|
||||||
bool atLeastOneCanBeResized = false;
|
bool atLeastOneCanBeResized = false;
|
||||||
bool atLeastOneCanBeReplaced = false;
|
bool atLeastOneCanBeReplaced = false;
|
||||||
bool atLeastOneIsMounted = false; // Suppress 'erase' if so
|
bool atLeastOneIsMounted = false; // Suppress 'erase' if so
|
||||||
@ -1332,18 +1355,16 @@ ChoicePage::updateNextEnabled()
|
|||||||
{
|
{
|
||||||
bool enabled = false;
|
bool enabled = false;
|
||||||
|
|
||||||
|
auto sm_p = m_beforePartitionBarsView ? m_beforePartitionBarsView->selectionModel() : nullptr;
|
||||||
|
|
||||||
switch ( m_choice )
|
switch ( m_choice )
|
||||||
{
|
{
|
||||||
case NoChoice:
|
case NoChoice:
|
||||||
enabled = false;
|
enabled = false;
|
||||||
break;
|
break;
|
||||||
case Replace:
|
case Replace:
|
||||||
enabled = m_beforePartitionBarsView->selectionModel()->
|
|
||||||
currentIndex().isValid();
|
|
||||||
break;
|
|
||||||
case Alongside:
|
case Alongside:
|
||||||
enabled = m_beforePartitionBarsView->selectionModel()->
|
enabled = sm_p && sm_p->currentIndex().isValid();
|
||||||
currentIndex().isValid();
|
|
||||||
break;
|
break;
|
||||||
case Erase:
|
case Erase:
|
||||||
case Manual:
|
case Manual:
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org>
|
||||||
*
|
*
|
||||||
@ -113,8 +113,12 @@ private:
|
|||||||
void setupChoices();
|
void setupChoices();
|
||||||
QComboBox* createBootloaderComboBox( QWidget* parentButton );
|
QComboBox* createBootloaderComboBox( QWidget* parentButton );
|
||||||
Device* selectedDevice();
|
Device* selectedDevice();
|
||||||
void applyDeviceChoice();
|
|
||||||
void continueApplyDeviceChoice();
|
/* Change the UI depending on the device selected. */
|
||||||
|
void hideButtons(); // Hide everything when no device
|
||||||
|
void applyDeviceChoice(); // Start scanning new device
|
||||||
|
void continueApplyDeviceChoice(); // .. called after scan
|
||||||
|
|
||||||
void updateDeviceStatePreview();
|
void updateDeviceStatePreview();
|
||||||
void updateActionChoicePreview( ChoicePage::Choice choice );
|
void updateActionChoicePreview( ChoicePage::Choice choice );
|
||||||
void setupActions();
|
void setupActions();
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2016, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2016, Teo Mrnjavac <teo@kde.org>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2016, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2016, Teo Mrnjavac <teo@kde.org>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
||||||
*
|
*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
||||||
*
|
*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2016, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2016, Teo Mrnjavac <teo@kde.org>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
*
|
*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2016, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2016, Teo Mrnjavac <teo@kde.org>
|
||||||
*
|
*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2016, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2016, Teo Mrnjavac <teo@kde.org>
|
||||||
*
|
*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
*
|
*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2016, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2016, Teo Mrnjavac <teo@kde.org>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2016, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2016, Teo Mrnjavac <teo@kde.org>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org>
|
||||||
*
|
*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org>
|
||||||
*
|
*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2016, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2016, Teo Mrnjavac <teo@kde.org>
|
||||||
*
|
*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2014-2017, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2014-2017, Teo Mrnjavac <teo@kde.org>
|
||||||
@ -408,7 +408,7 @@ PartitionViewStep::onLeave()
|
|||||||
.arg( *Calamares::Branding::ShortProductName )
|
.arg( *Calamares::Branding::ShortProductName )
|
||||||
.arg( espMountPoint );
|
.arg( espMountPoint );
|
||||||
}
|
}
|
||||||
else if ( esp && !esp->activeFlags().testFlag( PartitionTable::FlagEsp ) )
|
else if ( esp && !PartUtils::isEfiBootable( esp ) )
|
||||||
{
|
{
|
||||||
message = tr( "EFI system partition flag not set" );
|
message = tr( "EFI system partition flag not set" );
|
||||||
description = tr( "An EFI system partition is necessary to start %1."
|
description = tr( "An EFI system partition is necessary to start %1."
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
|
||||||
*
|
*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
|
||||||
*
|
*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
||||||
* Copyright 2017, Adriaan de Groot <groot@kde.org>
|
* Copyright 2017, Adriaan de Groot <groot@kde.org>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
||||||
*
|
*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
||||||
*
|
*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
||||||
*
|
*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
||||||
*
|
*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
||||||
*
|
*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
||||||
@ -73,33 +73,21 @@ 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: " << table;
|
<< ", uncommitted yet:\n" << 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);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
*
|
*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
*
|
*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2016, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2016, Teo Mrnjavac <teo@kde.org>
|
||||||
*
|
*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2016, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2016, Teo Mrnjavac <teo@kde.org>
|
||||||
*
|
*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2017, Adriaan de Groot <groot@kde.org>
|
* Copyright 2017, Adriaan de Groot <groot@kde.org>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user