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

IJHack / QtPass / 27660975269

17 Jun 2026 02:06AM UTC coverage: 57.452% (-0.03%) from 57.477%
27660975269

Pull #1551

github

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

44 of 84 new or added lines in 4 files covered. (52.38%)

13 existing lines in 6 files now uncovered.

3982 of 6931 relevant lines covered (57.45%)

23.91 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