Subversion Repositories tpanel

Rev

Rev 271 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 271 Rev 292
Line 32... Line 32...
32
#endif
32
#endif
33
#include "ttpinit.h"
33
#include "ttpinit.h"
34
#include "tconfig.h"
34
#include "tconfig.h"
35
#include "terror.h"
35
#include "terror.h"
36
#include "tresources.h"
36
#include "tresources.h"
-
 
37
#include "tlock.h"
37
#ifdef __APPLE__
38
#ifdef __APPLE__
38
#include <TargetConditionals.h>
39
#include <TargetConditionals.h>
39
#if TARGET_OS_SIMULATOR || TARGET_OS_IOS
40
#if TARGET_OS_SIMULATOR || TARGET_OS_IOS
40
#include <QString>
41
#include <QString>
41
#include "ios/QASettings.h"
42
#include "ios/QASettings.h"
Line 53... Line 54...
53
bool TConfig::mInitialized{false};
54
bool TConfig::mInitialized{false};
54
int TConfig::mChannel{0};
55
int TConfig::mChannel{0};
55
bool TConfig::mMute{false};
56
bool TConfig::mMute{false};
56
bool TConfig::mTemporary{false};
57
bool TConfig::mTemporary{false};
57
bool TConfig::mLogFileEnabled{false};
58
bool TConfig::mLogFileEnabled{false};
-
 
59
std::mutex config_mutex;
58
 
60
 
59
/**
61
/**
60
 * @struct SETTINGS
62
 * @struct SETTINGS
61
 * @brief The SETTINGS struct bundles the configuration options.
63
 * @brief The SETTINGS struct bundles the configuration options.
62
 *
64
 *
Line 1067... Line 1069...
1067
 
1069
 
1068
bool TConfig::saveSettings()
1070
bool TConfig::saveSettings()
1069
{
1071
{
1070
    DECL_TRACER("TConfig::saveSettings()");
1072
    DECL_TRACER("TConfig::saveSettings()");
1071
 
1073
 
-
 
1074
    TLock<std::mutex> guard(config_mutex);
-
 
1075
 
1072
    try
1076
    try
1073
    {
1077
    {
1074
        string fname = localSettings.path + "/" + localSettings.name;
1078
        string fname = localSettings.path + "/" + localSettings.name;
1075
 
1079
 
1076
        if (mTemporary)
1080
        if (mTemporary)
Line 1557... Line 1561...
1557
 *
1561
 *
1558
 * @return On success `true`, otherwise `false`.
1562
 * @return On success `true`, otherwise `false`.
1559
 */
1563
 */
1560
bool TConfig::findConfig()
1564
bool TConfig::findConfig()
1561
{
1565
{
-
 
1566
    TLock<std::mutex> guard(config_mutex);
-
 
1567
 
1562
    char *HOME = nullptr;
1568
    char *HOME = nullptr;
1563
    string sFileName;
1569
    string sFileName;
1564
 
1570
 
1565
    if (!mPath.empty())
1571
    if (!mPath.empty())
1566
    {
1572
    {