• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

IJHack / QtPass / 24218705208

09 Apr 2026 11:38PM UTC coverage: 21.06%. Remained the same
24218705208

push

github

web-flow
fix: correct spelling in comments (#954)

- configdialog: location.s -> location.
- configdialog: weapper -> wrapper
- configdialog: useOtp -> useQrencode (doc fix)
- configdialog: on_checkBoxUsPwgen_clicked -> on_checkBoxUsePwgen_clicked
- configdialog: buy -> by
- qpushbuttonwithclipboard: remove unnecessary this->

0 of 1 new or added line in 1 file covered. (0.0%)

1113 of 5285 relevant lines covered (21.06%)

7.78 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

95.24
/src/qpushbuttonwithclipboard.cpp
1
// SPDX-FileCopyrightText: 2016 Anne Jan Brouwer
2
// SPDX-License-Identifier: GPL-3.0-or-later
3
#include "qpushbuttonwithclipboard.h"
4
#include <QTimer>
5
#include <utility>
6

7
/**
8
 * @brief QPushButtonWithClipboard::QPushButtonWithClipboard
9
 *  basic constructor
10
 * @param textToCopy
11
 *  the text to paste into the clipboard
12
 * @param parent
13
 *  the parent window
14
 */
15
QPushButtonWithClipboard::QPushButtonWithClipboard(QString textToCopy,
8✔
16
                                                   QWidget *parent)
8✔
17
    : QPushButton(parent), textToCopy(std::move(textToCopy)),
18
      iconEdit(QIcon::fromTheme("edit-copy", QIcon(":/icons/edit-copy.svg"))),
16✔
19
      iconEditPushed(
8✔
20
          QIcon::fromTheme("document-new", QIcon(":/icons/document-new.svg"))) {
24✔
21
  setIcon(iconEdit);
8✔
22
  setForegroundRole(QPalette::ButtonText);
8✔
23
  connect(this, &QPushButton::clicked, this,
8✔
24
          &QPushButtonWithClipboard::buttonClicked);
8✔
25
}
8✔
26

27
/**
28
 * @brief QPushButtonWithClipboard::getTextToCopy returns the text of
29
 * associated text field
30
 * @return QString textToCopy
31
 */
32
auto QPushButtonWithClipboard::getTextToCopy() const -> QString {
5✔
33
  return textToCopy;
5✔
34
}
35

36
/**
37
 * @brief QPushButtonWithClipboard::setTextToCopy sets text from associated
38
 * text field
39
 * @param value QString text to be copied
40
 */
41
void QPushButtonWithClipboard::setTextToCopy(const QString &value) {
4✔
42
  textToCopy = value;
4✔
43
}
4✔
44

45
/**
46
 * @brief QPushButtonWithClipboard::buttonClicked handles clicked event by
47
 * emitting clicked(QString) with string provided to constructor
48
 */
49
void QPushButtonWithClipboard::buttonClicked(bool /*unused*/) {
3✔
50
  setIcon(iconEditPushed);
3✔
51
  QTimer::singleShot(500, this, &QPushButtonWithClipboard::changeIconDefault);
3✔
52
  emit clicked(textToCopy);
3✔
53
}
3✔
54

55
/**
56
 * @brief QPushButtonWithClipboard::changeIconDefault change the icon back to
57
 * the default copy icon
58
 */
NEW
59
void QPushButtonWithClipboard::changeIconDefault() { setIcon(iconEdit); }
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc