From d3fe9ff1faed52da8f647d9294e9ce371b0361e4 Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Sun, 16 Feb 2020 18:57:38 -0500 Subject: moved TimeThis to uibase fixed progress bar --- src/shared/fileregisterfwd.h | 2 ++ src/shared/util.cpp | 20 -------------------- src/shared/util.h | 15 +-------------- 3 files changed, 3 insertions(+), 34 deletions(-) (limited to 'src/shared') diff --git a/src/shared/fileregisterfwd.h b/src/shared/fileregisterfwd.h index 6348fee1..720e6e30 100644 --- a/src/shared/fileregisterfwd.h +++ b/src/shared/fileregisterfwd.h @@ -1,6 +1,8 @@ #ifndef MO_REGISTER_FILEREGISTERFWD_INCLUDED #define MO_REGISTER_FILEREGISTERFWD_INCLUDED +class DirectoryRefreshProgress; + namespace MOShared { diff --git a/src/shared/util.cpp b/src/shared/util.cpp index 74e386a3..483b36a9 100644 --- a/src/shared/util.cpp +++ b/src/shared/util.cpp @@ -382,26 +382,6 @@ void checkDuplicateShortcuts(const QMenu& m) } // namespace MOShared -TimeThis::TimeThis(QString what) - : m_what(std::move(what)), m_start(Clock::now()) -{ -} - -TimeThis::~TimeThis() -{ - using namespace std::chrono; - - const auto end = Clock::now(); - const auto d = duration_cast(end - m_start).count(); - - if (m_what.isEmpty()) { - log::debug("{} ms", d); - } else { - log::debug("{} {} ms", m_what, d); - } -} - - static bool g_exiting = false; static bool g_canClose = false; diff --git a/src/shared/util.h b/src/shared/util.h index 1d3cce82..2761b64f 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -20,6 +20,7 @@ along with Mod Organizer. If not, see . #ifndef UTIL_H #define UTIL_H +#include #include #include #include @@ -64,20 +65,6 @@ inline FILETIME ToFILETIME(std::filesystem::file_time_type t) } // namespace MOShared -class TimeThis -{ -public: - TimeThis(QString what={}); - ~TimeThis(); - -private: - using Clock = std::chrono::high_resolution_clock; - - QString m_what; - Clock::time_point m_start; -}; - - enum class Exit { None = 0x00, -- cgit v1.3.1