MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / browse

Method browse

gui/applicationdialog.cpp:59–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59void ApplicationDialog::browse()
60{
61 QString filter;
62#ifdef Q_OS_WIN
63 // In Windows (almost) all executables have .exe extension
64 // so it does not make sense to show everything.
65 filter += tr("Executable files (*.exe);;All files(*.*)");
66#endif // Q_OS_WIN
67 QString selectedFile = QFileDialog::getOpenFileName(this,
68 tr("Select viewer application"),
69 getPath(SETTINGS_LAST_APP_PATH),
70 filter);
71
72 if (!selectedFile.isEmpty()) {
73 setPath(SETTINGS_LAST_APP_PATH, selectedFile);
74 QString path(QDir::toNativeSeparators(selectedFile));
75 mUI->mPath->setText(path);
76 }
77}
78
79void ApplicationDialog::ok()
80{

Callers

nothing calls this directly

Calls 3

getPathFunction · 0.85
setPathFunction · 0.85
isEmptyMethod · 0.80

Tested by

no test coverage detected