forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/3.3'
Conflicts: src/plugins/debugger/watchhandler.cpp src/plugins/projectexplorer/kitmodel.cpp src/plugins/qbsprojectmanager/qbsprojectmanager.cpp src/shared/qbs Change-Id: I6a68090993a264e93ac7850858cc24ba6bdb5602
This commit is contained in:
@@ -258,7 +258,7 @@
|
|||||||
changed over time, so they differ between Qt and \QC versions. Since \QC
|
changed over time, so they differ between Qt and \QC versions. Since \QC
|
||||||
version 3.3, only Qt 5 is supported for building documentation. The
|
version 3.3, only Qt 5 is supported for building documentation. The
|
||||||
templates to use are defined by the
|
templates to use are defined by the
|
||||||
\c qt5\qtbase\doc\global\qt-html-templates-offline.qdocconf} and
|
\c {qt5\qtbase\doc\global\qt-html-templates-offline.qdocconf} and
|
||||||
\c {qt5\qtbase\doc\global\qt-html-templates-online.qdocconf} configuration
|
\c {qt5\qtbase\doc\global\qt-html-templates-online.qdocconf} configuration
|
||||||
file. They are fetched from Qt sources by adding the following lines to the
|
file. They are fetched from Qt sources by adding the following lines to the
|
||||||
qdocconf file:
|
qdocconf file:
|
||||||
@@ -266,11 +266,14 @@
|
|||||||
\list
|
\list
|
||||||
|
|
||||||
\li \c {include ($QT_INSTALL_DOCS/global/qt-html-templates-offline.qdocconf)}
|
\li \c {include ($QT_INSTALL_DOCS/global/qt-html-templates-offline.qdocconf)}
|
||||||
for publishing on the web
|
|
||||||
\li \c {include ($QT_INSTALL_DOCS/global/qt-html-templates-online.qdocconf)}
|
|
||||||
for help files
|
for help files
|
||||||
|
\li \c {include ($QT_INSTALL_DOCS/global/qt-html-templates-online.qdocconf)}
|
||||||
|
for publishing on the web
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
|
\note To have the correct fonts loaded for the online version, you must be
|
||||||
|
running it on a web server.
|
||||||
|
|
||||||
\note If the styles look wrong to you when reading help files in \QC or \QA,
|
\note If the styles look wrong to you when reading help files in \QC or \QA,
|
||||||
you might be looking at them in the QTextBrowser instead of the WebKit
|
you might be looking at them in the QTextBrowser instead of the WebKit
|
||||||
browser. This happens if you build \QC and \QA with a self-built Qt and did
|
browser. This happens if you build \QC and \QA with a self-built Qt and did
|
||||||
|
@@ -34,6 +34,9 @@
|
|||||||
You can use \QC wizards to create UI forms that have the filename extension
|
You can use \QC wizards to create UI forms that have the filename extension
|
||||||
\e .ui.qml. The UI forms contain a purely declarative subset of the QML
|
\e .ui.qml. The UI forms contain a purely declarative subset of the QML
|
||||||
language. It is recommended that you edit the forms in the \uicontrol Design mode.
|
language. It is recommended that you edit the forms in the \uicontrol Design mode.
|
||||||
|
However, exporting items as alias properties is a commercial only feature,
|
||||||
|
and therefore you must use the \uicontrol Edit mode to do it if you are
|
||||||
|
using the open source version of \QC.
|
||||||
\QC enforces the use of the supported QML features by displaying error
|
\QC enforces the use of the supported QML features by displaying error
|
||||||
messages.
|
messages.
|
||||||
|
|
||||||
|
@@ -67,7 +67,7 @@ SpinBoxStyle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
implicitWidth: Math.max(60, styleData.contentWidth)
|
implicitWidth: Math.max(64, styleData.contentWidth)
|
||||||
implicitHeight: 23
|
implicitHeight: 23
|
||||||
border.color: borderColor
|
border.color: borderColor
|
||||||
radius: 3
|
radius: 3
|
||||||
|
@@ -39,79 +39,6 @@ SpinBox {
|
|||||||
property color highlightColor: "orange"
|
property color highlightColor: "orange"
|
||||||
property color textColor: "#eee"
|
property color textColor: "#eee"
|
||||||
|
|
||||||
function showSlider() {
|
|
||||||
timer.stop()
|
|
||||||
timer2.start()
|
|
||||||
slider.opacity = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
onHoveredChanged: {
|
|
||||||
if (hovered)
|
|
||||||
showSlider();
|
|
||||||
}
|
|
||||||
|
|
||||||
Slider {
|
|
||||||
id: slider
|
|
||||||
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.top: parent.bottom
|
|
||||||
height: 10;
|
|
||||||
//opacity: 0
|
|
||||||
|
|
||||||
maximumValue: spinBox.maximumValue
|
|
||||||
minimumValue: spinBox.minimumValue
|
|
||||||
|
|
||||||
value: spinBox.value
|
|
||||||
visible: false
|
|
||||||
|
|
||||||
onValueChanged: {
|
|
||||||
spinBox.value = value
|
|
||||||
}
|
|
||||||
|
|
||||||
Behavior on opacity {
|
|
||||||
PropertyAnimation {
|
|
||||||
duration: 100
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onHoveredChanged: {
|
|
||||||
if (!hovered) {
|
|
||||||
timer.startTimer();
|
|
||||||
} else {
|
|
||||||
timer2.stop()
|
|
||||||
timer.stop()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Timer {
|
|
||||||
id: timer
|
|
||||||
repeat: false
|
|
||||||
function startTimer() {
|
|
||||||
if (!timer.running)
|
|
||||||
timer.start()
|
|
||||||
}
|
|
||||||
interval: 600
|
|
||||||
|
|
||||||
onTriggered: {
|
|
||||||
return
|
|
||||||
if (!slider.hovered)
|
|
||||||
slider.opacity = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Timer {
|
|
||||||
id: timer2
|
|
||||||
repeat: false
|
|
||||||
interval: 1000
|
|
||||||
onTriggered: {
|
|
||||||
return
|
|
||||||
if (!slider.hovered)
|
|
||||||
slider.opacity = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
style: CustomSpinBoxStyle {
|
style: CustomSpinBoxStyle {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -63,25 +63,6 @@ Controls.SpinBox {
|
|||||||
backendValue.value = value;
|
backendValue.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
Controls.Slider {
|
|
||||||
id: slider
|
|
||||||
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.top: parent.bottom
|
|
||||||
height: 10
|
|
||||||
visible: false
|
|
||||||
|
|
||||||
maximumValue: spinBox.maximumValue
|
|
||||||
minimumValue: spinBox.minimumValue
|
|
||||||
|
|
||||||
value: spinBox.value
|
|
||||||
|
|
||||||
onValueChanged: {
|
|
||||||
spinBox.value = value
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
style: CustomSpinBoxStyle {
|
style: CustomSpinBoxStyle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -51,7 +51,7 @@ Column {
|
|||||||
SecondColumnLayout {
|
SecondColumnLayout {
|
||||||
SpinBox {
|
SpinBox {
|
||||||
backendValue: backendValues.dragMargin
|
backendValue: backendValues.dragMargin
|
||||||
minimumValue: 100;
|
minimumValue: 0;
|
||||||
maximumValue: 100;
|
maximumValue: 100;
|
||||||
decimals: 0
|
decimals: 0
|
||||||
}
|
}
|
||||||
|
@@ -631,10 +631,15 @@ QList<LookupItem> ClassOrNamespace::lookup_helper(const Name *name, bool searchI
|
|||||||
// a qualified name. For instance, a nested class which is forward declared
|
// a qualified name. For instance, a nested class which is forward declared
|
||||||
// in the class but defined outside it - we should capture both.
|
// in the class but defined outside it - we should capture both.
|
||||||
Symbol *match = 0;
|
Symbol *match = 0;
|
||||||
|
QSet<ClassOrNamespace *> processed;
|
||||||
for (ClassOrNamespace *parentBinding = binding->parent();
|
for (ClassOrNamespace *parentBinding = binding->parent();
|
||||||
parentBinding && !match;
|
parentBinding && !match;
|
||||||
parentBinding = parentBinding->parent())
|
parentBinding = parentBinding->parent()) {
|
||||||
|
if (processed.contains(parentBinding))
|
||||||
|
break;
|
||||||
|
processed.insert(parentBinding);
|
||||||
match = parentBinding->lookupInScope(fullName);
|
match = parentBinding->lookupInScope(fullName);
|
||||||
|
}
|
||||||
|
|
||||||
if (match) {
|
if (match) {
|
||||||
LookupItem item;
|
LookupItem item;
|
||||||
@@ -648,8 +653,12 @@ QList<LookupItem> ClassOrNamespace::lookup_helper(const Name *name, bool searchI
|
|||||||
}
|
}
|
||||||
|
|
||||||
QSet<ClassOrNamespace *> processed;
|
QSet<ClassOrNamespace *> processed;
|
||||||
|
QSet<ClassOrNamespace *> processedOwnParents;
|
||||||
ClassOrNamespace *binding = this;
|
ClassOrNamespace *binding = this;
|
||||||
do {
|
do {
|
||||||
|
if (processedOwnParents.contains(binding))
|
||||||
|
break;
|
||||||
|
processedOwnParents.insert(binding);
|
||||||
lookup_helper(name, binding, &result, &processed, /*templateId = */ 0);
|
lookup_helper(name, binding, &result, &processed, /*templateId = */ 0);
|
||||||
binding = binding->_parent;
|
binding = binding->_parent;
|
||||||
} while (searchInEnclosingScope && binding);
|
} while (searchInEnclosingScope && binding);
|
||||||
|
@@ -140,6 +140,12 @@ static bool isQtReservedWord(const char *name, int size)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void nestingTooDeep()
|
||||||
|
{
|
||||||
|
#ifndef NO_DEBUG
|
||||||
|
std::cerr << "*** WARNING #if / #ifdef nesting exceeded the max level " << MAX_LEVEL << std::endl;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
|
|
||||||
@@ -1824,6 +1830,12 @@ void Preprocessor::handleIfDirective(PPToken *tk)
|
|||||||
lex(tk); // consume "if" token
|
lex(tk); // consume "if" token
|
||||||
Value result;
|
Value result;
|
||||||
const PPToken lastExpressionToken = evalExpression(tk, result);
|
const PPToken lastExpressionToken = evalExpression(tk, result);
|
||||||
|
|
||||||
|
if (m_state.m_ifLevel >= MAX_LEVEL - 1) {
|
||||||
|
nestingTooDeep();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const bool value = !result.is_zero();
|
const bool value = !result.is_zero();
|
||||||
|
|
||||||
const bool wasSkipping = m_state.m_skipping[m_state.m_ifLevel];
|
const bool wasSkipping = m_state.m_skipping[m_state.m_ifLevel];
|
||||||
@@ -1950,12 +1962,17 @@ void Preprocessor::handleIfDefDirective(bool checkUndefined, PPToken *tk)
|
|||||||
value = !value;
|
value = !value;
|
||||||
|
|
||||||
const bool wasSkipping = m_state.m_skipping[m_state.m_ifLevel];
|
const bool wasSkipping = m_state.m_skipping[m_state.m_ifLevel];
|
||||||
++m_state.m_ifLevel;
|
|
||||||
m_state.m_trueTest[m_state.m_ifLevel] = value;
|
|
||||||
m_state.m_skipping[m_state.m_ifLevel] = wasSkipping ? wasSkipping : !value;
|
|
||||||
|
|
||||||
if (m_client && !wasSkipping && !value)
|
if (m_state.m_ifLevel < MAX_LEVEL - 1) {
|
||||||
startSkippingBlocks(*tk);
|
++m_state.m_ifLevel;
|
||||||
|
m_state.m_trueTest[m_state.m_ifLevel] = value;
|
||||||
|
m_state.m_skipping[m_state.m_ifLevel] = wasSkipping ? wasSkipping : !value;
|
||||||
|
|
||||||
|
if (m_client && !wasSkipping && !value)
|
||||||
|
startSkippingBlocks(*tk);
|
||||||
|
} else {
|
||||||
|
nestingTooDeep();
|
||||||
|
}
|
||||||
|
|
||||||
lex(tk); // consume the identifier
|
lex(tk); // consume the identifier
|
||||||
#ifndef NO_DEBUG
|
#ifndef NO_DEBUG
|
||||||
|
@@ -1006,7 +1006,8 @@ void ModelManagerInterface::importScan(QFutureInterface<void> &future,
|
|||||||
int totalWork(progressRange), workDone(0);
|
int totalWork(progressRange), workDone(0);
|
||||||
future.setProgressRange(0, progressRange); // update max length while iterating?
|
future.setProgressRange(0, progressRange); // update max length while iterating?
|
||||||
const Snapshot snapshot = modelManager->snapshot();
|
const Snapshot snapshot = modelManager->snapshot();
|
||||||
while (!pathsToScan.isEmpty() && !future.isCanceled()) {
|
bool isCanceled = future.isCanceled();
|
||||||
|
while (!pathsToScan.isEmpty() && !isCanceled) {
|
||||||
ScanItem toScan = pathsToScan.last();
|
ScanItem toScan = pathsToScan.last();
|
||||||
pathsToScan.pop_back();
|
pathsToScan.pop_back();
|
||||||
int pathBudget = (1 << (maxScanDepth + 2 - toScan.depth));
|
int pathBudget = (1 << (maxScanDepth + 2 - toScan.depth));
|
||||||
@@ -1043,9 +1044,10 @@ void ModelManagerInterface::importScan(QFutureInterface<void> &future,
|
|||||||
workDone += pathBudget * 3 / 4;
|
workDone += pathBudget * 3 / 4;
|
||||||
}
|
}
|
||||||
future.setProgressValue(progressRange * workDone / totalWork);
|
future.setProgressValue(progressRange * workDone / totalWork);
|
||||||
|
isCanceled = future.isCanceled();
|
||||||
}
|
}
|
||||||
future.setProgressValue(progressRange);
|
future.setProgressValue(progressRange);
|
||||||
if (future.isCanceled()) {
|
if (isCanceled) {
|
||||||
// assume no work has been done
|
// assume no work has been done
|
||||||
QMutexLocker l(&modelManager->m_mutex);
|
QMutexLocker l(&modelManager->m_mutex);
|
||||||
for (int i = 0; i < paths.size(); ++i)
|
for (int i = 0; i < paths.size(); ++i)
|
||||||
|
@@ -354,6 +354,7 @@ QPalette Theme::palette() const
|
|||||||
pal.setBrush(QPalette::ButtonText, color(Theme::TextColorNormal));
|
pal.setBrush(QPalette::ButtonText, color(Theme::TextColorNormal));
|
||||||
pal.setBrush(QPalette::ToolTipBase, color(Theme::BackgroundColorSelected));
|
pal.setBrush(QPalette::ToolTipBase, color(Theme::BackgroundColorSelected));
|
||||||
pal.setColor(QPalette::Highlight, color(Theme::BackgroundColorSelected));
|
pal.setColor(QPalette::Highlight, color(Theme::BackgroundColorSelected));
|
||||||
|
pal.setColor(QPalette::Dark, color(Theme::BackgroundColorDark));
|
||||||
pal.setColor(QPalette::HighlightedText, Qt::white);
|
pal.setColor(QPalette::HighlightedText, Qt::white);
|
||||||
pal.setColor(QPalette::ToolTipText, color(Theme::TextColorNormal));
|
pal.setColor(QPalette::ToolTipText, color(Theme::TextColorNormal));
|
||||||
return pal;
|
return pal;
|
||||||
|
@@ -8,11 +8,6 @@ QT += script network
|
|||||||
|
|
||||||
CONFIG += exceptions # used by portlist.cpp, textfileformat.cpp, and ssh/*
|
CONFIG += exceptions # used by portlist.cpp, textfileformat.cpp, and ssh/*
|
||||||
|
|
||||||
win32-msvc* {
|
|
||||||
# disable warnings caused by botan headers
|
|
||||||
QMAKE_CXXFLAGS += -wd4250 -wd4290
|
|
||||||
}
|
|
||||||
|
|
||||||
SOURCES += $$PWD/environment.cpp \
|
SOURCES += $$PWD/environment.cpp \
|
||||||
$$PWD/environmentmodel.cpp \
|
$$PWD/environmentmodel.cpp \
|
||||||
$$PWD/qtcprocess.cpp \
|
$$PWD/qtcprocess.cpp \
|
||||||
|
@@ -390,14 +390,6 @@ void AndroidRunner::asyncStart()
|
|||||||
args << _("-e") << _("qml_debug") << _("true");
|
args << _("-e") << _("qml_debug") << _("true");
|
||||||
args << _("-e") << _("qmljsdebugger") << QString::fromLatin1("port:%1,block").arg(m_qmlPort);
|
args << _("-e") << _("qmljsdebugger") << QString::fromLatin1("port:%1,block").arg(m_qmlPort);
|
||||||
}
|
}
|
||||||
if (m_useLocalQtLibs) {
|
|
||||||
args << _("-e") << _("use_local_qt_libs") << _("true");
|
|
||||||
args << _("-e") << _("libs_prefix") << _("/data/local/tmp/qt/");
|
|
||||||
args << _("-e") << _("load_local_libs") << m_localLibs;
|
|
||||||
args << _("-e") << _("load_local_jars") << m_localJars;
|
|
||||||
if (!m_localJarsInitClasses.isEmpty())
|
|
||||||
args << _("-e") << _("static_init_classes") << m_localJarsInitClasses;
|
|
||||||
}
|
|
||||||
|
|
||||||
QProcess adb;
|
QProcess adb;
|
||||||
adb.start(m_adb, args);
|
adb.start(m_adb, args);
|
||||||
|
@@ -518,7 +518,7 @@ void QmlEngine::serviceConnectionError(const QString &serviceName)
|
|||||||
|
|
||||||
bool QmlEngine::canDisplayTooltip() const
|
bool QmlEngine::canDisplayTooltip() const
|
||||||
{
|
{
|
||||||
return state() == InferiorRunOk || state() == InferiorStopOk;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlEngine::filterApplicationMessage(const QString &output, int /*channel*/)
|
void QmlEngine::filterApplicationMessage(const QString &output, int /*channel*/)
|
||||||
|
@@ -127,7 +127,6 @@ public:
|
|||||||
|
|
||||||
QScriptValue parser;
|
QScriptValue parser;
|
||||||
QScriptValue stringifier;
|
QScriptValue stringifier;
|
||||||
QStringList scriptSourceRequests;
|
|
||||||
|
|
||||||
QHash<int, QString> evaluatingExpression;
|
QHash<int, QString> evaluatingExpression;
|
||||||
QHash<int, QByteArray> localsAndWatchers;
|
QHash<int, QByteArray> localsAndWatchers;
|
||||||
@@ -952,6 +951,9 @@ void QmlV8DebuggerClient::executeDebuggerCommand(const QString &command)
|
|||||||
void QmlV8DebuggerClient::synchronizeWatchers(const QStringList &watchers)
|
void QmlV8DebuggerClient::synchronizeWatchers(const QStringList &watchers)
|
||||||
{
|
{
|
||||||
SDEBUG(watchers);
|
SDEBUG(watchers);
|
||||||
|
if (d->engine->state() != InferiorStopOk)
|
||||||
|
return;
|
||||||
|
|
||||||
foreach (const QString &exp, watchers) {
|
foreach (const QString &exp, watchers) {
|
||||||
StackHandler *stackHandler = d->engine->stackHandler();
|
StackHandler *stackHandler = d->engine->stackHandler();
|
||||||
if (stackHandler->isContentsValid() && stackHandler->currentFrame().isUsable()) {
|
if (stackHandler->isContentsValid() && stackHandler->currentFrame().isUsable()) {
|
||||||
|
@@ -1629,7 +1629,7 @@ int WatchHandler::format(const QByteArray &iname) const
|
|||||||
{
|
{
|
||||||
int result = AutomaticFormat;
|
int result = AutomaticFormat;
|
||||||
if (const WatchItem *item = m_model->findItem(iname)) {
|
if (const WatchItem *item = m_model->findItem(iname)) {
|
||||||
int result = theIndividualFormats.value(item->d.iname, AutomaticFormat);
|
result = theIndividualFormats.value(item->d.iname, AutomaticFormat);
|
||||||
if (result == AutomaticFormat)
|
if (result == AutomaticFormat)
|
||||||
result = theTypeFormats.value(stripForFormat(item->d.type), AutomaticFormat);
|
result = theTypeFormats.value(stripForFormat(item->d.type), AutomaticFormat);
|
||||||
}
|
}
|
||||||
|
@@ -402,6 +402,7 @@ QtWebKitHelpViewer::QtWebKitHelpViewer(QWidget *parent)
|
|||||||
|
|
||||||
QPalette p = palette();
|
QPalette p = palette();
|
||||||
p.setColor(QPalette::Base, Qt::white);
|
p.setColor(QPalette::Base, Qt::white);
|
||||||
|
p.setColor(QPalette::Text, Qt::black);
|
||||||
setPalette(p);
|
setPalette(p);
|
||||||
|
|
||||||
connect(m_webView, SIGNAL(urlChanged(QUrl)), this, SIGNAL(sourceChanged(QUrl)));
|
connect(m_webView, SIGNAL(urlChanged(QUrl)), this, SIGNAL(sourceChanged(QUrl)));
|
||||||
|
@@ -65,6 +65,7 @@ TextBrowserHelpViewer::TextBrowserHelpViewer(QWidget *parent)
|
|||||||
p.setColor(QPalette::Inactive, QPalette::HighlightedText,
|
p.setColor(QPalette::Inactive, QPalette::HighlightedText,
|
||||||
p.color(QPalette::Active, QPalette::HighlightedText));
|
p.color(QPalette::Active, QPalette::HighlightedText));
|
||||||
p.setColor(QPalette::Base, Qt::white);
|
p.setColor(QPalette::Base, Qt::white);
|
||||||
|
p.setColor(QPalette::Text, Qt::black);
|
||||||
setPalette(p);
|
setPalette(p);
|
||||||
|
|
||||||
connect(m_textBrowser, SIGNAL(sourceChanged(QUrl)), this, SIGNAL(titleChanged()));
|
connect(m_textBrowser, SIGNAL(sourceChanged(QUrl)), this, SIGNAL(titleChanged()));
|
||||||
|
@@ -582,16 +582,19 @@ QString Kit::toHtml(const QList<Task> &additional) const
|
|||||||
void Kit::setAutoDetected(bool detected)
|
void Kit::setAutoDetected(bool detected)
|
||||||
{
|
{
|
||||||
d->m_autodetected = detected;
|
d->m_autodetected = detected;
|
||||||
|
kitUpdated();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Kit::setAutoDetectionSource(const QString &autoDetectionSource)
|
void Kit::setAutoDetectionSource(const QString &autoDetectionSource)
|
||||||
{
|
{
|
||||||
d->m_autoDetectionSource = autoDetectionSource;
|
d->m_autoDetectionSource = autoDetectionSource;
|
||||||
|
kitUpdated();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Kit::setSdkProvided(bool sdkProvided)
|
void Kit::setSdkProvided(bool sdkProvided)
|
||||||
{
|
{
|
||||||
d->m_sdkProvided = sdkProvided;
|
d->m_sdkProvided = sdkProvided;
|
||||||
|
kitUpdated();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Kit::makeSticky()
|
void Kit::makeSticky()
|
||||||
@@ -608,11 +611,13 @@ void Kit::setSticky(Id id, bool b)
|
|||||||
d->m_sticky.insert(id);
|
d->m_sticky.insert(id);
|
||||||
else
|
else
|
||||||
d->m_sticky.remove(id);
|
d->m_sticky.remove(id);
|
||||||
|
kitUpdated();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Kit::makeUnSticky()
|
void Kit::makeUnSticky()
|
||||||
{
|
{
|
||||||
d->m_sticky.clear();
|
d->m_sticky.clear();
|
||||||
|
kitUpdated();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Kit::setMutable(Id id, bool b)
|
void Kit::setMutable(Id id, bool b)
|
||||||
@@ -621,6 +626,7 @@ void Kit::setMutable(Id id, bool b)
|
|||||||
d->m_mutable.insert(id);
|
d->m_mutable.insert(id);
|
||||||
else
|
else
|
||||||
d->m_mutable.remove(id);
|
d->m_mutable.remove(id);
|
||||||
|
kitUpdated();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Kit::isMutable(Id id) const
|
bool Kit::isMutable(Id id) const
|
||||||
|
@@ -354,8 +354,12 @@ void KitManagerConfigWidget::workingCopyWasUpdated(Kit *k)
|
|||||||
|
|
||||||
void KitManagerConfigWidget::kitWasUpdated(Kit *k)
|
void KitManagerConfigWidget::kitWasUpdated(Kit *k)
|
||||||
{
|
{
|
||||||
if (m_kit == k)
|
if (m_kit == k) {
|
||||||
|
bool emitSignal = m_kit->isAutoDetected() != m_modifiedKit->isAutoDetected();
|
||||||
discard();
|
discard();
|
||||||
|
if (emitSignal)
|
||||||
|
emit isAutoDetectedChanged();
|
||||||
|
}
|
||||||
updateVisibility();
|
updateVisibility();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -77,6 +77,7 @@ public:
|
|||||||
|
|
||||||
signals:
|
signals:
|
||||||
void dirty();
|
void dirty();
|
||||||
|
void isAutoDetectedChanged();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void setIcon();
|
void setIcon();
|
||||||
|
@@ -170,6 +170,31 @@ KitManagerConfigWidget *KitModel::widget(const QModelIndex &index)
|
|||||||
return n ? n->widget : 0;
|
return n ? n->widget : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void KitModel::isAutoDetectedChanged()
|
||||||
|
{
|
||||||
|
KitManagerConfigWidget *w = qobject_cast<KitManagerConfigWidget *>(sender());
|
||||||
|
int idx = -1;
|
||||||
|
idx = Utils::indexOf(m_manualRoot->childNodes, [w](KitNode *node) { return node->widget == w; });
|
||||||
|
KitNode *oldParent = 0;
|
||||||
|
KitNode *newParent = w->workingCopy()->isAutoDetected() ? m_autoRoot : m_manualRoot;
|
||||||
|
if (idx != -1) {
|
||||||
|
oldParent = m_manualRoot;
|
||||||
|
} else {
|
||||||
|
idx = Utils::indexOf(m_autoRoot->childNodes, [w](KitNode *node) { return node->widget == w; });
|
||||||
|
if (idx != -1) {
|
||||||
|
oldParent = m_autoRoot;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (oldParent && oldParent != newParent) {
|
||||||
|
beginMoveRows(index(oldParent), idx, idx, index(newParent), newParent->childNodes.size());
|
||||||
|
KitNode *n = oldParent->childNodes.takeAt(idx);
|
||||||
|
n->parent = newParent;
|
||||||
|
newParent->childNodes.append(n);
|
||||||
|
endMoveRows();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void KitModel::validateKitNames()
|
void KitModel::validateKitNames()
|
||||||
{
|
{
|
||||||
QHash<QString, int> nameHash;
|
QHash<QString, int> nameHash;
|
||||||
@@ -263,6 +288,9 @@ KitNode *KitModel::createNode(Kit *k)
|
|||||||
|| m_manualRoot->children().contains(node))
|
|| m_manualRoot->children().contains(node))
|
||||||
node->update();
|
node->update();
|
||||||
});
|
});
|
||||||
|
connect(node->widget, SIGNAL(isAutoDetectedChanged()),
|
||||||
|
this, SLOT(isAutoDetectedChanged()));
|
||||||
|
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -84,6 +84,7 @@ private:
|
|||||||
void removeKit(ProjectExplorer::Kit *k);
|
void removeKit(ProjectExplorer::Kit *k);
|
||||||
void changeDefaultKit();
|
void changeDefaultKit();
|
||||||
void validateKitNames();
|
void validateKitNames();
|
||||||
|
void isAutoDetectedChanged();
|
||||||
|
|
||||||
KitNode *findWorkingCopy(Kit *k) const;
|
KitNode *findWorkingCopy(Kit *k) const;
|
||||||
KitNode *createNode(Kit *k);
|
KitNode *createNode(Kit *k);
|
||||||
|
@@ -135,12 +135,12 @@ void TargetSelectorDelegate::paint(QPainter *painter,
|
|||||||
selectionGradient.load(QLatin1String(":/projectexplorer/images/targetpanel_gradient.png"));
|
selectionGradient.load(QLatin1String(":/projectexplorer/images/targetpanel_gradient.png"));
|
||||||
|
|
||||||
if (option.state & QStyle::State_Selected) {
|
if (option.state & QStyle::State_Selected) {
|
||||||
|
const QColor color = (option.state & QStyle::State_HasFocus) ?
|
||||||
|
option.palette.highlight().color() :
|
||||||
|
option.palette.dark().color();
|
||||||
if (creatorTheme()->widgetStyle() == Theme::StyleFlat) {
|
if (creatorTheme()->widgetStyle() == Theme::StyleFlat) {
|
||||||
painter->fillRect(option.rect, creatorTheme()->color(Theme::BackgroundColorSelected));
|
painter->fillRect(option.rect, color);
|
||||||
} else {
|
} else {
|
||||||
QColor color =(option.state & QStyle::State_HasFocus) ?
|
|
||||||
option.palette.highlight().color() :
|
|
||||||
option.palette.dark().color();
|
|
||||||
painter->fillRect(option.rect, color.darker(140));
|
painter->fillRect(option.rect, color.darker(140));
|
||||||
StyleHelper::drawCornerImage(selectionGradient, painter, option.rect.adjusted(0, 0, 0, -1), 5, 5, 5, 5);
|
StyleHelper::drawCornerImage(selectionGradient, painter, option.rect.adjusted(0, 0, 0, -1), 5, 5, 5, 5);
|
||||||
painter->setPen(QColor(255, 255, 255, 60));
|
painter->setPen(QColor(255, 255, 255, 60));
|
||||||
|
@@ -194,6 +194,7 @@ void QbsManager::addProfileFromKit(const ProjectExplorer::Kit *k)
|
|||||||
{
|
{
|
||||||
const QString name = QString::fromLatin1("qtc_%1_%2").arg(k->fileSystemFriendlyName().left(8),
|
const QString name = QString::fromLatin1("qtc_%1_%2").arg(k->fileSystemFriendlyName().left(8),
|
||||||
QString::number(k->id().uniqueIdentifier(), 16));
|
QString::number(k->id().uniqueIdentifier(), 16));
|
||||||
|
qbs::Profile(name, settings()).removeProfile();
|
||||||
setProfileForKit(name, k);
|
setProfileForKit(name, k);
|
||||||
addQtProfileFromKit(name, k);
|
addQtProfileFromKit(name, k);
|
||||||
|
|
||||||
|
@@ -32,6 +32,7 @@
|
|||||||
#include "importswidget.h"
|
#include "importswidget.h"
|
||||||
|
|
||||||
#include <rewritingexception.h>
|
#include <rewritingexception.h>
|
||||||
|
#include <qmldesignerplugin.h>
|
||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
@@ -264,6 +265,8 @@ void ImportManagerView::addImport(const Import &import)
|
|||||||
catch (const RewritingException &e) {
|
catch (const RewritingException &e) {
|
||||||
e.showException();
|
e.showException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QmlDesignerPlugin::instance()->currentDesignDocument()->updateSubcomponentManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace QmlDesigner
|
} // namespace QmlDesigner
|
||||||
|
@@ -64,33 +64,6 @@ static bool isImportAlreadyUsed(const Import &import, QList<ImportLabel*> import
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImportsWidget::setPossibleImports(const QList<Import> &possibleImports)
|
|
||||||
{
|
|
||||||
m_addImportComboBox->clear();
|
|
||||||
foreach (const Import &possibleImport, possibleImports) {
|
|
||||||
if (!isImportAlreadyUsed(possibleImport, m_importLabels))
|
|
||||||
m_addImportComboBox->addItem(possibleImport.toString(true), QVariant::fromValue(possibleImport));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void ImportsWidget::removePossibleImports()
|
|
||||||
{
|
|
||||||
m_addImportComboBox->clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ImportsWidget::setUsedImports(const QList<Import> &usedImports)
|
|
||||||
{
|
|
||||||
foreach (ImportLabel *importLabel, m_importLabels)
|
|
||||||
importLabel->setReadOnly(usedImports.contains(importLabel->import()));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void ImportsWidget::removeUsedImports()
|
|
||||||
{
|
|
||||||
foreach (ImportLabel *importLabel, m_importLabels)
|
|
||||||
importLabel->setEnabled(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool importLess(const Import &firstImport, const Import &secondImport)
|
static bool importLess(const Import &firstImport, const Import &secondImport)
|
||||||
{
|
{
|
||||||
if (firstImport.url() == secondImport.url())
|
if (firstImport.url() == secondImport.url())
|
||||||
@@ -117,6 +90,34 @@ static bool importLess(const Import &firstImport, const Import &secondImport)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ImportsWidget::setPossibleImports(QList<Import> possibleImports)
|
||||||
|
{
|
||||||
|
Utils::sort(possibleImports, importLess);
|
||||||
|
m_addImportComboBox->clear();
|
||||||
|
foreach (const Import &possibleImport, possibleImports) {
|
||||||
|
if (!isImportAlreadyUsed(possibleImport, m_importLabels))
|
||||||
|
m_addImportComboBox->addItem(possibleImport.toString(true), QVariant::fromValue(possibleImport));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImportsWidget::removePossibleImports()
|
||||||
|
{
|
||||||
|
m_addImportComboBox->clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImportsWidget::setUsedImports(const QList<Import> &usedImports)
|
||||||
|
{
|
||||||
|
foreach (ImportLabel *importLabel, m_importLabels)
|
||||||
|
importLabel->setReadOnly(usedImports.contains(importLabel->import()));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImportsWidget::removeUsedImports()
|
||||||
|
{
|
||||||
|
foreach (ImportLabel *importLabel, m_importLabels)
|
||||||
|
importLabel->setEnabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
void ImportsWidget::setImports(const QList<Import> &imports)
|
void ImportsWidget::setImports(const QList<Import> &imports)
|
||||||
{
|
{
|
||||||
qDeleteAll(m_importLabels);
|
qDeleteAll(m_importLabels);
|
||||||
|
@@ -52,7 +52,7 @@ public:
|
|||||||
void setImports(const QList<Import> &imports);
|
void setImports(const QList<Import> &imports);
|
||||||
void removeImports();
|
void removeImports();
|
||||||
|
|
||||||
void setPossibleImports(const QList<Import> &possibleImports);
|
void setPossibleImports(QList<Import> possibleImports);
|
||||||
void removePossibleImports();
|
void removePossibleImports();
|
||||||
|
|
||||||
void setUsedImports(const QList<Import> &possibleImports);
|
void setUsedImports(const QList<Import> &possibleImports);
|
||||||
|
@@ -123,32 +123,29 @@ NodeInstanceServerProxy::NodeInstanceServerProxy(NodeInstanceView *nodeInstanceV
|
|||||||
m_runModus(runModus),
|
m_runModus(runModus),
|
||||||
m_synchronizeId(-1)
|
m_synchronizeId(-1)
|
||||||
{
|
{
|
||||||
PuppetCreator puppetCreator(kit, QString());
|
|
||||||
|
|
||||||
QString socketToken(QUuid::createUuid().toString());
|
QString socketToken(QUuid::createUuid().toString());
|
||||||
m_localServer->listen(socketToken);
|
m_localServer->listen(socketToken);
|
||||||
m_localServer->setMaxPendingConnections(3);
|
m_localServer->setMaxPendingConnections(3);
|
||||||
|
|
||||||
PuppetCreator::QmlPuppetVersion puppetVersion = hasQtQuick1(nodeInstanceView) ? PuppetCreator::Qml1Puppet : PuppetCreator::Qml2Puppet;
|
PuppetCreator::QmlPuppetVersion puppetVersion = hasQtQuick1(nodeInstanceView) ? PuppetCreator::Qml1Puppet : PuppetCreator::Qml2Puppet;
|
||||||
|
PuppetCreator puppetCreator(kit, QString(), nodeInstanceView->model(), puppetVersion);
|
||||||
|
|
||||||
puppetCreator.createPuppetExecutableIfMissing(puppetVersion);
|
|
||||||
|
|
||||||
m_qmlPuppetEditorProcess = puppetCreator.createPuppetProcess(puppetVersion,
|
puppetCreator.createPuppetExecutableIfMissing();
|
||||||
"editormode",
|
|
||||||
|
m_qmlPuppetEditorProcess = puppetCreator.createPuppetProcess("editormode",
|
||||||
socketToken,
|
socketToken,
|
||||||
this,
|
this,
|
||||||
SLOT(printEditorProcessOutput()),
|
SLOT(printEditorProcessOutput()),
|
||||||
SLOT(processFinished(int,QProcess::ExitStatus)));
|
SLOT(processFinished(int,QProcess::ExitStatus)));
|
||||||
|
|
||||||
if (runModus == NormalModus) {
|
if (runModus == NormalModus) {
|
||||||
m_qmlPuppetRenderProcess = puppetCreator.createPuppetProcess(puppetVersion,
|
m_qmlPuppetRenderProcess = puppetCreator.createPuppetProcess("rendermode",
|
||||||
"rendermode",
|
|
||||||
socketToken,
|
socketToken,
|
||||||
this,
|
this,
|
||||||
SLOT(printRenderProcessOutput()),
|
SLOT(printRenderProcessOutput()),
|
||||||
SLOT(processFinished(int,QProcess::ExitStatus)));
|
SLOT(processFinished(int,QProcess::ExitStatus)));
|
||||||
m_qmlPuppetPreviewProcess = puppetCreator.createPuppetProcess(puppetVersion,
|
m_qmlPuppetPreviewProcess = puppetCreator.createPuppetProcess("previewmode",
|
||||||
"previewmode",
|
|
||||||
socketToken,
|
socketToken,
|
||||||
this,
|
this,
|
||||||
SLOT(printPreviewProcessOutput()),
|
SLOT(printPreviewProcessOutput()),
|
||||||
|
@@ -115,10 +115,12 @@ bool PuppetCreator::useOnlyFallbackPuppet() const
|
|||||||
|| !qgetenv("USE_ONLY_FALLBACK_PUPPET").isEmpty() || m_kit == 0 || !m_kit->isValid();
|
|| !qgetenv("USE_ONLY_FALLBACK_PUPPET").isEmpty() || m_kit == 0 || !m_kit->isValid();
|
||||||
}
|
}
|
||||||
|
|
||||||
PuppetCreator::PuppetCreator(ProjectExplorer::Kit *kit, const QString &qtCreatorVersion)
|
PuppetCreator::PuppetCreator(ProjectExplorer::Kit *kit, const QString &qtCreatorVersion, const Model *model, QmlPuppetVersion puppetVersion)
|
||||||
: m_qtCreatorVersion(qtCreatorVersion),
|
: m_qtCreatorVersion(qtCreatorVersion),
|
||||||
m_kit(kit),
|
m_kit(kit),
|
||||||
m_availablePuppetType(FallbackPuppet)
|
m_availablePuppetType(FallbackPuppet),
|
||||||
|
m_model(model),
|
||||||
|
m_puppetVersion(puppetVersion)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -126,18 +128,18 @@ PuppetCreator::~PuppetCreator()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void PuppetCreator::createPuppetExecutableIfMissing(PuppetCreator::QmlPuppetVersion puppetVersion)
|
void PuppetCreator::createPuppetExecutableIfMissing()
|
||||||
{
|
{
|
||||||
if (puppetVersion == Qml1Puppet)
|
if (m_puppetVersion == Qml1Puppet)
|
||||||
createQml1PuppetExecutableIfMissing();
|
createQml1PuppetExecutableIfMissing();
|
||||||
else
|
else
|
||||||
createQml2PuppetExecutableIfMissing();
|
createQml2PuppetExecutableIfMissing();
|
||||||
}
|
}
|
||||||
|
|
||||||
QProcess *PuppetCreator::createPuppetProcess(PuppetCreator::QmlPuppetVersion puppetVersion, const QString &puppetMode, const QString &socketToken, QObject *handlerObject, const char *outputSlot, const char *finishSlot) const
|
QProcess *PuppetCreator::createPuppetProcess(const QString &puppetMode, const QString &socketToken, QObject *handlerObject, const char *outputSlot, const char *finishSlot) const
|
||||||
{
|
{
|
||||||
QString puppetPath;
|
QString puppetPath;
|
||||||
if (puppetVersion == Qml1Puppet)
|
if (m_puppetVersion == Qml1Puppet)
|
||||||
puppetPath = qmlPuppetPath(m_availablePuppetType);
|
puppetPath = qmlPuppetPath(m_availablePuppetType);
|
||||||
else
|
else
|
||||||
puppetPath = qml2PuppetPath(m_availablePuppetType);
|
puppetPath = qml2PuppetPath(m_availablePuppetType);
|
||||||
@@ -333,13 +335,21 @@ QString PuppetCreator::qmlPuppetPath(PuppetType puppetType) const
|
|||||||
|
|
||||||
QProcessEnvironment PuppetCreator::processEnvironment() const
|
QProcessEnvironment PuppetCreator::processEnvironment() const
|
||||||
{
|
{
|
||||||
|
#if defined(Q_OS_WIN)
|
||||||
|
static QLatin1String pathSep(";");
|
||||||
|
#else
|
||||||
|
static QLatin1String pathSep(":");
|
||||||
|
#endif
|
||||||
Utils::Environment environment = Utils::Environment::systemEnvironment();
|
Utils::Environment environment = Utils::Environment::systemEnvironment();
|
||||||
if (!useOnlyFallbackPuppet())
|
if (!useOnlyFallbackPuppet())
|
||||||
m_kit->addToEnvironment(environment);
|
m_kit->addToEnvironment(environment);
|
||||||
environment.set("QML_BAD_GUI_RENDER_LOOP", "true");
|
environment.set("QML_BAD_GUI_RENDER_LOOP", "true");
|
||||||
environment.set("QML_USE_MOCKUPS", "true");
|
environment.set("QML_USE_MOCKUPS", "true");
|
||||||
environment.set("QML_PUPPET_MODE", "true");
|
environment.set("QML_PUPPET_MODE", "true");
|
||||||
|
if (m_puppetVersion == Qml1Puppet)
|
||||||
|
environment.appendOrSet("QML_IMPORT_PATH", m_model->importPaths().join(pathSep), pathSep);
|
||||||
|
else
|
||||||
|
environment.appendOrSet("QML2_IMPORT_PATH", m_model->importPaths().join(pathSep), pathSep);
|
||||||
return environment.toProcessEnvironment();
|
return environment.toProcessEnvironment();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -41,6 +41,7 @@ class Kit;
|
|||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
|
class Model;
|
||||||
class PuppetBuildProgressDialog;
|
class PuppetBuildProgressDialog;
|
||||||
|
|
||||||
class PuppetCreator
|
class PuppetCreator
|
||||||
@@ -56,13 +57,12 @@ public:
|
|||||||
Qml2Puppet
|
Qml2Puppet
|
||||||
};
|
};
|
||||||
|
|
||||||
PuppetCreator(ProjectExplorer::Kit *kit, const QString &qtCreatorVersion);
|
PuppetCreator(ProjectExplorer::Kit *kit, const QString &qtCreatorVersion, const Model *model, QmlPuppetVersion puppetVersion);
|
||||||
~PuppetCreator();
|
~PuppetCreator();
|
||||||
|
|
||||||
void createPuppetExecutableIfMissing(QmlPuppetVersion puppetVersion);
|
void createPuppetExecutableIfMissing();
|
||||||
|
|
||||||
QProcess *createPuppetProcess(QmlPuppetVersion puppetVersion,
|
QProcess *createPuppetProcess(const QString &puppetMode,
|
||||||
const QString &puppetMode,
|
|
||||||
const QString &socketToken,
|
const QString &socketToken,
|
||||||
QObject *handlerObject,
|
QObject *handlerObject,
|
||||||
const char *outputSlot,
|
const char *outputSlot,
|
||||||
@@ -120,6 +120,8 @@ private:
|
|||||||
PuppetType m_availablePuppetType;
|
PuppetType m_availablePuppetType;
|
||||||
static QHash<Core::Id, PuppetType> m_qml1PuppetForKitPuppetHash;
|
static QHash<Core::Id, PuppetType> m_qml1PuppetForKitPuppetHash;
|
||||||
static QHash<Core::Id, PuppetType> m_qml2PuppetForKitPuppetHash;
|
static QHash<Core::Id, PuppetType> m_qml2PuppetForKitPuppetHash;
|
||||||
|
const Model *m_model;
|
||||||
|
QmlPuppetVersion m_puppetVersion;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace QmlDesigner
|
} // namespace QmlDesigner
|
||||||
|
@@ -175,16 +175,17 @@ void Highlighter::highlightBlock(const QString &text)
|
|||||||
handleContextChange(m_currentContext->lineBeginContext(),
|
handleContextChange(m_currentContext->lineBeginContext(),
|
||||||
m_currentContext->definition());
|
m_currentContext->definition());
|
||||||
|
|
||||||
ProgressData progress;
|
ProgressData *progress = new ProgressData;
|
||||||
const int length = text.length();
|
const int length = text.length();
|
||||||
while (progress.offset() < length)
|
while (progress->offset() < length)
|
||||||
iterateThroughRules(text, length, &progress, false, m_currentContext->rules());
|
iterateThroughRules(text, length, progress, false, m_currentContext->rules());
|
||||||
|
|
||||||
if (extractObservableState(currentBlockState()) != WillContinue) {
|
if (extractObservableState(currentBlockState()) != WillContinue) {
|
||||||
handleContextChange(m_currentContext->lineEndContext(),
|
handleContextChange(m_currentContext->lineEndContext(),
|
||||||
m_currentContext->definition(),
|
m_currentContext->definition(),
|
||||||
false);
|
false);
|
||||||
}
|
}
|
||||||
|
delete progress;
|
||||||
m_contexts.clear();
|
m_contexts.clear();
|
||||||
|
|
||||||
if (m_indentationBasedFolding) {
|
if (m_indentationBasedFolding) {
|
||||||
|
@@ -57,6 +57,11 @@ WinRtDebugSupport::WinRtDebugSupport(RunControl *runControl, WinRtRunnerHelper *
|
|||||||
connect(m_debugRunControl, SIGNAL(finished()), this, SLOT(finish()));
|
connect(m_debugRunControl, SIGNAL(finished()), this, SLOT(finish()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WinRtDebugSupport::~WinRtDebugSupport()
|
||||||
|
{
|
||||||
|
delete m_runner;
|
||||||
|
}
|
||||||
|
|
||||||
void WinRtDebugSupport::finish()
|
void WinRtDebugSupport::finish()
|
||||||
{
|
{
|
||||||
m_runner->stop();
|
m_runner->stop();
|
||||||
|
@@ -49,6 +49,7 @@ public:
|
|||||||
static ProjectExplorer::RunControl *createDebugRunControl(WinRtRunConfiguration *runConfig,
|
static ProjectExplorer::RunControl *createDebugRunControl(WinRtRunConfiguration *runConfig,
|
||||||
ProjectExplorer::RunMode mode,
|
ProjectExplorer::RunMode mode,
|
||||||
QString *errorMessage);
|
QString *errorMessage);
|
||||||
|
~WinRtDebugSupport();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
WinRtDebugSupport(ProjectExplorer::RunControl *runControl, WinRtRunnerHelper *runner);
|
WinRtDebugSupport(ProjectExplorer::RunControl *runControl, WinRtRunnerHelper *runner);
|
||||||
|
@@ -52,7 +52,7 @@ using namespace WinRt;
|
|||||||
using namespace WinRt::Internal;
|
using namespace WinRt::Internal;
|
||||||
|
|
||||||
WinRtRunnerHelper::WinRtRunnerHelper(WinRtRunConfiguration *runConfiguration, QString *errormessage)
|
WinRtRunnerHelper::WinRtRunnerHelper(WinRtRunConfiguration *runConfiguration, QString *errormessage)
|
||||||
: QObject(runConfiguration)
|
: QObject()
|
||||||
, m_messenger(0)
|
, m_messenger(0)
|
||||||
, m_runConfiguration(runConfiguration)
|
, m_runConfiguration(runConfiguration)
|
||||||
, m_process(0)
|
, m_process(0)
|
||||||
|
@@ -192,6 +192,7 @@ private slots:
|
|||||||
void test_checksymbols_macroUses();
|
void test_checksymbols_macroUses();
|
||||||
void test_checksymbols_macroUses_data();
|
void test_checksymbols_macroUses_data();
|
||||||
|
|
||||||
|
void test_checksymbols_infiniteLoop_data();
|
||||||
void test_checksymbols_infiniteLoop();
|
void test_checksymbols_infiniteLoop();
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1755,36 +1756,12 @@ void tst_CheckSymbols::test_checksymbols_macroUses_data()
|
|||||||
|
|
||||||
void tst_CheckSymbols::test_checksymbols_infiniteLoop()
|
void tst_CheckSymbols::test_checksymbols_infiniteLoop()
|
||||||
{
|
{
|
||||||
const QByteArray source1 =
|
QFETCH(QByteArray, source1);
|
||||||
"#include \"file2.h\"\n"
|
QFETCH(QByteArray, source2);
|
||||||
"\n"
|
|
||||||
"template<class _Elem, class _Traits>\n"
|
|
||||||
"class basic_ios {\n"
|
|
||||||
" typedef basic_ostream<_Elem, _Traits> _Myos;\n"
|
|
||||||
"};\n"
|
|
||||||
"\n"
|
|
||||||
"template<class _Elem, class _Traits>\n"
|
|
||||||
"class basic_ostream {\n"
|
|
||||||
" typedef basic_ostream<_Elem, _Traits> _Myt;\n"
|
|
||||||
" typedef ostreambuf_iterator<_Elem, _Traits> _Iter;\n"
|
|
||||||
"};\n"
|
|
||||||
;
|
|
||||||
const QString filePath1 = QDir::tempPath() + QLatin1String("/file1.h");
|
const QString filePath1 = QDir::tempPath() + QLatin1String("/file1.h");
|
||||||
Tests::TestCase::writeFile(filePath1, source1);
|
Tests::TestCase::writeFile(filePath1, source1);
|
||||||
|
|
||||||
const QByteArray source2 =
|
|
||||||
"template<class _Elem, class _Traits>\n"
|
|
||||||
"class basic_streambuf {\n"
|
|
||||||
" typedef basic_streambuf<_Elem, _Traits> _Myt;\n"
|
|
||||||
"};\n"
|
|
||||||
"\n"
|
|
||||||
"template<class _Elem, class _Traits>\n"
|
|
||||||
"class ostreambuf_iterator {\n"
|
|
||||||
" typedef _Traits traits_type;\n"
|
|
||||||
" typedef basic_streambuf<_Elem, _Traits> streambuf_type;\n"
|
|
||||||
" typedef basic_ostream<_Elem, _Traits> ostream_type;\n"
|
|
||||||
"};\n"
|
|
||||||
;
|
|
||||||
const QString filePath2 = QDir::tempPath() + QLatin1String("/file2.h");
|
const QString filePath2 = QDir::tempPath() + QLatin1String("/file2.h");
|
||||||
Tests::TestCase::writeFile(filePath2, source2);
|
Tests::TestCase::writeFile(filePath2, source2);
|
||||||
|
|
||||||
@@ -1797,5 +1774,77 @@ void tst_CheckSymbols::test_checksymbols_infiniteLoop()
|
|||||||
TestCase::runCheckSymbols(document1, snapshot);
|
TestCase::runCheckSymbols(document1, snapshot);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void tst_CheckSymbols::test_checksymbols_infiniteLoop_data()
|
||||||
|
{
|
||||||
|
QTest::addColumn<QByteArray>("source1");
|
||||||
|
QTest::addColumn<QByteArray>("source2");
|
||||||
|
|
||||||
|
QTest::newRow("1")
|
||||||
|
<<
|
||||||
|
_("#include \"file2.h\"\n"
|
||||||
|
"\n"
|
||||||
|
"template<class _Elem, class _Traits>\n"
|
||||||
|
"class basic_ios {\n"
|
||||||
|
" typedef basic_ostream<_Elem, _Traits> _Myos;\n"
|
||||||
|
"};\n"
|
||||||
|
"\n"
|
||||||
|
"template<class _Elem, class _Traits>\n"
|
||||||
|
"class basic_ostream {\n"
|
||||||
|
" typedef basic_ostream<_Elem, _Traits> _Myt;\n"
|
||||||
|
" typedef ostreambuf_iterator<_Elem, _Traits> _Iter;\n"
|
||||||
|
"};\n")
|
||||||
|
<<
|
||||||
|
_("template<class _Elem, class _Traits>\n"
|
||||||
|
"class basic_streambuf {\n"
|
||||||
|
" typedef basic_streambuf<_Elem, _Traits> _Myt;\n"
|
||||||
|
"};\n"
|
||||||
|
"\n"
|
||||||
|
"template<class _Elem, class _Traits>\n"
|
||||||
|
"class ostreambuf_iterator {\n"
|
||||||
|
" typedef _Traits traits_type;\n"
|
||||||
|
" typedef basic_streambuf<_Elem, _Traits> streambuf_type;\n"
|
||||||
|
" typedef basic_ostream<_Elem, _Traits> ostream_type;\n"
|
||||||
|
"};\n")
|
||||||
|
;
|
||||||
|
|
||||||
|
QTest::newRow("2")
|
||||||
|
<<
|
||||||
|
_("#include \"file2.h\"\n"
|
||||||
|
"\n"
|
||||||
|
"template<class _Ty >\n"
|
||||||
|
"struct _List_base_types\n"
|
||||||
|
"{\n"
|
||||||
|
" typedef typename _Wrap_alloc<_Alloc>::template rebind<_Ty>::other _Alty;\n"
|
||||||
|
" typedef typename _Alty::template rebind<_Node>::other _Alnod_type;\n"
|
||||||
|
"};\n"
|
||||||
|
"\n"
|
||||||
|
"template<class _Alloc_types>\n"
|
||||||
|
"struct _List_alloc \n"
|
||||||
|
"{\n"
|
||||||
|
" const _Alloc_types::_Alnod_type& _Getal() const {}\n"
|
||||||
|
"};\n"
|
||||||
|
"\n"
|
||||||
|
"template<class _Ty, class _Alloc>\n"
|
||||||
|
"struct _List_buy : public _List_alloc< _List_base_types<_Ty> >\n"
|
||||||
|
"{\n"
|
||||||
|
" void foo()\n"
|
||||||
|
" {\n"
|
||||||
|
" this->_Getal().construct(1, 2);\n"
|
||||||
|
" this->_Getal().deallocate(0, 1);\n"
|
||||||
|
" }\n"
|
||||||
|
"};\n")
|
||||||
|
<<
|
||||||
|
_("template<class _Alloc>\n"
|
||||||
|
"struct _Wrap_alloc : public _Alloc\n"
|
||||||
|
"{\n"
|
||||||
|
" typedef _Alloc _Mybase;\n"
|
||||||
|
" template<class _Other> struct rebind { typedef _Wrap_alloc<_Other_alloc> other; };\n"
|
||||||
|
"\n"
|
||||||
|
" void deallocate(pointer _Ptr, size_type _Count) {}\n"
|
||||||
|
" void construct(value_type *_Ptr) {}\n"
|
||||||
|
"};\n")
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
QTEST_APPLESS_MAIN(tst_CheckSymbols)
|
QTEST_APPLESS_MAIN(tst_CheckSymbols)
|
||||||
#include "tst_checksymbols.moc"
|
#include "tst_checksymbols.moc"
|
||||||
|
@@ -390,6 +390,7 @@ private slots:
|
|||||||
void empty_trailing_lines_data();
|
void empty_trailing_lines_data();
|
||||||
void undef();
|
void undef();
|
||||||
void concat();
|
void concat();
|
||||||
|
void excessive_nesting();
|
||||||
};
|
};
|
||||||
|
|
||||||
// Remove all #... lines, and 'simplify' string, to allow easily comparing the result
|
// Remove all #... lines, and 'simplify' string, to allow easily comparing the result
|
||||||
@@ -1901,6 +1902,23 @@ void tst_Preprocessor::concat()
|
|||||||
QCOMPARE(prep.constData(), output.constData());
|
QCOMPARE(prep.constData(), output.constData());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void tst_Preprocessor::excessive_nesting()
|
||||||
|
{
|
||||||
|
Environment env;
|
||||||
|
Preprocessor preprocess(0, &env);
|
||||||
|
QByteArray input;
|
||||||
|
const QByteArray output =
|
||||||
|
"# 1 \"<stdin>\"\n"
|
||||||
|
"# 2001 \"<stdin>\"\n";
|
||||||
|
for (int i = 0; i < 1000; ++i)
|
||||||
|
input += "#if FOO\n";
|
||||||
|
for (int i = 0; i < 1000; ++i)
|
||||||
|
input += "#endif\n";
|
||||||
|
QByteArray prep = preprocess.run(QLatin1String("<stdin>"), input);
|
||||||
|
// Output cannot be precisely determined, but it shouldn't crash.
|
||||||
|
QCOMPARE(prep, output);
|
||||||
|
}
|
||||||
|
|
||||||
void tst_Preprocessor::compare_input_output(bool keepComments)
|
void tst_Preprocessor::compare_input_output(bool keepComments)
|
||||||
{
|
{
|
||||||
QFETCH(QByteArray, input);
|
QFETCH(QByteArray, input);
|
||||||
|
@@ -83,7 +83,17 @@ void tst_offsets::offsets_data()
|
|||||||
QFilePrivate *p = 0;
|
QFilePrivate *p = 0;
|
||||||
QTestData &data = QTest::newRow("QFilePrivate::fileName")
|
QTestData &data = QTest::newRow("QFilePrivate::fileName")
|
||||||
<< int((char *)&p->fileName - (char *)p);
|
<< int((char *)&p->fileName - (char *)p);
|
||||||
if (qtVersion > 0x50200)
|
if (qtVersion >= 0x50400)
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
# ifdef Q_CC_MSVC
|
||||||
|
data << 196 << 272;
|
||||||
|
# else // MinGW
|
||||||
|
data << 188 << 272;
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
data << 180 << 272;
|
||||||
|
#endif
|
||||||
|
else if (qtVersion > 0x50200)
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
# ifdef Q_CC_MSVC
|
# ifdef Q_CC_MSVC
|
||||||
data << 184 << 272;
|
data << 184 << 272;
|
||||||
|
@@ -153,9 +153,12 @@ def verifyHoveringOnEditor(editor, lines, additionalKeyPresses, expectedTypes, e
|
|||||||
for ty in additionalKeyPresses:
|
for ty in additionalKeyPresses:
|
||||||
type(editor, ty)
|
type(editor, ty)
|
||||||
rect = editor.cursorRect(editor.textCursor())
|
rect = editor.cursorRect(editor.textCursor())
|
||||||
|
expectedToolTip = "{type='%s' visible='1'}" % expectedType
|
||||||
|
# wait for similar tooltips to disappear
|
||||||
|
checkIfObjectExists(expectedToolTip, False, 1000, True)
|
||||||
sendEvent("QMouseEvent", editor, QEvent.MouseMove, rect.x+rect.width/2, rect.y+rect.height/2, Qt.NoButton, 0)
|
sendEvent("QMouseEvent", editor, QEvent.MouseMove, rect.x+rect.width/2, rect.y+rect.height/2, Qt.NoButton, 0)
|
||||||
try:
|
try:
|
||||||
tip = waitForObject("{type='%s' visible='1'}" % expectedType)
|
tip = waitForObject(expectedToolTip)
|
||||||
except:
|
except:
|
||||||
tip = None
|
tip = None
|
||||||
if tip == None:
|
if tip == None:
|
||||||
|
@@ -39,6 +39,8 @@ import sys
|
|||||||
import errno;
|
import errno;
|
||||||
from datetime import datetime,timedelta;
|
from datetime import datetime,timedelta;
|
||||||
|
|
||||||
|
isQt53Build = os.getenv("SYSTEST_ISQT53BUILD") != "0"
|
||||||
|
|
||||||
srcPath = ''
|
srcPath = ''
|
||||||
SettingsPath = ''
|
SettingsPath = ''
|
||||||
tmpSettingsDir = ''
|
tmpSettingsDir = ''
|
||||||
|
@@ -578,9 +578,6 @@ def dumpChildren(item):
|
|||||||
return [item.child(index) for index in range(item.childCount())]
|
return [item.child(index) for index in range(item.childCount())]
|
||||||
|
|
||||||
def writeTestResults(folder):
|
def writeTestResults(folder):
|
||||||
if squishinfo.version < 0x040200FF:
|
|
||||||
print "Skipping writing test results (Squish < 4.2)"
|
|
||||||
return
|
|
||||||
if not os.path.exists(folder):
|
if not os.path.exists(folder):
|
||||||
print "Skipping writing test results (folder '%s' does not exist)." % folder
|
print "Skipping writing test results (folder '%s' does not exist)." % folder
|
||||||
return
|
return
|
||||||
|
@@ -45,7 +45,13 @@ def invokeContextMenuItemOnBookmarkFolder(view, item, menuItem):
|
|||||||
"window=':Add Bookmark_BookmarkDialog'}" % aboveWidget), menuItem)
|
"window=':Add Bookmark_BookmarkDialog'}" % aboveWidget), menuItem)
|
||||||
|
|
||||||
def textForQtVersion(text):
|
def textForQtVersion(text):
|
||||||
return text + " | QtCreator"
|
if isQt53Build:
|
||||||
|
return text + " | QtCreator"
|
||||||
|
else:
|
||||||
|
suffix = "Qt Creator Manual"
|
||||||
|
if text != suffix:
|
||||||
|
text += " | " + suffix
|
||||||
|
return text
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
startApplication("qtcreator" + SettingsPath)
|
startApplication("qtcreator" + SettingsPath)
|
||||||
|
@@ -83,7 +83,10 @@ def main():
|
|||||||
|
|
||||||
test.verify(checkIfObjectExists(gettingStartedText),
|
test.verify(checkIfObjectExists(gettingStartedText),
|
||||||
"Verifying: Qt Creator displays Welcome Page with 'Get Started Now' button.")
|
"Verifying: Qt Creator displays Welcome Page with 'Get Started Now' button.")
|
||||||
expectedText = "(QtCreator : Qt Creator Manual)|(Qt Creator Manual [|] QtCreator)"
|
if isQt53Build:
|
||||||
|
expectedText = "(QtCreator : Qt Creator Manual)|(Qt Creator Manual [|] QtCreator)"
|
||||||
|
else:
|
||||||
|
expectedText = "Qt Creator Manual"
|
||||||
testDetails = "Verifying: Help with Creator Documentation is being opened."
|
testDetails = "Verifying: Help with Creator Documentation is being opened."
|
||||||
|
|
||||||
clickItemVerifyHelpCombo(gettingStartedText, expectedText, testDetails)
|
clickItemVerifyHelpCombo(gettingStartedText, expectedText, testDetails)
|
||||||
|
@@ -39,7 +39,12 @@ def main():
|
|||||||
if not startedWithoutPluginError():
|
if not startedWithoutPluginError():
|
||||||
return
|
return
|
||||||
openQbsProject(pathCreator)
|
openQbsProject(pathCreator)
|
||||||
progressBarWait(200000)
|
test.log("Start parsing project")
|
||||||
naviTreeView = "{column='0' container=':Qt Creator_Utils::NavigationTreeView' text~='qtcreator( \[\S+\])?' type='QModelIndex'}"
|
naviTreeView = "{column='0' container=':Qt Creator_Utils::NavigationTreeView' text~='qtcreator( \[\S+\])?' type='QModelIndex'}"
|
||||||
|
ntwObject = waitForObject(naviTreeView)
|
||||||
|
if waitFor("ntwObject.model().rowCount(ntwObject) > 2", 200000): # No need to wait for C++-parsing
|
||||||
|
test.log("Parsing project done") # we only need the project
|
||||||
|
else:
|
||||||
|
test.warning("Parsing project timed out")
|
||||||
compareProjectTree(naviTreeView, "projecttree_creator.tsv")
|
compareProjectTree(naviTreeView, "projecttree_creator.tsv")
|
||||||
invokeMenuItem("File", "Exit")
|
invokeMenuItem("File", "Exit")
|
||||||
|
@@ -41,7 +41,7 @@ def main():
|
|||||||
startApplication("qtcreator" + SettingsPath)
|
startApplication("qtcreator" + SettingsPath)
|
||||||
if not startedWithoutPluginError():
|
if not startedWithoutPluginError():
|
||||||
return
|
return
|
||||||
protocolsToTest = ["Paste.KDE.Org", "Pastebin.Ca"]
|
protocolsToTest = ["Paste.KDE.Org"] # , "Pastebin.Ca"]
|
||||||
# Be careful with Pastebin.Com, there are only 10 pastes per 24h
|
# Be careful with Pastebin.Com, there are only 10 pastes per 24h
|
||||||
# for all machines using the same IP-address like you.
|
# for all machines using the same IP-address like you.
|
||||||
# protocolsToTest += ["Pastebin.Com"]
|
# protocolsToTest += ["Pastebin.Com"]
|
||||||
|
Reference in New Issue
Block a user