| 1260 | } |
| 1261 | |
| 1262 | void |
| 1263 | GuiAppInstance::handleFileOpenEvent(const std::string &filename) |
| 1264 | { |
| 1265 | QString fileCopy( QString::fromUtf8( filename.c_str() ) ); |
| 1266 | |
| 1267 | fileCopy.replace( QLatin1Char('\\'), QLatin1Char('/') ); |
| 1268 | QString ext = QtCompat::removeFileExtension(fileCopy); |
| 1269 | if ( ext == QString::fromUtf8(NATRON_PROJECT_FILE_EXT) ) { |
| 1270 | AppInstancePtr app = getGui()->openProject(filename); |
| 1271 | if (!app) { |
| 1272 | Dialogs::errorDialog(tr("Project").toStdString(), tr("Failed to open project").toStdString() + ' ' + filename); |
| 1273 | } |
| 1274 | } else { |
| 1275 | appPTR->handleImageFileOpenRequest(filename); |
| 1276 | } |
| 1277 | } |
| 1278 | |
| 1279 | void* |
| 1280 | GuiAppInstance::getOfxHostOSHandle() const |
no test coverage detected