mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-12 05:07:46 +02:00
do not capture by default all values in lambdas
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
@ -90,7 +90,7 @@ class LogFormatProxyModel : public QIdentityProxyModel {
|
||||
QModelIndex find(const QModelIndex& start, const QString& value, bool reverse) const
|
||||
{
|
||||
QModelIndex parentIndex = parent(start);
|
||||
auto compare = [&](int r) -> QModelIndex {
|
||||
auto compare = [this, start, parentIndex, value](int r) -> QModelIndex {
|
||||
QModelIndex idx = index(r, start.column(), parentIndex);
|
||||
if (!idx.isValid() || idx == start) {
|
||||
return QModelIndex();
|
||||
|
@ -138,7 +138,7 @@ void OtherLogsPage::on_btnReload_clicked()
|
||||
m_currentFile = QString();
|
||||
QMessageBox::critical(this, tr("Error"), tr("Unable to open %1 for reading: %2").arg(m_currentFile, file.errorString()));
|
||||
} else {
|
||||
auto setPlainText = [&](const QString& text) {
|
||||
auto setPlainText = [this](const QString& text) {
|
||||
QString fontFamily = APPLICATION->settings()->get("ConsoleFont").toString();
|
||||
bool conversionOk = false;
|
||||
int fontSize = APPLICATION->settings()->get("ConsoleFontSize").toInt(&conversionOk);
|
||||
@ -149,7 +149,7 @@ void OtherLogsPage::on_btnReload_clicked()
|
||||
doc->setDefaultFont(QFont(fontFamily, fontSize));
|
||||
ui->text->setPlainText(text);
|
||||
};
|
||||
auto showTooBig = [&]() {
|
||||
auto showTooBig = [setPlainText, &file]() {
|
||||
setPlainText(tr("The file (%1) is too big. You may want to open it in a viewer optimized "
|
||||
"for large files.")
|
||||
.arg(file.fileName()));
|
||||
|
Reference in New Issue
Block a user