fixed some "Parameter can be made pointer/reference to const" Rider warnings (#5680)
This commit is contained in:
parent
cd21918520
commit
92c089d4ad
|
@ -420,7 +420,7 @@ void CodeEditor::highlightErrorLine()
|
||||||
setExtraSelections(extraSelections);
|
setExtraSelections(extraSelections);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CodeEditor::lineNumberAreaPaintEvent(QPaintEvent *event)
|
void CodeEditor::lineNumberAreaPaintEvent(const QPaintEvent *event)
|
||||||
{
|
{
|
||||||
QPainter painter(mLineNumberArea);
|
QPainter painter(mLineNumberArea);
|
||||||
painter.fillRect(event->rect(), mWidgetStyle->lineNumBGColor);
|
painter.fillRect(event->rect(), mWidgetStyle->lineNumBGColor);
|
||||||
|
|
|
@ -91,7 +91,7 @@ public:
|
||||||
CodeEditor &operator=(const CodeEditor &) = delete;
|
CodeEditor &operator=(const CodeEditor &) = delete;
|
||||||
~CodeEditor() override;
|
~CodeEditor() override;
|
||||||
|
|
||||||
void lineNumberAreaPaintEvent(QPaintEvent *event);
|
void lineNumberAreaPaintEvent(const QPaintEvent *event);
|
||||||
int lineNumberAreaWidth();
|
int lineNumberAreaWidth();
|
||||||
void setStyle(const CodeEditorStyle& newStyle);
|
void setStyle(const CodeEditorStyle& newStyle);
|
||||||
|
|
||||||
|
|
|
@ -453,7 +453,7 @@ static CppcheckLibraryData::Markup loadMarkup(QXmlStreamReader &xmlReader)
|
||||||
return markup;
|
return markup;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CppcheckLibraryData::Entrypoint loadEntrypoint(QXmlStreamReader &xmlReader)
|
static CppcheckLibraryData::Entrypoint loadEntrypoint(const QXmlStreamReader &xmlReader)
|
||||||
{
|
{
|
||||||
CppcheckLibraryData::Entrypoint entrypoint;
|
CppcheckLibraryData::Entrypoint entrypoint;
|
||||||
entrypoint.name = xmlReader.attributes().value("name").toString();
|
entrypoint.name = xmlReader.attributes().value("name").toString();
|
||||||
|
|
|
@ -214,7 +214,7 @@ void SettingsDialog::saveSettingValues() const
|
||||||
CodeEditorStyle::saveSettings(&settings, *mCurrentStyle);
|
CodeEditorStyle::saveSettings(&settings, *mCurrentStyle);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsDialog::saveCheckboxValue(QSettings *settings, QCheckBox *box,
|
void SettingsDialog::saveCheckboxValue(QSettings *settings, const QCheckBox *box,
|
||||||
const QString &name)
|
const QString &name)
|
||||||
{
|
{
|
||||||
settings->setValue(name, checkStateToBool(box->checkState()));
|
settings->setValue(name, checkStateToBool(box->checkState()));
|
||||||
|
|
|
@ -185,7 +185,7 @@ protected:
|
||||||
* @param box checkbox to save
|
* @param box checkbox to save
|
||||||
* @param name name for QSettings to store the value
|
* @param name name for QSettings to store the value
|
||||||
*/
|
*/
|
||||||
static void saveCheckboxValue(QSettings *settings, QCheckBox *box, const QString &name);
|
static void saveCheckboxValue(QSettings *settings, const QCheckBox *box, const QString &name);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Convert bool to Qt::CheckState
|
* @brief Convert bool to Qt::CheckState
|
||||||
|
|
|
@ -285,7 +285,7 @@ bool MainWindow::unpackArchive(const QString &archiveName)
|
||||||
return runProcess("tar", args);
|
return runProcess("tar", args);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::showResult(QListWidgetItem *item)
|
void MainWindow::showResult(const QListWidgetItem *item)
|
||||||
{
|
{
|
||||||
ui->statusBar->clearMessage();
|
ui->statusBar->clearMessage();
|
||||||
const bool local = item->text().startsWith(DACA2_PACKAGES);
|
const bool local = item->text().startsWith(DACA2_PACKAGES);
|
||||||
|
|
|
@ -47,7 +47,7 @@ public slots:
|
||||||
void loadFile();
|
void loadFile();
|
||||||
void loadFromClipboard();
|
void loadFromClipboard();
|
||||||
void filter(const QString& filter);
|
void filter(const QString& filter);
|
||||||
void showResult(QListWidgetItem *item);
|
void showResult(const QListWidgetItem *item);
|
||||||
void refreshResults();
|
void refreshResults();
|
||||||
void fileTreeFilter(const QString &str);
|
void fileTreeFilter(const QString &str);
|
||||||
void findInFilesClicked();
|
void findInFilesClicked();
|
||||||
|
|
|
@ -450,7 +450,7 @@
|
||||||
<sender>results</sender>
|
<sender>results</sender>
|
||||||
<signal>itemDoubleClicked(QListWidgetItem*)</signal>
|
<signal>itemDoubleClicked(QListWidgetItem*)</signal>
|
||||||
<receiver>MainWindow</receiver>
|
<receiver>MainWindow</receiver>
|
||||||
<slot>showResult(QListWidgetItem*)</slot>
|
<slot>showResult(const QListWidgetItem*)</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel">
|
<hint type="sourcelabel">
|
||||||
<x>28</x>
|
<x>28</x>
|
||||||
|
@ -481,7 +481,7 @@
|
||||||
</connections>
|
</connections>
|
||||||
<slots>
|
<slots>
|
||||||
<slot>loadFile()</slot>
|
<slot>loadFile()</slot>
|
||||||
<slot>showResult(QListWidgetItem*)</slot>
|
<slot>showResult(const QListWidgetItem*)</slot>
|
||||||
<slot>loadFromClipboard()</slot>
|
<slot>loadFromClipboard()</slot>
|
||||||
<slot>filter(QString)</slot>
|
<slot>filter(QString)</slot>
|
||||||
<slot>refreshResults()</slot>
|
<slot>refreshResults()</slot>
|
||||||
|
|
Loading…
Reference in New Issue