summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2018-03-13 11:25:38 +0100
committerEike Ziller <eike.ziller@qt.io>2018-03-13 11:25:38 +0100
commit0b10ecc718accd8c4d472ba8f3ed5ea6f1856e51 (patch)
tree67f63d2b4aa20195910728659cd3c0ba2cb580eb /src
parentf1985df55dfa81f184c9d29df6cfbb353bf77ffc (diff)
parent0bcc983cdbb74baebccfdb09f7d2ffb22ebf950d (diff)
downloadqt-creator-0b10ecc718accd8c4d472ba8f3ed5ea6f1856e51.tar.gz
Merge remote-tracking branch 'origin/4.6'
Conflicts: src/plugins/cmakeprojectmanager/cmakeproject.h src/plugins/debugger/debuggerplugin.cpp src/plugins/ios/iosrunfactories.cpp src/plugins/nim/project/nimproject.h src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp src/plugins/qmakeandroidsupport/qmakeandroidrunfactories.cpp src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp src/plugins/qmlprojectmanager/qmlproject.h src/plugins/qnx/qnxrunconfigurationfactory.cpp src/plugins/qtsupport/exampleslistmodel.cpp src/plugins/winrt/winrtrunfactories.cpp Change-Id: Ib029fdbaa65270426332f5edd6e90264be5fb539
Diffstat (limited to 'src')
-rw-r--r--src/libs/qmljs/qmljscheck.cpp1
-rw-r--r--src/plugins/autotest/testtreeitem.cpp5
-rw-r--r--src/plugins/bineditor/bineditorwidget.cpp46
-rw-r--r--src/plugins/classview/classviewnavigationwidget.cpp8
-rw-r--r--src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp3
-rw-r--r--src/plugins/coreplugin/dialogs/newdialog.cpp16
-rw-r--r--src/plugins/coreplugin/editormanager/editorview.cpp3
-rw-r--r--src/plugins/cppeditor/cpptypehierarchy.cpp2
-rw-r--r--src/plugins/cpptools/cppelementevaluator.cpp10
-rw-r--r--src/plugins/cpptools/cppelementevaluator.h10
-rw-r--r--src/plugins/cpptools/tidychecks.ui32
-rw-r--r--src/plugins/debugger/debuggercore.h2
-rw-r--r--src/plugins/debugger/debuggerplugin.cpp44
-rw-r--r--src/plugins/debugger/gdb/gdbengine.cpp64
-rw-r--r--src/plugins/debugger/gdb/gdbengine.h5
-rw-r--r--src/plugins/git/changeselectiondialog.cpp2
-rw-r--r--src/plugins/help/textbrowserhelpviewer.cpp2
-rw-r--r--src/plugins/ios/iosrunfactories.cpp3
-rw-r--r--src/plugins/projectexplorer/gcctoolchain.cpp2
-rw-r--r--src/plugins/projectexplorer/projecttreewidget.cpp20
-rw-r--r--src/plugins/projectexplorer/taskwindow.cpp21
-rw-r--r--src/plugins/qbsprojectmanager/qbsbuildconfiguration.cpp2
-rw-r--r--src/plugins/qbsprojectmanager/qbsbuildstep.cpp2
-rw-r--r--src/plugins/qmakeandroidsupport/qmakeandroidrunfactories.cpp3
-rw-r--r--src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp6
-rw-r--r--src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp3
-rw-r--r--src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp2
-rw-r--r--src/plugins/qmldesigner/components/formeditor/contentnoteditableindicator.cpp3
-rw-r--r--src/plugins/qmldesigner/components/integration/designdocumentview.cpp5
-rw-r--r--src/plugins/qmldesigner/designercore/include/nodehints.h1
-rw-r--r--src/plugins/qmldesigner/designercore/include/rewriterview.h6
-rw-r--r--src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp46
-rw-r--r--src/plugins/qmldesigner/designercore/metainfo/itemlibraryinfo.cpp1
-rw-r--r--src/plugins/qmldesigner/designercore/metainfo/nodehints.cpp12
-rw-r--r--src/plugins/qmldesigner/designercore/model/modelmerger.cpp10
-rw-r--r--src/plugins/qmldesigner/designercore/model/rewriterview.cpp160
-rw-r--r--src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp2
-rw-r--r--src/plugins/qmlprojectmanager/qmlproject.cpp70
-rw-r--r--src/plugins/qmlprojectmanager/qmlprojectenvironmentaspect.cpp32
-rw-r--r--src/plugins/qmlprojectmanager/qmlprojectenvironmentaspect.h2
-rw-r--r--src/plugins/qnx/qnxrunconfigurationfactory.cpp3
-rw-r--r--src/plugins/qtsupport/baseqtversion.cpp252
-rw-r--r--src/plugins/qtsupport/baseqtversion.h4
-rw-r--r--src/plugins/qtsupport/exampleslistmodel.cpp4
-rw-r--r--src/plugins/qtsupport/gettingstartedwelcomepage.cpp12
-rw-r--r--src/plugins/qtsupport/images/icons/qteventicon.pngbin4074 -> 3210 bytes
-rw-r--r--src/plugins/qtsupport/images/icons/qteventicon@2x.pngbin0 -> 6527 bytes
-rw-r--r--src/plugins/qtsupport/images/icons/tutorialicon.pngbin4421 -> 5498 bytes
-rw-r--r--src/plugins/qtsupport/images/icons/tutorialicon@2x.pngbin0 -> 11861 bytes
-rw-r--r--src/plugins/qtsupport/images/icons/videotutorialicon.pngbin5911 -> 4062 bytes
-rw-r--r--src/plugins/qtsupport/images/icons/videotutorialicon@2x.pngbin0 -> 8552 bytes
-rw-r--r--src/plugins/qtsupport/qtcreator_tutorials.xml6
-rw-r--r--src/plugins/qtsupport/qtkitinformation.cpp22
-rw-r--r--src/plugins/qtsupport/qtsupport.qrc3
-rw-r--r--src/plugins/texteditor/texteditor.cpp8
-rw-r--r--src/plugins/winrt/winrtrunfactories.cpp3
m---------src/shared/qbs0
-rw-r--r--src/tools/icons/qtcreatoricons.svg104
58 files changed, 792 insertions, 298 deletions
diff --git a/src/libs/qmljs/qmljscheck.cpp b/src/libs/qmljs/qmljscheck.cpp
index 5b184d37b0..1acedaf4a0 100644
--- a/src/libs/qmljs/qmljscheck.cpp
+++ b/src/libs/qmljs/qmljscheck.cpp
@@ -575,7 +575,6 @@ public:
"PropertyAnimation",
"SequentialAnimation",
"ParallelAnimation",
- "NumberAnimation",
"Drawer"})
{
append(UnsupportedTypesByVisualDesigner());
diff --git a/src/plugins/autotest/testtreeitem.cpp b/src/plugins/autotest/testtreeitem.cpp
index a597a2de7a..362465e923 100644
--- a/src/plugins/autotest/testtreeitem.cpp
+++ b/src/plugins/autotest/testtreeitem.cpp
@@ -196,12 +196,13 @@ void TestTreeItem::markForRemovalRecursively(bool mark)
void TestTreeItem::markForRemovalRecursively(const QString &filePath)
{
- if (m_filePath == filePath)
- markForRemoval(true);
+ bool mark = m_filePath == filePath;
for (int row = 0, count = childCount(); row < count; ++row) {
TestTreeItem *child = childItem(row);
child->markForRemovalRecursively(filePath);
+ mark &= child->markedForRemoval();
}
+ markForRemoval(mark);
}
TestTreeItem *TestTreeItem::parentItem() const
diff --git a/src/plugins/bineditor/bineditorwidget.cpp b/src/plugins/bineditor/bineditorwidget.cpp
index e647432723..51d80a73c5 100644
--- a/src/plugins/bineditor/bineditorwidget.cpp
+++ b/src/plugins/bineditor/bineditorwidget.cpp
@@ -550,17 +550,16 @@ QRect BinEditorWidget::cursorRect() const
int BinEditorWidget::posAt(const QPoint &pos) const
{
- int xoffset = horizontalScrollBar()->value();
+ const int xoffset = horizontalScrollBar()->value();
int x = xoffset + pos.x() - m_margin - m_labelWidth;
int column = qMin(15, qMax(0,x) / m_columnWidth);
- qint64 topLine = verticalScrollBar()->value();
- qint64 line = pos.y() / m_lineHeight;
-
+ const qint64 topLine = verticalScrollBar()->value();
+ const qint64 line = topLine + pos.y() / m_lineHeight;
if (x > m_bytesPerLine * m_columnWidth + m_charWidth/2) {
x -= m_bytesPerLine * m_columnWidth + m_charWidth;
for (column = 0; column < 15; ++column) {
- int dataPos = (topLine + line) * m_bytesPerLine + column;
+ const int dataPos = line * m_bytesPerLine + column;
if (dataPos < 0 || dataPos >= m_size)
break;
QChar qc(QLatin1Char(dataAt(dataPos)));
@@ -572,7 +571,7 @@ int BinEditorWidget::posAt(const QPoint &pos) const
}
}
- return qMin(m_size, qMin(m_numLines, topLine + line) * m_bytesPerLine) + column;
+ return qMin(m_size - 1, line * m_bytesPerLine + column);
}
bool BinEditorWidget::inTextArea(const QPoint &pos) const
@@ -1147,16 +1146,31 @@ QString BinEditorWidget::toolTip(const QHelpEvent *helpEvent) const
{
int selStart = selectionStart();
int selEnd = selectionEnd();
- int byteCount = selEnd - selStart + 1;
- if (m_hexCursor == 0 || byteCount > 8)
- return QString();
-
- const QPoint &startPoint = offsetToPos(selStart);
- const QPoint &endPoint = offsetToPos(selEnd + 1);
- QRect selRect(startPoint, endPoint);
- selRect.setHeight(m_lineHeight);
- if (!selRect.contains(helpEvent->pos()))
- return QString();
+ int byteCount = std::min(8, selEnd - selStart + 1);
+
+ // check even position against selection line by line
+ bool insideSelection = false;
+ int startInLine = selStart;
+ do {
+ const int lineIndex = startInLine / m_bytesPerLine;
+ const int endOfLine = (lineIndex + 1) * m_bytesPerLine - 1;
+ const int endInLine = std::min(selEnd, endOfLine);
+ const QPoint &startPoint = offsetToPos(startInLine);
+ const QPoint &endPoint = offsetToPos(endInLine) + QPoint(m_columnWidth, 0);
+ QRect selectionLineRect(startPoint, endPoint);
+ selectionLineRect.setHeight(m_lineHeight);
+ if (selectionLineRect.contains(helpEvent->pos())) {
+ insideSelection = true;
+ break;
+ }
+ startInLine = endInLine + 1;
+ } while (startInLine <= selEnd);
+ if (!insideSelection) {
+ // show popup for byte under cursor
+ selStart = posAt(helpEvent->pos());
+ selEnd = selStart;
+ byteCount = 1;
+ }
quint64 bigEndianValue, littleEndianValue;
quint64 bigEndianValueOld, littleEndianValueOld;
diff --git a/src/plugins/classview/classviewnavigationwidget.cpp b/src/plugins/classview/classviewnavigationwidget.cpp
index 5ce0d24e73..58cab5a6d8 100644
--- a/src/plugins/classview/classviewnavigationwidget.cpp
+++ b/src/plugins/classview/classviewnavigationwidget.cpp
@@ -105,7 +105,7 @@ NavigationWidget::NavigationWidget(QWidget *parent) :
verticalLayout->addWidget(Core::ItemViewFind::createSearchableWrapper(
treeView, Core::ItemViewFind::DarkColored,
Core::ItemViewFind::FetchMoreWhileSearching));
-
+ setFocusProxy(treeView);
// tree model
treeModel = new TreeItemModel(this);
treeView->setModel(treeModel);
@@ -282,10 +282,12 @@ void NavigationWidget::onDataUpdate(QSharedPointer<QStandardItem> result)
// expand top level projects
QModelIndex sessionIndex;
-
- for (int i = 0; i < treeModel->rowCount(sessionIndex); ++i)
+ const int toplevelCount = treeModel->rowCount(sessionIndex);
+ for (int i = 0; i < toplevelCount; ++i)
treeView->expand(treeModel->index(i, 0, sessionIndex));
+ if (!treeView->currentIndex().isValid() && toplevelCount > 0)
+ treeView->setCurrentIndex(treeModel->index(0, 0, sessionIndex));
if (debug)
qDebug() << "Class View:" << QDateTime::currentDateTime().toString()
<< "TreeView is updated in" << timer.elapsed() << "msecs";
diff --git a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp
index ae5c81234a..9a4f871de0 100644
--- a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp
@@ -239,7 +239,8 @@ CMakeRunConfigurationFactory::CMakeRunConfigurationFactory()
QList<RunConfigurationCreationInfo>
CMakeRunConfigurationFactory::availableCreators(Target *parent) const
{
- CMakeProject *project = static_cast<CMakeProject *>(parent->project());
+ CMakeProject *project = qobject_cast<CMakeProject *>(parent->project());
+ QTC_ASSERT(project, return {});
const QStringList titles = project->buildTargetTitles(true);
return Utils::transform(titles, [this](const QString &title) { return convert(title, title); });
}
diff --git a/src/plugins/coreplugin/dialogs/newdialog.cpp b/src/plugins/coreplugin/dialogs/newdialog.cpp
index 0bc113a42f..7ae0953ad1 100644
--- a/src/plugins/coreplugin/dialogs/newdialog.cpp
+++ b/src/plugins/coreplugin/dialogs/newdialog.cpp
@@ -53,6 +53,7 @@ const char LAST_PLATFORM_KEY[] = "Core/NewDialog/LastPlatform";
const char ALLOW_ALL_TEMPLATES[] = "Core/NewDialog/AllowAllTemplates";
const char SHOW_PLATOFORM_FILTER[] = "Core/NewDialog/ShowPlatformFilter";
const char BLACKLISTED_CATEGORIES_KEY[] = "Core/NewDialog/BlacklistedCategories";
+const char ALTERNATIVE_WIZARD_STYLE[] = "Core/NewDialog/AlternativeWizardStyle";
using namespace Core;
using namespace Core::Internal;
@@ -205,6 +206,21 @@ NewDialog::NewDialog(QWidget *parent) :
m_ui->templatesView->setModel(m_filterProxyModel);
m_ui->templatesView->setIconSize(QSize(ICON_SIZE, ICON_SIZE));
+ const bool alternativeWizardStyle = ICore::settings()->value(ALTERNATIVE_WIZARD_STYLE, false).toBool();
+
+ if (alternativeWizardStyle) {
+ m_ui->templatesView->setGridSize(QSize(256, 128));
+ m_ui->templatesView->setIconSize(QSize(96, 96));
+ m_ui->templatesView->setSpacing(4);
+
+ m_ui->templatesView->setViewMode(QListView::IconMode);
+ m_ui->templatesView->setMovement(QListView::Static);
+ m_ui->templatesView->setResizeMode(QListView::Adjust);
+ m_ui->templatesView->setSelectionRectVisible(false);
+ m_ui->templatesView->setWrapping(true);
+ m_ui->templatesView->setWordWrap(true);
+ }
+
connect(m_ui->templateCategoryView->selectionModel(), &QItemSelectionModel::currentChanged,
this, &NewDialog::currentCategoryChanged);
diff --git a/src/plugins/coreplugin/editormanager/editorview.cpp b/src/plugins/coreplugin/editormanager/editorview.cpp
index e456421d2f..8c35d26527 100644
--- a/src/plugins/coreplugin/editormanager/editorview.cpp
+++ b/src/plugins/coreplugin/editormanager/editorview.cpp
@@ -270,7 +270,8 @@ void EditorView::updateEditorHistory(IEditor *editor, QList<EditLocation> &histo
for (int i = 0; i < history.size(); ++i) {
const EditLocation &item = history.at(i);
if (item.document == document
- || !DocumentModel::indexOfFilePath(FileName::fromString(item.fileName))) {
+ || (!item.document
+ && !DocumentModel::indexOfFilePath(FileName::fromString(item.fileName)))) {
history.removeAt(i--);
}
}
diff --git a/src/plugins/cppeditor/cpptypehierarchy.cpp b/src/plugins/cppeditor/cpptypehierarchy.cpp
index 0b3198d4c9..ad581602f0 100644
--- a/src/plugins/cppeditor/cpptypehierarchy.cpp
+++ b/src/plugins/cppeditor/cpptypehierarchy.cpp
@@ -154,7 +154,7 @@ void CppTypeHierarchyWidget::perform()
if (evaluator.identifiedCppElement()) {
const QSharedPointer<CppElement> &cppElement = evaluator.cppElement();
CppElement *element = cppElement.data();
- if (CppClass *cppClass = dynamic_cast<CppClass *>(element)) {
+ if (CppClass *cppClass = element->toCppClass()) {
m_inspectedClass->setText(cppClass->name);
m_inspectedClass->setLink(cppClass->link);
QStandardItem *bases = new QStandardItem(tr("Bases"));
diff --git a/src/plugins/cpptools/cppelementevaluator.cpp b/src/plugins/cpptools/cppelementevaluator.cpp
index 97ee54e89a..90fb21a34c 100644
--- a/src/plugins/cpptools/cppelementevaluator.cpp
+++ b/src/plugins/cpptools/cppelementevaluator.cpp
@@ -63,6 +63,11 @@ CppElement::CppElement() : helpCategory(TextEditor::HelpItem::Unknown)
CppElement::~CppElement()
{}
+CppClass *CppElement::toCppClass()
+{
+ return nullptr;
+}
+
class Unknown : public CppElement
{
public:
@@ -156,6 +161,11 @@ bool CppClass::operator==(const CppClass &other)
return this->declaration == other.declaration;
}
+CppClass *CppClass::toCppClass()
+{
+ return this;
+}
+
void CppClass::lookupBases(Symbol *declaration, const LookupContext &context)
{
typedef QPair<ClassOrNamespace *, CppClass *> Data;
diff --git a/src/plugins/cpptools/cppelementevaluator.h b/src/plugins/cpptools/cppelementevaluator.h
index 0755bd3004..0bececefaf 100644
--- a/src/plugins/cpptools/cppelementevaluator.h
+++ b/src/plugins/cpptools/cppelementevaluator.h
@@ -81,6 +81,8 @@ private:
QString m_diagnosis;
};
+class CppClass;
+
class CPPTOOLS_EXPORT CppElement
{
protected:
@@ -89,6 +91,8 @@ protected:
public:
virtual ~CppElement();
+ virtual CppClass *toCppClass();
+
TextEditor::HelpItem::Category helpCategory;
QStringList helpIdCandidates;
QString helpMark;
@@ -96,7 +100,7 @@ public:
QString tooltip;
};
-class CppDeclarableElement : public CppElement
+class CPPTOOLS_EXPORT CppDeclarableElement : public CppElement
{
public:
explicit CppDeclarableElement(CPlusPlus::Symbol *declaration);
@@ -109,7 +113,7 @@ public:
QIcon icon;
};
-class CppClass : public CppDeclarableElement
+class CPPTOOLS_EXPORT CppClass : public CppDeclarableElement
{
public:
CppClass();
@@ -117,6 +121,8 @@ public:
bool operator==(const CppClass &other);
+ CppClass *toCppClass() final;
+
void lookupBases(CPlusPlus::Symbol *declaration, const CPlusPlus::LookupContext &context);
void lookupDerived(CPlusPlus::Symbol *declaration, const CPlusPlus::Snapshot &snapshot);
diff --git a/src/plugins/cpptools/tidychecks.ui b/src/plugins/cpptools/tidychecks.ui
index 2b26492fad..a9190b894d 100644
--- a/src/plugins/cpptools/tidychecks.ui
+++ b/src/plugins/cpptools/tidychecks.ui
@@ -30,82 +30,82 @@
<widget class="QListWidget" name="checksList">
<item>
<property name="text">
- <string>android-*</string>
+ <string notr="true">android-*</string>
</property>
</item>
<item>
<property name="text">
- <string>boost-*</string>
+ <string notr="true">boost-*</string>
</property>
</item>
<item>
<property name="text">
- <string>bugprone-*</string>
+ <string notr="true">bugprone-*</string>
</property>
</item>
<item>
<property name="text">
- <string>cert-*</string>
+ <string notr="true">cert-*</string>
</property>
</item>
<item>
<property name="text">
- <string>cppcoreguidelines-*</string>
+ <string notr="true">cppcoreguidelines-*</string>
</property>
</item>
<item>
<property name="text">
- <string>clang-analyzer-*</string>
+ <string notr="true">clang-analyzer-*</string>
</property>
</item>
<item>
<property name="text">
- <string>clang-diagnostic-*</string>
+ <string notr="true">clang-diagnostic-*</string>
</property>
</item>
<item>
<property name="text">
- <string>google-*</string>
+ <string notr="true">google-*</string>
</property>
</item>
<item>
<property name="text">
- <string>hicpp-*</string>
+ <string notr="true">hicpp-*</string>
</property>
</item>
<item>
<property name="text">
- <string>llvm-*</string>
+ <string notr="true">llvm-*</string>
</property>
</item>
<item>
<property name="text">
- <string>misc-*</string>
+ <string notr="true">misc-*</string>
</property>
</item>
<item>
<property name="text">
- <string>modernize-*</string>
+ <string notr="true">modernize-*</string>
</property>
</item>
<item>
<property name="text">
- <string>mpi-*</string>
+ <string notr="true">mpi-*</string>
</property>
</item>
<item>
<property name="text">
- <string>objc-*</string>
+ <string notr="true">objc-*</string>
</property>
</item>
<item>
<property name="text">
- <string>performance-*</string>
+ <string notr="true">performance-*</string>
</property>
</item>
<item>
<property name="text">
- <string>readability-*</string>
+ <string notr="true">readability-*</string>
</property>
</item>
</widget>
diff --git a/src/plugins/debugger/debuggercore.h b/src/plugins/debugger/debuggercore.h
index 3f5f1e6a84..57f9476bf8 100644
--- a/src/plugins/debugger/debuggercore.h
+++ b/src/plugins/debugger/debuggercore.h
@@ -124,5 +124,7 @@ QAction *addCheckableAction(QMenu *menu, const QString &display, bool on, bool c
// Qt's various build paths for unpatched versions
QStringList qtBuildPaths();
+void addDebugInfoTask(unsigned id, const QString &cmd);
+
} // namespace Internal
} // namespace Debugger
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index de8f1ce0ed..2d3adbc7dc 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -94,6 +94,7 @@
#include <projectexplorer/buildmanager.h>
#include <projectexplorer/devicesupport/deviceprocessesdialog.h>
#include <projectexplorer/devicesupport/deviceprocesslist.h>
+#include <projectexplorer/itaskhandler.h>
#include <projectexplorer/project.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorericons.h>
@@ -571,6 +572,42 @@ static Kit *findUniversalCdbKit()
///////////////////////////////////////////////////////////////////////
//
+// Debuginfo Taskhandler
+//
+///////////////////////////////////////////////////////////////////////
+
+class DebugInfoTaskHandler : public ITaskHandler
+{
+public:
+ bool canHandle(const Task &task) const final
+ {
+ return m_debugInfoTasks.contains(task.taskId);
+ }
+
+ void handle(const Task &task) final
+ {
+ QString cmd = m_debugInfoTasks.value(task.taskId);
+ QProcess::startDetached(cmd);
+ }
+
+ void addTask(unsigned id, const QString &cmd)
+ {
+ m_debugInfoTasks[id] = cmd;
+ }
+
+ QAction *createAction(QObject *parent) const final
+ {
+ QAction *action = new QAction(DebuggerPlugin::tr("Install &Debug Information"), parent);
+ action->setToolTip(DebuggerPlugin::tr("Tries to install missing debug information."));
+ return action;
+ }
+
+private:
+ QHash<unsigned, QString> m_debugInfoTasks;
+};
+
+///////////////////////////////////////////////////////////////////////
+//
// DebuggerPluginPrivate
//
///////////////////////////////////////////////////////////////////////
@@ -1022,6 +1059,8 @@ public:
DebuggerItemManager m_debuggerItemManager;
QList<IOptionsPage *> m_optionPages;
IContext m_debugModeContext;
+
+ DebugInfoTaskHandler m_debugInfoTaskHandler;
};
DebuggerPluginPrivate::DebuggerPluginPrivate(DebuggerPlugin *plugin)
@@ -2947,6 +2986,11 @@ QMessageBox *showMessageBox(int icon, const QString &title,
return mb;
}
+void addDebugInfoTask(unsigned id, const QString &cmd)
+{
+ dd->m_debugInfoTaskHandler.addTask(id, cmd);
+}
+
bool isReverseDebuggingEnabled()
{
static bool enabled = qEnvironmentVariableIsSet("QTC_DEBUGGER_ENABLE_REVERSE");
diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index 992d4d1504..05075a3ff3 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -55,7 +55,6 @@
#include <coreplugin/messagebox.h>
#include <projectexplorer/devicesupport/deviceprocess.h>
-#include <projectexplorer/itaskhandler.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/taskhub.h>
@@ -133,52 +132,6 @@ static bool isMostlyHarmlessMessage(const QStringRef &msg)
///////////////////////////////////////////////////////////////////////
//
-// Debuginfo Taskhandler
-//
-///////////////////////////////////////////////////////////////////////
-
-class DebugInfoTask
-{
-public:
- QString command;
-};
-
-class DebugInfoTaskHandler : public ITaskHandler
-{
-public:
- explicit DebugInfoTaskHandler(GdbEngine *engine)
- : m_engine(engine)
- {}
-
- bool canHandle(const Task &task) const override
- {
- return m_debugInfoTasks.contains(task.taskId);
- }
-
- void handle(const Task &task) override
- {
- m_engine->requestDebugInformation(m_debugInfoTasks.value(task.taskId));
- }
-
- void addTask(unsigned id, const DebugInfoTask &task)
- {
- m_debugInfoTasks[id] = task;
- }
-
- QAction *createAction(QObject *parent) const override
- {
- QAction *action = new QAction(DebuggerPlugin::tr("Install &Debug Information"), parent);
- action->setToolTip(DebuggerPlugin::tr("Tries to install missing debug information."));
- return action;
- }
-
-private:
- GdbEngine *m_engine;
- QHash<unsigned, DebugInfoTask> m_debugInfoTasks;
-};
-
-///////////////////////////////////////////////////////////////////////
-//
// GdbEngine
//
///////////////////////////////////////////////////////////////////////
@@ -190,9 +143,6 @@ GdbEngine::GdbEngine()
m_gdbOutputCodec = QTextCodec::codecForLocale();
m_inferiorOutputCodec = QTextCodec::codecForLocale();
- m_debugInfoTaskHandler = new DebugInfoTaskHandler(this);
- //ExtensionSystem::PluginManager::addObject(m_debugInfoTaskHandler);
-
m_commandTimer.setSingleShot(true);
connect(&m_commandTimer, &QTimer::timeout,
this, &GdbEngine::commandTimeout);
@@ -222,10 +172,6 @@ GdbEngine::GdbEngine()
GdbEngine::~GdbEngine()
{
- //ExtensionSystem::PluginManager::removeObject(m_debugInfoTaskHandler);
- delete m_debugInfoTaskHandler;
- m_debugInfoTaskHandler = 0;
-
// Prevent sending error messages afterwards.
disconnect();
}
@@ -434,10 +380,7 @@ void GdbEngine::handleResponse(const QString &buff)
FileName(), 0, Debugger::Constants::TASK_CATEGORY_DEBUGGER_DEBUGINFO);
TaskHub::addTask(task);
-
- DebugInfoTask dit;
- dit.command = cmd;
- m_debugInfoTaskHandler->addTask(task.taskId, dit);
+ Internal::addDebugInfoTask(task.taskId, cmd);
}
}
@@ -4184,11 +4127,6 @@ void GdbEngine::scheduleTestResponse(int testCase, const QString &response)
m_scheduledTestResponses[token] = response;
}
-void GdbEngine::requestDebugInformation(const DebugInfoTask &task)
-{
- QProcess::startDetached(task.command);
-}
-
QString GdbEngine::msgGdbStopFailed(const QString &why)
{
return tr("The gdb process could not be stopped:\n%1").arg(why);
diff --git a/src/plugins/debugger/gdb/gdbengine.h b/src/plugins/debugger/gdb/gdbengine.h
index c1901ad400..d9c0c3cc72 100644
--- a/src/plugins/debugger/gdb/gdbengine.h
+++ b/src/plugins/debugger/gdb/gdbengine.h
@@ -382,11 +382,6 @@ private: ////////// General Interface //////////
QHash<int, QString> m_scheduledTestResponses;
QSet<int> m_testCases;
- // Debug information
- friend class DebugInfoTaskHandler;
- void requestDebugInformation(const DebugInfoTask &task);
- DebugInfoTaskHandler *m_debugInfoTaskHandler;
-
bool m_systemDumpersLoaded = false;
static QString msgGdbStopFailed(const QString &why);
diff --git a/src/plugins/git/changeselectiondialog.cpp b/src/plugins/git/changeselectiondialog.cpp
index ec7e724f16..247427eed5 100644
--- a/src/plugins/git/changeselectiondialog.cpp
+++ b/src/plugins/git/changeselectiondialog.cpp
@@ -251,7 +251,7 @@ void ChangeSelectionDialog::recalculateDetails()
connect(m_process, static_cast<void (QProcess::*)(int)>(&QProcess::finished),
this, &ChangeSelectionDialog::setDetails);
- m_process->start(m_gitExecutable.toString(), {"show", "--stat=80", ref});
+ m_process->start(m_gitExecutable.toString(), {"show", "--decorate", "--stat=80", ref});
m_process->closeWriteChannel();
if (!m_process->waitForStarted())
m_ui->detailsText->setPlainText(tr("Error: Could not start Git."));
diff --git a/src/plugins/help/textbrowserhelpviewer.cpp b/src/plugins/help/textbrowserhelpviewer.cpp
index 2dd128fd32..34e821e524 100644
--- a/src/plugins/help/textbrowserhelpviewer.cpp
+++ b/src/plugins/help/textbrowserhelpviewer.cpp
@@ -432,7 +432,7 @@ void TextBrowserHelpWidget::mouseReleaseEvent(QMouseEvent *e)
bool controlPressed = e->modifiers() & Qt::ControlModifier;
const QString link = linkAt(e->pos());
- if ((controlPressed || e->button() == Qt::MidButton) && link.isEmpty()) {
+ if ((controlPressed || e->button() == Qt::MidButton) && !link.isEmpty()) {
emit m_parent->newPageRequested(QUrl(link));
return;
}
diff --git a/src/plugins/ios/iosrunfactories.cpp b/src/plugins/ios/iosrunfactories.cpp
index 1b73477dda..e626e8ac96 100644
--- a/src/plugins/ios/iosrunfactories.cpp
+++ b/src/plugins/ios/iosrunfactories.cpp
@@ -53,7 +53,8 @@ IosRunConfigurationFactory::IosRunConfigurationFactory()
QList<RunConfigurationCreationInfo>
IosRunConfigurationFactory::availableCreators(Target *parent) const
{
- auto project = static_cast<QmakeProject *>(parent->project());
+ auto project = qobject_cast<QmakeProject *>(parent->project());
+ QTC_ASSERT(project, return {});
return project->runConfigurationCreators(this, {ProjectType::ApplicationTemplate,
ProjectType::SharedLibraryTemplate});
}
diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp
index 0650827f43..13714864ae 100644
--- a/src/plugins/projectexplorer/gcctoolchain.cpp
+++ b/src/plugins/projectexplorer/gcctoolchain.cpp
@@ -1185,7 +1185,7 @@ void GccToolChainConfigWidget::handleCompilerCommandChange()
{
bool haveCompiler = false;
Abi currentAbi = m_abiWidget->currentAbi();
- bool customAbi = m_abiWidget->isCustomAbi();
+ bool customAbi = m_abiWidget->isCustomAbi() && m_abiWidget->isEnabled();
FileName path = m_compilerCommand->fileName();
QList<Abi> abiList;
diff --git a/src/plugins/projectexplorer/projecttreewidget.cpp b/src/plugins/projectexplorer/projecttreewidget.cpp
index 9942e4aef9..01288a22e0 100644
--- a/src/plugins/projectexplorer/projecttreewidget.cpp
+++ b/src/plugins/projectexplorer/projecttreewidget.cpp
@@ -55,6 +55,7 @@
#include <QToolButton>
#include <QPainter>
#include <QAction>
+#include <QLineEdit>
#include <QMenu>
#include <memory>
@@ -415,8 +416,23 @@ void ProjectTreeWidget::collapseAll()
void ProjectTreeWidget::editCurrentItem()
{
m_delayedRename.clear();
- if (m_view->selectionModel()->currentIndex().isValid())
- m_view->edit(m_view->selectionModel()->currentIndex());
+ const QModelIndex currentIndex = m_view->selectionModel()->currentIndex();
+ if (!currentIndex.isValid())
+ return;
+
+ m_view->edit(currentIndex);
+ // Select complete file basename for renaming
+ const Node *node = m_model->nodeForIndex(currentIndex);
+ if (!node || node->nodeType() != NodeType::File)
+ return;
+ QLineEdit *editor = qobject_cast<QLineEdit*>(m_view->indexWidget(currentIndex));
+ if (!editor)
+ return;
+
+ const QString text = editor->text();
+ const int dotIndex = text.lastIndexOf(QLatin1Char('.'));
+ if (dotIndex > 0)
+ editor->setSelection(0, dotIndex);
}
void ProjectTreeWidget::renamed(const FileName &oldPath, const FileName &newPath)
diff --git a/src/plugins/projectexplorer/taskwindow.cpp b/src/plugins/projectexplorer/taskwindow.cpp
index 4882e604fb..215ec1eaee 100644
--- a/src/plugins/projectexplorer/taskwindow.cpp
+++ b/src/plugins/projectexplorer/taskwindow.cpp
@@ -210,11 +210,18 @@ void TaskView::resizeEvent(QResizeEvent *e)
class TaskWindowPrivate
{
public:
+ ITaskHandler *handler(const QAction *action)
+ {
+ ITaskHandler *handler = m_actionToHandlerMap.value(action, nullptr);
+ return g_taskHandlers.contains(handler) ? handler : nullptr;
+ }
+
Internal::TaskModel *m_model;
Internal::TaskFilterModel *m_filter;
Internal::TaskView *m_listview;
Internal::TaskWindowContext *m_taskWindowContext;
QMenu *m_contextMenu;
+ QMap<const QAction *, ITaskHandler *> m_actionToHandlerMap;
ITaskHandler *m_defaultHandler = nullptr;
QToolButton *m_filterWarningsButton;
QToolButton *m_categoriesButton;
@@ -318,14 +325,6 @@ TaskWindow::~TaskWindow()
delete d;
}
-static ITaskHandler *handler(QAction *action)
-{
- QVariant prop = action->property("ITaskHandler");
- ITaskHandler *handler = qobject_cast<ITaskHandler *>(prop.value<QObject *>());
- QTC_CHECK(handler);
- return handler;
-}
-
void TaskWindow::delayedInitialization()
{
static bool alreadyDone = false;
@@ -340,7 +339,7 @@ void TaskWindow::delayedInitialization()
QAction *action = h->createAction(this);
QTC_ASSERT(action, continue);
- action->setProperty("ITaskHandler", qVariantFromValue(qobject_cast<QObject*>(h)));
+ d->m_actionToHandlerMap.insert(action, h);
connect(action, &QAction::triggered, this, &TaskWindow::actionTriggered);
d->m_actions << action;
@@ -395,7 +394,7 @@ void TaskWindow::currentChanged(const QModelIndex &index)
{
const Task task = index.isValid() ? d->m_filter->task(index) : Task();
foreach (QAction *action, d->m_actions) {
- ITaskHandler *h = handler(action);
+ ITaskHandler *h = d->handler(action);
action->setEnabled((task.isNull() || !h) ? false : h->canHandle(task));
}
}
@@ -511,7 +510,7 @@ void TaskWindow::actionTriggered()
auto action = qobject_cast<QAction *>(sender());
if (!action || !action->isEnabled())
return;
- ITaskHandler *h = handler(action);
+ ITaskHandler *h = d->handler(action);
if (!h)
return;
diff --git a/src/plugins/qbsprojectmanager/qbsbuildconfiguration.cpp b/src/plugins/qbsprojectmanager/qbsbuildconfiguration.cpp
index 0df62fc51b..05c4d8cf84 100644
--- a/src/plugins/qbsprojectmanager/qbsbuildconfiguration.cpp
+++ b/src/plugins/qbsprojectmanager/qbsbuildconfiguration.cpp
@@ -372,7 +372,7 @@ QString QbsBuildConfiguration::equivalentCommandLine(const BuildStep *buildStep)
const QString profileName = QbsManager::profileForKit(buildStep->target()->kit());
const QString buildVariant = qbsConfiguration()
.value(QLatin1String(Constants::QBS_CONFIG_VARIANT_KEY)).toString();
- Utils::QtcProcess::addArg(&commandLine, configurationName());
+ Utils::QtcProcess::addArg(&commandLine, QLatin1String("config:") + configurationName());
Utils::QtcProcess::addArg(&commandLine, QLatin1String(Constants::QBS_CONFIG_VARIANT_KEY)
+ QLatin1Char(':') + buildVariant);
const Utils::FileName installRoot = stepProxy.installRoot();
diff --git a/src/plugins/qbsprojectmanager/qbsbuildstep.cpp b/src/plugins/qbsprojectmanager/qbsbuildstep.cpp
index 7b2e024f3e..ffe80df75f 100644
--- a/src/plugins/qbsprojectmanager/qbsbuildstep.cpp
+++ b/src/plugins/qbsprojectmanager/qbsbuildstep.cpp
@@ -634,7 +634,7 @@ void QbsBuildStepConfigWidget::updateState()
}
if (m_step->isQmlDebuggingEnabled())
- command.append(Constants::QBS_CONFIG_QUICK_DEBUG_KEY).append(":true");
+ command.append(' ').append(Constants::QBS_CONFIG_QUICK_DEBUG_KEY).append(":true");
m_ui->commandLineTextEdit->setPlainText(command);
QString summary = tr("<b>Qbs:</b> %1").arg(command);
diff --git a/src/plugins/qmakeandroidsupport/qmakeandroidrunfactories.cpp b/src/plugins/qmakeandroidsupport/qmakeandroidrunfactories.cpp
index c319e2501c..5fa073c9c4 100644
--- a/src/plugins/qmakeandroidsupport/qmakeandroidrunfactories.cpp
+++ b/src/plugins/qmakeandroidsupport/qmakeandroidrunfactories.cpp
@@ -57,7 +57,8 @@ QmakeAndroidRunConfigurationFactory::QmakeAndroidRunConfigurationFactory()
QList<RunConfigurationCreationInfo> QmakeAndroidRunConfigurationFactory::availableCreators(Target *parent) const
{
- auto project = static_cast<QmakeProject *>(parent->project());
+ auto project = qobject_cast<QmakeProject *>(parent->project());
+ QTC_ASSERT(project, return {});
return project->runConfigurationCreators(this, {ProjectType::ApplicationTemplate, ProjectType::SharedLibraryTemplate});
}
diff --git a/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp b/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp
index c26d785e18..d2c54dc65d 100644
--- a/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp
+++ b/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp
@@ -437,14 +437,16 @@ DesktopQmakeRunConfigurationFactory::DesktopQmakeRunConfigurationFactory()
bool DesktopQmakeRunConfigurationFactory::canCreateHelper(Target *parent, const QString &buildTarget) const
{
- QmakeProject *project = static_cast<QmakeProject *>(parent->project());
+ QmakeProject *project = qobject_cast<QmakeProject *>(parent->project());
+ QTC_ASSERT(project, return {});
return project->hasApplicationProFile(Utils::FileName::fromString(buildTarget));
}
QList<RunConfigurationCreationInfo>
DesktopQmakeRunConfigurationFactory::availableCreators(Target *parent) const
{
- QmakeProject *project = static_cast<QmakeProject *>(parent->project());
+ QmakeProject *project = qobject_cast<QmakeProject *>(parent->project());
+ QTC_ASSERT(project, return {});
return project->runConfigurationCreators(this);
}
diff --git a/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp b/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp
index db4b726f38..58d4c2608d 100644
--- a/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp
+++ b/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp
@@ -614,6 +614,9 @@ bool raiseAvailable(const SelectionContext &selectionState)
if (modelNode.isRootNode())
return false;
+ if (!modelNode.hasParentProperty())
+ return false;
+
if (!modelNode.parentProperty().isNodeListProperty())
return false;
diff --git a/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp b/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp
index a594a43b5a..41429bbb16 100644
--- a/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp
+++ b/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp
@@ -874,7 +874,7 @@ PropertyName getIndexPropertyName(const ModelNode &modelNode)
return PropertyName();
}
-void static setIndexProperty(const AbstractProperty &property, const QVariant &value)
+static void setIndexProperty(const AbstractProperty &property, const QVariant &value)
{
if (!property.exists() || property.isVariantProperty()) {
/* Using QmlObjectNode ensures we take states into account. */
diff --git a/src/plugins/qmldesigner/components/formeditor/contentnoteditableindicator.cpp b/src/plugins/qmldesigner/components/formeditor/contentnoteditableindicator.cpp
index 20ee2531cc..579a9d792f 100644
--- a/src/plugins/qmldesigner/components/formeditor/contentnoteditableindicator.cpp
+++ b/src/plugins/qmldesigner/components/formeditor/contentnoteditableindicator.cpp
@@ -88,7 +88,8 @@ void ContentNotEditableIndicator::updateItems(const QList<FormEditorItem *> &ite
void ContentNotEditableIndicator::addAddiationEntries(const QList<FormEditorItem *> &itemList)
{
foreach (FormEditorItem *formEditorItem, itemList) {
- if (formEditorItem->qmlItemNode().modelNode().metaInfo().isSubclassOf("QtQuick.Loader")) {
+ const ModelNode modelNode = formEditorItem->qmlItemNode().modelNode();
+ if (modelNode.metaInfo().isValid() && modelNode.metaInfo().isSubclassOf("QtQuick.Loader")) {
if (!m_entryList.contains(EntryPair(formEditorItem, 0))) {
QGraphicsRectItem *indicatorShape = new QGraphicsRectItem(m_layerItem);
diff --git a/src/plugins/qmldesigner/components/integration/designdocumentview.cpp b/src/plugins/qmldesigner/components/integration/designdocumentview.cpp
index c30a392cef..bc8930edb6 100644
--- a/src/plugins/qmldesigner/components/integration/designdocumentview.cpp
+++ b/src/plugins/qmldesigner/components/integration/designdocumentview.cpp
@@ -130,8 +130,9 @@ QString DesignDocumentView::toText() const
ModelNode rewriterNode(rewriterView->rootModelNode());
+ rewriterView->writeAuxiliaryData();
+ return rewriterView->extractText({rewriterNode}).value(rewriterNode) + rewriterView->getRawAuxiliaryData();
//get the text of the root item without imports
- return rewriterView->extractText({rewriterNode}).value(rewriterNode);
}
void DesignDocumentView::fromText(QString text)
@@ -151,6 +152,8 @@ void DesignDocumentView::fromText(QString text)
rewriterView->setTextModifier(&modifier);
inputModel->setRewriterView(rewriterView.data());
+ rewriterView->restoreAuxiliaryData();
+
if (rewriterView->errors().isEmpty() && rewriterView->rootModelNode().isValid()) {
ModelMerger merger(this);
merger.replaceModel(rewriterView->rootModelNode());
diff --git a/src/plugins/qmldesigner/designercore/include/nodehints.h b/src/plugins/qmldesigner/designercore/include/nodehints.h
index 3fbb89c72c..982c3a80b0 100644
--- a/src/plugins/qmldesigner/designercore/include/nodehints.h
+++ b/src/plugins/qmldesigner/designercore/include/nodehints.h
@@ -64,6 +64,7 @@ public:
bool isStackedContainer() const;
bool canBeReparentedTo(const ModelNode &potenialParent);
QString indexPropertyForStackedContainer() const;
+ bool takesOverRenderingOfChildren() const;
QHash<QString, QString> hints() const;
static NodeHints fromModelNode(const ModelNode &modelNode);
diff --git a/src/plugins/qmldesigner/designercore/include/rewriterview.h b/src/plugins/qmldesigner/designercore/include/rewriterview.h
index 4d4cfee8e6..3c73ec1fab 100644
--- a/src/plugins/qmldesigner/designercore/include/rewriterview.h
+++ b/src/plugins/qmldesigner/designercore/include/rewriterview.h
@@ -163,6 +163,12 @@ public:
void qmlTextChanged();
void delayedSetup();
+ void writeAuxiliaryData();
+ void restoreAuxiliaryData();
+
+ QString getRawAuxiliaryData() const;
+ QString auxiliaryDataAsQML() const;
+
protected: // functions
void importAdded(const Import &import);
void importRemoved(const Import &import);
diff --git a/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp b/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp
index 823f966d8c..614e61cc54 100644
--- a/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp
+++ b/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp
@@ -34,6 +34,7 @@
#include <model.h>
#include <modelnode.h>
#include <metainfo.h>
+#include <nodehints.h>
#include <rewriterview.h>
#include "abstractproperty.h"
@@ -125,7 +126,7 @@ NodeInstanceView::~NodeInstanceView()
//\{
-bool isSkippedRootNode(const ModelNode &node)
+bool static isSkippedRootNode(const ModelNode &node)
{
static const PropertyNameList skipList({"Qt.ListModel", "QtQuick.ListModel", "Qt.ListModel", "QtQuick.ListModel"});
@@ -136,7 +137,7 @@ bool isSkippedRootNode(const ModelNode &node)
}
-bool isSkippedNode(const ModelNode &node)
+bool static isSkippedNode(const ModelNode &node)
{
static const PropertyNameList skipList({"QtQuick.XmlRole", "Qt.XmlRole", "QtQuick.ListElement", "Qt.ListElement"});
@@ -146,6 +147,22 @@ bool isSkippedNode(const ModelNode &node)
return false;
}
+bool static parentTakesOverRendering(const ModelNode &modelNode)
+{
+ if (!modelNode.isValid())
+ return false;
+
+ ModelNode currentNode = modelNode;
+
+ while (currentNode.hasParentProperty()) {
+ currentNode = currentNode.parentProperty().parentModelNode();
+ if (NodeHints::fromModelNode(currentNode).takesOverRenderingOfChildren())
+ return true;
+ }
+
+ return false;
+}
+
/*!
Notifies the view that it was attached to \a model. For every model node in
the model, a NodeInstance will be created.
@@ -817,6 +834,11 @@ CreateSceneCommand NodeInstanceView::createCreateSceneCommand()
if (instance.modelNode().metaInfo().isSubclassOf("QtQuick.Item"))
nodeMetaType = InstanceContainer::ItemMetaType;
+ InstanceContainer::NodeFlags nodeFlags;
+
+ if (parentTakesOverRendering(instance.modelNode()))
+ nodeFlags |= InstanceContainer::ParentTakesOverRendering;
+
InstanceContainer container(instance.instanceId(),
instance.modelNode().type(),
instance.modelNode().majorVersion(),
@@ -824,8 +846,8 @@ CreateSceneCommand NodeInstanceView::createCreateSceneCommand()
instance.modelNode().metaInfo().componentFileName(),
instance.modelNode().nodeSource(),
nodeSourceType,
- nodeMetaType
- );
+ nodeMetaType,
+ nodeFlags);
instanceContainerList.append(container);
}
@@ -958,8 +980,20 @@ CreateInstancesCommand NodeInstanceView::createCreateInstancesCommand(const QLis
if (instance.modelNode().metaInfo().isSubclassOf("QtQuick.Item"))
nodeMetaType = InstanceContainer::ItemMetaType;
- InstanceContainer container(instance.instanceId(), instance.modelNode().type(), instance.modelNode().majorVersion(), instance.modelNode().minorVersion(),
- instance.modelNode().metaInfo().componentFileName(), instance.modelNode().nodeSource(), nodeSourceType, nodeMetaType);
+ InstanceContainer::NodeFlags nodeFlags;
+
+ if (parentTakesOverRendering(instance.modelNode()))
+ nodeFlags |= InstanceContainer::ParentTakesOverRendering;
+
+ InstanceContainer container(instance.instanceId(),
+ instance.modelNode().type(),
+ instance.modelNode().majorVersion(),
+ instance.modelNode().minorVersion(),
+ instance.modelNode().metaInfo().componentFileName(),
+ instance.modelNode().nodeSource(),
+ nodeSourceType,
+ nodeMetaType,
+ nodeFlags);
containerList.append(container);
}
diff --git a/src/plugins/qmldesigner/designercore/metainfo/itemlibraryinfo.cpp b/src/plugins/qmldesigner/designercore/metainfo/itemlibraryinfo.cpp
index 30fe3b4cc2..4183af4b1f 100644
--- a/src/plugins/qmldesigner/designercore/metainfo/itemlibraryinfo.cpp
+++ b/src/plugins/qmldesigner/designercore/metainfo/itemlibraryinfo.cpp
@@ -350,6 +350,7 @@ QStringList ItemLibraryInfo::showTagsForImports() const
auto list = m_showTagsForImports;
if (m_baseInfo)
list.append(m_baseInfo->m_showTagsForImports);
+ list.removeDuplicates();
return list;
}
diff --git a/src/plugins/qmldesigner/designercore/metainfo/nodehints.cpp b/src/plugins/qmldesigner/designercore/metainfo/nodehints.cpp
index 1a38b0a631..28d7c0a205 100644
--- a/src/plugins/qmldesigner/designercore/metainfo/nodehints.cpp
+++ b/src/plugins/qmldesigner/designercore/metainfo/nodehints.cpp
@@ -193,6 +193,14 @@ QString NodeHints::indexPropertyForStackedContainer() const
return Internal::evaluateExpression(expression, modelNode(), ModelNode()).toString();
}
+bool NodeHints::takesOverRenderingOfChildren() const
+{
+ if (!isValid())
+ return false;
+
+ return evaluateBooleanExpression("takesOverRenderingOfChildren", false);
+}
+
QHash<QString, QString> NodeHints::hints() const
{
return m_hints;
@@ -277,7 +285,7 @@ bool JSObject::potentialParentIsRoot() const
bool JSObject::potentialChildIsRoot() const
{
- return m_otherNode.isValid() && m_otherNode.isRootNode();
+ return m_otherNode.isValid() && m_otherNode.isRootNode();
}
bool JSObject::isSubclassOf(const QString &typeName)
@@ -303,7 +311,7 @@ bool JSObject::rootItemIsSubclassOf(const QString &typeName)
bool JSObject::currentParentIsSubclassOf(const QString &typeName)
{
if (m_modelNode.hasParentProperty()
- && m_modelNode.parentProperty().isValid()) {
+ && m_modelNode.parentProperty().isValid()) {
NodeMetaInfo metaInfo = m_modelNode.parentProperty().parentModelNode().metaInfo();
if (metaInfo.isValid())
return metaInfo.isSubclassOf(typeName.toUtf8());
diff --git a/src/plugins/qmldesigner/designercore/model/modelmerger.cpp b/src/plugins/qmldesigner/designercore/model/modelmerger.cpp
index a156932237..161cf1f9f5 100644
--- a/src/plugins/qmldesigner/designercore/model/modelmerger.cpp
+++ b/src/plugins/qmldesigner/designercore/model/modelmerger.cpp
@@ -60,6 +60,13 @@ static void syncVariantProperties(ModelNode &outputNode, const ModelNode &inputN
}
}
+static void syncAuxiliaryProperties(ModelNode &outputNode, const ModelNode &inputNode)
+{
+ auto tmp = inputNode.auxiliaryData();
+ for (auto iter = tmp.begin(); iter != tmp.end(); ++iter)
+ outputNode.setAuxiliaryData(iter.key(), iter.value());
+}
+
static void syncBindingProperties(ModelNode &outputNode, const ModelNode &inputNode, const QHash<QString, QString> &idRenamingHash)
{
foreach (const BindingProperty &bindingProperty, inputNode.bindingProperties()) {
@@ -138,6 +145,7 @@ static ModelNode createNodeFromNode(const ModelNode &modelNode,const QHash<QStri
NodeMetaInfo nodeMetaInfo = view->model()->metaInfo(modelNode.type());
ModelNode newNode(view->createModelNode(modelNode.type(), nodeMetaInfo.majorVersion(), nodeMetaInfo.minorVersion(),
propertyList, variantPropertyList, modelNode.nodeSource(), modelNode.nodeSourceType()));
+ syncAuxiliaryProperties(newNode, modelNode);
syncBindingProperties(newNode, modelNode, idRenamingHash);
syncId(newNode, modelNode, idRenamingHash);
syncNodeProperties(newNode, modelNode, idRenamingHash, view);
@@ -165,7 +173,6 @@ ModelNode ModelMerger::insertModel(const ModelNode &modelNode)
return newNode;
}
-
void ModelMerger::replaceModel(const ModelNode &modelNode)
{
view()->model()->changeImports(modelNode.model()->imports(), {});
@@ -182,6 +189,7 @@ void ModelMerger::replaceModel(const ModelNode &modelNode)
QHash<QString, QString> idRenamingHash;
setupIdRenamingHash(modelNode, idRenamingHash, view());
+ syncAuxiliaryProperties(rootNode, modelNode);
syncVariantProperties(rootNode, modelNode);
syncBindingProperties(rootNode, modelNode, idRenamingHash);
syncId(rootNode, modelNode, idRenamingHash);
diff --git a/src/plugins/qmldesigner/designercore/model/rewriterview.cpp b/src/plugins/qmldesigner/designercore/model/rewriterview.cpp
index c4cb5bf710..6bd5522d63 100644
--- a/src/plugins/qmldesigner/designercore/model/rewriterview.cpp
+++ b/src/plugins/qmldesigner/designercore/model/rewriterview.cpp
@@ -42,11 +42,17 @@
#include <qmljs/parser/qmljsengine_p.h>
#include <qmljs/qmljsmodelmanagerinterface.h>
+#include <qmljs/qmljssimplereader.h>
+
+#include <utils/changeset.h>
+#include <utils/qtcassert.h>
using namespace QmlDesigner::Internal;
namespace QmlDesigner {
+const char annotationsEscapeSequence[] = "##^##";
+
RewriterView::RewriterView(DifferenceHandling differenceHandling, QObject *parent):
AbstractView(parent),
m_differenceHandling(differenceHandling),
@@ -442,6 +448,56 @@ void RewriterView::notifyErrorsAndWarnings(const QList<DocumentMessage> &errors)
emitDocumentMessage(errors, m_warnings);
}
+QString RewriterView::auxiliaryDataAsQML() const
+{
+ bool hasAuxData = false;
+
+ QString str = "Designer {\n ";
+
+ int columnCount = 0;
+ for (const auto node : allModelNodes()) {
+ QHash<PropertyName, QVariant> data = node.auxiliaryData();
+ if (!data.isEmpty()) {
+ hasAuxData = true;
+ if (columnCount > 80) {
+ str += "\n";
+ columnCount = 0;
+ }
+ const int startLen = str.length();
+ str += "D{";
+ str += "i:";
+ str += QString::number(node.internalId());
+ str += ";";
+
+ for (auto i = data.begin(); i != data.end(); ++i) {
+ const QVariant value = i.value();
+ QString strValue = value.toString();
+ if (static_cast<QMetaType::Type>(value.type()) == QMetaType::QString)
+ strValue = "\"" + strValue + "\"";
+
+ if (!strValue.isEmpty()) {
+ str += QString::fromUtf8(i.key()) + ":";
+ str += strValue;
+ str += ";";
+ }
+ }
+
+ if (str.endsWith(';'))
+ str.chop(1);
+
+ str += "}";
+ columnCount += str.length() - startLen;
+ }
+ }
+
+ str += "\n}\n";
+
+ if (hasAuxData)
+ return str;
+
+ return {};
+}
+
Internal::ModelNodePositionStorage *RewriterView::positionStorage() const
{
return m_positionStorage.data();
@@ -820,4 +876,108 @@ void RewriterView::delayedSetup()
m_textToModelMerger->delayedSetup();
}
+static QString annotationsEnd()
+{
+ const static QString end = QString(" %1*/\n").arg(annotationsEscapeSequence);
+ return end;
+}
+
+static QString annotationsStart()
+{
+ const static QString start = QString("\n/*%1 ").arg(annotationsEscapeSequence);
+ return start;
+}
+
+QString RewriterView::getRawAuxiliaryData() const
+{
+ QTC_ASSERT(m_textModifier, return {});
+
+ const QString oldText = m_textModifier->text();
+
+ QString newText = oldText;
+
+ int startIndex = newText.indexOf(annotationsStart());
+ int endIndex = newText.indexOf(annotationsEnd());
+
+ if (startIndex > 0 && endIndex > 0)
+ return newText.mid(startIndex, endIndex - startIndex + annotationsEnd().length());
+
+ return {};
+}
+
+void RewriterView::writeAuxiliaryData()
+{
+ QTC_ASSERT(m_textModifier, return);
+
+ const QString oldText = m_textModifier->text();
+
+ QString newText = oldText;
+
+ int startIndex = newText.indexOf(annotationsStart());
+ int endIndex = newText.indexOf(annotationsEnd());
+
+ if (startIndex > 0 && endIndex > 0)
+ newText.remove(startIndex, endIndex - startIndex + annotationsEnd().length());
+
+ QString auxData = auxiliaryDataAsQML();
+
+ if (!auxData.isEmpty()) {
+ auxData.prepend(annotationsStart());
+ auxData.append(annotationsEnd());
+ newText.append(auxData);
+
+ QTextCursor tc(m_textModifier->textDocument());
+ Utils::ChangeSet changeSet;
+ changeSet.replace(0, oldText.length(), newText);
+ changeSet.apply(&tc);
+ }
+}
+
+static void checkNode(QmlJS::SimpleReaderNode::Ptr node, RewriterView *view);
+
+static void checkChildNodes(QmlJS::SimpleReaderNode::Ptr node, RewriterView *view)
+{
+ for (auto child : node->children())
+ checkNode(child, view);
+}
+static void checkNode(QmlJS::SimpleReaderNode::Ptr node, RewriterView *view)
+{
+ if (!node)
+ return;
+
+ if (!node->propertyNames().contains("i"))
+ return;
+
+ const int internalId = node->property("i").toInt();
+ const ModelNode modelNode = view->modelNodeForInternalId(internalId);
+ if (!modelNode.isValid())
+ return;
+
+ auto properties = node->properties();
+
+ for (auto i = properties.begin(); i != properties.end(); ++i) {
+ if (i.key() != "i")
+ modelNode.setAuxiliaryData(i.key().toUtf8(), i.value());
+ }
+
+ checkChildNodes(node, view);
+}
+
+void RewriterView::restoreAuxiliaryData()
+{
+ QTC_ASSERT(m_textModifier, return);
+
+ const QString text = m_textModifier->text();
+
+ int startIndex = text.indexOf(annotationsStart());
+ int endIndex = text.indexOf(annotationsEnd());
+
+ if (startIndex > 0 && endIndex > 0) {
+ const QString auxSource = text.mid(startIndex + annotationsStart().length(),
+ endIndex - startIndex - annotationsStart().length());
+ QmlJS::SimpleReader reader;
+ checkChildNodes(reader.readFromSource(auxSource), this);
+ }
+}
+
} //QmlDesigner
diff --git a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp
index 3f4e60fb32..013854c698 100644
--- a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp
+++ b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp
@@ -94,7 +94,7 @@ static inline QStringList globalQtEnums()
static inline QStringList knownEnumScopes()
{
static const QStringList list = {
- "TextInput", "TextEdit", "Material", "Universal", "Font"
+ "TextInput", "TextEdit", "Material", "Universal", "Font", "Shape", "ShapePath"
};
return list;
}
diff --git a/src/plugins/qmlprojectmanager/qmlproject.cpp b/src/plugins/qmlprojectmanager/qmlproject.cpp
index c110faf91c..11334a79e1 100644
--- a/src/plugins/qmlprojectmanager/qmlproject.cpp
+++ b/src/plugins/qmlprojectmanager/qmlproject.cpp
@@ -279,18 +279,49 @@ void QmlProject::refreshTargetDirectory()
bool QmlProject::supportsKit(const Kit *k, QString *errorMessage) const
{
+ if (!k->isValid()) {
+ if (errorMessage)
+ *errorMessage = tr("Kit is not valid.");
+ return false;
+ }
+
+ IDevice::ConstPtr dev = DeviceKitInformation::device(k);
+ if (dev.isNull()) {
+ if (errorMessage)
+ *errorMessage = tr("Kit has no device.");
+ return false;
+ }
+
QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(k);
if (!version) {
if (errorMessage)
*errorMessage = tr("No Qt version set in kit.");
return false;
}
-
if (version->qtVersion() < QtSupport::QtVersionNumber(5, 0, 0)) {
if (errorMessage)
*errorMessage = tr("Qt version is too old.");
return false;
}
+
+ if (dev->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE) {
+ if (version->type() == QtSupport::Constants::DESKTOPQT) {
+ if (static_cast<QtSupport::DesktopQtVersion *>(version)->qmlsceneCommand().isEmpty()) {
+ if (errorMessage)
+ *errorMessage = tr("Qt version has no qmlscene command.");
+ return false;
+ }
+ } else {
+ // Non-desktop Qt on a desktop device? We don't support that.
+ if (errorMessage)
+ *errorMessage = tr("Non-desktop Qt is used with a Desktop device.");
+ return false;
+ }
+ }
+
+ // If not a desktop device, don't check the Qt version for qmlscene.
+ // The device is responsible for providing it and we assume qmlscene can be found
+ // in $PATH if it's not explicitly given.
return true;
}
@@ -305,43 +336,10 @@ Project::RestoreResult QmlProject::fromMap(const QVariantMap &map, QString *erro
if (!activeTarget()) {
// find a kit that matches prerequisites (prefer default one)
- QList<Kit*> kits = KitManager::kits(
- std::function<bool(const Kit *)>([](const Kit *k) -> bool {
- if (!k->isValid())
- return false;
-
- IDevice::ConstPtr dev = DeviceKitInformation::device(k);
- if (dev.isNull())
- return false;
-
- QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(k);
- if (!version || version->qtVersion() < QtSupport::QtVersionNumber(5, 0, 0))
- return false;
-
- if (dev->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE) {
- if (version->type() != QLatin1String(QtSupport::Constants::DESKTOPQT)) {
- return !static_cast<QtSupport::DesktopQtVersion *>(version)
- ->qmlsceneCommand().isEmpty();
- } else {
- // Non-desktop Qt on a desktop device? We don't support that.
- return false;
- }
- }
-
- // If not a desktop device, don't check the Qt version for qmlscene.
- // The device is responsible for providing it and we assume qmlscene can be found
- // in $PATH if it's not explicitly given.
- return true;
-
- })
- );
+ const QList<Kit*> kits = KitManager::kits([this](const Kit *k) { return supportsKit(k, nullptr); });
if (!kits.isEmpty()) {
- Kit *kit = 0;
- if (kits.contains(KitManager::defaultKit()))
- kit = KitManager::defaultKit();
- else
- kit = kits.first();
+ Kit *kit = kits.contains(KitManager::defaultKit()) ? KitManager::defaultKit() : kits.first();
addTarget(createTarget(kit));
}
}
diff --git a/src/plugins/qmlprojectmanager/qmlprojectenvironmentaspect.cpp b/src/plugins/qmlprojectmanager/qmlprojectenvironmentaspect.cpp
index 5cc6fe9988..a4721ada4e 100644
--- a/src/plugins/qmlprojectmanager/qmlprojectenvironmentaspect.cpp
+++ b/src/plugins/qmlprojectmanager/qmlprojectenvironmentaspect.cpp
@@ -27,6 +27,7 @@
#include "qmlproject.h"
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/target.h>
#include <projectexplorer/kit.h>
#include <utils/qtcassert.h>
@@ -39,28 +40,35 @@ namespace QmlProjectManager {
QList<int> QmlProjectEnvironmentAspect::possibleBaseEnvironments() const
{
- return QList<int>() << static_cast<int>(KitEnvironmentBase)
- << static_cast<int>(SystemEnvironmentBase);
+ QList<int> ret;
+ if (ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(runConfiguration()->target()->kit())
+ == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE) {
+ ret << SystemEnvironmentBase;
+ }
+ ret << CleanEnvironmentBase;
+ return ret;
}
QString QmlProjectEnvironmentAspect::baseEnvironmentDisplayName(int base) const
{
- if (base == static_cast<int>(SystemEnvironmentBase))
+ switch (base) {
+ case SystemEnvironmentBase:
return tr("System Environment");
- if (base == static_cast<int>(KitEnvironmentBase))
- return tr("Kit Environment");
- return QString();
+ case CleanEnvironmentBase:
+ return tr("Clean Environment");
+ default:
+ QTC_CHECK(false);
+ return QString();
+ }
}
Utils::Environment QmlProjectEnvironmentAspect::baseEnvironment() const
{
- int base = baseEnvironmentBase();
- Utils::Environment env = Utils::Environment::systemEnvironment();
- if (base == static_cast<int>(KitEnvironmentBase))
- runConfiguration()->target()->kit()->addToEnvironment(env);
+ Utils::Environment env = baseEnvironmentBase() == SystemEnvironmentBase
+ ? Utils::Environment::systemEnvironment()
+ : Utils::Environment();
- QmlProject *project = qobject_cast<QmlProject *>(runConfiguration()->target()->project());
- if (project)
+ if (QmlProject *project = qobject_cast<QmlProject *>(runConfiguration()->target()->project()))
env.modify(project->environment());
return env;
diff --git a/src/plugins/qmlprojectmanager/qmlprojectenvironmentaspect.h b/src/plugins/qmlprojectmanager/qmlprojectenvironmentaspect.h
index 14c460085f..efa32fdfdb 100644
--- a/src/plugins/qmlprojectmanager/qmlprojectenvironmentaspect.h
+++ b/src/plugins/qmlprojectmanager/qmlprojectenvironmentaspect.h
@@ -43,7 +43,7 @@ public:
private:
enum BaseEnvironmentBase {
SystemEnvironmentBase = 0,
- KitEnvironmentBase
+ CleanEnvironmentBase,
};
};
diff --git a/src/plugins/qnx/qnxrunconfigurationfactory.cpp b/src/plugins/qnx/qnxrunconfigurationfactory.cpp
index 1418c736d1..396f1e024a 100644
--- a/src/plugins/qnx/qnxrunconfigurationfactory.cpp
+++ b/src/plugins/qnx/qnxrunconfigurationfactory.cpp
@@ -29,6 +29,8 @@
#include "qnxrunconfiguration.h"
#include "qnxdevicefactory.h"
+#include <qmakeprojectmanager/qmakeprojectmanagerconstants.h>
+
namespace Qnx {
namespace Internal {
@@ -36,6 +38,7 @@ QnxRunConfigurationFactory::QnxRunConfigurationFactory()
{
registerRunConfiguration<QnxRunConfiguration>(Constants::QNX_QNX_RUNCONFIGURATION_PREFIX);
addSupportedTargetDeviceType(Constants::QNX_QNX_OS_TYPE);
+ addSupportedProjectType(QmakeProjectManager::Constants::QMAKEPROJECT_ID);
}
} // namespace Internal
diff --git a/src/plugins/qtsupport/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp
index e715d1364d..cb38340e7c 100644
--- a/src/plugins/qtsupport/baseqtversion.cpp
+++ b/src/plugins/qtsupport/baseqtversion.cpp
@@ -282,91 +282,7 @@ void BaseQtVersion::ctor(const FileName &qmakePath)
void BaseQtVersion::setupExpander()
{
- m_expander.setDisplayName(
- QtKitInformation::tr("Qt version"));
-
- m_expander.registerVariable("Qt:Version",
- QtKitInformation::tr("The version string of the current Qt version."),
- [this] { return qtVersionString(); });
-
- m_expander.registerVariable("Qt:Type",
- QtKitInformation::tr("The type of the current Qt version."),
- [this] { return type(); });
-
- m_expander.registerVariable("Qt:Mkspec",
- QtKitInformation::tr("The mkspec of the current Qt version."),
- [this] { return mkspec().toUserOutput(); });
-
- m_expander.registerVariable("Qt:QT_INSTALL_PREFIX",
- QtKitInformation::tr("The installation prefix of the current Qt version."),
- [this] { return qmakeProperty(m_versionInfo, "QT_INSTALL_PREFIX"); });
-
- m_expander.registerVariable("Qt:QT_INSTALL_DATA",
- QtKitInformation::tr("The installation location of the current Qt version's data."),
- [this] { return qmakeProperty(m_versionInfo, "QT_INSTALL_DATA"); });
-
- m_expander.registerVariable("Qt:QT_INSTALL_HEADERS",
- QtKitInformation::tr("The installation location of the current Qt version's header files."),
- [this] { return qmakeProperty(m_versionInfo, "QT_INSTALL_HEADERS"); });
-
- m_expander.registerVariable("Qt:QT_INSTALL_LIBS",
- QtKitInformation::tr("The installation location of the current Qt version's library files."),
- [this] { return qmakeProperty(m_versionInfo, "QT_INSTALL_LIBS"); });
-
- m_expander.registerVariable("Qt:QT_INSTALL_DOCS",
- QtKitInformation::tr("The installation location of the current Qt version's documentation files."),
- [this] { return qmakeProperty(m_versionInfo, "QT_INSTALL_DOCS"); });
-
- m_expander.registerVariable("Qt:QT_INSTALL_BINS",
- QtKitInformation::tr("The installation location of the current Qt version's executable files."),
- [this] { return qmakeProperty(m_versionInfo, "QT_INSTALL_BINS"); });
-
- m_expander.registerVariable("Qt:QT_INSTALL_PLUGINS",
- QtKitInformation::tr("The installation location of the current Qt version's plugins."),
- [this] { return qmakeProperty(m_versionInfo, "QT_INSTALL_PLUGINS"); });
-
- m_expander.registerVariable("Qt:QT_INSTALL_QML",
- QtKitInformation::tr("The installation location of the current Qt version's QML files."),
- [this] { return qmakeProperty(m_versionInfo, "QT_INSTALL_QML"); });
-
- m_expander.registerVariable("Qt:QT_INSTALL_IMPORTS",
- QtKitInformation::tr("The installation location of the current Qt version's imports."),
- [this] { return qmakeProperty(m_versionInfo, "QT_INSTALL_IMPORTS"); });
-
- m_expander.registerVariable("Qt:QT_INSTALL_TRANSLATIONS",
- QtKitInformation::tr("The installation location of the current Qt version's translation files."),
- [this] { return qmakeProperty(m_versionInfo, "QT_INSTALL_TRANSLATIONS"); });
-
- m_expander.registerVariable("Qt:QT_INSTALL_CONFIGURATION",
- QtKitInformation::tr("The installation location of the current Qt version's translation files."),
- [this] { return qmakeProperty(m_versionInfo, "QT_INSTALL_CONFIGURATION"); });
-
- m_expander.registerVariable("Qt:QT_INSTALL_EXAMPLES",
- QtKitInformation::tr("The installation location of the current Qt version's examples."),
- [this] { return qmakeProperty(m_versionInfo, "QT_INSTALL_EXAMPLES"); });
-
- m_expander.registerVariable("Qt:QT_INSTALL_DEMOS",
- QtKitInformation::tr("The installation location of the current Qt version's demos."),
- [this] { return qmakeProperty(m_versionInfo, "QT_INSTALL_DEMOS"); });
-
- m_expander.registerVariable("Qt:QMAKE_MKSPECS",
- QtKitInformation::tr("The current Qt version's default mkspecs (Qt 4)."),
- [this] { return qmakeProperty(m_versionInfo, "QMAKE_MKSPECS"); });
- m_expander.registerVariable("Qt:QMAKE_SPEC",
- QtKitInformation::tr("The current Qt version's default mkspec (Qt 5; host system)."),
- [this] { return qmakeProperty(m_versionInfo, "QMAKE_SPEC"); });
- m_expander.registerVariable("Qt:QMAKE_XSPEC",
- QtKitInformation::tr("The current Qt version's default mkspec (Qt 5; target system)."),
- [this] { return qmakeProperty(m_versionInfo, "QMAKE_XSPEC"); });
-
- m_expander.registerVariable("Qt:QMAKE_VERSION",
- QtKitInformation::tr("The current Qt's qmake version."),
- [this] { return qmakeProperty(m_versionInfo, "QMAKE_VERSION"); });
-
-// FIXME: Re-enable once we can detect expansion loops.
-// m_expander.registerVariable("Qt:Name",
-// QtKitInformation::tr("The display name of the current Qt version."),
-// [this] { return displayName(); });
+ m_expander = createMacroExpander([this]{ return this; });
}
BaseQtVersion::~BaseQtVersion()
@@ -801,7 +717,7 @@ void BaseQtVersion::setAutoDetectionSource(const QString &autodetectionSource)
QString BaseQtVersion::displayName() const
{
- return m_expander.expand(m_unexpandedDisplayName);
+ return m_expander->expand(m_unexpandedDisplayName);
}
QString BaseQtVersion::unexpandedDisplayName() const
@@ -1312,7 +1228,169 @@ QStringList BaseQtVersion::qtConfigValues() const
MacroExpander *BaseQtVersion::macroExpander() const
{
- return &m_expander;
+ return m_expander.get();
+}
+
+std::unique_ptr<MacroExpander> BaseQtVersion::createMacroExpander(const std::function<BaseQtVersion *()> &qtVersion)
+{
+ const auto versionProperty =
+ [qtVersion](const std::function<QString(BaseQtVersion *)> &property) {
+ return [property, qtVersion]() -> QString {
+ BaseQtVersion *version = qtVersion();
+ return version ? property(version) : QString();
+ };
+ };
+ std::unique_ptr<Utils::MacroExpander> expander(new Utils::MacroExpander);
+ expander->setDisplayName(QtKitInformation::tr("Qt version"));
+
+ expander->registerVariable(
+ "Qt:Version",
+ QtKitInformation::tr("The version string of the current Qt version."),
+ versionProperty([](BaseQtVersion *version) {
+ return version->qtVersionString();
+ }));
+
+ expander->registerVariable(
+ "Qt:Type",
+ QtKitInformation::tr("The type of the current Qt version."),
+ versionProperty([](BaseQtVersion *version) {
+ return version->type();
+ }));
+
+ expander->registerVariable(
+ "Qt:Mkspec",
+ QtKitInformation::tr("The mkspec of the current Qt version."),
+ versionProperty([](BaseQtVersion *version) {
+ return version->mkspec().toUserOutput();
+ }));
+
+ expander->registerVariable(
+ "Qt:QT_INSTALL_PREFIX",
+ QtKitInformation::tr("The installation prefix of the current Qt version."),
+ versionProperty([](BaseQtVersion *version) {
+ return version->qmakeProperty(version->m_versionInfo, "QT_INSTALL_PREFIX");
+ }));
+
+ expander->registerVariable(
+ "Qt:QT_INSTALL_DATA",
+ QtKitInformation::tr("The installation location of the current Qt version's data."),
+ versionProperty([](BaseQtVersion *version) {
+ return version->qmakeProperty(version->m_versionInfo, "QT_INSTALL_DATA");
+ }));
+
+ expander->registerVariable(
+ "Qt:QT_INSTALL_HEADERS",
+ QtKitInformation::tr("The installation location of the current Qt version's header files."),
+ versionProperty([](BaseQtVersion *version) {
+ return version->qmakeProperty(version->m_versionInfo, "QT_INSTALL_HEADERS");
+ }));
+
+ expander->registerVariable(
+ "Qt:QT_INSTALL_LIBS",
+ QtKitInformation::tr("The installation location of the current Qt version's library files."),
+ versionProperty([](BaseQtVersion *version) {
+ return version->qmakeProperty(version->m_versionInfo, "QT_INSTALL_LIBS");
+ }));
+
+ expander->registerVariable(
+ "Qt:QT_INSTALL_DOCS",
+ QtKitInformation::tr("The installation location of the current Qt version's documentation files."),
+ versionProperty([](BaseQtVersion *version) {
+ return version->qmakeProperty(version->m_versionInfo, "QT_INSTALL_DOCS");
+ }));
+
+ expander->registerVariable(
+ "Qt:QT_INSTALL_BINS",
+ QtKitInformation::tr("The installation location of the current Qt version's executable files."),
+ versionProperty([](BaseQtVersion *version) {
+ return version->qmakeProperty(version->m_versionInfo, "QT_INSTALL_BINS");
+ }));
+
+ expander->registerVariable(
+ "Qt:QT_INSTALL_PLUGINS",
+ QtKitInformation::tr("The installation location of the current Qt version's plugins."),
+ versionProperty([](BaseQtVersion *version) {
+ return version->qmakeProperty(version->m_versionInfo, "QT_INSTALL_PLUGINS");
+ }));
+
+ expander->registerVariable(
+ "Qt:QT_INSTALL_QML",
+ QtKitInformation::tr("The installation location of the current Qt version's QML files."),
+ versionProperty([](BaseQtVersion *version) {
+ return version->qmakeProperty(version->m_versionInfo, "QT_INSTALL_QML");
+ }));
+
+ expander->registerVariable(
+ "Qt:QT_INSTALL_IMPORTS",
+ QtKitInformation::tr("The installation location of the current Qt version's imports."),
+ versionProperty([](BaseQtVersion *version) {
+ return version->qmakeProperty(version->m_versionInfo, "QT_INSTALL_IMPORTS");
+ }));
+
+ expander->registerVariable(
+ "Qt:QT_INSTALL_TRANSLATIONS",
+ QtKitInformation::tr("The installation location of the current Qt version's translation files."),
+ versionProperty([](BaseQtVersion *version) {
+ return version->qmakeProperty(version->m_versionInfo, "QT_INSTALL_TRANSLATIONS");
+ }));
+
+ expander->registerVariable(
+ "Qt:QT_INSTALL_CONFIGURATION",
+ QtKitInformation::tr("The installation location of the current Qt version's translation files."),
+ versionProperty([](BaseQtVersion *version) {
+ return version->qmakeProperty(version->m_versionInfo, "QT_INSTALL_CONFIGURATION");
+ }));
+
+ expander->registerVariable(
+ "Qt:QT_INSTALL_EXAMPLES",
+ QtKitInformation::tr("The installation location of the current Qt version's examples."),
+ versionProperty([](BaseQtVersion *version) {
+ return version->qmakeProperty(version->m_versionInfo, "QT_INSTALL_EXAMPLES");
+ }));
+
+ expander->registerVariable(
+ "Qt:QT_INSTALL_DEMOS",
+ QtKitInformation::tr("The installation location of the current Qt version's demos."),
+ versionProperty([](BaseQtVersion *version) {
+ return version->qmakeProperty(version->m_versionInfo, "QT_INSTALL_DEMOS");
+ }));
+
+ expander->registerVariable(
+ "Qt:QMAKE_MKSPECS",
+ QtKitInformation::tr("The current Qt version's default mkspecs (Qt 4)."),
+ versionProperty([](BaseQtVersion *version) {
+ return version->qmakeProperty(version->m_versionInfo, "QMAKE_MKSPECS");
+ }));
+
+ expander->registerVariable(
+ "Qt:QMAKE_SPEC",
+ QtKitInformation::tr("The current Qt version's default mkspec (Qt 5; host system)."),
+ versionProperty([](BaseQtVersion *version) {
+ return version->qmakeProperty(version->m_versionInfo, "QMAKE_SPEC");
+ }));
+
+ expander->registerVariable(
+ "Qt:QMAKE_XSPEC",
+ QtKitInformation::tr("The current Qt version's default mkspec (Qt 5; target system)."),
+ versionProperty([](BaseQtVersion *version) {
+ return version->qmakeProperty(version->m_versionInfo, "QMAKE_XSPEC");
+ }));
+
+ expander->registerVariable(
+ "Qt:QMAKE_VERSION",
+ QtKitInformation::tr("The current Qt's qmake version."),
+ versionProperty([](BaseQtVersion *version) {
+ return version->qmakeProperty(version->m_versionInfo, "QMAKE_VERSION");
+ }));
+
+ // FIXME: Re-enable once we can detect expansion loops.
+ // expander->registerVariable("Qt:Name",
+ // QtKitInformation::tr("The display name of the current Qt version."),
+ // versionProperty([](BaseQtVersion *version) {
+ // return version->displayName();
+ // }));
+
+ return expander;
}
void BaseQtVersion::populateQmlFileFinder(FileInProjectFinder *finder, const Target *target)
diff --git a/src/plugins/qtsupport/baseqtversion.h b/src/plugins/qtsupport/baseqtversion.h
index 152415a8df..672d3c98af 100644
--- a/src/plugins/qtsupport/baseqtversion.h
+++ b/src/plugins/qtsupport/baseqtversion.h
@@ -232,6 +232,8 @@ public:
QStringList qtConfigValues() const;
Utils::MacroExpander *macroExpander() const; // owned by the Qt version
+ static std::unique_ptr<Utils::MacroExpander> createMacroExpander(
+ const std::function<BaseQtVersion *()> &qtVersion);
static void populateQmlFileFinder(Utils::FileInProjectFinder *finder,
const ProjectExplorer::Target *target);
@@ -315,7 +317,7 @@ private:
mutable QList<ProjectExplorer::Abi> m_qtAbis;
- mutable Utils::MacroExpander m_expander;
+ std::unique_ptr<Utils::MacroExpander> m_expander;
};
}
diff --git a/src/plugins/qtsupport/exampleslistmodel.cpp b/src/plugins/qtsupport/exampleslistmodel.cpp
index d875511b2a..48bde825b9 100644
--- a/src/plugins/qtsupport/exampleslistmodel.cpp
+++ b/src/plugins/qtsupport/exampleslistmodel.cpp
@@ -47,6 +47,7 @@
#include <utils/environment.h>
#include <utils/fileutils.h>
#include <utils/qtcassert.h>
+#include <utils/stylehelper.h>
#include <algorithm>
@@ -311,7 +312,8 @@ void ExamplesListModel::parseExamples(QXmlStreamReader *reader,
item.projectPath = attributes.value(QLatin1String("projectPath")).toString();
item.hasSourceCode = !item.projectPath.isEmpty();
item.projectPath = relativeOrInstallPath(item.projectPath, projectsOffset, examplesInstallPath);
- item.imageUrl = attributes.value(QLatin1String("imageUrl")).toString();
+ item.imageUrl = Utils::StyleHelper::dpiSpecificImageFile(
+ attributes.value(QLatin1String("imageUrl")).toString());
QPixmapCache::remove(item.imageUrl);
item.docUrl = attributes.value(QLatin1String("docUrl")).toString();
item.isHighlighted = attributes.value(QLatin1String("isHighlighted")).toString() == QLatin1String("true");
diff --git a/src/plugins/qtsupport/gettingstartedwelcomepage.cpp b/src/plugins/qtsupport/gettingstartedwelcomepage.cpp
index c41677ec7e..b284d2869d 100644
--- a/src/plugins/qtsupport/gettingstartedwelcomepage.cpp
+++ b/src/plugins/qtsupport/gettingstartedwelcomepage.cpp
@@ -413,18 +413,16 @@ public:
QRect pixmapRect = inner;
if (!pm.isNull()) {
painter->setPen(foregroundColor2);
- if (item.isVideo)
- pixmapRect = inner.adjusted(6, 10, -6, -25);
+ pixmapRect = inner.adjusted(6, 20, -6, -15);
QPoint pixmapPos = pixmapRect.center();
- pixmapPos.rx() -= pm.width() / 2;
- pixmapPos.ry() -= pm.height() / 2;
+ pixmapPos.rx() -= pm.width() / pm.devicePixelRatio() / 2;
+ pixmapPos.ry() -= pm.height() / pm.devicePixelRatio() / 2;
painter->drawPixmap(pixmapPos, pm);
if (item.isVideo) {
painter->setFont(sizedFont(13, option.widget));
- QRect lenRect(x, y + 120, w, 20);
QString videoLen = item.videoLength;
- lenRect = fm.boundingRect(lenRect, Qt::AlignHCenter, videoLen);
- painter->drawText(lenRect.adjusted(0, 0, 5, 0), videoLen);
+ painter->drawText(pixmapRect.adjusted(0, 0, 0, painter->font().pixelSize() + 3),
+ videoLen, Qt::AlignBottom | Qt::AlignHCenter);
}
} else {
// The description text as fallback.
diff --git a/src/plugins/qtsupport/images/icons/qteventicon.png b/src/plugins/qtsupport/images/icons/qteventicon.png
index b3ba23cbe3..a4d27e29a2 100644
--- a/src/plugins/qtsupport/images/icons/qteventicon.png
+++ b/src/plugins/qtsupport/images/icons/qteventicon.png
Binary files differ
diff --git a/src/plugins/qtsupport/images/icons/qteventicon@2x.png b/src/plugins/qtsupport/images/icons/qteventicon@2x.png
new file mode 100644
index 0000000000..b3eb6e5eaf
--- /dev/null
+++ b/src/plugins/qtsupport/images/icons/qteventicon@2x.png
Binary files differ
diff --git a/src/plugins/qtsupport/images/icons/tutorialicon.png b/src/plugins/qtsupport/images/icons/tutorialicon.png
index 955d29d92c..a3ac270f8c 100644
--- a/src/plugins/qtsupport/images/icons/tutorialicon.png
+++ b/src/plugins/qtsupport/images/icons/tutorialicon.png
Binary files differ
diff --git a/src/plugins/qtsupport/images/icons/tutorialicon@2x.png b/src/plugins/qtsupport/images/icons/tutorialicon@2x.png
new file mode 100644
index 0000000000..5c83982f2e
--- /dev/null
+++ b/src/plugins/qtsupport/images/icons/tutorialicon@2x.png
Binary files differ
diff --git a/src/plugins/qtsupport/images/icons/videotutorialicon.png b/src/plugins/qtsupport/images/icons/videotutorialicon.png
index b3e88de859..037adc27a3 100644
--- a/src/plugins/qtsupport/images/icons/videotutorialicon.png
+++ b/src/plugins/qtsupport/images/icons/videotutorialicon.png
Binary files differ
diff --git a/src/plugins/qtsupport/images/icons/videotutorialicon@2x.png b/src/plugins/qtsupport/images/icons/videotutorialicon@2x.png
new file mode 100644
index 0000000000..04071e206e
--- /dev/null
+++ b/src/plugins/qtsupport/images/icons/videotutorialicon@2x.png
Binary files differ
diff --git a/src/plugins/qtsupport/qtcreator_tutorials.xml b/src/plugins/qtsupport/qtcreator_tutorials.xml
index 264813a594..2464a48091 100644
--- a/src/plugins/qtsupport/qtcreator_tutorials.xml
+++ b/src/plugins/qtsupport/qtcreator_tutorials.xml
@@ -60,7 +60,11 @@
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/videotutorialicon.png" difficulty="" projectPath="" name="Online: Qt Creator - Overview" isVideo="true" videoUrl="https://youtu.be/zAqSiIGdj8M" videoLength="2:06">
<description><![CDATA[Overview of Qt Creator.]]></description>
- <tags>qt creator</tags>
+ <tags>qt creator,video</tags>
+ </tutorial>
+ <tutorial imageUrl=":qtsupport/images/icons/videotutorialicon.png" difficulty="" projectPath="" name="Online: Qt Creator - Introduction" isVideo="true" videoUrl="https://www.youtube.com/watch?v=R6zWLfHIYJw" videoLength="9:29">
+ <description><![CDATA[Using Qt Creator tutorials and examples to develop Qt applications.]]></description>
+ <tags>qt creator,video</tags>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/qteventicon.png" difficulty="" projectPath="" name="Talk: Qt Creator - Getting Started" isVideo="true" videoUrl="https://www.youtube.com/watch?v=nGFmjOiT22Y" videoLength="50:36">
diff --git a/src/plugins/qtsupport/qtkitinformation.cpp b/src/plugins/qtsupport/qtkitinformation.cpp
index 1653b48a16..3e55fb3fd0 100644
--- a/src/plugins/qtsupport/qtkitinformation.cpp
+++ b/src/plugins/qtsupport/qtkitinformation.cpp
@@ -124,14 +124,26 @@ ProjectExplorer::IOutputParser *QtKitInformation::createOutputParser(const Proje
return nullptr;
}
+class QtMacroSubProvider
+{
+public:
+ QtMacroSubProvider(Kit *kit)
+ : expander(BaseQtVersion::createMacroExpander(
+ [kit] { return QtKitInformation::qtVersion(kit); }))
+ {}
+
+ MacroExpander *operator()() const
+ {
+ return expander.get();
+ }
+
+ std::shared_ptr<MacroExpander> expander;
+};
+
void QtKitInformation::addToMacroExpander(Kit *kit, MacroExpander *expander) const
{
QTC_ASSERT(kit, return);
- expander->registerSubProvider(
- [kit]() -> MacroExpander * {
- BaseQtVersion *version = qtVersion(kit);
- return version ? version->macroExpander() : nullptr;
- });
+ expander->registerSubProvider(QtMacroSubProvider(kit));
expander->registerVariable("Qt:Name", tr("Name of Qt Version"),
[kit]() -> QString {
diff --git a/src/plugins/qtsupport/qtsupport.qrc b/src/plugins/qtsupport/qtsupport.qrc
index 03d8dbc7e8..03c14062c0 100644
--- a/src/plugins/qtsupport/qtsupport.qrc
+++ b/src/plugins/qtsupport/qtsupport.qrc
@@ -7,7 +7,10 @@
<file>images_areaofinterest.xml</file>
<file>qtcreator_tutorials.xml</file>
<file>images/icons/tutorialicon.png</file>
+ <file>images/icons/tutorialicon@2x.png</file>
<file>images/icons/videotutorialicon.png</file>
+ <file>images/icons/videotutorialicon@2x.png</file>
<file>images/icons/qteventicon.png</file>
+ <file>images/icons/qteventicon@2x.png</file>
</qresource>
</RCC>
diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp
index 5b7a0b27ba..f36f208376 100644
--- a/src/plugins/texteditor/texteditor.cpp
+++ b/src/plugins/texteditor/texteditor.cpp
@@ -2997,6 +2997,14 @@ bool TextEditorWidget::event(QEvent *e)
void TextEditorWidget::inputMethodEvent(QInputMethodEvent *e)
{
+ if (e->commitString().isEmpty() && e->preeditString().isEmpty() && e->attributes().isEmpty()) {
+ // Avoid doing anything when getting bogus events as it can happen on Gnome desktop.
+ // Otherwise QPlainTextEdit will report content changes for locations where factually
+ // nothing changed.
+ // Workaround for QTCREATORBUG-19571
+ e->accept();
+ return;
+ }
if (d->m_inBlockSelectionMode) {
if (!e->commitString().isEmpty())
d->insertIntoBlockSelection(e->commitString());
diff --git a/src/plugins/winrt/winrtrunfactories.cpp b/src/plugins/winrt/winrtrunfactories.cpp
index bb0c1dbe01..ad0a5f304d 100644
--- a/src/plugins/winrt/winrtrunfactories.cpp
+++ b/src/plugins/winrt/winrtrunfactories.cpp
@@ -52,7 +52,8 @@ WinRtRunConfigurationFactory::WinRtRunConfigurationFactory()
QList<RunConfigurationCreationInfo> WinRtRunConfigurationFactory::availableCreators(Target *parent) const
{
- QmakeProject *project = static_cast<QmakeProject *>(parent->project());
+ QmakeProject *project = qobject_cast<QmakeProject *>(parent->project());
+ QTC_ASSERT(project, return {});
const QList<RunConfigurationCreationInfo> list = project->runConfigurationCreators(this);
return Utils::transform(list, [](RunConfigurationCreationInfo rci) {
rci.displayName = tr("Run App Package");
diff --git a/src/shared/qbs b/src/shared/qbs
-Subproject 053b31802b3520b083a8fc587cd367251fa0b2d
+Subproject abfc4c1b37d18515c8da0678a665886d7cb69af
diff --git a/src/tools/icons/qtcreatoricons.svg b/src/tools/icons/qtcreatoricons.svg
index d344fe4b24..90a1fee6cf 100644
--- a/src/tools/icons/qtcreatoricons.svg
+++ b/src/tools/icons/qtcreatoricons.svg
@@ -496,6 +496,37 @@
effect="fill_between_many"
linkedpaths="#path2259-2-0-6,0"
id="path-effect2469-8" />
+ <linearGradient
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(75,0,0,-70,-74,7774.97)"
+ y2="111"
+ x2="1.45"
+ y1="109.58"
+ x1="2.76"
+ id="linear-gradient-7">
+ <stop
+ id="stop2568"
+ stop-color="#6ffe80"
+ offset="0" />
+ <stop
+ id="stop2570"
+ stop-color="#43ce58"
+ offset="0.37" />
+ <stop
+ id="stop2572"
+ stop-color="#425fcf"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linear-gradient-7"
+ id="linearGradient2898"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(75,0,0,-75,14430,8326)"
+ x1="-190.82001"
+ y1="109.69"
+ x2="-191.87"
+ y2="110.83" />
</defs>
<sodipodi:namedview
id="base"
@@ -632,6 +663,79 @@
style="display:inline;fill:none" />
<g
inkscape:groupmode="layer"
+ id="layer7"
+ inkscape:label="Welcome screen thumbnails">
+ <g
+ id="src/plugins/qtsupport/images/icons/videotutorialicon">
+ <rect
+ id="rect2451"
+ height="110"
+ width="176"
+ class="cls-1"
+ x="0"
+ y="0"
+ style="fill:#26282a" />
+ <path
+ d="M 83.73,67.34 V 56.12 l 9.62,5.61 z m -0.53,-14 a 1,1 0 0 0 -1.06,0 1.05,1.05 0 0 0 -0.54,0.93 V 69.2 a 1,1 0 0 0 0.54,0.92 1,1 0 0 0 0.53,0.15 1,1 0 0 0 0.53,-0.15 L 96,62.65 a 1.06,1.06 0 0 0 0,-1.84 z m 32.53,-11.88 v 38.4 a 1.07,1.07 0 0 1 -2.13,0 V 41.47 A 1.07,1.07 0 0 0 112.53,40.4 H 63.47 a 1.07,1.07 0 0 0 -1.07,1.07 v 41.6 h 52.27 a 1.07,1.07 0 0 1 0,2.13 H 61.33 A 1.06,1.06 0 0 1 60.27,84.13 V 41.47 a 3.2,3.2 0 0 1 3.2,-3.2 h 49.06 a 3.2,3.2 0 0 1 3.2,3.2 z M 76.27,91.6 a 1.07,1.07 0 1 1 1.06,-1.07 1.07,1.07 0 0 1 -1.06,1.07 z m 36.26,-2.13 H 79.27 a 3.18,3.18 0 0 0 -6,0 H 65.6 a 1.07,1.07 0 1 0 0,2.13 h 7.66 a 3.18,3.18 0 0 0 6,0 h 33.26 a 1.07,1.07 0 1 0 0,-2.13 z m 5.34,3.2 a 3.21,3.21 0 0 1 -3.2,3.2 H 61.33 a 3.21,3.21 0 0 1 -3.2,-3.2 V 39.33 a 3.21,3.21 0 0 1 3.2,-3.2 h 53.34 a 3.21,3.21 0 0 1 3.2,3.2 z M 114.67,34 H 61.33 A 5.33,5.33 0 0 0 56,39.33 V 92.67 A 5.33,5.33 0 0 0 61.33,98 h 53.34 A 5.33,5.33 0 0 0 120,92.67 V 39.33 A 5.33,5.33 0 0 0 114.67,34 Z"
+ class="cls-2"
+ id="video-player"
+ inkscape:connector-curvature="0"
+ style="fill:url(#linearGradient2898);fill-opacity:1" />
+ <path
+ id="path2480"
+ style="fill:#17a81a"
+ d="M 137.7,21.74 V 9 h 2 v 12.74 z m -2.58,-6.22 v 4.1 a 0.91,0.91 0 0 0 0.21,0.58 1,1 0 0 0 0.59,0.25 l -0.06,1.49 a 3.8,3.8 0 0 1 -2.39,-0.66 6.91,6.91 0 0 1 -2.9,0.66 c -1.79,0 -2.68,-1 -2.68,-2.86 a 2.44,2.44 0 0 1 0.73,-2 4,4 0 0 1 2.24,-0.74 l 2.32,-0.2 V 15.5 a 1.33,1.33 0 0 0 -0.31,-1 1.35,1.35 0 0 0 -0.93,-0.29 c -0.77,0 -1.73,0 -2.88,0.14 h -0.58 L 128.41,13 a 15.72,15.72 0 0 1 3.61,-0.46 3.31,3.31 0 0 1 2.38,0.71 3,3 0 0 1 0.72,2.27 z m -4,2.23 a 1.21,1.21 0 0 0 -1.24,1.35 c 0,0.83 0.37,1.24 1.1,1.24 a 7.1,7.1 0 0 0 1.91,-0.29 l 0.32,-0.11 v -2.39 z m -6.99,-6.54 V 9.14 h 2 v 2.07 z m 0,10.53 v -9 h 2 v 9 z m -6.5,0 v -9 h 1.94 v 1.08 a 8.5,8.5 0 0 1 3.06,-1.27 v 2 a 12.57,12.57 0 0 0 -2.64,0.79 l -0.4,0.16 v 6.28 z m -9.05,-8.02 a 4.67,4.67 0 0 1 6.18,0 5.57,5.57 0 0 1 0.92,3.51 5.76,5.76 0 0 1 -0.9,3.52 4.66,4.66 0 0 1 -6.22,0 5.76,5.76 0 0 1 -0.9,-3.52 5.57,5.57 0 0 1 0.92,-3.51 z m 1.47,5.85 a 2.18,2.18 0 0 0 3.24,0 5,5 0 0 0 0.41,-2.36 4.42,4.42 0 0 0 -0.44,-2.32 2.18,2.18 0 0 0 -3.18,0 4.42,4.42 0 0 0 -0.44,2.32 5,5 0 0 0 0.41,2.36 z m -3.56,-5.15 H 104 v 4 a 4.12,4.12 0 0 0 0.17,1.46 c 0.1,0.24 0.38,0.36 0.82,0.36 l 1.48,-0.06 0.09,1.57 a 11.12,11.12 0 0 1 -1.84,0.23 2.55,2.55 0 0 1 -2.09,-0.7 4.41,4.41 0 0 1 -0.57,-2.65 v -4.21 h -1.15 v -1.68 h 1.15 V 10.13 H 104 v 2.61 h 2.49 z m -9.17,-1.68 h 2 v 9 h -2 v -0.55 a 4.93,4.93 0 0 1 -2.43,0.75 2.71,2.71 0 0 1 -2.48,-1 7,7 0 0 1 -0.63,-3.5 v -4.7 h 2 v 4.72 A 5.78,5.78 0 0 0 94,19.64 c 0.18,0.37 0.6,0.56 1.26,0.56 a 4.32,4.32 0 0 0 1.78,-0.36 l 0.27,-0.11 z M 82.67,11.2 V 9.41 h 9 V 11.2 H 88.2 v 10.54 h -2 V 11.2 Z m -12.05,2.52 a 4.65,4.65 0 0 1 6.17,0 5.57,5.57 0 0 1 0.93,3.51 5.76,5.76 0 0 1 -0.9,3.52 3.65,3.65 0 0 1 -3.11,1.19 3.66,3.66 0 0 1 -3.12,-1.19 5.76,5.76 0 0 1 -0.9,-3.52 5.57,5.57 0 0 1 0.93,-3.51 z m 1.47,5.85 a 1.69,1.69 0 0 0 1.62,0.72 1.71,1.71 0 0 0 1.62,-0.72 5.08,5.08 0 0 0 0.41,-2.36 4.42,4.42 0 0 0 -0.44,-2.32 2.18,2.18 0 0 0 -3.18,0 4.41,4.41 0 0 0 -0.45,2.32 4.93,4.93 0 0 0 0.42,2.36 z m -4.7,0.55 0.5,-0.05 v 1.46 a 19.1,19.1 0 0 1 -3.64,0.41 3.44,3.44 0 0 1 -2.87,-1.1 5.65,5.65 0 0 1 -0.87,-3.51 q 0,-4.78 3.91,-4.78 3.91,0 3.78,4.12 l -0.13,1.4 h -5.54 a 2.41,2.41 0 0 0 0.47,1.64 2.27,2.27 0 0 0 1.74,0.52 c 0.87,0 1.75,-0.03 2.65,-0.11 z m -1.08,-3.56 a 3.07,3.07 0 0 0 -0.42,-1.86 1.71,1.71 0 0 0 -1.43,-0.53 1.78,1.78 0 0 0 -1.47,0.55 3,3 0 0 0 -0.48,1.84 z M 58.61,9 v 12.74 h -2 v -0.46 a 5.42,5.42 0 0 1 -2.41,0.66 3,3 0 0 1 -2.58,-1.06 5.92,5.92 0 0 1 -0.82,-3.56 5.81,5.81 0 0 1 0.91,-3.64 3.39,3.39 0 0 1 2.83,-1.13 13.15,13.15 0 0 1 2,0.23 V 9 Z m -2.27,10.87 0.3,-0.12 v -5.33 a 12.14,12.14 0 0 0 -2,-0.18 c -1.22,0 -1.82,1 -1.82,3 a 4.48,4.48 0 0 0 0.42,2.3 1.5,1.5 0 0 0 1.34,0.64 4.66,4.66 0 0 0 1.76,-0.31 z M 46.92,11.21 V 9.14 h 2 v 2.07 z m 0,10.53 v -9 h 2 v 9 z M 43.29,9.41 h 2.09 l -3,12.33 h -3.95 l -3,-12.33 h 2.09 L 39.94,20 h 0.9 z"
+ inkscape:connector-curvature="0" />
+ </g>
+ <g
+ id="src/plugins/qtsupport/images/icons/tutorialicon"
+ transform="translate(177)">
+ <rect
+ id="rect2579"
+ height="110"
+ width="176"
+ class="cls-1"
+ x="0"
+ y="0"
+ style="fill:#ffffff" />
+ <path
+ style="fill:url(#linear-gradient-7)"
+ d="m 126.67,54 a 1.34,1.34 0 0 0 -1.34,1.33 v 0.44 l -16,6.59 V 60 l 17.85,-7.38 a 1.36,1.36 0 0 0 0.82,-1.24 1.34,1.34 0 0 0 -0.82,-1.23 l -38.67,-16 a 1.38,1.38 0 0 0 -1,0 l -38.67,16 a 1.34,1.34 0 0 0 -0.84,1.18 1.36,1.36 0 0 0 0.82,1.24 l 38.67,16 a 1.24,1.24 0 0 0 1,0 l 14,-5.78 a 1.33,1.33 0 0 0 -1,-2.46 L 88,65.89 52.82,51.33 88,36.78 123.18,51.33 107.87,57.67 93.21,52.19 a 3,3 0 0 0 0.12,-0.86 c 0,-2.24 -2.34,-4 -5.33,-4 -2.99,0 -5.33,1.76 -5.33,4 0,2.24 2.34,4 5.33,4 a 6.41,6.41 0 0 0 3.45,-0.95 l 15.22,5.68 v 4.28 0 28.57 a 4,4 0 1 0 2.66,0 v -7.57 a 16.19,16.19 0 0 0 5.26,-6.9 1.32,1.32 0 0 0 0.08,-0.44 v -9.33 a 1.34,1.34 0 1 0 -2.67,0 v 9.08 a 13.49,13.49 0 0 1 -2.67,4 V 65.24 L 127.17,57.9 A 1.34,1.34 0 0 0 128,56.67 V 55.33 A 1.34,1.34 0 0 0 126.67,54 Z M 85.33,51.33 c 0,-0.54 1,-1.33 2.67,-1.33 1.67,0 2.67,0.79 2.67,1.33 0,0.54 -1,1.34 -2.67,1.34 -1.67,0 -2.67,-0.79 -2.67,-1.34 z M 108,98 A 1.34,1.34 0 1 1 109.33,96.67 1.33,1.33 0 0 1 108,98 Z M 87.49,73.9 48.82,57.9 A 1.34,1.34 0 0 1 48,56.67 v -1.34 a 1.34,1.34 0 0 1 2.67,0 v 0.45 L 88,71.22 102.15,65.36 a 1.36,1.36 0 0 1 1.75,0.73 1.33,1.33 0 0 1 -0.72,1.74 L 88.51,73.9 a 1.35,1.35 0 0 1 -1,0 z m 15.77,15.54 A 34.28,34.28 0 0 1 88,92.67 C 67.33,92.67 61.66,79.07 61.43,78.5 A 1.44,1.44 0 0 1 61.33,78 v -9.33 a 1.34,1.34 0 1 1 2.67,0 v 9 c 0.77,1.67 6.11,11.7 22.67,12.23 V 78 a 1.33,1.33 0 0 1 2.66,0 v 12 a 31,31 0 0 0 12.75,-2.91 1.3327134,1.3327134 0 0 1 1.18,2.39 z m 6.07,13.89 v 4 a 1.33,1.33 0 1 1 -2.66,0 v -4 a 1.33,1.33 0 1 1 2.66,0 z m -4,-1 -1.33,5.33 a 1.33,1.33 0 0 1 -1.29,1 1.86,1.86 0 0 1 -0.33,0 1.34,1.34 0 0 1 -1,-1.62 l 1.34,-5.33 a 1.33,1.33 0 0 1 2.58,0.64 z m 9.34,4.69 a 1.34,1.34 0 0 1 -1,1.62 1.86,1.86 0 0 1 -0.33,0 1.33,1.33 0 0 1 -1.29,-1 l -1.33,-5.34 a 1.33,1.33 0 1 1 2.58,-0.64 l 1.34,5.33 z"
+ class="cls-2"
+ id="graduation-hat"
+ inkscape:connector-curvature="0" />
+ <path
+ id="path2598"
+ style="fill:#222840"
+ d="M 114,21.74 V 9 h 2 v 12.74 z m -2.57,-6.22 v 4.1 a 0.86,0.86 0 0 0 0.2,0.58 1,1 0 0 0 0.59,0.25 v 1.49 a 3.81,3.81 0 0 1 -2.4,-0.66 6.91,6.91 0 0 1 -2.9,0.66 c -1.79,0 -2.68,-1 -2.68,-2.86 a 2.44,2.44 0 0 1 0.73,-2 4,4 0 0 1 2.24,-0.74 l 2.32,-0.2 V 15.5 a 1.33,1.33 0 0 0 -0.31,-1 1.35,1.35 0 0 0 -0.93,-0.29 c -0.77,0 -1.73,0 -2.88,0.14 h -0.57 L 104.71,13 a 15.72,15.72 0 0 1 3.61,-0.46 3.31,3.31 0 0 1 2.38,0.71 3.05,3.05 0 0 1 0.73,2.27 z m -4,2.23 a 1.21,1.21 0 0 0 -1.25,1.35 c 0,0.83 0.37,1.24 1.1,1.24 a 7,7 0 0 0 1.91,-0.29 l 0.32,-0.11 v -2.39 z m -7,-6.54 V 9.14 h 2 v 2.07 z m 0,10.53 v -9 h 2 v 9 z m -6.5,0 v -9 h 1.95 v 1.08 a 8.42,8.42 0 0 1 3.06,-1.27 v 2 a 12.5,12.5 0 0 0 -2.65,0.79 l -0.4,0.16 v 6.28 z m -9.04,-8.02 a 4.65,4.65 0 0 1 6.17,0 5.57,5.57 0 0 1 0.94,3.51 5.76,5.76 0 0 1 -0.9,3.52 4.67,4.67 0 0 1 -6.23,0 5.76,5.76 0 0 1 -0.9,-3.52 5.57,5.57 0 0 1 0.92,-3.51 z m 1.46,5.85 a 1.71,1.71 0 0 0 1.62,0.72 1.69,1.69 0 0 0 1.62,-0.72 A 4.93,4.93 0 0 0 90,17.21 4.53,4.53 0 0 0 89.56,14.89 1.76,1.76 0 0 0 88,14.2 a 1.74,1.74 0 0 0 -1.59,0.69 4.53,4.53 0 0 0 -0.44,2.32 5.08,5.08 0 0 0 0.38,2.36 z m -3.56,-5.15 h -2.48 v 4 a 4.19,4.19 0 0 0 0.16,1.46 c 0.11,0.24 0.38,0.36 0.83,0.36 l 1.47,-0.06 0.09,1.57 a 10.91,10.91 0 0 1 -1.83,0.23 2.59,2.59 0 0 1 -2.1,-0.7 4.41,4.41 0 0 1 -0.57,-2.65 v -4.21 h -1.15 v -1.68 h 1.15 v -2.61 h 2 v 2.61 h 2.48 z m -9.16,-1.68 h 1.94 v 9 h -1.94 v -0.55 a 5,5 0 0 1 -2.43,0.75 2.72,2.72 0 0 1 -2.49,-1 7,7 0 0 1 -0.63,-3.5 v -4.7 h 2 v 4.72 a 5.78,5.78 0 0 0 0.27,2.18 c 0.18,0.37 0.6,0.56 1.26,0.56 a 4.36,4.36 0 0 0 1.78,-0.36 l 0.27,-0.11 z M 59,11.2 V 9.41 h 9 v 1.79 h -3.5 v 10.54 h -2 V 11.2 Z"
+ inkscape:connector-curvature="0" />
+ </g>
+ <g
+ id="src/plugins/qtsupport/images/icons/qteventicon"
+ transform="translate(354)">
+ <rect
+ id="rect2709"
+ height="110"
+ width="176"
+ class="cls-1"
+ x="0"
+ y="0"
+ style="fill:#ffffff" />
+ <path
+ d="m 120,37.2 v 4.27 a 1.06,1.06 0 0 1 -1.07,1.06 h -1.06 v 24.54 a 1.07,1.07 0 0 1 -2.14,0 v -25.6 a 1.07,1.07 0 0 1 1.07,-1.07 h 1.07 V 38.27 H 58.13 v 2.13 h 54.4 a 1.07,1.07 0 1 1 0,2.13 H 57.07 A 1.06,1.06 0 0 1 56,41.47 V 37.2 a 1.07,1.07 0 0 1 1.07,-1.07 h 29.86 v -1.06 a 1.07,1.07 0 1 1 2.14,0 v 1.06 h 29.86 A 1.07,1.07 0 0 1 120,37.2 Z M 69.87,51.07 h 8.53 a 1.07,1.07 0 0 0 0,-2.14 h -8.53 a 1.07,1.07 0 0 0 0,2.14 z m 0,6.4 h 19.2 a 1.07,1.07 0 0 0 0,-2.14 h -19.2 a 1.07,1.07 0 0 0 0,2.14 z m 17.06,-6.4 a 1.07,1.07 0 0 0 0,-2.14 h -4.26 a 1.07,1.07 0 0 0 0,2.14 z m -17.06,12.8 h 3.2 a 1.07,1.07 0 0 0 0,-2.14 h -3.2 a 1.07,1.07 0 0 0 0,2.14 z m 19.2,-2.14 H 78.4 a 1.07,1.07 0 0 0 0,2.14 h 10.67 a 1.07,1.07 0 0 0 0,-2.14 z m 19.27,6.42 a 1.11,1.11 0 0 0 -1.13,0.92 L 104,92.52 a 1.06,1.06 0 0 0 0.91,1.2 h 0.15 a 1.06,1.06 0 0 0 1.05,-0.92 l 3.08,-22.52 c 3.68,0.09 6.2,0.79 7.49,2.08 a 4.34,4.34 0 0 1 1.18,3.23 v 17.08 a 1.07,1.07 0 0 0 2.13,0 V 75.6 a 6.46,6.46 0 0 0 -1.8,-4.74 c -1.83,-1.82 -5.06,-2.71 -9.86,-2.71 z m -9.68,0.91 3.2,23.46 a 1.07,1.07 0 0 1 -2.12,0.29 L 96.67,70.27 h -17.2 v 4.26 H 91.2 a 1.06,1.06 0 0 1 1.06,1 l 2.13,21.34 a 1.05,1.05 0 0 1 -1,1.16 h -0.11 a 1.07,1.07 0 0 1 -1.06,-1 l -2,-20.37 h -14 c -5,0 -7.47,-4.79 -7.47,-7.47 a 1.07,1.07 0 0 1 1.07,-1.07 H 97.6 a 1.08,1.08 0 0 1 1.06,0.93 z m -21.33,1.21 h -6.21 c 0.52,1.74 2.16,4.26 5.15,4.26 h 1.06 z m 27.74,0 a 2.14,2.14 0 1 0 -4.27,0 2.11,2.11 0 0 0 1.07,1.83 v 7.77 a 1.07,1.07 0 0 0 2.13,0 V 72.1 a 2.14,2.14 0 0 0 1.07,-1.83 z m 6.4,-19.2 v 0.28 a 2.15,2.15 0 0 1 1.06,1.85 v 2.13 a 2.12,2.12 0 0 1 -1.1,1.87 12.85,12.85 0 0 1 -1.14,3.94 c -1,1.94 -2.43,4.86 -7.36,4.86 C 98,66 96.55,63.08 95.58,61.14 A 12.55,12.55 0 0 1 94.44,57.2 2.13,2.13 0 0 1 93.33,55.33 V 53.2 a 2.13,2.13 0 0 1 1.07,-1.85 v -0.28 a 6.41,6.41 0 0 1 6.4,-6.4 h 4.27 a 6.41,6.41 0 0 1 6.4,6.4 z m -1.07,2.13 a 1.07,1.07 0 0 1 -1.07,-1.07 v -1.06 a 4.27,4.27 0 0 0 -4.26,-4.27 h -4.27 a 4.27,4.27 0 0 0 -4.27,4.27 v 1.06 a 1.06,1.06 0 0 1 -1.06,1.07 v 2.13 a 1.06,1.06 0 0 1 1.06,1.07 9.93,9.93 0 0 0 1,3.79 c 1.11,2.22 2.09,3.68 5.44,3.68 3.35,0 4.34,-1.46 5.45,-3.68 a 10,10 0 0 0 1,-3.79 1.07,1.07 0 0 1 1.07,-1.07 V 53.2 Z m -4.27,0 h -1.06 a 1.07,1.07 0 1 0 0,2.13 h 1.06 a 1.07,1.07 0 1 0 0,-2.13 z m -5.33,0 h -1.07 a 1.07,1.07 0 0 0 0,2.13 h 1.07 a 1.07,1.07 0 1 0 0,-2.13 z m 11.73,27.73 A 1.06,1.06 0 0 0 111.47,82 v 14.93 a 1.07,1.07 0 1 0 2.13,0 V 82 a 1.07,1.07 0 0 0 -1.07,-1.07 z M 88,80.93 H 63.47 a 3.12,3.12 0 0 1 -3.2,-3.2 v -32 a 1.07,1.07 0 0 0 -2.14,0 v 32 a 5.29,5.29 0 0 0 5.34,5.34 H 88 a 1.07,1.07 0 0 0 0,-2.14 z"
+ class="cls-2"
+ id="presentation-man"
+ inkscape:connector-curvature="0"
+ style="fill:#222840" />
+ <path
+ id="path2724"
+ style="fill:#17a81a"
+ d="m 108.63,21.74 h -2 V 9 h 2 v 7.36 l 1.11,-0.11 2.13,-3.51 h 2.19 l -2.59,4.26 2.74,4.78 H 112 l -2.2,-3.78 -1.17,0.12 z m -6.41,0 V 9 h 2 v 12.74 z m -2.57,-6.22 v 4.1 a 0.86,0.86 0 0 0 0.2,0.58 1,1 0 0 0 0.59,0.25 l -0.06,1.49 A 3.8,3.8 0 0 1 98,21.28 6.91,6.91 0 0 1 95.1,21.94 c -1.79,0 -2.68,-1 -2.68,-2.86 a 2.44,2.44 0 0 1 0.73,-2 4,4 0 0 1 2.24,-0.74 l 2.32,-0.2 V 15.5 a 1.33,1.33 0 0 0 -0.31,-1 1.35,1.35 0 0 0 -0.93,-0.29 c -0.77,0 -1.73,0 -2.88,0.14 H 93.01 L 92.93,13 a 15.72,15.72 0 0 1 3.61,-0.46 3.31,3.31 0 0 1 2.38,0.71 3.05,3.05 0 0 1 0.73,2.27 z m -4,2.23 a 1.21,1.21 0 0 0 -1.24,1.35 c 0,0.83 0.37,1.24 1.1,1.24 a 7,7 0 0 0 1.91,-0.29 l 0.32,-0.11 V 17.55 Z M 84,11.2 V 9.41 h 9 v 1.79 h -3.49 v 10.54 h -2 V 11.2 Z m -4.62,3.22 h -2.49 v 4 a 4.12,4.12 0 0 0 0.17,1.46 c 0.1,0.24 0.38,0.36 0.82,0.36 l 1.48,-0.06 0.09,1.57 A 11,11 0 0 1 77.61,21.98 2.55,2.55 0 0 1 75.52,21.28 4.41,4.41 0 0 1 75,18.59 V 14.42 H 73.8 V 12.74 H 75 v -2.61 h 1.94 v 2.61 h 2.49 z m -11.94,7.52 c -1.87,0 -3.17,-0.5 -3.91,-1.51 a 8.16,8.16 0 0 1 -1.11,-4.78 8.43,8.43 0 0 1 1.13,-4.85 c 0.75,-1.06 2,-1.58 3.89,-1.58 1.89,0 3.15,0.52 3.89,1.57 a 8.41,8.41 0 0 1 1.12,4.85 11.08,11.08 0 0 1 -0.45,3.49 4,4 0 0 1 -1.5,2 l 1.5,2.47 -1.86,0.86 -1.6,-2.63 a 3.68,3.68 0 0 1 -1.1,0.11 z m -2.34,-2.8 a 3.13,3.13 0 0 0 4.68,0 7.43,7.43 0 0 0 0.6,-3.5 7.78,7.78 0 0 0 -0.62,-3.58 3,3 0 0 0 -4.64,0 7.56,7.56 0 0 0 -0.63,3.56 7.47,7.47 0 0 0 0.61,3.52 z"
+ inkscape:connector-curvature="0" />
+ </g>
+ </g>
+ <g
+ inkscape:groupmode="layer"
id="layer6"
inkscape:label="Tools logos"
style="display:inline">