Fixed: geqt correctly handles in the FileOpenDialog of cancel action and empty icon

This commit is contained in:
dnk-88 2011-05-07 18:23:23 +03:00
parent a3d7d31bad
commit c4ce6dcdcc
2 changed files with 13 additions and 4 deletions

View file

@ -222,7 +222,7 @@ namespace NLQT
{
COFile file;
std::string s = CPath::lookup(loadedForm.toStdString());
std::string s = CPath::lookup(loadedForm.toStdString(), false);
if (file.open (s))
{
try
@ -323,6 +323,8 @@ namespace NLQT
path,
"Images (*.png *.tga)"
);
if (file.isNull())
return;
QFileInfo info = QFileInfo(file);
// TODO?

View file

@ -184,11 +184,18 @@ namespace NLQT
if (Modules::objViewInt())
{
QIcon *icon = Modules::objViewInt()->saveOneImage(value.toStdString());
if (icon->isNull())
if (icon)
{
if(icon->isNull())
return QIcon(":/images/pqrticles.png");
else
return QIcon(*icon);
}
else
{
return QIcon();
}
}
}
else if(value.contains(".tga") || value.contains(".png"))
{