mirror of
https://github.com/DreamSourceLab/DSView.git
synced 2025-01-23 13:42:55 +08:00
check the auto load file if be exists
This commit is contained in:
parent
a04eb6ff5d
commit
cabc8bf61d
@ -437,9 +437,17 @@ void MainWindow::update_device_list()
|
||||
_bFirstLoad = false;
|
||||
|
||||
if (AppControl::Instance()->_open_file_name != ""){
|
||||
QString f(QString::fromUtf8(AppControl::Instance()->_open_file_name.c_str()));
|
||||
qDebug()<<"auto load file:"<<f;
|
||||
on_load_file(f);
|
||||
QString opf(QString::fromUtf8(AppControl::Instance()->_open_file_name.c_str()));
|
||||
QFile fpath;
|
||||
|
||||
if (fpath.exists(opf)){
|
||||
qDebug()<<"auto load file:"<<opf;
|
||||
on_load_file(opf);
|
||||
}
|
||||
else{
|
||||
qDebug()<<"file is not exists:"<<opf;
|
||||
MsgBox::Show("Open file error!", opf.toStdString().c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user