From fbf89f61b499c191db96420f2bb0013766756253 Mon Sep 17 00:00:00 2001 From: Evgeniy Alekseev Date: Sat, 9 Jul 2016 17:01:56 +0300 Subject: [PATCH 1/2] Release 3.2.0 --- CHANGELOG | 14 ++++++++++++++ packages/PKGBUILD | 4 ++-- sources/CMakeLists.txt | 4 ++-- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 1146b1e..2695bf6 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,17 @@ +Ver.3.2.0: ++ custom formatters (#91) ++ add backend tests (#95) ++ add OWM weather provider for ExtWeather. It can be switched by using X-AW-Provider (ApiVer 3) ++ add DBus timeout for calls (#96) ++ add macros support (`$aw_macro` and `$aw_macro_*` for calls) +- fix vertical alignment (#94) +- fix bug with invalid updates on `X-AW-Interval=1` for ExtScript and ExtUpgrade +- fix bug with missing derivate vaules in ExtQuotes +- fix possible plasma crash (#96) +- fix possible undefined behaviour if no extensions was found by name +* split dataengine sources to own library +* allow to use screened double brakets inside functions + Ver.3.1.2: + add standalone widget configuration example + new tag tstime diff --git a/packages/PKGBUILD b/packages/PKGBUILD index fcd3b80..5d167ed 100644 --- a/packages/PKGBUILD +++ b/packages/PKGBUILD @@ -2,7 +2,7 @@ pkgname=plasma5-applet-awesome-widgets _pkgname=awesome-widgets -pkgver=3.1.2 +pkgver=3.2.0 pkgrel=1 pkgdesc="Collection of minimalistic Plasmoids which look like Awesome WM widgets (ex-PyTextMonitor)" arch=('i686' 'x86_64') @@ -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=('99514bf6d1a5ca8660dd0210ee58af28') +md5sums=('6d9c98b040c89d9c4ec8fc17ae35eecd') backup=('etc/xdg/plasma-dataengine-extsysmon.conf') prepare() { diff --git a/sources/CMakeLists.txt b/sources/CMakeLists.txt index 8a415f7..f3b9921 100644 --- a/sources/CMakeLists.txt +++ b/sources/CMakeLists.txt @@ -14,8 +14,8 @@ set(PROJECT_AUTHOR "Evgeniy Alekseev") set(PROJECT_CONTACT "esalexeev@gmail.com") set(PROJECT_LICENSE "GPL3") set(PROJECT_VERSION_MAJOR "3") -set(PROJECT_VERSION_MINOR "1") -set(PROJECT_VERSION_PATCH "2") +set(PROJECT_VERSION_MINOR "2") +set(PROJECT_VERSION_PATCH "0") set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}") # append git version if any set(PROJECT_COMMIT_SHA "Commit hash" CACHE INTERNAL "") From 927e93b7fc89f518b358ca7100db175c81ba4fb8 Mon Sep 17 00:00:00 2001 From: Evgeniy Alekseev Date: Sun, 10 Jul 2016 00:09:08 +0300 Subject: [PATCH 2/2] Release 3.2.0 patches update --- packages/PKGBUILD | 2 +- patches/fix-dbus-calls.patch | 89 ------------------- patches/fix-race-condition.patch | 15 ---- patches/fix-vertical-alignment.patch | 26 ------ ...gs-qtconcurrent-and-qloggingcategory.patch | 21 +++-- patches/qt5.6-qversionnumber.patch | 4 +- sources/test/awtestlibrary.h | 1 + sources/test/testbatterysource.h | 1 + sources/test/testdpplugin.cpp | 2 +- sources/test/testextweather.h | 1 + sources/test/testgpuloadsource.h | 1 + sources/test/testgputempsource.h | 1 + sources/test/testhddtempsource.h | 1 + 13 files changed, 22 insertions(+), 143 deletions(-) delete mode 100644 patches/fix-dbus-calls.patch delete mode 100644 patches/fix-race-condition.patch delete mode 100644 patches/fix-vertical-alignment.patch diff --git a/packages/PKGBUILD b/packages/PKGBUILD index 5d167ed..593162d 100644 --- a/packages/PKGBUILD +++ b/packages/PKGBUILD @@ -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() { diff --git a/patches/fix-dbus-calls.patch b/patches/fix-dbus-calls.patch deleted file mode 100644 index 8ffe473..0000000 --- a/patches/fix-dbus-calls.patch +++ /dev/null @@ -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 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 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 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 - #include - - #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") diff --git a/patches/fix-race-condition.patch b/patches/fix-race-condition.patch deleted file mode 100644 index 14d79ea..0000000 --- a/patches/fix-race-condition.patch +++ /dev/null @@ -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)); diff --git a/patches/fix-vertical-alignment.patch b/patches/fix-vertical-alignment.patch deleted file mode 100644 index 136087c..0000000 --- a/patches/fix-vertical-alignment.patch +++ /dev/null @@ -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 - diff --git a/patches/qt5.4-qml-dialogs-qtconcurrent-and-qloggingcategory.patch b/patches/qt5.4-qml-dialogs-qtconcurrent-and-qloggingcategory.patch index 2aa624b..bbf481c 100644 --- a/patches/qt5.4-qml-dialogs-qtconcurrent-and-qloggingcategory.patch +++ b/patches/qt5.4-qml-dialogs-qtconcurrent-and-qloggingcategory.patch @@ -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} diff --git a/patches/qt5.6-qversionnumber.patch b/patches/qt5.6-qversionnumber.patch index 4ca4d9a..387cfc0 100644 --- a/patches/qt5.6-qversionnumber.patch +++ b/patches/qt5.6-qversionnumber.patch @@ -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} diff --git a/sources/test/awtestlibrary.h b/sources/test/awtestlibrary.h index 44d4dc0..a8e80bb 100644 --- a/sources/test/awtestlibrary.h +++ b/sources/test/awtestlibrary.h @@ -19,6 +19,7 @@ #ifndef AWTESTLIBRARY_H #define AWTESTLIBRARY_H +#include #include diff --git a/sources/test/testbatterysource.h b/sources/test/testbatterysource.h index c51dfc9..b6bc22c 100644 --- a/sources/test/testbatterysource.h +++ b/sources/test/testbatterysource.h @@ -20,6 +20,7 @@ #define TESTBATTERYSOURCE_H #include +#include class BatterySource; diff --git a/sources/test/testdpplugin.cpp b/sources/test/testdpplugin.cpp index 9a4e166..e7b4b75 100644 --- a/sources/test/testdpplugin.cpp +++ b/sources/test/testdpplugin.cpp @@ -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) diff --git a/sources/test/testextweather.h b/sources/test/testextweather.h index e06cae2..ef2d88e 100644 --- a/sources/test/testextweather.h +++ b/sources/test/testextweather.h @@ -20,6 +20,7 @@ #define TESTEXTWEATHER_H #include +#include class ExtWeather; diff --git a/sources/test/testgpuloadsource.h b/sources/test/testgpuloadsource.h index 5e32433..7ac1725 100644 --- a/sources/test/testgpuloadsource.h +++ b/sources/test/testgpuloadsource.h @@ -20,6 +20,7 @@ #define TESTGPULOADSOURCE_H #include +#include class GPULoadSource; diff --git a/sources/test/testgputempsource.h b/sources/test/testgputempsource.h index 74458e0..a9c8f98 100644 --- a/sources/test/testgputempsource.h +++ b/sources/test/testgputempsource.h @@ -20,6 +20,7 @@ #define TESTGPUTEMPSOURCE_H #include +#include class GPUTemperatureSource; diff --git a/sources/test/testhddtempsource.h b/sources/test/testhddtempsource.h index b790938..3bb075a 100644 --- a/sources/test/testhddtempsource.h +++ b/sources/test/testhddtempsource.h @@ -20,6 +20,7 @@ #define TESTHDDTEMPSOURCE_H #include +#include class HDDTemperatureSource;