diff options
author | Eike Ziller <eike.ziller@qt.io> | 2019-09-23 12:31:58 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2019-09-23 12:31:58 +0200 |
commit | 0491c1c06caaa20f40b7fd35b1f219b181e776d3 (patch) | |
tree | 0b10ac374bf8bdcc0736e6c06dc5c0b4e6cf4305 | |
parent | 57749e91e8e36bc6fd9fe8e472910c3619da42c1 (diff) | |
parent | d8c78538a6af184d7ee672173d0a1b285dad4b89 (diff) | |
download | qt-creator-0491c1c06caaa20f40b7fd35b1f219b181e776d3.tar.gz |
Merge remote-tracking branch 'origin/4.10'
Change-Id: I4a22cdf4d7d5aab2083d5f9f7baaa38e510f83fd
-rw-r--r-- | share/qtcreator/debugger/dumper.py | 4 | ||||
-rw-r--r-- | share/qtcreator/debugger/lldbbridge.py | 3 | ||||
-rw-r--r-- | src/libs/utils/fadingindicator.cpp | 26 | ||||
-rw-r--r-- | src/plugins/projectexplorer/appoutputpane.cpp | 4 | ||||
-rw-r--r-- | src/plugins/qmldesigner/designercore/metainfo/nodehints.cpp | 22 | ||||
-rw-r--r-- | tests/auto/debugger/tst_dumpers.cpp | 35 |
6 files changed, 81 insertions, 13 deletions
diff --git a/share/qtcreator/debugger/dumper.py b/share/qtcreator/debugger/dumper.py index e716cb701e..04969d8e32 100644 --- a/share/qtcreator/debugger/dumper.py +++ b/share/qtcreator/debugger/dumper.py @@ -2837,8 +2837,8 @@ class DumperBase: return if typeobj.code == TypeCodeFortranString: - data = self.value.data() - self.putValue(data, 'latin1', 1) + self.putValue(self.hexencode(value.data()), 'latin1') + self.putNumChild(0) self.putType(typeobj) if typeName.endswith('[]'): diff --git a/share/qtcreator/debugger/lldbbridge.py b/share/qtcreator/debugger/lldbbridge.py index 838578a057..34589e0dd8 100644 --- a/share/qtcreator/debugger/lldbbridge.py +++ b/share/qtcreator/debugger/lldbbridge.py @@ -841,7 +841,8 @@ class Dumper(DumperBase): self.startMode_ = args.get('startmode', 1) self.breakOnMain_ = args.get('breakonmain', 0) self.useTerminal_ = args.get('useterminal', 0) - self.processArgs_ = self.hexdecode(args.get('processargs', '')).split('\0') + pargs = self.hexdecode(args.get('processargs', '')) + self.processArgs_ = pargs.split('\0') if len(pargs) else [] self.environment_ = args.get('environment', []) self.environment_ = list(map(lambda x: self.hexdecode(x), self.environment_)) self.attachPid_ = args.get('attachpid', 0) diff --git a/src/libs/utils/fadingindicator.cpp b/src/libs/utils/fadingindicator.cpp index 1c822aeaba..31ebbb7916 100644 --- a/src/libs/utils/fadingindicator.cpp +++ b/src/libs/utils/fadingindicator.cpp @@ -69,8 +69,11 @@ public: m_label->setText(text); layout()->setSizeConstraint(QLayout::SetFixedSize); adjustSize(); - if (QWidget *parent = parentWidget()) - move(parent->rect().center() - rect().center()); + QWidget *parent = parentWidget(); + QPoint pos = parent ? (parent->rect().center() - rect().center()) : QPoint(); + if (pixmapIndicator && pixmapIndicator->geometry().intersects(QRect(pos, size()))) + pos.setY(pixmapIndicator->geometry().bottom() + 1); + move(pos); } void setPixmap(const QString &uri) @@ -79,8 +82,11 @@ public: m_pixmap.load(StyleHelper::dpiSpecificImageFile(uri)); layout()->setSizeConstraint(QLayout::SetNoConstraint); resize(m_pixmap.size() / m_pixmap.devicePixelRatio()); - if (QWidget *parent = parentWidget()) - move(parent->rect().center() - rect().center()); + QWidget *parent = parentWidget(); + QPoint pos = parent ? (parent->rect().center() - rect().center()) : QPoint(); + if (textIndicator && textIndicator->geometry().intersects(QRect(pos, size()))) + pos.setY(textIndicator->geometry().bottom() + 1); + move(pos); } void run(int ms) @@ -90,6 +96,9 @@ public: QTimer::singleShot(ms, this, &FadingIndicatorPrivate::runInternal); } + static QPointer<FadingIndicatorPrivate> textIndicator; + static QPointer<FadingIndicatorPrivate> pixmapIndicator; + protected: void paintEvent(QPaintEvent *) override { @@ -119,13 +128,17 @@ private: QPixmap m_pixmap; }; +QPointer<FadingIndicatorPrivate> FadingIndicatorPrivate::textIndicator; +QPointer<FadingIndicatorPrivate> FadingIndicatorPrivate::pixmapIndicator; + } // Internal namespace FadingIndicator { void showText(QWidget *parent, const QString &text, TextSize size) { - static QPointer<Internal::FadingIndicatorPrivate> indicator; + QPointer<Internal::FadingIndicatorPrivate> &indicator + = Internal::FadingIndicatorPrivate::textIndicator; if (indicator) delete indicator; indicator = new Internal::FadingIndicatorPrivate(parent, size); @@ -135,7 +148,8 @@ void showText(QWidget *parent, const QString &text, TextSize size) void showPixmap(QWidget *parent, const QString &pixmap) { - static QPointer<Internal::FadingIndicatorPrivate> indicator; + QPointer<Internal::FadingIndicatorPrivate> &indicator + = Internal::FadingIndicatorPrivate::pixmapIndicator; if (indicator) delete indicator; indicator = new Internal::FadingIndicatorPrivate(parent, LargeText); diff --git a/src/plugins/projectexplorer/appoutputpane.cpp b/src/plugins/projectexplorer/appoutputpane.cpp index d9f2f06fc8..28133cfe71 100644 --- a/src/plugins/projectexplorer/appoutputpane.cpp +++ b/src/plugins/projectexplorer/appoutputpane.cpp @@ -456,9 +456,9 @@ void AppOutputPane::createNewOutputWindow(RunControl *rc) tab.window->setFontZoom(fontZoom); }); connect(TextEditor::TextEditorSettings::instance(), &TextEditor::TextEditorSettings::fontSettingsChanged, - this, updateFontSettings); + ow, updateFontSettings); connect(TextEditor::TextEditorSettings::instance(), &TextEditor::TextEditorSettings::behaviorSettingsChanged, - this, updateBehaviorSettings); + ow, updateBehaviorSettings); auto *agg = new Aggregation::Aggregate; agg->add(ow); diff --git a/src/plugins/qmldesigner/designercore/metainfo/nodehints.cpp b/src/plugins/qmldesigner/designercore/metainfo/nodehints.cpp index dcb350c448..4862b59c04 100644 --- a/src/plugins/qmldesigner/designercore/metainfo/nodehints.cpp +++ b/src/plugins/qmldesigner/designercore/metainfo/nodehints.cpp @@ -31,6 +31,7 @@ #include <rewriterview.h> #include <propertyparser.h> #include <nodeabstractproperty.h> +#include <nodemetainfo.h> #include <QDebug> @@ -89,13 +90,30 @@ static QVariant evaluateExpression(const QString &expression, const ModelNode &m QmlDesigner::NodeHints::NodeHints(const ModelNode &node) : m_modelNode(node) { - if (isValid()) { - const ItemLibraryInfo *libraryInfo = model()->metaInfo().itemLibraryInfo(); + if (!isValid()) + return; + + const ItemLibraryInfo *libraryInfo = model()->metaInfo().itemLibraryInfo(); + + if (!m_modelNode.metaInfo().isValid()) { + QList <ItemLibraryEntry> itemLibraryEntryList = libraryInfo->entriesForType( modelNode().type(), modelNode().majorVersion(), modelNode().minorVersion()); if (!itemLibraryEntryList.isEmpty()) m_hints = itemLibraryEntryList.constFirst().hints(); + } else { /* If we have meta information we run the complete type hierarchy and check for hints */ + const auto classHierarchy = m_modelNode.metaInfo().classHierarchy(); + for (const NodeMetaInfo &metaInfo : classHierarchy) { + QList <ItemLibraryEntry> itemLibraryEntryList = libraryInfo->entriesForType( + metaInfo.typeName(), metaInfo.majorVersion(), metaInfo.minorVersion()); + + if (!itemLibraryEntryList.isEmpty() && !itemLibraryEntryList.constFirst().hints().isEmpty()) { + m_hints = itemLibraryEntryList.constFirst().hints(); + return; + } + + } } } diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp index 3faa87b1d2..bbee83bc47 100644 --- a/tests/auto/debugger/tst_dumpers.cpp +++ b/tests/auto/debugger/tst_dumpers.cpp @@ -7267,6 +7267,41 @@ void tst_Dumpers::dumper_data() + Check("f1", "1", "@QSqlField (qlonglong)") + Check("f2", "\"qt-logo.png\"", "@QSqlField (QString)") + Check("f3", "(invalid)", "@QSqlField (invalid)"); + + + Data f90data; + f90data.configTest = "which f95"; + f90data.allProfile = + "CONFIG -= qt\n" + "SOURCES += main.f90\n" + "# Prevents linking\n" + "TARGET=\n" + "# Overwrites qmake-generated 'all' target.\n" + "all.commands = f95 -g -o doit main.f90\n" + "all.depends = main.f90\n" + "all.CONFIG = phony\n\n" + "QMAKE_EXTRA_TARGETS += all\n"; + + f90data.allCode = + "program test_fortran\n\n" + " implicit none\n\n" + " character(8) :: c8\n" + " integer(8) :: i8\n\n" + " i8 = 1337\n" + " c8 = 'c_____a_'\n" + " ! write (*,*) c8\n" + " i8 = i8 / 0\n" + "end program\n"; + + f90data.mainFile = "main.f90"; + + QTest::newRow("F90") + << f90data + + GdbEngine + + Check("c8", "\"c_____a_\"", "character *8") + + Check("i8", "1337", "integer(kind=8)"); + + #if 0 #ifdef Q_OS_LINUX // Hint: To open a failing test in Creator, do: |