forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.10'
Change-Id: I4a22cdf4d7d5aab2083d5f9f7baaa38e510f83fd
This commit is contained in:
@@ -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('[]'):
|
||||
|
@@ -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)
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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:
|
||||
|
Reference in New Issue
Block a user