Added patch providing skeleton functions for OS dependent code
Tobias Winchen
6 years ago
|
0 |
klatexformula (4.0.0-2) unstable; urgency=medium
|
|
1 |
|
|
2 |
* Added patch providing skeletons for OS dependent functions (Closes: #876291)
|
|
3 |
|
|
4 |
-- Tobias Winchen <tobias@winchen.de> Thu, 21 Sep 2017 19:52:59 +0200
|
|
5 |
|
0 | 6 |
klatexformula (4.0.0-1) unstable; urgency=medium
|
1 | 7 |
|
2 | 8 |
[ Tobias Winchen ]
|
|
0 |
Description: Add skeleton functions for os dependent code.
|
|
1 |
Bug: https://sourceforge.net/p/klatexformula/bugs/37/
|
|
2 |
Author: Tobias Winchen <tobias@winchen.de>
|
|
3 |
Last-Update: 2017-09-21
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
--- a/src/klftools/CMakeLists.txt
|
|
8 |
+++ b/src/klftools/CMakeLists.txt
|
|
9 |
@@ -149,6 +149,9 @@
|
|
10 |
)
|
|
11 |
else()
|
|
12 |
# no platform-specific definitions
|
|
13 |
+ target_sources(klftools PRIVATE
|
|
14 |
+ klfdefs_otheros.cpp
|
|
15 |
+ )
|
|
16 |
endif()
|
|
17 |
|
|
18 |
|
|
19 |
--- /dev/null
|
|
20 |
+++ b/src/klftools/klfdefs_otheros.cpp
|
|
21 |
@@ -0,0 +1,33 @@
|
|
22 |
+#include <klfdefs.h>
|
|
23 |
+#include <klfsysinfo.h>
|
|
24 |
+
|
|
25 |
+KLF_EXPORT QString klf_defs_sysinfo_arch()
|
|
26 |
+{
|
|
27 |
+ return QString::fromLatin1("Unknown architecture and OS");
|
|
28 |
+}
|
|
29 |
+
|
|
30 |
+
|
|
31 |
+KLF_EXPORT KLFSysInfo::BatteryInfo _klf_otheros_battery_info()
|
|
32 |
+{
|
|
33 |
+ KLFSysInfo::BatteryInfo info;
|
|
34 |
+
|
|
35 |
+ klfWarning("Could not get battery status.") ;
|
|
36 |
+ info.islaptop = false;
|
|
37 |
+ info.onbatterypower = false;
|
|
38 |
+ return info;
|
|
39 |
+}
|
|
40 |
+
|
|
41 |
+KLF_EXPORT bool _klf_otheros_is_laptop()
|
|
42 |
+{
|
|
43 |
+ KLFSysInfo::BatteryInfo info;
|
|
44 |
+ info = _klf_otheros_battery_info();
|
|
45 |
+ return info.islaptop;
|
|
46 |
+}
|
|
47 |
+
|
|
48 |
+KLF_EXPORT bool _klf_otheros_is_on_battery_power()
|
|
49 |
+{
|
|
50 |
+ KLFSysInfo::BatteryInfo info;
|
|
51 |
+ info = _klf_otheros_battery_info();
|
|
52 |
+ return info.onbatterypower;
|
|
53 |
+}
|
|
54 |
+
|
0 | 0 |
add_keywords_entry_to_desktop_file
|
1 | 1 |
add_useful_whatis_entry_to_manpage
|
|
2 |
add_default_skeleton_functions_for_os_dependent_code
|