QFileDialog: Fix deprecation warning

Fix:
dialogs/qfiledialog.cpp:3698:43: warning: ‘QDir& QDir::operator=(const QString&)’ is deprecated: Use QDir::setPath() instead [-Wdeprecated-declarations]
    dir = getEnvironmentVariable(path2);

Change-Id: If8d93374cf2900974bcbd14caf2b1ef488409518
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
This commit is contained in:
Friedemann Kleint 2019-01-29 09:14:25 +01:00
parent 6a7e2fedef
commit 201dde1f31

View File

@ -3695,7 +3695,7 @@ void QFileDialogPrivate::_q_goToDirectory(const QString &path)
}
QDir dir(path2);
if (!dir.exists())
dir = getEnvironmentVariable(path2);
dir.setPath(getEnvironmentVariable(path2));
if (dir.exists() || path2.isEmpty() || path2 == model->myComputer().toString()) {
_q_enterDirectory(index);