summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
6d0838c)
getOpenFileName() will return a Null-QString on cancel. Feeding that
filename to guile will die (reasonably) with an exception. Instead, we
now just exit from the handler in the gui if the Null-QString is
returned
Closes T33
QString fileName = QFileDialog::getOpenFileName(this, tr("Open Script"), "",
tr("Binaries") + " (*." +
manager->getInterpreter("GUILE")->fileExtension().c_str() + ")");
QString fileName = QFileDialog::getOpenFileName(this, tr("Open Script"), "",
tr("Binaries") + " (*." +
manager->getInterpreter("GUILE")->fileExtension().c_str() + ")");
- std::stringstream a, b;
- std::string c;
- manager->getInterpreter("GUILE")->loadFile(fileName.toStdString(), a, b, c);
+ if(! fileName.isNull()) {
+ std::stringstream a, b;
+ std::string c;
+ manager->getInterpreter("GUILE")->loadFile(fileName.toStdString(), a, b, c);
+ }
});
listWidget = new QTreeWidget();
});
listWidget = new QTreeWidget();