File: util.h

package info (click to toggle)
qtpass 1.1.6-1%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,220 kB
  • sloc: cpp: 3,274; xml: 44; makefile: 8
file content (27 lines) | stat: -rw-r--r-- 658 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef UTIL_H_
#define UTIL_H_

#include <QProcessEnvironment>
#include <QString>

/*!
    \class Util
    \brief Some static utilities to be used elsewhere.
 */
class Util {
public:
  static QString findBinaryInPath(QString binary);
  static QString findPasswordStore();
  static QString normalizeFolderPath(QString path);
  static bool checkConfig(QString passStore, QString passExecutable,
                          QString gpgExecutable);
  static void qSleep(int ms);
  static quint32 boundedRandom(quint32 bound);

private:
  static void initialiseEnvironment();
  static QProcessEnvironment _env;
  static bool _envInitialised;
};

#endif // UTIL_H_