Commit 77fc7495 authored by David Edmundson's avatar David Edmundson

Review comments

parent c5bfb7b8
......@@ -12,7 +12,7 @@ include(KDECMakeSettings)
include(KDECompilerSettings)
include(FeatureSummary)
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core Gui Widgets QuickWidgets)
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core Gui Widgets)
find_package(KF5 REQUIRED COMPONENTS
Completion
......@@ -31,10 +31,8 @@ find_package(KF5 REQUIRED COMPONENTS
WidgetsAddons
XmlGui
Declarative
Package # (make optional)
Plasma # MAKE OPTIONAL
PlasmaQuick # MAKE OPTIONAL
Solid # MAKE OPTIONAL
Package
Solid
)
if(${Qt5Gui_OPENGL_IMPLEMENTATION} STREQUAL "GL")
......
......@@ -13,19 +13,14 @@ set(kcm_energyinfo_SRCS
add_library(kcm_energyinfo MODULE ${kcm_energyinfo_SRCS})
target_link_libraries(kcm_energyinfo
Qt5::DBus
Qt5::Widgets
KF5::KIOWidgets
KF5::CoreAddons
KF5::KCMUtils
KF5::I18n
KF5::Solid
#KF5::Plasma
#KF5::PlasmaQuick
KF5::QuickAddons
#KF5::KDELibs4Support
Qt5::DBus
Qt5::Widgets
Qt5::QuickWidgets
)
kcoreaddons_desktop_to_json(kcm_energyinfo "kcm_energyinfo.desktop")
......
......@@ -25,8 +25,6 @@
#include <KAboutData>
#include <QDebug>
#include <QStandardPaths>
#include <QQuickWidget>
#include <QQuickView>
#include <QtQml>
#include <QQmlEngine>
......@@ -38,7 +36,6 @@
#include <Solid/Battery>
#include <KLocalizedString>
#include <Plasma/PluginLoader>
#include "batterymodel.h"
#include "wakeupmodel.h"
......
......@@ -41,6 +41,8 @@ Rectangle {
}
}
SystemPalette { id: sysPal; colorGroup: SystemPalette.Active }
property bool showWakeUps: true
property int historyType: HistoryModel.ChargeType
......@@ -297,6 +299,7 @@ Rectangle {
PlasmaExtras.Heading {
Layout.fillWidth: true
Layout.columnSpan: 2
color: sysPal.text
level: 4
text: i18n("Application Energy Consumption")
}
......@@ -381,7 +384,7 @@ Rectangle {
Rectangle {
Layout.fillWidth: true
height: 1 // FIXME dpi
height: 1
color: "#ccc" // FIXME palette
visible: wakeUpsGrid.visible
}
......@@ -402,6 +405,7 @@ Rectangle {
PlasmaExtras.Heading {
level: 4
color: sysPal.text
text: modelData.title
}
......
......@@ -12,7 +12,7 @@ X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-Name=kcm_energyinfo
X-KDE-PluginInfo-Version=
X-KDE-PluginInfo-Website=
X-KDE-ServiceTypes=Plasma/Generic
X-KDE-ServiceTypes=Plasma/GenericQml
X-Plasma-API=declarativeappletscript
X-Plasma-MainScript=ui/main.qml
......
......@@ -131,8 +131,8 @@ void WakeUpModel::reload()
} else {
KService::Ptr service = KService::serviceByStorageId(name + ".desktop");
if (service) {
(*it).prettyName = service->property("Name", QVariant::Invalid).toString();
(*it).iconName = service->icon();
it->prettyName = service->property("Name", QVariant::Invalid).toString();
it->iconName = service->icon();
m_applicationInfo.insert(name, qMakePair((*it).prettyName, (*it).iconName));
} else {
......
......@@ -61,9 +61,9 @@ public:
qreal total() const { return m_total; }
QVariant data(const QModelIndex &index, int role) const;
int rowCount(const QModelIndex &parent = QModelIndex()) const;
QHash<int, QByteArray> roleNames() const;
QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE;
int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
QHash<int, QByteArray> roleNames() const Q_DECL_OVERRIDE;
public slots:
void reload();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment