forked from qt-creator/qt-creator
Utils: Use FilePath in TemporaryDirectory API
This helps to lower impedance in the using code. Even though TemporaryDirectory will very likely always stay on the local host, this is one of the entry points into path related string manipulation that we want to base on FilePath nowadays. Change-Id: I302016b8d65e54df94296659a54a93935d9e4627 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -200,14 +200,14 @@ public:
|
||||
m_canceled = false;
|
||||
|
||||
m_tempDir = std::make_unique<TemporaryDirectory>("plugininstall");
|
||||
m_data->extractedPath = FilePath::fromString(m_tempDir->path());
|
||||
m_data->extractedPath = m_tempDir->path();
|
||||
m_label->setText(PluginInstallWizard::tr("Checking archive..."));
|
||||
m_label->setType(InfoLabel::None);
|
||||
|
||||
m_cancelButton->setVisible(true);
|
||||
m_output->clear();
|
||||
|
||||
m_archive = Archive::unarchive(m_data->sourcePath, FilePath::fromString(m_tempDir->path()));
|
||||
m_archive = Archive::unarchive(m_data->sourcePath, m_tempDir->path());
|
||||
|
||||
if (!m_archive) {
|
||||
m_label->setType(InfoLabel::Error);
|
||||
@@ -271,7 +271,7 @@ public:
|
||||
PluginSpec *coreplugin = CorePlugin::instance()->pluginSpec();
|
||||
|
||||
// look for plugin
|
||||
QDirIterator it(m_tempDir->path(),
|
||||
QDirIterator it(m_tempDir->path().path(),
|
||||
libraryNameFilter(),
|
||||
QDir::Files | QDir::NoSymLinks,
|
||||
QDirIterator::Subdirectories);
|
||||
|
||||
Reference in New Issue
Block a user