Merge remote-tracking branch 'origin/4.6'

Conflicts:
	src/plugins/cmakeprojectmanager/cmakeproject.h
	src/plugins/debugger/debuggerplugin.cpp
	src/plugins/ios/iosrunfactories.cpp
	src/plugins/nim/project/nimproject.h
	src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp
	src/plugins/qmakeandroidsupport/qmakeandroidrunfactories.cpp
	src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp
	src/plugins/qmlprojectmanager/qmlproject.h
	src/plugins/qnx/qnxrunconfigurationfactory.cpp
	src/plugins/qtsupport/exampleslistmodel.cpp
	src/plugins/winrt/winrtrunfactories.cpp

Change-Id: Ib029fdbaa65270426332f5edd6e90264be5fb539
This commit is contained in:
Eike Ziller
2018-03-13 11:25:38 +01:00
74 changed files with 2241 additions and 912 deletions

View File

@@ -55,7 +55,6 @@
#include <coreplugin/messagebox.h>
#include <projectexplorer/devicesupport/deviceprocess.h>
#include <projectexplorer/itaskhandler.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/taskhub.h>
@@ -131,52 +130,6 @@ static bool isMostlyHarmlessMessage(const QStringRef &msg)
"Invalid argument\\n";
}
///////////////////////////////////////////////////////////////////////
//
// Debuginfo Taskhandler
//
///////////////////////////////////////////////////////////////////////
class DebugInfoTask
{
public:
QString command;
};
class DebugInfoTaskHandler : public ITaskHandler
{
public:
explicit DebugInfoTaskHandler(GdbEngine *engine)
: m_engine(engine)
{}
bool canHandle(const Task &task) const override
{
return m_debugInfoTasks.contains(task.taskId);
}
void handle(const Task &task) override
{
m_engine->requestDebugInformation(m_debugInfoTasks.value(task.taskId));
}
void addTask(unsigned id, const DebugInfoTask &task)
{
m_debugInfoTasks[id] = task;
}
QAction *createAction(QObject *parent) const override
{
QAction *action = new QAction(DebuggerPlugin::tr("Install &Debug Information"), parent);
action->setToolTip(DebuggerPlugin::tr("Tries to install missing debug information."));
return action;
}
private:
GdbEngine *m_engine;
QHash<unsigned, DebugInfoTask> m_debugInfoTasks;
};
///////////////////////////////////////////////////////////////////////
//
// GdbEngine
@@ -190,9 +143,6 @@ GdbEngine::GdbEngine()
m_gdbOutputCodec = QTextCodec::codecForLocale();
m_inferiorOutputCodec = QTextCodec::codecForLocale();
m_debugInfoTaskHandler = new DebugInfoTaskHandler(this);
//ExtensionSystem::PluginManager::addObject(m_debugInfoTaskHandler);
m_commandTimer.setSingleShot(true);
connect(&m_commandTimer, &QTimer::timeout,
this, &GdbEngine::commandTimeout);
@@ -222,10 +172,6 @@ GdbEngine::GdbEngine()
GdbEngine::~GdbEngine()
{
//ExtensionSystem::PluginManager::removeObject(m_debugInfoTaskHandler);
delete m_debugInfoTaskHandler;
m_debugInfoTaskHandler = 0;
// Prevent sending error messages afterwards.
disconnect();
}
@@ -434,10 +380,7 @@ void GdbEngine::handleResponse(const QString &buff)
FileName(), 0, Debugger::Constants::TASK_CATEGORY_DEBUGGER_DEBUGINFO);
TaskHub::addTask(task);
DebugInfoTask dit;
dit.command = cmd;
m_debugInfoTaskHandler->addTask(task.taskId, dit);
Internal::addDebugInfoTask(task.taskId, cmd);
}
}
@@ -4184,11 +4127,6 @@ void GdbEngine::scheduleTestResponse(int testCase, const QString &response)
m_scheduledTestResponses[token] = response;
}
void GdbEngine::requestDebugInformation(const DebugInfoTask &task)
{
QProcess::startDetached(task.command);
}
QString GdbEngine::msgGdbStopFailed(const QString &why)
{
return tr("The gdb process could not be stopped:\n%1").arg(why);

View File

@@ -382,11 +382,6 @@ private: ////////// General Interface //////////
QHash<int, QString> m_scheduledTestResponses;
QSet<int> m_testCases;
// Debug information
friend class DebugInfoTaskHandler;
void requestDebugInformation(const DebugInfoTask &task);
DebugInfoTaskHandler *m_debugInfoTaskHandler;
bool m_systemDumpersLoaded = false;
static QString msgGdbStopFailed(const QString &why);