Merge pull request 'About: remove e-mail addresses of contributors' (#305) from tobtoht/feather:authors_no_emails into master

Reviewed-on: https://git.wownero.com/feather/feather/pulls/305
This commit is contained in:
tobtoht 2021-01-22 05:22:14 +00:00
commit 292f452cfe
4 changed files with 17 additions and 30 deletions

View file

@ -1,8 +1,9 @@
Feather <feather_version> (<feather_git_head>)
https://featherwallet.org
Website: https://featherwallet.org
E-mail: dev@featherwallet.org
Created by dsc <dsc@xmr.pm>, tobtoht <thotbot@protonmail.com>, and contributors.
Created by dsc, tobtoht, and contributors.
Copyright (c) 2020-<current_year>, The Monero Project

View file

@ -1,5 +1,5 @@
dsc <dsc@xmr.pm>
tobtoht <thotbot@protonmail.com>
selsta <selsta@sent.at>
Diego Salazar <rehrar@tuta.io>
Matt Smith <matt@offtopica.uk>
dsc
tobtoht
selsta
Diego Salazar
Matt Smith

View file

@ -26,28 +26,14 @@ AboutDialog::AboutDialog(QWidget *parent)
auto ack_text = Utils::barrayToString(ack);
ui->ackText->setText(ack_text);
auto sm = QApplication::font();
auto font = QApplication::font();
sm.setPointSize(sm.pointSize() - 2);
this->m_model = new QStandardItemModel(this);
this->m_model->setHorizontalHeaderItem(0, Utils::qStandardItem("Name", sm));
this->m_model->setHorizontalHeaderItem(1, Utils::qStandardItem("Email", sm));
m_model = new QStringListModel(this);
QString contributors = Utils::barrayToString(Utils::fileOpenQRC(":assets/contributors.txt"));
QStringList contributor_list = contributors.split("\n");
m_model->setStringList(contributor_list);
ui->authorView->setHeaderHidden(true);
ui->authorView->setModel(this->m_model);
int i = 0;
auto contributors = Utils::barrayToString(Utils::fileOpenQRC(":assets/contributors.txt"));
for(const auto &line: contributors.split("\n")){
// too lazy for regex #sorry #notsorry
auto name = line.left(line.indexOf("<")).trimmed();
auto nameItem = Utils::qStandardItem(name, font);
auto email = line.mid(line.indexOf("<")+1, line.length()).replace(">", "").trimmed();
auto emailItem = Utils::qStandardItem(email, font);
this->m_model->setItem(i, 0, nameItem);
this->m_model->setItem(i, 1, emailItem);
i++;
}
ui->authorView->header()->setSectionResizeMode(QHeaderView::Stretch);
this->adjustSize();

View file

@ -5,7 +5,7 @@
#define ABOUT_H
#include <QDialog>
#include <QStandardItemModel>
#include <QStringListModel>
#include <QAbstractButton>
namespace Ui {
@ -21,7 +21,7 @@ public:
~AboutDialog() override;
private:
QStandardItemModel *m_model;
QStringListModel *m_model;
Ui::AboutDialog *ui;
};