Merge branch 'support-2.3.1' of bitbucket.org:k1jt/wsjtx into support-2.3.1

This commit is contained in:
Steven Franke 2021-02-14 13:47:09 -06:00
commit 7e6c2ce6a5
3 changed files with 7 additions and 4 deletions

View File

@ -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 ()

View File

@ -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"

View File

@ -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