Base: fix compile errors in wino-mail-dtkqt (composeview UI, initializeComposition, startNewEmail, authenticator includes)
This commit is contained in:
+30
-11
@@ -60,22 +60,22 @@ void RichTextEditor::setupToolbar(QVBoxLayout *layout) {
|
||||
m_toolbar->addSeparator();
|
||||
|
||||
// Alignment
|
||||
QAction *alignLeft = m_toolbar->addAction("\xe2\x87\x94L");
|
||||
QAction *alignLeft = m_toolbar->addAction("\\xe2\\x87\\x94L");
|
||||
connect(alignLeft, &QAction::triggered, this, &RichTextEditor::onAlignLeft);
|
||||
|
||||
QAction *alignCenter = m_toolbar->addAction("\xe2\x86\x94C");
|
||||
QAction *alignCenter = m_toolbar->addAction("\\xe2\\x86\\x94C");
|
||||
connect(alignCenter, &QAction::triggered, this, &RichTextEditor::onAlignCenter);
|
||||
|
||||
QAction *alignRight = m_toolbar->addAction("\xe2\x87\x94R");
|
||||
QAction *alignRight = m_toolbar->addAction("\\xe2\\x87\\x94R");
|
||||
connect(alignRight, &QAction::triggered, this, &RichTextEditor::onAlignRight);
|
||||
|
||||
QAction *alignJustify = m_toolbar->addAction("\xe2\x87\x94J");
|
||||
QAction *alignJustify = m_toolbar->addAction("\\xe2\\x87\\x94J");
|
||||
connect(alignJustify, &QAction::triggered, this, &RichTextEditor::onAlignJustify);
|
||||
|
||||
m_toolbar->addSeparator();
|
||||
|
||||
// Lists
|
||||
QAction *bulletAct = m_toolbar->addAction("\xe2\x80\xa2 List");
|
||||
QAction *bulletAct = m_toolbar->addAction("\\xe2\\x80\\xa2 List");
|
||||
connect(bulletAct, &QAction::triggered, this, &RichTextEditor::onBulletList);
|
||||
|
||||
QAction *numAct = m_toolbar->addAction("1. List");
|
||||
@@ -84,20 +84,20 @@ void RichTextEditor::setupToolbar(QVBoxLayout *layout) {
|
||||
m_toolbar->addSeparator();
|
||||
|
||||
// Indent / Outdent
|
||||
QAction *indentAct = m_toolbar->addAction("\xe2\x86\x92 Indent");
|
||||
QAction *indentAct = m_toolbar->addAction("\\xe2\\x86\\x92 Indent");
|
||||
connect(indentAct, &QAction::triggered, this, &RichTextEditor::onIndent);
|
||||
|
||||
QAction *outdentAct = m_toolbar->addAction("\xe2\x86\x90 Outdent");
|
||||
QAction *outdentAct = m_toolbar->addAction("\\xe2\\x86\\x90 Outdent");
|
||||
connect(outdentAct, &QAction::triggered, this, &RichTextEditor::onOutdent);
|
||||
|
||||
m_toolbar->addSeparator();
|
||||
|
||||
// Insert image
|
||||
QAction *imgAct = m_toolbar->addAction("\xf0\x9f\x96\xbc Image");
|
||||
QAction *imgAct = m_toolbar->addAction("\\xf0\\x9f\\x96\\xbc Image");
|
||||
connect(imgAct, &QAction::triggered, this, &RichTextEditor::onInsertImage);
|
||||
|
||||
// Insert table
|
||||
QAction *tableAct = m_toolbar->addAction("\xe2\x96\xa4 Table");
|
||||
QAction *tableAct = m_toolbar->addAction("\\xe2\\x96\\xa4 Table");
|
||||
connect(tableAct, &QAction::triggered, this, &RichTextEditor::onInsertTable);
|
||||
|
||||
layout->addWidget(m_toolbar);
|
||||
@@ -271,7 +271,7 @@ void ComposeView::setupUI() {
|
||||
m_subjectField->setFont(subjectFont);
|
||||
headerLayout->addWidget(m_subjectField, 1);
|
||||
|
||||
m_detachButton = new QPushButton("\xe2\x87\xa5 Detach");
|
||||
m_detachButton = new QPushButton("\\xe2\\x87\\xa5 Detach");
|
||||
m_detachButton->setToolTip("Open compose window in a separate window");
|
||||
m_detachButton->setStyleSheet(
|
||||
"QPushButton { background: transparent; border: 1px solid #d1d1d6; border-radius: 4px; padding: 6px 12px; color: #555; font-size: 12px; }"
|
||||
@@ -483,4 +483,23 @@ void ComposeView::onDetachClicked() {
|
||||
|
||||
void ComposeView::setTo(const QString &to) { m_toField->setText(to); }
|
||||
void ComposeView::setSubject(const QString &subject) { m_subjectField->setText(subject); }
|
||||
void ComposeView::setBody(const QString &body) { m_bodyEditor->setHtml(body); }
|
||||
void ComposeView::setBody(const QString &body) { m_bodyEditor->setHtml(body); }
|
||||
void ComposeView::initializeComposition() {
|
||||
m_toField->clear();
|
||||
m_ccField->clear();
|
||||
m_bccField->clear();
|
||||
m_subjectField->clear();
|
||||
m_bodyEditor->clear();
|
||||
m_ccRow->setVisible(false);
|
||||
m_bccRow->setVisible(false);
|
||||
m_schedulePanel->setVisible(false);
|
||||
m_toField->setFocus();
|
||||
}
|
||||
|
||||
void ComposeView::startNewEmail(const QString &initialRecipient) {
|
||||
initializeComposition();
|
||||
if (!initialRecipient.isEmpty())
|
||||
m_toField->setText(initialRecipient);
|
||||
m_toField->setFocus();
|
||||
}
|
||||
#include "composeview.moc"
|
||||
Reference in New Issue
Block a user