Comparar commits

...

3 Commits

Autor SHA1 Mensagem Data
Juergen Weigert 1af3373eb4 timestamps of folders are unreliable. 2016-07-18 18:25:37 +02:00
Olivier Goffart 52d8cf39e7 Sharee.cpp: Get rid of lambdas because we still need to support GCC 4.4 2015-12-03 12:54:37 +01:00
Daniel Molkentin c0c9fb365d Bump to 2.1.0 final 2015-12-03 10:19:51 +01:00
3 arquivos alterados com 31 adições e 6 exclusões
+1 -1
Ver Arquivo
@@ -4,7 +4,7 @@ set( MIRALL_VERSION_PATCH 0 )
set( MIRALL_SOVERSION 0 )
if ( NOT DEFINED MIRALL_VERSION_SUFFIX )
set( MIRALL_VERSION_SUFFIX "git") #e.g. beta1, beta2, rc1
set( MIRALL_VERSION_SUFFIX "") #e.g. beta1, beta2, rc1
endif( NOT DEFINED MIRALL_VERSION_SUFFIX )
if( NOT DEFINED MIRALL_VERSION_BUILD )
+15
Ver Arquivo
@@ -15,3 +15,18 @@ continually changes all files, unless you remove
from the windows registry.
See http://petersteier.wordpress.com/2011/10/22/windows-indexer-changes-modification-dates-of-eml-files/ for more information.
**Issue:**
Synced folders appear with wrong timestamp.
**Resolution:**
On POSIX systems the semantics of timestamps is special. The timestamp is updated, whenever a file is created or removed,
but it is not updated, when file contents or contents of subfolders changes.
We do not sync the timestamps of folders for this reason.
Users are advised to not rely on timestamps of folders.
+15 -5
Ver Arquivo
@@ -140,6 +140,18 @@ QSharedPointer<Sharee> ShareeModel::parseSharee(const QVariantMap &data)
return QSharedPointer<Sharee>(new Sharee(shareWith, displayName, type));
}
// Helper function for setNewSharees (could be a lambda when we can use them)
static QSharedPointer<Sharee> shareeFromModelIndex(const QModelIndex &idx)
{ return idx.data(Qt::UserRole).value<QSharedPointer<Sharee>>(); }
struct FindShareeHelper {
const QSharedPointer<Sharee> &sharee;
bool operator()(const QSharedPointer<Sharee> &s2) const {
return s2->format() == sharee->format() && s2->displayName() == sharee->format();
}
};
/* Set the new sharee
Do that while preserving the model index so the selection stays
@@ -152,17 +164,15 @@ void ShareeModel::setNewSharees(const QVector<QSharedPointer<Sharee>>& newSharee
oldPersistantSharee.reserve(persistent.size());
std::transform(persistent.begin(), persistent.end(), std::back_inserter(oldPersistantSharee),
[](const QModelIndex &idx) { return idx.data(Qt::UserRole).value<QSharedPointer<Sharee>>(); });
shareeFromModelIndex);
_sharees = newSharees;
QModelIndexList newPersistant;
newPersistant.reserve(persistent.size());
foreach(const QSharedPointer<Sharee> &sharee, oldPersistantSharee) {
auto it = std::find_if(_sharees.constBegin(), _sharees.constEnd(),
[&sharee](const QSharedPointer<Sharee> &s2) {
return s2->format() == sharee->format() && s2->displayName() == sharee->format();
});
FindShareeHelper helper = { sharee };
auto it = std::find_if(_sharees.constBegin(), _sharees.constEnd(), helper);
if (it == _sharees.constEnd()) {
newPersistant << QModelIndex();
} else {