PathChooser migration for Qt version config page

This commit is contained in:
goro
2008-12-19 15:32:21 +01:00
parent 02c23836dd
commit cb7bb2eefe
5 changed files with 62 additions and 90 deletions

View File

@@ -167,13 +167,15 @@ void PathChooser::slotBrowse()
;
}
// TODO make cross-platform
// Delete trailing slashes unless it is "/", only
// Delete trailing slashes unless it is "/"|"\\", only
if (!newPath.isEmpty()) {
newPath = QDir::toNativeSeparators(newPath);
if (newPath.size() > 1 && newPath.endsWith(QDir::separator()))
newPath.truncate(newPath.size() - 1);
setPath(newPath);
}
emit browsingFinished();
}
bool PathChooser::isValid() const