forked from qt-creator/qt-creator
Merge branch 'master' of git@scm.dev.nokia.troll.no:creator/mainline
This commit is contained in:
@@ -2834,7 +2834,7 @@ static void qDumpQSharedPointer(QDumper &d)
|
|||||||
|
|
||||||
static void qDumpQString(QDumper &d)
|
static void qDumpQString(QDumper &d)
|
||||||
{
|
{
|
||||||
qCheckAccess(deref(d.data));
|
//qCheckAccess(deref(d.data));
|
||||||
const QString &str = *reinterpret_cast<const QString *>(d.data);
|
const QString &str = *reinterpret_cast<const QString *>(d.data);
|
||||||
|
|
||||||
const int size = str.size();
|
const int size = str.size();
|
||||||
|
@@ -1099,6 +1099,9 @@ void CppModelManager::updateIncludesInPaths(QFutureInterface<void> &future,
|
|||||||
QStringList suffixes)
|
QStringList suffixes)
|
||||||
{
|
{
|
||||||
QMap<QString, QStringList> entriesInPaths;
|
QMap<QString, QStringList> entriesInPaths;
|
||||||
|
typedef QPair<QString, QString> SymLink;
|
||||||
|
typedef QList<SymLink> SymLinks;
|
||||||
|
SymLinks symlinks;
|
||||||
int processed = 0;
|
int processed = 0;
|
||||||
|
|
||||||
future.setProgressRange(0, paths.size());
|
future.setProgressRange(0, paths.size());
|
||||||
@@ -1111,6 +1114,11 @@ void CppModelManager::updateIncludesInPaths(QFutureInterface<void> &future,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
const QString path = paths.takeFirst();
|
const QString path = paths.takeFirst();
|
||||||
|
|
||||||
|
// Skip already scanned paths
|
||||||
|
if (entriesInPaths.contains(path))
|
||||||
|
continue;
|
||||||
|
|
||||||
QStringList entries;
|
QStringList entries;
|
||||||
|
|
||||||
QDirIterator i(path, QDir::Files | QDir::Dirs | QDir::NoDotAndDotDot);
|
QDirIterator i(path, QDir::Files | QDir::Dirs | QDir::NoDotAndDotDot);
|
||||||
@@ -1125,11 +1133,18 @@ void CppModelManager::updateIncludesInPaths(QFutureInterface<void> &future,
|
|||||||
|
|
||||||
// Also scan subdirectory, but avoid endless recursion with symbolic links
|
// Also scan subdirectory, but avoid endless recursion with symbolic links
|
||||||
if (fileInfo.isSymLink()) {
|
if (fileInfo.isSymLink()) {
|
||||||
QMap<QString, QStringList>::const_iterator result = entriesInPaths.find(fileInfo.canonicalFilePath());
|
QString target = fileInfo.symLinkTarget();
|
||||||
|
|
||||||
|
// Don't add broken symlinks
|
||||||
|
if (!QFileInfo(target).exists())
|
||||||
|
continue;
|
||||||
|
|
||||||
|
QMap<QString, QStringList>::const_iterator result = entriesInPaths.find(target);
|
||||||
if (result != entriesInPaths.constEnd()) {
|
if (result != entriesInPaths.constEnd()) {
|
||||||
entriesInPaths.insert(fileName, result.value());
|
entriesInPaths.insert(fileName, result.value());
|
||||||
} else {
|
} else {
|
||||||
paths.append(fileName);
|
paths.append(target);
|
||||||
|
symlinks.append(SymLink(fileName, target));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
paths.append(fileName);
|
paths.append(fileName);
|
||||||
@@ -1145,6 +1160,14 @@ void CppModelManager::updateIncludesInPaths(QFutureInterface<void> &future,
|
|||||||
future.setProgressRange(0, processed + paths.size());
|
future.setProgressRange(0, processed + paths.size());
|
||||||
future.setProgressValue(processed);
|
future.setProgressValue(processed);
|
||||||
}
|
}
|
||||||
|
// link symlinks
|
||||||
|
QListIterator<SymLink> it(symlinks);
|
||||||
|
it.toBack();
|
||||||
|
while (it.hasPrevious()) {
|
||||||
|
SymLink v = it.previous();
|
||||||
|
QMap<QString, QStringList>::const_iterator result = entriesInPaths.find(v.second);
|
||||||
|
entriesInPaths.insert(v.first, result.value());
|
||||||
|
}
|
||||||
|
|
||||||
manager->setIncludesInPaths(entriesInPaths);
|
manager->setIncludesInPaths(entriesInPaths);
|
||||||
|
|
||||||
|
@@ -316,9 +316,10 @@ void DebuggerManager::init()
|
|||||||
// Tooltip
|
// Tooltip
|
||||||
//QTreeView *tooltipView = qobject_cast<QTreeView *>(m_tooltipWindow);
|
//QTreeView *tooltipView = qobject_cast<QTreeView *>(m_tooltipWindow);
|
||||||
//tooltipView->setModel(m_watchHandler->model(TooltipsWatch));
|
//tooltipView->setModel(m_watchHandler->model(TooltipsWatch));
|
||||||
|
//qRegisterMetaType<WatchData>("Debugger::Internal::WatchData");
|
||||||
|
qRegisterMetaType<WatchData>("WatchData");
|
||||||
connect(m_watchHandler, SIGNAL(watchDataUpdateNeeded(WatchData)),
|
connect(m_watchHandler, SIGNAL(watchDataUpdateNeeded(WatchData)),
|
||||||
this, SLOT(updateWatchData(WatchData)));
|
this, SLOT(updateWatchData(WatchData)), Qt::QueuedConnection);
|
||||||
|
|
||||||
m_continueAction = new QAction(this);
|
m_continueAction = new QAction(this);
|
||||||
m_continueAction->setText(tr("Continue"));
|
m_continueAction->setText(tr("Continue"));
|
||||||
|
@@ -83,7 +83,7 @@ namespace Internal {
|
|||||||
using namespace Debugger::Constants;
|
using namespace Debugger::Constants;
|
||||||
|
|
||||||
//#define DEBUG_PENDING 1
|
//#define DEBUG_PENDING 1
|
||||||
//#define DEBUG_SUBITEM 1
|
#define DEBUG_SUBITEM 1
|
||||||
|
|
||||||
#if DEBUG_PENDING
|
#if DEBUG_PENDING
|
||||||
# define PENDING_DEBUG(s) qDebug() << s
|
# define PENDING_DEBUG(s) qDebug() << s
|
||||||
@@ -2958,6 +2958,10 @@ void GdbEngine::runDebuggingHelper(const WatchData &data0, bool dumpChildren)
|
|||||||
|
|
||||||
void GdbEngine::createGdbVariable(const WatchData &data)
|
void GdbEngine::createGdbVariable(const WatchData &data)
|
||||||
{
|
{
|
||||||
|
if (data.iname == _("local.flist.0")) {
|
||||||
|
int i = 1;
|
||||||
|
Q_UNUSED(i);
|
||||||
|
}
|
||||||
postCommand(_("-var-delete \"%1\"").arg(data.iname), WatchUpdate);
|
postCommand(_("-var-delete \"%1\"").arg(data.iname), WatchUpdate);
|
||||||
QString exp = data.exp;
|
QString exp = data.exp;
|
||||||
if (exp.isEmpty() && data.addr.startsWith(__("0x")))
|
if (exp.isEmpty() && data.addr.startsWith(__("0x")))
|
||||||
@@ -3401,11 +3405,17 @@ void GdbEngine::handleDebuggingHelperValue2(const GdbResultRecord &record,
|
|||||||
|
|
||||||
setWatchDataType(data, record.data.findChild("type"));
|
setWatchDataType(data, record.data.findChild("type"));
|
||||||
setWatchDataDisplayedType(data, record.data.findChild("displaytype"));
|
setWatchDataDisplayedType(data, record.data.findChild("displaytype"));
|
||||||
handleChildren(data, contents);
|
QList<WatchData> list;
|
||||||
|
handleChildren(data, contents, &list);
|
||||||
|
//for (int i = 0; i != list.size(); ++i)
|
||||||
|
// qDebug() << "READ: " << list.at(i).toString();
|
||||||
|
qq->watchHandler()->insertBulkData(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GdbEngine::handleChildren(const WatchData &data0, const GdbMi &item)
|
void GdbEngine::handleChildren(const WatchData &data0, const GdbMi &item,
|
||||||
|
QList<WatchData> *list)
|
||||||
{
|
{
|
||||||
|
//qDebug() << "HANDLE CHILDREN: " << data0.toString() << item.toString();
|
||||||
WatchData data = data0;
|
WatchData data = data0;
|
||||||
if (!qq->watchHandler()->isExpandedIName(data.iname))
|
if (!qq->watchHandler()->isExpandedIName(data.iname))
|
||||||
data.setChildrenUnneeded();
|
data.setChildrenUnneeded();
|
||||||
@@ -3432,16 +3442,16 @@ void GdbEngine::handleChildren(const WatchData &data0, const GdbMi &item)
|
|||||||
setWatchDataValueToolTip(data, item.findChild("valuetooltip"),
|
setWatchDataValueToolTip(data, item.findChild("valuetooltip"),
|
||||||
item.findChild("valuetooltipencoded").data().toInt());
|
item.findChild("valuetooltipencoded").data().toInt());
|
||||||
setWatchDataValueDisabled(data, item.findChild("valuedisabled"));
|
setWatchDataValueDisabled(data, item.findChild("valuedisabled"));
|
||||||
|
//qDebug() << "HANDLE CHILDREN: " << data.toString();
|
||||||
|
list->append(data);
|
||||||
|
|
||||||
// try not to repeat data too often
|
// try not to repeat data too often
|
||||||
WatchData childtemplate;
|
WatchData childtemplate;
|
||||||
setWatchDataType(childtemplate, item.findChild("childtype"));
|
setWatchDataType(childtemplate, item.findChild("childtype"));
|
||||||
setWatchDataChildCount(childtemplate, item.findChild("childnumchild"));
|
setWatchDataChildCount(childtemplate, item.findChild("childnumchild"));
|
||||||
//qDebug() << "CHILD TEMPLATE:" << childtemplate.toString();
|
qDebug() << "CHILD TEMPLATE:" << childtemplate.toString();
|
||||||
|
|
||||||
qq->watchHandler()->insertData(data);
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
QList<WatchData> list;
|
|
||||||
foreach (GdbMi child, children.children()) {
|
foreach (GdbMi child, children.children()) {
|
||||||
WatchData data1 = childtemplate;
|
WatchData data1 = childtemplate;
|
||||||
GdbMi name = child.findChild("name");
|
GdbMi name = child.findChild("name");
|
||||||
@@ -3463,11 +3473,9 @@ void GdbEngine::handleChildren(const WatchData &data0, const GdbMi &item)
|
|||||||
//data1.name += " (" + skey + ")";
|
//data1.name += " (" + skey + ")";
|
||||||
data1.name = skey;
|
data1.name = skey;
|
||||||
}
|
}
|
||||||
handleChildren(data1, child);
|
handleChildren(data1, child, list);
|
||||||
list.append(data1);
|
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
qq->watchHandler()->insertBulkData(list);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GdbEngine::handleDebuggingHelperValue3(const GdbResultRecord &record,
|
void GdbEngine::handleDebuggingHelperValue3(const GdbResultRecord &record,
|
||||||
|
@@ -241,7 +241,8 @@ private:
|
|||||||
void debugMessage(const QString &msg);
|
void debugMessage(const QString &msg);
|
||||||
bool showToolTip();
|
bool showToolTip();
|
||||||
|
|
||||||
void handleChildren(const WatchData &parent, const GdbMi &child);
|
void handleChildren(const WatchData &parent, const GdbMi &child,
|
||||||
|
QList<WatchData> *insertions);
|
||||||
const bool m_dumperInjectionLoad;
|
const bool m_dumperInjectionLoad;
|
||||||
|
|
||||||
OutputCollector m_outputCollector;
|
OutputCollector m_outputCollector;
|
||||||
|
@@ -1003,7 +1003,7 @@ void WatchHandler::insertBulkData(const QList<WatchData> &list)
|
|||||||
{
|
{
|
||||||
if (list.isEmpty())
|
if (list.isEmpty())
|
||||||
return;
|
return;
|
||||||
QHash<QString, QList<WatchData> > hash;
|
QMap<QString, QList<WatchData> > hash;
|
||||||
|
|
||||||
foreach (const WatchData &data, list) {
|
foreach (const WatchData &data, list) {
|
||||||
if (data.isSomethingNeeded())
|
if (data.isSomethingNeeded())
|
||||||
|
@@ -114,6 +114,7 @@ bool HelloWorldPlugin::initialize(const QStringList &arguments, QString *error_m
|
|||||||
baseMode->setIcon(QIcon());
|
baseMode->setIcon(QIcon());
|
||||||
baseMode->setPriority(0);
|
baseMode->setPriority(0);
|
||||||
baseMode->setWidget(new QPushButton(tr("Hello World PushButton!")));
|
baseMode->setWidget(new QPushButton(tr("Hello World PushButton!")));
|
||||||
|
baseMode->setContext(context);
|
||||||
addAutoReleasedObject(baseMode);
|
addAutoReleasedObject(baseMode);
|
||||||
|
|
||||||
// Add the Hello World action command to the mode manager (with 0 priority)
|
// Add the Hello World action command to the mode manager (with 0 priority)
|
||||||
|
Reference in New Issue
Block a user