1// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: GPL-3.0-or-later
4
5#include "windowstyle.h"
6#include "util/custompaths.h"
7
8#include <QJsonDocument>
9
10namespace support_file {
11
12namespace documents {
13
14inline static QJsonDocument windowStyleGlobal;
15inline static QJsonDocument windowStyleUser;
16bool windowStyleIsLoaded();
17
18} // namespace documents
19
20bool documents::windowStyleIsLoaded()
21{
22 return !windowStyleGlobal.isEmpty() && !windowStyleGlobal.isEmpty();
23}
24
25QString WindowStyle::globalPath()
26{
27 auto result = CustomPaths::endSeparator(CustomPaths::global(CustomPaths::Configures));
28 return result + QString("windowstyle.support");
29}
30
31QString WindowStyle::userPath()
32{
33 auto result = CustomPaths::endSeparator(CustomPaths::user(CustomPaths::Configures));
34 return result + QString("windowstyle.support");
35}
36
37} // namespace support_file
38