| 1792 | } |
| 1793 | |
| 1794 | void MainWindow::openProjectFile() |
| 1795 | { |
| 1796 | const QString filter = tr("Project files (*.cppcheck);;All files(*.*)"); |
| 1797 | const QString filepath = QFileDialog::getOpenFileName(this, |
| 1798 | tr("Select Project File"), |
| 1799 | getPath(SETTINGS_LAST_PROJECT_PATH), |
| 1800 | filter); |
| 1801 | |
| 1802 | if (!filepath.isEmpty()) { |
| 1803 | const QFileInfo fi(filepath); |
| 1804 | if (fi.exists() && fi.isFile() && fi.isReadable()) { |
| 1805 | setPath(SETTINGS_LAST_PROJECT_PATH, filepath); |
| 1806 | loadProjectFile(filepath); |
| 1807 | } |
| 1808 | } |
| 1809 | } |
| 1810 | |
| 1811 | void MainWindow::showScratchpad() |
| 1812 | { |