REUSE: (GPL-3.0-or-later) C++ modules
This commit is contained in:
parent
863a4cc2a4
commit
30a85668b7
@ -1,5 +1,10 @@
|
||||
# Calamares modules
|
||||
|
||||
<!-- SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
|
||||
SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
|
||||
Calamares modules are plugins that provide features like installer pages,
|
||||
batch jobs, etc. An installer page (visible to the user) is called a "view",
|
||||
while other modules are "jobs".
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2017-2020, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2017-2020 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2017-2020, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2017-2020 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -77,7 +78,7 @@ fetch( QString& value, QStringList& selector, int index, const QVariant& v )
|
||||
}
|
||||
const QVariantMap map = v.toMap();
|
||||
const QString& key = selector.at( index );
|
||||
if ( index == selector.length() - 1)
|
||||
if ( index == selector.length() - 1 )
|
||||
{
|
||||
value = map.value( key ).toString();
|
||||
return map.contains( key );
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2017-2018, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2017-2018, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2018, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2016, Kevin Kofler <kevin.kofler@chello.at>
|
||||
* SPDX-FileCopyrightText: 2016 Kevin Kofler <kevin.kofler@chello.at>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,7 +1,8 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2016, Kevin Kofler <kevin.kofler@chello.at>
|
||||
* Copyright 2017, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2016 Kevin Kofler <kevin.kofler@chello.at>
|
||||
* SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,8 +1,9 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014, Teo Mrnjavac <teo@kde.org> (original dummypython code)
|
||||
* Copyright 2016, Kevin Kofler <kevin.kofler@chello.at>
|
||||
* Copyright 2018, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org> (original dummypython code)
|
||||
* SPDX-FileCopyrightText: 2016 Kevin Kofler <kevin.kofler@chello.at>
|
||||
* SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,7 +1,8 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2016, Kevin Kofler <kevin.kofler@chello.at>
|
||||
* Copyright 2017, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2016 Kevin Kofler <kevin.kofler@chello.at>
|
||||
* SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,8 +1,9 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2017-2018, Adriaan de Groot <groot@kde.org>
|
||||
* Copyright 2019, Collabora Ltd <arnaud.ferraris@collabora.com>
|
||||
* SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2019 Collabora Ltd <arnaud.ferraris@collabora.com>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -100,7 +101,7 @@ FinishedPage::setUpRestart()
|
||||
cDebug() << "FinishedPage::setUpRestart(), Quit button"
|
||||
<< "setup=" << FinishedViewStep::modeName( m_mode ) << "command=" << m_restartNowCommand;
|
||||
|
||||
connect( qApp, &QApplication::aboutToQuit, [ this ]() {
|
||||
connect( qApp, &QApplication::aboutToQuit, [this]() {
|
||||
if ( ui->restartCheckBox->isVisible() && ui->restartCheckBox->isChecked() )
|
||||
{
|
||||
cDebug() << "Running restart command" << m_restartNowCommand;
|
||||
|
@ -1,7 +1,8 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2017, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,8 +1,9 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2017, 2019, Adriaan de Groot <groot@kde.org>
|
||||
* Copyright 2019, Collabora Ltd <arnaud.ferraris@collabora.com>
|
||||
* SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2017 2019, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2019 Collabora Ltd <arnaud.ferraris@collabora.com>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,7 +1,8 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2019, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2018, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -26,8 +27,8 @@
|
||||
#include "utils/Units.h"
|
||||
#include "utils/Variant.h"
|
||||
|
||||
#include <QProcess>
|
||||
#include <QDateTime>
|
||||
#include <QProcess>
|
||||
#include <QThread>
|
||||
|
||||
#include <kpmcore/backend/corebackend.h>
|
||||
@ -46,9 +47,7 @@ ResizeFSJob::ResizeFSJob( QObject* parent )
|
||||
}
|
||||
|
||||
|
||||
ResizeFSJob::~ResizeFSJob()
|
||||
{
|
||||
}
|
||||
ResizeFSJob::~ResizeFSJob() {}
|
||||
|
||||
|
||||
QString
|
||||
@ -62,7 +61,8 @@ ResizeFSJob::findPartition()
|
||||
{
|
||||
using DeviceList = QList< Device* >;
|
||||
#if defined( WITH_KPMCORE4API )
|
||||
DeviceList devices = m_kpmcore.backend()->scanDevices( /* not includeReadOnly, not includeLoopback */ ScanFlag(0) );
|
||||
DeviceList devices
|
||||
= m_kpmcore.backend()->scanDevices( /* not includeReadOnly, not includeLoopback */ ScanFlag( 0 ) );
|
||||
#else
|
||||
DeviceList devices = m_kpmcore.backend()->scanDevices( /* excludeReadOnly */ true );
|
||||
#endif
|
||||
@ -70,14 +70,17 @@ ResizeFSJob::findPartition()
|
||||
cDebug() << "ResizeFSJob found" << devices.count() << "devices.";
|
||||
for ( DeviceList::iterator dev_it = devices.begin(); dev_it != devices.end(); ++dev_it )
|
||||
{
|
||||
if ( ! ( *dev_it ) )
|
||||
continue;
|
||||
cDebug() << "ResizeFSJob found" << ( *dev_it )->deviceNode();
|
||||
for ( auto part_it = PartitionIterator::begin( *dev_it ); part_it != PartitionIterator::end( *dev_it ); ++part_it )
|
||||
if ( !( *dev_it ) )
|
||||
{
|
||||
cDebug() << Logger::SubEntry << ( *part_it )->mountPoint() << "on" << ( *part_it )->deviceNode();
|
||||
if ( ( !m_fsname.isEmpty() && ( *part_it )->mountPoint() == m_fsname ) ||
|
||||
( !m_devicename.isEmpty() && ( *part_it )->deviceNode() == m_devicename ) )
|
||||
continue;
|
||||
}
|
||||
cDebug() << "ResizeFSJob found" << ( *dev_it )->deviceNode();
|
||||
for ( auto part_it = PartitionIterator::begin( *dev_it ); part_it != PartitionIterator::end( *dev_it );
|
||||
++part_it )
|
||||
{
|
||||
cDebug() << Logger::SubEntry << ( *part_it )->mountPoint() << "on" << ( *part_it )->deviceNode();
|
||||
if ( ( !m_fsname.isEmpty() && ( *part_it )->mountPoint() == m_fsname )
|
||||
|| ( !m_devicename.isEmpty() && ( *part_it )->deviceNode() == m_devicename ) )
|
||||
{
|
||||
cDebug() << Logger::SubEntry << "matched configuration dev=" << m_devicename << "fs=" << m_fsname;
|
||||
return PartitionMatch( *dev_it, *part_it );
|
||||
@ -101,11 +104,17 @@ qint64
|
||||
ResizeFSJob::findGrownEnd( ResizeFSJob::PartitionMatch m )
|
||||
{
|
||||
if ( !m.first || !m.second )
|
||||
{
|
||||
return -1; // Missing device data
|
||||
}
|
||||
if ( !ResizeOperation::canGrow( m.second ) )
|
||||
{
|
||||
return -1; // Operation is doomed
|
||||
}
|
||||
if ( !m_size.isValid() )
|
||||
{
|
||||
return -1; // Must have a grow-size
|
||||
}
|
||||
|
||||
cDebug() << "Containing device size" << m.first->totalLogical();
|
||||
qint64 last_available = m.first->totalLogical() - 1; // Numbered from 0
|
||||
@ -170,12 +179,11 @@ ResizeFSJob::exec()
|
||||
tr( "Invalid configuration" ),
|
||||
tr( "The file-system resize job has an invalid configuration and will not run." ) );
|
||||
|
||||
if ( !m_kpmcore)
|
||||
if ( !m_kpmcore )
|
||||
{
|
||||
cWarning() << "Could not load KPMCore backend (2).";
|
||||
return Calamares::JobResult::error(
|
||||
tr( "KPMCore not Available" ),
|
||||
tr( "Calamares cannot start KPMCore for the file-system resize job." ) );
|
||||
return Calamares::JobResult::error( tr( "KPMCore not Available" ),
|
||||
tr( "Calamares cannot start KPMCore for the file-system resize job." ) );
|
||||
}
|
||||
m_kpmcore.backend()->initFSSupport(); // Might not be enough, see below
|
||||
|
||||
@ -184,34 +192,32 @@ ResizeFSJob::exec()
|
||||
if ( !m.first || !m.second )
|
||||
return Calamares::JobResult::error(
|
||||
tr( "Resize Failed" ),
|
||||
!m_fsname.isEmpty() ? tr( "The filesystem %1 could not be found in this system, and cannot be resized." ).arg( m_fsname )
|
||||
: tr( "The device %1 could not be found in this system, and cannot be resized." ).arg( m_devicename ) );
|
||||
!m_fsname.isEmpty()
|
||||
? tr( "The filesystem %1 could not be found in this system, and cannot be resized." ).arg( m_fsname )
|
||||
: tr( "The device %1 could not be found in this system, and cannot be resized." ).arg( m_devicename ) );
|
||||
|
||||
m.second->fileSystem().init(); // Initialize support for specific FS
|
||||
if ( !ResizeOperation::canGrow( m.second ) )
|
||||
{
|
||||
cDebug() << "canGrow() returned false.";
|
||||
return Calamares::JobResult::error(
|
||||
tr( "Resize Failed" ),
|
||||
!m_fsname.isEmpty() ? tr( "The filesystem %1 cannot be resized." ).arg( m_fsname )
|
||||
: tr( "The device %1 cannot be resized." ).arg( m_devicename ) );
|
||||
return Calamares::JobResult::error( tr( "Resize Failed" ),
|
||||
!m_fsname.isEmpty()
|
||||
? tr( "The filesystem %1 cannot be resized." ).arg( m_fsname )
|
||||
: tr( "The device %1 cannot be resized." ).arg( m_devicename ) );
|
||||
}
|
||||
|
||||
qint64 new_end = findGrownEnd( m );
|
||||
cDebug() << "Resize from"
|
||||
<< m.second->firstSector() << '-' << m.second->lastSector()
|
||||
<< '(' << m.second->length() << ')'
|
||||
<< "to -" << new_end;
|
||||
cDebug() << "Resize from" << m.second->firstSector() << '-' << m.second->lastSector() << '(' << m.second->length()
|
||||
<< ')' << "to -" << new_end;
|
||||
|
||||
if ( new_end < 0 )
|
||||
return Calamares::JobResult::error(
|
||||
tr( "Resize Failed" ),
|
||||
!m_fsname.isEmpty() ? tr( "The filesystem %1 cannot be resized." ).arg( m_fsname )
|
||||
: tr( "The device %1 cannot be resized." ).arg( m_devicename ) );
|
||||
return Calamares::JobResult::error( tr( "Resize Failed" ),
|
||||
!m_fsname.isEmpty()
|
||||
? tr( "The filesystem %1 cannot be resized." ).arg( m_fsname )
|
||||
: tr( "The device %1 cannot be resized." ).arg( m_devicename ) );
|
||||
if ( new_end == 0 )
|
||||
{
|
||||
cWarning() << "Resize operation on" << m_fsname << m_devicename
|
||||
<< "skipped as not-useful.";
|
||||
cWarning() << "Resize operation on" << m_fsname << m_devicename << "skipped as not-useful.";
|
||||
if ( m_required )
|
||||
return Calamares::JobResult::error(
|
||||
tr( "Resize Failed" ),
|
||||
@ -226,13 +232,13 @@ ResizeFSJob::exec()
|
||||
ResizeOperation op( *m.first, *m.second, m.second->firstSector(), new_end );
|
||||
Report op_report( nullptr );
|
||||
if ( op.execute( op_report ) )
|
||||
{
|
||||
cDebug() << "Resize operation OK.";
|
||||
}
|
||||
else
|
||||
{
|
||||
cDebug() << "Resize failed." << op_report.output();
|
||||
return Calamares::JobResult::error(
|
||||
tr( "Resize Failed" ),
|
||||
op_report.toText() );
|
||||
return Calamares::JobResult::error( tr( "Resize Failed" ), op_report.toText() );
|
||||
}
|
||||
}
|
||||
|
||||
@ -243,8 +249,8 @@ ResizeFSJob::exec()
|
||||
void
|
||||
ResizeFSJob::setConfigurationMap( const QVariantMap& configurationMap )
|
||||
{
|
||||
m_fsname = configurationMap["fs"].toString();
|
||||
m_devicename = configurationMap["dev"].toString();
|
||||
m_fsname = configurationMap[ "fs" ].toString();
|
||||
m_devicename = configurationMap[ "dev" ].toString();
|
||||
|
||||
if ( m_fsname.isEmpty() && m_devicename.isEmpty() )
|
||||
{
|
||||
@ -252,10 +258,10 @@ ResizeFSJob::setConfigurationMap( const QVariantMap& configurationMap )
|
||||
return;
|
||||
}
|
||||
|
||||
m_size = PartitionSize( configurationMap["size"].toString() );
|
||||
m_atleast = PartitionSize( configurationMap["atleast"].toString() );
|
||||
m_size = PartitionSize( configurationMap[ "size" ].toString() );
|
||||
m_atleast = PartitionSize( configurationMap[ "atleast" ].toString() );
|
||||
|
||||
m_required = CalamaresUtils::getBool( configurationMap, "required", false );
|
||||
}
|
||||
|
||||
CALAMARES_PLUGIN_FACTORY_DEFINITION( ResizeFSJobFactory, registerPlugin<ResizeFSJob>(); )
|
||||
CALAMARES_PLUGIN_FACTORY_DEFINITION( ResizeFSJobFactory, registerPlugin< ResizeFSJob >(); )
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2018, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -51,26 +52,13 @@ public:
|
||||
void setConfigurationMap( const QVariantMap& configurationMap ) override;
|
||||
|
||||
/** @brief Is the configuration of this job valid? */
|
||||
bool isValid() const
|
||||
{
|
||||
return ( !m_fsname.isEmpty() || !m_devicename.isEmpty() ) &&
|
||||
m_size.isValid();
|
||||
}
|
||||
bool isValid() const { return ( !m_fsname.isEmpty() || !m_devicename.isEmpty() ) && m_size.isValid(); }
|
||||
|
||||
QString name() const
|
||||
{
|
||||
return m_fsname.isEmpty() ? m_devicename : m_fsname;
|
||||
}
|
||||
QString name() const { return m_fsname.isEmpty() ? m_devicename : m_fsname; }
|
||||
|
||||
PartitionSize size() const
|
||||
{
|
||||
return m_size;
|
||||
}
|
||||
PartitionSize size() const { return m_size; }
|
||||
|
||||
PartitionSize minimumSize() const
|
||||
{
|
||||
return m_atleast;
|
||||
}
|
||||
PartitionSize minimumSize() const { return m_atleast; }
|
||||
|
||||
private:
|
||||
CalamaresUtils::Partition::KPMManager m_kpmcore;
|
||||
@ -80,7 +68,7 @@ private:
|
||||
QString m_devicename;
|
||||
bool m_required;
|
||||
|
||||
using PartitionMatch = QPair<Device*, Partition*>;
|
||||
using PartitionMatch = QPair< Device*, Partition* >;
|
||||
/** @brief Find the configured FS */
|
||||
PartitionMatch findPartition();
|
||||
|
||||
@ -90,4 +78,4 @@ private:
|
||||
|
||||
CALAMARES_PLUGIN_FACTORY_DECLARATION( ResizeFSJobFactory )
|
||||
|
||||
#endif // RESIZEFSJOB_H
|
||||
#endif // RESIZEFSJOB_H
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2017-2018, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -36,20 +37,17 @@ using SizeUnit = CalamaresUtils::Partition::SizeUnit;
|
||||
|
||||
QTEST_GUILESS_MAIN( FSResizerTests )
|
||||
|
||||
FSResizerTests::FSResizerTests()
|
||||
{
|
||||
}
|
||||
FSResizerTests::FSResizerTests() {}
|
||||
|
||||
FSResizerTests::~FSResizerTests()
|
||||
{
|
||||
}
|
||||
FSResizerTests::~FSResizerTests() {}
|
||||
|
||||
void
|
||||
FSResizerTests::initTestCase()
|
||||
{
|
||||
}
|
||||
|
||||
void FSResizerTests::testConfigurationRobust()
|
||||
void
|
||||
FSResizerTests::testConfigurationRobust()
|
||||
{
|
||||
ResizeFSJob j;
|
||||
|
||||
@ -72,7 +70,8 @@ atleast: 600MiB
|
||||
QCOMPARE( j.minimumSize().value(), 0 );
|
||||
}
|
||||
|
||||
void FSResizerTests::testConfigurationValues()
|
||||
void
|
||||
FSResizerTests::testConfigurationValues()
|
||||
{
|
||||
ResizeFSJob j;
|
||||
|
||||
@ -84,7 +83,7 @@ atleast: 600MiB
|
||||
)" );
|
||||
j.setConfigurationMap( CalamaresUtils::yamlMapToVariant( doc0 ) );
|
||||
QVERIFY( !j.name().isEmpty() );
|
||||
QCOMPARE( j.name(), QString("/") );
|
||||
QCOMPARE( j.name(), QString( "/" ) );
|
||||
QCOMPARE( j.size().unit(), SizeUnit::Percent );
|
||||
QCOMPARE( j.minimumSize().unit(), SizeUnit::MiB );
|
||||
QCOMPARE( j.size().value(), 100 );
|
||||
@ -99,7 +98,7 @@ atleast: 127 %
|
||||
)" );
|
||||
j.setConfigurationMap( CalamaresUtils::yamlMapToVariant( doc0 ) );
|
||||
QVERIFY( !j.name().isEmpty() );
|
||||
QCOMPARE( j.name(), QString("/") );
|
||||
QCOMPARE( j.name(), QString( "/" ) );
|
||||
QCOMPARE( j.size().unit(), SizeUnit::MiB );
|
||||
QCOMPARE( j.minimumSize().unit(), SizeUnit::None );
|
||||
QCOMPARE( j.size().value(), 72 );
|
||||
@ -113,7 +112,7 @@ atleast: 127 %
|
||||
)" );
|
||||
j.setConfigurationMap( CalamaresUtils::yamlMapToVariant( doc0 ) );
|
||||
QVERIFY( !j.name().isEmpty() );
|
||||
QCOMPARE( j.name(), QString("/dev/m00") );
|
||||
QCOMPARE( j.name(), QString( "/dev/m00" ) );
|
||||
QCOMPARE( j.size().unit(), SizeUnit::MiB );
|
||||
QCOMPARE( j.minimumSize().unit(), SizeUnit::None );
|
||||
QCOMPARE( j.size().value(), 72 );
|
||||
@ -128,7 +127,7 @@ size: 71MiB
|
||||
)" );
|
||||
j.setConfigurationMap( CalamaresUtils::yamlMapToVariant( doc0 ) );
|
||||
QVERIFY( !j.name().isEmpty() );
|
||||
QCOMPARE( j.name(), QString("/") );
|
||||
QCOMPARE( j.name(), QString( "/" ) );
|
||||
QCOMPARE( j.size().unit(), SizeUnit::MiB );
|
||||
QCOMPARE( j.minimumSize().unit(), SizeUnit::None );
|
||||
QCOMPARE( j.size().value(), 71 );
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2018, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2019, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -123,7 +124,7 @@ hostCPUmatchARM( const QString& s )
|
||||
* silicon. For instance, a list from lscpu-arm.c (Linux kernel)
|
||||
* shows this:
|
||||
*
|
||||
static const struct hw_impl hw_implementer[] = {
|
||||
static const struct hw_impl hw_implementer[] = {
|
||||
{ 0x41, arm_part, "ARM" },
|
||||
{ 0x42, brcm_part, "Broadcom" },
|
||||
{ 0x43, cavium_part, "Cavium" },
|
||||
@ -137,7 +138,7 @@ static const struct hw_impl hw_implementer[] = {
|
||||
{ 0x66, faraday_part, "Faraday" },
|
||||
{ 0x69, intel_part, "Intel" },
|
||||
{ -1, unknown_part, "unknown" },
|
||||
};
|
||||
};
|
||||
*
|
||||
* Since the specific implementor isn't interesting, just
|
||||
* map everything to "ARM".
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2019, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2019, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -63,8 +64,8 @@ HostInfoTests::testHostOS()
|
||||
// This is a lousy test, too: the implementation reads /proc/cpuinfo
|
||||
// and that's the only way we could use, too, to find what the "right"
|
||||
// answer is.
|
||||
QStringList x86cpunames{ QStringLiteral( "Intel" ), QStringLiteral( "AMD" ) };
|
||||
QStringList armcpunames{ QStringLiteral( "ARM" ) };
|
||||
QStringList x86cpunames { QStringLiteral( "Intel" ), QStringLiteral( "AMD" ) };
|
||||
QStringList armcpunames { QStringLiteral( "ARM" ) };
|
||||
const QString cpu = hostCPU();
|
||||
QVERIFY( x86cpunames.contains( cpu ) || armcpunames.contains( cpu ) );
|
||||
|
||||
@ -83,7 +84,7 @@ HostInfoTests::testHostOS()
|
||||
}
|
||||
else
|
||||
{
|
||||
QCOMPARE( cpu, QString( "Unknown CPU modalias '%1'" ).arg(cpumodalias) );
|
||||
QCOMPARE( cpu, QString( "Unknown CPU modalias '%1'" ).arg( cpumodalias ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2019, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -88,8 +89,11 @@ InitcpioJob::setConfigurationMap( const QVariantMap& configurationMap )
|
||||
}
|
||||
else if ( m_kernel == "$uname" )
|
||||
{
|
||||
auto r = CalamaresUtils::System::runCommand(
|
||||
CalamaresUtils::System::RunLocation::RunInHost, { "/bin/uname", "-r" }, QString(), QString(), std::chrono::seconds( 3 ) );
|
||||
auto r = CalamaresUtils::System::runCommand( CalamaresUtils::System::RunLocation::RunInHost,
|
||||
{ "/bin/uname", "-r" },
|
||||
QString(),
|
||||
QString(),
|
||||
std::chrono::seconds( 3 ) );
|
||||
if ( r.getExitCode() == 0 )
|
||||
{
|
||||
m_kernel = r.getOutput();
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2019, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2019, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -31,23 +32,20 @@
|
||||
#include <QStringList>
|
||||
|
||||
extern void fixPermissions( const QDir& d );
|
||||
|
||||
|
||||
QTEST_GUILESS_MAIN( InitcpioTests )
|
||||
|
||||
InitcpioTests::InitcpioTests()
|
||||
{
|
||||
}
|
||||
InitcpioTests::InitcpioTests() {}
|
||||
|
||||
InitcpioTests::~InitcpioTests()
|
||||
{
|
||||
}
|
||||
InitcpioTests::~InitcpioTests() {}
|
||||
|
||||
void
|
||||
InitcpioTests::initTestCase()
|
||||
{
|
||||
}
|
||||
|
||||
void InitcpioTests::testFixPermissions()
|
||||
void
|
||||
InitcpioTests::testFixPermissions()
|
||||
{
|
||||
Logger::setupLogLevel( Logger::LOGDEBUG );
|
||||
cDebug() << "Fixing up /boot";
|
||||
@ -56,4 +54,3 @@ void InitcpioTests::testFixPermissions()
|
||||
fixPermissions( QDir( "/nonexistent/nonexistent" ) );
|
||||
QVERIFY( true );
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2019, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2019, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -78,8 +79,11 @@ InitramfsJob::setConfigurationMap( const QVariantMap& configurationMap )
|
||||
}
|
||||
else if ( m_kernel == "$uname" )
|
||||
{
|
||||
auto r = CalamaresUtils::System::runCommand(
|
||||
CalamaresUtils::System::RunLocation::RunInHost, { "/bin/uname", "-r" }, QString(), QString(), std::chrono::seconds( 3 ) );
|
||||
auto r = CalamaresUtils::System::runCommand( CalamaresUtils::System::RunLocation::RunInHost,
|
||||
{ "/bin/uname", "-r" },
|
||||
QString(),
|
||||
QString(),
|
||||
std::chrono::seconds( 3 ) );
|
||||
if ( r.getExitCode() == 0 )
|
||||
{
|
||||
m_kernel = r.getOutput();
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2019, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2019, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -33,32 +34,30 @@
|
||||
|
||||
QTEST_GUILESS_MAIN( InitramfsTests )
|
||||
|
||||
InitramfsTests::InitramfsTests()
|
||||
{
|
||||
}
|
||||
InitramfsTests::InitramfsTests() {}
|
||||
|
||||
InitramfsTests::~InitramfsTests()
|
||||
{
|
||||
}
|
||||
InitramfsTests::~InitramfsTests() {}
|
||||
|
||||
void
|
||||
InitramfsTests::initTestCase()
|
||||
{
|
||||
Logger::setupLogLevel( Logger::LOGDEBUG );
|
||||
|
||||
(void) new Calamares::JobQueue();
|
||||
(void) new CalamaresUtils::System( true );
|
||||
(void)new Calamares::JobQueue();
|
||||
(void)new CalamaresUtils::System( true );
|
||||
}
|
||||
|
||||
static const char contents[] = "UMASK=0077\n";
|
||||
static const char confFile[] = "/tmp/calamares-safe-umask";
|
||||
|
||||
void InitramfsTests::cleanup()
|
||||
void
|
||||
InitramfsTests::cleanup()
|
||||
{
|
||||
QFile::remove( confFile );
|
||||
}
|
||||
|
||||
void InitramfsTests::testCreateTargetFile()
|
||||
void
|
||||
InitramfsTests::testCreateTargetFile()
|
||||
{
|
||||
static const char short_confFile[] = "/calamares-safe-umask";
|
||||
|
||||
@ -79,8 +78,7 @@ void InitramfsTests::testCreateTargetFile()
|
||||
|
||||
QFileInfo fi( path );
|
||||
QVERIFY( fi.exists() );
|
||||
QCOMPARE( ulong( fi.size() ), sizeof( contents )-1 ); // don't count trailing NUL
|
||||
QCOMPARE( ulong( fi.size() ), sizeof( contents ) - 1 ); // don't count trailing NUL
|
||||
|
||||
QFile::remove( path );
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2019, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,4 +1,7 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2016 David McKinney <mckinney@subgraph.com>
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
PREREQ=""
|
||||
|
||||
|
@ -1,4 +1,7 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2016 David McKinney <mckinney@subgraph.com>
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
PREREQ=""
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -18,14 +19,14 @@
|
||||
|
||||
#include "InteractiveTerminalPage.h"
|
||||
|
||||
#include "viewpages/ViewStep.h"
|
||||
#include "utils/Retranslator.h"
|
||||
#include "utils/CalamaresUtilsGui.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "utils/Retranslator.h"
|
||||
#include "viewpages/ViewStep.h"
|
||||
|
||||
#include <KService>
|
||||
#include <KParts/kde_terminal_interface.h>
|
||||
#include <KParts/ReadOnlyPart>
|
||||
#include <KParts/kde_terminal_interface.h>
|
||||
#include <KService>
|
||||
|
||||
#include <QApplication>
|
||||
#include <QDir>
|
||||
@ -49,17 +50,17 @@ InteractiveTerminalPage::InteractiveTerminalPage( QWidget* parent )
|
||||
void
|
||||
InteractiveTerminalPage::errorKonsoleNotInstalled()
|
||||
{
|
||||
QMessageBox::critical( this,
|
||||
tr( "Konsole not installed"),
|
||||
tr( "Please install KDE Konsole and try again!" ),
|
||||
QMessageBox::Ok );
|
||||
QMessageBox::critical(
|
||||
this, tr( "Konsole not installed" ), tr( "Please install KDE Konsole and try again!" ), QMessageBox::Ok );
|
||||
}
|
||||
|
||||
void
|
||||
InteractiveTerminalPage::onActivate()
|
||||
{
|
||||
if ( m_termHostWidget )
|
||||
{
|
||||
return;
|
||||
}
|
||||
// For whatever reason, instead of simply linking against a library we
|
||||
// need to do a runtime query to KService just to get a sodding terminal
|
||||
// widget.
|
||||
@ -69,14 +70,11 @@ InteractiveTerminalPage::onActivate()
|
||||
// And all of this hoping the Konsole application is installed. If not,
|
||||
// tough cookies.
|
||||
errorKonsoleNotInstalled();
|
||||
return ;
|
||||
return;
|
||||
}
|
||||
|
||||
// Create one instance of konsolepart.
|
||||
KParts::ReadOnlyPart* p =
|
||||
service->createInstance< KParts::ReadOnlyPart >( this,
|
||||
this,
|
||||
{} );
|
||||
KParts::ReadOnlyPart* p = service->createInstance< KParts::ReadOnlyPart >( this, this, {} );
|
||||
if ( !p )
|
||||
{
|
||||
// One more opportunity for the loading operation to fail.
|
||||
@ -100,8 +98,7 @@ InteractiveTerminalPage::onActivate()
|
||||
|
||||
m_termHostWidget = p->widget();
|
||||
m_layout->addWidget( m_termHostWidget );
|
||||
cDebug() << "Part widget ought to be"
|
||||
<< m_termHostWidget->metaObject()->className();
|
||||
cDebug() << "Part widget ought to be" << m_termHostWidget->metaObject()->className();
|
||||
|
||||
t->showShellInDir( QDir::home().path() );
|
||||
t->sendInput( QString( "%1\n" ).arg( m_command ) );
|
||||
@ -112,8 +109,5 @@ void
|
||||
InteractiveTerminalPage::setCommand( const QString& command )
|
||||
{
|
||||
m_command = command;
|
||||
CALAMARES_RETRANSLATE(
|
||||
m_headerLabel->setText( tr( "Executing script: <code>%1</code>" )
|
||||
.arg( m_command ) );
|
||||
)
|
||||
CALAMARES_RETRANSLATE( m_headerLabel->setText( tr( "Executing script: <code>%1</code>" ).arg( m_command ) ); )
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -43,4 +44,4 @@ private:
|
||||
void errorKonsoleNotInstalled();
|
||||
};
|
||||
|
||||
#endif // INTERACTIVETERMINALPAGE_H
|
||||
#endif // INTERACTIVETERMINALPAGE_H
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -24,7 +25,8 @@
|
||||
|
||||
#include <QVariant>
|
||||
|
||||
CALAMARES_PLUGIN_FACTORY_DEFINITION( InteractiveTerminalViewStepFactory, registerPlugin<InteractiveTerminalViewStep>(); )
|
||||
CALAMARES_PLUGIN_FACTORY_DEFINITION( InteractiveTerminalViewStepFactory,
|
||||
registerPlugin< InteractiveTerminalViewStep >(); )
|
||||
|
||||
InteractiveTerminalViewStep::InteractiveTerminalViewStep( QObject* parent )
|
||||
: Calamares::ViewStep( parent )
|
||||
@ -37,7 +39,9 @@ InteractiveTerminalViewStep::InteractiveTerminalViewStep( QObject* parent )
|
||||
InteractiveTerminalViewStep::~InteractiveTerminalViewStep()
|
||||
{
|
||||
if ( m_widget && m_widget->parent() == nullptr )
|
||||
{
|
||||
m_widget->deleteLater();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -102,8 +106,8 @@ InteractiveTerminalViewStep::onActivate()
|
||||
void
|
||||
InteractiveTerminalViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
||||
{
|
||||
if ( configurationMap.contains( "command" ) &&
|
||||
configurationMap.value( "command").type() == QVariant::String )
|
||||
if ( configurationMap.contains( "command" ) && configurationMap.value( "command" ).type() == QVariant::String )
|
||||
{
|
||||
m_widget->setCommand( configurationMap.value( "command" ).toString() );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2017, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -60,4 +61,4 @@ private:
|
||||
|
||||
CALAMARES_PLUGIN_FACTORY_DECLARATION( InteractiveTerminalViewStepFactory )
|
||||
|
||||
#endif // INTERACTIVETERMINALPAGEPLUGIN_H
|
||||
#endif // INTERACTIVETERMINALPAGEPLUGIN_H
|
||||
|
@ -1,7 +1,8 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2019-2020, Adriaan de Groot <groot@kde.org>
|
||||
* Copyright 2020, Camilo Higuita <milo.h@aol.com> *
|
||||
* SPDX-FileCopyrightText: 2019-2020 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2020 Camilo Higuita <milo.h@aol.com> *
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,7 +1,8 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2019-2020, Adriaan de Groot <groot@kde.org>
|
||||
* Copyright 2020, Camilo Higuita <milo.h@aol.com>
|
||||
* SPDX-FileCopyrightText: 2019-2020 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2020 Camilo Higuita <milo.h@aol.com>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,7 +1,8 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2016, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2017, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2016 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2016, Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2016 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,7 +1,9 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2017-2018, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2007 Free Software Foundation, Inc.
|
||||
* SPDX-FileCopyrightText: 2014-2016 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Portions from the Manjaro Installation Framework
|
||||
* by Roland Singer <roland@manjaro.org>
|
||||
|
@ -1,7 +1,9 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2017, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2007 Free Software Foundation, Inc.
|
||||
* SPDX-FileCopyrightText: 2014-2016 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Portions from the Manjaro Installation Framework
|
||||
* by Roland Singer <roland@manjaro.org>
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,7 +1,8 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2017, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,5 +0,0 @@
|
||||
Keyboard layout configuration viewmodule
|
||||
---
|
||||
Requires ckbcomp script.
|
||||
* Debian package console-setup or
|
||||
* Manjaro package keyboardctl https://github.com/manjaro/packages-core/tree/master/keyboardctl
|
@ -1,7 +1,10 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2014, Kevin Kofler <kevin.kofler@chello.at>
|
||||
* SPDX-FileCopyrightText: 2011 Lennart Poettering
|
||||
* SPDX-FileCopyrightText: Kay Sievers
|
||||
* SPDX-FileCopyrightText: 2014-2016 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2014 Kevin Kofler <kevin.kofler@chello.at>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Portions from systemd (localed.c):
|
||||
* Copyright 2011 Lennart Poettering
|
||||
|
@ -1,7 +1,8 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2014, Kevin Kofler <kevin.kofler@chello.at>
|
||||
* SPDX-FileCopyrightText: 2014-2016 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2014 Kevin Kofler <kevin.kofler@chello.at>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
2
src/modules/keyboard/images/restore.png.license
Normal file
2
src/modules/keyboard/images/restore.png.license
Normal file
@ -0,0 +1,2 @@
|
||||
SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
@ -1,3 +1,7 @@
|
||||
# SPDX-FileCopyrightText: 2015 Systemd authors and contributors
|
||||
# SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
#
|
||||
# Copied from systemd-localed
|
||||
#
|
||||
# https://cgit.freedesktop.org/systemd/systemd/log/src/locale/kbd-model-map
|
||||
|
@ -1,7 +1,9 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2019, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2007 Free Software Foundation, Inc.
|
||||
* SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Originally from the Manjaro Installation Framework
|
||||
* by Roland Singer <roland@manjaro.org>
|
||||
@ -43,18 +45,22 @@ static const char XKB_FILE[] = "/usr/share/X11/xkb/rules/base.lst";
|
||||
* or hits end-of-file. Returns true if the section is found. The
|
||||
* @p name must include the "! " section marker as well.
|
||||
*/
|
||||
static bool findSection( QFile& fh, const char* name )
|
||||
static bool
|
||||
findSection( QFile& fh, const char* name )
|
||||
{
|
||||
while ( !fh.atEnd() )
|
||||
{
|
||||
QByteArray line = fh.readLine();
|
||||
if ( line.startsWith( name ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static KeyboardGlobal::ModelsMap parseKeyboardModels( const char* filepath )
|
||||
static KeyboardGlobal::ModelsMap
|
||||
parseKeyboardModels( const char* filepath )
|
||||
{
|
||||
KeyboardGlobal::ModelsMap models;
|
||||
|
||||
@ -75,7 +81,9 @@ static KeyboardGlobal::ModelsMap parseKeyboardModels( const char* filepath )
|
||||
|
||||
// check if we start a new section
|
||||
if ( line.startsWith( '!' ) )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
// here we are in the model section, otherwhise we would continue or break
|
||||
QRegExp rx;
|
||||
@ -88,7 +96,9 @@ static KeyboardGlobal::ModelsMap parseKeyboardModels( const char* filepath )
|
||||
QString model = rx.cap( 1 );
|
||||
|
||||
if ( model == "pc105" )
|
||||
{
|
||||
modelDesc += " - " + QObject::tr( "Default Keyboard Model" );
|
||||
}
|
||||
|
||||
models.insert( modelDesc, model );
|
||||
}
|
||||
@ -98,7 +108,8 @@ static KeyboardGlobal::ModelsMap parseKeyboardModels( const char* filepath )
|
||||
}
|
||||
|
||||
|
||||
KeyboardGlobal::LayoutsMap parseKeyboardLayouts( const char* filepath )
|
||||
KeyboardGlobal::LayoutsMap
|
||||
parseKeyboardLayouts( const char* filepath )
|
||||
{
|
||||
KeyboardGlobal::LayoutsMap layouts;
|
||||
|
||||
@ -120,7 +131,9 @@ KeyboardGlobal::LayoutsMap parseKeyboardLayouts( const char* filepath )
|
||||
QByteArray line = fh.readLine();
|
||||
|
||||
if ( line.startsWith( '!' ) )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
QRegExp rx;
|
||||
rx.setPattern( "^\\s+(\\S+)\\s+(\\w.*)\n$" );
|
||||
@ -147,7 +160,9 @@ KeyboardGlobal::LayoutsMap parseKeyboardLayouts( const char* filepath )
|
||||
QByteArray line = fh.readLine();
|
||||
|
||||
if ( line.startsWith( '!' ) )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
QRegExp rx;
|
||||
rx.setPattern( "^\\s+(\\S+)\\s+(\\S+): (\\w.*)\n$" );
|
||||
@ -176,14 +191,15 @@ KeyboardGlobal::LayoutsMap parseKeyboardLayouts( const char* filepath )
|
||||
}
|
||||
|
||||
|
||||
KeyboardGlobal::LayoutsMap KeyboardGlobal::getKeyboardLayouts()
|
||||
KeyboardGlobal::LayoutsMap
|
||||
KeyboardGlobal::getKeyboardLayouts()
|
||||
{
|
||||
return parseKeyboardLayouts( XKB_FILE );
|
||||
}
|
||||
|
||||
|
||||
KeyboardGlobal::ModelsMap KeyboardGlobal::getKeyboardModels()
|
||||
KeyboardGlobal::ModelsMap
|
||||
KeyboardGlobal::getKeyboardModels()
|
||||
{
|
||||
return parseKeyboardModels( XKB_FILE );
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,9 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2017, 2019, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2007 Free Software Foundation, Inc.
|
||||
* SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2017 2019, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Originally from the Manjaro Installation Framework
|
||||
* by Roland Singer <roland@manjaro.org>
|
||||
@ -24,21 +26,22 @@
|
||||
#ifndef KEYBOARDGLOBAL_H
|
||||
#define KEYBOARDGLOBAL_H
|
||||
|
||||
#include <QString>
|
||||
#include <QFile>
|
||||
#include <QTextStream>
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
#include <QStringList>
|
||||
#include <QList>
|
||||
#include <QFile>
|
||||
#include <QHash>
|
||||
#include <QList>
|
||||
#include <QMap>
|
||||
#include <QRegExp>
|
||||
#include <QDebug>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QTextStream>
|
||||
|
||||
class KeyboardGlobal
|
||||
{
|
||||
public:
|
||||
struct KeyboardInfo {
|
||||
struct KeyboardInfo
|
||||
{
|
||||
QString description;
|
||||
QMap< QString, QString > variants;
|
||||
};
|
||||
@ -50,4 +53,4 @@ public:
|
||||
static ModelsMap getKeyboardModels();
|
||||
};
|
||||
|
||||
#endif // KEYBOARDGLOBAL_H
|
||||
#endif // KEYBOARDGLOBAL_H
|
||||
|
@ -1,7 +1,9 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2018, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2007 Free Software Foundation, Inc.
|
||||
* SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Portions from the Manjaro Installation Framework
|
||||
* by Roland Singer <roland@manjaro.org>
|
||||
@ -33,96 +35,126 @@ KeyBoardPreview::KeyBoardPreview( QWidget* parent )
|
||||
, usable_width( 0 )
|
||||
, key_w( 0 )
|
||||
{
|
||||
setMinimumSize(700, 191);
|
||||
setMinimumSize( 700, 191 );
|
||||
|
||||
// We must set up the font size in pixels to fit the keys
|
||||
lowerFont = QFont("Helvetica", 10, QFont::DemiBold);
|
||||
lowerFont.setPixelSize(16);
|
||||
upperFont = QFont("Helvetica", 8);
|
||||
upperFont.setPixelSize(13);
|
||||
lowerFont = QFont( "Helvetica", 10, QFont::DemiBold );
|
||||
lowerFont.setPixelSize( 16 );
|
||||
upperFont = QFont( "Helvetica", 8 );
|
||||
upperFont.setPixelSize( 13 );
|
||||
|
||||
// Setup keyboard types
|
||||
kbList[KB_104].kb_extended_return = false;
|
||||
kbList[KB_104].keys.append(QList<int>() << 0x29 << 0x2 << 0x3 << 0x4 << 0x5 << 0x6 << 0x7 << 0x8 << 0x9 << 0xa << 0xb << 0xc << 0xd);
|
||||
kbList[KB_104].keys.append(QList<int>() << 0x10 << 0x11 << 0x12 << 0x13 << 0x14 << 0x15 << 0x16 << 0x17 << 0x18 << 0x19 << 0x1a << 0x1b << 0x2b);
|
||||
kbList[KB_104].keys.append(QList<int>() << 0x1e << 0x1f << 0x20 << 0x21 << 0x22 << 0x23 << 0x24 << 0x25 << 0x26 << 0x27 << 0x28);
|
||||
kbList[KB_104].keys.append(QList<int>() << 0x2c << 0x2d << 0x2e << 0x2f << 0x30 << 0x31 << 0x32 << 0x33 << 0x34 << 0x35);
|
||||
kbList[ KB_104 ].kb_extended_return = false;
|
||||
kbList[ KB_104 ].keys.append( QList< int >() << 0x29 << 0x2 << 0x3 << 0x4 << 0x5 << 0x6 << 0x7 << 0x8 << 0x9 << 0xa
|
||||
<< 0xb << 0xc << 0xd );
|
||||
kbList[ KB_104 ].keys.append( QList< int >() << 0x10 << 0x11 << 0x12 << 0x13 << 0x14 << 0x15 << 0x16 << 0x17 << 0x18
|
||||
<< 0x19 << 0x1a << 0x1b << 0x2b );
|
||||
kbList[ KB_104 ].keys.append( QList< int >() << 0x1e << 0x1f << 0x20 << 0x21 << 0x22 << 0x23 << 0x24 << 0x25 << 0x26
|
||||
<< 0x27 << 0x28 );
|
||||
kbList[ KB_104 ].keys.append( QList< int >()
|
||||
<< 0x2c << 0x2d << 0x2e << 0x2f << 0x30 << 0x31 << 0x32 << 0x33 << 0x34 << 0x35 );
|
||||
|
||||
kbList[KB_105].kb_extended_return = true;
|
||||
kbList[KB_105].keys.append(QList<int>() << 0x29 << 0x2 << 0x3 << 0x4 << 0x5 << 0x6 << 0x7 << 0x8 << 0x9 << 0xa << 0xb << 0xc << 0xd);
|
||||
kbList[KB_105].keys.append(QList<int>() << 0x10 << 0x11 << 0x12 << 0x13 << 0x14 << 0x15 << 0x16 << 0x17 << 0x18 << 0x19 << 0x1a << 0x1b);
|
||||
kbList[KB_105].keys.append(QList<int>() << 0x1e << 0x1f << 0x20 << 0x21 << 0x22 << 0x23 << 0x24 << 0x25 << 0x26 << 0x27 << 0x28 << 0x2b);
|
||||
kbList[KB_105].keys.append(QList<int>() << 0x54 << 0x2c << 0x2d << 0x2e << 0x2f << 0x30 << 0x31 << 0x32 << 0x33 << 0x34 << 0x35);
|
||||
kbList[ KB_105 ].kb_extended_return = true;
|
||||
kbList[ KB_105 ].keys.append( QList< int >() << 0x29 << 0x2 << 0x3 << 0x4 << 0x5 << 0x6 << 0x7 << 0x8 << 0x9 << 0xa
|
||||
<< 0xb << 0xc << 0xd );
|
||||
kbList[ KB_105 ].keys.append( QList< int >() << 0x10 << 0x11 << 0x12 << 0x13 << 0x14 << 0x15 << 0x16 << 0x17 << 0x18
|
||||
<< 0x19 << 0x1a << 0x1b );
|
||||
kbList[ KB_105 ].keys.append( QList< int >() << 0x1e << 0x1f << 0x20 << 0x21 << 0x22 << 0x23 << 0x24 << 0x25 << 0x26
|
||||
<< 0x27 << 0x28 << 0x2b );
|
||||
kbList[ KB_105 ].keys.append( QList< int >() << 0x54 << 0x2c << 0x2d << 0x2e << 0x2f << 0x30 << 0x31 << 0x32 << 0x33
|
||||
<< 0x34 << 0x35 );
|
||||
|
||||
kbList[KB_106].kb_extended_return = true;
|
||||
kbList[KB_106].keys.append(QList<int>() << 0x29 << 0x2 << 0x3 << 0x4 << 0x5 << 0x6 << 0x7 << 0x8 << 0x9 << 0xa << 0xb << 0xc << 0xd << 0xe);
|
||||
kbList[KB_106].keys.append(QList<int>() << 0x10 << 0x11 << 0x12 << 0x13 << 0x14 << 0x15 << 0x16 << 0x17 << 0x18 << 0x19 << 0x1a << 0x1b);
|
||||
kbList[KB_106].keys.append(QList<int>() << 0x1e << 0x1f << 0x20 << 0x21 << 0x22 << 0x23 << 0x24 << 0x25 << 0x26 << 0x27 << 0x28 << 0x29);
|
||||
kbList[KB_106].keys.append(QList<int>() << 0x2c << 0x2d << 0x2e << 0x2f << 0x30 << 0x31 << 0x32 << 0x33 << 0x34 << 0x35 << 0x36);
|
||||
kbList[ KB_106 ].kb_extended_return = true;
|
||||
kbList[ KB_106 ].keys.append( QList< int >() << 0x29 << 0x2 << 0x3 << 0x4 << 0x5 << 0x6 << 0x7 << 0x8 << 0x9 << 0xa
|
||||
<< 0xb << 0xc << 0xd << 0xe );
|
||||
kbList[ KB_106 ].keys.append( QList< int >() << 0x10 << 0x11 << 0x12 << 0x13 << 0x14 << 0x15 << 0x16 << 0x17 << 0x18
|
||||
<< 0x19 << 0x1a << 0x1b );
|
||||
kbList[ KB_106 ].keys.append( QList< int >() << 0x1e << 0x1f << 0x20 << 0x21 << 0x22 << 0x23 << 0x24 << 0x25 << 0x26
|
||||
<< 0x27 << 0x28 << 0x29 );
|
||||
kbList[ KB_106 ].keys.append( QList< int >() << 0x2c << 0x2d << 0x2e << 0x2f << 0x30 << 0x31 << 0x32 << 0x33 << 0x34
|
||||
<< 0x35 << 0x36 );
|
||||
|
||||
kb = &kbList[KB_104];
|
||||
kb = &kbList[ KB_104 ];
|
||||
}
|
||||
|
||||
|
||||
|
||||
void KeyBoardPreview::setLayout(QString _layout) {
|
||||
void
|
||||
KeyBoardPreview::setLayout( QString _layout )
|
||||
{
|
||||
layout = _layout;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void KeyBoardPreview::setVariant(QString _variant) {
|
||||
void
|
||||
KeyBoardPreview::setVariant( QString _variant )
|
||||
{
|
||||
variant = _variant;
|
||||
|
||||
if (!loadCodes())
|
||||
if ( !loadCodes() )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
loadInfo();
|
||||
repaint();
|
||||
}
|
||||
|
||||
|
||||
|
||||
//###
|
||||
//### Private
|
||||
//###
|
||||
|
||||
|
||||
|
||||
void KeyBoardPreview::loadInfo() {
|
||||
void
|
||||
KeyBoardPreview::loadInfo()
|
||||
{
|
||||
// kb_104
|
||||
if (layout == "us" || layout == "th")
|
||||
kb = &kbList[KB_104];
|
||||
if ( layout == "us" || layout == "th" )
|
||||
{
|
||||
kb = &kbList[ KB_104 ];
|
||||
}
|
||||
// kb_106
|
||||
else if (layout == "jp")
|
||||
kb = &kbList[KB_106];
|
||||
else if ( layout == "jp" )
|
||||
{
|
||||
kb = &kbList[ KB_106 ];
|
||||
}
|
||||
// most keyboards are 105 key so default to that
|
||||
else
|
||||
kb = &kbList[KB_105];
|
||||
{
|
||||
kb = &kbList[ KB_105 ];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool KeyBoardPreview::loadCodes() {
|
||||
if (layout.isEmpty())
|
||||
bool
|
||||
KeyBoardPreview::loadCodes()
|
||||
{
|
||||
if ( layout.isEmpty() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
QStringList param;
|
||||
param << "-model" << "pc106" << "-layout" << layout << "-compact";
|
||||
if (!variant.isEmpty())
|
||||
param << "-model"
|
||||
<< "pc106"
|
||||
<< "-layout" << layout << "-compact";
|
||||
if ( !variant.isEmpty() )
|
||||
{
|
||||
param << "-variant" << variant;
|
||||
}
|
||||
|
||||
|
||||
QProcess process;
|
||||
process.setEnvironment(QStringList() << "LANG=C" << "LC_MESSAGES=C");
|
||||
process.start("ckbcomp", param);
|
||||
if (!process.waitForStarted())
|
||||
process.setEnvironment( QStringList() << "LANG=C"
|
||||
<< "LC_MESSAGES=C" );
|
||||
process.start( "ckbcomp", param );
|
||||
if ( !process.waitForStarted() )
|
||||
{
|
||||
cWarning() << "ckbcomp not found , keyboard preview disabled";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!process.waitForFinished())
|
||||
if ( !process.waitForFinished() )
|
||||
{
|
||||
cWarning() << "ckbcomp failed, keyboard preview disabled";
|
||||
return false;
|
||||
@ -131,209 +163,247 @@ bool KeyBoardPreview::loadCodes() {
|
||||
// Clear codes
|
||||
codes.clear();
|
||||
|
||||
const QStringList list = QString(process.readAll()).split("\n", SplitSkipEmptyParts);
|
||||
const QStringList list = QString( process.readAll() ).split( "\n", SplitSkipEmptyParts );
|
||||
|
||||
for (const QString &line : list) {
|
||||
if (!line.startsWith("keycode") || !line.contains('='))
|
||||
for ( const QString& line : list )
|
||||
{
|
||||
if ( !line.startsWith( "keycode" ) || !line.contains( '=' ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
QStringList split = line.split('=').at(1).trimmed().split(' ');
|
||||
if (split.size() < 4)
|
||||
QStringList split = line.split( '=' ).at( 1 ).trimmed().split( ' ' );
|
||||
if ( split.size() < 4 )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Code code;
|
||||
code.plain = fromUnicodeString(split.at(0));
|
||||
code.shift = fromUnicodeString(split.at(1));
|
||||
code.ctrl = fromUnicodeString(split.at(2));
|
||||
code.alt = fromUnicodeString(split.at(3));
|
||||
code.plain = fromUnicodeString( split.at( 0 ) );
|
||||
code.shift = fromUnicodeString( split.at( 1 ) );
|
||||
code.ctrl = fromUnicodeString( split.at( 2 ) );
|
||||
code.alt = fromUnicodeString( split.at( 3 ) );
|
||||
|
||||
if (code.ctrl == code.plain)
|
||||
if ( code.ctrl == code.plain )
|
||||
{
|
||||
code.ctrl = "";
|
||||
}
|
||||
|
||||
if (code.alt == code.plain)
|
||||
if ( code.alt == code.plain )
|
||||
{
|
||||
code.alt = "";
|
||||
}
|
||||
|
||||
codes.append(code);
|
||||
codes.append( code );
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
QString KeyBoardPreview::fromUnicodeString(QString raw) {
|
||||
if (raw.startsWith("U+"))
|
||||
return QChar(raw.mid(2).toInt(nullptr, 16));
|
||||
else if (raw.startsWith("+U"))
|
||||
return QChar(raw.mid(3).toInt(nullptr, 16));
|
||||
QString
|
||||
KeyBoardPreview::fromUnicodeString( QString raw )
|
||||
{
|
||||
if ( raw.startsWith( "U+" ) )
|
||||
{
|
||||
return QChar( raw.mid( 2 ).toInt( nullptr, 16 ) );
|
||||
}
|
||||
else if ( raw.startsWith( "+U" ) )
|
||||
{
|
||||
return QChar( raw.mid( 3 ).toInt( nullptr, 16 ) );
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
|
||||
QString KeyBoardPreview::regular_text(int index) {
|
||||
if (index < 0 || index >= codes.size())
|
||||
QString
|
||||
KeyBoardPreview::regular_text( int index )
|
||||
{
|
||||
if ( index < 0 || index >= codes.size() )
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
return codes.at(index - 1).plain;
|
||||
return codes.at( index - 1 ).plain;
|
||||
}
|
||||
|
||||
|
||||
|
||||
QString KeyBoardPreview::shift_text(int index) {
|
||||
if (index < 0 || index >= codes.size())
|
||||
QString
|
||||
KeyBoardPreview::shift_text( int index )
|
||||
{
|
||||
if ( index < 0 || index >= codes.size() )
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
return codes.at(index - 1).shift;
|
||||
return codes.at( index - 1 ).shift;
|
||||
}
|
||||
|
||||
|
||||
|
||||
QString KeyBoardPreview::ctrl_text(int index) {
|
||||
if (index < 0 || index >= codes.size())
|
||||
QString
|
||||
KeyBoardPreview::ctrl_text( int index )
|
||||
{
|
||||
if ( index < 0 || index >= codes.size() )
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
return codes.at(index - 1).ctrl;
|
||||
return codes.at( index - 1 ).ctrl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
QString KeyBoardPreview::alt_text(int index) {
|
||||
if (index < 0 || index >= codes.size())
|
||||
QString
|
||||
KeyBoardPreview::alt_text( int index )
|
||||
{
|
||||
if ( index < 0 || index >= codes.size() )
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
return codes.at(index - 1).alt;
|
||||
return codes.at( index - 1 ).alt;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void KeyBoardPreview::resizeEvent(QResizeEvent *) {
|
||||
void
|
||||
KeyBoardPreview::resizeEvent( QResizeEvent* )
|
||||
{
|
||||
space = 6;
|
||||
usable_width = width()-7;
|
||||
key_w = (usable_width - 14 * space)/15;
|
||||
usable_width = width() - 7;
|
||||
key_w = ( usable_width - 14 * space ) / 15;
|
||||
|
||||
setMaximumHeight(key_w*4 + space*5 + 1);
|
||||
setMaximumHeight( key_w * 4 + space * 5 + 1 );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
KeyBoardPreview::paintEvent( QPaintEvent* event )
|
||||
{
|
||||
QPainter p( this );
|
||||
p.setRenderHint( QPainter::Antialiasing );
|
||||
|
||||
void KeyBoardPreview::paintEvent(QPaintEvent* event) {
|
||||
QPainter p(this);
|
||||
p.setRenderHint(QPainter::Antialiasing);
|
||||
|
||||
p.setBrush(QColor(0xd6, 0xd6, 0xd6));
|
||||
p.drawRect(rect());
|
||||
p.setBrush( QColor( 0xd6, 0xd6, 0xd6 ) );
|
||||
p.drawRect( rect() );
|
||||
|
||||
QPen pen;
|
||||
pen.setWidth(1);
|
||||
pen.setColor(QColor(0x58, 0x58, 0x58));
|
||||
p.setPen(pen);
|
||||
pen.setWidth( 1 );
|
||||
pen.setColor( QColor( 0x58, 0x58, 0x58 ) );
|
||||
p.setPen( pen );
|
||||
|
||||
p.setBrush(QColor(0x58, 0x58, 0x58));
|
||||
p.setBrush( QColor( 0x58, 0x58, 0x58 ) );
|
||||
|
||||
p.setBackgroundMode(Qt::TransparentMode);
|
||||
p.translate(0.5, 0.5);
|
||||
p.setBackgroundMode( Qt::TransparentMode );
|
||||
p.translate( 0.5, 0.5 );
|
||||
|
||||
int rx = 3;
|
||||
int x=6;
|
||||
int y=6;
|
||||
int x = 6;
|
||||
int y = 6;
|
||||
int first_key_w = 0;
|
||||
int remaining_x[] = {0,0,0,0};
|
||||
int remaining_widths[] = {0,0,0,0};
|
||||
int remaining_x[] = { 0, 0, 0, 0 };
|
||||
int remaining_widths[] = { 0, 0, 0, 0 };
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
if (first_key_w > 0) {
|
||||
first_key_w = int(first_key_w * 1.375);
|
||||
for ( int i = 0; i < 4; i++ )
|
||||
{
|
||||
if ( first_key_w > 0 )
|
||||
{
|
||||
first_key_w = int( first_key_w * 1.375 );
|
||||
|
||||
if (kb == &kbList[KB_105] && i == 3)
|
||||
first_key_w = int(key_w * 1.275);
|
||||
if ( kb == &kbList[ KB_105 ] && i == 3 )
|
||||
{
|
||||
first_key_w = int( key_w * 1.275 );
|
||||
}
|
||||
|
||||
p.drawRoundedRect(QRectF(6, y, first_key_w, key_w), rx, rx);
|
||||
p.drawRoundedRect( QRectF( 6, y, first_key_w, key_w ), rx, rx );
|
||||
x = 6 + first_key_w + space;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
first_key_w = key_w;
|
||||
}
|
||||
|
||||
|
||||
bool last_end = ( i == 1 && !kb->kb_extended_return );
|
||||
int rw = usable_width - x;
|
||||
int ii = 0;
|
||||
|
||||
bool last_end = (i==1 && ! kb->kb_extended_return);
|
||||
int rw=usable_width-x;
|
||||
int ii=0;
|
||||
for ( int k : kb->keys.at( i ) )
|
||||
{
|
||||
QRectF rect = QRectF( x, y, key_w, key_w );
|
||||
|
||||
for (int k : kb->keys.at(i)) {
|
||||
QRectF rect = QRectF(x, y, key_w, key_w);
|
||||
if ( ii == kb->keys.at( i ).size() - 1 && last_end )
|
||||
{
|
||||
rect.setWidth( rw );
|
||||
}
|
||||
|
||||
if (ii == kb->keys.at(i).size()-1 && last_end)
|
||||
rect.setWidth(rw);
|
||||
p.drawRoundedRect( rect, rx, rx );
|
||||
|
||||
p.drawRoundedRect(rect, rx, rx);
|
||||
rect.adjust( 5, 1, 0, 0 );
|
||||
|
||||
rect.adjust(5, 1, 0, 0);
|
||||
p.setPen( QColor( 0x9e, 0xde, 0x00 ) );
|
||||
p.setFont( upperFont );
|
||||
p.drawText( rect, Qt::AlignLeft | Qt::AlignTop, shift_text( k ) );
|
||||
|
||||
p.setPen(QColor(0x9e, 0xde, 0x00));
|
||||
p.setFont(upperFont);
|
||||
p.drawText(rect, Qt::AlignLeft | Qt::AlignTop, shift_text(k));
|
||||
rect.setBottom( rect.bottom() - 2.5 );
|
||||
|
||||
rect.setBottom(rect.bottom() - 2.5);
|
||||
|
||||
p.setPen(QColor(0xff, 0xff, 0xff));
|
||||
p.setFont(lowerFont);
|
||||
p.drawText(rect, Qt::AlignLeft | Qt::AlignBottom, regular_text(k));
|
||||
p.setPen( QColor( 0xff, 0xff, 0xff ) );
|
||||
p.setFont( lowerFont );
|
||||
p.drawText( rect, Qt::AlignLeft | Qt::AlignBottom, regular_text( k ) );
|
||||
|
||||
rw = rw - space - key_w;
|
||||
x = x + space + key_w;
|
||||
ii = ii+1;
|
||||
ii = ii + 1;
|
||||
|
||||
p.setPen(pen);
|
||||
p.setPen( pen );
|
||||
}
|
||||
|
||||
|
||||
remaining_x[ i ] = x;
|
||||
remaining_widths[ i ] = rw;
|
||||
|
||||
remaining_x[i] = x;
|
||||
remaining_widths[i] = rw;
|
||||
|
||||
if (i != 1 && i != 2)
|
||||
p.drawRoundedRect(QRectF(x, y, rw, key_w), rx, rx);
|
||||
if ( i != 1 && i != 2 )
|
||||
{
|
||||
p.drawRoundedRect( QRectF( x, y, rw, key_w ), rx, rx );
|
||||
}
|
||||
|
||||
y = y + space + key_w;
|
||||
}
|
||||
|
||||
|
||||
if (kb->kb_extended_return) {
|
||||
rx=rx*2;
|
||||
int x1 = remaining_x[1];
|
||||
int y1 = 6 + key_w*1 + space*1;
|
||||
int w1 = remaining_widths[1];
|
||||
int x2 = remaining_x[2];
|
||||
int y2 = 6 + key_w*2 + space*2;
|
||||
if ( kb->kb_extended_return )
|
||||
{
|
||||
rx = rx * 2;
|
||||
int x1 = remaining_x[ 1 ];
|
||||
int y1 = 6 + key_w * 1 + space * 1;
|
||||
int w1 = remaining_widths[ 1 ];
|
||||
int x2 = remaining_x[ 2 ];
|
||||
int y2 = 6 + key_w * 2 + space * 2;
|
||||
|
||||
// this is some serious crap... but it has to be so
|
||||
// maybe one day keyboards won't look like this...
|
||||
// one can only hope
|
||||
QPainterPath pp;
|
||||
pp.moveTo(x1, y1+rx);
|
||||
pp.arcTo(x1, y1, rx, rx, 180, -90);
|
||||
pp.lineTo(x1+w1-rx, y1);
|
||||
pp.arcTo(x1+w1-rx, y1, rx, rx, 90, -90);
|
||||
pp.lineTo(x1+w1, y2+key_w-rx);
|
||||
pp.arcTo(x1+w1-rx, y2+key_w-rx, rx, rx, 0, -90);
|
||||
pp.lineTo(x2+rx, y2+key_w);
|
||||
pp.arcTo(x2, y2+key_w-rx, rx, rx, -90, -90);
|
||||
pp.lineTo(x2, y1+key_w);
|
||||
pp.lineTo(x1+rx, y1+key_w);
|
||||
pp.arcTo(x1, y1+key_w-rx, rx, rx, -90, -90);
|
||||
pp.moveTo( x1, y1 + rx );
|
||||
pp.arcTo( x1, y1, rx, rx, 180, -90 );
|
||||
pp.lineTo( x1 + w1 - rx, y1 );
|
||||
pp.arcTo( x1 + w1 - rx, y1, rx, rx, 90, -90 );
|
||||
pp.lineTo( x1 + w1, y2 + key_w - rx );
|
||||
pp.arcTo( x1 + w1 - rx, y2 + key_w - rx, rx, rx, 0, -90 );
|
||||
pp.lineTo( x2 + rx, y2 + key_w );
|
||||
pp.arcTo( x2, y2 + key_w - rx, rx, rx, -90, -90 );
|
||||
pp.lineTo( x2, y1 + key_w );
|
||||
pp.lineTo( x1 + rx, y1 + key_w );
|
||||
pp.arcTo( x1, y1 + key_w - rx, rx, rx, -90, -90 );
|
||||
pp.closeSubpath();
|
||||
|
||||
p.drawPath(pp);
|
||||
p.drawPath( pp );
|
||||
}
|
||||
else {
|
||||
x= remaining_x[2];
|
||||
y = 6 + key_w*2 + space*2;
|
||||
p.drawRoundedRect(QRectF(x, y, remaining_widths[2], key_w), rx, rx);
|
||||
else
|
||||
{
|
||||
x = remaining_x[ 2 ];
|
||||
y = 6 + key_w * 2 + space * 2;
|
||||
p.drawRoundedRect( QRectF( x, y, remaining_widths[ 2 ], key_w ), rx, rx );
|
||||
}
|
||||
|
||||
|
||||
QWidget::paintEvent(event);
|
||||
QWidget::paintEvent( event );
|
||||
}
|
||||
|
@ -1,6 +1,8 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2007 Free Software Foundation, Inc.
|
||||
* SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Portions from the Manjaro Installation Framework
|
||||
* by Roland Singer <roland@manjaro.org>
|
||||
@ -23,17 +25,17 @@
|
||||
#ifndef KEYBOARDPREVIEW_H
|
||||
#define KEYBOARDPREVIEW_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QRectF>
|
||||
#include <QColor>
|
||||
#include <QFont>
|
||||
#include <QPainter>
|
||||
#include <QPen>
|
||||
#include <QPainterPath>
|
||||
#include <QColor>
|
||||
#include <QPen>
|
||||
#include <QPixmap>
|
||||
#include <QProcess>
|
||||
#include <QRectF>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QWidget>
|
||||
|
||||
|
||||
class KeyBoardPreview : public QWidget
|
||||
@ -41,40 +43,46 @@ class KeyBoardPreview : public QWidget
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit KeyBoardPreview( QWidget* parent = nullptr );
|
||||
|
||||
void setLayout(QString layout);
|
||||
void setVariant(QString variant);
|
||||
|
||||
void setLayout( QString layout );
|
||||
void setVariant( QString variant );
|
||||
|
||||
private:
|
||||
enum KB_TYPE { KB_104, KB_105, KB_106 };
|
||||
|
||||
struct KB {
|
||||
bool kb_extended_return;
|
||||
QList<QList<int> > keys;
|
||||
enum KB_TYPE
|
||||
{
|
||||
KB_104,
|
||||
KB_105,
|
||||
KB_106
|
||||
};
|
||||
|
||||
struct Code {
|
||||
struct KB
|
||||
{
|
||||
bool kb_extended_return;
|
||||
QList< QList< int > > keys;
|
||||
};
|
||||
|
||||
struct Code
|
||||
{
|
||||
QString plain, shift, ctrl, alt;
|
||||
};
|
||||
|
||||
QString layout, variant;
|
||||
QFont lowerFont, upperFont;
|
||||
KB* kb, kbList[3];
|
||||
QList<Code> codes;
|
||||
KB *kb, kbList[ 3 ];
|
||||
QList< Code > codes;
|
||||
int space, usable_width, key_w;
|
||||
|
||||
void loadInfo();
|
||||
bool loadCodes();
|
||||
QString regular_text(int index);
|
||||
QString shift_text(int index);
|
||||
QString ctrl_text(int index);
|
||||
QString alt_text(int index);
|
||||
QString fromUnicodeString(QString raw);
|
||||
QString regular_text( int index );
|
||||
QString shift_text( int index );
|
||||
QString ctrl_text( int index );
|
||||
QString alt_text( int index );
|
||||
QString fromUnicodeString( QString raw );
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent* event);
|
||||
void resizeEvent(QResizeEvent* event);
|
||||
|
||||
void paintEvent( QPaintEvent* event );
|
||||
void resizeEvent( QResizeEvent* event );
|
||||
};
|
||||
|
||||
#endif // KEYBOARDPREVIEW_H
|
||||
#endif // KEYBOARDPREVIEW_H
|
||||
|
@ -1,7 +1,8 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2020, Camilo Higuita <milo.h@aol.com>
|
||||
* SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2020 Camilo Higuita <milo.h@aol.com>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,7 +1,8 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2017, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,9 +1,10 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2015, Anke Boersma <demm@kaosx.us>
|
||||
* Copyright 2015, Alexandre Arnt <qtgzmanager@gmail.com>
|
||||
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2018, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2015 Anke Boersma <demm@kaosx.us>
|
||||
* SPDX-FileCopyrightText: 2015 Alexandre Arnt <qtgzmanager@gmail.com>
|
||||
* SPDX-FileCopyrightText: 2015 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,9 +1,10 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2015, Anke Boersma <demm@kaosx.us>
|
||||
* Copyright 2015, Alexandre Arnt <qtgzmanager@gmail.com>
|
||||
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2018, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2015 Anke Boersma <demm@kaosx.us>
|
||||
* SPDX-FileCopyrightText: 2015 Alexandre Arnt <qtgzmanager@gmail.com>
|
||||
* SPDX-FileCopyrightText: 2015 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,7 +1,8 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2015, Anke Boersma <demm@kaosx.us>
|
||||
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2015 Anke Boersma <demm@kaosx.us>
|
||||
* SPDX-FileCopyrightText: 2015 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,7 +1,8 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2015, Anke Boersma <demm@kaosx.us>
|
||||
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2015 Anke Boersma <demm@kaosx.us>
|
||||
* SPDX-FileCopyrightText: 2015 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,9 +1,10 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2015, Anke Boersma <demm@kaosx.us>
|
||||
* Copyright 2015, Alexandre Arnt <qtgzmanager@gmail.com>
|
||||
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2018, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2015 Anke Boersma <demm@kaosx.us>
|
||||
* SPDX-FileCopyrightText: 2015 Alexandre Arnt <qtgzmanager@gmail.com>
|
||||
* SPDX-FileCopyrightText: 2015 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,9 +1,10 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2015, Anke Boersma <demm@kaosx.us>
|
||||
* Copyright 2015, Alexandre Arnt <qtgzmanager@gmail.com>
|
||||
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2018, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2015 Anke Boersma <demm@kaosx.us>
|
||||
* SPDX-FileCopyrightText: 2015 Alexandre Arnt <qtgzmanager@gmail.com>
|
||||
* SPDX-FileCopyrightText: 2015 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,11 +1,25 @@
|
||||
### License Approval Module
|
||||
---------
|
||||
For distributions shipping proprietary software, this module creates a globalstorage entry when the user accepts or declines one or more presented End User License Agreements files.
|
||||
The number of licenses shown are configurable. The license.conf file has a few examples of how to add URLs.
|
||||
|
||||
If you do not want to include this module in your Calamares build, add ```-DSKIP_MODULES="license"``` to your build settings (CMake call).
|
||||
<!-- SPDX-FileCopyrightText: 2015 Anke Boersma
|
||||
SPDX-FileCopyrightText: 2015 Teo Mrnjavac <teo@kde.org>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
|
||||
For distributions shipping proprietary software, this module creates a
|
||||
Global Storage entry when the user accepts or declines one or more of
|
||||
the End User License Agreements files that are presented here.
|
||||
|
||||
The number of licenses shown are configurable. The `license.conf` file
|
||||
has a few examples of how to add URLs.
|
||||
|
||||
If you do not want to include this module in your Calamares build,
|
||||
add `-DSKIP_MODULES="license"` to your build settings (CMake call).
|
||||
|
||||
How to implement the removal or not installing of proprietary software is
|
||||
up to any distribution to implement. For example, proprietary graphics
|
||||
drivers cannot simply be removed in the packages module, a free version
|
||||
will need to be installed.
|
||||
|
||||
How to implement the removal or not installing of proprietary software is up to any distribution to implement. For example, proprietary graphics drivers cannot simply be removed in the packages module, a free version will need to be installed.
|
||||
An example of where the licenseAgree globalstorage entry is used:
|
||||
https://github.com/KaOSx/calamares/blob/master/src/modules/nonfree_drivers/main.py
|
||||
|
||||
|
@ -2,7 +2,6 @@
|
||||
*
|
||||
* SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
* License-Filename: LICENSE
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -2,7 +2,6 @@
|
||||
*
|
||||
* SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
* License-Filename: LICENSE
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,7 +1,8 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2017, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,7 +1,8 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2016, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2017-2019, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2016 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2017-2019 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,7 +1,8 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2016, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2017-2019, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2016 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2017-2019 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,7 +1,8 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2019, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,7 +1,8 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2018, Adriaan de Groot <groot.org>
|
||||
* SPDX-FileCopyrightText: 2014-2016 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,7 +1,8 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2018, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2014-2016 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,7 +1,8 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2015, Rohan Garg <rohan@garg.io>
|
||||
* SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2015 Rohan Garg <rohan@garg.io>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
2
src/modules/locale/images/bg.png.license
Normal file
2
src/modules/locale/images/bg.png.license
Normal file
@ -0,0 +1,2 @@
|
||||
SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
2
src/modules/locale/images/pin.png.license
Normal file
2
src/modules/locale/images/pin.png.license
Normal file
@ -0,0 +1,2 @@
|
||||
SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2020, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2020, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,7 +1,9 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2017-2019, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2007 Free Software Foundation, Inc.
|
||||
* SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2017-2019 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Originally from the Manjaro Installation Framework
|
||||
* by Roland Singer <roland@manjaro.org>
|
||||
|
@ -1,7 +1,9 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2018, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2007 Free Software Foundation, Inc.
|
||||
* SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Originally from the Manjaro Installation Framework
|
||||
* by Roland Singer <roland@manjaro.org>
|
||||
|
@ -1,7 +1,8 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2018,2020 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 20182020 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2019-2020 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2019-2020 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2020, Anke Boersma <demm@kaosx.us>
|
||||
* SPDX-FileCopyrightText: 2020 Anke Boersma <demm@kaosx.us>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2020, Anke Boersma <demm@kaosx.us>
|
||||
* SPDX-FileCopyrightText: 2020 Anke Boersma <demm@kaosx.us>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2020, Anke Boersma <demm@kaosx.us>
|
||||
* SPDX-FileCopyrightText: 2020 Anke Boersma <demm@kaosx.us>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
2
src/modules/localeq/img/chevron-left-solid.svg.license
Normal file
2
src/modules/localeq/img/chevron-left-solid.svg.license
Normal file
@ -0,0 +1,2 @@
|
||||
SPDX-FileCopyrightText: 2020 https://github.com/FortAwesome/Font-Awesome
|
||||
SPDX-License-Identifier: CC-BY-4.0
|
2
src/modules/localeq/img/locale.svg.license
Normal file
2
src/modules/localeq/img/locale.svg.license
Normal file
@ -0,0 +1,2 @@
|
||||
SPDX-FileCopyrightText: 2020 demmm <anke62@gmail.com>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
2
src/modules/localeq/img/minus.png.license
Normal file
2
src/modules/localeq/img/minus.png.license
Normal file
@ -0,0 +1,2 @@
|
||||
SPDX-FileCopyrightText: 2020 demmm <anke62@gmail.com>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
2
src/modules/localeq/img/pin.svg.license
Normal file
2
src/modules/localeq/img/pin.svg.license
Normal file
@ -0,0 +1,2 @@
|
||||
SPDX-FileCopyrightText: 2020 demmm <anke62@gmail.com>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
2
src/modules/localeq/img/plus.png.license
Normal file
2
src/modules/localeq/img/plus.png.license
Normal file
@ -0,0 +1,2 @@
|
||||
SPDX-FileCopyrightText: 2020 demmm <anke62@gmail.com>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
2
src/modules/localeq/img/worldmap.png.license
Normal file
2
src/modules/localeq/img/worldmap.png.license
Normal file
@ -0,0 +1,2 @@
|
||||
SPDX-FileCopyrightText: 2020 demmm <anke62@gmail.com>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
@ -1,7 +1,8 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2020, Adriaan de Groot <groot@kde.org>
|
||||
* Copyright 2020, Anke Boersma <demm@kaosx.us>
|
||||
* SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2020 Anke Boersma <demm@kaosx.us>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,19 +1,8 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2019, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Calamares is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "LuksBootKeyFileJob.h"
|
||||
|
@ -1,19 +1,8 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2019, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Calamares is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LUKSBOOTKEYFILEJOB_H
|
||||
|
@ -1,9 +1,10 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014, Kevin Kofler <kevin.kofler@chello.at>
|
||||
* Copyright 2016, Philip Müller <philm@manjaro.org>
|
||||
* Copyright 2017, Alf Gaida <agaida@siduction.org>
|
||||
* Copyright 2019-2020, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2014 Kevin Kofler <kevin.kofler@chello.at>
|
||||
* SPDX-FileCopyrightText: 2016 Philip Müller <philm@manjaro.org>
|
||||
* SPDX-FileCopyrightText: 2017 Alf Gaida <agaida@siduction.org>
|
||||
* SPDX-FileCopyrightText: 2019-2020 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2019, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2019, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -130,7 +131,7 @@ MachineIdTests::testJob()
|
||||
|
||||
// Prepare part of the target filesystem
|
||||
{
|
||||
QVERIFY( system->createTargetDirs("/etc") );
|
||||
QVERIFY( system->createTargetDirs( "/etc" ) );
|
||||
auto r = system->createTargetFile( "/etc/machine-id", "Hello" );
|
||||
QVERIFY( !r.failed() );
|
||||
QVERIFY( r );
|
||||
@ -164,7 +165,7 @@ MachineIdTests::testJob()
|
||||
QFileInfo fi( "/tmp/var/lib/dbus/machine-id" );
|
||||
QVERIFY( fi.exists() );
|
||||
QVERIFY( fi.isSymLink() );
|
||||
QCOMPARE( fi.size(), 5);
|
||||
QCOMPARE( fi.size(), 5 );
|
||||
#endif
|
||||
}
|
||||
tempRoot.setAutoRemove( true ); // All tests succeeded
|
||||
|
@ -1,9 +1,10 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014, Kevin Kofler <kevin.kofler@chello.at>
|
||||
* Copyright 2016, Philip Müller <philm@manjaro.org>
|
||||
* Copyright 2017, Alf Gaida <agaida@siduction.org>
|
||||
* Copyright 2019-2020, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2014 Kevin Kofler <kevin.kofler@chello.at>
|
||||
* SPDX-FileCopyrightText: 2016 Philip Müller <philm@manjaro.org>
|
||||
* SPDX-FileCopyrightText: 2017 Alf Gaida <agaida@siduction.org>
|
||||
* SPDX-FileCopyrightText: 2019-2020 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2019, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,9 +1,10 @@
|
||||
/*
|
||||
* Copyright 2016, Luca Giambonini <almack@chakraos.org>
|
||||
* Copyright 2016, Lisa Vitolo <shainer@chakraos.org>
|
||||
* Copyright 2017, Kyle Robbertze <krobbertze@gmail.com>
|
||||
* Copyright 2017-2018, 2020, Adriaan de Groot <groot@kde.org>
|
||||
* Copyright 2017, Gabriel Craciunescu <crazy@frugalware.org>
|
||||
* SPDX-FileCopyrightText: 2016 Luca Giambonini <almack@chakraos.org>
|
||||
* SPDX-FileCopyrightText: 2016 Lisa Vitolo <shainer@chakraos.org>
|
||||
* SPDX-FileCopyrightText: 2017 Kyle Robbertze <krobbertze@gmail.com>
|
||||
* SPDX-FileCopyrightText: 2017-2018 2020, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2017 Gabriel Craciunescu <crazy@frugalware.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,8 +1,9 @@
|
||||
/*
|
||||
* Copyright 2016, Luca Giambonini <almack@chakraos.org>
|
||||
* Copyright 2016, Lisa Vitolo <shainer@chakraos.org>
|
||||
* Copyright 2017, Kyle Robbertze <krobbertze@gmail.com>
|
||||
* Copyright 2017-2018, 2020, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2016 Luca Giambonini <almack@chakraos.org>
|
||||
* SPDX-FileCopyrightText: 2016 Lisa Vitolo <shainer@chakraos.org>
|
||||
* SPDX-FileCopyrightText: 2017 Kyle Robbertze <krobbertze@gmail.com>
|
||||
* SPDX-FileCopyrightText: 2017-2018 2020, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,9 +1,10 @@
|
||||
/*
|
||||
* Copyright 2016, Luca Giambonini <almack@chakraos.org>
|
||||
* Copyright 2016, Lisa Vitolo <shainer@chakraos.org>
|
||||
* Copyright 2017, Kyle Robbertze <krobbertze@gmail.com>
|
||||
* Copyright 2017-2018, 2020, Adriaan de Groot <groot@kde.org>
|
||||
* Copyright 2017, Gabriel Craciunescu <crazy@frugalware.org>
|
||||
* SPDX-FileCopyrightText: 2016 Luca Giambonini <almack@chakraos.org>
|
||||
* SPDX-FileCopyrightText: 2016 Lisa Vitolo <shainer@chakraos.org>
|
||||
* SPDX-FileCopyrightText: 2017 Kyle Robbertze <krobbertze@gmail.com>
|
||||
* SPDX-FileCopyrightText: 2017-2018 2020, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2017 Gabriel Craciunescu <crazy@frugalware.org>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user