QtPass 2.0.0
Developer documentation
Loading...
Searching...
No Matches
main.cpp File Reference

Program entry point: command-line parsing, the single-instance hand- over, translations and the main window. More...

#include "mainwindow.h"
#include "qtpasssettings.h"
#include "sshauthsock.h"
#include "util.h"
#include <QApplication>
#include <QDir>
#include <QTranslator>
#include <QtWidgets>
Include dependency graph for main.cpp:

Go to the source code of this file.

Functions

static auto joinRemainingArgs (const QStringList &args, int start) -> QString
 Joins all arguments from index start onward into a space-separated string.
static auto appendWithSpaceIfSuffixNotEmpty (QString &target, const QString &suffix) -> void
 Appends a suffix to a target string, inserting a separating space if the target is not empty.
auto main (int argc, char *argv[]) -> int
 Application entry point: parses arguments and launches the main window.

Detailed Description

Program entry point: command-line parsing, the single-instance hand- over, translations and the main window.

Definition in file main.cpp.

Function Documentation

◆ appendWithSpaceIfSuffixNotEmpty()

auto appendWithSpaceIfSuffixNotEmpty ( QString & target,
const QString & suffix ) -> void
static

Appends a suffix to a target string, inserting a separating space if the target is not empty.

If suffix is empty, target is left unchanged.

Parameters
targetString to append to; modified in place.
suffixSuffix to append.

Definition at line 43 of file main.cpp.

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

◆ joinRemainingArgs()

auto joinRemainingArgs ( const QStringList & args,
int start ) -> QString
static

Joins all arguments from index start onward into a space-separated string.

Parameters
argsFull argument list.
startIndex of the first argument to include.
Returns
Space-joined string of the remaining arguments.

Definition at line 29 of file main.cpp.

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

◆ main()

auto main ( int argc,
char * argv[] ) -> int

Application entry point: parses arguments and launches the main window.

Parameters
argcArgument count.
argvArgument vector.
Returns
Application exit code.

Definition at line 59 of file main.cpp.

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