forked from qt-creator/qt-creator
Utils: Add convenience function for generating a unique Id
Change-Id: I74516ef5077009ebcf1d47c724ca63e502729ede Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -29,7 +29,6 @@
|
||||
#include <QLineEdit>
|
||||
#include <QPushButton>
|
||||
#include <QTreeView>
|
||||
#include <QUuid>
|
||||
|
||||
using namespace Utils;
|
||||
|
||||
@@ -95,7 +94,7 @@ public:
|
||||
const FilePath &qchFile,
|
||||
bool autoRun,
|
||||
bool autodetected)
|
||||
: m_id(Id::fromString(QUuid::createUuid().toString()))
|
||||
: m_id(Id::generate())
|
||||
, m_name(name)
|
||||
, m_executable(executable)
|
||||
, m_qchFile(qchFile)
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include <QRegularExpression>
|
||||
#include <QSet>
|
||||
#include <QXmlStreamReader>
|
||||
#include <QUuid>
|
||||
|
||||
#include <memory>
|
||||
|
||||
@@ -104,7 +103,7 @@ CMakeTool::CMakeTool(Detection d, const Id &id)
|
||||
, m_isAutoDetected(d == AutoDetection)
|
||||
, m_introspection(std::make_unique<Internal::IntrospectionData>())
|
||||
{
|
||||
QTC_ASSERT(m_id.isValid(), m_id = Id::fromString(QUuid::createUuid().toString()));
|
||||
QTC_ASSERT(m_id.isValid(), m_id = Id::generate());
|
||||
}
|
||||
|
||||
CMakeTool::CMakeTool(const Store &map, bool fromSdk) :
|
||||
@@ -133,7 +132,7 @@ CMakeTool::~CMakeTool() = default;
|
||||
|
||||
Id CMakeTool::createId()
|
||||
{
|
||||
return Id::fromString(QUuid::createUuid().toString());
|
||||
return Id::generate();
|
||||
}
|
||||
|
||||
void CMakeTool::setFilePath(const FilePath &executable)
|
||||
|
||||
Reference in New Issue
Block a user