Solve cppcheck warnings
This commit is contained in:
@@ -289,9 +289,8 @@ void ButtonHandler::positionButtonsInside(int index) {
|
||||
QPoint center = QPoint(mainArea.center().x(),
|
||||
mainArea.bottom() - m_buttonExtendedSize);
|
||||
|
||||
int addCounter;
|
||||
while (m_vectorButtons.size() > index) {
|
||||
addCounter = buttonsPerRow;
|
||||
int addCounter = buttonsPerRow;
|
||||
addCounter = qBound(0, addCounter, m_vectorButtons.size() - index);
|
||||
QVector<QPoint> positions = horizontalPoints(center, addCounter, true);
|
||||
moveButtonsToPoints(positions, index);
|
||||
|
||||
@@ -30,7 +30,7 @@ class ButtonHandler : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
ButtonHandler(const QVector<CaptureButton*>&, QObject *parent = nullptr);
|
||||
ButtonHandler(QObject *parent = nullptr);
|
||||
explicit ButtonHandler(QObject *parent = nullptr);
|
||||
|
||||
void hideSectionUnderMouse(const QPoint &p);
|
||||
|
||||
|
||||
@@ -134,10 +134,6 @@ void CaptureButton::animatedShow() {
|
||||
}
|
||||
}
|
||||
|
||||
CaptureButton::ButtonType CaptureButton::buttonType() const {
|
||||
return m_buttonType;
|
||||
}
|
||||
|
||||
CaptureTool *CaptureButton::tool() const {
|
||||
return m_tool;
|
||||
}
|
||||
|
||||
@@ -65,7 +65,6 @@ public:
|
||||
QString description() const;
|
||||
QIcon icon() const;
|
||||
QString styleSheet() const;
|
||||
ButtonType buttonType() const;
|
||||
CaptureTool* tool() const;
|
||||
|
||||
void setColor(const QColor &c);
|
||||
|
||||
@@ -563,10 +563,6 @@ void CaptureWidget::initSelection() {
|
||||
m_selection->setGeometry(QRect());
|
||||
}
|
||||
|
||||
void CaptureWidget::initWidget() {
|
||||
|
||||
}
|
||||
|
||||
void CaptureWidget::setState(CaptureButton *b) {
|
||||
if (!b) {
|
||||
return;
|
||||
@@ -826,10 +822,6 @@ void CaptureWidget::childLeave() {
|
||||
update();
|
||||
}
|
||||
|
||||
int CaptureWidget::handleSize() {
|
||||
return (QApplication::fontMetrics().height() * 0.7);
|
||||
}
|
||||
|
||||
void CaptureWidget::copyScreenshot() {
|
||||
m_captureDone = true;
|
||||
ScreenshotSaver().saveToClipboard(pixmap());
|
||||
|
||||
@@ -123,16 +123,12 @@ private:
|
||||
void initContext(const QString &savePath, bool fullscreen);
|
||||
void initPanel();
|
||||
void initSelection();
|
||||
void initWidget();
|
||||
void initShortcuts();
|
||||
void updateSizeIndicator();
|
||||
void updateCursor();
|
||||
void pushToolToStack();
|
||||
void makeChild(QWidget *w);
|
||||
|
||||
// size of the handlers at the corners of the selection
|
||||
int handleSize();
|
||||
|
||||
QRect extendedSelection() const;
|
||||
|
||||
QUndoStack m_undoStack;
|
||||
|
||||
@@ -62,5 +62,6 @@ void NotifierBox::showMessage(const QString &msg) {
|
||||
}
|
||||
|
||||
void NotifierBox::showColor(const QColor &color) {
|
||||
Q_UNUSED(color);
|
||||
m_message = "";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user