diff --git a/qrenderdoc/Windows/Dialogs/VirtualFileDialog.cpp b/qrenderdoc/Windows/Dialogs/VirtualFileDialog.cpp index 841e036fc..7997a89be 100644 --- a/qrenderdoc/Windows/Dialogs/VirtualFileDialog.cpp +++ b/qrenderdoc/Windows/Dialogs/VirtualFileDialog.cpp @@ -327,7 +327,7 @@ public: { if(node->file.lastmod == 0) return QVariant(); - return QDateTime::fromTime_t(node->file.lastmod); + return QDateTime::fromSecsSinceEpoch(node->file.lastmod); } default: break; } @@ -452,38 +452,38 @@ private: if(!(node->file.flags & PathProperty::Directory)) return; - Renderer.ListFolder( - makePath(node), true, [node](const rdcstr &path, const rdcarray &files) { + Renderer.ListFolder(makePath(node), true, [node](const rdcstr &path, + const rdcarray &files) { - if(files.count() == 1 && (files[0].flags & PathProperty::ErrorAccessDenied)) - { - node->file.flags |= PathProperty::ErrorAccessDenied; - return; - } + if(files.count() == 1 && (files[0].flags & PathProperty::ErrorAccessDenied)) + { + node->file.flags |= PathProperty::ErrorAccessDenied; + return; + } - QVector sortedFiles; - sortedFiles.reserve(files.count()); - for(const PathEntry &f : files) - sortedFiles.push_back(f); + QVector sortedFiles; + sortedFiles.reserve(files.count()); + for(const PathEntry &f : files) + sortedFiles.push_back(f); - qSort(sortedFiles.begin(), sortedFiles.end(), [](const PathEntry &a, const PathEntry &b) { - // sort greater than so that files with the flag are sorted before those without - if((a.flags & PathProperty::Directory) != (b.flags & PathProperty::Directory)) - return (a.flags & PathProperty::Directory) > (b.flags & PathProperty::Directory); + std::sort(sortedFiles.begin(), sortedFiles.end(), [](const PathEntry &a, const PathEntry &b) { + // sort greater than so that files with the flag are sorted before those without + if((a.flags & PathProperty::Directory) != (b.flags & PathProperty::Directory)) + return (a.flags & PathProperty::Directory) > (b.flags & PathProperty::Directory); - return strcmp(a.filename.c_str(), b.filename.c_str()) < 0; - }); + return strcmp(a.filename.c_str(), b.filename.c_str()) < 0; + }); - for(int i = 0; i < sortedFiles.count(); i++) - { - FSNode *child = new FSNode(); - child->parent = node; - child->parentIndex = i; - child->file = sortedFiles[i]; - child->populated = !(child->file.flags & PathProperty::Directory); - node->children.push_back(child); - } - }); + for(int i = 0; i < sortedFiles.count(); i++) + { + FSNode *child = new FSNode(); + child->parent = node; + child->parentIndex = i; + child->file = sortedFiles[i]; + child->populated = !(child->file.flags & PathProperty::Directory); + node->children.push_back(child); + } + }); } }; diff --git a/qrenderdoc/Windows/LogView.cpp b/qrenderdoc/Windows/LogView.cpp index 7d50708c2..a47eb9b59 100644 --- a/qrenderdoc/Windows/LogView.cpp +++ b/qrenderdoc/Windows/LogView.cpp @@ -333,7 +333,7 @@ void LogView::messages_keyPress(QKeyEvent *event) rows.push_back(idx.row()); } - qSort(rows); + std::sort(rows.begin(), rows.end()); int columns = m_ItemModel->columnCount(); diff --git a/qrenderdoc/Windows/TimelineBar.cpp b/qrenderdoc/Windows/TimelineBar.cpp index 84b083e48..d506b7356 100644 --- a/qrenderdoc/Windows/TimelineBar.cpp +++ b/qrenderdoc/Windows/TimelineBar.cpp @@ -143,7 +143,7 @@ void TimelineBar::HighlightResourceUsage(ResourceId id) GUIInvoke::call(this, [this, usage]() { for(const EventUsage &u : usage) m_UsageEvents << u; - qSort(m_UsageEvents); + std::sort(m_UsageEvents.begin(), m_UsageEvents.end()); viewport()->update(); }); }); @@ -163,7 +163,7 @@ void TimelineBar::HighlightHistory(ResourceId id, const rdcarrayupdate();