Skip to content

Commit 7e8d501

Browse files
fix: Remove unused theme loading logic in Window constructor
- Eliminated the instantiation of DGuiApplicationHelper and the associated theme loading call, streamlining the Window constructor. log: Remove unused theme loading logic bug: https://pms.uniontech.com/bug-view-336807.html
1 parent b39ef76 commit 7e8d501

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/widgets/window.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,11 +224,10 @@ Window::Window(DMainWindow *parent)
224224

225225
// Init.
226226
setAcceptDrops(true);
227+
// 此处已经从默认的配置文件中获取了设置的主题,无需再根据系统主题类型加载对应的主题,
228+
// 防止DGUIapplication的未初始化完成从而使用跟随系统覆盖上一次的设置
227229
loadTheme(m_themePath);
228230

229-
DGuiApplicationHelper *guiAppHelp = DGuiApplicationHelper::instance();
230-
slotLoadContentTheme(guiAppHelp->themeType());
231-
232231
//关闭 替换 查找 跳行bar
233232
connect(this, &Window::pressEsc, m_replaceBar, &ReplaceBar::pressEsc, Qt::QueuedConnection);
234233
connect(this, &Window::pressEsc, m_findBar, &FindBar::pressEsc, Qt::QueuedConnection);

0 commit comments

Comments
 (0)