02317993c8
fix: call "Subscribe" before connect to systemd
...
systemd will only send UnitNew/UnitRemoved after Subscribe called.
2023-08-29 10:07:26 +08:00
8a662314f2
fix: core dumped under Qt 6.4
...
call method metaObject of QMetaType will coredump under Qt 6.4
Signed-off-by: ComixHe <heyuming@deepin.org >
2023-08-29 10:07:26 +08:00
25a7acb6fd
Revert "fix: core dumped under Qt 6.4"
...
Github bug makes me commit wrong content, revert it.
This reverts commit 6fae5a758b
.
2023-08-29 10:06:57 +08:00
6fae5a758b
fix: core dumped under Qt 6.4
...
1. call method metaObject of QMetaType will coredump under Qt 6.4
2. remove `std::terminate()` when AM can't connect to Systemd Signals.
3. call `Subscribe` before connecting to Systemd Signals to guarantee that
systemd will send UnitNew and UnitRemoved.
Signed-off-by: ComixHe <heyuming@deepin.org >
2023-08-29 09:58:02 +08:00
ce2148e5cd
fix: incorrect behavior when parse and launch
...
Signed-off-by: ComixHe <heyuming@deepin.org >
2023-08-25 18:23:21 +08:00
3988e0c526
refact: improve desktop parsing
2023-08-25 18:23:21 +08:00
a16754647a
refact: introduce hasNonAsciiAndControlCharacters
...
Make regex thread_local.
2023-08-25 18:23:21 +08:00
17536bca3b
refact: add some comments to DesktopEntry::parseGroupHeader
...
1. remove extra - in that regex;
2. add some comments;
3. correct that typo in method name.
2023-08-25 18:23:21 +08:00
9f6ab28672
feat: add a warning log for invalid locale
2023-08-25 18:23:21 +08:00
ccfb245419
refact: Desktop file parsing process and Application methods to
...
Properties
Signed-off-by: ComixHe <heyuming@deepin.org >
2023-08-25 18:23:21 +08:00
9f2a8b6798
feat: add property "LastLaunchedTime"
...
1. reactor some utils implementation.
2. remove constexpr before `decltype(auto)` due to GCC bug.
refer: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102229
Signed-off-by: ComixHe <heyuming@deepin.org >
2023-08-23 17:46:57 +08:00
2bdb9e99ee
refact: optimize regular expression initialization
...
add profiling test.
Signed-off-by: ComixHe <heyuming@deepin.org >
2023-08-22 11:42:13 +08:00
06ee5e5899
refact: DesktopFile's method and structure
...
Signed-off-by: ComixHe <heyuming@deepin.org >
2023-08-22 11:42:13 +08:00
920594d6e5
refact: ApplicationService ctor and some member functions
...
Signed-off-by: ComixHe <heyuming@deepin.org >
2023-08-22 11:42:13 +08:00
0e7d84f61d
refact: change dbus api and service impl
...
1. change IconName and DisplayName to method
2. refactor impl of GetManagedObject and move it to global.h
3. refactor impl of JobService::status
4. add ut_job.cpp
Signed-off-by: ComixHe <heyuming@deepin.org >
2023-08-22 11:42:13 +08:00
d49a99d252
feat: add objectManager interface
...
refact the way to get DBus interface from Qt Meta System
Signed-off-by: ComixHe <heyuming@deepin.org >
2023-08-22 11:42:13 +08:00
bb83716d27
feat: change dbus interface api
...
1. remove method: Application, Launch. (ApplicationManager1)
2. add property: IconName, DisplayName. (Application1)
3. refact the way of construct ApplicationService.
4. if Desktop Entry Key `Hidden` is true, this application wouldn't
export to DBus.
Signed-off-by: ComixHe <heyuming@deepin.org >
2023-08-22 11:42:13 +08:00
a3dd315e33
test: add identify test
...
fix some bugs found in testing
Signed-off-by: ComixHe <heyuming@deepin.org >
2023-08-16 17:54:42 +08:00
de09f3dbc2
refact: add test-coverage.sh and some docs
...
Signed-off-by: ComixHe <heyuming@deepin.org >
2023-08-16 17:54:42 +08:00
c4c1d72568
refact: hidden escaped app id in dbus object path
...
Signed-off-by: black-desk <me@black-desk.cn >
2023-08-14 13:39:05 +08:00
b0c3475a3d
fix: correct getXDGDataDirs
...
Signed-off-by: black-desk <me@black-desk.cn >
2023-08-14 13:39:05 +08:00
2fa74e40e5
refact: change implementation of UpdateApplicationInfo
...
adjust the way of get XDG_DATA_DIRS.
Signed-off-by: ComixHe <heyuming@deepin.org >
Signed-off-by: black-desk <me@black-desk.cn >
2023-08-14 13:39:05 +08:00
5183716873
refact: apply review suggestions
...
Signed-off-by: black-desk <me@black-desk.cn >
2023-08-14 13:39:05 +08:00
bc2bdf559e
example: add launch application example
...
fix some bug while testing the example
Signed-off-by: ComixHe <heyuming@deepin.org >
Signed-off-by: black-desk <me@black-desk.cn >
2023-08-14 13:39:05 +08:00
722d0666d3
feat: add impl of updateApplicationInfo
...
1. change the way to traverse files
2. refact some code
Signed-off-by: ComixHe <heyuming@deepin.org >
Signed-off-by: black-desk <me@black-desk.cn >
2023-08-14 13:39:05 +08:00
799100436c
feat: watch systemd unit new and remove to sync state
...
add default values to XDG_DATA_DIRS if it dosen't set
Signed-off-by: ComixHe <heyuming@deepin.org >
Signed-off-by: black-desk <me@black-desk.cn >
2023-08-14 13:39:05 +08:00
4687265e65
refact: restructure project
...
1. adjust project structure;
2. use config.h to locate app-launch-helper binary.
2023-08-07 16:46:57 +08:00
fe284e78b6
feat: implementation of the major feature of dbus service
...
Log:
Signed-off-by: ComixHe <heyuming@deepin.org >
2023-08-07 16:46:57 +08:00
857db2625a
style: format code
2023-07-21 14:50:57 +08:00
5fed3ed9f0
feat: add test for desktopentry and jobmanager
...
Log:
2023-07-21 14:50:57 +08:00
d288752fb3
feat: finish dbus service: job/jobManager
...
Log:
2023-07-18 16:37:52 +08:00
3a278bec79
feat: adjust dbus service structure
...
Log:
2023-07-17 16:20:15 +08:00
6f598ab52b
feat: add desktopentry class
...
Log:
2023-07-14 12:05:35 +08:00
fdf01923db
feat: implement job service
...
Log:
2023-07-12 10:41:41 +08:00
10add2092c
feat: init dbus service structure
...
Log: 初始化dbus服务结构
2023-07-10 13:59:48 +08:00
c10838200b
chore: init project structure
...
Log: 初始化项目结构
2023-07-07 15:44:18 +08:00
235db8ab0c
refact: remove almost all files
...
This is a prepare commit for the following refactor of
dde-application-manager.
I remove almost all files in this git repository.
We will start the refactor in later commits.
Signed-off-by: black-desk <me@black-desk.cn >
2023-07-06 10:05:34 +08:00
02a818b12c
fix: fix a use-after-free
...
Signed-off-by: black-desk <me@black-desk.cn >
2023-05-15 05:08:33 +00:00
d4cb60370e
fix: entry->app maybe nullptr, need to judge before use
...
log: as title
2023-05-12 15:33:55 +08:00
a041aa7cf3
docs: add some comments
...
Signed-off-by: black-desk <me@black-desk.cn >
2023-05-12 15:33:55 +08:00
0ce69c609a
revert: b9e5abf
remove jemalloc
...
memory issue has been resolve, jemalloc can be removed
log:
Signed-off-by: black-desk <me@black-desk.cn >
2023-05-12 15:33:55 +08:00
38c9c09487
fix: call workfree to void mem leak
...
Signed-off-by: black-desk <me@black-desk.cn >
2023-05-12 15:33:55 +08:00
a2f91cc525
fix: don't free ptr removed from Entry::m_windowInfoMap
...
Check comment.
Signed-off-by: black-desk <me@black-desk.cn >
2023-05-12 15:33:55 +08:00
ad07a96240
fix: use shared_ptr in XCBUtils::getWindowFrameExtents
...
To void use-after-free issues.
Signed-off-by: black-desk <me@black-desk.cn >
2023-05-12 15:33:55 +08:00
611bc0e092
fix: refact KeyFile::loadFile
...
To void invalid memory access issues.
Signed-off-by: black-desk <me@black-desk.cn >
2023-05-12 15:33:55 +08:00
95ca87eebc
fix: get wrong prefix of desktop name
...
We can only get 'org' by baseName() if the desktop file
named org.gnome.Chess.desktop. It should be completeBaseName().
Log:
2023-05-12 02:14:46 +00:00
d3dcd91ca6
fix: add missing header for clang
...
Clang need these header to be included for definition of uint32_t and
uint64_t.
2023-05-11 06:56:37 +00:00
1fd19ce97d
fix: early return in WindowIdentify::identifyWindowByPidEnv
...
If we cannot get desktop file from env, we should just failed.
2023-05-11 06:33:52 +00:00
b9e5abf214
fix: use jemalloc to temporary circumvention of crash issues
...
log: as title
2023-05-11 13:05:37 +08:00
3932b3637e
refact: Process::getStatus
...
log: as title
2023-05-11 13:05:37 +08:00