D27869: Separate processcore/{formatter,unit} into its own library
ahiemstra added a comment. See https://phabricator.kde.org/D28217 for a fix for that. REPOSITORY R111 KSysguard Library REVISION DETAIL https://phabricator.kde.org/D27869 To: ahiemstra, #plasma, davidedmundson Cc: arfrever, zzag, ngraham, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
D27869: Separate processcore/{formatter,unit} into its own library
arfrever added a comment. cmake fails with: ... -- Configuring done CMake Error at formatter/declarative/CMakeLists.txt:3 (add_library): Target "FormatterPlugin" links to target "Qt5::Qml" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing? (Qt 5.14.*) I guess that top-level CMakeLists.txt needs: --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,7 +27,7 @@ include(FeatureSummary) include(GenerateExportHeader) -find_package(Qt5 ${QT_MIN_VERSION} REQUIRED CONFIG COMPONENTS DBus Network Widgets) +find_package(Qt5 ${QT_MIN_VERSION} REQUIRED CONFIG COMPONENTS DBus Network Qml Widgets) find_package(Qt5WebEngineWidgets ${QT_MIN_VERSION} CONFIG) set_package_properties(Qt5WebEngineWidgets PROPERTIES URL "git://code.qt.org/qt/qtwebenginewidgets.git" REPOSITORY R111 KSysguard Library REVISION DETAIL https://phabricator.kde.org/D27869 To: ahiemstra, #plasma, davidedmundson Cc: arfrever, zzag, ngraham, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
D27869: Separate processcore/{formatter,unit} into its own library
This revision was automatically updated to reflect the committed changes. Closed by commit R111:182fbd95dc94: Separate processcore/{formatter,unit} into its own library (authored by ahiemstra). REPOSITORY R111 KSysguard Library CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D27869?vs=77038=78005 REVISION DETAIL https://phabricator.kde.org/D27869 AFFECTED FILES CMakeLists.txt autotests/CMakeLists.txt autotests/formattertest.cpp formatter/CMakeLists.txt formatter/Formatter.cpp formatter/Formatter.h formatter/Unit.cpp formatter/Unit.h formatter/declarative/CMakeLists.txt formatter/declarative/FormatterPlugin.cpp formatter/declarative/FormatterPlugin.h formatter/declarative/FormatterWrapper.cpp formatter/declarative/FormatterWrapper.h formatter/declarative/qmldir processcore/CMakeLists.txt processcore/formatter.cpp processcore/formatter.h processcore/unit.cpp processcore/unit.h tests/formatter/test_formatter.qml To: ahiemstra, #plasma, davidedmundson Cc: zzag, ngraham, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
D27869: Separate processcore/{formatter,unit} into its own library
zzag added inline comments. INLINE COMMENTS > ahiemstra wrote in unit.h:81 > Blame @zzag for that who wrote the original code. :P > > That said, we probably should consider how to deal with localization issues > like that at some point in the future. Oops, sorry. REPOSITORY R111 KSysguard Library REVISION DETAIL https://phabricator.kde.org/D27869 To: ahiemstra, #plasma Cc: zzag, ngraham, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
D27869: Separate processcore/{formatter,unit} into its own library
ahiemstra added a subscriber: zzag. ahiemstra added inline comments. INLINE COMMENTS > ngraham wrote in unit.h:81 > No Fahrenheit for us poor Americans? :) Blame @zzag for that who wrote the original code. :P That said, we probably should consider how to deal with localization issues like that at some point in the future. REPOSITORY R111 KSysguard Library REVISION DETAIL https://phabricator.kde.org/D27869 To: ahiemstra, #plasma Cc: zzag, ngraham, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
D27869: Separate processcore/{formatter,unit} into its own library
ahiemstra updated this revision to Diff 77038. ahiemstra added a comment. - Fix qmldir file - Also register meta type of MetricPrefix so it can actually be used - Add a manual test to test how Formatter works from QML REPOSITORY R111 KSysguard Library CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D27869?vs=77027=77038 BRANCH formatter_lib REVISION DETAIL https://phabricator.kde.org/D27869 AFFECTED FILES CMakeLists.txt autotests/CMakeLists.txt autotests/formattertest.cpp formatter/CMakeLists.txt formatter/Formatter.cpp formatter/Formatter.h formatter/Unit.cpp formatter/Unit.h formatter/declarative/CMakeLists.txt formatter/declarative/FormatterPlugin.cpp formatter/declarative/FormatterPlugin.h formatter/declarative/FormatterWrapper.cpp formatter/declarative/FormatterWrapper.h formatter/declarative/qmldir processcore/CMakeLists.txt processcore/formatter.cpp processcore/formatter.h processcore/unit.cpp processcore/unit.h tests/formatter/test_formatter.qml To: ahiemstra, #plasma Cc: ngraham, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
D27869: Separate processcore/{formatter,unit} into its own library
ngraham added inline comments. INLINE COMMENTS > unit.h:81 > -// Misc units. > -UnitCelsius = 500, > -UnitDecibelMilliWatts, No Fahrenheit for us poor Americans? :) REPOSITORY R111 KSysguard Library REVISION DETAIL https://phabricator.kde.org/D27869 To: ahiemstra, #plasma Cc: ngraham, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
D27869: Separate processcore/{formatter,unit} into its own library
ahiemstra updated this revision to Diff 77027. ahiemstra added a comment. - More minor corrections REPOSITORY R111 KSysguard Library CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D27869?vs=77025=77027 BRANCH formatter_lib REVISION DETAIL https://phabricator.kde.org/D27869 AFFECTED FILES CMakeLists.txt autotests/CMakeLists.txt autotests/formattertest.cpp formatter/CMakeLists.txt formatter/Formatter.cpp formatter/Formatter.h formatter/Unit.cpp formatter/Unit.h formatter/declarative/CMakeLists.txt formatter/declarative/FormatterPlugin.cpp formatter/declarative/FormatterPlugin.h formatter/declarative/FormatterWrapper.cpp formatter/declarative/FormatterWrapper.h formatter/declarative/qmldir processcore/CMakeLists.txt processcore/formatter.cpp processcore/formatter.h processcore/unit.cpp processcore/unit.h To: ahiemstra, #plasma Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
D27869: Separate processcore/{formatter,unit} into its own library
ahiemstra updated this revision to Diff 77025. ahiemstra added a comment. - Correct comment REPOSITORY R111 KSysguard Library CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D27869?vs=77024=77025 BRANCH formatter_lib REVISION DETAIL https://phabricator.kde.org/D27869 AFFECTED FILES CMakeLists.txt autotests/CMakeLists.txt autotests/formattertest.cpp formatter/CMakeLists.txt formatter/Formatter.cpp formatter/Formatter.h formatter/Unit.cpp formatter/Unit.h formatter/declarative/CMakeLists.txt formatter/declarative/FormatterPlugin.cpp formatter/declarative/FormatterPlugin.h formatter/declarative/FormatterWrapper.cpp formatter/declarative/FormatterWrapper.h formatter/declarative/qmldir processcore/CMakeLists.txt processcore/formatter.cpp processcore/formatter.h processcore/unit.cpp processcore/unit.h To: ahiemstra, #plasma Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
D27869: Separate processcore/{formatter,unit} into its own library
ahiemstra created this revision. ahiemstra added a reviewer: Plasma. Herald added a project: Plasma. Herald added a subscriber: plasma-devel. ahiemstra requested review of this revision. REVISION SUMMARY This moves Formatter and Unit out of ProcessCore and into its own Formatter library. This allows us to reuse them in other places, like a new sensor library that will be posted later. It includes a declarative plugin that makes things available to QML. It also contains a small unit test for Formatter. TEST PLAN - The new unit test passes. - KSysGuard still runs correctly. REPOSITORY R111 KSysguard Library BRANCH formatter_lib REVISION DETAIL https://phabricator.kde.org/D27869 AFFECTED FILES CMakeLists.txt autotests/CMakeLists.txt autotests/formattertest.cpp formatter/CMakeLists.txt formatter/Formatter.cpp formatter/Formatter.h formatter/Unit.cpp formatter/Unit.h formatter/declarative/CMakeLists.txt formatter/declarative/FormatterPlugin.cpp formatter/declarative/FormatterPlugin.h formatter/declarative/FormatterWrapper.cpp formatter/declarative/FormatterWrapper.h formatter/declarative/qmldir processcore/CMakeLists.txt processcore/formatter.cpp processcore/formatter.h processcore/unit.cpp processcore/unit.h To: ahiemstra, #plasma Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart