LCOV - code coverage report
Current view: top level - muse/framework/global/internal - globalconfiguration.h Coverage Total Hit
Test: filtered_coverage.info Lines: 100.0 % 1 1
Test Date: 2026-11-05 04:07:02

            Line data    Source code
       1              : /*
       2              :  * SPDX-License-Identifier: GPL-3.0-only
       3              :  * MuseScore-CLA-applies
       4              :  *
       5              :  * MuseScore Studio
       6              :  * Music Composition & Notation
       7              :  *
       8              :  * Copyright (C) 2021 MuseScore Limited and others
       9              :  *
      10              :  * This program is free software: you can redistribute it and/or modify
      11              :  * it under the terms of the GNU General Public License version 3 as
      12              :  * published by the Free Software Foundation.
      13              :  *
      14              :  * This program is distributed in the hope that it will be useful,
      15              :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      16              :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      17              :  * GNU General Public License for more details.
      18              :  *
      19              :  * You should have received a copy of the GNU General Public License
      20              :  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
      21              :  */
      22              : #ifndef MUSE_GLOBAL_GLOBALCONFIGURATION_H
      23              : #define MUSE_GLOBAL_GLOBALCONFIGURATION_H
      24              : 
      25              : #include "../iglobalconfiguration.h"
      26              : 
      27              : #include "modularity/ioc.h"
      28              : #include "../iapplication.h"
      29              : 
      30              : namespace muse {
      31              : class GlobalConfiguration : public IGlobalConfiguration
      32              : {
      33              :     GlobalInject<IApplication> application;
      34              : 
      35              : public:
      36           46 :     GlobalConfiguration() {}
      37              : 
      38              :     void init();
      39              : 
      40              :     io::path_t appBinPath() const override;
      41              :     io::path_t appBinDirPath() const override;
      42              :     io::path_t appDataPath() const override;
      43              :     io::path_t appConfigPath() const override;
      44              : 
      45              :     bool isBundledWithApp(const io::path_t& path) const override;
      46              :     io::path_t toBundledPath(const io::path_t& path) const override;
      47              :     bool isBundledPath(const io::path_t& path) const override;
      48              :     io::path_t fromBundledPath(const io::path_t& path) const override;
      49              : 
      50              :     io::path_t userAppDataPath() const override;
      51              :     io::path_t userBackupPath() const override;
      52              :     io::path_t userDataPath() const override;
      53              : 
      54              :     io::path_t homePath() const override;
      55              :     io::path_t downloadsPath() const override;
      56              :     io::path_t documentsPath() const override;
      57              : 
      58              :     bool useFactorySettings() const override;
      59              :     bool enableExperimental() const override;
      60              :     io::path_t genericDataPath() const override;
      61              : 
      62              :     bool devModeEnabled() const override;
      63              :     void setDevModeEnabled(bool enabled) override;
      64              : 
      65              :     bool metricUnit() const override;
      66              :     void setMetricUnit(bool metricUnit) override;
      67              : 
      68              :     std::string museHubWebUrl() const override;
      69              : 
      70              :     bool highResolutionTimers() const override;
      71              : 
      72              : private:
      73              :     QString resolveAppDataPath() const;
      74              :     QString resolveUserAppDataPath() const;
      75              : 
      76              :     mutable io::path_t m_appDataPath;
      77              :     mutable io::path_t m_userAppDataPath;
      78              : };
      79              : }
      80              : 
      81              : #endif // MUSE_GLOBAL_GLOBALCONFIGURATION_H
        

Generated by: LCOV version 2.0-1