MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / handleFileOpenEvent

Method handleFileOpenEvent

Gui/GuiAppInstance.cpp:1262–1277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1260}
1261
1262void
1263GuiAppInstance::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
1279void*
1280GuiAppInstance::getOfxHostOSHandle() const

Callers 2

ddeOpenFileMethod · 0.80
handleOpenFileRequestMethod · 0.80

Calls 5

removeFileExtensionFunction · 0.85
getGuiFunction · 0.85
openProjectMethod · 0.80
toStdStringMethod · 0.80

Tested by

no test coverage detected