comparison base/ResourceFinder.cpp @ 733:b867c07478be

Simplify temporary directory path &c
author Chris Cannam
date Thu, 18 Aug 2011 11:36:23 +0100
parents 1424aa29ae95
children 66c3f4e060e9
comparison
equal deleted inserted replaced
700:5117d7cf59ec 733:b867c07478be
73 .arg(qApp->organizationName()) 73 .arg(qApp->organizationName())
74 .arg(qApp->applicationName()); 74 .arg(qApp->applicationName());
75 } 75 }
76 #else 76 #else
77 #ifdef Q_OS_MAC 77 #ifdef Q_OS_MAC
78 list << QString("/Library/Application Support/%1/%2") 78 list << QString("/Library/Application Support/%1")
79 .arg(qApp->organizationName())
80 .arg(qApp->applicationName()); 79 .arg(qApp->applicationName());
81 #else 80 #else
82 list << QString("/usr/local/share/%1") 81 list << QString("/usr/local/share/%1")
83 .arg(qApp->applicationName()); 82 .arg(qApp->applicationName());
84 list << QString("/usr/share/%1") 83 list << QString("/usr/share/%1")
105 return QString("%1/.%2").arg(qApp->applicationName()); //!!! wrong 104 return QString("%1/.%2").arg(qApp->applicationName()); //!!! wrong
106 #else 105 #else
107 char *home = getenv("HOME"); 106 char *home = getenv("HOME");
108 if (!home || !home[0]) return ""; 107 if (!home || !home[0]) return "";
109 #ifdef Q_OS_MAC 108 #ifdef Q_OS_MAC
110 return QString("%1/Library/Application Support/%2/%3") 109 return QString("%1/Library/Application Support/%2")
111 .arg(home) 110 .arg(home)
112 .arg(qApp->organizationName())
113 .arg(qApp->applicationName()); 111 .arg(qApp->applicationName());
114 #else 112 #else
115 return QString("%1/.local/share/%2") 113 return QString("%1/.local/share/%2")
116 .arg(home) 114 .arg(home)
117 .arg(qApp->applicationName()); 115 .arg(qApp->applicationName());