|
|
@ -183,6 +183,8 @@ void Settings::loadGlobal() |
|
|
|
QStandardPaths::locate(QStandardPaths::HomeLocation, QString(), |
|
|
|
QStandardPaths::locate(QStandardPaths::HomeLocation, QString(), |
|
|
|
QStandardPaths::LocateDirectory)) |
|
|
|
QStandardPaths::LocateDirectory)) |
|
|
|
.toString(); |
|
|
|
.toString(); |
|
|
|
|
|
|
|
autoAcceptMaxSize = |
|
|
|
|
|
|
|
static_cast<size_t>(s.value("autoAcceptMaxSize", 20 << 20 /*20 MB*/).toLongLong()); |
|
|
|
stylePreference = static_cast<StyleType>(s.value("stylePreference", 1).toInt()); |
|
|
|
stylePreference = static_cast<StyleType>(s.value("stylePreference", 1).toInt()); |
|
|
|
} |
|
|
|
} |
|
|
|
s.endGroup(); |
|
|
|
s.endGroup(); |
|
|
@ -499,6 +501,7 @@ void Settings::saveGlobal() |
|
|
|
s.setValue("busySound", busySound); |
|
|
|
s.setValue("busySound", busySound); |
|
|
|
s.setValue("fauxOfflineMessaging", fauxOfflineMessaging); |
|
|
|
s.setValue("fauxOfflineMessaging", fauxOfflineMessaging); |
|
|
|
s.setValue("autoSaveEnabled", autoSaveEnabled); |
|
|
|
s.setValue("autoSaveEnabled", autoSaveEnabled); |
|
|
|
|
|
|
|
s.setValue("autoAcceptMaxSize", static_cast<qlonglong>(autoAcceptMaxSize)); |
|
|
|
s.setValue("globalAutoAcceptDir", globalAutoAcceptDir); |
|
|
|
s.setValue("globalAutoAcceptDir", globalAutoAcceptDir); |
|
|
|
s.setValue("stylePreference", static_cast<int>(stylePreference)); |
|
|
|
s.setValue("stylePreference", static_cast<int>(stylePreference)); |
|
|
|
} |
|
|
|
} |
|
|
@ -1509,6 +1512,22 @@ void Settings::setGlobalAutoAcceptDir(const QString& newValue) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
size_t Settings::getMaxAutoAcceptSize() const |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
QMutexLocker locker{&bigLock}; |
|
|
|
|
|
|
|
return autoAcceptMaxSize; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Settings::setMaxAutoAcceptSize(size_t size) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
QMutexLocker locker{&bigLock}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (size != autoAcceptMaxSize) { |
|
|
|
|
|
|
|
autoAcceptMaxSize = size; |
|
|
|
|
|
|
|
emit autoAcceptMaxSizeChanged(autoAcceptMaxSize); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const QFont& Settings::getChatMessageFont() const |
|
|
|
const QFont& Settings::getChatMessageFont() const |
|
|
|
{ |
|
|
|
{ |
|
|
|
QMutexLocker locker(&bigLock); |
|
|
|
QMutexLocker locker(&bigLock); |
|
|
|