bool SubmitEditorWidget::canSubmit() const { if (cleanupDescription(descriptionText()).trimmed().isEmpty()) return false; const unsigned checkedCount = checkedFilesCount(); return d->m_emptyFileListEnabled || checkedCount > 0; }
void IssueDetailsGenerator::write( HtmlWriter* writer, HtmlText::Flags flags ) { IssueEntity issue = IssueEntity::find( m_issueId ); if ( issue.isValid() ) { writer->writeBlock( issue.name(), HtmlWriter::Header2Block ); writer->createLayout(); QList<ValueEntity> values; if ( dataManager->setting( "hide_empty_values" ) == "1" ) values = issue.nonEmptyValues(); else values = issue.values(); writer->beginCell( HtmlWriter::TopPane, values.isEmpty() ? 2 : 1 ); writeProperties( writer, issue ); if ( !values.isEmpty() ) { writer->beginCell( HtmlWriter::TopPane ); writeAttributes( writer, values, flags ); } if ( m_description ) { DescriptionEntity description = issue.description(); if ( description.isValid() ) { writer->appendLayoutRow(); writer->beginCell( HtmlWriter::BottomPane, 2 ); writer->writeBlock( descriptionLinks( description, flags ), HtmlWriter::FloatBlock ); writer->writeBlock( tr( "Description" ), HtmlWriter::Header3Block ); writer->writeBlock( descriptionText( description, flags ), HtmlWriter::CommentBlock ); } } if ( m_history != NoHistory ) { writer->appendLayoutRow(); writer->beginCell( HtmlWriter::BottomPane, 2 ); if ( !flags.testFlag( HtmlText::NoInternalLinks ) ) writer->writeBlock( historyLinks( flags ), HtmlWriter::FloatBlock ); writer->writeBlock( tr( "Issue History" ), HtmlWriter::Header3Block ); writeHistory( writer, issue, flags ); } writer->endLayout(); } }
AboutDialog::AboutDialog(QWidget *parent) : QDialog(parent) { setupUi(this); setWindowTitle(tr("About Flacon")); logoLabel->setFixedSize(48, 48); logoLabel->setScaledContents(true); logoLabel->setPixmap(QPixmap(":logo")); authorsEdit->viewport()->setAutoFillBackground(false); thanksEdit->viewport()->setAutoFillBackground(false); translationsEdit->viewport()->setAutoFillBackground(false); programsEdit->viewport()->setAutoFillBackground(false); QString css="<style TYPE='text/css'> " "body { font-family: sans-serif;} " ".name { font-size: 16pt; } " "a { white-space: nowrap ;} " "h2 { font-size: 10pt;} " "li { line-height: 120%;} " ".techInfoKey { white-space: nowrap ; margin: 0 20px 0 16px; } " "</style>"; titleLabel->setText(css + titleText()); aboutLabel->setText(descriptionText() + "<br><br><br>" + copyrightText() + "<hr>" + tr("Homepage: %1").arg(homepageText()) + "<p>" + tr("Bug tracker %1", "About dialog, About tab").arg(bugTrackerText()) + "<p>" + tr("License: %1").arg(licenseText())); authorsEdit->setHtml(css + authorsInfo().asString()); thanksEdit->setHtml(css + tr("Special thanks to:") + thanksInfo().asString()); translationsEdit->setHtml(css + translationsText()); programsEdit->setHtml(css + tr("Flacon uses external programs. Many thanks to their authors!") + programsInfo().asString()); }