// Add the updated values for the current view-mode
newVisibleRoles.reserve(roles.count());
- foreach (const QByteArray& role, roles) {
+ for (const QByteArray& role : roles) {
newVisibleRoles.append(prefix + role);
}
const int prefixLength = prefix.length();
const QStringList visibleRoles = m_node->visibleRoles();
- foreach (const QString& visibleRole, visibleRoles) {
+ for (const QString& visibleRole : visibleRoles) {
if (visibleRole.startsWith(prefix)) {
const QByteArray role = visibleRole.right(visibleRole.length() - prefixLength).toLatin1();
if (role != "text") {
QString ViewProperties::destinationDir(const QString& subDir) const
{
- QString path = QStandardPaths::writableLocation(QStandardPaths::DataLocation);
+ QString path = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
path.append("/view_properties/").append(subDir);
return path;
}
// the internal role. One special-case must be handled: "LinkDestination"
// has been used for "destination".
visibleRoles.reserve(additionalInfo.count());
- foreach (const QString& info, additionalInfo) {
+ for (const QString& info : additionalInfo) {
QString visibleRole = info;
int index = visibleRole.indexOf('_');
if (index >= 0 && index + 1 < visibleRole.length()) {