diff --git a/src/App/Application.cpp b/src/App/Application.cpp index 31df8e4e3178..9384790627da 100644 --- a/src/App/Application.cpp +++ b/src/App/Application.cpp @@ -35,6 +35,8 @@ # endif # include # include +# include +# include #endif #ifdef FC_OS_WIN32 @@ -1117,7 +1119,17 @@ Application::TransactionSignaller::~TransactionSignaller() { int64_t Application::applicationPid() { - return QCoreApplication::applicationPid(); + static int64_t randomNumber = []() { + auto tp = std::chrono::high_resolution_clock::now(); + auto dur = tp.time_since_epoch(); + auto seed = dur.count(); + std::mt19937 generator(static_cast(seed)); + constexpr int64_t minValue {1}; + constexpr int64_t maxValue {1000000}; + std::uniform_int_distribution distribution(minValue, maxValue); + return distribution(generator); + }(); + return randomNumber; } std::string Application::getHomePath() diff --git a/src/App/PreCompiled.h b/src/App/PreCompiled.h index 86389849a57d..b421ee048b11 100644 --- a/src/App/PreCompiled.h +++ b/src/App/PreCompiled.h @@ -69,6 +69,7 @@ // STL #include +#include #include #include #include