# HG changeset patch
# User Chris Cannam
# Date 1565779856 -3600
# Node ID 57833933cc75b1b4bb400e10a7c28dad20c56543
# Parent  40420fa95ffee2f47abef9528a8c6f45c792dfd6
Be stricter - require org name as well as app name before allowing ResourceFinder to be used. This is because the application name may have a default, so we could end up with inconsistent results from using before & after these things have been set

diff -r 40420fa95ffe -r 57833933cc75 base/ResourceFinder.cpp
--- a/base/ResourceFinder.cpp	Tue Aug 13 14:31:38 2019 +0100
+++ b/base/ResourceFinder.cpp	Wed Aug 14 11:50:56 2019 +0100
@@ -130,11 +130,11 @@
 static QString
 getNewStyleUserResourcePrefix()
 {
-    if (qApp->applicationName() == "") {
-        cerr << "ERROR: Can't use ResourceFinder before setting application name" << endl;
-        throw std::logic_error("Can't use ResourceFinder before setting application name");
+    if (qApp->applicationName() == "" || qApp->organizationName() == "") {
+        cerr << "ERROR: Can't use ResourceFinder before setting application and organization name" << endl;
+        throw std::logic_error("Can't use ResourceFinder before setting application and organization name");
     }
-
+    
 #if QT_VERSION >= 0x050000
 
     // This is expected to be much more reliable than