@@ -231,10 +231,13 @@ MainWindow::MainWindow(TranslationHandler* th, QSettings* settings) :
231231 loadSettings ();
232232
233233 mThread ->initialize (mUI ->mResults );
234- if (mProjectFile )
234+ if (mProjectFile ) {
235+ enableProjectActions (true );
235236 formatAndSetTitle (tr (" Project:" ) + ' ' + mProjectFile ->getFilename ());
236- else
237+ } else {
238+ enableProjectActions (false );
237239 formatAndSetTitle ();
240+ }
238241
239242 mUI ->mActionComplianceReport ->setVisible (isCppcheckPremium ());
240243
@@ -243,7 +246,6 @@ MainWindow::MainWindow(TranslationHandler* th, QSettings* settings) :
243246 mUI ->mActionPrint ->setShortcut (QKeySequence::Print);
244247 enableResultsButtons ();
245248 enableProjectOpenActions (true );
246- enableProjectActions (false );
247249
248250 // Must setup MRU menu before CLI param handling as it can load a
249251 // project file and update MRU menu.
@@ -264,9 +266,6 @@ MainWindow::MainWindow(TranslationHandler* th, QSettings* settings) :
264266 handleCLIParams (args);
265267 }
266268
267- mUI ->mActionCloseProjectFile ->setEnabled (mProjectFile != nullptr );
268- mUI ->mActionEditProjectFile ->setEnabled (mProjectFile != nullptr );
269-
270269 for (int i = 0 ; i < mPlatforms .getCount (); i++) {
271270 PlatformData platform = mPlatforms .mPlatforms [i];
272271 auto *action = new QAction (this );
@@ -1780,7 +1779,6 @@ void MainWindow::stopAnalysis()
17801779{
17811780 mThread ->stop ();
17821781 mUI ->mResults ->stopAnalysis ();
1783- mUI ->mResults ->disableProgressbar ();
17841782 const QString &lastResults = getLastResults ();
17851783 if (!lastResults.isEmpty ()) {
17861784 mUI ->mResults ->updateFromOldReport (lastResults);
@@ -1835,8 +1833,9 @@ void MainWindow::loadProjectFile(const QString &filePath)
18351833
18361834 mIsLogfileLoaded = false ;
18371835 mUI ->mResults ->setResultsSource (ResultsTree::ResultsSource::Analysis);
1838- mUI ->mActionCloseProjectFile ->setEnabled (true );
1839- mUI ->mActionEditProjectFile ->setEnabled (true );
1836+ mUI ->mActionReanalyzeModified ->setEnabled (true );
1837+ mUI ->mActionReanalyzeAll ->setEnabled (true );
1838+ enableProjectActions (true );
18401839 delete mProjectFile ;
18411840 mProjectFile = new ProjectFile (filePath, this );
18421841 mProjectFile ->setActiveProject ();
0 commit comments