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);
|
||||
}
|
||||
|
||||
void CodeEditor::lineNumberAreaPaintEvent(QPaintEvent *event)
|
||||
void CodeEditor::lineNumberAreaPaintEvent(const QPaintEvent *event)
|
||||
{
|
||||
QPainter painter(mLineNumberArea);
|
||||
painter.fillRect(event->rect(), mWidgetStyle->lineNumBGColor);
|
||||
|
|
|
@ -91,7 +91,7 @@ public:
|
|||
CodeEditor &operator=(const CodeEditor &) = delete;
|
||||
~CodeEditor() override;
|
||||
|
||||
void lineNumberAreaPaintEvent(QPaintEvent *event);
|
||||
void lineNumberAreaPaintEvent(const QPaintEvent *event);
|
||||
int lineNumberAreaWidth();
|
||||
void setStyle(const CodeEditorStyle& newStyle);
|
||||
|
||||
|
|
|
@ -453,7 +453,7 @@ static CppcheckLibraryData::Markup loadMarkup(QXmlStreamReader &xmlReader)
|
|||
return markup;
|
||||
}
|
||||
|
||||
static CppcheckLibraryData::Entrypoint loadEntrypoint(QXmlStreamReader &xmlReader)
|
||||
static CppcheckLibraryData::Entrypoint loadEntrypoint(const QXmlStreamReader &xmlReader)
|
||||
{
|
||||
CppcheckLibraryData::Entrypoint entrypoint;
|
||||
entrypoint.name = xmlReader.attributes().value("name").toString();
|
||||
|
|
|
@ -214,7 +214,7 @@ void SettingsDialog::saveSettingValues() const
|
|||
CodeEditorStyle::saveSettings(&settings, *mCurrentStyle);
|
||||
}
|
||||
|
||||
void SettingsDialog::saveCheckboxValue(QSettings *settings, QCheckBox *box,
|
||||
void SettingsDialog::saveCheckboxValue(QSettings *settings, const QCheckBox *box,
|
||||
const QString &name)
|
||||
{
|
||||
settings->setValue(name, checkStateToBool(box->checkState()));
|
||||
|
|
|
@ -185,7 +185,7 @@ protected:
|
|||
* @param box checkbox to save
|
||||
* @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
|
||||
|
|
|
@ -285,7 +285,7 @@ bool MainWindow::unpackArchive(const QString &archiveName)
|
|||
return runProcess("tar", args);
|
||||
}
|
||||
|
||||
void MainWindow::showResult(QListWidgetItem *item)
|
||||
void MainWindow::showResult(const QListWidgetItem *item)
|
||||
{
|
||||
ui->statusBar->clearMessage();
|
||||
const bool local = item->text().startsWith(DACA2_PACKAGES);
|
||||
|
|
|
@ -47,7 +47,7 @@ public slots:
|
|||
void loadFile();
|
||||
void loadFromClipboard();
|
||||
void filter(const QString& filter);
|
||||
void showResult(QListWidgetItem *item);
|
||||
void showResult(const QListWidgetItem *item);
|
||||
void refreshResults();
|
||||
void fileTreeFilter(const QString &str);
|
||||
void findInFilesClicked();
|
||||
|
|
|
@ -450,7 +450,7 @@
|
|||
<sender>results</sender>
|
||||
<signal>itemDoubleClicked(QListWidgetItem*)</signal>
|
||||
<receiver>MainWindow</receiver>
|
||||
<slot>showResult(QListWidgetItem*)</slot>
|
||||
<slot>showResult(const QListWidgetItem*)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>28</x>
|
||||
|
@ -481,7 +481,7 @@
|
|||
</connections>
|
||||
<slots>
|
||||
<slot>loadFile()</slot>
|
||||
<slot>showResult(QListWidgetItem*)</slot>
|
||||
<slot>showResult(const QListWidgetItem*)</slot>
|
||||
<slot>loadFromClipboard()</slot>
|
||||
<slot>filter(QString)</slot>
|
||||
<slot>refreshResults()</slot>
|
||||
|
|
Loading…
Reference in New Issue