| 13 | #include <QWidget> |
| 14 | |
| 15 | AdBlockButton::AdBlockButton(QWidget *parent) : |
| 16 | QToolButton(parent), |
| 17 | m_adBlockManager(nullptr), |
| 18 | m_icon(QLatin1String(":/AdBlock.svg")), |
| 19 | m_timer(), |
| 20 | m_lastCount(0) |
| 21 | { |
| 22 | setIcon(m_icon); |
| 23 | setStyleSheet(QLatin1String("QToolButton { margin-right: 6px; }")); |
| 24 | setToolTip(tr("No ads blocked on this page")); |
| 25 | |
| 26 | connect(&m_timer, &QTimer::timeout, this, &AdBlockButton::updateCount); |
| 27 | m_timer.start(500); |
| 28 | } |
| 29 | |
| 30 | void AdBlockButton::setAdBlockManager(AdBlockManager *adBlockManager) |
| 31 | { |
nothing calls this directly
no outgoing calls
no test coverage detected