Commit e2d31866 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Remove some cppcheck warning

parent e4d8ae4e
Pipeline #83379 passed with stage
in 9 minutes and 25 seconds
......@@ -495,7 +495,6 @@ void RichTextComposerControler::RichTextComposerControlerPrivate::updateLink(con
QTextCharFormat format = cursor.charFormat();
// Save original format to create an extra space with the existing char
// format for the block
const QTextCharFormat originalFormat = format;
if (!linkUrl.isEmpty()) {
// Add link details
format.setAnchor(true);
......
......@@ -31,7 +31,7 @@ static inline QString resolveAlias(const QString &name)
class InsertImageWidgetPrivate
{
public:
InsertImageWidgetPrivate(InsertImageWidget *qq)
explicit InsertImageWidgetPrivate(InsertImageWidget *qq)
: q(qq)
{
auto lay = new QVBoxLayout(q);
......
......@@ -20,7 +20,7 @@ using namespace KPIMTextEdit;
class InsertTableDialog::InsertTableDialogPrivate
{
public:
InsertTableDialogPrivate(InsertTableDialog *qq)
explicit InsertTableDialogPrivate(InsertTableDialog *qq)
: q(qq)
{
q->setWindowTitle(i18nc("@title:window", "Insert Table"));
......
......@@ -18,7 +18,7 @@ namespace KPIMTextEdit
class SelectSpecialCharDialogPrivate
{
public:
SelectSpecialCharDialogPrivate(SelectSpecialCharDialog *qq)
explicit SelectSpecialCharDialogPrivate(SelectSpecialCharDialog *qq)
: q(qq)
{
q->setWindowTitle(i18nc("@title:window", "Select Special Characters"));
......
......@@ -281,16 +281,16 @@ void TableActionMenuPrivate::_k_slotTableFormat()
tableFormat.setCellSpacing(dialog->spacing());
tableFormat.setAlignment(dialog->alignment());
QVector<QTextLength> constrains;
constrains.reserve(newNumberOfColumns);
QVector<QTextLength> constrainsText;
constrainsText.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) {
constrains.append(textlength);
constrainsText.append(textlength);
}
tableFormat.setColumnWidthConstraints(constrains);
tableFormat.setColumnWidthConstraints(constrainsText);
const QColor tableBackgroundColor = dialog->tableBackgroundColor();
if (dialog->useBackgroundColor()) {
if (tableBackgroundColor.isValid()) {
......
......@@ -25,7 +25,7 @@ using namespace KPIMTextEdit;
class TableFormatDialog::TableFormatDialogPrivate
{
public:
TableFormatDialogPrivate(TableFormatDialog *qq)
explicit TableFormatDialogPrivate(TableFormatDialog *qq)
: q(qq)
{
q->setWindowTitle(i18nc("@title:window", "Table Format"));
......
......@@ -53,13 +53,12 @@ public:
class PlainTextSyntaxSpellCheckingHighlighterPrivate
{
public:
PlainTextSyntaxSpellCheckingHighlighterPrivate(PlainTextEditor *plainText)
explicit PlainTextSyntaxSpellCheckingHighlighterPrivate(PlainTextEditor *plainText)
: editor(plainText)
, spellCheckingEnabled(false)
{
}
PlainTextEditor *editor = nullptr;
PlainTextEditor *const editor;
QColor misspelledColor;
bool spellCheckingEnabled = false;
......
Supports Markdown
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