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:
@@ -5,8 +5,6 @@
|
||||
|
||||
#include <utils/qtcprocess.h>
|
||||
|
||||
#include <QUuid>
|
||||
|
||||
namespace MesonProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
@@ -14,7 +12,7 @@ ToolWrapper::ToolWrapper(const QString &name, const Utils::FilePath &path, bool
|
||||
: m_version(read_version(path))
|
||||
, m_isValid{path.exists() && m_version.isValid}
|
||||
, m_autoDetected{autoDetected}
|
||||
, m_id{Utils::Id::fromString(QUuid::createUuid().toString())}
|
||||
, m_id{Utils::Id::generate()}
|
||||
, m_exe{path}
|
||||
, m_name{name}
|
||||
{}
|
||||
@@ -30,7 +28,7 @@ ToolWrapper::ToolWrapper(const QString &name,
|
||||
, m_exe{path}
|
||||
, m_name{name}
|
||||
{
|
||||
QTC_ASSERT(m_id.isValid(), m_id = Utils::Id::fromString(QUuid::createUuid().toString()));
|
||||
QTC_ASSERT(m_id.isValid(), m_id = Utils::Id::generate());
|
||||
}
|
||||
|
||||
void ToolWrapper::setExe(const Utils::FilePath &newExe)
|
||||
|
||||
Reference in New Issue
Block a user