mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-09-12 02:09:55 +00:00
add one more workaround for possible freezes (#96)
First of all it seems that freezes were caused by stuck dbus calls. I've enabled dbus call timeout (build-configured, default to 3000 msec). And moreover I've added one more thread lock for dbus calls.
This commit is contained in:
@ -18,11 +18,16 @@
|
||||
#ifndef PLAYERSOURCE_H
|
||||
#define PLAYERSOURCE_H
|
||||
|
||||
#include <QMutex>
|
||||
#include <QObject>
|
||||
|
||||
#include "abstractextsysmonsource.h"
|
||||
|
||||
|
||||
#ifndef DBUS_CALL_TIMEOUT
|
||||
#define DBUS_CALL_TIMEOUT 3000
|
||||
#endif /* DBUS_CALL_TIMEOUT */
|
||||
|
||||
class QProcess;
|
||||
|
||||
class PlayerSource : public AbstractExtSysMonSource
|
||||
@ -52,6 +57,7 @@ private:
|
||||
QVariantHash m_mpdCached;
|
||||
QProcess *m_mpdProcess = nullptr;
|
||||
QString m_mpris;
|
||||
QMutex m_dbusMutex;
|
||||
QString m_player;
|
||||
int m_symbols;
|
||||
QStringList m_metadata = QStringList() << QString("album")
|
||||
|
Reference in New Issue
Block a user