From 4f60a6340e2ab5e1b3897f997bb6f9ac6c0ef39d Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 11 Feb 2020 12:20:39 +0100 Subject: [PATCH] [dummyqml] Drop module; it makes more sense to just be notesqml --- src/modules/dummyqml/CMakeLists.txt | 11 ---- src/modules/dummyqml/DummyQmlViewStep.cpp | 52 ------------------- src/modules/dummyqml/DummyQmlViewStep.h | 48 ----------------- src/modules/dummyqml/dummyqml.conf | 29 ----------- src/modules/dummyqml/dummyqml.qrc | 5 -- .../examples}/dummyqml.qml | 0 6 files changed, 145 deletions(-) delete mode 100644 src/modules/dummyqml/CMakeLists.txt delete mode 100644 src/modules/dummyqml/DummyQmlViewStep.cpp delete mode 100644 src/modules/dummyqml/DummyQmlViewStep.h delete mode 100644 src/modules/dummyqml/dummyqml.conf delete mode 100644 src/modules/dummyqml/dummyqml.qrc rename src/modules/{dummyqml => notesqml/examples}/dummyqml.qml (100%) diff --git a/src/modules/dummyqml/CMakeLists.txt b/src/modules/dummyqml/CMakeLists.txt deleted file mode 100644 index 9a7532e9e..000000000 --- a/src/modules/dummyqml/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -calamares_add_plugin( dummyqml - TYPE viewmodule - EXPORT_MACRO PLUGINDLLEXPORT_PRO - SOURCES - DummyQmlViewStep.cpp - RESOURCES - dummyqml.qrc - LINK_PRIVATE_LIBRARIES - calamaresui - SHARED_LIB -) diff --git a/src/modules/dummyqml/DummyQmlViewStep.cpp b/src/modules/dummyqml/DummyQmlViewStep.cpp deleted file mode 100644 index 030779f7f..000000000 --- a/src/modules/dummyqml/DummyQmlViewStep.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/* === This file is part of Calamares - === - * - * Copyright 2020, Adriaan de Groot - * Copyright 2020, Anke Boersma - * - * 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 . - */ - -#include "DummyQmlViewStep.h" - -#include - -DummyQmlViewStep::DummyQmlViewStep( QObject* parent ) - : Calamares::QmlViewStep( "dummyqml", parent ) -{ -} - -DummyQmlViewStep::~DummyQmlViewStep() {} - -QString -DummyQmlViewStep::prettyName() const -{ - return m_notesName ? m_notesName->get() : tr( "Notes" ); -} - -void -DummyQmlViewStep::setConfigurationMap( const QVariantMap& configurationMap ) -{ - Calamares::QmlViewStep::setConfigurationMap( configurationMap ); // call parent implementation - - bool qmlLabel_ok = false; - auto qmlLabel = CalamaresUtils::getSubMap( configurationMap, "qmlLabel", qmlLabel_ok ); - - if ( qmlLabel.contains( "notes" ) ) - { - m_notesName = new CalamaresUtils::Locale::TranslatedString( qmlLabel, "notes" ); - } - -} - -CALAMARES_PLUGIN_FACTORY_DEFINITION( DummyQmlViewStepFactory, registerPlugin< DummyQmlViewStep >(); ) diff --git a/src/modules/dummyqml/DummyQmlViewStep.h b/src/modules/dummyqml/DummyQmlViewStep.h deleted file mode 100644 index cf49436b0..000000000 --- a/src/modules/dummyqml/DummyQmlViewStep.h +++ /dev/null @@ -1,48 +0,0 @@ -/* === This file is part of Calamares - === - * - * Copyright 2020, Adriaan de Groot - * Copyright 2020, Anke Boersma - * - * 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 . - */ - -#ifndef DUMMYQMLVIEWSTEP_H -#define DUMMYQMLVIEWSTEP_H - -#include "PluginDllMacro.h" -#include "locale/TranslatableConfiguration.h" -#include "utils/CalamaresUtilsSystem.h" -#include "utils/Variant.h" -#include "utils/PluginFactory.h" -#include "viewpages/QmlViewStep.h" - -class PLUGINDLLEXPORT DummyQmlViewStep : public Calamares::QmlViewStep -{ - Q_OBJECT - -public: - DummyQmlViewStep( QObject* parent = nullptr ); - virtual ~DummyQmlViewStep() override; - - QString prettyName() const override; - - void setConfigurationMap( const QVariantMap& configurationMap ) override; - -private: - CalamaresUtils::Locale::TranslatedString* m_notesName; // As it appears in the sidebar -}; - -CALAMARES_PLUGIN_FACTORY_DECLARATION( DummyQmlViewStepFactory ) - -#endif diff --git a/src/modules/dummyqml/dummyqml.conf b/src/modules/dummyqml/dummyqml.conf deleted file mode 100644 index 9e7a83fdd..000000000 --- a/src/modules/dummyqml/dummyqml.conf +++ /dev/null @@ -1,29 +0,0 @@ -# The dummy QML module just displays a QML page. It doesn't -# have much in the way of own configuration, only where -# the QML file is searched. -# -# QML modules can search for the QML inside the Qt resources -# (QRC) which are compiled into the module, or in the branding -# setup for Calamares, (or both of them, with branding taking -# precedence). This allows the module to ship a default UI and -# branding to optionally introduce a replacement file. -# -# Generally, leave the search method set to "both" because if -# you don't want to brand the UI, just don't ship a branding -# QML file for it. -# -# To support instanced QML modules, searches in the branding -# directory look for the full module@instanceid name as well. ---- -# Search mode. Valid values are "both", "qrc" and "branding" -search: both - -# Name of the QML file. If not set, uses the name of the instance -# of the module (e.g. if you list this module in `settings.conf` -# in the *instances* section, you get *id*, otherwise it would -# normally be "dummyqml"). -# filename: dummyqml - -qmlLabel: - notes: "Release Notes" - notes[nl]: "Opmerkingen" diff --git a/src/modules/dummyqml/dummyqml.qrc b/src/modules/dummyqml/dummyqml.qrc deleted file mode 100644 index 85b1da5ca..000000000 --- a/src/modules/dummyqml/dummyqml.qrc +++ /dev/null @@ -1,5 +0,0 @@ - - - dummyqml.qml - - diff --git a/src/modules/dummyqml/dummyqml.qml b/src/modules/notesqml/examples/dummyqml.qml similarity index 100% rename from src/modules/dummyqml/dummyqml.qml rename to src/modules/notesqml/examples/dummyqml.qml