QtPass 2.0.0
Developer documentation
Loading...
Searching...
No Matches
Enums Namespace Reference

Enumerators for QtPass configuration and runtime operations. More...

Classes

struct  ProcessInfo
 What QtPass knows about one kind of subprocess: what to call it and whether its output may carry a secret. More...

Enumerations

enum  ClipBoardType { CLIPBOARD_NEVER = 0 , CLIPBOARD_ALWAYS = 1 , CLIPBOARD_ON_DEMAND = 2 }
 Defines when to copy passwords to clipboard. More...
enum  PROCESS {
  GIT_INIT = 0 , GIT_ADD , GIT_COMMIT , GIT_RM ,
  GIT_PULL , GIT_PUSH , PASS_SHOW , PASS_INSERT ,
  PASS_REMOVE , PASS_INIT , GPG_GENKEYS , PASS_MOVE ,
  PASS_COPY , GIT_MOVE , GIT_COPY , PASS_GREP ,
  PROCESS_COUNT , INVALID
}
 Identifies different subprocess operations used in QtPass. More...

Functions

auto processInfo (PROCESS pid) -> const ProcessInfo &
 What is known about pid.
auto processLabel (PROCESS pid) -> QString
 The command label for pid, as the output panel shows it.

Detailed Description

Enumerators for QtPass configuration and runtime operations.

Enumeration Type Documentation

◆ ClipBoardType

Defines when to copy passwords to clipboard.

Enumerator
CLIPBOARD_NEVER 0 

Never automatically copy to clipboard

CLIPBOARD_ALWAYS 1 

Always copy to clipboard after showing

CLIPBOARD_ON_DEMAND 2 

Copy only when user explicitly requests

Definition at line 24 of file enums.h.

◆ PROCESS

Identifies different subprocess operations used in QtPass.

Adding a value: give it a row in the table in processinfo.cpp, which says what the command is called and whether its stdout may contain a secret (a decrypted entry, a search hit in one). Secret-bearing output reaches neither the process output panel nor the generic finished signal. The build fails until the row is there, and tst_realpass::genericOutputSignalIsAnAllowList() and tst_processoutputpanel::everyShownProcessHasItsCommandLabel() pin the decision.

Enumerator
GIT_INIT 0 

Initialize Git repository

GIT_ADD  

Git add command

GIT_COMMIT  

Git commit

GIT_RM  

Git remove

GIT_PULL  

Git pull

GIT_PUSH  

Git push

PASS_SHOW  

Pass show - decrypt password file

PASS_INSERT  

Pass insert - create/update password

PASS_REMOVE  

Pass remove - delete password

PASS_INIT  

Pass init - initialize store

GPG_GENKEYS  

GPG key generation

PASS_MOVE  

Move password file

PASS_COPY  

Copy password file

GIT_MOVE  

Git move/rename

GIT_COPY  

Git copy

PASS_GREP  

Not started any more (content search runs in-process, NativeGrep); kept for the process-name table and the checks that keep its output out of the panel

PROCESS_COUNT  

Total number of process types

INVALID  

Invalid/unknown process

Definition at line 43 of file enums.h.

Function Documentation

◆ processInfo()

auto Enums::processInfo ( PROCESS pid) -> const ProcessInfo &

What is known about pid.

Parameters
pidProcess identifier; PROCESS_COUNT and INVALID answer too.
Returns
The entry for pid: an empty label and no secret for a value that is not a real process.

Definition at line 58 of file processinfo.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ processLabel()

auto Enums::processLabel ( PROCESS pid) -> QString

The command label for pid, as the output panel shows it.

Parameters
pidProcess identifier.
Returns
e.g. "git push"; empty for a process that is never shown.

Definition at line 65 of file processinfo.cpp.

Here is the call graph for this function:
Here is the caller graph for this function: