From 635c0b7a06d358cefcdddb00b7f3b8562c994689 Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Mon, 9 Sep 2019 03:24:09 -0400 Subject: log line and line number when there's an error with the locked order file --- src/pluginlist.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp index 33423225..c6c61da3 100644 --- a/src/pluginlist.cpp +++ b/src/pluginlist.cpp @@ -437,7 +437,10 @@ void PluginList::readLockedOrderFrom(const QString &fileName) } file.open(QIODevice::ReadOnly); + + int lineNumber = 0; while (!file.atEnd()) { + ++lineNumber; QByteArray line = file.readLine(); if ((line.size() > 0) && (line.at(0) != '#')) { QList fields = line.split('|'); @@ -463,6 +466,7 @@ void PluginList::readLockedOrderFrom(const QString &fileName) } } } else { + log::error("locked order file: invalid line #{} '{}'", lineNumber, QString::fromUtf8(line)); reportError(tr("The file containing locked plugin indices is broken")); break; } -- cgit v1.3.1