From: Felix Weilbach Date: Thu, 11 Mar 2021 11:14:17 +0000 (+0100) Subject: Fix crash when trying to open the folder creation dialog X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~21^2~315^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f4853da2ab73ef7deb9b3c47028587a05ae9a117;p=nextcloud-desktop.git Fix crash when trying to open the folder creation dialog The bug does seem to just appear in special compiler constellations. We're unsure why this fix works. To better see if this fix works or if crashes still occur, we added some logging. Signed-off-by: Felix Weilbach --- diff --git a/src/gui/foldercreationdialog.cpp b/src/gui/foldercreationdialog.cpp index c9d8c7b08..6b2944a1f 100644 --- a/src/gui/foldercreationdialog.cpp +++ b/src/gui/foldercreationdialog.cpp @@ -19,9 +19,12 @@ #include #include +#include namespace OCC { +Q_LOGGING_CATEGORY(lcFolderCreationDialog, "nextcloud.gui.foldercreationdialog", QtInfoMsg) + FolderCreationDialog::FolderCreationDialog(const QString &destination, QWidget *parent) : QDialog(parent) , ui(new Ui::FolderCreationDialog) @@ -37,7 +40,7 @@ FolderCreationDialog::FolderCreationDialog(const QString &destination, QWidget * const QString suggestedFolderNamePrefix = QObject::tr("New folder"); - const auto newFolderFullPath = _destination + "/" + suggestedFolderNamePrefix; + const QString newFolderFullPath = _destination + QLatin1Char('/') + suggestedFolderNamePrefix; if (!QDir(newFolderFullPath).exists()) { ui->newFolderNameEdit->setText(suggestedFolderNamePrefix); } else {