From a3cd03ac0396a6e6c86efabdbeb40432eb96f1d9 Mon Sep 17 00:00:00 2001 From: wmayer Date: Sun, 25 Oct 2015 14:16:38 +0100 Subject: [PATCH] + fix comment, convert native separators to UNIX separators --- src/App/PropertyStandard.h | 6 +++--- src/Gui/FileDialog.cpp | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/App/PropertyStandard.h b/src/App/PropertyStandard.h index 89a487aef..18b9a2043 100644 --- a/src/App/PropertyStandard.h +++ b/src/App/PropertyStandard.h @@ -467,10 +467,10 @@ protected: }; /** Constraint float properties - * This property fullfill the need of constraint float. It holds basicly a + * This property fullfill the need of constraint float. It holds basicly a * state (float) and a struct of boundaries. If the boundaries - * is not set it act basicly like a FloatProperty and do no checking. - * The constraints struct can be created on the heap or build in. + * is not set it acts basicly like a PropertyFloat and does no checking + * The constraints struct can be created on the heap or built-in. */ class AppExport PropertyFloatConstraint: public PropertyFloat { diff --git a/src/Gui/FileDialog.cpp b/src/Gui/FileDialog.cpp index b0ad73a14..349b7ddf7 100644 --- a/src/Gui/FileDialog.cpp +++ b/src/Gui/FileDialog.cpp @@ -28,6 +28,7 @@ # include # include # include +# include # include # include # include @@ -565,8 +566,7 @@ QString FileChooser::fileName() const void FileChooser::editingFinished() { - QString le_converted = lineEdit->text(); - le_converted.replace(QString::fromStdString("\\"), QString::fromStdString("/")); + QString le_converted = QDir::fromNativeSeparators(lineEdit->text()); lineEdit->setText(le_converted); FileDialog::setWorkingDirectory(le_converted); fileNameSelected(le_converted); @@ -598,6 +598,7 @@ void FileChooser::chooseFile() fn = QFileDialog::getExistingDirectory( this, tr( "Select a directory" ), prechosenDirectory ); if (!fn.isEmpty()) { + fn = QDir::fromNativeSeparators(fn); lineEdit->setText(fn); FileDialog::setWorkingDirectory(fn); fileNameSelected(fn);