Log viewer:

- Display correctly all log files.
- Clean it when quitting the settings.
- Clip text.
This commit is contained in:
Julien Wadel 2022-09-29 16:54:00 +02:00
parent fd6fd27909
commit 75f2056442
2 changed files with 3 additions and 1 deletions

View file

@ -213,7 +213,7 @@ void Logger::init (const shared_ptr<linphone::Config> &config) {
QString Logger::getLogText()const{
QDir path = QString::fromStdString(linphone::Core::getLogCollectionPath());
QString prefix = QString::fromStdString(linphone::Core::getLogCollectionPrefix());
auto files = path.entryInfoList(QStringList(prefix+"*.log"), QDir::Files | QDir::NoSymLinks | QDir::Readable, QDir::Time);
auto files = path.entryInfoList(QStringList(prefix+"*.log"), QDir::Files | QDir::NoSymLinks | QDir::Readable, QDir::Time | QDir::Reversed);
QString result;
for(auto fileInfo : files){
QFile file(fileInfo.filePath());

View file

@ -21,6 +21,7 @@ ApplicationWindow {
title: qsTr('settingsTitle')
onClosing: {
logViewer.active = false
SettingsModel.settingsWindowClosing()
tabBar.setCurrentIndex(0)
}
@ -199,6 +200,7 @@ ApplicationWindow {
Layout.topMargin: 20
Layout.leftMargin: 10
Layout.rightMargin: 10
clip: true
delegate: Text {
width: idContentListView.width