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

IJHack / QtPass / 27660144570

17 Jun 2026 01:44AM UTC coverage: 57.523% (+0.05%) from 57.477%
27660144570

Pull #1551

github

web-flow
Merge bae10e9e5 into 4da97561f
Pull Request #1551: refactor(pass): inject AppSettings into Pass hierarchy (PR A of #1511)

42 of 72 new or added lines in 4 files covered. (58.33%)

11 existing lines in 6 files now uncovered.

3980 of 6919 relevant lines covered (57.52%)

23.94 hits per line

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

95.0
/src/passbackendfactory.cpp
1
// SPDX-FileCopyrightText: 2016 Anne Jan Brouwer
2
// SPDX-License-Identifier: GPL-3.0-or-later
3

4
/**
5
 * @class PassBackendFactory
6
 * @brief Pass backend lifecycle implementation.
7
 *
8
 * @see passbackendfactory.h
9
 */
10

11
#include "passbackendfactory.h"
12
#include "appsettings.h"
13
#include "pass.h"
14
#include "qtpasssettings.h"
15

16
Pass *PassBackendFactory::pass = nullptr;
17
QScopedPointer<RealPass> PassBackendFactory::realPass;
18
QScopedPointer<ImitatePass> PassBackendFactory::imitatePass;
19

20
auto PassBackendFactory::getPass() -> Pass * {
41✔
21
  if (!pass) {
41✔
22
    AppSettings s = QtPassSettings::load();
13✔
23
    s.passStore = QtPassSettings::getPassStore();
26✔
24
    if (s.usePass) {
13✔
UNCOV
25
      pass = getRealPass();
×
26
    } else {
27
      pass = getImitatePass();
13✔
28
    }
29
    if (pass) {
13✔
30
      pass->init(s);
13✔
31
    }
32
  }
13✔
33
  return pass;
41✔
34
}
35

36
auto PassBackendFactory::getRealPass() -> RealPass * {
12✔
37
  if (realPass.isNull()) {
12✔
38
    realPass.reset(new RealPass());
1✔
39
  }
40
  return realPass.data();
12✔
41
}
42

43
auto PassBackendFactory::getImitatePass() -> ImitatePass * {
49✔
44
  if (imitatePass.isNull()) {
49✔
45
    imitatePass.reset(new ImitatePass());
2✔
46
  }
47
  return imitatePass.data();
49✔
48
}
49

50
void PassBackendFactory::invalidate() { pass = nullptr; }
19✔
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