Skip to content

Commit a594a5d

Browse files
committedNov 29, 2018
Excludes: Use QString for storing the temporary excludes
Everything else uses QString
1 parent 697b6b9 commit a594a5d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed
 

‎src/csync/csync_exclude.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ void ExcludedFiles::setExcludeConflictFiles(bool onoff)
247247
_excludeConflictFiles = onoff;
248248
}
249249

250-
void ExcludedFiles::addManualExclude(const QByteArray &expr)
250+
void ExcludedFiles::addManualExclude(const QString &expr)
251251
{
252252
_manualExcludes.append(expr);
253253
_allExcludes.append(expr);
@@ -290,7 +290,7 @@ bool ExcludedFiles::reloadExcludeFiles()
290290
if (line.isEmpty() || line.startsWith('#'))
291291
continue;
292292
csync_exclude_expand_escapes(line);
293-
_allExcludes.append(line);
293+
_allExcludes.append(QString::fromUtf8(line));
294294
}
295295
}
296296
_allExcludes.append(_manualExcludes);
@@ -631,7 +631,7 @@ void ExcludedFiles::prepare()
631631
auto &fullFileDir = removeExcluded ? fullFileDirRemove : fullFileDirKeep;
632632
auto &fullDir = removeExcluded ? fullDirRemove : fullDirKeep;
633633

634-
auto regexExclude = convertToRegexpSyntax(QString::fromUtf8(exclude), _wildcardsMatchSlash);
634+
auto regexExclude = convertToRegexpSyntax(exclude, _wildcardsMatchSlash);
635635
if (!fullPath) {
636636
regexAppend(bnameFileDir, bnameDir, regexExclude, matchDirOnly);
637637
} else {

‎src/csync/csync_exclude.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class OCSYNC_EXPORT ExcludedFiles : public QObject
102102
* Primarily used in tests. Patterns added this way are preserved when
103103
* reloadExcludeFiles() is called.
104104
*/
105-
void addManualExclude(const QByteArray &expr);
105+
void addManualExclude(const QString &expr);
106106

107107
/**
108108
* Removes all manually added exclude patterns.
@@ -207,10 +207,10 @@ public slots:
207207
QSet<QString> _excludeFiles;
208208

209209
/// Exclude patterns added with addManualExclude()
210-
QList<QByteArray> _manualExcludes;
210+
QStringList _manualExcludes;
211211

212212
/// List of all active exclude patterns
213-
QList<QByteArray> _allExcludes;
213+
QStringList _allExcludes;
214214

215215
/// see prepare()
216216
QRegularExpression _bnameTraversalRegexFile;

0 commit comments

Comments
 (0)
Please sign in to comment.