Fixed #1861 (GUI: Allow hiding error) Disabled menu item when not applicable
This commit is contained in:
parent
22a4dd2cc3
commit
6b9d9188c9
|
@ -464,6 +464,9 @@
|
|||
</property>
|
||||
</action>
|
||||
<action name="mActionShowHidden">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Show &hidden</string>
|
||||
</property>
|
||||
|
|
|
@ -86,6 +86,7 @@ MainWindow::MainWindow() :
|
|||
connect(mUI.mActionAuthors, SIGNAL(triggered()), this, SLOT(ShowAuthors()));
|
||||
connect(mThread, SIGNAL(Done()), this, SLOT(CheckDone()));
|
||||
connect(mUI.mResults, SIGNAL(GotResults()), this, SLOT(ResultsAdded()));
|
||||
connect(mUI.mResults, SIGNAL(ResultsHidden(bool)), mUI.mActionShowHidden, SLOT(setEnabled(bool)));
|
||||
connect(mUI.mMenuView, SIGNAL(aboutToShow()), this, SLOT(AboutToShowViewMenu()));
|
||||
|
||||
connect(mUI.mActionNewProjectFile, SIGNAL(triggered()), this, SLOT(NewProjectFile()));
|
||||
|
|
|
@ -341,6 +341,7 @@ void ResultsTree::ShowHiddenResults()
|
|||
}
|
||||
}
|
||||
RefreshTree();
|
||||
emit ResultsHidden(false);
|
||||
}
|
||||
|
||||
|
||||
|
@ -670,6 +671,7 @@ void ResultsTree::HideResult()
|
|||
mContextItem->setData(QVariant(data));
|
||||
|
||||
RefreshTree();
|
||||
emit ResultsHidden(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -122,6 +122,15 @@ public:
|
|||
*
|
||||
*/
|
||||
void Translate();
|
||||
|
||||
signals:
|
||||
/**
|
||||
* @brief Signal that results have been hidden or shown
|
||||
*
|
||||
* @param hidden true if there are some hidden results, or false if there are not
|
||||
*/
|
||||
void ResultsHidden(bool hidden);
|
||||
|
||||
protected slots:
|
||||
/**
|
||||
* @brief Slot to quickstart an error with default application
|
||||
|
|
|
@ -33,6 +33,8 @@ ResultsView::ResultsView(QWidget * parent) :
|
|||
mShowNoErrorsMessage(true)
|
||||
{
|
||||
mUI.setupUi(this);
|
||||
|
||||
connect(mUI.mTree, SIGNAL(ResultsHidden(bool)), this, SIGNAL(ResultsHidden(bool)));
|
||||
}
|
||||
|
||||
void ResultsView::Initialize(QSettings *settings, ApplicationList *list)
|
||||
|
|
|
@ -146,6 +146,12 @@ signals:
|
|||
*/
|
||||
void GotResults();
|
||||
|
||||
/**
|
||||
* @brief Signal that results have been hidden or shown
|
||||
*
|
||||
* @param hidden true if there are some hidden results, or false if there are not
|
||||
*/
|
||||
void ResultsHidden(bool hidden);
|
||||
|
||||
public slots:
|
||||
|
||||
|
|
Loading…
Reference in New Issue