mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 04:11:16 -05:00
Merge branch 'support-2.3.1' of bitbucket.org:k1jt/wsjtx into support-2.3.1
This commit is contained in:
commit
7e6c2ce6a5
@ -192,7 +192,7 @@ WSJTXLogging::WSJTXLogging ()
|
|||||||
(
|
(
|
||||||
sinks::file::make_collector
|
sinks::file::make_collector
|
||||||
(
|
(
|
||||||
keywords::max_size = 40 * 1024 * 1024
|
keywords::max_size = 5 * 1024 * 1024
|
||||||
, keywords::min_free_space = 1024 * 1024 * 1024
|
, keywords::min_free_space = 1024 * 1024 * 1024
|
||||||
, keywords::max_files = 12
|
, keywords::max_files = 12
|
||||||
, keywords::target = app_data.absoluteFilePath ("logs").toStdWString ()
|
, keywords::target = app_data.absoluteFilePath ("logs").toStdWString ()
|
||||||
|
@ -7,7 +7,7 @@ TargetFileName="${AppLocalDataLocation}/logs/wsjtx_syslog_%Y-%m.log"
|
|||||||
RotationTimePoint="01 00:00:00"
|
RotationTimePoint="01 00:00:00"
|
||||||
Append=true
|
Append=true
|
||||||
EnableFinalRotation=false
|
EnableFinalRotation=false
|
||||||
MaxSize=41943040
|
MaxSize=52428800
|
||||||
MinFreeSpace=1073741824
|
MinFreeSpace=1073741824
|
||||||
MaxFiles=12
|
MaxFiles=12
|
||||||
Target="${AppLocalDataLocation}/logs"
|
Target="${AppLocalDataLocation}/logs"
|
||||||
|
7
main.cpp
7
main.cpp
@ -225,8 +225,7 @@ int main(int argc, char *argv[])
|
|||||||
// disallow multiple instances with same instance key
|
// disallow multiple instances with same instance key
|
||||||
QLockFile instance_lock {temp_dir.absoluteFilePath (a.applicationName () + ".lock")};
|
QLockFile instance_lock {temp_dir.absoluteFilePath (a.applicationName () + ".lock")};
|
||||||
instance_lock.setStaleLockTime (0);
|
instance_lock.setStaleLockTime (0);
|
||||||
bool lock_ok {false};
|
while (!instance_lock.tryLock ())
|
||||||
while (!(lock_ok = instance_lock.tryLock ()))
|
|
||||||
{
|
{
|
||||||
if (QLockFile::LockFailedError == instance_lock.error ())
|
if (QLockFile::LockFailedError == instance_lock.error ())
|
||||||
{
|
{
|
||||||
@ -249,6 +248,10 @@ int main(int argc, char *argv[])
|
|||||||
throw std::runtime_error {"Multiple instances must have unique rig names"};
|
throw std::runtime_error {"Multiple instances must have unique rig names"};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw std::runtime_error {"Failed to access lock file"};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// load UI translations
|
// load UI translations
|
||||||
|
Loading…
Reference in New Issue
Block a user