From c45de9579f6ec97574056dd335df02031ccd00ad Mon Sep 17 00:00:00 2001 From: "Tobias C. Berner" Date: Tue, 1 Oct 2019 04:13:31 +0000 Subject: Qt5 update to 5.13.0 For new features, check: https://wiki.qt.io/New_Features_in_Qt_5.13 Thanks to adridg who helped to fix a lot of packages. Exp-run by: antoine PR: 238782 --- net/rclone-browser/files/patch-src_item__model.cpp | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 net/rclone-browser/files/patch-src_item__model.cpp (limited to 'net/rclone-browser/files/patch-src_item__model.cpp') diff --git a/net/rclone-browser/files/patch-src_item__model.cpp b/net/rclone-browser/files/patch-src_item__model.cpp new file mode 100644 index 000000000000..17636c769b0d --- /dev/null +++ b/net/rclone-browser/files/patch-src_item__model.cpp @@ -0,0 +1,67 @@ +--- src/item_model.cpp.orig 2017-03-11 22:16:36.000000000 +0000 ++++ src/item_model.cpp 2019-09-01 18:49:37.991420000 +0000 +@@ -2,6 +2,8 @@ + #include "icon_cache.h" + #include "utils.h" + ++#include ++ + namespace + { + static void advanceSpinner(QString& text) +@@ -10,7 +12,7 @@ + QChar current = text[spinnerPos]; + static const QChar spinner[] = { '-', '\\', '|', '/' }; + size_t spinnerCount = sizeof(spinner) / sizeof(*spinner); +- const QChar* found = qFind(spinner, spinner + spinnerCount, current); ++ const QChar* found = std::find(spinner, spinner + spinnerCount, current); + size_t idx = found - spinner; + size_t next = idx == spinnerCount - 1 ? 0 : idx + 1; + text[spinnerPos] = spinner[next]; +@@ -161,7 +163,7 @@ + { + Item* item = get(index); + item->name = name; +- item->path = item->parent->path.filePath(item->name); ++ item->path.setPath(item->parent->path.filePath(item->name)); + emit dataChanged(index, index, QVector{Qt::DisplayRole}); + } + +@@ -182,7 +184,7 @@ + Item* item = new Item(); + item->isFolder = true; + item->name = name; +- item->path = path; ++ item->path.setPath(path); + item->parent = mRoot; + mRoot->childs.append(item); + +@@ -500,7 +502,7 @@ + auto it = existing.find(item->name); + if (it == existing.end()) + { +- item->path = parent->path.filePath(item->name); ++ item->path.setPath(parent->path.filePath(item->name)); + if (!item->isFolder && mFileIcons) + { + QString ext = QFileInfo(item->name).suffix(); +@@ -561,8 +563,8 @@ + } + }; + +- QObject::connect(lsd, static_cast(&QProcess::finished), this, rcloneFinished); +- QObject::connect(lsl, static_cast(&QProcess::finished), this, rcloneFinished); ++ QObject::connect(lsd, QOverload::of(&QProcess::finished), this, rcloneFinished); ++ QObject::connect(lsl, QOverload::of(&QProcess::finished), this, rcloneFinished); + + QObject::connect(lsd, &QProcess::readyRead, this, [=]() + { +@@ -617,7 +619,7 @@ + + void ItemModel::sortRecursive(Item* item, const ItemSorter& sorter) + { +- qSort(item->childs.begin(), item->childs.end(), sorter); ++ std::sort(item->childs.begin(), item->childs.end(), sorter); + + for (auto child : item->childs) + { -- cgit v1.2.3