mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-04-30 18:37:17 +00:00
Compare commits
1 Commits
88f70c0ea6
...
f0c7f7d6bf
Author | SHA1 | Date | |
---|---|---|---|
f0c7f7d6bf |
12
.docker/Dockerfile-arch
Normal file
12
.docker/Dockerfile-arch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
FROM archlinux
|
||||||
|
|
||||||
|
RUN pacman -Sy
|
||||||
|
|
||||||
|
# toolchain
|
||||||
|
RUN echo -e 'y\ny' | pacman -S util-linux-libs
|
||||||
|
RUN pacman -S --noconfirm base-devel cmake extra-cmake-modules python util-linux-libs
|
||||||
|
# kf5 and qt5 libraries
|
||||||
|
RUN pacman -S --noconfirm plasma-framework
|
||||||
|
|
||||||
|
# required by tests
|
||||||
|
RUN pacman -S --noconfirm xorg-server-xvfb
|
14
.docker/Dockerfile-ubuntu-amd64
Normal file
14
.docker/Dockerfile-ubuntu-amd64
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
FROM ubuntu:focal
|
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
RUN apt-get update
|
||||||
|
# toolchain
|
||||||
|
RUN apt-get install -yq cmake extra-cmake-modules g++ git gettext
|
||||||
|
# kf5 and qt5 libraries
|
||||||
|
RUN apt-get install -yq libkf5i18n-dev libkf5notifications-dev libkf5service-dev \
|
||||||
|
libkf5windowsystem-dev libkf5plasma-dev qtbase5-dev qtdeclarative5-dev \
|
||||||
|
plasma-framework
|
||||||
|
|
||||||
|
# required by tests
|
||||||
|
RUN apt-get install -yq xvfb
|
14
.docker/build-arch.sh
Executable file
14
.docker/build-arch.sh
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
rm -rf build-arch
|
||||||
|
mkdir build-arch
|
||||||
|
|
||||||
|
# build
|
||||||
|
cd build-arch
|
||||||
|
cmake -DKDE_INSTALL_USE_QT_SYS_PATHS=ON -DCMAKE_BUILD_TYPE=Optimization -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_FUTURE=ON -DBUILD_TESTING=ON ../sources
|
||||||
|
make
|
||||||
|
|
||||||
|
# tests
|
||||||
|
xvfb-run -a make test
|
15
.docker/build-ubuntu-package.sh
Executable file
15
.docker/build-ubuntu-package.sh
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
rm -rf build-ubuntu
|
||||||
|
mkdir build-ubuntu
|
||||||
|
|
||||||
|
# patches
|
||||||
|
git apply patches/qt5.14-splitbehavior-and-qset.patch
|
||||||
|
|
||||||
|
# build
|
||||||
|
cd build-ubuntu
|
||||||
|
cmake -DKDE_INSTALL_USE_QT_SYS_PATHS=ON -DCMAKE_BUILD_TYPE=Optimization -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_FUTURE=ON -DBUILD_DEB_PACKAGE=ON ../sources
|
||||||
|
make package
|
||||||
|
|
17
.docker/build-ubuntu.sh
Executable file
17
.docker/build-ubuntu.sh
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
rm -rf build-ubuntu
|
||||||
|
mkdir build-ubuntu
|
||||||
|
|
||||||
|
# patches
|
||||||
|
git apply patches/qt5.14-splitbehavior-and-qset.patch
|
||||||
|
|
||||||
|
# build
|
||||||
|
cd build-ubuntu
|
||||||
|
cmake -DKDE_INSTALL_USE_QT_SYS_PATHS=ON -DCMAKE_BUILD_TYPE=Optimization -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_FUTURE=ON -DBUILD_TESTING=ON ../sources
|
||||||
|
make
|
||||||
|
|
||||||
|
# tests
|
||||||
|
xvfb-run -a make test
|
51
.github/workflows/release.yml
vendored
51
.github/workflows/release.yml
vendored
@ -1,51 +0,0 @@
|
|||||||
name: release
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- '*'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
make-release:
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: create changelog
|
|
||||||
id: changelog
|
|
||||||
uses: jaywcjlove/changelog-generator@main
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
filter: 'Release \d+\.\d+\.\d+'
|
|
||||||
|
|
||||||
- name: create archive
|
|
||||||
run: bash create_archive.sh
|
|
||||||
env:
|
|
||||||
VERSION: ${{ steps.version.outputs.VERSION }}
|
|
||||||
|
|
||||||
- name: build debian package
|
|
||||||
run: |
|
|
||||||
sudo apt update && \
|
|
||||||
sudo apt install -yq cmake extra-cmake-modules g++ git gettext make && \
|
|
||||||
sudo apt install -yq libkf5i18n-dev libkf5notifications-dev libkf5service-dev \
|
|
||||||
libkf5windowsystem-dev libkf5plasma-dev qtbase5-dev qtdeclarative5-dev \
|
|
||||||
plasma-workspace-dev && \
|
|
||||||
cmake -B build-deb -DKDE_INSTALL_USE_QT_SYS_PATHS=ON -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Optimization -DBUILD_FUTURE=ON -DBUILD_DEB_PACKAGE=ON sources && \
|
|
||||||
cd build-deb && \
|
|
||||||
make package && \
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
- name: release
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
with:
|
|
||||||
body: |
|
|
||||||
${{ steps.changelog.outputs.compareurl }}
|
|
||||||
${{ steps.changelog.outputs.changelog }}
|
|
||||||
files: |
|
|
||||||
awesome-widgets-*-src.tar.xz
|
|
||||||
build-deb/plasma-widget-awesome-widgets-*.deb
|
|
||||||
fail_on_unmatched_files: true
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
14
.travis.yml
Normal file
14
.travis.yml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
sudo: required
|
||||||
|
language: generic
|
||||||
|
|
||||||
|
env:
|
||||||
|
- DOCKER_TAG_ARCH="arcan1s/awesome-widgets-arch"
|
||||||
|
|
||||||
|
services:
|
||||||
|
- docker
|
||||||
|
|
||||||
|
before_install:
|
||||||
|
- docker build --tag="${DOCKER_TAG_ARCH}" -f ".docker/Dockerfile-arch" ".docker"
|
||||||
|
|
||||||
|
script:
|
||||||
|
- docker run --rm -v "$(pwd):/opt/build" -w /opt/build "${DOCKER_TAG_ARCH}" sh -c ".docker/build-arch.sh"
|
@ -1,8 +1,3 @@
|
|||||||
Ver.3.5.0:
|
|
||||||
+ wayland support
|
|
||||||
* update code to latest standards
|
|
||||||
- drop support of windows preview
|
|
||||||
|
|
||||||
Ver.3.4.2:
|
Ver.3.4.2:
|
||||||
+ Italian translation (#136, thanks to @avivace)
|
+ Italian translation (#136, thanks to @avivace)
|
||||||
+ stooq quotes support (default) (#131)
|
+ stooq quotes support (default) (#131)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
awesome-widgets (ex-pytextmonitor)
|
awesome-widgets (ex-pytextmonitor)
|
||||||
==================================
|
==================================
|
||||||
|
|
||||||
[](https://github.com/arcan1s/awesome-widgets/actions/workflows/build.yml)
|
[](https://travis-ci.org/arcan1s/awesome-widgets)
|
||||||
[](https://scan.coverity.com/projects/awesome-widgets)
|
[](https://scan.coverity.com/projects/awesome-widgets)
|
||||||
|
|
||||||
Information
|
Information
|
||||||
@ -62,6 +62,10 @@ Installation
|
|||||||
|
|
||||||
**NOTE** on Plasma 5 it very likely requires `-DKDE_INSTALL_USE_QT_SYS_PATHS=ON` flag
|
**NOTE** on Plasma 5 it very likely requires `-DKDE_INSTALL_USE_QT_SYS_PATHS=ON` flag
|
||||||
|
|
||||||
|
**NOTE** if you are going to build from git, you need to init submodules first, e.g.:
|
||||||
|
|
||||||
|
git submodule update --init --recursive
|
||||||
|
|
||||||
Additional information
|
Additional information
|
||||||
======================
|
======================
|
||||||
|
|
||||||
|
@ -1,20 +1,32 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
SRCDIR="sources"
|
SRCDIR="sources"
|
||||||
VERSION="$(git describe --tags --abbrev=0)"
|
MAJOR=$(grep -m1 PROJECT_VERSION_MAJOR sources/CMakeLists.txt | awk '{print $2}' | sed 's/^.\(.*\)..$/\1/')
|
||||||
|
MINOR=$(grep -m1 PROJECT_VERSION_MINOR sources/CMakeLists.txt | awk '{print $2}' | sed 's/^.\(.*\)..$/\1/')
|
||||||
|
PATCH=$(grep -m1 PROJECT_VERSION_PATCH sources/CMakeLists.txt | awk '{print $2}' | sed 's/^.\(.*\)..$/\1/')
|
||||||
|
VERSION="${MAJOR}.${MINOR}.${PATCH}"
|
||||||
|
|
||||||
|
# update submodules
|
||||||
|
git submodule update --init --recursive
|
||||||
|
|
||||||
# build widget
|
# build widget
|
||||||
ARCHIVE="awesome-widgets"
|
ARCHIVE="awesome-widgets"
|
||||||
FILES="AUTHORS CHANGELOG COPYING packages patches sources"
|
FILES="AUTHORS CHANGELOG COPYING packages patches"
|
||||||
IGNORELIST="build usr .kdev4 *.kdev4 .idea packages/*src.tar.xz"
|
IGNORELIST="build usr .kdev4 *.kdev4 .idea packages/*src.tar.xz"
|
||||||
# create archive
|
# create archive
|
||||||
[[ -e ${ARCHIVE}-${VERSION}-src.tar.xz ]] && rm -f "${ARCHIVE}-${VERSION}-src.tar.xz"
|
[[ -e ${ARCHIVE}-${VERSION}-src.tar.xz ]] && rm -f "${ARCHIVE}-${VERSION}-src.tar.xz"
|
||||||
[[ -d ${ARCHIVE} ]] && rm -rf "${ARCHIVE}"
|
[[ -d ${ARCHIVE} ]] && rm -rf "${ARCHIVE}"
|
||||||
|
|
||||||
cp -r "${SRCDIR}" "${ARCHIVE}"
|
cp -r "${SRCDIR}" "${ARCHIVE}"
|
||||||
for FILE in ${FILES[*]}; do cp -r "$FILE" "${ARCHIVE}"; done
|
for FILE in ${FILES[*]}; do cp -r "$FILE" "${ARCHIVE}"; done
|
||||||
for FILE in ${IGNORELIST[*]}; do rm -rf "${ARCHIVE}/${FILE}"; done
|
for FILE in ${IGNORELIST[*]}; do rm -rf "${ARCHIVE}/${FILE}"; done
|
||||||
|
|
||||||
tar cJf "${ARCHIVE}-${VERSION}-src.tar.xz" "${ARCHIVE}"
|
tar cJf "${ARCHIVE}-${VERSION}-src.tar.xz" "${ARCHIVE}"
|
||||||
|
ln -sf "../${ARCHIVE}-${VERSION}-src.tar.xz" packages
|
||||||
rm -rf "${ARCHIVE}"
|
rm -rf "${ARCHIVE}"
|
||||||
|
|
||||||
|
# update md5sum
|
||||||
|
MD5SUMS=$(md5sum ${ARCHIVE}-${VERSION}-src.tar.xz | awk '{print $1}')
|
||||||
|
sed -i "/md5sums=('[0-9A-Fa-f]*/s/[^'][^)]*/md5sums=('${MD5SUMS}'/" packages/PKGBUILD
|
||||||
|
sed -i "s/pkgver=[0-9.]*/pkgver=${VERSION}/" packages/PKGBUILD
|
||||||
|
# clear
|
||||||
|
find . -type f -name '*src.tar.xz' -not -name "*${VERSION}-src.tar.xz" -exec rm -rf {} \;
|
||||||
|
find packages -type l -xtype l -exec rm -rf {} \;
|
||||||
|
11
packages/build-requirements.deb.txt
Normal file
11
packages/build-requirements.deb.txt
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
cmake
|
||||||
|
extra-cmake-modules
|
||||||
|
g++
|
||||||
|
git
|
||||||
|
libkf5i18n-dev
|
||||||
|
libkf5notifications-dev
|
||||||
|
libkf5service-dev
|
||||||
|
libkf5windowsystem-dev
|
||||||
|
plasma-framework-dev
|
||||||
|
qtbase5-dev
|
||||||
|
qtdeclarative5-dev
|
0
packages/build-requirements.rpm.txt
Normal file
0
packages/build-requirements.rpm.txt
Normal file
255
patches/qt5.14-splitbehavior-and-qset.patch
Normal file
255
patches/qt5.14-splitbehavior-and-qset.patch
Normal file
@ -0,0 +1,255 @@
|
|||||||
|
diff --git a/sources/awdebug.cpp b/sources/awdebug.cpp
|
||||||
|
index 7135db6..a2870ec 100644
|
||||||
|
--- a/sources/awdebug.cpp
|
||||||
|
+++ b/sources/awdebug.cpp
|
||||||
|
@@ -67,7 +67,7 @@ QString AWDebug::getAboutText(const QString &_type)
|
||||||
|
translator = QString("<li>%1</li>").arg(translator);
|
||||||
|
text = i18n("Translators:") + "<ul>" + translatorList.join("") + "</ul>";
|
||||||
|
} else if (_type == "3rdparty") {
|
||||||
|
- QStringList trdPartyList = QString(TRDPARTY_LICENSE).split(';', Qt::SkipEmptyParts);
|
||||||
|
+ QStringList trdPartyList = QString(TRDPARTY_LICENSE).split(';', QString::SkipEmptyParts);
|
||||||
|
for (int i = 0; i < trdPartyList.count(); i++)
|
||||||
|
trdPartyList[i] = QString("<li><a href=\"%3\">%1</a> (%2 license)</li>")
|
||||||
|
.arg(trdPartyList.at(i).split(',')[0])
|
||||||
|
@@ -75,7 +75,7 @@ QString AWDebug::getAboutText(const QString &_type)
|
||||||
|
.arg(trdPartyList.at(i).split(',')[2]);
|
||||||
|
text = i18n("This software uses:") + "<ul>" + trdPartyList.join("") + "</ul>";
|
||||||
|
} else if (_type == "thanks") {
|
||||||
|
- QStringList thanks = QString(SPECIAL_THANKS).split(';', Qt::SkipEmptyParts);
|
||||||
|
+ QStringList thanks = QString(SPECIAL_THANKS).split(';', QString::SkipEmptyParts);
|
||||||
|
for (int i = 0; i < thanks.count(); i++)
|
||||||
|
thanks[i] = QString("<li><a href=\"%2\">%1</a></li>")
|
||||||
|
.arg(thanks.at(i).split(',')[0])
|
||||||
|
diff --git a/sources/awesome-widget/plugin/awabstractpairhelper.cpp b/sources/awesome-widget/plugin/awabstractpairhelper.cpp
|
||||||
|
index 55a4e91..f7c2969 100644
|
||||||
|
--- a/sources/awesome-widget/plugin/awabstractpairhelper.cpp
|
||||||
|
+++ b/sources/awesome-widget/plugin/awabstractpairhelper.cpp
|
||||||
|
@@ -61,7 +61,7 @@ QStringList AWAbstractPairHelper::values() const
|
||||||
|
QSet<QString> AWAbstractPairHelper::valuesSet() const
|
||||||
|
{
|
||||||
|
auto values = m_pairs.values();
|
||||||
|
- return QSet(values.cbegin(), values.cend());
|
||||||
|
+ return QSet<QString>::fromList(values);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -138,4 +138,4 @@ bool AWAbstractPairHelper::removeUnusedKeys(const QStringList &_keys) const
|
||||||
|
settings.sync();
|
||||||
|
|
||||||
|
return (settings.status() == QSettings::NoError);
|
||||||
|
-}
|
||||||
|
\ No newline at end of file
|
||||||
|
+}
|
||||||
|
diff --git a/sources/awesome-widget/plugin/awkeycache.cpp b/sources/awesome-widget/plugin/awkeycache.cpp
|
||||||
|
index 15aab94..54b47b3 100644
|
||||||
|
--- a/sources/awesome-widget/plugin/awkeycache.cpp
|
||||||
|
+++ b/sources/awesome-widget/plugin/awkeycache.cpp
|
||||||
|
@@ -83,9 +83,9 @@ QStringList AWKeyCache::getRequiredKeys(const QStringList &_keys, const QStringL
|
||||||
|
<< _tooltip;
|
||||||
|
|
||||||
|
// initial copy
|
||||||
|
- QSet<QString> used(_keys.cbegin(), _keys.cend());
|
||||||
|
- used.unite(QSet(_bars.cbegin(), _bars.cend()));
|
||||||
|
- used.unite(QSet(_userKeys.cbegin(), _userKeys.cend()));
|
||||||
|
+ auto used = QSet<QString>::fromList(_keys);
|
||||||
|
+ used.unite(QSet<QString>::fromList(_bars));
|
||||||
|
+ used.unite(QSet<QString>::fromList(_userKeys));
|
||||||
|
// insert keys from tooltip
|
||||||
|
for (auto &key : _tooltip.keys()) {
|
||||||
|
if ((key.endsWith("Tooltip")) && (_tooltip[key].toBool())) {
|
||||||
|
diff --git a/sources/awesomewidgets/awjsonformatter.cpp b/sources/awesomewidgets/awjsonformatter.cpp
|
||||||
|
index bbdd7ce..8a1c5e0 100644
|
||||||
|
--- a/sources/awesomewidgets/awjsonformatter.cpp
|
||||||
|
+++ b/sources/awesomewidgets/awjsonformatter.cpp
|
||||||
|
@@ -178,7 +178,7 @@ QVariant AWJsonFormatter::getFromMap(const QVariant &_value, const QString &_key
|
||||||
|
void AWJsonFormatter::initPath()
|
||||||
|
{
|
||||||
|
m_splittedPath.clear();
|
||||||
|
- QStringList splittedByDot = m_path.split('.', Qt::SkipEmptyParts);
|
||||||
|
+ QStringList splittedByDot = m_path.split('.', QString::SkipEmptyParts);
|
||||||
|
|
||||||
|
for (auto &element : splittedByDot) {
|
||||||
|
bool ok;
|
||||||
|
diff --git a/sources/awesomewidgets/extscript.cpp b/sources/awesomewidgets/extscript.cpp
|
||||||
|
index 3017dac..da009f9 100644
|
||||||
|
--- a/sources/awesomewidgets/extscript.cpp
|
||||||
|
+++ b/sources/awesomewidgets/extscript.cpp
|
||||||
|
@@ -218,7 +218,7 @@ void ExtScript::readConfiguration()
|
||||||
|
setExecutable(settings.value("Exec", executable()).toString());
|
||||||
|
setStrRedirect(settings.value("X-AW-Redirect", strRedirect()).toString());
|
||||||
|
// api == 3
|
||||||
|
- setFilters(settings.value("X-AW-Filters", filters()).toString().split(',', Qt::SkipEmptyParts));
|
||||||
|
+ setFilters(settings.value("X-AW-Filters", filters()).toString().split(',', QString::SkipEmptyParts));
|
||||||
|
settings.endGroup();
|
||||||
|
|
||||||
|
bumpApi(AW_EXTSCRIPT_API);
|
||||||
|
diff --git a/sources/awesomewidgets/extupgrade.cpp b/sources/awesomewidgets/extupgrade.cpp
|
||||||
|
index 0195779..0081cc9 100644
|
||||||
|
--- a/sources/awesomewidgets/extupgrade.cpp
|
||||||
|
+++ b/sources/awesomewidgets/extupgrade.cpp
|
||||||
|
@@ -219,8 +219,8 @@ void ExtUpgrade::updateValue()
|
||||||
|
= QTextCodec::codecForMib(106)->toUnicode(m_process->readAllStandardOutput()).trimmed();
|
||||||
|
m_values[tag("pkgcount")] = [this](const QString &output) {
|
||||||
|
return filter().isEmpty()
|
||||||
|
- ? output.split('\n', Qt::SkipEmptyParts).count() - null()
|
||||||
|
- : output.split('\n', Qt::SkipEmptyParts).filter(QRegExp(filter())).count();
|
||||||
|
+ ? output.split('\n', QString::SkipEmptyParts).count() - null()
|
||||||
|
+ : output.split('\n', QString::SkipEmptyParts).filter(QRegExp(filter())).count();
|
||||||
|
}(qoutput);
|
||||||
|
|
||||||
|
emit(dataReceived(m_values));
|
||||||
|
diff --git a/sources/awesomewidgets/qcronscheduler.cpp b/sources/awesomewidgets/qcronscheduler.cpp
|
||||||
|
index 6f67590..c72abc9 100644
|
||||||
|
--- a/sources/awesomewidgets/qcronscheduler.cpp
|
||||||
|
+++ b/sources/awesomewidgets/qcronscheduler.cpp
|
||||||
|
@@ -87,7 +87,7 @@ QList<int> QCronScheduler::parseField(const QString &_value, const int _min, con
|
||||||
|
parsedField.fromRange(field.split('/').first(), _min, _max);
|
||||||
|
if (field.contains('/')) {
|
||||||
|
bool status;
|
||||||
|
- parsedField.div = field.split('/', Qt::SkipEmptyParts).at(1).toInt(&status);
|
||||||
|
+ parsedField.div = field.split('/', QString::SkipEmptyParts).at(1).toInt(&status);
|
||||||
|
if (!status)
|
||||||
|
parsedField.div = 1;
|
||||||
|
}
|
||||||
|
@@ -107,7 +107,7 @@ void QCronScheduler::QCronField::fromRange(const QString &_range, const int _min
|
||||||
|
minValue = _min;
|
||||||
|
maxValue = _max;
|
||||||
|
} else if (_range.contains("-")) {
|
||||||
|
- auto interval = _range.split('-', Qt::SkipEmptyParts);
|
||||||
|
+ auto interval = _range.split('-', QString::SkipEmptyParts);
|
||||||
|
if (interval.count() != 2)
|
||||||
|
return;
|
||||||
|
bool status;
|
||||||
|
diff --git a/sources/extsysmon/extsysmon.cpp b/sources/extsysmon/extsysmon.cpp
|
||||||
|
index 88b6e39..5bdc7f3 100644
|
||||||
|
--- a/sources/extsysmon/extsysmon.cpp
|
||||||
|
+++ b/sources/extsysmon/extsysmon.cpp
|
||||||
|
@@ -126,7 +126,7 @@ QHash<QString, QString> ExtendedSysMon::updateConfiguration(QHash<QString, QStri
|
||||||
|
} else if (_rawConfig["HDDDEV"] == "disable") {
|
||||||
|
_rawConfig["HDDDEV"] = "";
|
||||||
|
} else {
|
||||||
|
- QStringList deviceList = _rawConfig["HDDDEV"].split(',', Qt::SkipEmptyParts);
|
||||||
|
+ QStringList deviceList = _rawConfig["HDDDEV"].split(',', QString::SkipEmptyParts);
|
||||||
|
QStringList devices;
|
||||||
|
QRegExp diskRegexp = QRegExp("^/dev/[hms]d[a-z]$");
|
||||||
|
for (auto &device : deviceList)
|
||||||
|
diff --git a/sources/extsysmonsources/gpuloadsource.cpp b/sources/extsysmonsources/gpuloadsource.cpp
|
||||||
|
index 6281637..e81be26 100644
|
||||||
|
--- a/sources/extsysmonsources/gpuloadsource.cpp
|
||||||
|
+++ b/sources/extsysmonsources/gpuloadsource.cpp
|
||||||
|
@@ -132,7 +132,7 @@ void GPULoadSource::updateValue()
|
||||||
|
qCInfo(LOG_ESS) << "Output" << qoutput;
|
||||||
|
|
||||||
|
if (m_device == "nvidia") {
|
||||||
|
- for (auto &str : qoutput.split('\n', Qt::SkipEmptyParts)) {
|
||||||
|
+ for (auto &str : qoutput.split('\n', QString::SkipEmptyParts)) {
|
||||||
|
if (!str.contains("<gpu_util>"))
|
||||||
|
continue;
|
||||||
|
auto load = str.remove("<gpu_util>").remove("</gpu_util>").remove('%');
|
||||||
|
@@ -140,10 +140,10 @@ void GPULoadSource::updateValue()
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else if (m_device == "ati") {
|
||||||
|
- for (auto &str : qoutput.split('\n', Qt::SkipEmptyParts)) {
|
||||||
|
+ for (auto &str : qoutput.split('\n', QString::SkipEmptyParts)) {
|
||||||
|
if (!str.contains("load"))
|
||||||
|
continue;
|
||||||
|
- QString load = str.split(' ', Qt::SkipEmptyParts)[3].remove('%');
|
||||||
|
+ QString load = str.split(' ', QString::SkipEmptyParts)[3].remove('%');
|
||||||
|
m_values["gpu/load"] = load.toFloat();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
diff --git a/sources/extsysmonsources/gputempsource.cpp b/sources/extsysmonsources/gputempsource.cpp
|
||||||
|
index 55fbadc..dce0c6e 100644
|
||||||
|
--- a/sources/extsysmonsources/gputempsource.cpp
|
||||||
|
+++ b/sources/extsysmonsources/gputempsource.cpp
|
||||||
|
@@ -112,7 +112,7 @@ void GPUTemperatureSource::updateValue()
|
||||||
|
qCInfo(LOG_ESS) << "Output" << qoutput;
|
||||||
|
|
||||||
|
if (m_device == "nvidia") {
|
||||||
|
- for (auto &str : qoutput.split('\n', Qt::SkipEmptyParts)) {
|
||||||
|
+ for (auto &str : qoutput.split('\n', QString::SkipEmptyParts)) {
|
||||||
|
if (!str.contains("<gpu_temp>"))
|
||||||
|
continue;
|
||||||
|
QString temp = str.remove("<gpu_temp>").remove("C</gpu_temp>");
|
||||||
|
@@ -120,10 +120,10 @@ void GPUTemperatureSource::updateValue()
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else if (m_device == "ati") {
|
||||||
|
- for (auto &str : qoutput.split('\n', Qt::SkipEmptyParts)) {
|
||||||
|
+ for (auto &str : qoutput.split('\n', QString::SkipEmptyParts)) {
|
||||||
|
if (!str.contains("Temperature"))
|
||||||
|
continue;
|
||||||
|
- QString temp = str.split(' ', Qt::SkipEmptyParts).at(4);
|
||||||
|
+ QString temp = str.split(' ', QString::SkipEmptyParts).at(4);
|
||||||
|
m_values["gpu/temperature"] = temp.toFloat();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
diff --git a/sources/extsysmonsources/hddtempsource.cpp b/sources/extsysmonsources/hddtempsource.cpp
|
||||||
|
index efaae08..dad47a3 100644
|
||||||
|
--- a/sources/extsysmonsources/hddtempsource.cpp
|
||||||
|
+++ b/sources/extsysmonsources/hddtempsource.cpp
|
||||||
|
@@ -31,7 +31,7 @@ HDDTemperatureSource::HDDTemperatureSource(QObject *_parent, const QStringList &
|
||||||
|
Q_ASSERT(_args.count() == 2);
|
||||||
|
qCDebug(LOG_ESS) << __PRETTY_FUNCTION__;
|
||||||
|
|
||||||
|
- m_devices = _args.at(0).split(',', Qt::SkipEmptyParts);
|
||||||
|
+ m_devices = _args.at(0).split(',', QString::SkipEmptyParts);
|
||||||
|
m_cmd = _args.at(1).split(' '); // lets hope no one put cmd with spaces here lol
|
||||||
|
|
||||||
|
m_smartctl = m_cmd.contains("smartctl");
|
||||||
|
@@ -131,17 +131,17 @@ void HDDTemperatureSource::updateValue(const QString &_device)
|
||||||
|
|
||||||
|
// parse
|
||||||
|
if (m_smartctl) {
|
||||||
|
- QStringList lines = qoutput.split('\n', Qt::SkipEmptyParts);
|
||||||
|
+ QStringList lines = qoutput.split('\n', QString::SkipEmptyParts);
|
||||||
|
for (auto &str : lines) {
|
||||||
|
if (!str.startsWith("194"))
|
||||||
|
continue;
|
||||||
|
- if (str.split(' ', Qt::SkipEmptyParts).count() < 9)
|
||||||
|
+ if (str.split(' ', QString::SkipEmptyParts).count() < 9)
|
||||||
|
continue;
|
||||||
|
- m_values[_device] = str.split(' ', Qt::SkipEmptyParts).at(9).toFloat();
|
||||||
|
+ m_values[_device] = str.split(' ', QString::SkipEmptyParts).at(9).toFloat();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
- QStringList lines = qoutput.split(':', Qt::SkipEmptyParts);
|
||||||
|
+ QStringList lines = qoutput.split(':', QString::SkipEmptyParts);
|
||||||
|
if (lines.count() >= 3) {
|
||||||
|
QString temp = lines.at(2);
|
||||||
|
temp.remove(QChar(0260)).remove('C');
|
||||||
|
diff --git a/sources/extsysmonsources/playersource.cpp b/sources/extsysmonsources/playersource.cpp
|
||||||
|
index aaca22f..e127a05 100644
|
||||||
|
--- a/sources/extsysmonsources/playersource.cpp
|
||||||
|
+++ b/sources/extsysmonsources/playersource.cpp
|
||||||
|
@@ -256,11 +256,11 @@ void PlayerSource::mpdSocketReadyRead()
|
||||||
|
qCInfo(LOG_ESS) << "Output" << qoutput;
|
||||||
|
|
||||||
|
// parse
|
||||||
|
- for (auto &str : qoutput.split('\n', Qt::SkipEmptyParts)) {
|
||||||
|
- if (str.split(": ", Qt::SkipEmptyParts).count() == 2) {
|
||||||
|
+ for (auto &str : qoutput.split('\n', QString::SkipEmptyParts)) {
|
||||||
|
+ if (str.split(": ", QString::SkipEmptyParts).count() == 2) {
|
||||||
|
// "Metadata: data"
|
||||||
|
- QString metadata = str.split(": ", Qt::SkipEmptyParts).first().toLower();
|
||||||
|
- QString data = str.split(": ", Qt::SkipEmptyParts).last().trimmed();
|
||||||
|
+ QString metadata = str.split(": ", QString::SkipEmptyParts).first().toLower();
|
||||||
|
+ QString data = str.split(": ", QString::SkipEmptyParts).last().trimmed();
|
||||||
|
// there are one more time...
|
||||||
|
if ((metadata == "time") && (data.contains(':'))) {
|
||||||
|
QStringList times = data.split(':');
|
||||||
|
diff --git a/sources/test/testawtelemetryhandler.cpp b/sources/test/testawtelemetryhandler.cpp
|
||||||
|
index ffb0e79..b4181e0 100644
|
||||||
|
--- a/sources/test/testawtelemetryhandler.cpp
|
||||||
|
+++ b/sources/test/testawtelemetryhandler.cpp
|
||||||
|
@@ -51,7 +51,7 @@ void TestAWTelemetryHandler::test_get()
|
||||||
|
QStringList output = plugin->get(telemetryGroup);
|
||||||
|
|
||||||
|
QVERIFY(!output.isEmpty());
|
||||||
|
- QCOMPARE(QSet<QString>(output.cbegin(), output.cend()).count(), output.count());
|
||||||
|
+ QCOMPARE(QSet<QString>::fromList(output).count(), output.count());
|
||||||
|
QVERIFY(output.contains(telemetryData));
|
||||||
|
}
|
||||||
|
|
@ -2,11 +2,11 @@
|
|||||||
Language: Cpp
|
Language: Cpp
|
||||||
AccessModifierOffset: -4
|
AccessModifierOffset: -4
|
||||||
AlignAfterOpenBracket: Align
|
AlignAfterOpenBracket: Align
|
||||||
AlignConsecutiveAssignments: None
|
AlignConsecutiveAssignments: false
|
||||||
AlignOperands: true
|
AlignOperands: true
|
||||||
AlignTrailingComments: true
|
AlignTrailingComments: true
|
||||||
AllowAllParametersOfDeclarationOnNextLine: true
|
AllowAllParametersOfDeclarationOnNextLine: true
|
||||||
AllowShortBlocksOnASingleLine: Never
|
AllowShortBlocksOnASingleLine: false
|
||||||
AllowShortCaseLabelsOnASingleLine: false
|
AllowShortCaseLabelsOnASingleLine: false
|
||||||
AllowShortFunctionsOnASingleLine: Inline
|
AllowShortFunctionsOnASingleLine: Inline
|
||||||
AllowShortIfStatementsOnASingleLine: Never
|
AllowShortIfStatementsOnASingleLine: Never
|
||||||
|
@ -15,8 +15,8 @@ set(PROJECT_AUTHOR "Evgeniy Alekseev")
|
|||||||
set(PROJECT_CONTACT "esalexeev@gmail.com")
|
set(PROJECT_CONTACT "esalexeev@gmail.com")
|
||||||
set(PROJECT_LICENSE "GPL3")
|
set(PROJECT_LICENSE "GPL3")
|
||||||
set(PROJECT_VERSION_MAJOR "3")
|
set(PROJECT_VERSION_MAJOR "3")
|
||||||
set(PROJECT_VERSION_MINOR "5")
|
set(PROJECT_VERSION_MINOR "4")
|
||||||
set(PROJECT_VERSION_PATCH "0")
|
set(PROJECT_VERSION_PATCH "3")
|
||||||
set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
|
set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
|
||||||
# append git version if any
|
# append git version if any
|
||||||
set(PROJECT_COMMIT_SHA "Commit hash" CACHE INTERNAL "")
|
set(PROJECT_COMMIT_SHA "Commit hash" CACHE INTERNAL "")
|
||||||
|
@ -19,7 +19,7 @@ X-Plasma-MainScript=ui/main.qml
|
|||||||
X-KDE-PluginInfo-Author=Evgeniy Alekseev aka arcanis
|
X-KDE-PluginInfo-Author=Evgeniy Alekseev aka arcanis
|
||||||
X-KDE-PluginInfo-Email=esalexeev@gmail.com
|
X-KDE-PluginInfo-Email=esalexeev@gmail.com
|
||||||
X-KDE-PluginInfo-Name=org.kde.plasma.awesomewidget
|
X-KDE-PluginInfo-Name=org.kde.plasma.awesomewidget
|
||||||
X-KDE-PluginInfo-Version=3.5.0
|
X-KDE-PluginInfo-Version=3.4.3
|
||||||
X-KDE-PluginInfo-Website=https://arcanis.me/projects/awesome-widgets/
|
X-KDE-PluginInfo-Website=https://arcanis.me/projects/awesome-widgets/
|
||||||
X-KDE-PluginInfo-Category=System Information
|
X-KDE-PluginInfo-Category=System Information
|
||||||
X-KDE-PluginInfo-License=GPLv3
|
X-KDE-PluginInfo-License=GPLv3
|
||||||
|
@ -61,7 +61,7 @@ QStringList AWAbstractPairHelper::values() const
|
|||||||
QSet<QString> AWAbstractPairHelper::valuesSet() const
|
QSet<QString> AWAbstractPairHelper::valuesSet() const
|
||||||
{
|
{
|
||||||
auto values = m_pairs.values();
|
auto values = m_pairs.values();
|
||||||
return {values.cbegin(), values.cend()};
|
return QSet(values.cbegin(), values.cend());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ public:
|
|||||||
Q_INVOKABLE void sendBugReport(const QString &_title, const QString &_body);
|
Q_INVOKABLE void sendBugReport(const QString &_title, const QString &_body);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void replyReceived(int _number, const QString &_url);
|
void replyReceived(const int _number, const QString &_url);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void issueReplyRecieved(QNetworkReply *_reply);
|
void issueReplyRecieved(QNetworkReply *_reply);
|
||||||
|
@ -74,5 +74,5 @@ QStringList AWCustomKeysHelper::leftKeys()
|
|||||||
|
|
||||||
QStringList AWCustomKeysHelper::rightKeys()
|
QStringList AWCustomKeysHelper::rightKeys()
|
||||||
{
|
{
|
||||||
return {};
|
return QStringList();
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#include <Plasma/DataContainer>
|
#include <Plasma/DataContainer>
|
||||||
|
|
||||||
#include "awdebug.h"
|
#include "awdebug.h"
|
||||||
|
#include "awkeys.h"
|
||||||
|
|
||||||
|
|
||||||
AWDataEngineAggregator::AWDataEngineAggregator(QObject *_parent)
|
AWDataEngineAggregator::AWDataEngineAggregator(QObject *_parent)
|
||||||
|
@ -38,7 +38,7 @@ AWDBusAdaptor::~AWDBusAdaptor()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QStringList AWDBusAdaptor::ActiveServices()
|
QStringList AWDBusAdaptor::ActiveServices() const
|
||||||
{
|
{
|
||||||
QDBusMessage listServices = QDBusConnection::sessionBus().interface()->call(QDBus::BlockWithGui, "ListNames");
|
QDBusMessage listServices = QDBusConnection::sessionBus().interface()->call(QDBus::BlockWithGui, "ListNames");
|
||||||
if (listServices.arguments().isEmpty()) {
|
if (listServices.arguments().isEmpty()) {
|
||||||
|
@ -37,11 +37,11 @@ public:
|
|||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
// get methods
|
// get methods
|
||||||
[[nodiscard]] static QStringList ActiveServices();
|
QStringList ActiveServices() const;
|
||||||
[[nodiscard]] QString Info(const QString &key) const;
|
QString Info(const QString &key) const;
|
||||||
[[nodiscard]] QStringList Keys(const QString ®exp) const;
|
QStringList Keys(const QString ®exp) const;
|
||||||
[[nodiscard]] QString Value(const QString &key) const;
|
QString Value(const QString &key) const;
|
||||||
[[nodiscard]] qlonglong WhoAmI() const;
|
qlonglong WhoAmI() const;
|
||||||
// set methods
|
// set methods
|
||||||
void SetLogLevel(const QString &what, int level);
|
void SetLogLevel(const QString &what, int level);
|
||||||
void SetLogLevel(const QString &what, const QString &level, bool enabled);
|
void SetLogLevel(const QString &what, const QString &level, bool enabled);
|
||||||
|
@ -102,7 +102,7 @@ void AWFormatterHelper::editPairs()
|
|||||||
|
|
||||||
QStringList AWFormatterHelper::leftKeys()
|
QStringList AWFormatterHelper::leftKeys()
|
||||||
{
|
{
|
||||||
return {};
|
return QStringList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
#include "awkeyoperations.h"
|
#include "awkeyoperations.h"
|
||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
|
#include <QJSEngine>
|
||||||
#include <QRegExp>
|
#include <QRegExp>
|
||||||
#include <QThread>
|
#include <QThread>
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ public:
|
|||||||
public slots:
|
public slots:
|
||||||
void dataUpdated(const QString &_sourceName, const Plasma::DataEngine::Data &_data);
|
void dataUpdated(const QString &_sourceName, const Plasma::DataEngine::Data &_data);
|
||||||
// dummy method required by DataEngine connections
|
// dummy method required by DataEngine connections
|
||||||
static void modelChanged(const QString &, QAbstractItemModel *){};
|
static void modelChanged(QString, QAbstractItemModel *){};
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void dropSourceFromDataengine(const QString &_source);
|
void dropSourceFromDataengine(const QString &_source);
|
||||||
|
@ -79,7 +79,7 @@ public slots:
|
|||||||
virtual void readConfiguration();
|
virtual void readConfiguration();
|
||||||
virtual QVariantHash run() = 0;
|
virtual QVariantHash run() = 0;
|
||||||
virtual int showConfiguration(const QVariant &_args) = 0;
|
virtual int showConfiguration(const QVariant &_args) = 0;
|
||||||
[[nodiscard]] virtual bool tryDelete() const;
|
virtual bool tryDelete() const;
|
||||||
virtual void writeConfiguration() const;
|
virtual void writeConfiguration() const;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
@ -67,7 +67,7 @@ public:
|
|||||||
void editItem();
|
void editItem();
|
||||||
QString getName();
|
QString getName();
|
||||||
virtual void initItems() = 0;
|
virtual void initItems() = 0;
|
||||||
[[nodiscard]] AbstractExtItem *itemFromWidget() const;
|
AbstractExtItem *itemFromWidget() const;
|
||||||
void repaintList() const;
|
void repaintList() const;
|
||||||
[[nodiscard]] int uniqNumber() const;
|
[[nodiscard]] int uniqNumber() const;
|
||||||
// get methods
|
// get methods
|
||||||
|
@ -38,7 +38,7 @@ public:
|
|||||||
{
|
{
|
||||||
return dynamic_cast<AbstractExtItem *>(parent())->tag(_type);
|
return dynamic_cast<AbstractExtItem *>(parent())->tag(_type);
|
||||||
};
|
};
|
||||||
[[nodiscard]] virtual QUrl url() const = 0;
|
virtual QUrl url() const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ public:
|
|||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void readConfiguration() override;
|
void readConfiguration() override;
|
||||||
QVariantHash run() override { return {}; };
|
QVariantHash run() override { return QVariantHash(); };
|
||||||
void writeConfiguration() const override;
|
void writeConfiguration() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -100,7 +100,7 @@ QString GraphicalItem::image(const QVariant &value)
|
|||||||
|
|
||||||
m_scene->clear();
|
m_scene->clear();
|
||||||
int scale[2] = {1, 1};
|
int scale[2] = {1, 1};
|
||||||
float converted = GraphicalItemHelper::getPercents(value.toFloat(), minValue(), maxValue());
|
float converted = m_helper->getPercents(value.toFloat(), minValue(), maxValue());
|
||||||
|
|
||||||
// paint
|
// paint
|
||||||
switch (m_type) {
|
switch (m_type) {
|
||||||
@ -457,12 +457,12 @@ int GraphicalItem::showConfiguration(const QVariant &_args)
|
|||||||
ui->doubleSpinBox_max->setValue(maxValue());
|
ui->doubleSpinBox_max->setValue(maxValue());
|
||||||
ui->doubleSpinBox_min->setValue(minValue());
|
ui->doubleSpinBox_min->setValue(minValue());
|
||||||
ui->spinBox_count->setValue(count());
|
ui->spinBox_count->setValue(count());
|
||||||
if (GraphicalItemHelper::isColor(activeColor()))
|
if (m_helper->isColor(activeColor()))
|
||||||
ui->comboBox_activeImageType->setCurrentIndex(0);
|
ui->comboBox_activeImageType->setCurrentIndex(0);
|
||||||
else
|
else
|
||||||
ui->comboBox_activeImageType->setCurrentIndex(1);
|
ui->comboBox_activeImageType->setCurrentIndex(1);
|
||||||
ui->lineEdit_activeColor->setText(activeColor());
|
ui->lineEdit_activeColor->setText(activeColor());
|
||||||
if (GraphicalItemHelper::isColor(inactiveColor()))
|
if (m_helper->isColor(inactiveColor()))
|
||||||
ui->comboBox_inactiveImageType->setCurrentIndex(0);
|
ui->comboBox_inactiveImageType->setCurrentIndex(0);
|
||||||
else
|
else
|
||||||
ui->comboBox_inactiveImageType->setCurrentIndex(1);
|
ui->comboBox_inactiveImageType->setCurrentIndex(1);
|
||||||
@ -539,7 +539,7 @@ void GraphicalItem::changeColor()
|
|||||||
|
|
||||||
QString outputColor;
|
QString outputColor;
|
||||||
if (state == 0) {
|
if (state == 0) {
|
||||||
QColor color = GraphicalItemHelper::stringToColor(lineEdit->text());
|
QColor color = m_helper->stringToColor(lineEdit->text());
|
||||||
QColor newColor = QColorDialog::getColor(color, this, i18n("Select color"), QColorDialog::ShowAlphaChannel);
|
QColor newColor = QColorDialog::getColor(color, this, i18n("Select color"), QColorDialog::ShowAlphaChannel);
|
||||||
if (!newColor.isValid())
|
if (!newColor.isValid())
|
||||||
return;
|
return;
|
||||||
|
@ -91,7 +91,7 @@ public:
|
|||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void readConfiguration() override;
|
void readConfiguration() override;
|
||||||
QVariantHash run() override { return {}; };
|
QVariantHash run() override { return QVariantHash(); };
|
||||||
int showConfiguration(const QVariant &_args) override;
|
int showConfiguration(const QVariant &_args) override;
|
||||||
void writeConfiguration() const override;
|
void writeConfiguration() const override;
|
||||||
|
|
||||||
|
@ -135,7 +135,7 @@ QList<int> QCronScheduler::QCronField::toList()
|
|||||||
{
|
{
|
||||||
// error checking
|
// error checking
|
||||||
if ((minValue == -1) || (maxValue == -1))
|
if ((minValue == -1) || (maxValue == -1))
|
||||||
return {};
|
return QList<int>();
|
||||||
|
|
||||||
QList<int> output;
|
QList<int> output;
|
||||||
for (auto &i = minValue; i <= maxValue; ++i) {
|
for (auto &i = minValue; i <= maxValue; ++i) {
|
||||||
|
@ -57,7 +57,7 @@ QVariantHash YahooWeatherProvider::parse(const QVariantMap &_json) const
|
|||||||
QVariantMap jsonMap = _json["query"].toMap();
|
QVariantMap jsonMap = _json["query"].toMap();
|
||||||
if (jsonMap["count"].toInt() != 1) {
|
if (jsonMap["count"].toInt() != 1) {
|
||||||
qCWarning(LOG_LIB) << "Found data count" << _json["count"].toInt() << "is not 1";
|
qCWarning(LOG_LIB) << "Found data count" << _json["count"].toInt() << "is not 1";
|
||||||
return {};
|
return QVariantHash();
|
||||||
}
|
}
|
||||||
QVariantMap results = jsonMap["results"].toMap()["channel"].toMap();
|
QVariantMap results = jsonMap["results"].toMap()["channel"].toMap();
|
||||||
QVariantMap item = results["item"].toMap();
|
QVariantMap item = results["item"].toMap();
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
execute_process(
|
exec_program(
|
||||||
COMMAND "sed -n '1,/^Ver/ p' CHANGELOG 2> /dev/null | grep -v '^Ver' | tr '\n' '@'"
|
"sed -n '1,/^Ver/ p' CHANGELOG 2> /dev/null | grep -v '^Ver' | tr '\n' '@'"
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
OUTPUT_VARIABLE PROJECT_CHANGELOG
|
OUTPUT_VARIABLE PROJECT_CHANGELOG
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
||||||
)
|
)
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
execute_process(
|
exec_program(
|
||||||
COMMAND git log -1 --format=%h
|
"git"
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
ARGS "log" "-1" "--format=\"%h\""
|
||||||
OUTPUT_VARIABLE COMMIT_SHA
|
OUTPUT_VARIABLE COMMIT_SHA
|
||||||
RESULT_VARIABLE GIT_RETURN
|
RETURN_VALUE GIT_RETURN
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if (${GIT_RETURN} EQUAL "0")
|
if (${GIT_RETURN} EQUAL "0")
|
||||||
|
@ -19,7 +19,7 @@ X-Plasma-MainScript=ui/main.qml
|
|||||||
X-KDE-PluginInfo-Author=Evgeniy Alekseev aka arcanis
|
X-KDE-PluginInfo-Author=Evgeniy Alekseev aka arcanis
|
||||||
X-KDE-PluginInfo-Email=esalexeev@gmail.com
|
X-KDE-PluginInfo-Email=esalexeev@gmail.com
|
||||||
X-KDE-PluginInfo-Name=org.kde.plasma.desktoppanel
|
X-KDE-PluginInfo-Name=org.kde.plasma.desktoppanel
|
||||||
X-KDE-PluginInfo-Version=3.5.0
|
X-KDE-PluginInfo-Version=3.4.3
|
||||||
X-KDE-PluginInfo-Website=https://arcanis.me/projects/awesome-widgets/
|
X-KDE-PluginInfo-Website=https://arcanis.me/projects/awesome-widgets/
|
||||||
X-KDE-PluginInfo-Category=System Information
|
X-KDE-PluginInfo-Category=System Information
|
||||||
X-KDE-PluginInfo-License=GPLv3
|
X-KDE-PluginInfo-License=GPLv3
|
||||||
|
@ -59,8 +59,8 @@ DPAdds::~DPAdds()
|
|||||||
{
|
{
|
||||||
qCDebug(LOG_DP) << __PRETTY_FUNCTION__;
|
qCDebug(LOG_DP) << __PRETTY_FUNCTION__;
|
||||||
|
|
||||||
m_vdi->deleteLater();
|
delete m_vdi;
|
||||||
m_taskModel->deleteLater();
|
delete m_taskModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ DesktopSource::~DesktopSource()
|
|||||||
{
|
{
|
||||||
qCDebug(LOG_ESS) << __PRETTY_FUNCTION__;
|
qCDebug(LOG_ESS) << __PRETTY_FUNCTION__;
|
||||||
|
|
||||||
m_vdi->deleteLater();
|
delete m_vdi;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ QVariant DesktopSource::data(const QString &_source)
|
|||||||
return m_vdi->numberOfDesktops();
|
return m_vdi->numberOfDesktops();
|
||||||
}
|
}
|
||||||
|
|
||||||
return {};
|
return QVariant();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ const char STATIC_KEYS[] = "time,isotime,shorttime,longtime,tstime,ctime,uptime,
|
|||||||
// links
|
// links
|
||||||
const char HOMEPAGE[] = "https://arcanis.me/projects/awesome-widgets";
|
const char HOMEPAGE[] = "https://arcanis.me/projects/awesome-widgets";
|
||||||
const char REPOSITORY[] = "https://github.com/arcan1s/awesome-widgets";
|
const char REPOSITORY[] = "https://github.com/arcan1s/awesome-widgets";
|
||||||
const char RELEASES[] = "https://github.com/arcan1s/awesome-widgets/releases/tag/";
|
const char RELEASES[] = "https://github.com/arcan1s/awesome-widgets/releases/tag/V.";
|
||||||
const char VERSION_API[] = "https://api.github.com/repos/arcan1s/awesome-widgets/releases";
|
const char VERSION_API[] = "https://api.github.com/repos/arcan1s/awesome-widgets/releases";
|
||||||
const char BUGTRACKER[] = "https://github.com/arcan1s/awesome-widgets/issues";
|
const char BUGTRACKER[] = "https://github.com/arcan1s/awesome-widgets/issues";
|
||||||
const char BUGTRACKER_API[] = "https://arcanis.me/repos/arcan1s/awesome-widgets/issues";
|
const char BUGTRACKER_API[] = "https://arcanis.me/repos/arcan1s/awesome-widgets/issues";
|
||||||
|
Loading…
Reference in New Issue
Block a user