Commit 65d17272 authored by Tobias Hunger's avatar Tobias Hunger

CMake: Change PreloadKitInformation to work on Utils::FileName

Change-Id: I717fa8a5c3b308e237acd004fd69df2ba299a938
Reviewed-by: default avatarNiels Weber <niels.weber@theqtcompany.com>
Reviewed-by: default avatarTobias Hunger <tobias.hunger@theqtcompany.com>
parent 6fe9b0cc
...@@ -77,7 +77,7 @@ void CMakePreloadCacheKitConfigWidget::makeReadOnly() ...@@ -77,7 +77,7 @@ void CMakePreloadCacheKitConfigWidget::makeReadOnly()
void CMakePreloadCacheKitConfigWidget::refresh() void CMakePreloadCacheKitConfigWidget::refresh()
{ {
if (!m_ignoreChange) if (!m_ignoreChange)
m_lineEdit->setText(CMakePreloadCacheKitInformation::preloadCacheFile(m_kit)); m_lineEdit->setText(CMakePreloadCacheKitInformation::preloadCacheFile(m_kit).toUserOutput());
} }
void CMakePreloadCacheKitConfigWidget::preloadFileWasChanged(const QString &text) void CMakePreloadCacheKitConfigWidget::preloadFileWasChanged(const QString &text)
......
...@@ -86,18 +86,18 @@ KitConfigWidget *CMakePreloadCacheKitInformation::createConfigWidget(Kit *k) con ...@@ -86,18 +86,18 @@ KitConfigWidget *CMakePreloadCacheKitInformation::createConfigWidget(Kit *k) con
return new Internal::CMakePreloadCacheKitConfigWidget(k, this); return new Internal::CMakePreloadCacheKitConfigWidget(k, this);
} }
void CMakePreloadCacheKitInformation::setPreloadCacheFile(Kit *k, const QString &preload) void CMakePreloadCacheKitInformation::setPreloadCacheFile(Kit *k, const Utils::FileName &preload)
{ {
if (!k) if (!k)
return; return;
k->setValue(CMakePreloadCacheKitInformation::id(), preload); k->setValue(CMakePreloadCacheKitInformation::id(), preload.toString());
} }
QString CMakePreloadCacheKitInformation::preloadCacheFile(const Kit *k) Utils::FileName CMakePreloadCacheKitInformation::preloadCacheFile(const Kit *k)
{ {
if (!k) if (!k)
return QString(); return Utils::FileName();
return k->value(CMakePreloadCacheKitInformation::id()).toString(); return Utils::FileName::fromString(k->value(CMakePreloadCacheKitInformation::id()).toString());
} }
} // namespace CMakeProjectManager } // namespace CMakeProjectManager
...@@ -52,8 +52,8 @@ public: ...@@ -52,8 +52,8 @@ public:
ItemList toUserOutput(const ProjectExplorer::Kit *k) const override; ItemList toUserOutput(const ProjectExplorer::Kit *k) const override;
ProjectExplorer::KitConfigWidget *createConfigWidget(ProjectExplorer::Kit *k) const override; ProjectExplorer::KitConfigWidget *createConfigWidget(ProjectExplorer::Kit *k) const override;
static void setPreloadCacheFile(ProjectExplorer::Kit *k, const QString &preload); static void setPreloadCacheFile(ProjectExplorer::Kit *k, const Utils::FileName &preload);
static QString preloadCacheFile(const ProjectExplorer::Kit *k); static Utils::FileName preloadCacheFile(const ProjectExplorer::Kit *k);
}; };
} // namespace CMakeProjectManager } // namespace CMakeProjectManager
......
...@@ -96,7 +96,7 @@ QByteArray GeneratorInfo::generatorArgument() const ...@@ -96,7 +96,7 @@ QByteArray GeneratorInfo::generatorArgument() const
QString GeneratorInfo::preLoadCacheFileArgument() const QString GeneratorInfo::preLoadCacheFileArgument() const
{ {
const QString tmp = CMakePreloadCacheKitInformation::preloadCacheFile(m_kit); const QString tmp = CMakePreloadCacheKitInformation::preloadCacheFile(m_kit).toUserOutput();
return tmp.isEmpty() ? QString() : QString::fromLatin1("-C") + tmp; return tmp.isEmpty() ? QString() : QString::fromLatin1("-C") + tmp;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment