diff options
author | Erik Verbruggen <erik@verbruggen.consulting> | 2021-10-30 18:21:16 +0300 |
---|---|---|
committer | Erik Verbruggen <Erik.Verbruggen@Me.com> | 2021-11-17 15:56:22 +0300 |
commit | 7fe14d0e67f83c3a4a6512b9c1c1826b92400fe8 (patch) | |
tree | 18f7ee0e488ec75e55ed400ae6d735ebae875849 /src/gui/platform_win.cpp | |
parent | 4c726d7ea557ab7678dafe54d487e8b9a54600f6 (diff) |
Clean-ups before switching macOS to local sockets
- introduce the Platform class, which can do RAII style set-up/tear-down
- macOS: move Finder integration into the Utility namespace
- move retrieve the socket path into the Utility namespace
Diffstat (limited to 'src/gui/platform_win.cpp')
-rw-r--r-- | src/gui/platform_win.cpp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/gui/platform_win.cpp b/src/gui/platform_win.cpp new file mode 100644 index 000000000..167be35ed --- /dev/null +++ b/src/gui/platform_win.cpp @@ -0,0 +1,42 @@ +/* + * Copyright (C) by Erik Verbruggen <erik@verbruggen.consulting> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + */ + +#include "application.h" +#include "platform.h" + +#include <QCoreApplication> + +namespace OCC { + +class WinPlatform : public Platform +{ +public: + WinPlatform() + { + QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true); + } + + ~WinPlatform() override; +}; + +WinPlatform::~WinPlatform() +{ +} + +std::unique_ptr<Platform> Platform::create() +{ + return std::make_unique<WinPlatform>(); +} + +} // namespace OCC |