MCPcopy Create free account
hub / github.com/IJHack/QtPass / init

Method init

src/pass.cpp:115–130  ·  view source on GitHub ↗

* @brief Initializes the pass wrapper environment. */

Source from the content-addressed store, hash-verified

113 * @brief Initializes the pass wrapper environment.
114 */
115void Pass::init() {
116#ifdef __APPLE__
117 // If it exists, add the gpgtools to PATH
118 if (QFile("/usr/local/MacGPG2/bin").exists())
119 env.replaceInStrings("PATH=", "PATH=/usr/local/MacGPG2/bin:");
120 // Add missing /usr/local/bin
121 if (env.filter("/usr/local/bin").isEmpty())
122 env.replaceInStrings("PATH=", "PATH=/usr/local/bin:");
123#endif
124
125 if (!QtPassSettings::getGpgHome().isEmpty()) {
126 QDir absHome(QtPassSettings::getGpgHome());
127 absHome.makeAbsolute();
128 env << "GNUPGHOME=" + absHome.path();
129 }
130}
131
132/**
133 * @brief Pass::Generate use either pwgen or internal password

Callers 2

getPassMethod · 0.45
MainWindowMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected