forked from qt-creator/qt-creator
Vcpkg: Use Utils::FilePathAspect
Change-Id: I7532536186d500748e3ad30794801436c0a997e2 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -94,7 +94,7 @@ VcpkgPackageSearchDialog::VcpkgPackageSearchDialog(QWidget *parent)
|
||||
m_buttonBox,
|
||||
}.attachTo(this);
|
||||
|
||||
m_allPackages = vcpkgManifests(VcpkgSettings::instance()->vcpkgRoot.filePath());
|
||||
m_allPackages = vcpkgManifests(VcpkgSettings::instance()->vcpkgRoot());
|
||||
|
||||
listPackages({});
|
||||
|
||||
|
@@ -61,7 +61,6 @@ VcpkgSettings::VcpkgSettings()
|
||||
|
||||
registerAspect(&vcpkgRoot);
|
||||
vcpkgRoot.setSettingsKey("VcpkgRoot");
|
||||
vcpkgRoot.setDisplayStyle(Utils::StringAspect::PathChooserDisplay);
|
||||
vcpkgRoot.setExpectedKind(Utils::PathChooser::ExistingDirectory);
|
||||
vcpkgRoot.setDefaultValue(Utils::qtcEnvironmentVariable(Constants::ENVVAR_VCPKG_ROOT));
|
||||
|
||||
@@ -70,7 +69,7 @@ VcpkgSettings::VcpkgSettings()
|
||||
|
||||
bool VcpkgSettings::vcpkgRootValid() const
|
||||
{
|
||||
return (vcpkgRoot.filePath() / "vcpkg").withExecutableSuffix().isExecutableFile();
|
||||
return (vcpkgRoot() / "vcpkg").withExecutableSuffix().isExecutableFile();
|
||||
}
|
||||
|
||||
} // namespace Vcpkg::Internal
|
||||
|
@@ -15,7 +15,7 @@ public:
|
||||
static VcpkgSettings *instance();
|
||||
bool vcpkgRootValid() const;
|
||||
|
||||
Utils::StringAspect vcpkgRoot;
|
||||
Utils::FilePathAspect vcpkgRoot;
|
||||
};
|
||||
|
||||
} // namespace Vcpkg::Internal
|
||||
|
Reference in New Issue
Block a user