GUI: Prevent opening new files or directories when project file loaded.
This commit is contained in:
parent
2da6a242d2
commit
5a65f4d55d
|
@ -252,6 +252,17 @@ void MainWindow::DoCheckFiles(const QStringList &files)
|
||||||
|
|
||||||
QStringList MainWindow::SelectFilesToCheck(QFileDialog::FileMode mode)
|
QStringList MainWindow::SelectFilesToCheck(QFileDialog::FileMode mode)
|
||||||
{
|
{
|
||||||
|
if (mProject)
|
||||||
|
{
|
||||||
|
QMessageBox msgBox(this);
|
||||||
|
msgBox.setWindowTitle(tr("Cppcheck"));
|
||||||
|
const QString msg(tr("You must close the project file before selecting new files or directories!"));
|
||||||
|
msgBox.setText(msg);
|
||||||
|
msgBox.setIcon(QMessageBox::Critical);
|
||||||
|
msgBox.exec();
|
||||||
|
return QStringList();
|
||||||
|
}
|
||||||
|
|
||||||
QStringList selected;
|
QStringList selected;
|
||||||
|
|
||||||
// NOTE: we use QFileDialog::getOpenFileNames() and
|
// NOTE: we use QFileDialog::getOpenFileNames() and
|
||||||
|
|
Loading…
Reference in New Issue