Exemplo n.º 1
0
def setup_post_app(args):
    """Setup performed after creating the QApplication."""
    working_directory.init()
    imutils.init()
    completionmodels.init()
    init_ui(args)
    plugins.load()
    init_paths(args)
Exemplo n.º 2
0
def setup_post_app(args: argparse.Namespace) -> None:
    """Setup performed after creating the QApplication."""
    api.working_directory.init()
    imutils.init()
    init_ui(args)
    # Must be done after UI so the search signals are processed after the widgets have
    # been updated
    search.search.connect_signals()
    plugins.load()
    init_paths(args)
    if args.command:
        run_startup_commands(*args.command)
Exemplo n.º 3
0
def setup_post_app(args: argparse.Namespace) -> None:
    """Setup performed after creating the QApplication."""
    api.working_directory.init()
    imutils.init()
    init_ui(args)
    # Must be done after UI so the search signals are processed after the widgets have
    # been updated
    search.search.connect_signals()
    plugins.load()
    init_paths(args)
    if args.command:
        run_startup_commands(*args.command)
    if args.output:

        def print_output() -> None:
            print(wildcards.expand_internal(args.output, api.modes.current()))

        # We are sure we have an application here
        qapp = cast(QApplication, QCoreApplication.instance())
        qapp.aboutToQuit.connect(print_output)