QmlDesigner: Fix some FilePath -> QString conversions

Change-Id: Ice70f65b86b7f7fc4472c3db521b5a6465a23845
Reviewed-by: Burak Hancerli <burak.hancerli@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
hjk
2025-01-15 13:27:47 +01:00
parent 6f72adbb28
commit 558f25f5f0
2 changed files with 4 additions and 4 deletions

View File

@@ -192,11 +192,11 @@ std::optional<Utils::FilePath> ResourceGenerator::createQrc(const QString &proje
bool ResourceGenerator::createQrc(const Utils::FilePath &qrcFilePath) bool ResourceGenerator::createQrc(const Utils::FilePath &qrcFilePath)
{ {
QFile qrcFile(qrcFilePath.toUrlishString()); QFile qrcFile(qrcFilePath.toFSPathString());
if (!qrcFile.open(QIODeviceBase::WriteOnly | QIODevice::Truncate)) { if (!qrcFile.open(QIODeviceBase::WriteOnly | QIODevice::Truncate)) {
Core::MessageManager::writeDisrupting( Core::MessageManager::writeDisrupting(
Tr::tr("Failed to open file to write QRC XML: %1").arg(qrcFilePath.toString())); Tr::tr("Failed to open file to write QRC XML: %1").arg(qrcFilePath.toUserOutput()));
return false; return false;
} }

View File

@@ -432,12 +432,12 @@ void DeviceManager::runProject(const QString &deviceId)
void DeviceManager::projectPacked(const Utils::FilePath &filePath) void DeviceManager::projectPacked(const Utils::FilePath &filePath)
{ {
qCDebug(deviceSharePluginLog) << "Project packed" << filePath.toString(); qCDebug(deviceSharePluginLog) << "Project packed" << filePath.toUserOutput();
emit projectSendingProgress(m_currentDeviceId, 0); emit projectSendingProgress(m_currentDeviceId, 0);
m_currentState = OpTypes::Sending; m_currentState = OpTypes::Sending;
qCDebug(deviceSharePluginLog) << "Sending project file to device" << m_currentDeviceId; qCDebug(deviceSharePluginLog) << "Sending project file to device" << m_currentDeviceId;
QFile file(filePath.toString()); QFile file(filePath.toFSPathString());
if (!file.open(QIODevice::ReadOnly)) { if (!file.open(QIODevice::ReadOnly)) {
handleError(ErrTypes::ProjectSendingError, m_currentDeviceId, "Failed to open project file"); handleError(ErrTypes::ProjectSendingError, m_currentDeviceId, "Failed to open project file");