MCPcopy Create free account
hub / github.com/DreamSourceLab/DSView / on_clear_log_file

Method on_clear_log_file

DSView/pv/toolbars/logobar.cpp:322–343  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

320}
321
322void LogoBar::on_clear_log_file()
323{
324 QFile qf(get_dsv_log_path());
325 if (qf.exists()){
326 QString strMsg(L_S(STR_PAGE_MSG, S_ID(IDS_MSG_TO_CLEAR_LOG), "Confirm!"));
327 if (MsgBox::Confirm(strMsg)){
328 dsv_clear_log_file();
329
330 if (_log_open_bt != NULL && _log_clear_bt != NULL){
331 QFile qf(get_dsv_log_path());
332 if (qf.exists() == false){
333 _log_open_bt->setEnabled(false);
334 _log_clear_bt->setEnabled(false);
335 }
336 }
337 }
338 }
339 else{
340 QString strMsg(L_S(STR_PAGE_MSG, S_ID(IDS_MSG_FILE_NOT_EXIST), "Not exist!"));
341 MsgBox::Show(strMsg);
342 }
343}
344
345void LogoBar::UpdateLanguage()
346{

Callers

nothing calls this directly

Calls 3

get_dsv_log_pathFunction · 0.85
dsv_clear_log_fileFunction · 0.85
ShowFunction · 0.85

Tested by

no test coverage detected