aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2016-04-20 14:58:48 +0200
committerEike Ziller <eike.ziller@qt.io>2016-04-20 14:58:48 +0200
commitee8bf341c6f64096c6ccfeefd3b6b8a85fe91c0b (patch)
tree4dd8b097d0d2acc17f1a13e0e99debfc92b36466 /src/plugins
parent0eeee15a887a8180c1c28dc9f4929b066e096136 (diff)
parent5dc690f234ec7bb5dcdb11a610a4ecbee6dc4d64 (diff)
Merge remote-tracking branch 'origin/4.0'
Conflicts: src/plugins/projectexplorer/session.cpp src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp Change-Id: I6946139f5e5fa3a9cdbb322fd50be248e2c0133f
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/autotest/testcodeparser.cpp2
-rw-r--r--src/plugins/autotest/testoutputreader.cpp7
-rw-r--r--src/plugins/autotest/testoutputreader.h1
-rw-r--r--src/plugins/autotest/testrunner.cpp5
-rw-r--r--src/plugins/autotest/testtreemodel.cpp2
-rw-r--r--src/plugins/autotest/testvisitor.cpp2
-rw-r--r--src/plugins/bookmarks/bookmarkmanager.cpp4
-rw-r--r--src/plugins/bookmarks/bookmarks.qrc1
-rw-r--r--src/plugins/bookmarks/images/bookmark.pngbin913 -> 131 bytes
-rw-r--r--src/plugins/bookmarks/images/bookmark@2x.pngbin0 -> 162 bytes
-rw-r--r--src/plugins/coreplugin/coreconstants.h2
-rw-r--r--src/plugins/coreplugin/locator/locatorfiltersfilter.cpp6
-rw-r--r--src/plugins/coreplugin/manhattanstyle.cpp11
-rw-r--r--src/plugins/cpptools/clangdiagnosticconfigswidget.cpp6
-rw-r--r--src/plugins/debugger/breakhandler.cpp2
-rw-r--r--src/plugins/debugger/breakhandler.h2
-rw-r--r--src/plugins/debugger/debuggerengine.cpp21
-rw-r--r--src/plugins/debugger/debuggermainwindow.cpp12
-rw-r--r--src/plugins/debugger/debuggerplugin.cpp17
-rw-r--r--src/plugins/debugger/gdb/gdbengine.cpp2
-rw-r--r--src/plugins/debugger/lldb/lldbengine.cpp6
-rw-r--r--src/plugins/git/gitclient.cpp40
-rw-r--r--src/plugins/git/gitclient.h3
-rw-r--r--src/plugins/help/helpwidget.cpp4
-rw-r--r--src/plugins/imageviewer/imageviewer.cpp32
-rw-r--r--src/plugins/imageviewer/imageviewer.h1
-rw-r--r--src/plugins/imageviewer/imageviewerfile.cpp4
-rw-r--r--src/plugins/plugins.pro6
-rw-r--r--src/plugins/projectexplorer/projectexplorersettingspage.cpp58
-rw-r--r--src/plugins/qmakeprojectmanager/qmakestep.cpp5
-rw-r--r--src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp2
-rw-r--r--src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp5
-rw-r--r--src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp5
-rw-r--r--src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp2
-rw-r--r--src/plugins/qmlprofiler/qmlprofilertool.cpp5
-rw-r--r--src/plugins/remotelinux/linuxdevice.cpp27
-rw-r--r--src/plugins/texteditor/behaviorsettingswidget.cpp15
-rw-r--r--src/plugins/texteditor/texteditor.cpp8
-rw-r--r--src/plugins/updateinfo/updateinfo.qbs2
39 files changed, 196 insertions, 139 deletions
diff --git a/src/plugins/autotest/testcodeparser.cpp b/src/plugins/autotest/testcodeparser.cpp
index 5ec1c4fb5e5..8753b02b29e 100644
--- a/src/plugins/autotest/testcodeparser.cpp
+++ b/src/plugins/autotest/testcodeparser.cpp
@@ -434,6 +434,8 @@ static bool checkQmlDocumentForTestCode(QFutureInterface<TestParseResult> future
const QmlJS::Document::Ptr &qmlJSDoc,
const QString &proFile = QString())
{
+ if (qmlJSDoc.isNull())
+ return false;
QmlJS::AST::Node *ast = qmlJSDoc->ast();
QTC_ASSERT(ast, return false);
TestQmlVisitor qmlVisitor(qmlJSDoc);
diff --git a/src/plugins/autotest/testoutputreader.cpp b/src/plugins/autotest/testoutputreader.cpp
index 693a897e831..639c962b06b 100644
--- a/src/plugins/autotest/testoutputreader.cpp
+++ b/src/plugins/autotest/testoutputreader.cpp
@@ -137,6 +137,13 @@ TestOutputReader::TestOutputReader(const QFutureInterface<TestResultPtr> &future
, m_buildDir(buildDirectory)
{
connect(m_testApplication, &QProcess::readyRead, this, &TestOutputReader::processOutput);
+ connect(m_testApplication, &QProcess::readyReadStandardError,
+ this, &TestOutputReader::processStdError);
+}
+
+void TestOutputReader::processStdError()
+{
+ qWarning() << "Ignored plain output:" << m_testApplication->readAllStandardError();
}
QtTestOutputReader::QtTestOutputReader(const QFutureInterface<TestResultPtr> &futureInterface,
diff --git a/src/plugins/autotest/testoutputreader.h b/src/plugins/autotest/testoutputreader.h
index 4700af4c8a0..aed50b1b96b 100644
--- a/src/plugins/autotest/testoutputreader.h
+++ b/src/plugins/autotest/testoutputreader.h
@@ -48,6 +48,7 @@ public:
protected:
virtual void processOutput() = 0;
+ virtual void processStdError();
QFutureInterface<TestResultPtr> m_futureInterface;
QProcess *m_testApplication; // not owned
QString m_buildDir;
diff --git a/src/plugins/autotest/testrunner.cpp b/src/plugins/autotest/testrunner.cpp
index c82bf911c83..93554d76a18 100644
--- a/src/plugins/autotest/testrunner.cpp
+++ b/src/plugins/autotest/testrunner.cpp
@@ -137,7 +137,6 @@ static void performTestRun(QFutureInterface<TestResultPtr> &futureInterface,
}
QProcess testProcess;
- testProcess.setReadChannelMode(QProcess::MergedChannels);
testProcess.setReadChannel(QProcess::StandardOutput);
futureInterface.setProgressRange(0, testCaseCount);
@@ -221,6 +220,10 @@ static void performTestRun(QFutureInterface<TestResultPtr> &futureInterface,
eventLoop.processEvents();
}
}
+ if (testProcess.exitStatus() == QProcess::CrashExit) {
+ futureInterface.reportResult(TestResultPtr(new FaultyTestResult(Result::MessageFatal,
+ QString::fromLatin1("Test for project \"%1\" crashed.").arg(testConfiguration->displayName()))));
+ }
if (canceledByTimeout) {
if (testProcess.state() != QProcess::NotRunning) {
diff --git a/src/plugins/autotest/testtreemodel.cpp b/src/plugins/autotest/testtreemodel.cpp
index fa69cafe42d..4701e126a66 100644
--- a/src/plugins/autotest/testtreemodel.cpp
+++ b/src/plugins/autotest/testtreemodel.cpp
@@ -631,7 +631,7 @@ void TestTreeModel::markForRemoval(const QString &filePath)
TestTreeItem *child = root->childItem(childRow);
// Qt + named Quick Tests
if (child->filePath() == filePath) {
- child->markForRemoval(true);
+ child->markForRemovalRecursively(true);
} else {
// unnamed Quick Tests and GTest and Qt Tests with separated source/header
int grandChildRow = child->childCount() - 1;
diff --git a/src/plugins/autotest/testvisitor.cpp b/src/plugins/autotest/testvisitor.cpp
index a816aa33eb5..d766cc0fdc5 100644
--- a/src/plugins/autotest/testvisitor.cpp
+++ b/src/plugins/autotest/testvisitor.cpp
@@ -82,7 +82,7 @@ bool TestVisitor::visit(CPlusPlus::Class *symbol)
CPlusPlus::Function *functionDefinition = m_symbolFinder.findMatchingDefinition(
func, CppTools::CppModelManager::instance()->snapshot(), true);
- if (functionDefinition) {
+ if (functionDefinition && functionDefinition->fileId()) {
locationAndType.m_name = QString::fromUtf8(functionDefinition->fileName());
locationAndType.m_line = functionDefinition->line();
locationAndType.m_column = functionDefinition->column() - 1;
diff --git a/src/plugins/bookmarks/bookmarkmanager.cpp b/src/plugins/bookmarks/bookmarkmanager.cpp
index ec9c2f7f49c..ee92b9ab8e1 100644
--- a/src/plugins/bookmarks/bookmarkmanager.cpp
+++ b/src/plugins/bookmarks/bookmarkmanager.cpp
@@ -37,6 +37,7 @@
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/session.h>
#include <texteditor/texteditor.h>
+#include <utils/icon.h>
#include <utils/tooltip/tooltip.h>
#include <utils/qtcassert.h>
#include <utils/checkablemessagebox.h>
@@ -318,7 +319,8 @@ void BookmarkView::gotoBookmark(const QModelIndex &index)
////
BookmarkManager::BookmarkManager() :
- m_bookmarkIcon(QLatin1String(":/bookmarks/images/bookmark.png")),
+ m_bookmarkIcon(Utils::Icon({{QLatin1String(":/bookmarks/images/bookmark.png"),
+ Theme::Bookmarks_TextMarkColor}}, Icon::Tint).pixmap()),
m_selectionModel(new QItemSelectionModel(this, this))
{
connect(ICore::instance(), &ICore::contextChanged,
diff --git a/src/plugins/bookmarks/bookmarks.qrc b/src/plugins/bookmarks/bookmarks.qrc
index f0a890bf374..764b398555c 100644
--- a/src/plugins/bookmarks/bookmarks.qrc
+++ b/src/plugins/bookmarks/bookmarks.qrc
@@ -1,5 +1,6 @@
<RCC>
<qresource prefix="/bookmarks" >
<file>images/bookmark.png</file>
+ <file>images/bookmark@2x.png</file>
</qresource>
</RCC>
diff --git a/src/plugins/bookmarks/images/bookmark.png b/src/plugins/bookmarks/images/bookmark.png
index 7b2e5fd0cef..05f4eec5413 100644
--- a/src/plugins/bookmarks/images/bookmark.png
+++ b/src/plugins/bookmarks/images/bookmark.png
Binary files differ
diff --git a/src/plugins/bookmarks/images/bookmark@2x.png b/src/plugins/bookmarks/images/bookmark@2x.png
new file mode 100644
index 00000000000..903acddbd8a
--- /dev/null
+++ b/src/plugins/bookmarks/images/bookmark@2x.png
Binary files differ
diff --git a/src/plugins/coreplugin/coreconstants.h b/src/plugins/coreplugin/coreconstants.h
index dd4f11737fd..45ed6ec252e 100644
--- a/src/plugins/coreplugin/coreconstants.h
+++ b/src/plugins/coreplugin/coreconstants.h
@@ -197,7 +197,7 @@ const char SETTINGS_ID_MIMETYPES[] = "E.MimeTypes";
const char SETTINGS_DEFAULTTEXTENCODING[] = "General/DefaultFileEncoding";
const char SETTINGS_THEME[] = "Core/CreatorTheme";
-const char DEFAULT_THEME[] = "default";
+const char DEFAULT_THEME[] = "flat";
const char ALL_FILES_FILTER[] = QT_TRANSLATE_NOOP("Core", "All Files (*)");
diff --git a/src/plugins/coreplugin/locator/locatorfiltersfilter.cpp b/src/plugins/coreplugin/locator/locatorfiltersfilter.cpp
index c09ba186e6f..ca14d00ca46 100644
--- a/src/plugins/coreplugin/locator/locatorfiltersfilter.cpp
+++ b/src/plugins/coreplugin/locator/locatorfiltersfilter.cpp
@@ -27,8 +27,9 @@
#include "locatorfiltersfilter.h"
#include "locatorwidget.h"
-#include <coreplugin/coreicons.h>
+#include <utils/icon.h>
#include <utils/qtcassert.h>
+#include <utils/theme/theme.h>
using namespace Core;
using namespace Core::Internal;
@@ -39,7 +40,8 @@ LocatorFiltersFilter::LocatorFiltersFilter(Locator *plugin,
LocatorWidget *locatorWidget):
m_plugin(plugin),
m_locatorWidget(locatorWidget),
- m_icon(Icons::NEXT.icon())
+ m_icon(Utils::Icon({{QLatin1String(":/core/images/next.png"), Utils::Theme::IconsWarningColor}},
+ Utils::Icon::Tint).pixmap())
{
setId("FiltersFilter");
setDisplayName(tr("Available filters"));
diff --git a/src/plugins/coreplugin/manhattanstyle.cpp b/src/plugins/coreplugin/manhattanstyle.cpp
index 913ca572d38..7233e6d5c54 100644
--- a/src/plugins/coreplugin/manhattanstyle.cpp
+++ b/src/plugins/coreplugin/manhattanstyle.cpp
@@ -245,7 +245,10 @@ QPalette panelPalette(const QPalette &oldPalette, bool lightColored = false)
pal.setBrush(QPalette::All, QPalette::WindowText, color);
pal.setBrush(QPalette::All, QPalette::ButtonText, color);
pal.setBrush(QPalette::All, QPalette::Foreground, color);
- color.setAlpha(100);
+ if (lightColored)
+ color.setAlpha(100);
+ else
+ color = creatorTheme()->color(Theme::IconsDisabledColor);
pal.setBrush(QPalette::Disabled, QPalette::WindowText, color);
pal.setBrush(QPalette::Disabled, QPalette::ButtonText, color);
pal.setBrush(QPalette::Disabled, QPalette::Foreground, color);
@@ -740,9 +743,9 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt
painter->setPen(StyleHelper::toolBarDropShadowColor());
painter->drawText(editRect.adjusted(1, 0, -1, 0), Qt::AlignLeft | Qt::AlignVCenter, text);
}
- if (!(option->state & State_Enabled))
- painter->setOpacity(0.8);
- painter->setPen(creatorTheme()->color(Theme::ComboBoxTextColor));
+ painter->setPen(creatorTheme()->color((option->state & State_Enabled)
+ ? Theme::ComboBoxTextColor
+ : Theme::IconsDisabledColor));
painter->drawText(editRect.adjusted(1, 0, -1, 0), Qt::AlignLeft | Qt::AlignVCenter, text);
painter->restore();
diff --git a/src/plugins/cpptools/clangdiagnosticconfigswidget.cpp b/src/plugins/cpptools/clangdiagnosticconfigswidget.cpp
index 55213d4f246..bb3d55c3cc3 100644
--- a/src/plugins/cpptools/clangdiagnosticconfigswidget.cpp
+++ b/src/plugins/cpptools/clangdiagnosticconfigswidget.cpp
@@ -157,10 +157,12 @@ void ClangDiagnosticConfigsWidget::syncConfigChooserToModel(const Core::Id &conf
connectConfigChooserCurrentIndex();
- if (configToSelectIndex != -1)
+ if (configToSelectIndex != -1) {
m_ui->configChooserComboBox->setCurrentIndex(configToSelectIndex);
- else if (previousCurrentIndex != m_ui->configChooserComboBox->currentIndex())
+ } else if (previousCurrentIndex != m_ui->configChooserComboBox->currentIndex()) {
+ syncOtherWidgetsToComboBox();
emit currentConfigChanged(currentConfigId());
+ }
}
void ClangDiagnosticConfigsWidget::syncOtherWidgetsToComboBox()
diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp
index f49bbf68812..207cddbf27f 100644
--- a/src/plugins/debugger/breakhandler.cpp
+++ b/src/plugins/debugger/breakhandler.cpp
@@ -733,6 +733,7 @@ PROPERTY(QString, functionName, setFunctionName)
PROPERTY(BreakpointType, type, setType)
PROPERTY(int, threadSpec, setThreadSpec)
PROPERTY(QByteArray, condition, setCondition)
+PROPERTY(QString, command, setCommand)
PROPERTY(quint64, address, setAddress)
PROPERTY(QString, expression, setExpression)
PROPERTY(QString, message, setMessage)
@@ -757,6 +758,7 @@ void Breakpoint::addToCommand(DebuggerCommand *cmd) const
cmd->arg("type", type());
cmd->arg("ignorecount", ignoreCount());
cmd->arg("condition", condition().toHex());
+ cmd->arg("command", command().toUtf8().toHex());
cmd->arg("function", functionName().toUtf8());
cmd->arg("oneshot", isOneShot());
cmd->arg("enabled", isEnabled());
diff --git a/src/plugins/debugger/breakhandler.h b/src/plugins/debugger/breakhandler.h
index 922e6fee71f..af1ac485564 100644
--- a/src/plugins/debugger/breakhandler.h
+++ b/src/plugins/debugger/breakhandler.h
@@ -112,6 +112,8 @@ public:
QString expression() const;
void setExpression(const QString &expression);
QString message() const;
+ QString command() const;
+ void setCommand(const QString &command);
void setMessage(const QString &m);
BreakpointType type() const;
void setType(const BreakpointType &type);
diff --git a/src/plugins/debugger/debuggerengine.cpp b/src/plugins/debugger/debuggerengine.cpp
index 11f85289180..1c9f3741829 100644
--- a/src/plugins/debugger/debuggerengine.cpp
+++ b/src/plugins/debugger/debuggerengine.cpp
@@ -282,6 +282,7 @@ public slots:
void resetLocation()
{
+ m_lookupRequests.clear();
m_locationTimer.stop();
m_locationMark.reset();
m_stackHandler.resetLocation();
@@ -337,6 +338,9 @@ public:
Utils::FileInProjectFinder m_fileFinder;
QByteArray m_qtNamespace;
+
+ // Safety net to avoid infinite lookups.
+ QSet<QByteArray> m_lookupRequests; // FIXME: Integrate properly.
};
@@ -2022,6 +2026,23 @@ bool DebuggerEngine::canHandleToolTip(const DebuggerToolTipContext &context) con
void DebuggerEngine::updateItem(const QByteArray &iname)
{
+ if (d->m_lookupRequests.contains(iname)) {
+ showMessage(QString::fromLatin1("IGNORING REPEATED REQUEST TO EXPAND " + iname));
+ WatchHandler *handler = watchHandler();
+ WatchItem *item = handler->findItem(iname);
+ if (!item->hasChildren()) {
+ handler->notifyUpdateStarted({iname});
+ item->setValue(decodeData({}, "notaccessible"));
+ item->setHasChildren(false);
+ item->outdated = false;
+ item->update();
+ handler->notifyUpdateFinished();
+ return;
+ }
+ // We could legitimately end up here after expanding + closing + re-expaning an item.
+ }
+ d->m_lookupRequests.insert(iname);
+
UpdateParameters params;
params.partialVariable = iname;
doUpdateLocals(params);
diff --git a/src/plugins/debugger/debuggermainwindow.cpp b/src/plugins/debugger/debuggermainwindow.cpp
index 8d8749709fb..d4b6a8c9552 100644
--- a/src/plugins/debugger/debuggermainwindow.cpp
+++ b/src/plugins/debugger/debuggermainwindow.cpp
@@ -81,12 +81,16 @@ DebuggerMainWindow::~DebuggerMainWindow()
{
// As we have to setParent(0) on dock widget that are not selected,
// we keep track of all and make sure we don't leak any
+ foreach (QDockWidget *dock, m_dockForDockId) {
+ if (dock && !dock->parentWidget())
+ delete dock;
+ }
+
foreach (const Perspective &perspective, m_perspectiveForPerspectiveId) {
foreach (const Perspective::Operation &operation, perspective.operations()) {
if (operation.widget && !operation.widget->parentWidget()) {
- // These are from inactive perspectives. We call setParent(0) when deactivating
- // a perspective so that the widgets can't be accidentally enabled in the wrong
- // perspectives. That's why we have to delete them manually here.
+ // These are from perspectives that never got enabled. We've taken ownership for
+ // those, so we need to delete them.
delete operation.widget;
}
}
@@ -154,7 +158,7 @@ void DebuggerMainWindow::finalizeSetup()
hbox->addWidget(m_perspectiveChooser);
hbox->addWidget(m_controlsStackWidget);
hbox->addWidget(m_statusLabel);
- hbox->addStretch();
+ hbox->addStretch(1);
hbox->addWidget(new Utils::StyledSeparator);
hbox->addWidget(viewButton);
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index ebe30a53a07..75ed55aff38 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -966,6 +966,7 @@ public:
QIcon m_locationMarkIcon;
+ QLabel *m_threadLabel = 0;
QComboBox *m_threadBox = 0;
BaseTreeView *m_breakView = 0;
@@ -1686,13 +1687,6 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments,
cmd = ActionManager::registerAction(qmlSelectDummyAction, Constants::QML_SELECTTOOL);
debugMenu->addAction(cmd);
- auto qmlZoomDummyAction = new QAction(tr("Zoom"), this);
- qmlZoomDummyAction->setCheckable(true);
- qmlZoomDummyAction->setIcon(Core::Icons::ZOOM_TOOLBAR.icon());
- qmlZoomDummyAction->setEnabled(false);
- cmd = ActionManager::registerAction(qmlZoomDummyAction, Constants::QML_ZOOMTOOL);
- debugMenu->addAction(cmd);
-
debugMenu->addSeparator();
// Don't add '1' to the string as it shows up in the shortcut dialog.
@@ -1795,7 +1789,9 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments,
}
toolbar.addWidget(new StyledSeparator);
- toolbar.addWidget(new QLabel(tr("Threads:")));
+
+ m_threadLabel = new QLabel(tr("Threads:"));
+ toolbar.addWidget(m_threadLabel);
m_threadBox = new QComboBox;
m_threadBox->setSizeAdjustPolicy(QComboBox::AdjustToContents);
@@ -1810,7 +1806,6 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments,
// qmlToolbar.addAction(qmlShowAppOnTopDummyAction);
// qmlToolbar.addWidget(new StyledSeparator);
// qmlToolbar.addAction(qmlSelectDummyAction);
-// qmlToolbar.addAction(qmlZoomDummyAction);
// qmlToolbar.addWidget(new StyledSeparator);
Perspective basePerspective({}, {
@@ -2380,6 +2375,7 @@ void DebuggerPluginPrivate::connectEngine(DebuggerEngine *engine)
engine->watchHandler()->resetWatchers();
m_localsView->hideProgressIndicator();
+ updateActiveLanguages();
}
static void changeFontSize(QWidget *widget, qreal size)
@@ -2498,6 +2494,8 @@ void DebuggerPluginPrivate::setInitialState()
action(AutoDerefPointers)->setEnabled(true);
action(ExpandStack)->setEnabled(false);
+
+ m_threadLabel->setEnabled(false);
}
void DebuggerPluginPrivate::updateState(DebuggerEngine *engine)
@@ -2595,6 +2593,7 @@ void DebuggerPluginPrivate::updateState(DebuggerEngine *engine)
m_attachToUnstartedApplication->setEnabled(true);
m_threadBox->setEnabled(state == InferiorStopOk || state == InferiorUnrunnable);
+ m_threadLabel->setEnabled(m_threadBox->isEnabled());
const bool isCore = engine->runParameters().startMode == AttachCore;
const bool stopped = state == InferiorStopOk;
diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index 9ff2da841b2..5b99bcd2c84 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -2233,7 +2233,7 @@ void GdbEngine::executeReturn()
setTokenBarrier();
notifyInferiorRunRequested();
showStatusMessage(tr("Immediate return from function requested..."), 5000);
- runCommand({"-exec-finish", RunRequest, CB(handleExecuteReturn)});
+ runCommand({"-exec-return", RunRequest, CB(handleExecuteReturn)});
}
void GdbEngine::handleExecuteReturn(const DebuggerResponse &response)
diff --git a/src/plugins/debugger/lldb/lldbengine.cpp b/src/plugins/debugger/lldb/lldbengine.cpp
index 196972a0138..283b2c87d8d 100644
--- a/src/plugins/debugger/lldb/lldbengine.cpp
+++ b/src/plugins/debugger/lldb/lldbengine.cpp
@@ -283,6 +283,10 @@ void LldbEngine::startLldbStage2()
m_lldbProc.write("script from lldbbridge import *\n");
m_lldbProc.write("script print(dir())\n");
m_lldbProc.write("script theDumper = Dumper()\n"); // This triggers reportState("enginesetupok")
+
+ const QString commands = stringSetting(GdbStartupCommands);
+ if (!commands.isEmpty())
+ m_lldbProc.write(commands.toLocal8Bit());
}
void LldbEngine::setupInferior()
@@ -895,6 +899,8 @@ void LldbEngine::handleStateNotification(const GdbMi &reportedState)
notifyInferiorRunOk();
else if (newState == "inferiorrunfailed")
notifyInferiorRunFailed();
+ else if (newState == "continueafternextstop")
+ m_continueAtNextSpontaneousStop = true;
else if (newState == "stopped") {
notifyInferiorSpontaneousStop();
if (m_continueAtNextSpontaneousStop) {
diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp
index e749a8ca934..f1d3095b38c 100644
--- a/src/plugins/git/gitclient.cpp
+++ b/src/plugins/git/gitclient.cpp
@@ -36,53 +36,51 @@
#include "branchadddialog.h"
#include "gerrit/gerritplugin.h"
-#include <vcsbase/submitfilemodel.h>
-
+#include <coreplugin/coreconstants.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/icore.h>
-#include <coreplugin/idocument.h>
-#include <coreplugin/vcsmanager.h>
#include <coreplugin/id.h>
+#include <coreplugin/idocument.h>
#include <coreplugin/iversioncontrol.h>
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/vcsmanager.h>
+#include <utils/fileutils.h>
#include <utils/hostosinfo.h>
#include <utils/qtcassert.h>
#include <utils/qtcprocess.h>
#include <utils/synchronousprocess.h>
-#include <utils/fileutils.h>
-#include <vcsbase/vcscommand.h>
+
+#include <vcsbase/submitfilemodel.h>
#include <vcsbase/vcsbaseeditor.h>
#include <vcsbase/vcsbaseeditorparameterwidget.h>
-#include <vcsbase/vcsoutputwindow.h>
#include <vcsbase/vcsbaseplugin.h>
+#include <vcsbase/vcscommand.h>
+#include <vcsbase/vcsoutputwindow.h>
#include <diffeditor/diffeditorconstants.h>
#include <diffeditor/diffeditorcontroller.h>
#include <diffeditor/diffutils.h>
+#include <QAction>
#include <QCoreApplication>
#include <QDir>
#include <QFileInfo>
#include <QHash>
-#include <QRegExp>
-#include <QSignalMapper>
-#include <QTemporaryFile>
-
-#include <QAction>
#include <QMenu>
#include <QMessageBox>
#include <QPushButton>
-#include <QToolButton>
+#include <QRegExp>
+#include <QTemporaryFile>
#include <QTextCodec>
+#include <QToolButton>
-static const char GIT_DIRECTORY[] = ".git";
-static const char graphLogFormatC[] = "%h %d %an %s %ci";
-static const char HEAD[] = "HEAD";
-static const char CHERRY_PICK_HEAD[] = "CHERRY_PICK_HEAD";
-static const char noColorOption[] = "--no-color";
-static const char decorateOption[] = "--decorate";
-static const char showFormatC[] =
+const char GIT_DIRECTORY[] = ".git";
+const char graphLogFormatC[] = "%h %d %an %s %ci";
+const char HEAD[] = "HEAD";
+const char CHERRY_PICK_HEAD[] = "CHERRY_PICK_HEAD";
+const char noColorOption[] = "--no-color";
+const char decorateOption[] = "--decorate";
+const char showFormatC[] =
"--pretty=format:commit %H%n"
"Author: %an <%ae>, %ad (%ar)%n"
"Committer: %cn <%ce>, %cd (%cr)%n"
diff --git a/src/plugins/git/gitclient.h b/src/plugins/git/gitclient.h
index f6b0bd28214..60b2761c2fc 100644
--- a/src/plugins/git/gitclient.h
+++ b/src/plugins/git/gitclient.h
@@ -40,9 +40,6 @@
#include <QWidget>
QT_BEGIN_NAMESPACE
-class QCheckBox;
-class QSignalMapper;
-class QDebug;
class QProcessEnvironment;
class QMenu;
QT_END_NAMESPACE
diff --git a/src/plugins/help/helpwidget.cpp b/src/plugins/help/helpwidget.cpp
index f5848fb38a8..0a374514cbb 100644
--- a/src/plugins/help/helpwidget.cpp
+++ b/src/plugins/help/helpwidget.cpp
@@ -159,7 +159,7 @@ HelpWidget::HelpWidget(const Core::Context &context, WidgetStyle style, QWidget
layout->addWidget(Core::Command::toolButtonWithAppendedShortcut(m_switchToHelp, cmd));
}
- m_homeAction = new QAction(Icons::HOME.icon(), tr("Home"), this);
+ m_homeAction = new QAction(Icons::HOME_TOOLBAR.icon(), tr("Home"), this);
cmd = Core::ActionManager::registerAction(m_homeAction, Constants::HELP_HOME, context);
connect(m_homeAction, &QAction::triggered, this, &HelpWidget::goHome);
layout->addWidget(Core::Command::toolButtonWithAppendedShortcut(m_homeAction, cmd));
@@ -186,7 +186,7 @@ HelpWidget::HelpWidget(const Core::Context &context, WidgetStyle style, QWidget
button->setPopupMode(QToolButton::DelayedPopup);
layout->addWidget(button);
- m_addBookmarkAction = new QAction(Icons::BOOKMARK.icon(), tr("Add Bookmark"), this);
+ m_addBookmarkAction = new QAction(Icons::BOOKMARK_TOOLBAR.icon(), tr("Add Bookmark"), this);
cmd = Core::ActionManager::registerAction(m_addBookmarkAction, Constants::HELP_ADDBOOKMARK, context);
cmd->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+M") : tr("Ctrl+M")));
connect(m_addBookmarkAction, &QAction::triggered, this, &HelpWidget::addBookmark);
diff --git a/src/plugins/imageviewer/imageviewer.cpp b/src/plugins/imageviewer/imageviewer.cpp
index f3121d62d0c..f279125f383 100644
--- a/src/plugins/imageviewer/imageviewer.cpp
+++ b/src/plugins/imageviewer/imageviewer.cpp
@@ -151,6 +151,8 @@ void ImageViewer::ctor()
this, &ImageViewer::imageSizeUpdated);
connect(d->file.data(), &ImageViewerFile::openFinished,
d->imageView, &ImageView::createScene);
+ connect(d->file.data(), &ImageViewerFile::openFinished,
+ this, &ImageViewer::updateToolButtons);
connect(d->file.data(), &ImageViewerFile::aboutToReload,
d->imageView, &ImageView::reset);
connect(d->file.data(), &ImageViewerFile::reloadFinished,
@@ -159,12 +161,6 @@ void ImageViewer::ctor()
this, &ImageViewer::updatePauseAction);
connect(d->imageView, &ImageView::scaleFactorChanged,
this, &ImageViewer::scaleFactorUpdate);
-
- connect(d->file.data(), &ImageViewerFile::openFinished,
- this, [this](bool success)
- {
- d->ui_toolbar.toolButtonExportImage->setEnabled(success && d->file->type() == ImageViewerFile::TypeSvg);
- });
}
ImageViewer::~ImageViewer()
@@ -188,6 +184,8 @@ Core::IEditor *ImageViewer::duplicate()
{
auto other = new ImageViewer(d->file);
other->d->imageView->createScene();
+ other->updateToolButtons();
+ other->d->ui_toolbar.labelImageSize->setText(d->ui_toolbar.labelImageSize->text());
return other;
}
@@ -241,6 +239,12 @@ void ImageViewer::fitToScreen()
d->ui_toolbar.toolButtonFitToScreen->click();
}
+void ImageViewer::updateToolButtons()
+{
+ d->ui_toolbar.toolButtonExportImage->setEnabled(d->file->type() == ImageViewerFile::TypeSvg);
+ updatePauseAction();
+}
+
void ImageViewer::togglePlay()
{
d->ui_toolbar.toolButtonPlayPause->click();
@@ -254,15 +258,13 @@ void ImageViewer::playToggled()
void ImageViewer::updatePauseAction()
{
bool isMovie = d->file->type() == ImageViewerFile::TypeMovie;
- d->ui_toolbar.toolButtonPlayPause->setVisible(isMovie);
- if (isMovie) {
- if (d->file->isPaused()) {
- d->ui_toolbar.toolButtonPlayPause->setToolTipBase(tr("Play Animation"));
- d->ui_toolbar.toolButtonPlayPause->setIcon(Core::Icons::RUN_SMALL.pixmap());
- } else {
- d->ui_toolbar.toolButtonPlayPause->setToolTipBase(tr("Pause Animation"));
- d->ui_toolbar.toolButtonPlayPause->setIcon(Core::Icons::INTERRUPT_SMALL.pixmap());
- }
+ if (isMovie && !d->file->isPaused()) {
+ d->ui_toolbar.toolButtonPlayPause->setToolTipBase(tr("Pause Animation"));
+ d->ui_toolbar.toolButtonPlayPause->setIcon(Core::Icons::INTERRUPT_SMALL.icon());
+ } else {
+ d->ui_toolbar.toolButtonPlayPause->setToolTipBase(tr("Play Animation"));
+ d->ui_toolbar.toolButtonPlayPause->setIcon(Core::Icons::RUN_SMALL.icon());
+ d->ui_toolbar.toolButtonPlayPause->setEnabled(isMovie);
}
}
diff --git a/src/plugins/imageviewer/imageviewer.h b/src/plugins/imageviewer/imageviewer.h
index 8820b6ca90f..9a4baab18d7 100644
--- a/src/plugins/imageviewer/imageviewer.h
+++ b/src/plugins/imageviewer/imageviewer.h
@@ -65,6 +65,7 @@ public slots:
void zoomOut();
void resetToOriginalSize();
void fitToScreen();
+ void updateToolButtons();
void togglePlay();
private slots:
diff --git a/src/plugins/imageviewer/imageviewerfile.cpp b/src/plugins/imageviewer/imageviewerfile.cpp
index f5192db521c..031ca999d48 100644
--- a/src/plugins/imageviewer/imageviewerfile.cpp
+++ b/src/plugins/imageviewer/imageviewerfile.cpp
@@ -108,7 +108,7 @@ Core::IDocument::OpenResult ImageViewerFile::openImpl(QString *errorString, cons
if (format.startsWith("svg")) {
m_tempSvgItem = new QGraphicsSvgItem(fileName);
QRectF bound = m_tempSvgItem->boundingRect();
- if (bound.width() == 0 && bound.height() == 0) {
+ if (qFuzzyIsNull(bound.width()) && qFuzzyIsNull(bound.height())) {
delete m_tempSvgItem;
m_tempSvgItem = 0;
if (errorString)
@@ -116,7 +116,7 @@ Core::IDocument::OpenResult ImageViewerFile::openImpl(QString *errorString, cons
return OpenResult::CannotHandle;
}
m_type = TypeSvg;
- emit imageSizeChanged(QSize());
+ emit imageSizeChanged(m_tempSvgItem->boundingRect().size().toSize());
} else
#endif
if (QMovie::supportedFormats().contains(format)) {
diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro
index c087ff2669b..a69da758ec5 100644
--- a/src/plugins/plugins.pro
+++ b/src/plugins/plugins.pro
@@ -79,11 +79,7 @@ exists($$LLVM_INSTALL_DIR) {
isEmpty(IDE_PACKAGE_MODE) {
SUBDIRS += \
- helloworld #\
- #updateinfo
-#} else:!isEmpty(UPDATEINFO_ENABLE) {
-# SUBDIRS += \
-# updateinfo
+ helloworld
}
for(p, SUBDIRS) {
diff --git a/src/plugins/projectexplorer/projectexplorersettingspage.cpp b/src/plugins/projectexplorer/projectexplorersettingspage.cpp
index 206fd6a6446..7605ddbbe24 100644
--- a/src/plugins/projectexplorer/projectexplorersettingspage.cpp
+++ b/src/plugins/projectexplorer/projectexplorersettingspage.cpp
@@ -67,7 +67,7 @@ private:
void setJomVisible(bool);
Ui::ProjectExplorerSettingsPageUi m_ui;
- QUuid m_environmentId;
+ mutable ProjectExplorerSettings m_settings;
};
ProjectExplorerSettingsWidget::ProjectExplorerSettingsWidget(QWidget *parent) :
@@ -97,39 +97,37 @@ void ProjectExplorerSettingsWidget::setJomVisible(bool v)
ProjectExplorerSettings ProjectExplorerSettingsWidget::settings() const
{
- ProjectExplorerSettings pes;
- pes.buildBeforeDeploy = m_ui.buildProjectBeforeDeployCheckBox->isChecked();
- pes.deployBeforeRun = m_ui.deployProjectBeforeRunCheckBox->isChecked();
- pes.saveBeforeBuild = m_ui.saveAllFilesCheckBox->isChecked();
- pes.showCompilerOutput = m_ui.showCompileOutputCheckBox->isChecked();
- pes.showRunOutput = m_ui.showRunOutputCheckBox->isChecked();
- pes.showDebugOutput = m_ui.showDebugOutputCheckBox->isChecked();
- pes.cleanOldAppOutput = m_ui.cleanOldAppOutputCheckBox->isChecked();
- pes.mergeStdErrAndStdOut = m_ui.mergeStdErrAndStdOutCheckBox->isChecked();
- pes.wrapAppOutput = m_ui.wrapAppOutputCheckBox->isChecked();
- pes.useJom = m_ui.jomCheckbox->isChecked();
- pes.prompToStopRunControl = m_ui.promptToStopRunControlCheckBox->isChecked();
- pes.maxAppOutputLines = m_ui.maxAppOutputBox->value();
- pes.environmentId = m_environmentId;
- pes.stopBeforeBuild = ProjectExplorerSettings::StopBeforeBuild(m_ui.stopBeforeBuildComboBox->currentIndex());
- return pes;
+ m_settings.buildBeforeDeploy = m_ui.buildProjectBeforeDeployCheckBox->isChecked();
+ m_settings.deployBeforeRun = m_ui.deployProjectBeforeRunCheckBox->isChecked();
+ m_settings.saveBeforeBuild = m_ui.saveAllFilesCheckBox->isChecked();
+ m_settings.showCompilerOutput = m_ui.showCompileOutputCheckBox->isChecked();
+ m_settings.showRunOutput = m_ui.showRunOutputCheckBox->isChecked();
+ m_settings.showDebugOutput = m_ui.showDebugOutputCheckBox->isChecked();
+ m_settings.cleanOldAppOutput = m_ui.cleanOldAppOutputCheckBox->isChecked();
+ m_settings.mergeStdErrAndStdOut = m_ui.mergeStdErrAndStdOutCheckBox->isChecked();
+ m_settings.wrapAppOutput = m_ui.wrapAppOutputCheckBox->isChecked();
+ m_settings.useJom = m_ui.jomCheckbox->isChecked();
+ m_settings.prompToStopRunControl = m_ui.promptToStopRunControlCheckBox->isChecked();
+ m_settings.maxAppOutputLines = m_ui.maxAppOutputBox->value();
+ m_settings.stopBeforeBuild = ProjectExplorerSettings::StopBeforeBuild(m_ui.stopBeforeBuildComboBox->currentIndex());
+ return m_settings;
}
void ProjectExplorerSettingsWidget::setSettings(const ProjectExplorerSettings &pes)
{
- m_ui.buildProjectBeforeDeployCheckBox->setChecked(pes.buildBeforeDeploy);
- m_ui.deployProjectBeforeRunCheckBox->setChecked(pes.deployBeforeRun);
- m_ui.saveAllFilesCheckBox->setChecked(pes.saveBeforeBuild);
- m_ui.showCompileOutputCheckBox->setChecked(pes.showCompilerOutput);
- m_ui.showRunOutputCheckBox->setChecked(pes.showRunOutput);
- m_ui.showDebugOutputCheckBox->setChecked(pes.showDebugOutput);
- m_ui.cleanOldAppOutputCheckBox->setChecked(pes.cleanOldAppOutput);
- m_ui.mergeStdErrAndStdOutCheckBox->setChecked(pes.mergeStdErrAndStdOut);
- m_ui.wrapAppOutputCheckBox->setChecked(pes.wrapAppOutput);
- m_ui.jomCheckbox->setChecked(pes.useJom);
- m_ui.promptToStopRunControlCheckBox->setChecked(pes.prompToStopRunControl);
- m_ui.maxAppOutputBox->setValue(pes.maxAppOutputLines);
- m_environmentId = pes.environmentId;
+ m_settings = pes;
+ m_ui.buildProjectBeforeDeployCheckBox->setChecked(m_settings.buildBeforeDeploy);
+ m_ui.deployProjectBeforeRunCheckBox->setChecked(m_settings.deployBeforeRun);
+ m_ui.saveAllFilesCheckBox->setChecked(m_settings.saveBeforeBuild);
+ m_ui.showCompileOutputCheckBox->setChecked(m_settings.showCompilerOutput);
+ m_ui.showRunOutputCheckBox->setChecked(m_settings.showRunOutput);
+ m_ui.showDebugOutputCheckBox->setChecked(m_settings.showDebugOutput);
+ m_ui.cleanOldAppOutputCheckBox->setChecked(m_settings.cleanOldAppOutput);
+ m_ui.mergeStdErrAndStdOutCheckBox->setChecked(m_settings.mergeStdErrAndStdOut);
+ m_ui.wrapAppOutputCheckBox->setChecked(m_settings.wrapAppOutput);
+ m_ui.jomCheckbox->setChecked(m_settings.useJom);
+ m_ui.promptToStopRunControlCheckBox->setChecked(m_settings.prompToStopRunControl);
+ m_ui.maxAppOutputBox->setValue(m_settings.maxAppOutputLines);
m_ui.stopBeforeBuildComboBox->setCurrentIndex(pes.stopBeforeBuild);
}
diff --git a/src/plugins/qmakeprojectmanager/qmakestep.cpp b/src/plugins/qmakeprojectmanager/qmakestep.cpp
index 1a7906cff7c..8c00e092bce 100644
--- a/src/plugins/qmakeprojectmanager/qmakestep.cpp
+++ b/src/plugins/qmakeprojectmanager/qmakestep.cpp
@@ -843,10 +843,11 @@ QStringList QMakeStepConfig::toArguments() const
else if (archConfig == PPC64)
arguments << QLatin1String("CONFIG+=ppc64");
+ // TODO: make that depend on the actual Qt version that is used
if (osType == IphoneSimulator)
- arguments << QLatin1String("CONFIG+=iphonesimulator");
+ arguments << QLatin1String("CONFIG+=iphonesimulator") << QLatin1String("CONFIG+=simulator") /*since Qt 5.7*/;
else if (osType == IphoneOS)
- arguments << QLatin1String("CONFIG+=iphoneos");
+ arguments << QLatin1String("CONFIG+=iphoneos") << QLatin1String("CONFIG+=device") /*since Qt 5.7*/;
if (linkQmlDebuggingQQ2)
arguments << QLatin1String("CONFIG+=qml_debug");
diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp
index 06d6e53a809..4f245c23f83 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp
+++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp
@@ -292,10 +292,8 @@ void PropertyEditorQmlBackend::setup(const QmlObjectNode &qmlObjectNode, const Q
m_backendAnchorBinding.setup(qmlObjectNode.modelNode());
context()->setContextProperty(QLatin1String("anchorBackend"), &m_backendAnchorBinding);
-
context()->setContextProperty(QLatin1String("transaction"), m_propertyEditorTransaction.data());
-
// model node
m_backendModelNode.setup(qmlObjectNode.modelNode());
context()->setContextProperty(QLatin1String("modelNodeBackend"), &m_backendModelNode);
diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp
index c39f347aa6d..9eec21692dc 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp
+++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp
@@ -148,9 +148,8 @@ void PropertyEditorValue::setValueWithEmit(const QVariant &value)
void PropertyEditorValue::setValue(const QVariant &value)
{
if (!compareVariants(m_value, value) &&
- !cleverDoubleCompare(value, m_value) &&
- !cleverColorCompare(value, m_value))
-
+ !cleverDoubleCompare(value, m_value) &&
+ !cleverColorCompare(value, m_value))
m_value = value;
fixAmbigousColorNames(modelNode(), name(), &m_value);
diff --git a/src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp b/src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp
index cae8ea487e2..fc04703726a 100644
--- a/src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp
@@ -112,13 +112,18 @@ void QmlProfilerClientManager::setTcpConnection(QString host, Utils::Port port)
{
d->tcpHost = host;
d->tcpPort = port;
+ d->localSocket.clear();
disconnectClient();
+ // Wait for the application to announce the port before connecting.
}
void QmlProfilerClientManager::setLocalSocket(QString file)
{
d->localSocket = file;
+ d->tcpHost.clear();
d->tcpPort = Utils::Port();
+ disconnectClient();
+ // We open the server and the application connects to it, so let's do that right away.
connectLocalClient(file);
}
diff --git a/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp b/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp
index b3aaaa87739..072597556ae 100644
--- a/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp
@@ -101,7 +101,7 @@ QmlProfilerRunControl::QmlProfilerRunControl(RunConfiguration *runConfiguration,
QmlProfilerRunControl::~QmlProfilerRunControl()
{
- if (d->m_profilerState)
+ if (d->m_running && d->m_profilerState)
stop();
delete d;
}
diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp
index 3de6a1d905c..729083aafa5 100644
--- a/src/plugins/qmlprofiler/qmlprofilertool.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp
@@ -333,12 +333,13 @@ AnalyzerRunControl *QmlProfilerTool::createRunControl(RunConfiguration *runConfi
}
auto runControl = new QmlProfilerRunControl(runConfiguration, this);
- connect(runControl, &RunControl::finished, [this, runControl] {
+ connect(runControl, &RunControl::finished, this, [this, runControl] {
d->m_toolBusy = false;
updateRunActions();
+ disconnect(d->m_stopAction, &QAction::triggered, runControl, &QmlProfilerRunControl::stop);
});
- connect(d->m_stopAction, &QAction::triggered, runControl, [runControl] { runControl->stop(); });
+ connect(d->m_stopAction, &QAction::triggered, runControl, &QmlProfilerRunControl::stop);
updateRunActions();
return runControl;
diff --git a/src/plugins/remotelinux/linuxdevice.cpp b/src/plugins/remotelinux/linuxdevice.cpp
index aad5c3ddf77..c3ad42f3b27 100644
--- a/src/plugins/remotelinux/linuxdevice.cpp
+++ b/src/plugins/remotelinux/linuxdevice.cpp
@@ -124,27 +124,26 @@ class LinuxPortsGatheringMethod : public PortsGatheringMethod
{
QByteArray commandLine(QAbstractSocket::NetworkLayerProtocol protocol) const
{
- QString procFilePath;
- int addressLength;
- if (protocol == QAbstractSocket::IPv4Protocol) {
- procFilePath = QLatin1String("/proc/net/tcp");
- addressLength = 8;
- } else {
- procFilePath = QLatin1String("/proc/net/tcp6");
- addressLength = 32;
- }
- return QString::fromLatin1("sed "
- "'s/.*: [[:xdigit:]]\\{%1\\}:\\([[:xdigit:]]\\{4\\}\\).*/\\1/g' %2")
- .arg(addressLength).arg(procFilePath).toUtf8();
+ // We might encounter the situation that protocol is given IPv6
+ // but the consumer of the free port information decides to open
+ // an IPv4(only) port. As a result the next IPv6 scan will
+ // report the port again as open (in IPv6 namespace), while the
+ // same port in IPv4 namespace might still be blocked, and
+ // re-use of this port fails.
+ // GDBserver behaves exactly like this.
+
+ Q_UNUSED(protocol)
+
+ // /proc/net/tcp* covers /proc/net/tcp and /proc/net/tcp6
+ return "sed -e 's/.*: [[:xdigit:]]*:\\([[:xdigit:]]\\{4\\}\\).*/\\1/g' /proc/net/tcp*";
}
QList<Utils::Port> usedPorts(const QByteArray &output) const
{
QList<Utils::Port> ports;
QList<QByteArray> portStrings = output.split('\n');
- portStrings.removeFirst();
foreach (const QByteArray &portString, portStrings) {
- if (portString.isEmpty())
+ if (portString.size() != 4)
continue;
bool ok;
const Utils::Port port(portString.toInt(&ok, 16));
diff --git a/src/plugins/texteditor/behaviorsettingswidget.cpp b/src/plugins/texteditor/behaviorsettingswidget.cpp
index f3410915e45..718ea5e6e94 100644
--- a/src/plugins/texteditor/behaviorsettingswidget.cpp
+++ b/src/plugins/texteditor/behaviorsettingswidget.cpp
@@ -63,14 +63,15 @@ BehaviorSettingsWidget::BehaviorSettingsWidget(QWidget *parent)
if (firstNonNegative != mibs.end())
std::rotate(mibs.begin(), firstNonNegative, mibs.end());
foreach (int mib, mibs) {
- QTextCodec *codec = QTextCodec::codecForMib(mib);
- QString compoundName = QLatin1String(codec->name());
- foreach (const QByteArray &alias, codec->aliases()) {
- compoundName += QLatin1String(" / ");
- compoundName += QString::fromLatin1(alias);
+ if (QTextCodec *codec = QTextCodec::codecForMib(mib)) {
+ QString compoundName = QLatin1String(codec->name());
+ foreach (const QByteArray &alias, codec->aliases()) {
+ compoundName += QLatin1String(" / ");
+ compoundName += QString::fromLatin1(alias);
+ }
+ d->m_ui.encodingBox->addItem(compoundName);
+ d->m_codecs.append(codec);
}
- d->m_ui.encodingBox->addItem(compoundName);
- d->m_codecs.append(codec);
}
// Qt5 doesn't list the system locale (QTBUG-34283), so add it manually
diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp
index b4aee7ad109..d9e03133b88 100644
--- a/src/plugins/texteditor/texteditor.cpp
+++ b/src/plugins/texteditor/texteditor.cpp
@@ -370,6 +370,7 @@ public:
int extraAreaSelectionAnchorBlockNumber;
int extraAreaToggleMarkBlockNumber;
int extraAreaHighlightFoldedBlockNumber;
+ int extraAreaPreviousMarkTooltipRequestedLine;
TextEditorOverlay *m_overlay;
TextEditorOverlay *m_snippetOverlay;
@@ -489,6 +490,7 @@ TextEditorWidgetPrivate::TextEditorWidgetPrivate(TextEditorWidget *parent)
extraAreaSelectionAnchorBlockNumber(-1),
extraAreaToggleMarkBlockNumber(-1),
extraAreaHighlightFoldedBlockNumber(-1),
+ extraAreaPreviousMarkTooltipRequestedLine(-1),
m_overlay(0),
m_snippetOverlay(0),
m_searchResultOverlay(0),
@@ -5075,6 +5077,8 @@ void TextEditorWidget::showDefaultContextMenu(QContextMenuEvent *e, Id menuConte
void TextEditorWidget::extraAreaLeaveEvent(QEvent *)
{
+ d->extraAreaPreviousMarkTooltipRequestedLine = -1;
+
// fake missing mouse move event from Qt
QMouseEvent me(QEvent::MouseMove, QPoint(-1, -1), Qt::NoButton, 0, 0);
extraAreaMouseEvent(&me);
@@ -5133,7 +5137,9 @@ void TextEditorWidget::extraAreaMouseEvent(QMouseEvent *e)
if (inMarkArea) {
//Find line by cursor position
int line = cursor.blockNumber() + 1;
- emit markTooltipRequested(this, mapToGlobal(e->pos()), line);
+ if (d->extraAreaPreviousMarkTooltipRequestedLine != line)
+ emit markTooltipRequested(this, mapToGlobal(e->pos()), line);
+ d->extraAreaPreviousMarkTooltipRequestedLine = line;
}
if (e->buttons() & Qt::LeftButton && !d->m_markDragStart.isNull()) {
diff --git a/src/plugins/updateinfo/updateinfo.qbs b/src/plugins/updateinfo/updateinfo.qbs
index 2a875c4d7f4..5253039dbc9 100644
--- a/src/plugins/updateinfo/updateinfo.qbs
+++ b/src/plugins/updateinfo/updateinfo.qbs
@@ -3,8 +3,6 @@ import qbs 1.0
QtcPlugin {
name: "UpdateInfo"
- condition: false // Severely broken atm.
-
Depends { name: "Qt"; submodules: ["widgets", "xml", "network"] }
Depends { name: "Utils" }