diff --git a/src/appmanager.cpp b/src/appmanager.cpp index 0e2522a05a..a1ab94b441 100644 --- a/src/appmanager.cpp +++ b/src/appmanager.cpp @@ -6,6 +6,7 @@ #include "appmanager.h" #include "src/ipc.h" +#include "src/model/debug/debuglogmodel.h" #include "src/net/toxuri.h" #include "src/net/updatecheck.h" #include "src/nexus.h" @@ -61,8 +62,8 @@ namespace { // inability to register a void* to get back to a class #ifdef LOG_TO_FILE QAtomicPointer logFileFile = nullptr; -QList* logBuffer = new QList(); // Store log messages until log file opened -QMutex* logBufferMutex = new QMutex(); +auto logBuffer = std::make_unique>(); // Store log messages until log file opened +auto logBufferMutex = std::make_unique(); #endif constexpr std::string_view sourceRootPath() @@ -130,73 +131,56 @@ void logMessageHandler(QtMsgType type, const QMessageLogContext& ctxt, const QSt return; } - const QString file = canonicalLogFilePath(ctxt.file); - const QString category = - (ctxt.category != nullptr) ? QString::fromUtf8(ctxt.category) : QStringLiteral("default"); - if ((type == QtDebugMsg && category == QStringLiteral("tox.core") - && (file == QStringLiteral("rtp.c") || file == QStringLiteral("video.c"))) - || (file == QStringLiteral("bwcontroller.c") && msg.contains("update"))) { + // Time should be in UTC to save user privacy on log sharing. + DebugLogModel::LogEntry entry{ + -1, + QDateTime::currentDateTime().toUTC(), + ctxt.category != nullptr ? QString::fromUtf8(ctxt.category) : QStringLiteral("default"), + canonicalLogFilePath(ctxt.file), + ctxt.line, + type, + "", + }; + + if ((entry.type == QtDebugMsg && entry.category == QStringLiteral("tox.core") + && (entry.file == QStringLiteral("rtp.c") || entry.file == QStringLiteral("video.c"))) + || (entry.file == QStringLiteral("bwcontroller.c") && msg.contains("update"))) { // Don't log verbose toxav messages. return; } - // Time should be in UTC to save user privacy on log sharing - const QTime time = QDateTime::currentDateTime().toUTC().time(); - QString logPrefix = - QStringLiteral("[%1 UTC] (%2) %3:%4 : ") - .arg(time.toString("HH:mm:ss.zzz"), category, file, QString::number(ctxt.line)); - switch (type) { - case QtDebugMsg: - logPrefix += "Debug"; - break; - case QtInfoMsg: - logPrefix += "Info"; - break; - case QtWarningMsg: - logPrefix += "Warning"; - break; - case QtCriticalMsg: - logPrefix += "Critical"; - break; - case QtFatalMsg: - logPrefix += "Fatal"; - break; - default: - break; - } - QString logMsg; for (const auto& line : msg.split('\n')) { - logMsg += logPrefix + ": " + canonicalLogMessage(line) + "\n"; + entry.message = canonicalLogMessage(line); + logMsg += DebugLogModel::render(entry); + logMsg += '\n'; } - const QByteArray LogMsgBytes = logMsg.toUtf8(); - fwrite(LogMsgBytes.constData(), 1, LogMsgBytes.size(), stderr); + const QByteArray logMsgBytes = logMsg.toUtf8(); + fwrite(logMsgBytes.constData(), 1, logMsgBytes.size(), stderr); #ifdef LOG_TO_FILE - FILE* logFilePtr = logFileFile.loadRelaxed(); // atomically load the file pointer + FILE* const logFilePtr = logFileFile.loadRelaxed(); // atomically load the file pointer if (logFilePtr == nullptr) { - logBufferMutex->lock(); - if (logBuffer != nullptr) - logBuffer->append(LogMsgBytes); - - logBufferMutex->unlock(); - } else { - logBufferMutex->lock(); + const QMutexLocker locker(logBufferMutex.get()); if (logBuffer != nullptr) { - // empty logBuffer to file - for (const QByteArray& bufferedMsg : *logBuffer) { - fwrite(bufferedMsg.constData(), 1, bufferedMsg.size(), logFilePtr); - } + logBuffer->append(logMsgBytes); + } + return; + } - delete logBuffer; // no longer needed - logBuffer = nullptr; + const QMutexLocker locker(logBufferMutex.get()); + if (logBuffer != nullptr) { + // empty logBuffer to file + for (const QByteArray& bufferedMsg : *logBuffer) { + fwrite(bufferedMsg.constData(), 1, bufferedMsg.size(), logFilePtr); } - logBufferMutex->unlock(); - fwrite(LogMsgBytes.constData(), 1, LogMsgBytes.size(), logFilePtr); - fflush(logFilePtr); + logBuffer = nullptr; // no longer needed } + + fwrite(logMsgBytes.constData(), 1, logMsgBytes.size(), logFilePtr); + fflush(logFilePtr); #endif } diff --git a/src/model/debug/debuglogmodel.cpp b/src/model/debug/debuglogmodel.cpp index fd6bae9ac9..7a59439ad3 100644 --- a/src/model/debug/debuglogmodel.cpp +++ b/src/model/debug/debuglogmodel.cpp @@ -4,10 +4,15 @@ #include "debuglogmodel.h" +#include "util/ranges.h" + #include #include namespace { +const QString timeFormat = QStringLiteral("HH:mm:ss.zzz"); +const QString dateTimeFormat = QStringLiteral("yyyy-MM-dd HH:mm:ss.zzz"); + QtMsgType parseMsgType(const QString& type) { if (type == "Debug") { @@ -47,7 +52,27 @@ QString renderMsgType(QtMsgType type) return QStringLiteral("Unknown"); } -QList parse(const QStringList& logs) +bool filterAccepts(DebugLogModel::Filter filter, QtMsgType type) +{ + switch (filter) { + case DebugLogModel::All: + return true; + case DebugLogModel::Debug: + return type == QtDebugMsg; + case DebugLogModel::Info: + return type == QtInfoMsg; + case DebugLogModel::Warning: + return type == QtWarningMsg; + case DebugLogModel::Critical: + return type == QtCriticalMsg; + case DebugLogModel::Fatal: + return type == QtFatalMsg; + } + return false; +} +} // namespace + +QList DebugLogModel::parse(const QStringList& logs) { // Regex extraction of log entry // [12:35:16.634 UTC] (default) src/core/core.cpp:370 : Debug: Connected to a TCP relay @@ -56,17 +81,29 @@ QList parse(const QStringList& logs) static const QRegularExpression re( R"(\[([0-9:.]*) UTC\](?: \(([^)]*)\))? (.*?):(\d+) : ([^:]+): (.*))"); + // Assume the last log entry is today. + const QDateTime now = QDateTime::currentDateTime().toUTC(); + QDate lastDate = now.date(); + QTime lastTime = now.time(); + QList result; - for (const QString& log : logs) { + for (const QString& log : qtox::views::reverse(logs)) { const auto match = re.match(log); if (!match.hasMatch()) { qWarning() << "Failed to parse log entry:" << log; continue; } + // Reconstruct the likely date of the log entry. + const QTime entryTime = QTime::fromString(match.captured(1), timeFormat); + if (entryTime > lastTime) { + lastDate = lastDate.addDays(-1); + } + lastTime = entryTime; + DebugLogModel::LogEntry entry; entry.index = result.size(); - entry.time = match.captured(1); + entry.time = QDateTime{lastDate, entryTime}; entry.category = match.captured(2); if (entry.category.isEmpty()) { entry.category = QStringLiteral("default"); @@ -77,36 +114,19 @@ QList parse(const QStringList& logs) entry.message = match.captured(6); result.append(entry); } + + std::reverse(result.begin(), result.end()); return result; } -QString render(const DebugLogModel::LogEntry& entry) +QString DebugLogModel::render(const DebugLogModel::LogEntry& entry, bool includeDate) { return QStringLiteral("[%1 UTC] (%2) %3:%4 : %5: %6") - .arg(entry.time, entry.category, entry.file, QString::number(entry.line), - renderMsgType(entry.type), entry.message); + .arg(includeDate ? entry.time.toString(dateTimeFormat) : entry.time.toString(timeFormat), + entry.category, entry.file, QString::number(entry.line), renderMsgType(entry.type), + entry.message); } -bool filterAccepts(DebugLogModel::Filter filter, QtMsgType type) -{ - switch (filter) { - case DebugLogModel::All: - return true; - case DebugLogModel::Debug: - return type == QtDebugMsg; - case DebugLogModel::Info: - return type == QtInfoMsg; - case DebugLogModel::Warning: - return type == QtWarningMsg; - case DebugLogModel::Critical: - return type == QtCriticalMsg; - case DebugLogModel::Fatal: - return type == QtFatalMsg; - } - return false; -} -} // namespace - DebugLogModel::DebugLogModel(QObject* parent) : QAbstractListModel(parent) { diff --git a/src/model/debug/debuglogmodel.h b/src/model/debug/debuglogmodel.h index b29282a9cb..454cf54804 100644 --- a/src/model/debug/debuglogmodel.h +++ b/src/model/debug/debuglogmodel.h @@ -5,6 +5,7 @@ #pragma once #include +#include #include class DebugLogModel : public QAbstractListModel @@ -29,7 +30,7 @@ class DebugLogModel : public QAbstractListModel /// Index in the original log list. int index; - QString time; + QDateTime time; QString category; QString file; int line; @@ -52,6 +53,21 @@ class DebugLogModel : public QAbstractListModel */ int originalIndex(const QModelIndex& index) const; + /** + * @brief Parse a list of log lines into LogEntry objects. + */ + static QList parse(const QStringList& logs); + + /** + * @brief Render a LogEntry object into a string. + */ + static QString render(const LogEntry& entry, bool includeDate = false); + + static QString renderWithDate(const LogEntry& entry) + { + return render(entry, true); + } + private: void recomputeFilter(); diff --git a/src/widget/form/debug/debuglog.cpp b/src/widget/form/debug/debuglog.cpp index 42a9b73a8b..24741ad4e2 100644 --- a/src/widget/form/debug/debuglog.cpp +++ b/src/widget/form/debug/debuglog.cpp @@ -94,7 +94,6 @@ DebugLogForm::~DebugLogForm() void DebugLogForm::showEvent(QShowEvent* event) { - qDebug() << "Loading logs for debug log view"; debugLogModel_->reload(loadLogs(paths_)); GenericForm::showEvent(event); diff --git a/src/widget/form/settings/advancedform.cpp b/src/widget/form/settings/advancedform.cpp index dedc571d7e..09e10a7a74 100644 --- a/src/widget/form/settings/advancedform.cpp +++ b/src/widget/form/settings/advancedform.cpp @@ -7,12 +7,14 @@ #include "ui_advancedsettings.h" +#include "src/model/debug/debuglogmodel.h" #include "src/net/toxuri.h" #include "src/persistence/profile.h" #include "src/persistence/settings.h" #include "src/widget/tool/imessageboxmanager.h" #include "src/widget/tool/recursivesignalblocker.h" #include "src/widget/translator.h" +#include "util/fileutil.h" #include "util/network.h" #include @@ -23,6 +25,8 @@ #include #include +#include + /** * @class AdvancedForm * @@ -124,29 +128,36 @@ void AdvancedForm::on_btnCopyDebug_clicked() const QString logFileDir = settings.getPaths().getAppCacheDirPath(); const QString logfile = logFileDir + "qtox.log"; - QFile file(logfile); - if (!file.exists()) { - qDebug() << "No debug file found"; + QClipboard* clipboard = QApplication::clipboard(); + if (clipboard == nullptr) { + qDebug() << "Unable to access clipboard"; return; } - QClipboard* clipboard = QApplication::clipboard(); - if (clipboard != nullptr) { - QString debugtext; - if (file.open(QIODevice::ReadOnly | QIODevice::Text)) { - QTextStream in(&file); - debugtext = in.readAll(); - file.close(); - } else { - qDebug() << "Unable to open file for copying to clipboard"; - return; - } + // Maximum number of lines to copy to clipboard. + const int maxDebugLogLines = bodyUI->maxLogLines->value(); + const QStringList lines = FileUtil::tail(logfile, maxDebugLogLines); - clipboard->setText(debugtext, QClipboard::Clipboard); - qDebug() << "Debug log copied to clipboard"; - } else { - qDebug() << "Unable to access clipboard"; + if (lines.isEmpty()) { + return; + } + + // Parse the log entries and remove entries that are too old. + QList logEntries = DebugLogModel::parse(lines); + std::reverse(logEntries.begin(), logEntries.end()); + const QDateTime now = QDateTime::currentDateTimeUtc(); + const int maxDebugLogAge = + bodyUI->maxLogAge->time().hour() * 3600 + bodyUI->maxLogAge->time().minute() * 60; + while (!logEntries.isEmpty() && logEntries.last().time.secsTo(now) > maxDebugLogAge) { + logEntries.removeLast(); } + + QStringList debugText; + std::transform(logEntries.rbegin(), logEntries.rend(), std::back_inserter(debugText), + DebugLogModel::renderWithDate); + + clipboard->setText(debugText.join('\n'), QClipboard::Clipboard); + qDebug() << "Copied" << debugText.size() << "debug log entries to clipboard"; } void AdvancedForm::on_resetButton_clicked() diff --git a/src/widget/form/settings/advancedsettings.ui b/src/widget/form/settings/advancedsettings.ui index 8acb340cd7..ab15db49c2 100644 --- a/src/widget/form/settings/advancedsettings.ui +++ b/src/widget/form/settings/advancedsettings.ui @@ -93,6 +93,63 @@ + + + + + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + + + lines + + + 10 + + + 5000 + + + 1000 + + + + + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + + + Max age: + + + + + + + + + + + + + + Qt::Orientation::Horizontal + + + + 40 + 20 + + + + + + diff --git a/tools/translate.py b/tools/translate.py index 6fa6636549..324e24bafa 100755 --- a/tools/translate.py +++ b/tools/translate.py @@ -181,6 +181,8 @@ def _fix_translation(lang: Language, source: str, text: str) -> str: f"'{source}': '{text}'") if "%" in source: text = text.replace("%%", "%") + if source.startswith(" ") and not text.startswith(" "): + text = " " + text return text diff --git a/translations/ar.ts b/translations/ar.ts index 0d14084e30..0a3eeb48c2 100644 --- a/translations/ar.ts +++ b/translations/ar.ts @@ -624,6 +624,26 @@ which may lead to problems with video calls. Automated translation. تمكين أدوات التصحيح (للمطورين فقط) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + الحد الأقصى لعدد الأسطر التي سيتم نسخها إلى الحافظة عند الضغط على "نسخ سجل التصحيح". + + + lines + Automated translation. + خطوط + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + الحد الأقصى للسن (في الساعات/الدقائق) من خطوط السجل للنسخ في الحافظة عند الضغط على "Copy Debug Log". + + + Max age: + Automated translation. + أقصى سن: + AppManager @@ -1328,7 +1348,7 @@ so you can save the file on Windows. MB Automated translation. - ميغابايت + ميغابايت After pressing minimize (_) qTox will minimize to tray, diff --git a/translations/be.ts b/translations/be.ts index 3eb9ba27e2..2353c57f93 100644 --- a/translations/be.ts +++ b/translations/be.ts @@ -597,6 +597,26 @@ which may lead to problems with video calls. Automated translation. Уключыць інструменты адладкі (толькі для распрацоўшчыкаў) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Максімальная колькасць радкоў, каб скапіяваць у буфер абмену пры націску "Скапіруйце часопіс адладкі". + + + lines + Automated translation. + ліній + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Максімальны ўзрост (у гадзінах/хвілінах) радкоў часопісаў, каб скапіяваць у буфер абмену пры націску "Скапіруйце часопіс адладкі". + + + Max age: + Automated translation. + Максімальны ўзрост: + AppManager diff --git a/translations/ber.ts b/translations/ber.ts index 6a41692a23..606c84e60f 100644 --- a/translations/ber.ts +++ b/translations/ber.ts @@ -679,6 +679,26 @@ which may lead to problems with video calls. Automated translation. ⴰⵙⴻⴽⵛⴻⵎ ⵏ ⵡⴰⵢⴰ ⵢⴻⵜⵜⴰⴵⴵⴰ, ⴰⵎⴻⴷⵢⴰ, Tox ⵖⴻⴼ Tor. ⵢⴻⵔⵏⴰⴷ ⵍⵃⴻⴱⵙ ⵉ ⵓⵥⴻⴹⴹⴰ ⵏ Tox ⴷ ⴰⵛⵓ ⴽⴰⵏ, ⵉⵀⵉ ⵙⴼⴻⴹ ⴽⴰⵏ ⵎⵉ ⴰⵔⴰ ⵉⵍⴰⵇ. + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + ⴰⵎⴹⴰⵏ ⴰⵅⴰⵜⴰⵔ ⵏ ⵉⵣⵔⵉⵔⵉⴳⵏ ⵃⵎⴰ ⴰⴷ ⵏⵙⴽⵛⵎ ⴳ ⵓⴽⵍⵓ ⵍⵍⵉⴳ ⴷⴰ ⵉⵜⵜⵓⵙⵎⵔⴰⵙ "Copy Debug Log". + + + lines + Automated translation. + ⵉⵖⴻⵣⵔⴰⵏ + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + ⵍⴻⵄⵎⴻⵔ ⴰⵎⴻⵇⵇⵔⴰⵏ (ⵙ ⵜⵙⴰⵄⵜⵉⵏ/ⵜⴻⴷⵇⵉⵇⵉⵏ) ⵏ ⵢⵉⴼⴻⵔⴷⵉⵙⴻⵏ ⵏ ⵓⵖⵎⵉⵙ ⴰⵔⴰ ⵜⴻⵙⵏⵓⵍⴼⵓⴹ ⴷⴻⴳ ⵜⴼⴻⵍⵡⵉⵜ ⵏ ⵜⴼⴻⵍⵡⵉⵜ ⵎⵉ ⴰⵔⴰ ⵜⵜⴻⵟⵟⴼⴻⴹ "Snulfuḍ ⴰⵖⵎⵉⵙ ⵏ ⵓⵙⵎⴻⵍ". + + + Max age: + Automated translation. + ⵍⴻⵄⵎⴻⵔ ⴰⵎⴻⵇⵇⵔⴰⵏ: + AppManager @@ -1467,7 +1487,7 @@ so you can save the file on Windows. MB Automated translation. - ⵎⴱ + ⵎⴱ After pressing minimize (_) qTox will minimize to tray, @@ -3379,7 +3399,7 @@ Hide formatting characters: px Automated translation. - px + px Theme diff --git a/translations/bg.ts b/translations/bg.ts index 0876f212a4..e94cdd11d2 100644 --- a/translations/bg.ts +++ b/translations/bg.ts @@ -577,6 +577,26 @@ which may lead to problems with video calls. Automated translation. Инструменти за отстраняване на дефекти (за разработчици) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Максимален брой редове за копиране в клипборда при натискане на „Копиране на журнала за отстраняване на грешки“. + + + lines + Automated translation. + линии + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Максимална възраст (в часове/минути) на редовете в регистрационния файл за копиране в клипборда при натискане на „Копиране на журнала за отстраняване на грешки“. + + + Max age: + Automated translation. + Максимална възраст: + AppManager diff --git a/translations/bn.ts b/translations/bn.ts index ecefcf5aee..d2ee18450a 100644 --- a/translations/bn.ts +++ b/translations/bn.ts @@ -694,6 +694,26 @@ which may lead to problems with video calls. Automated translation. ডিবাগ টুল সক্ষম করুন (শুধুমাত্র বিকাশকারীরা) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + "অনুলিপি ডিবাগ লগ" টিপানোর সময় ক্লিপবোর্ডে অনুলিপি করার জন্য সর্বাধিক সংখ্যক লাইন। + + + lines + Automated translation. + লাইন + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + "অনুলিপি ডিবাগ লগ" টিপানোর সময় ক্লিপবোর্ডে অনুলিপি করতে সর্বাধিক বয়স (ঘন্টা/মিনিটে) লগ লাইনের অনুলিপি করতে। + + + Max age: + Automated translation. + সর্বাধিক বয়স: + AppManager @@ -1495,7 +1515,7 @@ so you can save the file on Windows. MB Automated translation. - এমবি + এমবি After pressing minimize (_) qTox will minimize to tray, @@ -3435,7 +3455,7 @@ Hide formatting characters: px Automated translation. - px + px Theme diff --git a/translations/cs.ts b/translations/cs.ts index a2ad89240a..812c63f0f0 100644 --- a/translations/cs.ts +++ b/translations/cs.ts @@ -577,6 +577,26 @@ může dojít během video hovoru k výpadkům či jiným problémům.Automated translation. Povolit nástroje ladění (pouze pro vývojáře) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Maximální počet řádků, které se mají kopírovat do schránky při stisknutí „Kopírovat protokol ladění“. + + + lines + Automated translation. + řádky + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Maximální věk (v hodinách/minutách) linek protokolu pro kopírování do schránky při stisknutí „Kopírovat protokol debug“. + + + Max age: + Automated translation. + Max Age: + AppManager diff --git a/translations/da.ts b/translations/da.ts index edfa137d28..9a8cd577ee 100644 --- a/translations/da.ts +++ b/translations/da.ts @@ -631,6 +631,26 @@ hvilket kan føre til problemer med videoopkald. Automated translation. Aktiver fejlretningsværktøjer (kun udviklere) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Maksimalt antal linjer, der skal kopieres til udklipsholderen, når du trykker på "Kopier fejlretningslog". + + + lines + Automated translation. + linjer + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Maksimal alder (i timer/minutter) af loglinjer, der skal kopieres til udklipsholderen, når du trykker på "Kopi -debug -log". + + + Max age: + Automated translation. + Max alder: + AppManager @@ -1381,7 +1401,7 @@ så du kan gemme filen på Windows. MB Automated translation. - MB + MB After pressing minimize (_) qTox will minimize to tray, @@ -3243,7 +3263,7 @@ Skjul formateringstegn: px Automated translation. - px + px Theme diff --git a/translations/de.ts b/translations/de.ts index 058302377f..0344c80c41 100644 --- a/translations/de.ts +++ b/translations/de.ts @@ -574,6 +574,26 @@ dadurch kann es zu Problemen bei Videoanrufen kommen. Enable Debug Tools (developers only) Debug-Tools einschalten (nur Entwickler) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Maximale Anzahl der Zeilen, die in die Zwischenablage kopiert werden sollen, wenn Sie auf „Debug-Protokoll kopieren“ klicken. + + + lines + Automated translation. + Zeilen + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Maximales Alter (in Stunden/Minuten) der Protokollzeilen, die in die Zwischenablage kopiert werden sollen, wenn Sie auf „Debug-Protokoll kopieren“ klicken. + + + Max age: + Automated translation. + Maximales Alter: + AppManager diff --git a/translations/el.ts b/translations/el.ts index 1dc27c8ff7..ebe795fa6b 100644 --- a/translations/el.ts +++ b/translations/el.ts @@ -603,6 +603,26 @@ which may lead to problems with video calls. Automated translation. Ενεργοποίηση εργαλείων εντοπισμού σφαλμάτων (μόνο για προγραμματιστές) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Μέγιστος αριθμός γραμμών για αντιγραφή στο πρόχειρο όταν πατάτε "Αντιγραφή αρχείου καταγραφής εντοπισμού σφαλμάτων". + + + lines + Automated translation. + γραμμές + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Μέγιστη ηλικία (σε ώρες/λεπτά) γραμμών καταγραφής για αντιγραφή στο πρόχειρο όταν πατάτε "Αντιγραφή αρχείου καταγραφής εντοπισμού σφαλμάτων". + + + Max age: + Automated translation. + Μέγιστη ηλικία: + AppManager @@ -1289,7 +1309,7 @@ so you can save the file on Windows. MB Automated translation. - MB + MB After pressing minimize (_) qTox will minimize to tray, diff --git a/translations/eo.ts b/translations/eo.ts index 8aac3c942e..a331c92db8 100644 --- a/translations/eo.ts +++ b/translations/eo.ts @@ -654,6 +654,26 @@ kio povas konduki al problemoj kun videovokoj. Automated translation. Ebligu Sencimigajn Ilojn (nur programistoj) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Maksimuma nombro da linioj por kopii en la tondujo premante "Kopii Sencimigan Protokolon". + + + lines + Automated translation. + linioj + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Maksimuma aĝo (en horoj/minutoj) de logaj linioj por kopii en la klipo kiam oni premas "Kopiu Debug Log". + + + Max age: + Automated translation. + Max Age: + AppManager @@ -1402,7 +1422,7 @@ do vi povas konservi la dosieron en Vindozo. MB Automated translation. - MB + MB After pressing minimize (_) qTox will minimize to tray, diff --git a/translations/es.ts b/translations/es.ts index c4a2b95d3c..9c1d5a72fe 100644 --- a/translations/es.ts +++ b/translations/es.ts @@ -575,6 +575,26 @@ lo que puede provocar problemas en las videollamadas. Enable Debug Tools (developers only) Activar herramientas de depuración (solo para desarrolladores) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Número máximo de líneas para copiar en el portapapeles al presionar "Copiar registro de depuración". + + + lines + Automated translation. + pauta + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Antigüedad máxima (en horas/minutos) de las líneas de registro para copiar en el portapapeles al presionar "Copiar registro de depuración". + + + Max age: + Automated translation. + Edad máxima: + AppManager diff --git a/translations/et.ts b/translations/et.ts index 8465b19bc1..d9d9774edb 100644 --- a/translations/et.ts +++ b/translations/et.ts @@ -576,6 +576,26 @@ mis võib põhjustada probleeme videokõnedega. Automated translation. Silumistööriistade lubamine (ainult arendajatele) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + "Kopeerige silumislogi" vajutamisel lõikelauale maksimaalne arv ridasid. + + + lines + Automated translation. + read + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Lõikepuhvrisse kopeeritavate logiridade maksimaalne vanus (tundides/minutites), kui vajutate nuppu "Kopeeri silumislogi". + + + Max age: + Automated translation. + Max vanus: + AppManager diff --git a/translations/fa.ts b/translations/fa.ts index 8ca219d9c5..82a2a49c42 100644 --- a/translations/fa.ts +++ b/translations/fa.ts @@ -595,6 +595,26 @@ which may lead to problems with video calls. Automated translation. فعال کردن ابزار Debug Tools (فقط توسعه دهندگان) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + حداکثر تعداد خطوط برای کپی در کلیپ بورد هنگام فشار دادن "Copy Debug Log". + + + lines + Automated translation. + خط + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + حداکثر سن (به ساعت/دقیقه) خطوط گزارش برای کپی در کلیپ بورد هنگام فشار دادن "Copy Debug Log". + + + Max age: + Automated translation. + حداکثر سن: + AppManager diff --git a/translations/fi.ts b/translations/fi.ts index 23f504a139..9c617d4420 100644 --- a/translations/fi.ts +++ b/translations/fi.ts @@ -576,6 +576,26 @@ mikä voi johtaa ongelmiin videopuheluissa. Automated translation. Ota virheenkorjaustyökalut käyttöön (vain kehittäjät) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Leikepöydälle kopioitavien rivien enimmäismäärä, kun painetaan "Kopioi virheenkorjausloki". + + + lines + Automated translation. + rivit + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Suurin ikä (tunteina/minuutteina) lokiviivoja kopioidaksesi leikepöydälle painamalla "Kopioi Debug Log". + + + Max age: + Automated translation. + Max Age: + AppManager diff --git a/translations/fr.ts b/translations/fr.ts index 4349bbc8ca..015619a9d4 100644 --- a/translations/fr.ts +++ b/translations/fr.ts @@ -576,6 +576,26 @@ ce qui peut entraîner des problèmes lors des appels vidéo. Automated translation. Activer les outils de débogage (développeurs uniquement) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Nombre maximum de lignes à copier dans le presse-papiers en appuyant sur "Copier le journal de débogage". + + + lines + Automated translation. + lignes + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Âge maximum (en heures/minutes) des lignes de journal à copier dans le presse-papiers en appuyant sur "Copier le journal de débogage". + + + Max age: + Automated translation. + Âge maximum: + AppManager diff --git a/translations/gl.ts b/translations/gl.ts index db0dc3efbb..90d9977110 100644 --- a/translations/gl.ts +++ b/translations/gl.ts @@ -596,6 +596,26 @@ o que pode provocar problemas coas videochamadas. Automated translation. Activar ferramentas de depuración (só para programadores) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Número máximo de liñas para copiar no portapapeis ao premer "Copiar rexistro de depuración". + + + lines + Automated translation. + liñas + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + A idade máxima (en horas/minutos) das liñas de rexistro para copiar no portapapeis ao premer "Copiar rexistro de depuración". + + + Max age: + Automated translation. + Idade máxima: + AppManager diff --git a/translations/he.ts b/translations/he.ts index c789372662..32d26106bf 100644 --- a/translations/he.ts +++ b/translations/he.ts @@ -678,6 +678,26 @@ which may lead to problems with video calls. Automated translation. הפעל כלי ניפוי באגים (למפתחים בלבד) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + המספר המרבי של השורות להעתקה בלוח הלוח כאשר לוחצים על "העתק יומן באגים". + + + lines + Automated translation. + קווים + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + הגיל המרבי (בשעות/דקות) של שורות יומן להעתקה ללוח בעת לחיצה על "העתק יומן ניפוי באגים". + + + Max age: + Automated translation. + גיל מקסימום: + AppManager @@ -1479,7 +1499,7 @@ so you can save the file on Windows. MB Automated translation. - MB + MB After pressing minimize (_) qTox will minimize to tray, @@ -3417,7 +3437,7 @@ Hide formatting characters: px Automated translation. - פיקסלים + פיקסלים Theme diff --git a/translations/hr.ts b/translations/hr.ts index c1d88132c5..408d7695f1 100644 --- a/translations/hr.ts +++ b/translations/hr.ts @@ -597,6 +597,26 @@ Ponekad vaša veza možda nije dovoljno dobra da podnese višu kvalitetu videa, Automated translation. Omogući alate za otklanjanje pogrešaka (samo za programere) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Maksimalan broj redaka za kopiranje u međuspremnik kada se pritisne "Kopiraj dnevnik otklanjanja pogrešaka". + + + lines + Automated translation. + crta + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Maksimalna starost (u satima/minutama) redaka dnevnika za kopiranje u međuspremnik kada se pritisne "Kopiraj dnevnik otklanjanja pogrešaka". + + + Max age: + Automated translation. + Max Age: + AppManager diff --git a/translations/hu.ts b/translations/hu.ts index 9ed6dba2db..a258e2f5b9 100644 --- a/translations/hu.ts +++ b/translations/hu.ts @@ -595,6 +595,26 @@ ami problémákat okozhat a videohívásokkal kapcsolatban. Automated translation. Hibakereső eszközök engedélyezése (csak fejlesztőknek) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + A vágólapra másolható sorok maximális száma, amikor megnyomja a "Hibakeresési napló másolása" gombot. + + + lines + Automated translation. + vonalak + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + A vágólapra másolható naplósorok maximális kora (órában/percben), amikor megnyomja a "Hibakeresési napló másolása" gombot. + + + Max age: + Automated translation. + Max életkor: + AppManager diff --git a/translations/is.ts b/translations/is.ts index 53fc88b28a..09a364b7bd 100644 --- a/translations/is.ts +++ b/translations/is.ts @@ -680,6 +680,26 @@ sem getur leitt til vandræða með myndsímtöl. Automated translation. Virkja villuleitarverkfæri (aðeins forritarar) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Hámarksfjöldi lína til að afrita á klemmuspjaldið þegar ýtt er á „Afritaðu kembiforrit“. + + + lines + Automated translation. + línur + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Hámarksaldur (á klukkustundum/mínútum) af timburlínum til að afrita á klemmuspjaldið þegar ýtt er á „Afritaðu kembiforrit“. + + + Max age: + Automated translation. + Hámarksaldur: + AppManager @@ -1481,7 +1501,7 @@ svo þú getur vistað skrána á Windows. MB Automated translation. - MB + MB After pressing minimize (_) qTox will minimize to tray, @@ -3408,7 +3428,7 @@ Fela sniðstafi: px Automated translation. - px + px Theme diff --git a/translations/it.ts b/translations/it.ts index 7ecb50cbb2..fc405a120f 100644 --- a/translations/it.ts +++ b/translations/it.ts @@ -576,6 +576,26 @@ il che può portare a problemi con le videochiamate. Automated translation. Abilita strumenti di debug (solo sviluppatori) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Numero massimo di righe da copiare negli appunti quando si preme "Copia il registro di debug". + + + lines + Automated translation. + linee + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Età massima (in ore/minuti) delle righe di registro da copiare negli appunti quando si preme "Copia il registro di debug". + + + Max age: + Automated translation. + Età massima: + AppManager diff --git a/translations/ja.ts b/translations/ja.ts index a5b78146b7..6700bb81e6 100644 --- a/translations/ja.ts +++ b/translations/ja.ts @@ -605,6 +605,26 @@ which may lead to problems with video calls. Automated translation. デバッグツールを有効にする (開発者のみ) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + 「デバッグログのコピー」を押したときにクリップボードにコピーされる最大行数。 + + + lines + Automated translation. + + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + 「コピーデバッグログ」を押すと、クリップボードにコピーするログラインの最大年齢(時間/分)。 + + + Max age: + Automated translation. + 最大年齢: + AppManager diff --git a/translations/jbo.ts b/translations/jbo.ts index 4eb92fc1d0..a691ad66e9 100644 --- a/translations/jbo.ts +++ b/translations/jbo.ts @@ -689,6 +689,26 @@ so'o roi lo nu do jungau cu na banzu xamgu lo ka zgana lo nu zgana lo vidni Automated translation. fau na akti ti cumki e'u la toks pe la tort ki'u nai ko'a jmina lo kargu be la toks. net gi'e ku'i toljundi ca lo nu sarcu + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + so'i loi lerni poi sarcu lo nu fukpi fi lo bifygau ca lo nu danre lu kopi la debug logu li'u + + + lines + Automated translation. + lerseltcidu + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + lo tcika be li cacra/mentu ku lo logji linji noi sarji lo nu fukyzgau lo bixycpa ca lo nu danre lu kopi la debug logu li'u + + + Max age: + Automated translation. + li makcu nanca: + AppManager @@ -1473,7 +1493,7 @@ e'u do ka'e sfaile lo nu sfaile bu'u la .Windows.zoi ke'a nu MB Automated translation. - MB + MB After pressing minimize (_) qTox will minimize to tray, @@ -3395,7 +3415,7 @@ e.g. "**text**" will show as "text", bold. px Automated translation. - px + px Theme diff --git a/translations/kn.ts b/translations/kn.ts index f7f303b3b7..f267b6bd6e 100644 --- a/translations/kn.ts +++ b/translations/kn.ts @@ -691,6 +691,26 @@ which may lead to problems with video calls. Automated translation. ಡೀಬಗ್ ಪರಿಕರಗಳನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಿ (ಡೆವಲಪರ್‌ಗಳು ಮಾತ್ರ) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + "ನಕಲಿಸಿ ಡೀಬಗ್ ಲಾಗ್" ಅನ್ನು ಒತ್ತುವಾಗ ಕ್ಲಿಪ್‌ಬೋರ್ಡ್‌ಗೆ ನಕಲಿಸಲು ಗರಿಷ್ಠ ಸಂಖ್ಯೆಯ ಸಾಲುಗಳು. + + + lines + Automated translation. + ಸಾಲುಗಳು + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + "ಡೀಬಗ್ ಲಾಗ್ ನಕಲಿಸಿ" ಅನ್ನು ಒತ್ತಿದಾಗ ಕ್ಲಿಪ್‌ಬೋರ್ಡ್‌ಗೆ ನಕಲಿಸಲು ಲಾಗ್ ಲೈನ್‌ಗಳ ಗರಿಷ್ಠ ವಯಸ್ಸು (ಗಂಟೆಗಳು/ನಿಮಿಷಗಳಲ್ಲಿ). + + + Max age: + Automated translation. + ಗರಿಷ್ಠ ವಯಸ್ಸು: + AppManager @@ -1488,7 +1508,7 @@ so you can save the file on Windows. MB Automated translation. - MB + MB After pressing minimize (_) qTox will minimize to tray, @@ -3422,7 +3442,7 @@ Hide formatting characters: px Automated translation. - px + px Theme diff --git a/translations/ko.ts b/translations/ko.ts index b81dfed2f3..c055357d81 100644 --- a/translations/ko.ts +++ b/translations/ko.ts @@ -621,6 +621,26 @@ which may lead to problems with video calls. Automated translation. 디버그 도구 활성화(개발자 전용) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + "디버그 로그 복사"를 누를 때 클립보드에 복사할 최대 줄 수입니다. + + + lines + Automated translation. + 윤곽 + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + "디버그 로그 복사"를 누를 때 클립보드에 복사할 로그 줄의 최대 수명(시간/분)입니다. + + + Max age: + Automated translation. + 최대 연령 : + AppManager @@ -1378,7 +1398,7 @@ so you can save the file on Windows. MB Automated translation. - MB + MB After pressing minimize (_) qTox will minimize to tray, @@ -3266,7 +3286,7 @@ Hide formatting characters: px Automated translation. - px + px Theme diff --git a/translations/li.ts b/translations/li.ts index d3dbe24ec1..89bae92cd2 100644 --- a/translations/li.ts +++ b/translations/li.ts @@ -700,6 +700,26 @@ wat kin leie tot probleme mit videogesprekke. Automated translation. Reset nao de standaardinstellinge + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Maximaal aantal regels um in ‘t klembord te kopiëre es geer op "Debug Log kopiëre" weurt ingedruk. + + + lines + Automated translation. + lijne + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Maximale leeftied (in oere/minute) vaan loglijne um in ‘t klembord te kopiëre bij ‘Coppy Debug Log’. + + + Max age: + Automated translation. + Max leeftied: + AppManager @@ -1530,7 +1550,7 @@ in plaats vaan gans te slete. MB Automated translation. - MB + MB Click here if you find errors in a translation and would like to help fix it. @@ -3561,7 +3581,7 @@ Opmaakteikens verberge: px Automated translation. - px + px Theme diff --git a/translations/lt.ts b/translations/lt.ts index 014bcb752b..ac294193de 100644 --- a/translations/lt.ts +++ b/translations/lt.ts @@ -577,6 +577,26 @@ dėl to gali kilti vaizdo skambučių problemų. Automated translation. Įgalinti derinimo įrankius (tik kūrėjams) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Didžiausias eilučių, kurias reikia nukopijuoti į mainų sritį, skaičius paspaudus „Kopijuoti derinimo žurnalą“. + + + lines + Automated translation. + linijos + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Maksimalus žurnalo linijų amžius (valandomis/minutėmis), kad galėtumėte nukopijuoti į mainų sritį, paspausdami „Kopijuoti derinimo žurnalą“. + + + Max age: + Automated translation. + Maksimalus amžius: + AppManager diff --git a/translations/lv.ts b/translations/lv.ts index a615179d45..b1d9bdf7ac 100644 --- a/translations/lv.ts +++ b/translations/lv.ts @@ -580,6 +580,26 @@ kas var radīt video zvanu problēmas. Automated translation. Iespējot atkļūdošanas rīkus (tikai izstrādātājiem) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Maksimālais rindu skaits, ko kopēt starpliktuvē, nospiežot "Kopēt atkļūdošanas žurnālu". + + + lines + Automated translation. + līnijas + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Maksimālais žurnāla līniju vecums (stundās/minūtēs), ko kopēt starpliktuvē, nospiežot "Kopēt atkļūdošanas žurnālu". + + + Max age: + Automated translation. + Maksimālais vecums: + AppManager @@ -2921,7 +2941,7 @@ Hide formatting characters: px Automated translation. - px + px Theme diff --git a/translations/mk.ts b/translations/mk.ts index b2ab74a4b3..b460b7aae3 100644 --- a/translations/mk.ts +++ b/translations/mk.ts @@ -604,6 +604,26 @@ which may lead to problems with video calls. Automated translation. Овозможи алатки за отстранување грешки (само за програмери) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Максимален број на линии за копирање во таблата со исечоци при притискање на „Копирај дневник за дебагирање“. + + + lines + Automated translation. + линии + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Максимална возраст (во часови/минути) на линии на дневници за копирање во таблата со исечоци при притискање на „Copy Debug Log“. + + + Max age: + Automated translation. + Максимална возраст: + AppManager @@ -1297,7 +1317,7 @@ so you can save the file on Windows. MB Automated translation. - МБ + МБ After pressing minimize (_) qTox will minimize to tray, diff --git a/translations/nb_NO.ts b/translations/nb_NO.ts index 339dcd6cd7..e8eb61cc7d 100644 --- a/translations/nb_NO.ts +++ b/translations/nb_NO.ts @@ -577,6 +577,26 @@ noe som kan forårsake problemer i videosamtaler. Automated translation. Aktiver feilsøkingsverktøy (bare utviklere) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Maksimalt antall linjer å kopiere til utklippstavlen når du trykker "Kopier feilsøkingslogg". + + + lines + Automated translation. + linjer + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Maksimal alder (i timer/minutter) på logglinjer som skal kopieres til utklippstavlen når du trykker på "Kopier feilsøkingslogg". + + + Max age: + Automated translation. + Maks alder: + AppManager diff --git a/translations/nl.ts b/translations/nl.ts index 6abe6d77e8..7994df854d 100644 --- a/translations/nl.ts +++ b/translations/nl.ts @@ -574,6 +574,26 @@ wat kan leiden tot problemen met videogesprekken. Enable Debug Tools (developers only) Debugtools inschakelen (alleen voor ontwikkelaars) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Maximaal aantal regels om naar het klembord te kopiëren bij het drukken op "Debug logboek kopiëren". + + + lines + Automated translation. + lijnen + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Maximale leeftijd (in uren/minuten) van logregels die naar het klembord moeten worden gekopieerd wanneer op "Copy Debug Log" wordt gedrukt. + + + Max age: + Automated translation. + Maximale leeftijd: + AppManager diff --git a/translations/nl_BE.ts b/translations/nl_BE.ts index 556423d5c6..b094138120 100644 --- a/translations/nl_BE.ts +++ b/translations/nl_BE.ts @@ -568,6 +568,22 @@ which may lead to problems with video calls. Enable Debug Tools (developers only) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + + + + lines + + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + + + + Max age: + + AppManager diff --git a/translations/pl.ts b/translations/pl.ts index 10415086e9..c51255434d 100644 --- a/translations/pl.ts +++ b/translations/pl.ts @@ -583,6 +583,26 @@ co może powodować problemy z rozmowami wideo. Automated translation. Włącz narzędzia debugowania (tylko programiści) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Maksymalna liczba linii do skopiowania do schowka podczas nacisku „Kopiuj dziennik debugowania”. + + + lines + Automated translation. + kwestia + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Maksymalny wiek (w godzinach/minutach) linii dziennika do skopiowania do schowka podczas nacisku „Kopiuj dziennik debugowania”. + + + Max age: + Automated translation. + Maksymalny wiek: + AppManager diff --git a/translations/pr.ts b/translations/pr.ts index ea1c2fc539..6826a4ebea 100644 --- a/translations/pr.ts +++ b/translations/pr.ts @@ -557,21 +557,37 @@ Take heed, fer higher qualities demand clearer skies and use more bandwidth. If Enable LAN discovery - Find other ships nearby + Find other ships nearby Enable Debug Tools (developers only) - Enable Debug Tools (fer th' shipwrights only) + Enable Debug Tools (fer th' shipwrights only) Connection settings - How ye connect + How ye connect Disabling this allows, e.g., Tox over Tor. It adds load to the Tox network however, so uncheck only when necessary. force tcp checkbox tooltip Disablin' this allows Toxin' over Tor, but it adds load to yer Toxmates. Be thoughtful. + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Limit o' lines to copy when pressin' "Pick up Debug Log". + + + lines + lines + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Oldest age (in hours/minutes) o' log lines to copy when pressin' "Pick up Debug Log". + + + Max age: + Oldest age: + AppManager diff --git a/translations/pt.ts b/translations/pt.ts index c6cdcc8b21..16d7e6a0d0 100644 --- a/translations/pt.ts +++ b/translations/pt.ts @@ -576,6 +576,26 @@ o que pode levar a problemas com as vídeo-chamadas. Automated translation. Habilitar ferramentas de depuração (somente desenvolvedores) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Número máximo de linhas para copiar para a área de transferência ao pressionar "Copy Debug Log". + + + lines + Automated translation. + linhas + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Idade máxima (em horas/minutos) de linhas de log para copiar na área de transferência ao pressionar "Copy Debug Log". + + + Max age: + Automated translation. + Idade máxima: + AppManager diff --git a/translations/pt_BR.ts b/translations/pt_BR.ts index 639e52159b..d433ef36e3 100644 --- a/translations/pt_BR.ts +++ b/translations/pt_BR.ts @@ -576,6 +576,26 @@ o que pode levar a problemas com as videochamadas. Automated translation. Habilitar ferramentas de depuração (somente desenvolvedores) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Número máximo de linhas a serem copiadas para a área de transferência ao pressionar "Copiar log de depuração". + + + lines + Automated translation. + linhas + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Idade máxima (em horas/minutos) das linhas de log a serem copiadas para a área de transferência ao pressionar "Copiar log de depuração". + + + Max age: + Automated translation. + Idade máxima: + AppManager diff --git a/translations/ro.ts b/translations/ro.ts index 9b2741b8b9..b5fb300796 100644 --- a/translations/ro.ts +++ b/translations/ro.ts @@ -575,6 +575,26 @@ ceea ce poate duce la probleme cu apelurile video. Enable Debug Tools (developers only) Activați instrumentele de depanare (numai pentru dezvoltatori) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Numărul maxim de linii de copiat în clipboard atunci când apăsați „Copy Debug Log”. + + + lines + Automated translation. + linii + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Vârsta maximă (în ore/minute) a liniilor de jurnal pentru a copia în clipboard atunci când apăsați „Copiați jurnalul de depanare”. + + + Max age: + Automated translation. + Vârsta maximă: + AppManager diff --git a/translations/ru.ts b/translations/ru.ts index 9dc1c7b471..370f754042 100644 --- a/translations/ru.ts +++ b/translations/ru.ts @@ -576,6 +576,26 @@ which may lead to problems with video calls. Enable Debug Tools (developers only) Включить Инструменты Отладки (только для разработчиков) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Максимальное количество строк для копирования в буфер обмена при нажатии «Журнал отладки копирования». + + + lines + Automated translation. + линии + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Максимальный возраст (в часах/минутах) строк журнала, которые можно скопировать в буфер обмена при нажатии «Копировать журнал отладки». + + + Max age: + Automated translation. + Максимальный возраст: + AppManager diff --git a/translations/si.ts b/translations/si.ts index e8f4a9cc5d..304473409e 100644 --- a/translations/si.ts +++ b/translations/si.ts @@ -697,6 +697,26 @@ which may lead to problems with video calls. Automated translation. නිදොස් කිරීමේ මෙවලම් සබල කරන්න (සංවර්ධකයින් පමණි) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + "පිටපත් ඩ්රග් ලොග්" එබූ විට ක්ලිප් පුවරුවට පිටපත් කිරීමට උපරිම පේළි ගණන. + + + lines + Automated translation. + රේඛා + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + "නිදොස් ලොගය පිටපත් කරන්න" එබූ විට පසුරු පුවරුවට පිටපත් කිරීමට ලොග් රේඛාවල උපරිම වයස (පැය/විනාඩි වලින්). + + + Max age: + Automated translation. + උපරිම වයස: + AppManager @@ -1498,7 +1518,7 @@ so you can save the file on Windows. MB Automated translation. - MB + MB After pressing minimize (_) qTox will minimize to tray, @@ -3438,7 +3458,7 @@ Hide formatting characters: px Automated translation. - px + px Theme diff --git a/translations/sk.ts b/translations/sk.ts index 4be2da9da2..c745284309 100644 --- a/translations/sk.ts +++ b/translations/sk.ts @@ -577,6 +577,26 @@ Rýchlosť vášho pripojenia nemusí byť vždy dostačujúca pre vyššiu kval Automated translation. Povoliť nástroje na ladenie (len pre vývojárov) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Maximálny počet riadkov na skopírovanie do schránky pri stlačení „Kopírujte debug protokol“. + + + lines + Automated translation. + čiarka + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Maximálny vek (v hodinách/minútach) riadkov denníka, ktoré sa majú skopírovať do schránky pri stlačení tlačidla „Kopírovať denník ladenia“. + + + Max age: + Automated translation. + Maximálny vek: + AppManager diff --git a/translations/sl.ts b/translations/sl.ts index 76c4ee6a86..0c9d682b52 100644 --- a/translations/sl.ts +++ b/translations/sl.ts @@ -610,6 +610,26 @@ kar lahko povzroči težave z video klici. Automated translation. Omogoči orodja za odpravljanje napak (samo za razvijalce) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Največje število vrstic za kopiranje v odložišče, ko pritisnete "Kopiraj dnevnik odpravljanja napak". + + + lines + Automated translation. + črte + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Največja starost (v urah/minutah) dnevnikov, ki jih lahko kopirate v odložišče, ko pritisnete "Kopiraj dnevnik napak". + + + Max age: + Automated translation. + Največja starost: + AppManager @@ -1306,7 +1326,7 @@ tako da lahko datoteko shranite v sistem Windows. MB Automated translation. - MB + MB After pressing minimize (_) qTox will minimize to tray, diff --git a/translations/sq.ts b/translations/sq.ts index 1c74a55090..caf47eb438 100644 --- a/translations/sq.ts +++ b/translations/sq.ts @@ -692,6 +692,26 @@ gjë që mund të çojë në probleme me video thirrjet. Automated translation. Aktivizo mjetet e korrigjimit (vetëm për zhvilluesit) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Numri maksimal i rreshtave për t'u kopjuar në kujtesën e fragmenteve kur shtypni "Copy Debug Log". + + + lines + Automated translation. + linjat + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Mosha maksimale (në orë/minuta) e linjave log për të kopjuar në clipboard kur shtypni "Kopjoni Log Debug Log". + + + Max age: + Automated translation. + Mosha Max: + AppManager @@ -1493,7 +1513,7 @@ kështu që mund ta ruani skedarin në Windows. MB Automated translation. - MB + MB After pressing minimize (_) qTox will minimize to tray, @@ -3433,7 +3453,7 @@ Fshih karakteret e formatimit: px Automated translation. - px + px Theme diff --git a/translations/sr.ts b/translations/sr.ts index f4d12d0dc0..0f740bfdb7 100644 --- a/translations/sr.ts +++ b/translations/sr.ts @@ -597,6 +597,26 @@ which may lead to problems with video calls. Automated translation. Омогући алате за отклањање грешака (само за програмере) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Максимални број линија за копирање у међуспремник приликом притиска "Копирајте дневник за уклањање погрешака". + + + lines + Automated translation. + линије + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Максимална старост (у сатима/минутима) редова дневника за копирање у међуспремник када се притисне „Копирај дневник отклањања грешака“. + + + Max age: + Automated translation. + Максимална старост: + AppManager diff --git a/translations/sr_Latn.ts b/translations/sr_Latn.ts index 4426464e47..ce5aa20153 100644 --- a/translations/sr_Latn.ts +++ b/translations/sr_Latn.ts @@ -569,6 +569,22 @@ which may lead to problems with video calls. Enable Debug Tools (developers only) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + + + + lines + + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + + + + Max age: + + AppManager diff --git a/translations/sv.ts b/translations/sv.ts index 11e9c7e6cb..c6626704af 100644 --- a/translations/sv.ts +++ b/translations/sv.ts @@ -576,6 +576,26 @@ vilket kan leda till problem med videosamtal. Automated translation. Aktivera felsökningsverktyg (endast utvecklare) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Maximalt antal rader för att kopiera till urklippet när du trycker på "Kopieringsfelsökningslogg". + + + lines + Automated translation. + rader + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Maximal ålder (i timmar/minuter) av loglinjer för att kopiera till urklippet när du trycker på "Kopieringsfelsökningslogg". + + + Max age: + Automated translation. + Max ålder: + AppManager diff --git a/translations/sw.ts b/translations/sw.ts index d3b89d1686..db3c69ca4e 100644 --- a/translations/sw.ts +++ b/translations/sw.ts @@ -699,6 +699,26 @@ ambayo inaweza kusababisha matatizo na simu za video. Automated translation. Washa Zana za Utatuzi (wasanidi pekee) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Idadi ya juu ya mistari ya kunakili kwenye clipboard wakati wa kubonyeza "Nakala ya Debug Log". + + + lines + Automated translation. + mistari + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Umri wa juu zaidi (katika saa/dakika) wa mistari ya kumbukumbu ili kunakili kwenye ubao wa kunakili unapobofya "Nakili Rekodi ya Utatuzi". + + + Max age: + Automated translation. + Umri wa juu zaidi: + AppManager @@ -1500,7 +1520,7 @@ kwa hivyo unaweza kuhifadhi faili kwenye Windows. MB Automated translation. - MB + MB After pressing minimize (_) qTox will minimize to tray, @@ -3440,7 +3460,7 @@ Ficha vibambo vya uumbizaji: px Automated translation. - px + px Theme diff --git a/translations/ta.ts b/translations/ta.ts index e16c261b2c..a270623b41 100644 --- a/translations/ta.ts +++ b/translations/ta.ts @@ -620,6 +620,26 @@ qTox இல் தாங்கள் சிக்கலோ பாதுகாப Automated translation. பிழைத்திருத்த கருவிகளை இயக்கு (டெவலப்பர்கள் மட்டும்) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + "பிழைத்திருத்தப் பதிவை நகலெடு" என்பதை அழுத்தும் போது, ​​கிளிப்போர்டில் நகலெடுக்க வேண்டிய வரிகளின் அதிகபட்ச எண்ணிக்கை. + + + lines + Automated translation. + வரிகள் + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + "பிழைத்திருத்தப் பதிவை நகலெடு" என்பதை அழுத்தும் போது கிளிப்போர்டில் நகலெடுக்க பதிவு வரிகளின் அதிகபட்ச வயது (மணி/நிமிடங்களில்). + + + Max age: + Automated translation. + அதிகபட்ச வயது: + AppManager @@ -1317,7 +1337,7 @@ so you can save the file on Windows. MB Automated translation. - எம்பி + எம்பி After pressing minimize (_) qTox will minimize to tray, @@ -3197,7 +3217,7 @@ Hide formatting characters: px Automated translation. - px + px Theme diff --git a/translations/tr.ts b/translations/tr.ts index 6a91a0de09..ab0d4a87d4 100644 --- a/translations/tr.ts +++ b/translations/tr.ts @@ -578,6 +578,26 @@ bu da video görüşmelerinde sorunlara yol açabilir. Automated translation. Hata Ayıklama Araçlarını Etkinleştir (yalnızca geliştiriciler) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + "Hata Ayıklama Günlüğünü Kopyala"ya basıldığında panoya kopyalanacak maksimum satır sayısı. + + + lines + Automated translation. + çizgiler + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + "Hata Ayıklama Günlüğünü Kopyala" düğmesine basıldığında panoya kopyalanacak günlük satırlarının maksimum yaşı (saat/dakika cinsinden). + + + Max age: + Automated translation. + Max Age: + AppManager diff --git a/translations/ug.ts b/translations/ug.ts index b036bd55e9..029b1ea5b5 100644 --- a/translations/ug.ts +++ b/translations/ug.ts @@ -604,6 +604,26 @@ which may lead to problems with video calls. Automated translation. ھەل قىلىش قوراللىرىنى قوزغىتىڭ (ئاچقۇچىلارلا) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + «خاتالىق خاتىرىسىنى كۆچۈرۈش» نى باسقاندا چاپلاش تاختىسىغا كۆچۈرمەكچى بولغان ئەڭ كۆپ قۇر. + + + lines + Automated translation. + قۇر + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + ئەڭ يۇقىرى ياش (بىر نەچچە سائەت / مىنۇت) لىنىيىسى (سائەتلىك / مىنۇتلۇق ۋاقىت) ئارقىلىق «بىر نەچچە سائەت / مىنۇتلۇق ۋاقىت» نى چېكىپ, «بىر نەچچە سائەت / مىنۇتلۇق ۋاقىت» نى چېكىپ, چاپلاش تاختىسى ئارقىلىق چاپلاش تاختىسىغا يۆتكىلىدۇ. + + + Max age: + Automated translation. + ئەڭ چوڭ يېشى: + AppManager @@ -1295,7 +1315,7 @@ so you can save the file on Windows. MB Automated translation. - MB + MB After pressing minimize (_) qTox will minimize to tray, diff --git a/translations/uk.ts b/translations/uk.ts index 1f520e367a..37416fd4d8 100644 --- a/translations/uk.ts +++ b/translations/uk.ts @@ -575,6 +575,26 @@ which may lead to problems with video calls. Enable Debug Tools (developers only) Увімкнути Інструменти Відладки (тільки для розробників) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Максимальна кількість рядків для копіювання в буфер обміну при натисканні "Копіювати журнал налагодження". + + + lines + Automated translation. + лінії + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Максимальний вік (у години/хвилини) рядків журналу для копіювання в буфер обміну при натисканні "Копіювати журнал налагодження". + + + Max age: + Automated translation. + Максимальний вік: + AppManager diff --git a/translations/ur.ts b/translations/ur.ts index 4c04c44735..63378cffda 100644 --- a/translations/ur.ts +++ b/translations/ur.ts @@ -673,6 +673,26 @@ which may lead to problems with video calls. Automated translation. ڈیبگ ٹولز کو فعال کریں (صرف ڈویلپرز) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + "کاپی ڈیبگ لاگ" دبانے پر کلپ بورڈ میں کاپی کرنے کے لیے لائنوں کی زیادہ سے زیادہ تعداد۔ + + + lines + Automated translation. + لائنیں + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + "کاپی ڈیبگ لاگ" دبانے پر کلپ بورڈ میں کاپی کرنے کے لیے لاگ لائنوں کی زیادہ سے زیادہ عمر (گھنٹوں/منٹ میں)۔ + + + Max age: + Automated translation. + زیادہ سے زیادہ عمر: + AppManager @@ -1474,7 +1494,7 @@ so you can save the file on Windows. MB Automated translation. - ایم بی + ایم بی After pressing minimize (_) qTox will minimize to tray, @@ -3414,7 +3434,7 @@ Hide formatting characters: px Automated translation. - px + px Theme diff --git a/translations/vi.ts b/translations/vi.ts index f32e03c987..d95cf6922e 100644 --- a/translations/vi.ts +++ b/translations/vi.ts @@ -575,6 +575,26 @@ có thể dẫn đến sự cố với cuộc gọi điện video. Automated translation. Bật Công cụ gỡ lỗi (chỉ dành cho nhà phát triển) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Số dòng tối đa để sao chép vào bảng nhớ tạm khi nhấn "Sao chép nhật ký gỡ lỗi". + + + lines + Automated translation. + dòng + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + Tuổi tối đa (tính bằng giờ/phút) của các dòng nhật ký để sao chép vào bảng tạm khi nhấn "Bản sao bản gỡ lỗi bản sao". + + + Max age: + Automated translation. + Tuổi tối đa: + AppManager diff --git a/translations/zh_CN.ts b/translations/zh_CN.ts index 125f15c7f9..5b485fd6b5 100644 --- a/translations/zh_CN.ts +++ b/translations/zh_CN.ts @@ -573,6 +573,26 @@ which may lead to problems with video calls. Enable Debug Tools (developers only) 启用调试工具(仅限开发人员) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + 按“复制调试日志”时复制到剪贴板的最大行数。 + + + lines + Automated translation. + 线 + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + 按“复制调试日志”时复制到剪贴板的日志行的最长期限(以小时/分钟为单位)。 + + + Max age: + Automated translation. + 最大年龄: + AppManager diff --git a/translations/zh_TW.ts b/translations/zh_TW.ts index 7890f60c3d..87e69e1857 100644 --- a/translations/zh_TW.ts +++ b/translations/zh_TW.ts @@ -639,6 +639,26 @@ which may lead to problems with video calls. Automated translation. 啟用調試工具(僅限開發人員) + + Maximum number of lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + 按下“複製調試日誌”時,將最大數量複製到剪貼板中。 + + + lines + Automated translation. + + + + Maximum age (in hours/minutes) of log lines to copy into the clipboard when pressing "Copy Debug Log". + Automated translation. + 按下「複製偵錯日誌」時複製到剪貼簿的日誌行的最長期限(以小時/分鐘為單位)。 + + + Max age: + Automated translation. + 最大年齡: + AppManager @@ -1403,7 +1423,7 @@ so you can save the file on Windows. MB Automated translation. - MB + MB After pressing minimize (_) qTox will minimize to tray, @@ -3311,7 +3331,7 @@ Hide formatting characters: px Automated translation. - 像素 + 像素 Theme diff --git a/util/CMakeLists.txt b/util/CMakeLists.txt index 65500e3cbc..e5cf23d27b 100644 --- a/util/CMakeLists.txt +++ b/util/CMakeLists.txt @@ -10,9 +10,11 @@ add_library( src/algorithm.cpp include/util/display.h src/display.cpp + include/util/fileutil.h + src/fileutil.cpp + include/util/interface.h include/util/network.h src/network.cpp - include/util/interface.h include/util/ranges.h src/ranges.cpp include/util/strongtype.h diff --git a/util/include/util/fileutil.h b/util/include/util/fileutil.h new file mode 100644 index 0000000000..9019588509 --- /dev/null +++ b/util/include/util/fileutil.h @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-3.0-or-later + * Copyright © 2025 The TokTok team. + */ + +#pragma once + +template +class QList; +class QString; + +namespace FileUtil { +QList tail(const QString& filename, int count); +} // namespace FileUtil diff --git a/util/src/fileutil.cpp b/util/src/fileutil.cpp new file mode 100644 index 0000000000..e7c2bee082 --- /dev/null +++ b/util/src/fileutil.cpp @@ -0,0 +1,49 @@ +/* SPDX-License-Identifier: GPL-3.0-or-later + * Copyright © 2025 The TokTok team. + */ + +#include "util/fileutil.h" + +#include +#include +#include +#include +#include + +QStringList FileUtil::tail(const QString& filename, int count) +{ + if (count <= 0) { + return {}; + } + + QFile file{filename}; + if (!file.exists()) { + qDebug() << "File" << filename << "does not exist"; + return {}; + } + + if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { + qDebug() << "Unable to open file" << filename; + return {}; + } + + // This could be made more efficient. We don't need to read the whole file, + // but we use this function rarely, so it's not a priority. Clarity of the + // code is more important here. + QStringList lines; + QTextStream in(&file); + while (!in.atEnd()) { + lines.append(in.readLine()); + } + + if (lines.isEmpty()) { + qDebug() << "File" << filename << "is empty"; + return {}; + } + + if (lines.size() <= count) { + return lines; + } + + return lines.mid(lines.size() - count); +}