Correct Signal/Slot signatures (#2035)

Previous commit had updated declarations in Code Editor Style Dialog to use
const QColor& and const QFont::Weight& variables. This change was not totally
complete as const usage was not propagated to Signal/Slot connect statements.

This commit corrects that oversight.
This commit is contained in:
Scott Furry 2019-07-25 00:29:42 -06:00 committed by Daniel Marjamäki
parent 8f92c43567
commit 88e2e82039
2 changed files with 34 additions and 34 deletions

View File

@ -37,7 +37,7 @@ public:
const QColor& getColor(); const QColor& getColor();
signals: signals:
void colorChanged(QColor& newColor); void colorChanged(const QColor& newColor);
public slots: public slots:
void updateColor(); void updateColor();
@ -58,7 +58,7 @@ public:
const QFont::Weight& getWeight(); const QFont::Weight& getWeight();
signals: signals:
void weightChanged(QFont::Weight& newWeight); void weightChanged(const QFont::Weight& newWeight);
public slots: public slots:
void updateWeight(); void updateWeight();

View File

@ -157,38 +157,38 @@ StyleEditDialog::StyleEditDialog(const CodeEditorStyle& newStyle,
this, SLOT(setStyleDefaultLight())); this, SLOT(setStyleDefaultLight()));
connect(mBtnDefaultDark, SIGNAL(clicked()), connect(mBtnDefaultDark, SIGNAL(clicked()),
this, SLOT(setStyleDefaultDark())); this, SLOT(setStyleDefaultDark()));
connect(mBtnWidgetColorFG, SIGNAL(colorChanged(QColor&)), connect(mBtnWidgetColorFG, SIGNAL(colorChanged(const QColor&)),
this, SLOT(colorChangedWidgetFG(QColor&))); this, SLOT(colorChangedWidgetFG(const QColor&)));
connect(mBtnWidgetColorBG, SIGNAL(colorChanged(QColor&)), connect(mBtnWidgetColorBG, SIGNAL(colorChanged(const QColor&)),
this, SLOT(colorChangedWidgetBG(QColor&))); this, SLOT(colorChangedWidgetBG(const QColor&)));
connect(mBtnHighlightBG, SIGNAL(colorChanged(QColor&)), connect(mBtnHighlightBG, SIGNAL(colorChanged(const QColor&)),
this, SLOT(colorChangedHighlightBG(QColor&))); this, SLOT(colorChangedHighlightBG(const QColor&)));
connect(mBtnLineNumFG, SIGNAL(colorChanged(QColor&)), connect(mBtnLineNumFG, SIGNAL(colorChanged(const QColor&)),
this, SLOT(colorChangedLineNumFG(QColor&))); this, SLOT(colorChangedLineNumFG(const QColor&)));
connect(mBtnLineNumBG, SIGNAL(colorChanged(QColor&)), connect(mBtnLineNumBG, SIGNAL(colorChanged(const QColor&)),
this, SLOT(colorChangedLineNumBG(QColor&))); this, SLOT(colorChangedLineNumBG(const QColor&)));
connect(mBtnKeywordFG, SIGNAL(colorChanged(QColor&)), connect(mBtnKeywordFG, SIGNAL(colorChanged(const QColor&)),
this, SLOT(colorChangedKeywordFG(QColor&))); this, SLOT(colorChangedKeywordFG(const QColor&)));
connect(mCBKeywordWeight, SIGNAL(weightChanged(QFont::Weight&)), connect(mCBKeywordWeight, SIGNAL(weightChanged(const QFont::Weight&)),
this, SLOT(weightChangedKeyword(QFont::Weight&))); this, SLOT(weightChangedKeyword(const QFont::Weight&)));
connect(mBtnClassFG, SIGNAL(colorChanged(QColor&)), connect(mBtnClassFG, SIGNAL(colorChanged(const QColor&)),
this, SLOT(colorChangedClassFG(QColor&))); this, SLOT(colorChangedClassFG(const QColor&)));
connect(mCBClassWeight, SIGNAL(weightChanged(QFont::Weight&)), connect(mCBClassWeight, SIGNAL(weightChanged(const QFont::Weight&)),
this, SLOT(weightChangedClass(QFont::Weight&))); this, SLOT(weightChangedClass(const QFont::Weight&)));
connect(mBtnQuoteFG, SIGNAL(colorChanged(QColor&)), connect(mBtnQuoteFG, SIGNAL(colorChanged(const QColor&)),
this, SLOT(colorChangedQuoteFG(QColor&))); this, SLOT(colorChangedQuoteFG(const QColor&)));
connect(mCBQuoteWeight, SIGNAL(weightChanged(QFont::Weight&)), connect(mCBQuoteWeight, SIGNAL(weightChanged(const QFont::Weight&)),
this, SLOT(weightChangedQuote(QFont::Weight&))); this, SLOT(weightChangedQuote(const QFont::Weight&)));
connect(mBtnCommentFG, SIGNAL(colorChanged(QColor&)), connect(mBtnCommentFG, SIGNAL(colorChanged(const QColor&)),
this, SLOT(colorChangedCommentFG(QColor&))); this, SLOT(colorChangedCommentFG(const QColor&)));
connect(mCBCommentWeight, SIGNAL(weightChanged(QFont::Weight&)), connect(mCBCommentWeight, SIGNAL(weightChanged(const QFont::Weight&)),
this, SLOT(weightChangedComment(QFont::Weight&))); this, SLOT(weightChangedComment(const QFont::Weight&)));
connect(mBtnSymbolFG, SIGNAL(colorChanged(QColor&)), connect(mBtnSymbolFG, SIGNAL(colorChanged(const QColor&)),
this, SLOT(colorChangedSymbolFG(QColor&))); this, SLOT(colorChangedSymbolFG(const QColor&)));
connect(mBtnSymbolBG, SIGNAL(colorChanged(QColor&)), connect(mBtnSymbolBG, SIGNAL(colorChanged(const QColor&)),
this, SLOT(colorChangedSymbolBG(QColor&))); this, SLOT(colorChangedSymbolBG(const QColor&)));
connect(mCBSymbolWeight, SIGNAL(weightChanged(QFont::Weight&)), connect(mCBSymbolWeight, SIGNAL(weightChanged(const QFont::Weight&)),
this, SLOT(weightChangedSymbol(QFont::Weight&))); this, SLOT(weightChangedSymbol(const QFont::Weight&)));
} }
void StyleEditDialog::updateControls() void StyleEditDialog::updateControls()