bool ok = false;
- auto oldBlackListSet = journal->getSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList, &ok).toSet();
+ const auto selectiveSyncList = journal->getSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList, &ok);
+ const QSet<QString> oldBlackListSet(selectiveSyncList.begin(), selectiveSyncList.end());
if (ok) {
- auto blackListSet = newList.toSet();
+ const QSet<QString> blackListSet(newList.begin(), newList.end());
const auto changes = (oldBlackListSet - blackListSet) + (blackListSet - oldBlackListSet);
for (const auto &it : changes) {
journal->schedulePathForRemoteDiscovery(it);
// The folders that were undecided or blacklisted and that are now checked should go on the white list.
// The user confirmed them already just now.
- QStringList toAddToWhiteList = ((oldBlackListSet + folder->journalDb()->getSelectiveSyncList(SyncJournalDb::SelectiveSyncUndecidedList, &ok).toSet()) - blackListSet).toList();
+ QStringList toAddToWhiteList = ((oldBlackListSet + folder->journalDb()->getSelectiveSyncList(SyncJournalDb::SelectiveSyncUndecidedList, &ok).toSet()) - blackListSet).values();
if (!toAddToWhiteList.isEmpty()) {
auto whiteList = folder->journalDb()->getSelectiveSyncList(SyncJournalDb::SelectiveSyncWhiteList, &ok);
return;
#endif
- const QString explorer = "explorer.exe "; // FIXME: we trust it's in PATH
- QFileInfo fi(localPath);
-
- // canonicalFilePath returns empty if the file does not exist
- if (!fi.canonicalFilePath().isEmpty()) {
- QString nativeArgs;
- if (!fi.isDir()) {
- nativeArgs += QLatin1String("/select,");
- }
- nativeArgs += QLatin1Char('"');
- nativeArgs += QDir::toNativeSeparators(fi.canonicalFilePath());
- nativeArgs += QLatin1Char('"');
-
- QProcess p;
+ const QString explorer = "explorer.exe "; // FIXME: we trust it's in PATH
+ QFileInfo fi(localPath);
+
+ // canonicalFilePath returns empty if the file does not exist
+ if (!fi.canonicalFilePath().isEmpty()) {
+ QString nativeArgs;
+ if (!fi.isDir()) {
+ nativeArgs += QLatin1String("/select,");
+ }
+ nativeArgs += QLatin1Char('"');
+ nativeArgs += QDir::toNativeSeparators(fi.canonicalFilePath());
+ nativeArgs += QLatin1Char('"');
+
+ QProcess p;
#ifdef Q_OS_WIN
// QProcess on Windows tries to wrap the whole argument/program string
// with quotes if it detects a space in it, but explorer wants the quotes
#include <QJsonObject>
#include <QJsonArray>
+#include <qsslconfiguration.h>
#include <qt5keychain/keychain.h>
#include "creds/abstractcredentials.h"
void Account::setApprovedCerts(const QList<QSslCertificate> certs)
{
_approvedCerts = certs;
- QSslSocket::addDefaultCaCertificates(certs);
+ QSslConfiguration::defaultConfiguration().addCaCertificates(certs);
}
void Account::addApprovedCerts(const QList<QSslCertificate> certs)
return;
if (!approvedCerts.isEmpty()) {
- QSslSocket::addDefaultCaCertificates(approvedCerts);
+ QSslConfiguration::defaultConfiguration().addCaCertificates(approvedCerts);
addApprovedCerts(approvedCerts);
emit wantsAccountSaved(this);
void SyncFileStatusTracker::invalidateParentPaths(const QString &path)
{
- QStringList splitPath = path.split('/', QString::SkipEmptyParts);
+ QStringList splitPath = path.split('/', Qt::SkipEmptyParts);
for (int i = 0; i < splitPath.size(); ++i) {
QString parentPath = QStringList(splitPath.mid(0, i)).join(QLatin1String("/"));
emit fileStatusChanged(getSystemDestination(parentPath), fileStatus(parentPath));
}
PathComponents::PathComponents(const QString &path)
- : QStringList { path.split(QLatin1Char('/'), QString::SkipEmptyParts) }
+ : QStringList { path.split(QLatin1Char('/'), Qt::SkipEmptyParts) }
{
}
// Follow more or less the implementation of QNetworkReplyImpl::abort
close();
setError(OperationCanceledError, tr("Operation canceled"));
- emit error(OperationCanceledError);
+ emit errorOccurred(OperationCanceledError);
setFinished(true);
emit finished();
}