mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-04-24 15:37:23 +00:00
Release 3.2.0 patches update
This commit is contained in:
parent
fbf89f61b4
commit
927e93b7fc
@ -17,7 +17,7 @@ optdepends=("catalyst: for GPU monitor"
|
||||
makedepends=('cmake' 'extra-cmake-modules' 'python')
|
||||
source=(https://github.com/arcan1s/awesome-widgets/releases/download/V.${pkgver}/${_pkgname}-${pkgver}-src.tar.xz)
|
||||
install=${pkgname}.install
|
||||
md5sums=('6d9c98b040c89d9c4ec8fc17ae35eecd')
|
||||
md5sums=('81a85890d519bd8c5791d0d99cffc9c1')
|
||||
backup=('etc/xdg/plasma-dataengine-extsysmon.conf')
|
||||
|
||||
prepare() {
|
||||
|
@ -1,89 +0,0 @@
|
||||
diff --git a/sources/extsysmon/extsysmon.cpp b/sources/extsysmon/extsysmon.cpp
|
||||
index 69934c4..a48b8e7 100644
|
||||
--- a/sources/extsysmon/extsysmon.cpp
|
||||
+++ b/sources/extsysmon/extsysmon.cpp
|
||||
@@ -74,7 +74,10 @@ bool ExtendedSysMon::updateSourceEvent(const QString &source)
|
||||
qCDebug(LOG_ESM) << "Source" << source;
|
||||
|
||||
if (aggregator->hasSource(source)) {
|
||||
- setData(source, QString("value"), aggregator->data(source));
|
||||
+ QVariant data = aggregator->data(source);
|
||||
+ if (data.isNull())
|
||||
+ return false;
|
||||
+ setData(source, QString("value"), data);
|
||||
} else {
|
||||
qCWarning(LOG_ESM) << "Unknown source" << source;
|
||||
return false;
|
||||
diff --git a/sources/extsysmon/sources/playersource.cpp b/sources/extsysmon/sources/playersource.cpp
|
||||
index 769ed9d..c51511c 100644
|
||||
--- a/sources/extsysmon/sources/playersource.cpp
|
||||
+++ b/sources/extsysmon/sources/playersource.cpp
|
||||
@@ -164,12 +164,16 @@ void PlayerSource::run()
|
||||
QHash<QString, QVariant> data = getPlayerMpdInfo(m_mpdAddress);
|
||||
for (auto key : data.keys())
|
||||
m_values[key] = data[key];
|
||||
} else if (m_player == QString("mpris")) {
|
||||
// players which supports mpris
|
||||
- QString mpris = m_mpris == QString("auto") ? getAutoMpris() : m_mpris;
|
||||
- QHash<QString, QVariant> data = getPlayerMprisInfo(mpris);
|
||||
- for (auto key : data.keys())
|
||||
- m_values[key] = data[key];
|
||||
+ if (m_dbusMutex.tryLock()) {
|
||||
+ QString mpris
|
||||
+ = m_mpris == QString("auto") ? getAutoMpris() : m_mpris;
|
||||
+ QHash<QString, QVariant> data = getPlayerMprisInfo(mpris);
|
||||
+ for (auto key : data.keys())
|
||||
+ m_values[key] = data[key];
|
||||
+ m_dbusMutex.unlock();
|
||||
+ }
|
||||
}
|
||||
|
||||
// dymanic properties
|
||||
@@ -258,7 +262,7 @@ QVariantHash PlayerSource::defaultInfo() const
|
||||
QString PlayerSource::getAutoMpris() const
|
||||
{
|
||||
QDBusMessage listServices = QDBusConnection::sessionBus().interface()->call(
|
||||
- QDBus::BlockWithGui, QString("ListNames"));
|
||||
+ QDBus::BlockWithGui, QString("ListNames"), DBUS_CALL_TIMEOUT);
|
||||
if (listServices.arguments().isEmpty())
|
||||
return QString();
|
||||
QStringList arguments = listServices.arguments().first().toStringList();
|
||||
@@ -315,7 +319,8 @@ QVariantHash PlayerSource::getPlayerMprisInfo(const QString mpris) const
|
||||
QString("org.mpris.MediaPlayer2.%1").arg(mpris),
|
||||
QString("/org/mpris/MediaPlayer2"), QString(""), QString("Get"));
|
||||
request.setArguments(args);
|
||||
- QDBusMessage response = bus.call(request, QDBus::BlockWithGui);
|
||||
+ QDBusMessage response
|
||||
+ = bus.call(request, QDBus::BlockWithGui, DBUS_CALL_TIMEOUT);
|
||||
if ((response.type() != QDBusMessage::ReplyMessage)
|
||||
|| (response.arguments().isEmpty())) {
|
||||
qCWarning(LOG_ESS) << "Error message" << response.errorMessage();
|
||||
diff --git a/sources/extsysmon/sources/playersource.h b/sources/extsysmon/sources/playersource.h
|
||||
index 0d8bbfc..2164354 100644
|
||||
--- a/sources/extsysmon/sources/playersource.h
|
||||
+++ b/sources/extsysmon/sources/playersource.h
|
||||
@@ -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")
|
@ -1,15 +0,0 @@
|
||||
diff --git a/sources/awesome-widget/plugin/awkeys.cpp b/sources/awesome-widget/plugin/awkeys.cpp
|
||||
index 1744fb7..f483209 100644
|
||||
--- a/sources/awesome-widget/plugin/awkeys.cpp
|
||||
+++ b/sources/awesome-widget/plugin/awkeys.cpp
|
||||
@@ -234,8 +234,10 @@ void AWKeys::reinitKeys(const QStringList currentKeys)
|
||||
void AWKeys::updateTextData()
|
||||
{
|
||||
// do not do it in parallel to avoid race condition
|
||||
+ m_mutex.lock();
|
||||
calculateValues();
|
||||
QString text = parsePattern(keyOperator->pattern());
|
||||
+ m_mutex.unlock();
|
||||
|
||||
emit(needTextToBeUpdated(text));
|
||||
emit(dataAggregator->updateData(values));
|
@ -1,26 +0,0 @@
|
||||
diff --git a/sources/awesome-widget/package/contents/ui/main.qml b/sources/awesome-widget/package/contents/ui/main.qml
|
||||
index 79c6ddf..0e20bc9 100644
|
||||
--- a/sources/awesome-widget/package/contents/ui/main.qml
|
||||
+++ b/sources/awesome-widget/package/contents/ui/main.qml
|
||||
@@ -84,7 +84,7 @@ Item {
|
||||
// ui
|
||||
Text {
|
||||
id: text
|
||||
- anchors.fill: Plasmoid.Layout
|
||||
+ anchors.fill: parent
|
||||
renderType: Text.NativeRendering
|
||||
textFormat: Text.RichText
|
||||
wrapMode: plasmoid.configuration.wrapText ? Text.WordWrap : Text.NoWrap
|
||||
diff --git a/sources/desktop-panel/package/contents/ui/main.qml b/sources/desktop-panel/package/contents/ui/main.qml
|
||||
index 5a1e9b6..20f8732 100644
|
||||
--- a/sources/desktop-panel/package/contents/ui/main.qml
|
||||
+++ b/sources/desktop-panel/package/contents/ui/main.qml
|
||||
@@ -57,7 +57,7 @@ Item {
|
||||
|
||||
// ui
|
||||
GridLayout {
|
||||
- anchors.fill: Plasmoid.Layout
|
||||
+ anchors.fill: parent
|
||||
columns: plasmoid.configuration.verticalLayout ? 1 : dpAdds.numberOfDesktops()
|
||||
rows: plasmoid.configuration.verticalLayout ? dpAdds.numberOfDesktops() : 1
|
||||
|
@ -1,4 +1,4 @@
|
||||
diff --git a/sources/awesome-widget/package/contents/ui/advanced.qml b/sources/awesome-widget/package/contents/ui/advanced.qml
|
||||
diff --git a/sources/awesome-widget/package/contents/ui/advanced.qml b/sources/awesome-widget/package/contents/ui/advanced.qml
|
||||
index 01bcd58..1ec7ba6 100644
|
||||
--- a/sources/awesome-widget/package/contents/ui/advanced.qml
|
||||
+++ b/sources/awesome-widget/package/contents/ui/advanced.qml
|
||||
@ -168,9 +168,9 @@ index 6263b30..5f61d2a 100644
|
||||
}
|
||||
|
||||
|
||||
-bool AWConfigHelper::exportConfiguration(QObject *nativeConfig,
|
||||
-bool AWConfigHelper::exportConfiguration(const QObject *nativeConfig,
|
||||
- const QString fileName) const
|
||||
+void AWConfigHelper::exportConfiguration(QObject *nativeConfig) const
|
||||
+void AWConfigHelper::exportConfiguration(const QObject *nativeConfig) const
|
||||
{
|
||||
- qCDebug(LOG_AW) << "Selected filename" << fileName;
|
||||
-
|
||||
@ -302,17 +302,17 @@ index 912ac3d..dc51dfb 100644
|
||||
virtual ~AWConfigHelper();
|
||||
Q_INVOKABLE QString configurationDirectory() const;
|
||||
Q_INVOKABLE bool dropCache() const;
|
||||
- Q_INVOKABLE bool exportConfiguration(QObject *nativeConfig,
|
||||
- Q_INVOKABLE bool exportConfiguration(const QObject *nativeConfig,
|
||||
- const QString fileName) const;
|
||||
- Q_INVOKABLE QVariantMap importConfiguration(const QString fileName,
|
||||
- const bool importPlasmoid,
|
||||
- const bool importExtensions,
|
||||
- const bool importAdds) const;
|
||||
+ Q_INVOKABLE void exportConfiguration(QObject *nativeConfig) const;
|
||||
+ Q_INVOKABLE void exportConfiguration(const QObject *nativeConfig) const;
|
||||
+ Q_INVOKABLE QVariantMap importConfiguration() const;
|
||||
// dataengine
|
||||
Q_INVOKABLE QVariantMap readDataEngineConfiguration() const;
|
||||
Q_INVOKABLE void
|
||||
Q_INVOKABLE bool
|
||||
@@ -51,6 +47,7 @@ private:
|
||||
void copySettings(QSettings &from, QSettings &to) const;
|
||||
void readFile(QSettings &settings, const QString key,
|
||||
@ -356,7 +356,7 @@ diff --git a/sources/awdebug.cpp b/sources/awdebug.cpp
|
||||
index eee61e1..9da8dad 100644
|
||||
--- a/sources/awdebug.cpp
|
||||
+++ b/sources/awdebug.cpp
|
||||
@@ -20,13 +20,10 @@
|
||||
@@ -20,15 +20,11 @@
|
||||
#include "awdebug.h"
|
||||
|
||||
|
||||
@ -365,11 +365,14 @@ index eee61e1..9da8dad 100644
|
||||
-Q_LOGGING_CATEGORY(LOG_DP, "org.kde.plasma.desktoppanel",
|
||||
- QtMsgType::QtWarningMsg)
|
||||
-Q_LOGGING_CATEGORY(LOG_ESM, "org.kde.plasma.extsysmon", QtMsgType::QtWarningMsg)
|
||||
-Q_LOGGING_CATEGORY(LOG_ESS, "org.kde.plasma.extsysmonsources",
|
||||
- QtMsgType::QtWarningMsg)
|
||||
-Q_LOGGING_CATEGORY(LOG_LIB, "org.kde.plasma.awesomewidgets",
|
||||
- QtMsgType::QtWarningMsg)
|
||||
+Q_LOGGING_CATEGORY(LOG_AW, "org.kde.plasma.awesomewidget")
|
||||
+Q_LOGGING_CATEGORY(LOG_DP, "org.kde.plasma.desktoppanel")
|
||||
+Q_LOGGING_CATEGORY(LOG_ESM, "org.kde.plasma.extsysmon")
|
||||
+Q_LOGGING_CATEGORY(LOG_ESM, "org.kde.plasma.extsysmonsources")
|
||||
+Q_LOGGING_CATEGORY(LOG_LIB, "org.kde.plasma.awesomewidgets")
|
||||
|
||||
|
||||
@ -392,8 +395,8 @@ index 33192f7..46e2b1e 100644
|
||||
find_package(Gettext REQUIRED)
|
||||
|
||||
# main qt libraries
|
||||
-find_package(Qt5 5.4.0 REQUIRED COMPONENTS Core DBus Network Qml Widgets)
|
||||
+find_package(Qt5 5.3.0 REQUIRED COMPONENTS Core DBus Network Qml Widgets)
|
||||
-find_package(Qt5 5.4.0 REQUIRED COMPONENTS Core DBus Network Qml Test Widgets)
|
||||
+find_package(Qt5 5.3.0 REQUIRED COMPONENTS Core DBus Network Qml Test Widgets)
|
||||
add_definitions(
|
||||
${Qt5Core_DEFINITIONS} ${Qt5DBus_DEFINITIONS} ${Qt5Network_DEFINITIONS}
|
||||
${Qt5Qml_DEFINITIONS} ${Qt5Widgets_DEFINITIONS}
|
||||
|
@ -141,8 +141,8 @@ index 33192f7..339bb58 100644
|
||||
find_package(Gettext REQUIRED)
|
||||
|
||||
# main qt libraries
|
||||
-find_package(Qt5 5.6.0 REQUIRED COMPONENTS Core DBus Network Qml Widgets)
|
||||
+find_package(Qt5 5.4.0 REQUIRED COMPONENTS Core DBus Network Qml Widgets)
|
||||
-find_package(Qt5 5.6.0 REQUIRED COMPONENTS Core DBus Network Qml Test Widgets)
|
||||
+find_package(Qt5 5.4.0 REQUIRED COMPONENTS Core DBus Network Qml Test Widgets)
|
||||
add_definitions(
|
||||
${Qt5Core_DEFINITIONS} ${Qt5DBus_DEFINITIONS} ${Qt5Network_DEFINITIONS}
|
||||
${Qt5Qml_DEFINITIONS} ${Qt5Widgets_DEFINITIONS}
|
||||
|
@ -19,6 +19,7 @@
|
||||
#ifndef AWTESTLIBRARY_H
|
||||
#define AWTESTLIBRARY_H
|
||||
|
||||
#include <QPair>
|
||||
#include <QStringList>
|
||||
|
||||
|
||||
|
@ -20,6 +20,7 @@
|
||||
#define TESTBATTERYSOURCE_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QPair>
|
||||
|
||||
|
||||
class BatterySource;
|
||||
|
@ -42,7 +42,7 @@ void TestDPPlugin::test_desktops()
|
||||
int current = plugin->currentDesktop();
|
||||
int total = plugin->numberOfDesktops();
|
||||
QVERIFY(total != 0);
|
||||
QVERIFY(current < total);
|
||||
QVERIFY(current <= total);
|
||||
|
||||
int number;
|
||||
if (total == 1)
|
||||
|
@ -20,6 +20,7 @@
|
||||
#define TESTEXTWEATHER_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QPair>
|
||||
|
||||
|
||||
class ExtWeather;
|
||||
|
@ -20,6 +20,7 @@
|
||||
#define TESTGPULOADSOURCE_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QPair>
|
||||
|
||||
|
||||
class GPULoadSource;
|
||||
|
@ -20,6 +20,7 @@
|
||||
#define TESTGPUTEMPSOURCE_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QPair>
|
||||
|
||||
|
||||
class GPUTemperatureSource;
|
||||
|
@ -20,6 +20,7 @@
|
||||
#define TESTHDDTEMPSOURCE_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QPair>
|
||||
|
||||
|
||||
class HDDTemperatureSource;
|
||||
|
Loading…
Reference in New Issue
Block a user