Compare commits

..

1 Commits

Author SHA1 Message Date
b157b0f898 build: fix debug builds 2024-05-05 00:43:22 +03:00
24 changed files with 26 additions and 1297 deletions

3
.gitignore vendored
View File

@@ -48,6 +48,3 @@ pkg
# clion settings
.idea
cmake-build*
# clang
.cache

View File

@@ -13,4 +13,3 @@ Steve Lemuel (Chinese)
Mariusz Kocoń (Polish)
Ibnu Daru Aji (Indonesian)
Antonio Vivace (Italian)
@daveedmee (German)

View File

@@ -1,19 +1,5 @@
Ver.4.0.3:
- drop qml definition to avoid compile errors
Ver.4.0.2:
+ German translation (#172, thanks to daveedmee)
Ver.4.0.1:
- temporary disable tooltip painting in main widget
Ver.4.0.0:
* migration to plasma 6
* dialog windows have been replaced by notifications
+ $gpuN keys have been added
+ new key $ssid
- $cuptime key has been removed in favour of $uptime
- $gputemp key has been replaced by $gpuN
Ver.3.5.0:
+ wayland support

View File

@@ -75,5 +75,5 @@ Links
* [Scripts and bars](https://arcanis.me/en/2014/12/19/aw-v21-bells-and-whistles/)
* Plasmoid on [kde-look](http://kde-look.org/content/show.php/Awesome+Widgets?content=157124)
* DataEngine on [kde-look](http://kde-look.org/content/show.php/Extended+Systemmonitor+DataEngine?content=158773)
* Archlinux [AUR](https://aur.archlinux.org/packages/plasma6-applets-awesome-widgets) package
* Archlinux [AUR](https://aur.archlinux.org/packages/plasma5-applet-awesome-widgets/) package
* [OpenSuse](http://software.opensuse.org/search?q=awesome-widgets) packages, [KF5 OpenSuse](http://software.opensuse.org/package/plasma5-awesome-widgets) package

View File

@@ -2,7 +2,7 @@
pkgname=plasma6-applet-awesome-widgets
_pkgname=awesome-widgets
pkgver=4.0.4
pkgver=4.0.0alpha2
pkgrel=1
pkgdesc="Collection of minimalistic Plasmoids which look like Awesome WM widgets (ex-PyTextMonitor)"
arch=('x86_64')
@@ -27,3 +27,5 @@ build () {
package() {
DESTDIR="$pkgdir" cmake --install build
}
sha256sums=('b2a7b07a1df6f710f4e0d6e5898933f4ddb131818b922dc4b8e48afe3e98a664')

View File

@@ -19,7 +19,7 @@ set(PROJECT_CONTACT "esalexeev@gmail.com")
set(PROJECT_LICENSE "GPL3")
set(PROJECT_VERSION_MAJOR "4")
set(PROJECT_VERSION_MINOR "0")
set(PROJECT_VERSION_PATCH "4")
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 "")

View File

@@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef NDEBUG
#define NDEBUG
#endif /* NDEBUG */
#include <KI18n/KLocalizedString>
#include "awdebug.h"

View File

@@ -130,7 +130,7 @@ PlasmoidItem {
Plasmoid.userConfiguringChanged(false)
// connect data
awKeys.needTextToBeUpdated.connect(needTextUpdate)
//awKeys.needToolTipToBeUpdated.connect(needToolTipUpdate)
awKeys.needToolTipToBeUpdated.connect(needToolTipUpdate)
// check updates if required
if (plasmoid.configuration.checkUpdates) return awActions.checkUpdates(false)
}

View File

@@ -19,7 +19,7 @@
"Id": "org.kde.plasma.awesomewidget",
"License": "GPLv3",
"Name": "Awesome Widget",
"Version": "4.0.4",
"Version": "4.0.0",
"Website": "https://arcanis.me/projects/awesome-widgets/"
},
"X-Plasma-API-Minimum-Version": "6.0"

View File

@@ -17,6 +17,7 @@
#pragma once
#include <QObject>
#include <QVariant>

View File

@@ -65,7 +65,7 @@ QStringList AWDataEngineMapper::keysFromSource(const QString &_source) const
// HACK units required to define should the value be calculated as temperature
// or fan data
QStringList AWDataEngineMapper::registerSource(const QString &_source, const KSysGuard::Unit _units,
const QStringList &_keys, const bool _disconnectUnused)
const QStringList &_keys)
{
qCDebug(LOG_AW) << "Source" << _source << "with units" << _units;
@@ -91,7 +91,7 @@ QStringList AWDataEngineMapper::registerSource(const QString &_source, const KSy
// check if keys were actually requested
qCInfo(LOG_AW) << "Looking for keys" << keys << "in" << _keys;
auto required = !_disconnectUnused
auto required = _keys.isEmpty()
|| std::any_of(keys.cbegin(), keys.cend(), [&_keys](auto &key) { return _keys.contains(key); });
if (!required)
return {};

View File

@@ -39,8 +39,7 @@ public:
[[nodiscard]] AWPluginFormaterInterface *formatter(const QString &_key) const;
[[nodiscard]] QStringList keysFromSource(const QString &_source) const;
// set methods
QStringList registerSource(const QString &_source, KSysGuard::Unit _units, const QStringList &_keys,
const bool _disconnectUnused);
QStringList registerSource(const QString &_source, KSysGuard::Unit _units, const QStringList &_keys);
void setDevices(const AWPluginMatcherSettings &_settings);
private:

View File

@@ -206,8 +206,9 @@ void AWKeys::reinitKeys(const QStringList &_currentKeys)
barKeys.append(item->usedKeys());
}
// get required keys
m_requiredKeys = AWKeyCache::getRequiredKeys(m_foundKeys, barKeys, m_tooltipParams,
m_keyOperator->requiredUserKeys(), _currentKeys);
m_requiredKeys = m_optimize ? AWKeyCache::getRequiredKeys(m_foundKeys, barKeys, m_tooltipParams,
m_keyOperator->requiredUserKeys(), _currentKeys)
: QStringList();
// set key data to m_aggregator
m_aggregator->setDevices(m_keyOperator->devices());
@@ -316,7 +317,7 @@ void AWKeys::setDataBySource(const QString &_source, const KSysGuard::SensorInfo
// first list init
auto tags = m_aggregator->keysFromSource(_source);
if (tags.isEmpty())
tags = m_aggregator->registerSource(_source, _sensor.unit, m_requiredKeys, m_optimize);
tags = m_aggregator->registerSource(_source, _sensor.unit, m_requiredKeys);
// update data or drop source if there are no matches and exit
if (tags.isEmpty()) {

View File

@@ -151,9 +151,9 @@ void AWKeysAggregator::setTranslate(const bool _translate)
QStringList AWKeysAggregator::registerSource(const QString &_source, const KSysGuard::Unit _units,
const QStringList &_keys, const bool _disconnectUnused)
const QStringList &_keys)
{
qCDebug(LOG_AW) << "Source" << _source << "with units" << _units;
return m_mapper->registerSource(_source, _units, _keys, _disconnectUnused);
return m_mapper->registerSource(_source, _units, _keys);
}

View File

@@ -61,8 +61,7 @@ public:
void setTranslate(bool _translate);
public slots:
QStringList registerSource(const QString &_source, KSysGuard::Unit _units, const QStringList &_keys,
const bool _disconnectUnused);
QStringList registerSource(const QString &_source, KSysGuard::Unit _units, const QStringList &_keys);
private:
AWPluginFormatSettings m_settings;

View File

@@ -17,9 +17,7 @@
#include "awupdatehelper.h"
#ifndef NDEBUG
#define NDEBUG
#endif /* NDEBUG */
#include <KI18n/KLocalizedString>
#include <KNotifications/KNotification>

View File

@@ -436,7 +436,7 @@ int GraphicalItem::showConfiguration(QWidget *_parent, const QVariant &_args)
auto ui = new Ui::GraphicalItem();
ui->setupUi(dialog);
connect(ui->checkBox_custom, &QCheckBox::checkStateChanged, [ui](const int state) { changeValue(ui, state); });
connect(ui->checkBox_custom, &QCheckBox::stateChanged, [ui](const int state) { changeValue(ui, state); });
connect(ui->comboBox_type, &QComboBox::currentIndexChanged, [ui](const int state) { changeCountState(ui, state); });
connect(ui->toolButton_activeColor, &QToolButton::clicked, [this, ui]() { changeColor(ui); });
connect(ui->toolButton_inactiveColor, &QToolButton::clicked, [this, ui]() { changeColor(ui); });
@@ -472,7 +472,7 @@ int GraphicalItem::showConfiguration(QWidget *_parent, const QVariant &_args)
// update UI
emit(ui->comboBox_type->currentIndexChanged(ui->comboBox_type->currentIndex()));
emit(ui->checkBox_custom->checkStateChanged(ui->checkBox_custom->checkState()));
emit(ui->checkBox_custom->stateChanged(ui->checkBox_custom->checkState()));
int ret = dialog->exec();
if (ret == 1) {

View File

@@ -21,5 +21,4 @@
#ifndef ui_i18n
#define ui_i18n(text, parent) i18n(text)
#endif /* ui_i18n */
#endif

View File

@@ -19,7 +19,7 @@
"Id": "org.kde.plasma.desktoppanel",
"License": "GPLv3",
"Name": "Desktop Panel",
"Version": "4.0.4",
"Version": "4.0.0",
"Website": "https://arcanis.me/projects/awesome-widgets/"
},
"X-Plasma-API-Minimum-Version": "6.0"

View File

@@ -128,8 +128,8 @@ QVariant SystemInfoSource::sendDBusRequest(const QString &_destination, const QS
auto response = bus.call(request, QDBus::BlockWithGui, REQUEST_TIMEOUT);
if (response.type() != QDBusMessage::ReplyMessage || response.arguments().isEmpty()) {
qCWarning(LOG_ESS) << "Error" << response.errorName() << "with message" << response.errorMessage();
if ((response.type() != QDBusMessage::ReplyMessage) || (response.arguments().isEmpty())) {
qCWarning(LOG_ESS) << "Error message" << response.errorMessage();
return {};
} else {
return response.arguments().first();

View File

@@ -5,7 +5,7 @@ find_package(Gettext REQUIRED)
find_package(Qt6 6.6.0 REQUIRED COMPONENTS Core Concurrent DBus Network Qml Test Widgets)
add_definitions(
${Qt6Core_DEFINITIONS} ${Qt6DBus_DEFINITIONS} ${Qt6Network_DEFINITIONS}
${Qt6Widgets_DEFINITIONS}
${Qt6Qml_DEFINITIONS} ${Qt6Widgets_DEFINITIONS}
)
set(Qt_INCLUDE
${Qt6Core_INCLUDE_DIRS} ${Qt6Concurrent_INCLUDE_DIRS} ${Qt6DBus_INCLUDE_DIRS} ${Qt6Network_INCLUDE_DIRS}

View File

@@ -38,7 +38,6 @@ Item {
Dialog {
id: importSelection
standardButtons: Dialog.Ok | Dialog.Cancel
Column {
CheckBox {

View File

@@ -45,7 +45,7 @@ void TestAWBugReporter::test_generateText()
void TestAWBugReporter::test_sendBugReport()
{
QSignalSpy spy(plugin, SIGNAL(replyReceived(int, const QString &)));
QSignalSpy spy(plugin, SIGNAL(replyReceived(int, QString &)));
plugin->sendBugReport(AWTestLibrary::randomString(),
plugin->generateText(data.at(0), data.at(1), data.at(2), data.at(3)));

File diff suppressed because it is too large Load Diff