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/button-SV@2x.png</file>
|
||||||
<file>images/error.png</file>
|
<file>images/error.png</file>
|
||||||
<file>images/error@2x.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.png</file>
|
||||||
<file>images/nodata@2x.png</file>
|
<file>images/nodata@2x.png</file>
|
||||||
<file>images/sortAsc.png</file>
|
<file>images/sortAsc.png</file>
|
||||||
|
@@ -60,6 +60,8 @@ using namespace Utils;
|
|||||||
|
|
||||||
namespace Axivion::Internal {
|
namespace Axivion::Internal {
|
||||||
|
|
||||||
|
static const Icon MARKER_ICON({{":/axivion/images/marker.png", Theme::IconsBaseColor}});
|
||||||
|
|
||||||
static QPixmap trendIcon(qint64 added, qint64 removed)
|
static QPixmap trendIcon(qint64 added, qint64 removed)
|
||||||
{
|
{
|
||||||
static const QPixmap unchanged = Utils::Icons::NEXT.pixmap();
|
static const QPixmap unchanged = Utils::Icons::NEXT.pixmap();
|
||||||
@@ -844,13 +846,13 @@ void AxivionPerspective::initPerspective()
|
|||||||
reinitDashboardList({});
|
reinitDashboardList({});
|
||||||
});
|
});
|
||||||
|
|
||||||
auto disableInlineIssuesAct = new QAction(this);
|
auto showIssuesAct = new QAction(this);
|
||||||
disableInlineIssuesAct->setIcon(ProjectExplorer::Icons::BUILDSTEP_DISABLE_TOOLBAR.icon());
|
showIssuesAct->setIcon(MARKER_ICON.icon());
|
||||||
disableInlineIssuesAct->setToolTip(Tr::tr("Disable inline issues"));
|
showIssuesAct->setToolTip(Tr::tr("Show inline issues"));
|
||||||
disableInlineIssuesAct->setCheckable(true);
|
showIssuesAct->setCheckable(true);
|
||||||
disableInlineIssuesAct->setChecked(false);
|
showIssuesAct->setChecked(true);
|
||||||
connect(disableInlineIssuesAct, &QAction::toggled,
|
connect(showIssuesAct, &QAction::toggled,
|
||||||
this, [](bool checked) { disableInlineIssues(checked); });
|
this, [](bool checked) { enableInlineIssues(checked); });
|
||||||
auto toggleIssuesAct = new QAction(this);
|
auto toggleIssuesAct = new QAction(this);
|
||||||
toggleIssuesAct->setIcon(Utils::Icons::WARNING_TOOLBAR.icon());
|
toggleIssuesAct->setIcon(Utils::Icons::WARNING_TOOLBAR.icon());
|
||||||
toggleIssuesAct->setToolTip(Tr::tr("Show issue annotations inline"));
|
toggleIssuesAct->setToolTip(Tr::tr("Show issue annotations inline"));
|
||||||
@@ -871,7 +873,7 @@ void AxivionPerspective::initPerspective()
|
|||||||
|
|
||||||
addToolBarAction(reloadDataAct);
|
addToolBarAction(reloadDataAct);
|
||||||
addToolbarSeparator();
|
addToolbarSeparator();
|
||||||
addToolBarAction(disableInlineIssuesAct);
|
addToolBarAction(showIssuesAct);
|
||||||
addToolBarAction(toggleIssuesAct);
|
addToolBarAction(toggleIssuesAct);
|
||||||
addToolbarSeparator();
|
addToolbarSeparator();
|
||||||
addToolBarAction(m_showFilterHelp); // FIXME move to IssuesWidget when named filters are added
|
addToolBarAction(m_showFilterHelp); // FIXME move to IssuesWidget when named filters are added
|
||||||
|
@@ -214,7 +214,7 @@ public:
|
|||||||
void clearAllMarks();
|
void clearAllMarks();
|
||||||
void updateExistingMarks();
|
void updateExistingMarks();
|
||||||
void handleIssuesForFile(const Dto::FileViewDto &fileView);
|
void handleIssuesForFile(const Dto::FileViewDto &fileView);
|
||||||
void disableInlineIssues(bool disable);
|
void enableInlineIssues(bool enable);
|
||||||
void fetchIssueInfo(const QString &id);
|
void fetchIssueInfo(const QString &id);
|
||||||
|
|
||||||
void onSessionLoaded(const QString &sessionName);
|
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;
|
return;
|
||||||
m_inlineIssuesEnabled = !disable;
|
m_inlineIssuesEnabled = enable;
|
||||||
|
|
||||||
if (disable)
|
if (enable)
|
||||||
clearAllMarks();
|
|
||||||
else
|
|
||||||
handleOpenedDocs();
|
handleOpenedDocs();
|
||||||
|
else
|
||||||
|
clearAllMarks();
|
||||||
}
|
}
|
||||||
|
|
||||||
static constexpr char SV_PROJECTNAME[] = "Axivion.ProjectName";
|
static constexpr char SV_PROJECTNAME[] = "Axivion.ProjectName";
|
||||||
@@ -1124,10 +1124,10 @@ void setAnalysisVersion(const QString &version)
|
|||||||
dd->handleOpenedDocs();
|
dd->handleOpenedDocs();
|
||||||
}
|
}
|
||||||
|
|
||||||
void disableInlineIssues(bool disable)
|
void enableInlineIssues(bool enable)
|
||||||
{
|
{
|
||||||
QTC_ASSERT(dd, return);
|
QTC_ASSERT(dd, return);
|
||||||
dd->disableInlineIssues(disable);
|
dd->enableInlineIssues(enable);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils::FilePath findFileForIssuePath(const Utils::FilePath &issuePath)
|
Utils::FilePath findFileForIssuePath(const Utils::FilePath &issuePath)
|
||||||
|
@@ -92,7 +92,7 @@ void switchActiveDashboardId(const Utils::Id &toDashboardId);
|
|||||||
const Utils::Id activeDashboardId();
|
const Utils::Id activeDashboardId();
|
||||||
const std::optional<DashboardInfo> currentDashboardInfo();
|
const std::optional<DashboardInfo> currentDashboardInfo();
|
||||||
void setAnalysisVersion(const QString &version);
|
void setAnalysisVersion(const QString &version);
|
||||||
void disableInlineIssues(bool disable);
|
void enableInlineIssues(bool enable);
|
||||||
|
|
||||||
Utils::FilePath findFileForIssuePath(const Utils::FilePath &issuePath);
|
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