mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-04-24 23:47:20 +00:00
some refactoring
* massive changes inside includes, drop unused definitions * rewrite some initialization methods to avoid additional freeing/allocation * drop some explicit destructors calls
This commit is contained in:
parent
e90e1da096
commit
d2e6f2fe38
@ -56,7 +56,6 @@ AWAbstractPairConfig::~AWAbstractPairConfig()
|
|||||||
|
|
||||||
clearSelectors();
|
clearSelectors();
|
||||||
|
|
||||||
delete m_helper;
|
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
#include <QUrl>
|
|
||||||
|
|
||||||
#include <fontdialog/fontdialog.h>
|
#include <fontdialog/fontdialog.h>
|
||||||
|
|
||||||
@ -43,8 +42,6 @@ AWActions::AWActions(QObject *_parent)
|
|||||||
AWActions::~AWActions()
|
AWActions::~AWActions()
|
||||||
{
|
{
|
||||||
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
|
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
|
||||||
|
|
||||||
delete m_updateHelper;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -21,11 +21,9 @@
|
|||||||
|
|
||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
#include <QJsonDocument>
|
#include <QJsonDocument>
|
||||||
#include <QJsonParseError>
|
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QNetworkAccessManager>
|
#include <QNetworkAccessManager>
|
||||||
#include <QNetworkReply>
|
#include <QNetworkReply>
|
||||||
#include <QNetworkRequest>
|
|
||||||
|
|
||||||
#include "awdebug.h"
|
#include "awdebug.h"
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QQmlPropertyMap>
|
#include <QQmlPropertyMap>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
|
#include <QStandardPaths>
|
||||||
#include <QTextCodec>
|
#include <QTextCodec>
|
||||||
|
|
||||||
#include "awdebug.h"
|
#include "awdebug.h"
|
||||||
@ -31,6 +32,10 @@ AWConfigHelper::AWConfigHelper(QObject *_parent)
|
|||||||
: QObject(_parent)
|
: QObject(_parent)
|
||||||
{
|
{
|
||||||
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
|
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
|
||||||
|
|
||||||
|
m_baseDir = QString("%1/awesomewidgets")
|
||||||
|
.arg(QStandardPaths::writableLocation(
|
||||||
|
QStandardPaths::GenericDataLocation));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
#define AWCONFIGHELPER_H
|
#define AWCONFIGHELPER_H
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QStandardPaths>
|
|
||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
|
|
||||||
|
|
||||||
@ -57,15 +56,9 @@ private:
|
|||||||
void writeFile(QSettings &_settings, const QString &_key,
|
void writeFile(QSettings &_settings, const QString &_key,
|
||||||
const QString &_fileName) const;
|
const QString &_fileName) const;
|
||||||
// properties
|
// properties
|
||||||
QString m_baseDir = QString("%1/awesomewidgets")
|
QString m_baseDir;
|
||||||
.arg(QStandardPaths::writableLocation(
|
QStringList m_dirs
|
||||||
QStandardPaths::GenericDataLocation));
|
= {"desktops", "quotes", "scripts", "upgrade", "weather", "formatters"};
|
||||||
QStringList m_dirs = QStringList() << "desktops"
|
|
||||||
<< "quotes"
|
|
||||||
<< "scripts"
|
|
||||||
<< "upgrade"
|
|
||||||
<< "weather"
|
|
||||||
<< "formatters";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
#ifndef AWCUSTOMKEYSHELPER_H
|
#ifndef AWCUSTOMKEYSHELPER_H
|
||||||
#define AWCUSTOMKEYSHELPER_H
|
#define AWCUSTOMKEYSHELPER_H
|
||||||
|
|
||||||
#include <QHash>
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
#include "awabstractpairhelper.h"
|
#include "awabstractpairhelper.h"
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
#include <QBuffer>
|
#include <QBuffer>
|
||||||
#include <QGraphicsScene>
|
#include <QGraphicsScene>
|
||||||
#include <QGraphicsView>
|
#include <QGraphicsView>
|
||||||
#include <QPixmap>
|
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
@ -55,14 +54,6 @@ AWDataAggregator::~AWDataAggregator()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QList<float> AWDataAggregator::getData(const QString &_key) const
|
|
||||||
{
|
|
||||||
qCDebug(LOG_AW) << "Key" << _key;
|
|
||||||
|
|
||||||
return m_values[QString("%1Tooltip").arg(_key)];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
QString AWDataAggregator::htmlImage(const QPixmap &_source) const
|
QString AWDataAggregator::htmlImage(const QPixmap &_source) const
|
||||||
{
|
{
|
||||||
QByteArray byteArray;
|
QByteArray byteArray;
|
||||||
|
@ -35,7 +35,6 @@ class AWDataAggregator : public QObject
|
|||||||
public:
|
public:
|
||||||
explicit AWDataAggregator(QObject *_parent = nullptr);
|
explicit AWDataAggregator(QObject *_parent = nullptr);
|
||||||
virtual ~AWDataAggregator();
|
virtual ~AWDataAggregator();
|
||||||
QList<float> getData(const QString &_key) const;
|
|
||||||
QString htmlImage(const QPixmap &_source) const;
|
QString htmlImage(const QPixmap &_source) const;
|
||||||
void setParameters(const QVariantMap &_settings);
|
void setParameters(const QVariantMap &_settings);
|
||||||
QPixmap tooltipImage();
|
QPixmap tooltipImage();
|
||||||
|
@ -28,6 +28,20 @@ AWDataEngineAggregator::AWDataEngineAggregator(QObject *_parent)
|
|||||||
{
|
{
|
||||||
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
|
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
|
||||||
|
|
||||||
|
m_consumer = new Plasma::DataEngineConsumer();
|
||||||
|
m_dataEngines["systemmonitor"] = m_consumer->dataEngine("systemmonitor");
|
||||||
|
m_dataEngines["extsysmon"] = m_consumer->dataEngine("extsysmon");
|
||||||
|
m_dataEngines["time"] = m_consumer->dataEngine("time");
|
||||||
|
|
||||||
|
// additional method required by systemmonitor structure
|
||||||
|
m_newSourceConnection = connect(
|
||||||
|
m_dataEngines["systemmonitor"], &Plasma::DataEngine::sourceAdded,
|
||||||
|
[this](const QString source) {
|
||||||
|
emit(deviceAdded(source));
|
||||||
|
m_dataEngines["systemmonitor"]->connectSource(source, parent(),
|
||||||
|
1000);
|
||||||
|
});
|
||||||
|
|
||||||
// required to define Qt::QueuedConnection for signal-slot connection
|
// required to define Qt::QueuedConnection for signal-slot connection
|
||||||
qRegisterMetaType<Plasma::DataEngine::Data>("Plasma::DataEngine::Data");
|
qRegisterMetaType<Plasma::DataEngine::Data>("Plasma::DataEngine::Data");
|
||||||
}
|
}
|
||||||
@ -37,16 +51,7 @@ AWDataEngineAggregator::~AWDataEngineAggregator()
|
|||||||
{
|
{
|
||||||
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
|
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
|
||||||
|
|
||||||
clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void AWDataEngineAggregator::clear()
|
|
||||||
{
|
|
||||||
// disconnect sources first
|
|
||||||
disconnectSources();
|
disconnectSources();
|
||||||
m_dataEngines.clear();
|
|
||||||
delete m_consumer;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -55,27 +60,31 @@ void AWDataEngineAggregator::disconnectSources()
|
|||||||
for (auto dataengine : m_dataEngines.values())
|
for (auto dataengine : m_dataEngines.values())
|
||||||
for (auto &source : dataengine->sources())
|
for (auto &source : dataengine->sources())
|
||||||
dataengine->disconnectSource(source, parent());
|
dataengine->disconnectSource(source, parent());
|
||||||
|
disconnect(m_newSourceConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AWDataEngineAggregator::initDataEngines(const int _interval)
|
void AWDataEngineAggregator::reconnectSources(const int _interval)
|
||||||
{
|
{
|
||||||
qCDebug(LOG_AW) << "Init dataengines with interval" << _interval;
|
qCDebug(LOG_AW) << "Reconnect sources with interval" << _interval;
|
||||||
|
|
||||||
m_consumer = new Plasma::DataEngineConsumer();
|
disconnectSources();
|
||||||
m_dataEngines["systemmonitor"] = m_consumer->dataEngine("systemmonitor");
|
|
||||||
m_dataEngines["extsysmon"] = m_consumer->dataEngine("extsysmon");
|
|
||||||
m_dataEngines["time"] = m_consumer->dataEngine("time");
|
|
||||||
|
|
||||||
// additional method required by systemmonitor structure
|
m_dataEngines["systemmonitor"]->connectAllSources(parent(), _interval);
|
||||||
connect(m_dataEngines["systemmonitor"], &Plasma::DataEngine::sourceAdded,
|
m_dataEngines["extsysmon"]->connectAllSources(parent(), _interval);
|
||||||
|
m_dataEngines["time"]->connectSource("Local", parent(), 1000);
|
||||||
|
|
||||||
|
m_newSourceConnection = connect(
|
||||||
|
m_dataEngines["systemmonitor"], &Plasma::DataEngine::sourceAdded,
|
||||||
[this, _interval](const QString source) {
|
[this, _interval](const QString source) {
|
||||||
emit(deviceAdded(source));
|
emit(deviceAdded(source));
|
||||||
m_dataEngines["systemmonitor"]->connectSource(source, parent(),
|
m_dataEngines["systemmonitor"]->connectSource(source, parent(),
|
||||||
_interval);
|
_interval);
|
||||||
});
|
});
|
||||||
|
|
||||||
return reconnectSources(_interval);
|
#ifdef BUILD_FUTURE
|
||||||
|
createQueuedConnection();
|
||||||
|
#endif /* BUILD_FUTURE */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -84,26 +93,12 @@ void AWDataEngineAggregator::dropSource(const QString &_source)
|
|||||||
qCDebug(LOG_AW) << "Source" << _source;
|
qCDebug(LOG_AW) << "Source" << _source;
|
||||||
|
|
||||||
// HACK there is no possibility to check to which dataengine source
|
// HACK there is no possibility to check to which dataengine source
|
||||||
// connected we will try to disconnect it from systemmonitor and extsysmon
|
// connected we will try to disconnect it from all engines
|
||||||
for (auto dataengine : m_dataEngines.values())
|
for (auto dataengine : m_dataEngines.values())
|
||||||
dataengine->disconnectSource(_source, parent());
|
dataengine->disconnectSource(_source, parent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AWDataEngineAggregator::reconnectSources(const int _interval)
|
|
||||||
{
|
|
||||||
qCDebug(LOG_AW) << "Reconnect sources with interval" << _interval;
|
|
||||||
|
|
||||||
m_dataEngines["systemmonitor"]->connectAllSources(parent(), _interval);
|
|
||||||
m_dataEngines["extsysmon"]->connectAllSources(parent(), _interval);
|
|
||||||
m_dataEngines["time"]->connectSource("Local", parent(), 1000);
|
|
||||||
|
|
||||||
#ifdef BUILD_FUTURE
|
|
||||||
createQueuedConnection();
|
|
||||||
#endif /* BUILD_FUTURE */
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void AWDataEngineAggregator::createQueuedConnection()
|
void AWDataEngineAggregator::createQueuedConnection()
|
||||||
{
|
{
|
||||||
// HACK additional method which forces QueuedConnection instead of Auto one
|
// HACK additional method which forces QueuedConnection instead of Auto one
|
||||||
|
@ -32,21 +32,20 @@ class AWDataEngineAggregator : public QObject
|
|||||||
public:
|
public:
|
||||||
explicit AWDataEngineAggregator(QObject *_parent = nullptr);
|
explicit AWDataEngineAggregator(QObject *_parent = nullptr);
|
||||||
virtual ~AWDataEngineAggregator();
|
virtual ~AWDataEngineAggregator();
|
||||||
void clear();
|
|
||||||
void disconnectSources();
|
void disconnectSources();
|
||||||
void initDataEngines(const int _interval);
|
void reconnectSources(const int _interval);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void deviceAdded(const QString &_source);
|
void deviceAdded(const QString &_source);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void dropSource(const QString &_source);
|
void dropSource(const QString &_source);
|
||||||
void reconnectSources(const int _interval);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void createQueuedConnection();
|
void createQueuedConnection();
|
||||||
Plasma::DataEngineConsumer *m_consumer = nullptr;
|
Plasma::DataEngineConsumer *m_consumer = nullptr;
|
||||||
QHash<QString, Plasma::DataEngine *> m_dataEngines;
|
QHash<QString, Plasma::DataEngine *> m_dataEngines;
|
||||||
|
QMetaObject::Connection m_newSourceConnection;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -48,10 +48,7 @@ public slots:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
AWKeys *m_plugin = nullptr;
|
AWKeys *m_plugin = nullptr;
|
||||||
QStringList m_logLevels = QStringList() << "debug"
|
QStringList m_logLevels = {"debug", "info", "warning", "critical"};
|
||||||
<< "info"
|
|
||||||
<< "warning"
|
|
||||||
<< "critical";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
#include "awactions.h"
|
#include "awactions.h"
|
||||||
#include "awbugreporter.h"
|
#include "awbugreporter.h"
|
||||||
#include "awconfighelper.h"
|
#include "awconfighelper.h"
|
||||||
#include "awformatterconfigfactory.h"
|
|
||||||
#include "awkeys.h"
|
#include "awkeys.h"
|
||||||
|
#include "awpairconfigfactory.h"
|
||||||
#include "awtelemetryhandler.h"
|
#include "awtelemetryhandler.h"
|
||||||
|
|
||||||
|
|
||||||
@ -34,8 +34,7 @@ void AWPlugin::registerTypes(const char *uri)
|
|||||||
qmlRegisterType<AWActions>(uri, 1, 0, "AWActions");
|
qmlRegisterType<AWActions>(uri, 1, 0, "AWActions");
|
||||||
qmlRegisterType<AWBugReporter>(uri, 1, 0, "AWBugReporter");
|
qmlRegisterType<AWBugReporter>(uri, 1, 0, "AWBugReporter");
|
||||||
qmlRegisterType<AWConfigHelper>(uri, 1, 0, "AWConfigHelper");
|
qmlRegisterType<AWConfigHelper>(uri, 1, 0, "AWConfigHelper");
|
||||||
qmlRegisterType<AWFormatterConfigFactory>(uri, 1, 0,
|
qmlRegisterType<AWPairConfigFactory>(uri, 1, 0, "AWPairConfigFactory");
|
||||||
"AWFormatterConfigFactory");
|
|
||||||
qmlRegisterType<AWKeys>(uri, 1, 0, "AWKeys");
|
qmlRegisterType<AWKeys>(uri, 1, 0, "AWKeys");
|
||||||
qmlRegisterType<AWTelemetryHandler>(uri, 1, 0, "AWTelemetryHandler");
|
qmlRegisterType<AWTelemetryHandler>(uri, 1, 0, "AWTelemetryHandler");
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QNetworkInterface>
|
#include <QNetworkInterface>
|
||||||
#include <QRegExp>
|
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QStandardPaths>
|
#include <QStandardPaths>
|
||||||
|
|
||||||
|
@ -55,15 +55,6 @@ AWKeyOperations::AWKeyOperations(QObject *_parent)
|
|||||||
AWKeyOperations::~AWKeyOperations()
|
AWKeyOperations::~AWKeyOperations()
|
||||||
{
|
{
|
||||||
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
|
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
|
||||||
|
|
||||||
// extensions
|
|
||||||
delete m_customKeys;
|
|
||||||
delete m_graphicalItems;
|
|
||||||
delete m_extNetRequest;
|
|
||||||
delete m_extQuotes;
|
|
||||||
delete m_extScripts;
|
|
||||||
delete m_extUpgrade;
|
|
||||||
delete m_extWeather;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,25 +19,18 @@
|
|||||||
#ifndef AWKEYOPERATIONS_H
|
#ifndef AWKEYOPERATIONS_H
|
||||||
#define AWKEYOPERATIONS_H
|
#define AWKEYOPERATIONS_H
|
||||||
|
|
||||||
#include <Plasma/DataEngine>
|
|
||||||
|
|
||||||
#include <QMutex>
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
#include "extitemaggregator.h"
|
#include "extitemaggregator.h"
|
||||||
|
|
||||||
|
|
||||||
class AWCustomKeysHelper;
|
class AWCustomKeysHelper;
|
||||||
class AWDataAggregator;
|
|
||||||
class AWDataEngineAggregator;
|
|
||||||
class AWKeysAggregator;
|
|
||||||
class ExtNetworkRequest;
|
class ExtNetworkRequest;
|
||||||
class ExtQuotes;
|
class ExtQuotes;
|
||||||
class ExtScript;
|
class ExtScript;
|
||||||
class ExtUpgrade;
|
class ExtUpgrade;
|
||||||
class ExtWeather;
|
class ExtWeather;
|
||||||
class GraphicalItem;
|
class GraphicalItem;
|
||||||
class QThreadPool;
|
|
||||||
|
|
||||||
class AWKeyOperations : public QObject
|
class AWKeyOperations : public QObject
|
||||||
{
|
{
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
|
|
||||||
#include <QDBusConnection>
|
#include <QDBusConnection>
|
||||||
#include <QDBusError>
|
#include <QDBusError>
|
||||||
#include <QRegExp>
|
|
||||||
#include <QThread>
|
#include <QThread>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QtConcurrent/QtConcurrent>
|
#include <QtConcurrent/QtConcurrent>
|
||||||
@ -76,24 +75,9 @@ AWKeys::~AWKeys()
|
|||||||
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
|
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
|
||||||
|
|
||||||
m_timer->stop();
|
m_timer->stop();
|
||||||
delete m_timer;
|
|
||||||
|
|
||||||
// delete dbus session
|
// delete dbus session
|
||||||
qlonglong id = reinterpret_cast<qlonglong>(this);
|
qlonglong id = reinterpret_cast<qlonglong>(this);
|
||||||
QDBusConnection::sessionBus().unregisterObject(QString("/%1").arg(id));
|
QDBusConnection::sessionBus().unregisterObject(QString("/%1").arg(id));
|
||||||
|
|
||||||
// core
|
|
||||||
delete m_dataEngineAggregator;
|
|
||||||
delete m_threadPool;
|
|
||||||
delete m_aggregator;
|
|
||||||
delete m_dataAggregator;
|
|
||||||
delete m_keyOperator;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool AWKeys::isDBusActive() const
|
|
||||||
{
|
|
||||||
return m_dbusActive;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -122,8 +106,7 @@ void AWKeys::initKeys(const QString &_currentPattern, const int _interval,
|
|||||||
m_aggregator->initFormatters();
|
m_aggregator->initFormatters();
|
||||||
m_keyOperator->setPattern(_currentPattern);
|
m_keyOperator->setPattern(_currentPattern);
|
||||||
m_keyOperator->updateCache();
|
m_keyOperator->updateCache();
|
||||||
m_dataEngineAggregator->clear();
|
m_dataEngineAggregator->reconnectSources(_interval);
|
||||||
m_dataEngineAggregator->initDataEngines(_interval);
|
|
||||||
|
|
||||||
// timer
|
// timer
|
||||||
m_timer->setInterval(_interval);
|
m_timer->setInterval(_interval);
|
||||||
@ -348,13 +331,9 @@ void AWKeys::createDBusInterface()
|
|||||||
qCWarning(LOG_AW) << "Could not register DBus service, last error"
|
qCWarning(LOG_AW) << "Could not register DBus service, last error"
|
||||||
<< bus.lastError().message();
|
<< bus.lastError().message();
|
||||||
if (!bus.registerObject(QString("/%1").arg(id), new AWDBusAdaptor(this),
|
if (!bus.registerObject(QString("/%1").arg(id), new AWDBusAdaptor(this),
|
||||||
QDBusConnection::ExportAllContents)) {
|
QDBusConnection::ExportAllContents))
|
||||||
qCWarning(LOG_AW) << "Could not register DBus object, last error"
|
qCWarning(LOG_AW) << "Could not register DBus object, last error"
|
||||||
<< bus.lastError().message();
|
<< bus.lastError().message();
|
||||||
m_dbusActive = false;
|
|
||||||
} else {
|
|
||||||
m_dbusActive = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
|
|
||||||
class AWCustomKeysHelper;
|
|
||||||
class AWDataAggregator;
|
class AWDataAggregator;
|
||||||
class AWDataEngineAggregator;
|
class AWDataEngineAggregator;
|
||||||
class AWKeyOperations;
|
class AWKeyOperations;
|
||||||
@ -40,7 +39,6 @@ class AWKeys : public QObject
|
|||||||
public:
|
public:
|
||||||
explicit AWKeys(QObject *_parent = nullptr);
|
explicit AWKeys(QObject *_parent = nullptr);
|
||||||
virtual ~AWKeys();
|
virtual ~AWKeys();
|
||||||
bool isDBusActive() const;
|
|
||||||
Q_INVOKABLE void initDataAggregator(const QVariantMap &_tooltipParams);
|
Q_INVOKABLE void initDataAggregator(const QVariantMap &_tooltipParams);
|
||||||
Q_INVOKABLE void initKeys(const QString &_currentPattern,
|
Q_INVOKABLE void initKeys(const QString &_currentPattern,
|
||||||
const int _interval, const int _limit,
|
const int _interval, const int _limit,
|
||||||
@ -89,7 +87,6 @@ private:
|
|||||||
AWKeyOperations *m_keyOperator = nullptr;
|
AWKeyOperations *m_keyOperator = nullptr;
|
||||||
QTimer *m_timer = nullptr;
|
QTimer *m_timer = nullptr;
|
||||||
// variables
|
// variables
|
||||||
bool m_dbusActive = false;
|
|
||||||
QVariantMap m_tooltipParams;
|
QVariantMap m_tooltipParams;
|
||||||
QStringList m_foundBars, m_foundKeys, m_foundLambdas, m_requiredKeys;
|
QStringList m_foundBars, m_foundKeys, m_foundLambdas, m_requiredKeys;
|
||||||
QVariantHash m_values;
|
QVariantHash m_values;
|
||||||
|
@ -60,8 +60,6 @@ AWKeysAggregator::AWKeysAggregator(QObject *_parent)
|
|||||||
AWKeysAggregator::~AWKeysAggregator()
|
AWKeysAggregator::~AWKeysAggregator()
|
||||||
{
|
{
|
||||||
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
|
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
|
||||||
|
|
||||||
delete m_customFormatters;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,27 +15,27 @@
|
|||||||
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
|
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
#include "awformatterconfigfactory.h"
|
#include "awpairconfigfactory.h"
|
||||||
|
|
||||||
#include "awcustomkeysconfig.h"
|
#include "awcustomkeysconfig.h"
|
||||||
#include "awdebug.h"
|
#include "awdebug.h"
|
||||||
#include "awformatterconfig.h"
|
#include "awformatterconfig.h"
|
||||||
|
|
||||||
|
|
||||||
AWFormatterConfigFactory::AWFormatterConfigFactory(QObject *_parent)
|
AWPairConfigFactory::AWPairConfigFactory(QObject *_parent)
|
||||||
: QObject(_parent)
|
: QObject(_parent)
|
||||||
{
|
{
|
||||||
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
|
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
AWFormatterConfigFactory::~AWFormatterConfigFactory()
|
AWPairConfigFactory::~AWPairConfigFactory()
|
||||||
{
|
{
|
||||||
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
|
qCDebug(LOG_AW) << __PRETTY_FUNCTION__;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AWFormatterConfigFactory::showFormatterDialog(const QStringList &_keys)
|
void AWPairConfigFactory::showFormatterDialog(const QStringList &_keys)
|
||||||
{
|
{
|
||||||
AWFormatterConfig *config = new AWFormatterConfig(nullptr, _keys);
|
AWFormatterConfig *config = new AWFormatterConfig(nullptr, _keys);
|
||||||
config->showDialog();
|
config->showDialog();
|
||||||
@ -43,7 +43,7 @@ void AWFormatterConfigFactory::showFormatterDialog(const QStringList &_keys)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AWFormatterConfigFactory::showKeysDialog(const QStringList &_keys)
|
void AWPairConfigFactory::showKeysDialog(const QStringList &_keys)
|
||||||
{
|
{
|
||||||
AWCustomKeysConfig *config = new AWCustomKeysConfig(nullptr, _keys);
|
AWCustomKeysConfig *config = new AWCustomKeysConfig(nullptr, _keys);
|
||||||
config->showDialog();
|
config->showDialog();
|
@ -16,19 +16,19 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef AWFORMATTERCONFIGFACTORY_H
|
#ifndef AWPAIRCONFIGFACTORY_H
|
||||||
#define AWFORMATTERCONFIGFACTORY_H
|
#define AWPAIRCONFIGFACTORY_H
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
|
|
||||||
class AWFormatterConfigFactory : public QObject
|
class AWPairConfigFactory : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit AWFormatterConfigFactory(QObject *_parent = nullptr);
|
explicit AWPairConfigFactory(QObject *_parent = nullptr);
|
||||||
virtual ~AWFormatterConfigFactory();
|
virtual ~AWPairConfigFactory();
|
||||||
Q_INVOKABLE void showFormatterDialog(const QStringList &_keys);
|
Q_INVOKABLE void showFormatterDialog(const QStringList &_keys);
|
||||||
Q_INVOKABLE void showKeysDialog(const QStringList &_keys);
|
Q_INVOKABLE void showKeysDialog(const QStringList &_keys);
|
||||||
|
|
||||||
@ -36,4 +36,4 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif /* AWFORMATTERCONFIGFACTORY_H */
|
#endif /* AWPAIRCONFIGFACTORY_H */
|
@ -18,10 +18,8 @@
|
|||||||
#include "awtelemetryhandler.h"
|
#include "awtelemetryhandler.h"
|
||||||
|
|
||||||
#include <QJsonDocument>
|
#include <QJsonDocument>
|
||||||
#include <QJsonParseError>
|
|
||||||
#include <QNetworkAccessManager>
|
#include <QNetworkAccessManager>
|
||||||
#include <QNetworkReply>
|
#include <QNetworkReply>
|
||||||
#include <QNetworkRequest>
|
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QStandardPaths>
|
#include <QStandardPaths>
|
||||||
#include <QUuid>
|
#include <QUuid>
|
||||||
|
@ -20,10 +20,8 @@
|
|||||||
#define AWTELEMETRYHANDLER_H
|
#define AWTELEMETRYHANDLER_H
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QtCore/QVariant>
|
|
||||||
|
|
||||||
|
|
||||||
class QAbstractButton;
|
|
||||||
class QNetworkReply;
|
class QNetworkReply;
|
||||||
|
|
||||||
class AWTelemetryHandler : public QObject
|
class AWTelemetryHandler : public QObject
|
||||||
|
@ -21,10 +21,8 @@
|
|||||||
|
|
||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
#include <QJsonDocument>
|
#include <QJsonDocument>
|
||||||
#include <QJsonParseError>
|
|
||||||
#include <QNetworkAccessManager>
|
#include <QNetworkAccessManager>
|
||||||
#include <QNetworkReply>
|
#include <QNetworkReply>
|
||||||
#include <QNetworkRequest>
|
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
|
|
||||||
#include "awdebug.h"
|
#include "awdebug.h"
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
#include <QTime>
|
#include <QTime>
|
||||||
|
|
||||||
#include "abstractextitemaggregator.h"
|
#include "abstractextitemaggregator.h"
|
||||||
#include "awdebug.h"
|
|
||||||
#include "qcronscheduler.h"
|
#include "qcronscheduler.h"
|
||||||
|
|
||||||
|
|
||||||
@ -47,7 +46,7 @@ AbstractExtItem::~AbstractExtItem()
|
|||||||
if (m_socket) {
|
if (m_socket) {
|
||||||
m_socket->close();
|
m_socket->close();
|
||||||
m_socket->removeServer(socket());
|
m_socket->removeServer(socket());
|
||||||
delete m_socket;
|
m_socket->deleteLater();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
#include <KI18n/KLocalizedString>
|
#include <KI18n/KLocalizedString>
|
||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QFileInfo>
|
|
||||||
#include <QInputDialog>
|
#include <QInputDialog>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
|
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
#include <KI18n/KLocalizedString>
|
#include <KI18n/KLocalizedString>
|
||||||
|
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
#include <QDir>
|
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
|
|
||||||
#include "awdebug.h"
|
#include "awdebug.h"
|
||||||
|
@ -18,9 +18,10 @@
|
|||||||
#ifndef AWDATETIMEFORMATTER_H
|
#ifndef AWDATETIMEFORMATTER_H
|
||||||
#define AWDATETIMEFORMATTER_H
|
#define AWDATETIMEFORMATTER_H
|
||||||
|
|
||||||
#include "awabstractformatter.h"
|
|
||||||
#include <QLocale>
|
#include <QLocale>
|
||||||
|
|
||||||
|
#include "awabstractformatter.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Ui
|
namespace Ui
|
||||||
{
|
{
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
|
|
||||||
#include <KI18n/KLocalizedString>
|
#include <KI18n/KLocalizedString>
|
||||||
|
|
||||||
#include <QDir>
|
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
|
|
||||||
#include "awdebug.h"
|
#include "awdebug.h"
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
|
|
||||||
#include <KI18n/KLocalizedString>
|
#include <KI18n/KLocalizedString>
|
||||||
|
|
||||||
#include <QDir>
|
|
||||||
#include <QJSEngine>
|
#include <QJSEngine>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
|
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
|
|
||||||
#include <KI18n/KLocalizedString>
|
#include <KI18n/KLocalizedString>
|
||||||
|
|
||||||
#include <QDir>
|
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
|
|
||||||
#include "awdebug.h"
|
#include "awdebug.h"
|
||||||
|
@ -21,8 +21,6 @@
|
|||||||
#include <KI18n/KLocalizedString>
|
#include <KI18n/KLocalizedString>
|
||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QNetworkAccessManager>
|
|
||||||
#include <QNetworkRequest>
|
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QTextCodec>
|
#include <QTextCodec>
|
||||||
|
|
||||||
|
@ -22,9 +22,6 @@
|
|||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QJsonDocument>
|
#include <QJsonDocument>
|
||||||
#include <QJsonParseError>
|
|
||||||
#include <QNetworkAccessManager>
|
|
||||||
#include <QNetworkRequest>
|
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QUrlQuery>
|
#include <QUrlQuery>
|
||||||
|
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QJsonDocument>
|
#include <QJsonDocument>
|
||||||
#include <QJsonParseError>
|
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QStandardPaths>
|
#include <QStandardPaths>
|
||||||
#include <QTextCodec>
|
#include <QTextCodec>
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
#include <KI18n/KLocalizedString>
|
#include <KI18n/KLocalizedString>
|
||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QRegExp>
|
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QTextCodec>
|
#include <QTextCodec>
|
||||||
|
|
||||||
|
@ -22,9 +22,6 @@
|
|||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QJsonDocument>
|
#include <QJsonDocument>
|
||||||
#include <QJsonParseError>
|
|
||||||
#include <QNetworkAccessManager>
|
|
||||||
#include <QNetworkRequest>
|
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QStandardPaths>
|
#include <QStandardPaths>
|
||||||
|
|
||||||
@ -72,7 +69,6 @@ ExtWeather::~ExtWeather()
|
|||||||
disconnect(this, SIGNAL(requestDataUpdate()), this, SLOT(sendRequest()));
|
disconnect(this, SIGNAL(requestDataUpdate()), this, SLOT(sendRequest()));
|
||||||
|
|
||||||
m_manager->deleteLater();
|
m_manager->deleteLater();
|
||||||
delete m_providerObject;
|
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,6 +38,19 @@ GraphicalItem::GraphicalItem(QWidget *_parent, const QString &_filePath)
|
|||||||
{
|
{
|
||||||
qCDebug(LOG_LIB) << __PRETTY_FUNCTION__;
|
qCDebug(LOG_LIB) << __PRETTY_FUNCTION__;
|
||||||
|
|
||||||
|
// init scene
|
||||||
|
m_scene = new QGraphicsScene();
|
||||||
|
m_scene->setBackgroundBrush(QBrush(Qt::NoBrush));
|
||||||
|
// init view
|
||||||
|
m_view = new QGraphicsView(m_scene);
|
||||||
|
m_view->setStyleSheet("background: transparent");
|
||||||
|
m_view->setContentsMargins(0, 0, 0, 0);
|
||||||
|
m_view->setFrameShape(QFrame::NoFrame);
|
||||||
|
m_view->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
|
m_view->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
|
// init helper
|
||||||
|
m_helper = new GraphicalItemHelper(this, m_scene);
|
||||||
|
|
||||||
if (!_filePath.isEmpty())
|
if (!_filePath.isEmpty())
|
||||||
readConfiguration();
|
readConfiguration();
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
@ -58,9 +71,7 @@ GraphicalItem::~GraphicalItem()
|
|||||||
{
|
{
|
||||||
qCDebug(LOG_LIB) << __PRETTY_FUNCTION__;
|
qCDebug(LOG_LIB) << __PRETTY_FUNCTION__;
|
||||||
|
|
||||||
delete m_scene;
|
|
||||||
delete ui;
|
delete ui;
|
||||||
delete m_helper;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -141,24 +152,7 @@ QString GraphicalItem::image(const QVariant &value)
|
|||||||
|
|
||||||
void GraphicalItem::initScene()
|
void GraphicalItem::initScene()
|
||||||
{
|
{
|
||||||
// cleanup
|
|
||||||
delete m_helper;
|
|
||||||
delete m_scene;
|
|
||||||
|
|
||||||
// init scene
|
|
||||||
m_scene = new QGraphicsScene();
|
|
||||||
m_scene->setBackgroundBrush(QBrush(Qt::NoBrush));
|
|
||||||
// init view
|
|
||||||
m_view = new QGraphicsView(m_scene);
|
|
||||||
m_view->setStyleSheet("background: transparent");
|
|
||||||
m_view->setContentsMargins(0, 0, 0, 0);
|
|
||||||
m_view->setFrameShape(QFrame::NoFrame);
|
|
||||||
m_view->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
|
||||||
m_view->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
|
||||||
m_view->resize(m_width + 5, m_height + 5);
|
m_view->resize(m_width + 5, m_height + 5);
|
||||||
|
|
||||||
// init helper
|
|
||||||
m_helper = new GraphicalItemHelper(this, m_scene);
|
|
||||||
m_helper->setParameters(activeColor(), inactiveColor(), itemWidth(),
|
m_helper->setParameters(activeColor(), inactiveColor(), itemWidth(),
|
||||||
itemHeight(), count());
|
itemHeight(), count());
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
#include "graphicalitemhelper.h"
|
#include "graphicalitemhelper.h"
|
||||||
|
|
||||||
#include <QColor>
|
|
||||||
#include <QGraphicsEllipseItem>
|
#include <QGraphicsEllipseItem>
|
||||||
#include <QGraphicsScene>
|
#include <QGraphicsScene>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
@ -44,7 +44,6 @@ QCronScheduler::~QCronScheduler()
|
|||||||
qCDebug(LOG_LIB) << __PRETTY_FUNCTION__;
|
qCDebug(LOG_LIB) << __PRETTY_FUNCTION__;
|
||||||
|
|
||||||
m_timer->stop();
|
m_timer->stop();
|
||||||
delete m_timer;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,8 +27,6 @@
|
|||||||
#include <QGraphicsView>
|
#include <QGraphicsView>
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
#include <QListWidget>
|
#include <QListWidget>
|
||||||
#include <QMessageBox>
|
|
||||||
#include <QPixmap>
|
|
||||||
#include <QScreen>
|
#include <QScreen>
|
||||||
|
|
||||||
#include <fontdialog/fontdialog.h>
|
#include <fontdialog/fontdialog.h>
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
#include "extsysmon.h"
|
#include "extsysmon.h"
|
||||||
|
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QRegExp>
|
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QStandardPaths>
|
#include <QStandardPaths>
|
||||||
|
|
||||||
@ -50,8 +49,6 @@ ExtendedSysMon::ExtendedSysMon(QObject *_parent, const QVariantList &_args)
|
|||||||
ExtendedSysMon::~ExtendedSysMon()
|
ExtendedSysMon::~ExtendedSysMon()
|
||||||
{
|
{
|
||||||
qCDebug(LOG_ESM) << __PRETTY_FUNCTION__;
|
qCDebug(LOG_ESM) << __PRETTY_FUNCTION__;
|
||||||
|
|
||||||
delete m_aggregator;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -37,8 +37,6 @@ CustomSource::CustomSource(QObject *_parent, const QStringList &_args)
|
|||||||
CustomSource::~CustomSource()
|
CustomSource::~CustomSource()
|
||||||
{
|
{
|
||||||
qCDebug(LOG_ESS) << __PRETTY_FUNCTION__;
|
qCDebug(LOG_ESS) << __PRETTY_FUNCTION__;
|
||||||
|
|
||||||
delete m_extScripts;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -37,8 +37,6 @@ QuotesSource::QuotesSource(QObject *_parent, const QStringList &_args)
|
|||||||
QuotesSource::~QuotesSource()
|
QuotesSource::~QuotesSource()
|
||||||
{
|
{
|
||||||
qCDebug(LOG_ESS) << __PRETTY_FUNCTION__;
|
qCDebug(LOG_ESS) << __PRETTY_FUNCTION__;
|
||||||
|
|
||||||
delete m_extQuotes;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -38,8 +38,6 @@ RequestSource::RequestSource(QObject *_parent, const QStringList &_args)
|
|||||||
RequestSource::~RequestSource()
|
RequestSource::~RequestSource()
|
||||||
{
|
{
|
||||||
qCDebug(LOG_ESS) << __PRETTY_FUNCTION__;
|
qCDebug(LOG_ESS) << __PRETTY_FUNCTION__;
|
||||||
|
|
||||||
delete m_extNetRequest;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -37,8 +37,6 @@ UpgradeSource::UpgradeSource(QObject *_parent, const QStringList &_args)
|
|||||||
UpgradeSource::~UpgradeSource()
|
UpgradeSource::~UpgradeSource()
|
||||||
{
|
{
|
||||||
qCDebug(LOG_ESS) << __PRETTY_FUNCTION__;
|
qCDebug(LOG_ESS) << __PRETTY_FUNCTION__;
|
||||||
|
|
||||||
delete m_extUpgrade;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -37,8 +37,6 @@ WeatherSource::WeatherSource(QObject *_parent, const QStringList &_args)
|
|||||||
WeatherSource::~WeatherSource()
|
WeatherSource::~WeatherSource()
|
||||||
{
|
{
|
||||||
qCDebug(LOG_ESS) << __PRETTY_FUNCTION__;
|
qCDebug(LOG_ESS) << __PRETTY_FUNCTION__;
|
||||||
|
|
||||||
delete m_extWeather;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -28,8 +28,8 @@ Row {
|
|||||||
|
|
||||||
// backend
|
// backend
|
||||||
property var backend
|
property var backend
|
||||||
AWFormatterConfigFactory {
|
AWPairConfigFactory {
|
||||||
id: awFormatter
|
id: awPairConfig
|
||||||
}
|
}
|
||||||
AWTelemetryHandler {
|
AWTelemetryHandler {
|
||||||
id: awTelemetryHandler
|
id: awTelemetryHandler
|
||||||
@ -49,13 +49,13 @@ Row {
|
|||||||
QtControls.Button {
|
QtControls.Button {
|
||||||
width: parent.width * 3 / 15
|
width: parent.width * 3 / 15
|
||||||
text: i18n("Formatters")
|
text: i18n("Formatters")
|
||||||
onClicked: awFormatter.showFormatterDialog(backend.dictKeys(true))
|
onClicked: awPairConfig.showFormatterDialog(backend.dictKeys(true))
|
||||||
}
|
}
|
||||||
|
|
||||||
QtControls.Button {
|
QtControls.Button {
|
||||||
width: parent.width * 3 / 15
|
width: parent.width * 3 / 15
|
||||||
text: i18n("User keys")
|
text: i18n("User keys")
|
||||||
onClicked: awFormatter.showKeysDialog(backend.dictKeys(true))
|
onClicked: awPairConfig.showKeysDialog(backend.dictKeys(true))
|
||||||
}
|
}
|
||||||
|
|
||||||
QtControls.Button {
|
QtControls.Button {
|
||||||
|
@ -168,9 +168,6 @@ void TestAWKeys::test_valueByKey()
|
|||||||
|
|
||||||
void TestAWKeys::test_dbus()
|
void TestAWKeys::test_dbus()
|
||||||
{
|
{
|
||||||
if (!plugin->isDBusActive())
|
|
||||||
QSKIP("No DBus session created, skip DBus test");
|
|
||||||
|
|
||||||
// get id
|
// get id
|
||||||
qlonglong id = reinterpret_cast<qlonglong>(plugin);
|
qlonglong id = reinterpret_cast<qlonglong>(plugin);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user