GUI: Double click on contract to edit it
This commit is contained in:
parent
daea5e2d6c
commit
e89f5ab593
|
@ -1607,6 +1607,8 @@ void MainWindow::newProjectFile()
|
|||
} else {
|
||||
closeProjectFile();
|
||||
}
|
||||
|
||||
updateContractsTab();
|
||||
}
|
||||
|
||||
void MainWindow::closeProjectFile()
|
||||
|
|
|
@ -62,6 +62,8 @@ ResultsView::ResultsView(QWidget * parent) :
|
|||
connect(this, &ResultsView::collapseAllResults, mUI.mTree, &ResultsTree::collapseAll);
|
||||
connect(this, &ResultsView::expandAllResults, mUI.mTree, &ResultsTree::expandAll);
|
||||
connect(this, &ResultsView::showHiddenResults, mUI.mTree, &ResultsTree::showHiddenResults);
|
||||
connect(mUI.mListAddedContracts, &QListWidget::itemDoubleClicked, this, &ResultsView::contractDoubleClicked);
|
||||
connect(mUI.mListMissingContracts, &QListWidget::itemDoubleClicked, this, &ResultsView::contractDoubleClicked);
|
||||
|
||||
mUI.mListLog->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
|
||||
|
@ -93,6 +95,11 @@ void ResultsView::setAddedContracts(const QStringList &addedContracts)
|
|||
{
|
||||
mUI.mListAddedContracts->clear();
|
||||
mUI.mListAddedContracts->addItems(addedContracts);
|
||||
for (const QString f: addedContracts) {
|
||||
auto res = mUI.mListMissingContracts->findItems(f, Qt::MatchExactly);
|
||||
if (!res.empty())
|
||||
delete res.front();
|
||||
}
|
||||
}
|
||||
|
||||
void ResultsView::clear(bool results)
|
||||
|
@ -485,6 +492,11 @@ void ResultsView::logCopyComplete()
|
|||
clipboard->setText(logText);
|
||||
}
|
||||
|
||||
void ResultsView::contractDoubleClicked(QListWidgetItem* item)
|
||||
{
|
||||
emit editFunctionContract(item->text());
|
||||
}
|
||||
|
||||
void ResultsView::on_mListLog_customContextMenuRequested(const QPoint &pos)
|
||||
{
|
||||
if (mUI.mListLog->count() <= 0)
|
||||
|
|
|
@ -348,6 +348,9 @@ public slots:
|
|||
*/
|
||||
void logCopyComplete();
|
||||
|
||||
/** \brief Contract was double clicked => edit it */
|
||||
void contractDoubleClicked(QListWidgetItem* item);
|
||||
|
||||
protected:
|
||||
/**
|
||||
* @brief Should we show a "No errors found dialog" every time no errors were found?
|
||||
|
|
Loading…
Reference in New Issue