mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-23 18:32:53 +00:00
ksystemlog: use scoped locker and non-recursive mutex in analyzer
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
8d8b0b3c05
commit
09f6a669a4
1 changed files with 2 additions and 4 deletions
|
@ -41,7 +41,7 @@ Analyzer::Analyzer(LogMode* logMode) :
|
|||
|
||||
parsingPaused = false;
|
||||
|
||||
insertionLocking = new QMutex(QMutex::Recursive);
|
||||
insertionLocking = new QMutex();
|
||||
}
|
||||
|
||||
Analyzer::~Analyzer() {
|
||||
|
@ -127,7 +127,7 @@ void Analyzer::logFileChanged(LogFileReader* logFileReader, ReadingMode readingM
|
|||
}
|
||||
|
||||
logDebug() << "Locking file modifications of " << logFileReader->logFile().url().path() << endl;
|
||||
insertionLocking->lock();
|
||||
QMutexLocker locker(insertionLocking);
|
||||
logDebug() << "Unlocking file modifications of " << logFileReader->logFile().url().path() << endl;
|
||||
|
||||
QTime benchmark;
|
||||
|
@ -167,8 +167,6 @@ void Analyzer::logFileChanged(LogFileReader* logFileReader, ReadingMode readingM
|
|||
emit statusBarChanged( i18n("Log file '%1' has changed.", logFileReader->logFile().url().path()) );
|
||||
|
||||
logDebug() << "Updating log files in " << benchmark.elapsed() << " ms" << endl;
|
||||
|
||||
insertionLocking->unlock();
|
||||
}
|
||||
|
||||
int Analyzer::insertLines(const QStringList& bufferedLines, const LogFile& logFile, ReadingMode readingMode) {
|
||||
|
|
Loading…
Add table
Reference in a new issue