forked from qt-creator/qt-creator
Axivion: Use inverse logic
Change-Id: Id7e5f3498b1f7ac95bd896532ea9a88f1fc123d1 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
<file>images/button-SV@2x.png</file>
|
||||
<file>images/error.png</file>
|
||||
<file>images/error@2x.png</file>
|
||||
<file>images/marker.png</file>
|
||||
<file>images/marker@2x.png</file>
|
||||
<file>images/nodata.png</file>
|
||||
<file>images/nodata@2x.png</file>
|
||||
<file>images/sortAsc.png</file>
|
||||
|
@@ -60,6 +60,8 @@ using namespace Utils;
|
||||
|
||||
namespace Axivion::Internal {
|
||||
|
||||
static const Icon MARKER_ICON({{":/axivion/images/marker.png", Theme::IconsBaseColor}});
|
||||
|
||||
static QPixmap trendIcon(qint64 added, qint64 removed)
|
||||
{
|
||||
static const QPixmap unchanged = Utils::Icons::NEXT.pixmap();
|
||||
@@ -844,13 +846,13 @@ void AxivionPerspective::initPerspective()
|
||||
reinitDashboardList({});
|
||||
});
|
||||
|
||||
auto disableInlineIssuesAct = new QAction(this);
|
||||
disableInlineIssuesAct->setIcon(ProjectExplorer::Icons::BUILDSTEP_DISABLE_TOOLBAR.icon());
|
||||
disableInlineIssuesAct->setToolTip(Tr::tr("Disable inline issues"));
|
||||
disableInlineIssuesAct->setCheckable(true);
|
||||
disableInlineIssuesAct->setChecked(false);
|
||||
connect(disableInlineIssuesAct, &QAction::toggled,
|
||||
this, [](bool checked) { disableInlineIssues(checked); });
|
||||
auto showIssuesAct = new QAction(this);
|
||||
showIssuesAct->setIcon(MARKER_ICON.icon());
|
||||
showIssuesAct->setToolTip(Tr::tr("Show inline issues"));
|
||||
showIssuesAct->setCheckable(true);
|
||||
showIssuesAct->setChecked(true);
|
||||
connect(showIssuesAct, &QAction::toggled,
|
||||
this, [](bool checked) { enableInlineIssues(checked); });
|
||||
auto toggleIssuesAct = new QAction(this);
|
||||
toggleIssuesAct->setIcon(Utils::Icons::WARNING_TOOLBAR.icon());
|
||||
toggleIssuesAct->setToolTip(Tr::tr("Show issue annotations inline"));
|
||||
@@ -871,7 +873,7 @@ void AxivionPerspective::initPerspective()
|
||||
|
||||
addToolBarAction(reloadDataAct);
|
||||
addToolbarSeparator();
|
||||
addToolBarAction(disableInlineIssuesAct);
|
||||
addToolBarAction(showIssuesAct);
|
||||
addToolBarAction(toggleIssuesAct);
|
||||
addToolbarSeparator();
|
||||
addToolBarAction(m_showFilterHelp); // FIXME move to IssuesWidget when named filters are added
|
||||
|
@@ -214,7 +214,7 @@ public:
|
||||
void clearAllMarks();
|
||||
void updateExistingMarks();
|
||||
void handleIssuesForFile(const Dto::FileViewDto &fileView);
|
||||
void disableInlineIssues(bool disable);
|
||||
void enableInlineIssues(bool enable);
|
||||
void fetchIssueInfo(const QString &id);
|
||||
|
||||
void onSessionLoaded(const QString &sessionName);
|
||||
@@ -1015,16 +1015,16 @@ void AxivionPluginPrivate::handleIssuesForFile(const Dto::FileViewDto &fileView)
|
||||
}
|
||||
}
|
||||
|
||||
void AxivionPluginPrivate::disableInlineIssues(bool disable)
|
||||
void AxivionPluginPrivate::enableInlineIssues(bool enable)
|
||||
{
|
||||
if (m_inlineIssuesEnabled != disable)
|
||||
if (m_inlineIssuesEnabled == enable)
|
||||
return;
|
||||
m_inlineIssuesEnabled = !disable;
|
||||
m_inlineIssuesEnabled = enable;
|
||||
|
||||
if (disable)
|
||||
clearAllMarks();
|
||||
else
|
||||
if (enable)
|
||||
handleOpenedDocs();
|
||||
else
|
||||
clearAllMarks();
|
||||
}
|
||||
|
||||
static constexpr char SV_PROJECTNAME[] = "Axivion.ProjectName";
|
||||
@@ -1124,10 +1124,10 @@ void setAnalysisVersion(const QString &version)
|
||||
dd->handleOpenedDocs();
|
||||
}
|
||||
|
||||
void disableInlineIssues(bool disable)
|
||||
void enableInlineIssues(bool enable)
|
||||
{
|
||||
QTC_ASSERT(dd, return);
|
||||
dd->disableInlineIssues(disable);
|
||||
dd->enableInlineIssues(enable);
|
||||
}
|
||||
|
||||
Utils::FilePath findFileForIssuePath(const Utils::FilePath &issuePath)
|
||||
|
@@ -92,7 +92,7 @@ void switchActiveDashboardId(const Utils::Id &toDashboardId);
|
||||
const Utils::Id activeDashboardId();
|
||||
const std::optional<DashboardInfo> currentDashboardInfo();
|
||||
void setAnalysisVersion(const QString &version);
|
||||
void disableInlineIssues(bool disable);
|
||||
void enableInlineIssues(bool enable);
|
||||
|
||||
Utils::FilePath findFileForIssuePath(const Utils::FilePath &issuePath);
|
||||
|
||||
|
BIN
src/plugins/axivion/images/marker.png
Normal file
BIN
src/plugins/axivion/images/marker.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 445 B |
BIN
src/plugins/axivion/images/marker@2x.png
Normal file
BIN
src/plugins/axivion/images/marker@2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 793 B |
Reference in New Issue
Block a user