diff --git a/CMakeLists.txt b/CMakeLists.txt index aa0d9016b..fbc1cac26 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -113,12 +113,22 @@ set( QT_VERSION 5.6.0 ) find_package( Qt5 ${QT_VERSION} CONFIG REQUIRED Core Gui Widgets LinguistTools Svg Quick QuickWidgets ) find_package( YAMLCPP 0.5.1 REQUIRED ) find_package( PolkitQt5-1 REQUIRED ) +find_package(ECM 5.18 NO_MODULE) +if( ECM_FOUND ) + set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_MODULE_PATH}) +endif() option( INSTALL_CONFIG "Install configuration files" ON ) option( WITH_PYTHON "Enable Python modules API (requires Boost.Python)." ON ) option( WITH_PYTHONQT "Enable next generation Python modules API (experimental, requires PythonQt)." OFF ) +option( WITH_KF5Crash "Enable crash reporting with KCrash." ON ) option( BUILD_TESTING "Build the testing tree." ON ) +find_package( KF5 COMPONENTS CoreAddons Crash ) +if( NOT KF5Crash_FOUND ) + set( WITH_KF5Crash OFF ) +endif() + if( BUILD_TESTING ) enable_testing() endif () @@ -277,6 +287,7 @@ add_subdirectory( src ) add_feature_info(Python ${WITH_PYTHON} "Python job modules") add_feature_info(PythonQt ${WITH_PYTHONQT} "Python view modules") add_feature_info(Config ${INSTALL_CONFIG} "Install Calamares configuration") +add_feature_info(KCrash ${WITH_KF5Crash} "Crash dumps via KCrash") feature_summary(WHAT ALL) diff --git a/LICENSES/LGPLv3-Breeze b/LICENSES/LGPLv3-Breeze new file mode 100644 index 000000000..63d73657c --- /dev/null +++ b/LICENSES/LGPLv3-Breeze @@ -0,0 +1,209 @@ +The Breeze Icon Theme in icons/ + + Copyright (C) 2014 Uri Herrera and others + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 3 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library. If not, see . + +Clarification: + + The GNU Lesser General Public License or LGPL is written for + software libraries in the first place. We expressly want the LGPL to + be valid for this artwork library too. + + KDE Breeze theme icons is a special kind of software library, it is an + artwork library, it's elements can be used in a Graphical User Interface, or + GUI. + + Source code, for this library means: + - where they exist, SVG; + - otherwise, if applicable, the multi-layered formats xcf or psd, or + otherwise png. + + The LGPL in some sections obliges you to make the files carry + notices. With images this is in some cases impossible or hardly useful. + + With this library a notice is placed at a prominent place in the directory + containing the elements. You may follow this practice. + + The exception in section 5 of the GNU Lesser General Public License covers + the use of elements of this art library in a GUI. + + https://vdesign.kde.org/ + +----- + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/README.md b/README.md index dcb5e3b67..b16493b17 100644 --- a/README.md +++ b/README.md @@ -19,16 +19,15 @@ Main: * yaml-cpp >= 0.5.1 * Python >= 3.3 * Boost.Python >= 1.55.0 -* dmidecode +* extra-cmake-modules (recommended; required for some modules) Modules: * welcome: * NetworkManager - * UPower + * UPower (optional, runtime) * partition: - * extra-cmake-modules * KF5: KCoreAddons, KConfig, KI18n, KIconThemes, KIO, KService - * KPMcore >= 3.0.3 + * KPMcore >= 3.0.2 * bootloader: * systemd-boot or GRUB * unpackfs: @@ -37,4 +36,7 @@ Modules: ### Building -See [wiki](https://github.com/calamares/calamares/wiki) for up to date building and deployment instructions. +See [wiki](https://github.com/calamares/calamares/wiki) for up to date +[building](https://github.com/calamares/calamares/wiki/Developer's-Guide) +and [deployment](https://github.com/calamares/calamares/wiki/Deployer's-Guide) +instructions. diff --git a/data/images/state-error.svg b/data/images/state-error.svg new file mode 100644 index 000000000..5291d9d01 --- /dev/null +++ b/data/images/state-error.svg @@ -0,0 +1,30 @@ + + + + + + + + + + diff --git a/data/images/state-ok.svg b/data/images/state-ok.svg new file mode 100644 index 000000000..0f49bbf86 --- /dev/null +++ b/data/images/state-ok.svg @@ -0,0 +1,27 @@ + + + + + + + + + + diff --git a/data/images/state-warning.svg b/data/images/state-warning.svg new file mode 100644 index 000000000..a951dad80 --- /dev/null +++ b/data/images/state-warning.svg @@ -0,0 +1,25 @@ + + + + + + + + diff --git a/src/calamares/CMakeLists.txt b/src/calamares/CMakeLists.txt index 6129aa553..f47a0a9f5 100644 --- a/src/calamares/CMakeLists.txt +++ b/src/calamares/CMakeLists.txt @@ -49,6 +49,13 @@ SET_TARGET_PROPERTIES(calamares_bin RUNTIME_OUTPUT_NAME calamares ) +if( WITH_KF5Crash ) + set( LINK_LIBRARIES + KF5::CoreAddons + KF5::Crash + ) +endif() + target_link_libraries( calamares_bin PRIVATE ${CALAMARES_LIBRARIES} diff --git a/src/calamares/CalamaresApplication.cpp b/src/calamares/CalamaresApplication.cpp index 6389a2806..caba96f5d 100644 --- a/src/calamares/CalamaresApplication.cpp +++ b/src/calamares/CalamaresApplication.cpp @@ -356,7 +356,7 @@ CalamaresApplication::initViewSteps() { cDebug() << "STARTUP: loadModules for all modules done"; m_mainwindow->show(); - ProgressTreeModel* m = new ProgressTreeModel( this ); + ProgressTreeModel* m = new ProgressTreeModel( nullptr ); ProgressTreeView::instance()->setModel( m ); cDebug() << "STARTUP: Window now visible and ProgressTreeView populated"; } diff --git a/src/calamares/main.cpp b/src/calamares/main.cpp index a265d1e31..47caa558b 100644 --- a/src/calamares/main.cpp +++ b/src/calamares/main.cpp @@ -1,6 +1,7 @@ /* === This file is part of Calamares - === * * Copyright 2014, Teo Mrnjavac + * Copyright 2017, Adriaan de Groot * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,11 +20,17 @@ #include "CalamaresApplication.h" +#include "CalamaresConfig.h" #include "kdsingleapplicationguard/kdsingleapplicationguard.h" #include "utils/CalamaresUtils.h" #include "utils/Logger.h" #include "CalamaresConfig.h" +#ifdef WITH_KCRASH +#include +#include +#endif + #include #include #include @@ -33,6 +40,24 @@ main( int argc, char* argv[] ) { CalamaresApplication a( argc, argv ); +#ifdef WITH_KCRASH + KAboutData aboutData( "calamares", + "Calamares", + a.applicationVersion(), + "The universal system installer", + KAboutLicense::GPL_V3, + QString(), + QString(), + "https://calamares.io", + "https://github.com/calamares/calamares/issues" ); + KAboutData::setApplicationData( aboutData ); + KCrash::initialize(); + // KCrash::setCrashHandler(); + KCrash::setDrKonqiEnabled( true ); + KCrash::setFlags( KCrash::SaferDialog | KCrash::AlwaysDirectly ); + // TODO: umount anything in /tmp/calamares-... as an emergency save function +#endif + QCommandLineParser parser; parser.setApplicationDescription( "Distribution-independent installer framework" ); parser.addHelpOption(); diff --git a/src/calamares/progresstree/ProgressTreeModel.cpp b/src/calamares/progresstree/ProgressTreeModel.cpp index 50a1b6e50..0b0c47c72 100644 --- a/src/calamares/progresstree/ProgressTreeModel.cpp +++ b/src/calamares/progresstree/ProgressTreeModel.cpp @@ -24,6 +24,7 @@ ProgressTreeModel::ProgressTreeModel( QObject* parent ) : QAbstractItemModel( parent ) + , m_rootItem( nullptr ) { setupModelData(); } @@ -39,7 +40,7 @@ Qt::ItemFlags ProgressTreeModel::flags( const QModelIndex& index ) const { if ( !index.isValid() ) - return 0; + return Qt::ItemFlags(); return Qt::ItemIsEnabled; } @@ -134,6 +135,8 @@ ProgressTreeModel::columnCount( const QModelIndex& parent ) const void ProgressTreeModel::setupModelData() { + delete m_rootItem; + m_rootItem = new ProgressTreeRoot(); const Calamares::ViewManager* vm = Calamares::ViewManager::instance(); diff --git a/src/calamares/progresstree/ProgressTreeView.cpp b/src/calamares/progresstree/ProgressTreeView.cpp index 7fc44d146..6dd33b951 100644 --- a/src/calamares/progresstree/ProgressTreeView.cpp +++ b/src/calamares/progresstree/ProgressTreeView.cpp @@ -62,7 +62,6 @@ ProgressTreeView::ProgressTreeView( QWidget* parent ) ProgressTreeView::~ProgressTreeView() { - } diff --git a/src/libcalamares/CalamaresConfig.h.in b/src/libcalamares/CalamaresConfig.h.in index 6fbab422c..cafbe9276 100644 --- a/src/libcalamares/CalamaresConfig.h.in +++ b/src/libcalamares/CalamaresConfig.h.in @@ -10,6 +10,12 @@ //cmakedefines for CMake variables (e.g. for optdepends) go here #cmakedefine WITH_PYTHON + +#cmakedefine WITH_KF5Crash +#ifdef WITH_KF5Crash +#define WITH_KCRASH +#endif + #cmakedefine WITH_PYTHONQT #endif // CALAMARESCONFIG_H diff --git a/src/libcalamaresui/libcalamaresui.qrc b/src/libcalamaresui/libcalamaresui.qrc index 7fdcc8cd1..79ae4e45f 100644 --- a/src/libcalamaresui/libcalamaresui.qrc +++ b/src/libcalamaresui/libcalamaresui.qrc @@ -16,5 +16,8 @@ ../../data/images/boot-environment.svg ../../data/images/partition-table.svg ../../data/images/squid.svg + ../../data/images/state-ok.svg + ../../data/images/state-warning.svg + ../../data/images/state-error.svg diff --git a/src/libcalamaresui/utils/CalamaresUtilsGui.cpp b/src/libcalamaresui/utils/CalamaresUtilsGui.cpp index 3b04897ae..38d7d12e0 100644 --- a/src/libcalamaresui/utils/CalamaresUtilsGui.cpp +++ b/src/libcalamaresui/utils/CalamaresUtilsGui.cpp @@ -1,6 +1,7 @@ /* === This file is part of Calamares - === * * Copyright 2014-2015, Teo Mrnjavac + * Copyright 2017, Adriaan de Groot * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -107,6 +108,18 @@ defaultPixmap( ImageType type, ImageMode mode, const QSize& size ) case Squid: pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/squid.svg", size ); break; + + case StatusOk: + pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/state-ok.svg", size ); + break; + + case StatusWarning: + pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/state-warning.svg", size ); + break; + + case StatusError: + pixmap = ImageRegistry::instance()->pixmap( RESPATH "images/state-error.svg", size ); + break; } if ( pixmap.isNull() ) diff --git a/src/libcalamaresui/utils/CalamaresUtilsGui.h b/src/libcalamaresui/utils/CalamaresUtilsGui.h index e675d0672..b64133455 100644 --- a/src/libcalamaresui/utils/CalamaresUtilsGui.h +++ b/src/libcalamaresui/utils/CalamaresUtilsGui.h @@ -55,7 +55,10 @@ enum ImageType : int PartitionReplaceOs, PartitionTable, BootEnvironment, - Squid + Squid, + StatusOk, // Icons for the requirements checker + StatusWarning, + StatusError }; /** diff --git a/src/modules/netinstall/NetInstallPage.cpp b/src/modules/netinstall/NetInstallPage.cpp index 28c836a79..a8e37aa0c 100644 --- a/src/modules/netinstall/NetInstallPage.cpp +++ b/src/modules/netinstall/NetInstallPage.cpp @@ -88,7 +88,9 @@ NetInstallPage::dataIsHere( QNetworkReply* reply ) // even if the reply is corrupt or missing. if ( reply->error() != QNetworkReply::NoError ) { - cDebug() << reply->errorString(); + cDebug() << "WARNING: unable to fetch netinstall package lists."; + cDebug() << " ..Netinstall reply error: " << reply->error(); + cDebug() << " ..Request for url: " << reply->url().toString() << " failed with: " << reply->errorString(); ui->netinst_status->setText( tr( "Network Installation. (Disabled: Unable to fetch package lists, check your network connection)" ) ); emit checkReady( !m_required ); return; @@ -96,7 +98,9 @@ NetInstallPage::dataIsHere( QNetworkReply* reply ) if ( !readGroups( reply->readAll() ) ) { - cDebug() << "Netinstall groups data was received, but invalid."; + cDebug() << "WARNING: netinstall groups data was received, but invalid."; + cDebug() << " ..Url: " << reply->url().toString(); + cDebug() << " ..Headers: " << reply->rawHeaderList(); ui->netinst_status->setText( tr( "Network Installation. (Disabled: Received invalid groups data)" ) ); reply->deleteLater(); emit checkReady( !m_required ); diff --git a/src/modules/plymouthcfg/plymouthcfg.conf b/src/modules/plymouthcfg/plymouthcfg.conf index 6d7ae5c27..47c54f5ff 100644 --- a/src/modules/plymouthcfg/plymouthcfg.conf +++ b/src/modules/plymouthcfg/plymouthcfg.conf @@ -1,4 +1,28 @@ +# Plymouth Configuration Module +# +# This module can be used to setup the default plymouth theme to +# be used with your distribution +# +# You should only use this module if the plymouth package is installed +# on the build configurations of your distribution & the plymouth +# theme you want to configure is installed as well. If the unpacked +# filesystem configures a plymouth theme already, there is no need +# to change it here. --- -# The plymouth theme to be set if plymouth binary is present -# leave commented if packaged default theme should be used -# plymouth_theme: spinfinity + + +# Leave this commented if you want to use the default theme +# shipped with your distribution configurations. Make sure that +# the theme exists in the themes directory of plymouth path. +# Debian / Ubuntu comes with themes "joy", "script", "softwaves", +# possibly others. Look in /usr/share/plymouth/themes for more. +# +# Specifying a non-existent theme will leave the plymouth +# configuration set to that theme. It is up to plymouth to +# deal with that. + +plymouth_theme: spinfinity + + + + diff --git a/src/modules/welcome/checker/CheckItemWidget.cpp b/src/modules/welcome/checker/CheckItemWidget.cpp index 5c0d8ec95..c0fa80a25 100644 --- a/src/modules/welcome/checker/CheckItemWidget.cpp +++ b/src/modules/welcome/checker/CheckItemWidget.cpp @@ -1,6 +1,7 @@ /* === This file is part of Calamares - === * * Copyright 2014-2015, Teo Mrnjavac + * Copyright 2017, Adriaan de Groot * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,7 +24,15 @@ #include +static inline void setCondition( QLabel* label, CalamaresUtils::ImageType t ) +{ + label->setPixmap( CalamaresUtils::defaultPixmap( t, + CalamaresUtils::Original, + QSize( label->height(), label->height() ) ) ); +} + CheckItemWidget::CheckItemWidget( bool checked, + bool required, QWidget* parent ) : QWidget( parent ) { @@ -38,15 +47,13 @@ CheckItemWidget::CheckItemWidget( bool checked, m_textLabel->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred ); if ( checked ) - m_iconLabel->setPixmap( CalamaresUtils::defaultPixmap( CalamaresUtils::Yes, - CalamaresUtils::Original, - QSize( m_iconLabel->height(), - m_iconLabel->height() ) ) ); + // Condition is satisfied + setCondition( m_iconLabel, CalamaresUtils::StatusOk ); else - m_iconLabel->setPixmap( CalamaresUtils::defaultPixmap( CalamaresUtils::No, - CalamaresUtils::Original, - QSize( m_iconLabel->height(), - m_iconLabel->height() ) ) ); + if ( required ) + setCondition( m_iconLabel, CalamaresUtils::StatusError ); + else + setCondition( m_iconLabel, CalamaresUtils::StatusWarning ); } diff --git a/src/modules/welcome/checker/CheckItemWidget.h b/src/modules/welcome/checker/CheckItemWidget.h index dea24712a..31164a190 100644 --- a/src/modules/welcome/checker/CheckItemWidget.h +++ b/src/modules/welcome/checker/CheckItemWidget.h @@ -1,6 +1,7 @@ /* === This file is part of Calamares - === * * Copyright 2014-2015, Teo Mrnjavac + * Copyright 2017, Adriaan de Groot * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -25,7 +26,7 @@ class CheckItemWidget : public QWidget { Q_OBJECT public: - explicit CheckItemWidget( bool checked, + explicit CheckItemWidget( bool checked, bool required, QWidget* parent = nullptr ); void setText( const QString& text ); diff --git a/src/modules/welcome/checker/CheckerWidget.cpp b/src/modules/welcome/checker/CheckerWidget.cpp index 500ab6f85..2476847b6 100644 --- a/src/modules/welcome/checker/CheckerWidget.cpp +++ b/src/modules/welcome/checker/CheckerWidget.cpp @@ -62,7 +62,7 @@ CheckerWidget::init( const QList< PrepareEntry >& checkEntries ) { if ( !entry.checked ) { - CheckItemWidget* ciw = new CheckItemWidget( entry.checked ); + CheckItemWidget* ciw = new CheckItemWidget( entry.checked, entry.required ); CALAMARES_RETRANSLATE( ciw->setText( entry.negatedText() ); ) m_entriesLayout->addWidget( ciw ); ciw->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred ); @@ -182,7 +182,7 @@ CheckerWidget::showDetailsDialog( const QList< PrepareEntry >& checkEntries ) if ( entry.enumerationText().isEmpty() ) continue; - CheckItemWidget* ciw = new CheckItemWidget( entry.checked ); + CheckItemWidget* ciw = new CheckItemWidget( entry.checked, entry.required ); CALAMARES_RETRANSLATE( ciw->setText( entry.enumerationText() ); ) entriesLayout->addWidget( ciw ); ciw->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred ); diff --git a/src/modules/welcome/checker/RequirementsChecker.cpp b/src/modules/welcome/checker/RequirementsChecker.cpp index 654434513..741802fb5 100644 --- a/src/modules/welcome/checker/RequirementsChecker.cpp +++ b/src/modules/welcome/checker/RequirementsChecker.cpp @@ -79,7 +79,7 @@ RequirementsChecker::RequirementsChecker( QObject* parent ) bool hasPower = false; bool hasInternet = false; bool isRoot = false; - bool enoughScreen = (availableSize.width() >= CalamaresUtils::windowPreferredWidth) && (availableSize.height() >= CalamaresUtils::windowPreferredHeight); + bool enoughScreen = (availableSize.width() >= CalamaresUtils::windowMinimumWidth) && (availableSize.height() >= CalamaresUtils::windowMinimumHeight); qint64 requiredStorageB = CalamaresUtils::GiBtoBytes(m_requiredStorageGB); cDebug() << "Need at least storage bytes:" << requiredStorageB; diff --git a/src/modules/welcome/checker/RequirementsChecker.h b/src/modules/welcome/checker/RequirementsChecker.h index 1e52d9fc5..23ee39f74 100644 --- a/src/modules/welcome/checker/RequirementsChecker.h +++ b/src/modules/welcome/checker/RequirementsChecker.h @@ -1,6 +1,7 @@ /* === This file is part of Calamares - === * * Copyright 2014-2017, Teo Mrnjavac + * Copyright 2017, Adriaan de Groot * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,6 +28,15 @@ class CheckerWidget; class QWidget; +/** + * An indication of a requirement, which is checked in preparation + * for system installation. An entry has a name and some explanation, + * as well as three meaningful states: + * - checked = true, the requirement is met (green) + * - checked = false, the requirement is not met + * - required = false, warn about it (yellow), no failure + * - required = true, prohibit installation (red) + */ struct PrepareEntry { QString name;