QString Entry::debugInfo() const { QString info; info += QLatin1String("### Entry: ###################\n"); if (!title().isEmpty()) info += QLatin1String("title: #") + title() + QLatin1String("#\n"); if (!summary().isEmpty()) info += QLatin1String("summary: #") + summary() + QLatin1String("#\n"); if (!id().isEmpty()) info += QLatin1String("id: #") + id() + QLatin1String("#\n"); if (!content().isNull()) info += content().debugInfo(); if (!rights().isEmpty()) info += QLatin1String("rights: #") + rights() + QLatin1String("#\n"); QString dupdated = dateTimeToString(updated()); if (!dupdated.isNull()) info += QLatin1String("updated: #") + dupdated + QLatin1String("#\n"); QString dpublished = dateTimeToString(published()); if (!dpublished.isNull()) info += QLatin1String("published: #") + dpublished + QLatin1String("#\n"); QList<Link> dlinks = links(); QList<Link>::ConstIterator endlinks = dlinks.constEnd(); for (QList<Link>::ConstIterator it = dlinks.constBegin(); it != endlinks; ++it) info += (*it).debugInfo(); QList<Category> dcats = categories(); QList<Category>::ConstIterator endcats = dcats.constEnd(); for (QList<Category>::ConstIterator it = dcats.constBegin(); it != endcats; ++it) info += (*it).debugInfo(); info += QLatin1String("### Authors: ###################\n"); QList<Person> dauthors = authors(); QList<Person>::ConstIterator endauthors = dauthors.constEnd(); for (QList<Person>::ConstIterator it = dauthors.constBegin(); it != endauthors; ++it) info += (*it).debugInfo(); info += QLatin1String("### Contributors: ###################\n"); QList<Person> dcontri = contributors(); QList<Person>::ConstIterator endcontri = dcontri.constEnd(); for (QList<Person>::ConstIterator it = dcontri.constBegin(); it != endcontri; ++it) info += (*it).debugInfo(); if (!source().isNull()) info += source().debugInfo(); info += QLatin1String("### Entry end ################\n"); return info; }
QString Source::debugInfo() const { QString info; info += QLatin1String("### Source: ###################\n"); if (!title().isEmpty()) info += QLatin1String("title: #") + title() + QLatin1String("#\n"); if (!subtitle().isEmpty()) info += QLatin1String("subtitle: #") + subtitle() + QLatin1String("#\n"); if (!id().isEmpty()) info += QLatin1String("id: #") + id() + QLatin1String("#\n"); if (!rights().isEmpty()) info += QLatin1String("rights: #") + rights() + QLatin1String("#\n"); if (!icon().isEmpty()) info += QLatin1String("icon: #") + icon() + QLatin1String("#\n"); if (!logo().isEmpty()) info += QLatin1String("logo: #") + logo() + QLatin1String("#\n"); if (!generator().isNull()) info += generator().debugInfo(); QString dupdated = dateTimeToString(updated()); if (!dupdated.isNull()) info += QLatin1String("updated: #") + dupdated + QLatin1String("#\n"); QList<Link> dlinks = links(); QList<Link>::ConstIterator endlinks = dlinks.constEnd(); for (QList<Link>::ConstIterator it = dlinks.constBegin(); it != endlinks; ++it) info += (*it).debugInfo(); QList<Category> dcats = categories(); QList<Category>::ConstIterator endcats = dcats.constEnd(); for (QList<Category>::ConstIterator it = dcats.constBegin(); it != endcats; ++it) info += (*it).debugInfo(); info += QLatin1String("### Authors: ###################\n"); QList<Person> dauthors = authors(); QList<Person>::ConstIterator endauthors = dauthors.constEnd(); for (QList<Person>::ConstIterator it = dauthors.constBegin(); it != endauthors; ++it) info += (*it).debugInfo(); info += QLatin1String("### Contributors: ###################\n"); QList<Person> dcontri = contributors(); QList<Person>::ConstIterator endcontri = dcontri.constEnd(); for (QList<Person>::ConstIterator it = dcontri.constBegin(); it != endcontri; ++it) info += (*it).debugInfo(); info += QLatin1String("### Source end ################\n"); return info; }
AboutDlg::AboutDlg(QWidget *parent) : QDialog(parent) { ui.setupUi(this); ui.quasselLogo->setPixmap(DesktopIcon("quassel", IconLoader::SizeHuge)); ui.versionLabel->setText(QString(tr("<b>Version:</b> %1<br><b>Protocol version:</b> %2<br><b>Built:</b> %3")) .arg(Quassel::buildInfo().fancyVersionString) .arg(Quassel::buildInfo().protocolVersion) .arg(Quassel::buildInfo().buildDate)); ui.aboutTextBrowser->setHtml(about()); ui.authorTextBrowser->setHtml(authors()); ui.contributorTextBrowser->setHtml(contributors()); ui.thanksToTextBrowser->setHtml(thanksTo()); setWindowIcon(Icon("quassel")); }