Commit 1305a3dc authored by Yuri Chornoivan's avatar Yuri Chornoivan

Fix minor EBN issues and typos

parent b33fb54e
......@@ -475,7 +475,7 @@ void RichTextComposerTest::testWrappedPlainText_data()
QTest::newRow("default") << defaultStr << defaultStr;
QTest::newRow("empty") << QString() << QString();
QTest::newRow("wrap") << QStringLiteral("foosdfsdf sdsf sdfsdfsfs fsf sdfs df sfsdf dsf sdfsdf sf sf sfsdf sdsdf") << QStringLiteral(
"foosdfsdf sdsf sdfsdfsfs fsf sdfs df \nsfsdf dsf sdfsdf sf sf sfsdf sdsdf");
"foosdfsdf sdsf sdfsdfsfs fsf sdfs df sfsdf \ndsf sdfsdf sf sf sfsdf sdsdf");
QTest::newRow("wrap-2") << QStringLiteral("test-test-test-test-test-test-test-test-test-test-test-test-test")
<< QStringLiteral("test-test-test-test-test-test-test-test-\ntest-test-test-test-test");
QTest::newRow("wrap-3") << QStringLiteral("test-test-test-test-test-test-test-test-test-test-test-test-test\n\n") << QStringLiteral(
......
......@@ -68,7 +68,7 @@ public:
Q_REQUIRED_RESULT int linePosition() const;
/**
* @return the column numbe where the cursor is.
* @return the column number where the cursor is.
*/
Q_REQUIRED_RESULT int columnNumber() const;
......
......@@ -116,7 +116,7 @@ void RichTextComposerControler::RichTextComposerControlerPrivate::selectLinkText
cursor->setPosition(cursor->position() - 1, QTextCursor::KeepAnchor);
}
} else if (cursor->hasSelection()) {
// Nothing to to. Using the currently selected text as the link text.
// Nothing to do. Using the currently selected text as the link text.
} else {
// Select current word
cursor->movePosition(QTextCursor::StartOfWord);
......
......@@ -94,20 +94,20 @@ public:
/**
* For all given embedded images, this function replace the image name
* in the <img> tag of the HTML body with cid:content-id, so that the
* in the \<img\> tag of the HTML body with cid:content-id, so that the
* HTML references the image body parts, see RFC 2557.
*
* This is useful when building a MIME message with inline images.
*
* Note that this function works on encoded content already.
*
* @param htmlBody the HTML code in which the <img> tag will be modified.
* @param htmlBody the HTML code in which the \<img\> tag will be modified.
* The HTML code here could come from toHtml(), for example.
*
* @param imageList the list of images of which the <img> tag will be modified.
* @param imageList the list of images of which the \<img\> tag will be modified.
* You can get such a list from the embeddedImages() function.
*
* @return a modified HTML code, where the <img> tags got replaced
* @return a modified HTML code, where the \<img\> tags got replaced
*/
static QByteArray imageNamesToContentIds(const QByteArray &htmlBody, const ImageList &imageList);
......
......@@ -221,16 +221,16 @@ void TableActionMenuPrivate::_k_slotInsertTable()
QTextTableFormat tableFormat;
tableFormat.setBorder(dialog->border());
const int numberOfColumns(dialog->columns());
QVector<QTextLength> contrains;
contrains.reserve(numberOfColumns);
QVector<QTextLength> constrains;
constrains.reserve(numberOfColumns);
const QTextLength::Type type = dialog->typeOfLength();
const int length = dialog->length();
const QTextLength textlength(type, length / numberOfColumns);
for (int i = 0; i < numberOfColumns; ++i) {
contrains.append(textlength);
constrains.append(textlength);
}
tableFormat.setColumnWidthConstraints(contrains);
tableFormat.setColumnWidthConstraints(constrains);
tableFormat.setAlignment(Qt::AlignLeft);
QTextTable *table = cursor.insertTable(dialog->rows(), numberOfColumns);
table->setFormat(tableFormat);
......@@ -278,10 +278,10 @@ void TableActionMenuPrivate::_k_slotTableFormat()
if (tableFormat.hasProperty(QTextFormat::BackgroundBrush)) {
dialog->setTableBackgroundColor(tableFormat.background().color());
}
QVector<QTextLength> contrains = tableFormat.columnWidthConstraints();
if (!contrains.isEmpty()) {
dialog->setTypeOfLength(contrains.at(0).type());
dialog->setLength(contrains.at(0).rawValue() * numberOfColumn);
QVector<QTextLength> constrains = tableFormat.columnWidthConstraints();
if (!constrains.isEmpty()) {
dialog->setTypeOfLength(constrains.at(0).type());
dialog->setLength(constrains.at(0).rawValue() * numberOfColumn);
}
if (dialog->exec()) {
......@@ -295,16 +295,16 @@ void TableActionMenuPrivate::_k_slotTableFormat()
tableFormat.setCellSpacing(dialog->spacing());
tableFormat.setAlignment(dialog->alignment());
QVector<QTextLength> contrains;
contrains.reserve(newNumberOfColumns);
QVector<QTextLength> constrains;
constrains.reserve(newNumberOfColumns);
const QTextLength::Type type = dialog->typeOfLength();
const int length = dialog->length();
const QTextLength textlength(type, length / newNumberOfColumns);
for (int i = 0; i < newNumberOfColumns; ++i) {
contrains.append(textlength);
constrains.append(textlength);
}
tableFormat.setColumnWidthConstraints(contrains);
tableFormat.setColumnWidthConstraints(constrains);
const QColor tableBackgroundColor = dialog->tableBackgroundColor();
if (dialog->useBackgroundColor()) {
if (tableBackgroundColor.isValid()) {
......
......@@ -41,7 +41,7 @@ public:
/**
* @brief setTableCellBackgroundColor
* @param color, set the background color of cell
* @param color set the background color of cell
*/
void setTableCellBackgroundColor(const QColor &color);
......
......@@ -788,7 +788,7 @@ void PlainTextEditor::setCheckSpellingEnabled(bool check)
}
d->checkSpellingEnabled = check;
Q_EMIT checkSpellingChanged(check);
// From the above statment we know know that if we're turning checking
// From the above statement we know that if we're turning checking
// on that we need to create a new highlighter and if we're turning it
// off we should remove the old one.
if (check) {
......
......@@ -612,7 +612,7 @@ void RichTextEditor::setCheckSpellingEnabled(bool check)
}
d->checkSpellingEnabled = check;
Q_EMIT checkSpellingChanged(check);
// From the above statment we know know that if we're turning checking
// From the above statement we know that if we're turning checking
// on that we need to create a new highlighter and if we're turning it
// off we should remove the old one.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment