Skip to content

feat(power)!: switch backend from lmt to tlp#559

Closed
Decodetalkers wants to merge 1 commit intolinuxdeepin:masterfrom
Decodetalkers:switchtotlp
Closed

feat(power)!: switch backend from lmt to tlp#559
Decodetalkers wants to merge 1 commit intolinuxdeepin:masterfrom
Decodetalkers:switchtotlp

Conversation

@Decodetalkers
Copy link
Contributor

Log:

@Decodetalkers
Copy link
Contributor Author

@xzl01

"os/exec"
"regexp"
"strings"
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

添加空行,下面几处同理

return
}
var enable bool
// var tlpCfgChanged bool
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不需要的变量删掉

"os/exec"
"path/filepath"
"strings"
//"github.com/linuxdeepin/go-lib/dbusutil"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不需要的包删掉

if os.IsNotExist(err) {
return false, nil
}
logger.Warning(err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这一行可以移到65行

}

func (m *Manager) setPowerSavingModeEnabled(enable bool) (changed bool) {
changed = m.setPropPowerSavingModeEnabled(enable)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果这个属性没有change, 是否还需要写呢

import (
"errors"
"github.com/godbus/dbus/v5"
ConfigManager "github.com/linuxdeepin/go-dbus-factory/org.desktopspec.ConfigManager"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ConfigManager小写命名

}

m.setPropPowerSavingModeEnabled(false)
m.setPowerSavingModeEnabled(false)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里是否需要加锁,下面两处同理

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

嗯,我看powersave那边也加锁了,那这边确实要加锁

@Decodetalkers Decodetalkers force-pushed the switchtotlp branch 2 times, most recently from 6ee7982 to 7a259f6 Compare September 28, 2023 05:04
dengbo11
dengbo11 previously approved these changes Oct 7, 2023
@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Decodetalkers

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Decodetalkers
Copy link
Contributor Author

那个锁在manager已经锁了一次了,所以如果再锁就会卡住

@Decodetalkers Decodetalkers marked this pull request as draft October 25, 2023 02:27
@Decodetalkers
Copy link
Contributor Author

需要调研

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Dec 27, 2023

TAG Bot

New tag: 6.0.30
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #596

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Jan 5, 2024

TAG Bot

New tag: 6.0.31
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #604

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Jan 17, 2024

TAG Bot

New tag: 6.0.32
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #609

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Jan 26, 2024

TAG Bot

New tag: 6.0.33
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #613

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Jan 26, 2024

TAG Bot

New tag: 6.0.34
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #614

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Feb 6, 2024

TAG Bot

New tag: 6.0.35
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #616

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants