From: Olivier Goffart Date: Tue, 1 Dec 2015 09:30:11 +0000 (+0100) Subject: Disable some code that needs lambda with old GCC X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~1387^2~43 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=76d129605397135c08d0d8f5cd5f7feb5dbc56c0;p=nextcloud-desktop.git Disable some code that needs lambda with old GCC It's just a feature that was not there in 2.0 It means that removed folder stay on the undecided list if it is removed from the server until the user press apply in the selective sync widget. Not a very bad bug anyway. --- diff --git a/src/gui/folderstatusmodel.cpp b/src/gui/folderstatusmodel.cpp index d169765a7..14d0bf190 100644 --- a/src/gui/folderstatusmodel.cpp +++ b/src/gui/folderstatusmodel.cpp @@ -625,6 +625,10 @@ void FolderStatusModel::slotUpdateDirectories(const QStringList &list) suggestExpand(idx.child(*it, 0)); } + /* We need lambda function for the following code. + * It's just a small feature that will be missing if the comiler is too old */ +#if !(defined(Q_CC_GNU) && !defined(Q_CC_INTEL) && !defined(Q_CC_CLANG)) || (__GNUC__ * 100 + __GNUC_MINOR__ >= 405) + /* Try to remove the the undecided lists the items that are not on the server. */ auto it = std::remove_if(selectiveSyncUndecidedList.begin(), selectiveSyncUndecidedList.end(), [&](const QString &s) { return selectiveSyncUndecidedSet.count(s); } ); @@ -634,6 +638,7 @@ void FolderStatusModel::slotUpdateDirectories(const QStringList &list) SyncJournalDb::SelectiveSyncUndecidedList, selectiveSyncUndecidedList); emit dirtyChanged(); } +#endif } void FolderStatusModel::slotLscolFinishedWithError(QNetworkReply* r)