mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-10 04:15:51 +00:00
port library
This commit is contained in:
@ -9,7 +9,7 @@ include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../${PROJECT_MONITORSOURCES}/
|
||||
${PROJECT_TRDPARTY_DIR}
|
||||
${Qt_INCLUDE}
|
||||
${Kf5_INCLUDE}
|
||||
${Kf6_INCLUDE}
|
||||
)
|
||||
|
||||
file(GLOB SUBPROJECT_DESKTOP_IN *.desktop)
|
||||
@ -25,11 +25,9 @@ configure_file(${SUBPROJECT_DESKTOP_IN} ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT
|
||||
add_library(${SUBPROJECT} MODULE ${SUBPROJECT_SOURCE} ${SUBPROJECT_HEADER})
|
||||
target_link_libraries(${SUBPROJECT}
|
||||
${PROJECT_LIBRARY} ${PROJECT_MONITORSOURCES}
|
||||
${Qt_LIBRARIES} ${Kf5_LIBRARIES})
|
||||
kcoreaddons_desktop_to_json(${SUBPROJECT} ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_DESKTOP}
|
||||
SERVICE_TYPES plasma-dataengine.desktop)
|
||||
${Qt_LIBRARIES} ${Kf6_LIBRARIES})
|
||||
|
||||
# install
|
||||
install(TARGETS ${SUBPROJECT} DESTINATION ${PLUGIN_INSTALL_DIR}/plasma/dataengine)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_DESKTOP} DESTINATION ${SERVICES_INSTALL_DIR})
|
||||
install(FILES ${SUBPROJECT_CONF} DESTINATION ${CONFIG_INSTALL_DIR})
|
||||
#install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_DESKTOP} DESTINATION ${SERVICES_INSTALL_DIR})
|
||||
install(FILES ${SUBPROJECT_CONF} DESTINATION ${KDE_INSTALL_CONFDIR})
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include "extsysmon.h"
|
||||
|
||||
#include <QFile>
|
||||
#include <QRegularExpression>
|
||||
#include <QSettings>
|
||||
#include <QStandardPaths>
|
||||
|
||||
@ -127,7 +128,7 @@ QHash<QString, QString> ExtendedSysMon::updateConfiguration(QHash<QString, QStri
|
||||
} else {
|
||||
QStringList deviceList = _rawConfig["HDDDEV"].split(',', Qt::SkipEmptyParts);
|
||||
QStringList devices;
|
||||
QRegExp diskRegexp = QRegExp("^/dev/[hms]d[a-z]$");
|
||||
auto diskRegexp = QRegularExpression("^/dev/[hms]d[a-z]$");
|
||||
for (auto &device : deviceList)
|
||||
if ((QFile::exists(device)) && (device.contains(diskRegexp)))
|
||||
devices.append(device);
|
||||
|
@ -18,7 +18,7 @@
|
||||
#ifndef EXTSYSMON_H
|
||||
#define EXTSYSMON_H
|
||||
|
||||
#include <Plasma/DataEngine>
|
||||
#include <Plasma/Plasma/DataEngine>
|
||||
|
||||
|
||||
class ExtSysMonAggregator;
|
||||
|
20
sources/extsysmon/plasma-dataengine-extsysmon.json
Normal file
20
sources/extsysmon/plasma-dataengine-extsysmon.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"KPlugin": {
|
||||
"Authors": [
|
||||
{
|
||||
"Email": "esalexeev@gmail.com",
|
||||
"Name": "Evgeniy Alekseev aka arcanis"
|
||||
}
|
||||
],
|
||||
"Category": "System Information",
|
||||
"Description": "Adds some additional functions to System DataEngine",
|
||||
"Icon": "utilities-system-monitor",
|
||||
"Id": "extsysmon",
|
||||
"License": "GPL3",
|
||||
"Name": "Extended SystemMonitor",
|
||||
"ServiceTypes": [
|
||||
"Plasma/DataEngine"
|
||||
],
|
||||
"Version": "@PROJECT_VERSION@"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user