From c45119553603c0182e8c1c996a3ccc97533b3e1a Mon Sep 17 00:00:00 2001
From: Ming Rui Zhang <mingrui.zhang@savoirfairelinux.com>
Date: Wed, 28 Oct 2020 12:21:30 -0400
Subject: [PATCH] misc remove the changelog

Gitlab: #155
Change-Id: I207190da48d0ab7bf94645a097a8078dd08a4566
---
 changelog.md                                  | 14 ----
 qml.qrc                                       |  1 -
 resources.qrc                                 |  1 -
 src/constant/JamiStrings.qml                  |  1 -
 src/mainview/components/AboutPopUp.qml        | 72 +------------------
 .../components/ChangeLogScrollView.qml        | 52 --------------
 .../components/ProjectCreditsScrollView.qml   |  2 -
 src/utils.cpp                                 | 17 -----
 src/utils.h                                   |  1 -
 src/utilsadapter.cpp                          |  6 --
 src/utilsadapter.h                            |  1 -
 11 files changed, 2 insertions(+), 166 deletions(-)
 delete mode 100644 changelog.md
 delete mode 100644 src/mainview/components/ChangeLogScrollView.qml

diff --git a/changelog.md b/changelog.md
deleted file mode 100644
index 497115b33..000000000
--- a/changelog.md
+++ /dev/null
@@ -1,14 +0,0 @@
-::: {style="margin:1.5em;"}
-2020-10-09 {#section style="font-size:2.25em;"}
-==========
-
-New Features {#new-features style="font-size:2.0em;"}
-------------
-::: {style="font-size:1.5em"}
--   Rendezvous points: easily create meeting points
--   Control conference layout and see participant names
--   New and improved user interface
--   Better support for screen scaling (high DPI)
-:::
-------------
-:::
\ No newline at end of file
diff --git a/qml.qrc b/qml.qrc
index 1c03e350e..2d514ecbe 100644
--- a/qml.qrc
+++ b/qml.qrc
@@ -93,7 +93,6 @@
         <file>src/mainview/components/VideoCallPage.qml</file>
         <file>src/mainview/components/CallAdvancedOptions.qml</file>
         <file>src/mainview/components/ParticipantOverlay.qml</file>
-        <file>src/mainview/components/ChangeLogScrollView.qml</file>
         <file>src/mainview/components/ProjectCreditsScrollView.qml</file>
         <file>src/mainview/components/AccountComboBoxPopup.qml</file>
         <file>src/mainview/components/ConversationSmartListViewItemDelegate.qml</file>
diff --git a/resources.qrc b/resources.qrc
index 6a15ad17b..3a1b358c5 100644
--- a/resources.qrc
+++ b/resources.qrc
@@ -7,7 +7,6 @@
         <file>images/icons/baseline-close-24px.svg</file>
         <file>images/icons/baseline-done-24px.svg</file>
         <file>images/icons/baseline-error_outline-24px.svg</file>
-        <file>changelog.html</file>
         <file>projectcredits.html</file>
         <file>images/ajax-loader.gif</file>
         <file>images/default_avatar_overlay.svg</file>
diff --git a/src/constant/JamiStrings.qml b/src/constant/JamiStrings.qml
index c21518ca4..8554b84c3 100644
--- a/src/constant/JamiStrings.qml
+++ b/src/constant/JamiStrings.qml
@@ -36,7 +36,6 @@ Item {
     property string companyDeclarationYear: "© 2015-2020 Savoir-faire Linux Inc."
     property string slogan: "Together"
     property string declaration: qsTr("Jami is a free software for universal communication which respects the freedom and privacy of its users.")
-    property string changelog: qsTr("Changelog")
     property string credits: qsTr("Credits")
 
     // AccountComboBox
diff --git a/src/mainview/components/AboutPopUp.qml b/src/mainview/components/AboutPopUp.qml
index f3c46f1d7..591854c48 100644
--- a/src/mainview/components/AboutPopUp.qml
+++ b/src/mainview/components/AboutPopUp.qml
@@ -30,18 +30,6 @@ ModalPopup {
 
     property alias preferredHeight: aboutPopUpContentRectColumnLayout.implicitHeight
 
-    ProjectCreditsScrollView {
-        id: projectCreditsScrollView
-
-        visible: false
-    }
-
-    ChangeLogScrollView {
-        id: changeLogScrollView
-
-        visible: false
-    }
-
     contentItem: Rectangle {
         id: contentRect
 
@@ -230,69 +218,13 @@ ModalPopup {
                         }
                     }
 
-                    Rectangle {
-                        id: buttonGroupChangeLogAndCredits
-
-                        Layout.alignment: Qt.AlignCenter
-                        Layout.preferredWidth: contentRect.width
-                        Layout.preferredHeight: 32
-
-                        RowLayout {
-                            id: buttonGroupChangeLogAndCreditsRowLayout
-
-                            anchors.fill: parent
-
-                            MaterialButton {
-                                id: changeLogButton
-                                text: JamiStrings.changelog
-                                color: projectCreditsScrollView.visible? JamiTheme.buttonTintedGreyInactive :
-                                                                         JamiTheme.buttonTintedGrey
-                                hoveredColor: JamiTheme.buttonTintedGreyHovered
-                                pressedColor: JamiTheme.buttonTintedGreyPressed
-
-                                Layout.alignment: Qt.AlignHCenter
-                                Layout.preferredWidth: JamiTheme.preferredFieldWidth / 2
-                                Layout.preferredHeight: JamiTheme.preferredFieldHeight
-
-                                onClicked: {
-                                    if (changeLogOrCreditsStack.depth > 1) {
-                                        changeLogOrCreditsStack.pop()
-                                    }
-                                }
-                            }
-
-                            MaterialButton {
-                                id: creditsButton
-                                text: JamiStrings.credits
-                                color: projectCreditsScrollView.visible? JamiTheme.buttonTintedGrey :
-                                                                         JamiTheme.buttonTintedGreyInactive
-                                hoveredColor: JamiTheme.buttonTintedGreyHovered
-                                pressedColor: JamiTheme.buttonTintedGreyPressed
-                                Layout.alignment: Qt.AlignHCenter
-                                Layout.preferredWidth: JamiTheme.preferredFieldWidth / 2
-                                Layout.preferredHeight: JamiTheme.preferredFieldHeight
-
-                                onClicked: {
-                                    if (changeLogOrCreditsStack.depth == 1) {
-                                        changeLogOrCreditsStack.push(
-                                                    projectCreditsScrollView)
-                                    }
-                                }
-                            }
-                        }
-                    }
-
-                    StackView {
-                        id: changeLogOrCreditsStack
+                    ProjectCreditsScrollView {
+                        id: projectCreditsScrollView
 
                         Layout.alignment: Qt.AlignCenter
                         Layout.preferredWidth: contentRect.width - JamiTheme.preferredMarginSize * 2
                         Layout.preferredHeight: 128
                         Layout.margins: JamiTheme.preferredMarginSize
-
-                        initialItem: changeLogScrollView
-
-                        clip: true
                     }
 
                     MaterialButton {
diff --git a/src/mainview/components/ChangeLogScrollView.qml b/src/mainview/components/ChangeLogScrollView.qml
deleted file mode 100644
index 601c4ffac..000000000
--- a/src/mainview/components/ChangeLogScrollView.qml
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2020 by Savoir-faire Linux
- * Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
- *
- * This program 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.
- *
- * This program 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 this program.  If not, see <https://www.gnu.org/licenses/>.
- */
-
-import QtQuick 2.14
-import QtQuick.Controls 2.14
-import net.jami.Models 1.0
-import net.jami.Adapters 1.0
-
-ScrollView {
-    id: changeLogScrollView
-
-    anchors.fill: parent
-
-    clip: true
-
-    ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
-
-    TextEdit {
-        id: changeLogTextArea
-
-        width: changeLogScrollView.width
-
-        readOnly: true
-        wrapMode: Text.WordWrap
-
-        font.pointSize: JamiTheme.textFontSize + 1
-        text: UtilsAdapter.getChangeLog()
-        textFormat: TextEdit.RichText
-    }
-
-    background: Rectangle {
-        id: changeLogScrollViewBackground
-
-        radius: 5
-        border.color: JamiTheme.tabbarBorderColor
-    }
-}
diff --git a/src/mainview/components/ProjectCreditsScrollView.qml b/src/mainview/components/ProjectCreditsScrollView.qml
index ad1389a1a..0f71e6463 100644
--- a/src/mainview/components/ProjectCreditsScrollView.qml
+++ b/src/mainview/components/ProjectCreditsScrollView.qml
@@ -24,8 +24,6 @@ import net.jami.Adapters 1.0
 ScrollView {
     id: projectCreditsScrollView
 
-    anchors.fill: parent
-
     clip: true
 
     ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
diff --git a/src/utils.cpp b/src/utils.cpp
index 36cdf4f72..b38484f7e 100644
--- a/src/utils.cpp
+++ b/src/utils.cpp
@@ -377,23 +377,6 @@ Utils::forceDeleteAsync(const QString& path)
     });
 }
 
-QString
-Utils::getChangeLog()
-{
-    QString logs;
-    QFile changeLogFile(":/changelog.html");
-    if (!changeLogFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
-        qDebug().noquote() << " Change log file failed to load";
-        return {};
-    }
-    QTextStream in(&changeLogFile);
-    in.setCodec("UTF-8");
-    while (!in.atEnd()) {
-        logs += in.readLine();
-    }
-    return logs;
-}
-
 QString
 Utils::getProjectCredits()
 {
diff --git a/src/utils.h b/src/utils.h
index 4a804e587..2a7781fb3 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -73,7 +73,6 @@ void showNotification(const QString& message,
                       std::function<void()> const& onClicked);
 QSize getRealSize(QScreen* screen);
 void forceDeleteAsync(const QString& path);
-QString getChangeLog();
 QString getProjectCredits();
 void removeOldVersions();
 
diff --git a/src/utilsadapter.cpp b/src/utilsadapter.cpp
index d6846f34b..85a6bd9a9 100644
--- a/src/utilsadapter.cpp
+++ b/src/utilsadapter.cpp
@@ -35,12 +35,6 @@ UtilsAdapter::UtilsAdapter(QObject* parent)
     , clipboard_(QApplication::clipboard())
 {}
 
-const QString
-UtilsAdapter::getChangeLog()
-{
-    return Utils::getChangeLog();
-}
-
 const QString
 UtilsAdapter::getProjectCredits()
 {
diff --git a/src/utilsadapter.h b/src/utilsadapter.h
index 36e0658c7..9cf95d906 100644
--- a/src/utilsadapter.h
+++ b/src/utilsadapter.h
@@ -34,7 +34,6 @@ public:
     explicit UtilsAdapter(QObject* parent = nullptr);
     ~UtilsAdapter() = default;
 
-    Q_INVOKABLE const QString getChangeLog();
     Q_INVOKABLE const QString getProjectCredits();
     Q_INVOKABLE const QString getVersionStr();
     Q_INVOKABLE void setText(QString text);
-- 
GitLab