forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/11.0'
Change-Id: I6c2a1d497aae9bda45c4aae47fb0be6c61c1ec29
This commit is contained in:
@@ -892,6 +892,9 @@ bool UnixDeviceFileAccess::isFile(const FilePath &filePath) const
|
||||
|
||||
bool UnixDeviceFileAccess::isDirectory(const FilePath &filePath) const
|
||||
{
|
||||
if (filePath.isRootPath())
|
||||
return true;
|
||||
|
||||
const QString path = filePath.path();
|
||||
return runInShellSuccess({"test", {"-d", path}, OsType::OsTypeLinux});
|
||||
}
|
||||
|
@@ -841,7 +841,6 @@ FileApiData FileApiParser::parseData(QPromise<std::shared_ptr<FileApiQtcData>> &
|
||||
QString &errorMessage)
|
||||
{
|
||||
QTC_CHECK(errorMessage.isEmpty());
|
||||
QTC_CHECK(!replyFilePath.needsDevice());
|
||||
const FilePath replyDir = replyFilePath.parentDir();
|
||||
|
||||
FileApiData result;
|
||||
|
@@ -162,7 +162,7 @@ FilePath SysRootKitAspect::sysRoot(const Kit *k)
|
||||
return {};
|
||||
|
||||
if (!k->value(SysRootKitAspect::id()).toString().isEmpty())
|
||||
return FilePath::fromString(k->value(SysRootKitAspect::id()).toString());
|
||||
return FilePath::fromSettings(k->value(SysRootKitAspect::id()));
|
||||
|
||||
for (ToolChain *tc : ToolChainKitAspect::toolChains(k)) {
|
||||
if (!tc->sysRoot().isEmpty())
|
||||
|
@@ -618,6 +618,7 @@ void TaskDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
|
||||
|
||||
painter->save();
|
||||
m_doc.setHtml(options.text);
|
||||
m_doc.setTextWidth(options.rect.width());
|
||||
options.text = "";
|
||||
options.widget->style()->drawControl(QStyle::CE_ItemViewItem, &options, painter);
|
||||
painter->translate(options.rect.left(), options.rect.top());
|
||||
@@ -645,9 +646,12 @@ QSize TaskDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelInd
|
||||
return QStyledItemDelegate::sizeHint(option, index);
|
||||
|
||||
QStyleOptionViewItem options = option;
|
||||
options.initFrom(options.widget);
|
||||
initStyleOption(&options, index);
|
||||
m_doc.setHtml(options.text);
|
||||
m_doc.setTextWidth(options.rect.width());
|
||||
const auto view = qobject_cast<const QTreeView *>(options.widget);
|
||||
QTC_ASSERT(view, return {});
|
||||
m_doc.setTextWidth(view->width() * 0.85 - view->indentation());
|
||||
return QSize(m_doc.idealWidth(), m_doc.size().height());
|
||||
}
|
||||
|
||||
|
@@ -1279,8 +1279,10 @@ private:
|
||||
QByteArray batchData;
|
||||
|
||||
const FilePaths dirs = dirsToCreate(m_setup.m_files);
|
||||
for (const FilePath &dir : dirs)
|
||||
batchData += "-mkdir " + ProcessArgs::quoteArgUnix(dir.path()).toLocal8Bit() + '\n';
|
||||
for (const FilePath &dir : dirs) {
|
||||
if (!dir.exists())
|
||||
batchData += "-mkdir " + ProcessArgs::quoteArgUnix(dir.path()).toLocal8Bit() + '\n';
|
||||
}
|
||||
|
||||
for (const FileToTransfer &file : m_setup.m_files) {
|
||||
FilePath sourceFileOrLinkTarget = file.m_source;
|
||||
@@ -1454,6 +1456,11 @@ private:
|
||||
FileTransferInterface *LinuxDevice::createFileTransferInterface(
|
||||
const FileTransferSetupData &setup) const
|
||||
{
|
||||
if (Utils::anyOf(setup.m_files,
|
||||
[](const FileToTransfer &f) { return f.m_source.needsDevice(); })) {
|
||||
return new GenericTransferImpl(setup);
|
||||
}
|
||||
|
||||
switch (setup.m_method) {
|
||||
case FileTransferMethod::Sftp: return new SftpTransferImpl(setup, sharedFromThis());
|
||||
case FileTransferMethod::Rsync: return new RsyncTransferImpl(setup, sharedFromThis());
|
||||
|
@@ -686,7 +686,7 @@ QVariantMap AddKitData::addKit(const QVariantMap &map,
|
||||
if (!m_buildDevice.isNull())
|
||||
data << KeyValuePair({kit, DATA, BUILDDEVICE_ID}, QVariant(m_buildDevice));
|
||||
if (!m_sysRoot.isNull())
|
||||
data << KeyValuePair({kit, DATA, SYSROOT}, QVariant(QDir::cleanPath(m_sysRoot)));
|
||||
data << KeyValuePair({kit, DATA, SYSROOT}, QVariant(cleanPath(m_sysRoot)));
|
||||
for (auto i = m_tcs.constBegin(); i != m_tcs.constEnd(); ++i)
|
||||
data << KeyValuePair({kit, DATA, TOOLCHAIN, i.key()}, QVariant(i.value()));
|
||||
if (!qtId.isNull())
|
||||
|
Reference in New Issue
Block a user