This commit is contained in:
Florian Bruhin 2017-11-14 09:05:28 +01:00
parent 111cc7093f
commit 62f35ee064
2 changed files with 4 additions and 2 deletions

View File

@ -28,10 +28,10 @@ import subprocess
import importlib import importlib
import collections import collections
import enum import enum
import pkg_resources
import datetime import datetime
import attr import attr
import pkg_resources
from PyQt5.QtCore import PYQT_VERSION_STR, QLibraryInfo from PyQt5.QtCore import PYQT_VERSION_STR, QLibraryInfo
from PyQt5.QtNetwork import QSslSocket from PyQt5.QtNetwork import QSslSocket
from PyQt5.QtGui import (QOpenGLContext, QOpenGLVersionProfile, from PyQt5.QtGui import (QOpenGLContext, QOpenGLVersionProfile,
@ -325,6 +325,7 @@ def _backend():
assert objects.backend == webengine, objects.backend assert objects.backend == webengine, objects.backend
return 'QtWebEngine (Chromium {})'.format(_chromium_version()) return 'QtWebEngine (Chromium {})'.format(_chromium_version())
def _uptime() -> datetime.timedelta: def _uptime() -> datetime.timedelta:
launch_time = QApplication.instance().launch_time launch_time = QApplication.instance().launch_time
time_delta = datetime.datetime.now() - launch_time time_delta = datetime.datetime.now() - launch_time
@ -332,6 +333,7 @@ def _uptime() -> datetime.timedelta:
time_delta -= datetime.timedelta(microseconds=time_delta.microseconds) time_delta -= datetime.timedelta(microseconds=time_delta.microseconds)
return time_delta return time_delta
def version(): def version():
"""Return a string with various version informations.""" """Return a string with various version informations."""
lines = ["qutebrowser v{}".format(qutebrowser.__version__)] lines = ["qutebrowser v{}".format(qutebrowser.__version__)]

View File

@ -30,10 +30,10 @@ import types
import importlib import importlib
import logging import logging
import textwrap import textwrap
import pkg_resources
import datetime import datetime
import attr import attr
import pkg_resources
import pytest import pytest
import qutebrowser import qutebrowser