mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Show better information in sessions list.
This commit is contained in:
@@ -19,9 +19,15 @@ std::unique_ptr<Launcher> Launcher::Create(int argc, char *argv[]) {
|
||||
return std::make_unique<Platform::Launcher>(argc, argv);
|
||||
}
|
||||
|
||||
Launcher::Launcher(int argc, char *argv[])
|
||||
Launcher::Launcher(
|
||||
int argc,
|
||||
char *argv[],
|
||||
const QString &deviceModel,
|
||||
const QString &systemVersion)
|
||||
: _argc(argc)
|
||||
, _argv(argv) {
|
||||
, _argv(argv)
|
||||
, _deviceModel(deviceModel)
|
||||
, _systemVersion(systemVersion) {
|
||||
}
|
||||
|
||||
void Launcher::init() {
|
||||
@@ -94,6 +100,10 @@ QString Launcher::argumentsString() const {
|
||||
return _arguments.join(' ');
|
||||
}
|
||||
|
||||
bool Launcher::customWorkingDir() const {
|
||||
return _customWorkingDir;
|
||||
}
|
||||
|
||||
void Launcher::prepareSettings() {
|
||||
#ifdef Q_OS_MAC
|
||||
#ifndef OS_MAC_OLD
|
||||
@@ -152,6 +162,14 @@ void Launcher::prepareSettings() {
|
||||
processArguments();
|
||||
}
|
||||
|
||||
QString Launcher::deviceModel() const {
|
||||
return _deviceModel;
|
||||
}
|
||||
|
||||
QString Launcher::systemVersion() const {
|
||||
return _systemVersion;
|
||||
}
|
||||
|
||||
void Launcher::processArguments() {
|
||||
enum class KeyFormat {
|
||||
NoValues,
|
||||
|
@@ -11,16 +11,22 @@ namespace Core {
|
||||
|
||||
class Launcher {
|
||||
public:
|
||||
Launcher(int argc, char *argv[]);
|
||||
Launcher(
|
||||
int argc,
|
||||
char *argv[],
|
||||
const QString &deviceModel,
|
||||
const QString &systemVersion);
|
||||
|
||||
static std::unique_ptr<Launcher> Create(int argc, char *argv[]);
|
||||
|
||||
int exec();
|
||||
|
||||
QString argumentsString() const;
|
||||
bool customWorkingDir() const {
|
||||
return _customWorkingDir;
|
||||
}
|
||||
bool customWorkingDir() const;
|
||||
|
||||
// Thread safe.
|
||||
QString deviceModel() const;
|
||||
QString systemVersion() const;
|
||||
|
||||
virtual ~Launcher() = default;
|
||||
|
||||
@@ -53,6 +59,9 @@ private:
|
||||
char **_argv;
|
||||
QStringList _arguments;
|
||||
|
||||
const QString _deviceModel;
|
||||
const QString _systemVersion;
|
||||
|
||||
bool _customWorkingDir = false;
|
||||
|
||||
};
|
||||
|
Reference in New Issue
Block a user