MCPcopy Create free account
hub / github.com/cxasm/notepad-- / close

Method close

src/nddsetting.cpp:297–324  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

295
296
297void NddSetting::close()
298{
299 if (s_reference > 0)
300 {
301 --s_reference;
302
303 if (s_reference == 0)
304 {
305 s_isExistDb = false;
306
307 //做一次真正的保存
308 if (s_isContentChanged)
309 {
310 s_nddSet->sync();
311 delete s_nddSet;
312 s_nddSet = nullptr;
313 s_isContentChanged = false;
314 }
315
316 //在这里保存一下子窗口的位置。不排除有可能子窗口还在,主窗口已经退出的情况,不过问题不大。
317 if (s_nddDelaySet != nullptr)
318 {
319 s_nddDelaySet->sync();
320 s_nddDelaySet = nullptr;
321 }
322 }
323}
324}
325
326//子窗口的位置,单独放在一个winpos.ini文件中,而且启动程序时,不需要读取,可避免启动时拖慢速度
327QByteArray NddSetting::getWinPos(QString key)

Callers 15

setCommonStyleMethod · 0.80
setDefaultStyleMethod · 0.80
setBlackStyleMethod · 0.80
on_importMethod · 0.80
on_closeMethod · 0.80
slot_selectMethod · 0.80
on_hashMethod · 0.80
convertFileToCodeMethod · 0.80
scanFileRealCodeMethod · 0.80
scanFileOutPutMethod · 0.80
initMethod · 0.80
loadPreparedMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected