uisupport: Provide helpers for dealing with widget changes
[quassel.git] / src / uisupport / aboutdata.cpp
1 /***************************************************************************
2  *   Copyright (C) 2005-2018 by the Quassel Project                        *
3  *   devel@quassel-irc.org                                                 *
4  *                                                                         *
5  *   This program is free software; you can redistribute it and/or modify  *
6  *   it under the terms of the GNU General Public License as published by  *
7  *   the Free Software Foundation; either version 2 of the License, or     *
8  *   (at your option) version 3.                                           *
9  *                                                                         *
10  *   This program is distributed in the hope that it will be useful,       *
11  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
12  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
13  *   GNU General Public License for more details.                          *
14  *                                                                         *
15  *   You should have received a copy of the GNU General Public License     *
16  *   along with this program; if not, write to the                         *
17  *   Free Software Foundation, Inc.,                                       *
18  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
19  ***************************************************************************/
20
21 #include "aboutdata.h"
22
23 #include <QImage>
24 #include <utility>
25
26 #include "quassel.h"
27
28
29 AboutPerson::AboutPerson(QString name, QString nick, QString task, QString emailAddress, QLocale::Language translatedLanguage)
30     : _name(std::move(name))
31     , _nick(std::move(nick))
32     , _task(std::move(task))
33     , _emailAddress(std::move(emailAddress))
34     , _language(translatedLanguage)
35 {
36
37 }
38
39
40 QString AboutPerson::name() const
41 {
42     return _name;
43 }
44
45
46 QString AboutPerson::nick() const
47 {
48     return _nick;
49 }
50
51
52 QString AboutPerson::task() const
53 {
54     return _task;
55 }
56
57
58 QString AboutPerson::emailAddress() const
59 {
60     return _emailAddress;
61 }
62
63
64 QLocale::Language AboutPerson::translatedLanguage() const
65 {
66     return _language;
67 }
68
69
70 QString AboutPerson::prettyName() const
71 {
72     if (!name().isEmpty() && !nick().isEmpty())
73         return name() + " (" + nick() + ')';
74
75     if (name().isEmpty() && !nick().isEmpty())
76         return nick();
77
78     return name();
79 }
80
81
82 /**************************************************************************************************/
83
84
85 AboutData::AboutData(QObject *parent)
86     : QObject(parent)
87 {
88
89 }
90
91
92 QList<AboutPerson> AboutData::authors() const
93 {
94     return _authors;
95 }
96
97
98 QList<AboutPerson> AboutData::credits() const
99 {
100     return _credits;
101 }
102
103
104 AboutData &AboutData::addAuthor(const AboutPerson &author)
105 {
106     _authors.append(author);
107     return *this;
108 }
109
110
111 AboutData &AboutData::addAuthors(std::initializer_list<AboutPerson> authors)
112 {
113     _authors.append(authors);
114     return *this;
115 }
116
117
118 AboutData &AboutData::addCredit(const AboutPerson &credit)
119 {
120     _credits.append(credit);
121     return *this;
122 }
123
124
125 AboutData &AboutData::addCredits(std::initializer_list<AboutPerson> credits)
126 {
127     _credits.append(credits);
128     return *this;
129 }
130
131 #ifdef HAVE_KF5
132
133 KAboutData AboutData::kAboutData() const
134 {
135     KAboutData aboutData(
136         Quassel::buildInfo().applicationName,
137         tr("Quassel IRC"),
138         Quassel::buildInfo().plainVersionString
139     );
140     aboutData.addLicense(KAboutLicense::GPL_V2);
141     aboutData.addLicense(KAboutLicense::GPL_V3);
142     aboutData.setShortDescription(tr("A modern, distributed IRC client"));
143     aboutData.setProgramLogo(QVariant::fromValue(QImage(":/pics/quassel-logo.png")));
144     aboutData.setBugAddress("https://bugs.quassel-irc.org/projects/quassel-irc/issues/new");
145     aboutData.setOrganizationDomain(Quassel::buildInfo().organizationDomain.toUtf8());
146
147     for (const auto &person : authors()) {
148         aboutData.addAuthor(person.prettyName(), person.task(), person.emailAddress());
149     }
150
151     for (const auto &person : credits()) {
152         aboutData.addCredit(person.prettyName(), person.task(), person.emailAddress());
153     }
154
155     return aboutData;
156 }
157
158 #endif
159
160
161 /**************************************************************************************************/
162
163 /*
164  * NOTE: The list of contributors was retrieved from the Git history, but sometimes things fall
165  *       through the cracks... especially for translations, we don't have an easy way to track
166  *       contributors' names.
167  *       If you find wrong data for yourself, want your nickname and/or mail addresses added or
168  *       removed, or feel left out or unfairly credited, please don't hesitate to let us know! We
169  *       do want to credit everyone who has contributed to Quassel development.
170  */
171
172 void AboutData::setQuasselPersons(AboutData *aboutData)
173 {
174     aboutData->addAuthors({
175         { "Manuel Nickschas", "Sputnick", tr("Project founder, lead developer"), "sputnick@quassel-irc.org" },
176         { "Marcus Eggenberger", "EgS", tr("Project motivator, lead developer"), "egs@quassel-irc.org" },
177         { "Alexander von Renteln", "phon", tr("Former lead developer"), "phon@quassel-irc.org" },
178         { "Daniel Albers", "al", tr("Master of Translation, many fixes and enhancements, Travis support") },
179         { "Sebastian Goth", "seezer", tr("Many features, fixes and improvements") },
180         { "Bas Pape", "Tucos", tr("Many fixes and improvements, bug and patch triaging, community support") },
181         { "Shane Synan", "digitalcircuit", tr("IRCv3 support, documentation, many other improvements, testing, outstanding PRs") },
182         { "Janne Koschinski", "justJanne", tr("Quasseldroid, architecture, (mobile) performance, many other improvements and fixes, testing") },
183     });
184
185     aboutData->addCredits({
186         { "A. V. Lukyanov", "", tr("OSX UI improvements") },
187         { "Adam Harwood", "2kah", tr("Chatview improvements") },
188         { "Adam Tulinius", "adamt", tr("Early beta tester and bughunter, Danish translation"), "", QLocale::Danish },
189         { "Adolfo Jayme Barrientos", "", tr("Spanish translation"), "", QLocale::Spanish },
190         { "Adriaan de Groot", "", tr("Build system fixes") },
191         { "Alex Ingram", "", tr("Database performance improvements") },
192         { "Alexander Stein", "", tr("Tray icon fix") },
193         { "Alf Gaida", "agaida", tr("Language improvements") },
194         { "Allan Jude", "", tr("Documentation improvements") },
195         { "André Marcelo Alvarenga", "", tr("Brazilian translation"), "", QLocale::Portuguese },
196         { "Andrej Mernik", "", tr("Slovenian translation"), "", QLocale::Slovenian },
197         { "Andrew Brown", "", tr("Fixes") },
198         { "Arthur Țițeică", "roentgen", tr("Romanian translation"), "", QLocale::Romanian },
199         { "A S Alam", "", tr("Punjabi translation"), "", QLocale::Punjabi },
200         { "Atte Virtanen", "", tr("Finnish translation"), "", QLocale::Finnish },
201         { "Aurélien Gâteau", "agateau", tr("Message indicator support") },
202         { "Awad Mackie", "firesock", tr("Chatview improvements") },
203         { "Armin K", "", tr("Build system fix") },
204         { "", "Ayonix", tr("Build system fix") },
205         { "Benjamin Zeller", "zbenjamin", tr("Windows build system fixes") },
206         { "Ben Rosser", "", tr("AppData metadata, LDAP support") },
207         { "Bernhard Scheirle", "", tr("Nicer tooltips, spell check and other improvements") },
208         { "Bruno Brigras", "", tr("Crash fixes") },
209         { "Bruno Patri", "", tr("French translation"), "", QLocale::French },
210         { "Cédric Valmary", "", tr("Occitan translation"), "", QLocale::Occitan },
211         { "Celeste Paul", "seele", tr("Usability review") },
212         { "Chris Fuenty", "stitch", tr("SASL support") },
213         { "Chris Holland", "Shade / Zren", tr("Various improvements") },
214         { "Chris Le Sueur", "Fish-Face", tr("Various fixes and improvements") },
215         { "Chris Moeller", "kode54", tr("Various fixes and improvements") },
216         { "Christian Schwarz", "", tr("Settings fixes") },
217         { "", "Condex", tr("Galician translation"), "", QLocale::Galician },
218         { "", "cordata", tr("Esperanto translation"), "", QLocale::Esperanto },
219         { "Daniel E. Moctezuma", "", tr("Japanese translation"), "", QLocale::Japanese },
220         { "Daniel Meltzer", "hydrogen", tr("Various fixes and improvements") },
221         { "Daniel Pielmeier", "billie", tr("Gentoo maintainer") },
222         { "Daniel Schaal", "", tr("Certificate handling improvements") },
223         { "Daniel Silverstone", "", tr("Fixes") },
224         { "Daniel Steinmetz", "son", tr("Early beta tester and bughunter (on Vista™!)") },
225         { "David Planella", "", tr("Translation system fixes") },
226         { "David Roden", "Bombe", tr("Fixes") },
227         { "David Sansome", "", tr("OSX Notification Center support") },
228         { "Demiray Muhterem", "", tr("Turkish translation"), "", QLocale::Turkish },
229         { "Deniz Türkoglu", "", tr("Mac fixes") },
230         { "Dennis Schridde", "devurandom", tr("D-Bus notifications") },
231         { "", "derpella", tr("Polish translation"), "", QLocale::Polish },
232         { "Diego Pettenò", "Flameeyes", tr("Build system improvements") },
233         { "Dirk Rettschlag", "MarcLandis", tr("Formatting support and other input line improvements, many other fixes") },
234         { "", "Dorian", tr("French translation"), "", QLocale::French },
235         { "Drew Patridge", "LinuxDolt", tr("BluesTheme stylesheet") },
236         { "Edward Hades", "", tr("Russian translation"), "", QLocale::Russian },
237         { "Fabiano Francesconi", "elbryan", tr("Italian translation"), "", QLocale::Italian },
238         { "Felix Geyer", "debfx", tr("Certificate handling improvements") },
239         { "Felix Kaechele", "", tr("German translation"), "", QLocale::German },
240         { "Florent Castelli", "", tr("Sanitize topic handling, twitch.tv support") },
241         { "Frederik M.J. Vestre", "freqmod", tr("Norwegian translation"), "", QLocale::Norwegian },
242         { "Gábor Németh", "ELITE_x", tr("Hungarian translation"), "", QLocale::Hungarian },
243         { "Gryllida A", "gry", tr("IRC parser improvements") },
244         { "György Balló", "", tr("Fixes") },
245         { "H. İbrahim Güngör", "igungor", tr("Turkish translation"), "", QLocale::Turkish },
246         { "Hannah von Reth", "TheOneRing", tr("Windows build support and Appveyor maintenance, snorenotify backend") },
247         { "Harald Fernengel", "harryF", tr("Initial Qt5 support") },
248         { "Harald Sitter", "apachelogger", tr("{Ku|U}buntu packager, motivator, promoter") },
249         { "Hendrik Leppkes", "nevcairiel", tr("Various features and improvements") },
250         { "Henning Rohlfs", "honk", tr("Various fixes") },
251         { "J-P Nurmi", "", tr("Various fixes") },
252         { "Jaak Ristioja", "", tr("Bugfixes") },
253         { "Jan Alexander Steffens", "heftig", tr("Fixes") },
254         { "Jaroslav Lichtblau", "", tr("Czech translation"), "", QLocale::Czech },
255         { "Jason Joyce", "", tr("Python improvements") },
256         { "Jason Lynch", "", tr("Bugfixes") },
257         { "Javier Llorente", "", tr("Proxy improvements, Spanish translation"), "", QLocale::Spanish },
258         { "Jens Arnold", "amiconn", tr("Postgres migration fixes") },
259         { "Jens True", "", tr("Danish translation"), "", QLocale::Danish },
260         { "Jerome Leclanche", "Adys", tr("Context menu fixes") },
261         { "Jesper Thomschütz", "", tr("Various fixes") },
262         { "Jiri Grönroos", "", tr("Finnish translation"), "", QLocale::Finnish },
263         { "Joe Hansen", "", tr("Danish translation"), "", QLocale::Danish },
264         { "Johannes Huber", "johu", tr("Many fixes and improvements, bug triaging") },
265         { "John Hand", "nox", tr("Original \"All-Seeing Eye\" logo") },
266         { "Jonas Heese", "Dante", tr("Project founder, various improvements") },
267         { "Jonathan Farnham", "", tr("Spanish translation"), "", QLocale::Spanish },
268         { "Joshua T Corbin", "tvakah", tr("Various fixes") },
269         { "Jovan Jojkić", "", tr("Serbian translation"), "", QLocale::Serbian },
270         { "Jure Repinc", "JLP", tr("Slovenian translation"), "", QLocale::Slovenian },
271         { "Jussi Schultink", "jussi01", tr("Tireless tester, {Ku|U}buntu tester and lobbyist, liters of delicious Finnish alcohol") },
272         { "K. Ernest Lee", "iFire", tr("Qt5 porting help, Travis CI setup") },
273         { "Kevin Funk", "KRF", tr("German translation"), "", QLocale::German },
274         { "Kimmo Huoman", "kipe", tr("Buffer merge improvements") },
275         { "Konstantin Bläsi", "", tr("Fixes") },
276         { "Kostas Koudaras", "", tr("Greek translation"), "", QLocale::Greek },
277         { "", "Larso", tr("Finnish translation"), "", QLocale::Finnish },
278         { "Lasse Liehu", "", tr("Finnish translation"), "", QLocale::Finnish },
279         { "Leo Franchi", "", tr("OSX improvements") },
280         { "Liudas Alisauskas", "", tr("Lithuanian translation"), "", QLocale::Lithuanian },
281         { "Luke Faraone", "", tr("Documentation fixes") },
282         { "Maia Kozheva", "", tr("Russian translation"), "", QLocale::Russian },
283         { "Manuel Hoffmann", "contradictioned", tr("German translation"), "", QLocale::German },
284         { "Marcin Jabrzyk", "", tr("Improvements") },
285         { "Marco Genise", "kaffeedoktor", tr("Ideas, hacking, initial motivation") },
286         { "Marco Paolone", "Quizzlo", tr("Italian translation"), "", QLocale::Italian },
287         { "Martin Mayer", "m4yer", tr("German translation"), "", QLocale::German },
288         { "Martin Sandsmark", "sandsmark", tr("Many fixes and improvements, Sonnet support, QuasselDroid") },
289         { "Matt Schatz", "genius3000", tr("Various fixes") },
290         { "Matthias Coy", "pennywise", tr("German translation"), "", QLocale::German },
291         { "Mattia Basaglia", "", tr("Fixes") },
292         { "Michael Groh", "brot", tr("German translation, fixes"), "", QLocale::German },
293         { "Michael Kedzierski", "ycros", tr("Mac fixes") },
294         { "Michael Marley", "mamarley", tr("Many fixes and improvements; Ubuntu PPAs") },
295         { "Miguel Anxo Bouzada", "", tr("Galician translation"), "", QLocale::Galician },
296         { "Miguel Revilla", "", tr("Spanish translation"), "", QLocale::Spanish },
297         { "Nuno Pinheiro", "", tr("Tons of Oxygen icons including the Quassel logo") },
298         { "Patrick Lauer", "bonsaikitten", tr("Gentoo maintainer") },
299         { "Paul Klumpp", "Haudrauf", tr("Initial design and main window layout") },
300         { "Pavel Volkovitskiy", "int", tr("Early beta tester and bughunter") },
301         { "Pedro Araujo", "", tr("Brazilian translation"), "", QLocale::Portuguese },
302         { "Per Nielsen", "", tr("Danish translation"), "", QLocale::Danish },
303         { "Pete Beardmore", "elbeardmorez", tr("Linewrap for input line") },
304         { "Petr Bena", "", tr("Performance improvements and cleanups") },
305         { "", "phuzion", tr("Various fixes") },
306         { "Pierre-Hugues Husson", "", tr("/print command") },
307         { "Pierre Schweitzer", "", tr("Performance improvements") },
308         { "Rafael Belmonte", "EagleScreen", tr("Spanish translation"), "", QLocale::Spanish },
309         { "Raju Devidas Vindane", "", tr("Hindi and Marathi translations"), "", QLocale::Hindi },
310         { "Ramanathan Sivagurunathan", "", tr("Bugfixes") },
311         { "Raul Salinas-Monteagudo", "", tr("Fixes") },
312         { "Regis Perrin", "ZRegis", tr("French translation"), "", QLocale::French },
313         { "Rolf Eike Beer", "DerDakon", tr("Build system improvements") },
314         { "Rolf Michael Bislin", "romibi", tr("Windows build support, automated OSX builds in Travis, various improvements") },
315         { "Roscoe van Wyk", "", tr("Bugfixes") },
316         { "Rüdiger Sonderfeld", "ruediger", tr("Emacs keybindings") },
317         { "Ryan Bales", "selabnayr", tr("Improvements") },
318         { "Sai Nane", "esainane", tr("Various fixes") },
319         { "", "salnx", tr("Highlight configuration improvements") },
320         { "Scott Kitterman", "ScottK", tr("Debian/Kubuntu packager, (packaging/build system) bughunter") },
321         { "Sebastian Meyer", "", tr("Bugfixes, German translation"), "", QLocale::German },
322         { "Sebastien Fricker", "", tr("Audio backend improvements") },
323         { "Sergiu Bivol", "", tr("Romanian translation"), "", QLocale::Romanian },
324         { "", "sfionov", tr("Russian translation"), "", QLocale::Russian },
325         { "Shengjing Zhu", "", tr("Chinese translation"), "", QLocale::Chinese },
326         { "Simon Philips", "", tr("Dutch translation"), "", QLocale::Dutch },
327         { "Sjors Gielen", "dazjorz", tr("Bugfixes") },
328         { "Stefanos Sofroniou", "", tr("Greek translation"), "", QLocale::Greek },
329         { "Stella Rouzi", "differentreality", tr("Greek translation"), "", QLocale::Greek },
330         { "Sungjin Kang", "", tr("Korean translation"), "", QLocale::Korean },
331         { "Sven Anderson", "", tr("Database performance improvements") },
332         { "Svetlana Tkachenko", "gry", tr("Alias improvements") },
333         { "Tae-Hoon Kwon", "", tr("Korean translation"), "", QLocale::Korean },
334         { "Terje Andersen", "tan", tr("Norwegian translation, documentation") },
335         { "Theo Chatzimichos", "tampakrap", tr("Greek translation"), "", QLocale::Greek },
336         { "Theofilos Intzoglou", "", tr("Greek translation"), "", QLocale::Greek },
337         { "Thomas Hogh", "Datafreak", tr("Former Windows builder") },
338         { "Thomas Müller", "", tr("Fixes, Debian packaging") },
339         { "Tim Schumacher", "xAFFE", tr("Fixes and feedback") },
340         { "Tinjo Kohen", "", tr("Esperanto translation"), "", QLocale::Esperanto },
341         { "Tobias Frei", "ToBeFree", tr("German translation"), "", QLocale::German },
342         { "Tomáš Chvátal", "scarabeus", tr("Czech translation"), "", QLocale::Czech },
343         { "Veeti Paananen", "", tr("Certificate handling improvements") },
344         { "Viktor Suprun", "", tr("Russian translation"), "", QLocale::Russian },
345         { "Vít Pelčák", "", tr("Czech translation"), "", QLocale::Czech },
346         { "Volkan Gezer", "", tr("Turkish translation"), "", QLocale::Turkish },
347         { "Weng Xuetian", "wengxt", tr("Build system fix") },
348         { "Willem Jan Palenstijn", "", tr("Fixes") },
349         { "Yaohan Chen", "hagabaka", tr("Network detection improvements") },
350         { "Yuri Chornoivan", "", tr("Ukrainian translation"), "", QLocale::Ukrainian },
351         { "Zé", "", tr("Portuguese translation"), "", QLocale::Portuguese },
352         { "", "zeugma", tr("Turkish translation"), "", QLocale::Turkish }
353     });
354 }