Commit b43094f8 authored by dt's avatar dt
Browse files

Merge branch 'master' of git@scm.dev.nokia.troll.no:creator/mainline

parents daea8e66 3e6cf4e9
......@@ -109,7 +109,7 @@ int qtGhVersion = QT_VERSION;
'P(d, name, value)' roughly expands to:
d << (name) << "='" << value << "'";
d << (name) << "=\"" << value << "\"";
Useful (i.e. understood by the IDE) names include:
......@@ -551,7 +551,7 @@ void QDumper::addCommaIfNeeded()
if (pos == 0)
return;
char c = qDumpOutBuffer[pos - 1];
if (c == '}' || c == '\'' || c == ']')
if (c == '}' || c == '"' || c == ']')
put(',');
}
......@@ -630,7 +630,7 @@ void QDumper::endHash()
void QDumper::putEllipsis()
{
addCommaIfNeeded();
*this << "{name='<incomplete>',value='',type='" << innertype << "'}";
*this << "{name=\"<incomplete>\",value=\"\",type=\"" << innertype << "\"}";
}
//
......@@ -642,7 +642,7 @@ void QDumper::putEllipsis()
#define P(dumper,name,value) \
do { \
dumper.addCommaIfNeeded(); \
dumper << (name) << "='" << value << "'"; \
dumper << (name) << "=\"" << value << "\""; \
} while (0)
// simple string property
......@@ -740,7 +740,7 @@ static void qDumpInnerValueHelper(QDumper &d, const char *type, const void *addr
return;
case 'B':
if (isEqual(type, "QByteArray")) {
d << key << "encoded='1',";
d << key << "encoded=\"1\",";
P(d, key, *(QByteArray*)addr);
}
return;
......@@ -769,7 +769,7 @@ static void qDumpInnerValueHelper(QDumper &d, const char *type, const void *addr
return;
case 'S':
if (isEqual(type, "QString")) {
d << key << "encoded='1',";
d << key << "encoded=\"1\",";
P(d, key, *(QString*)addr);
}
return;
......@@ -839,7 +839,7 @@ static void qDumpQByteArray(QDumper &d)
unsigned char u = (isprint(c) && c != '\'' && c != '"') ? c : '?';
sprintf(buf, "%02x (%u '%c')", c, c, u);
d.beginHash();
P(d, "name", "[" << i << "]");
P(d, "name", i);
P(d, "value", buf);
d.endHash();
}
......@@ -1104,14 +1104,14 @@ static void qDumpQHash(QDumper &d)
while (node != end) {
d.beginHash();
if (simpleKey) {
P(d, "name", "[" << i << "]");
P(d, "name", i);
qDumpInnerValueHelper(d, keyType, addOffset(node, keyOffset), "key");
if (simpleValue)
qDumpInnerValueHelper(d, valueType, addOffset(node, valueOffset));
P(d, "type", valueType);
P(d, "addr", addOffset(node, valueOffset));
} else {
P(d, "name", "[" << i << "]");
P(d, "name", i);
//P(d, "exp", "*(char*)" << node);
P(d, "exp", "*('"NS"QHashNode<" << keyType << "," << valueType << " >'*)" << node);
P(d, "type", "'"NS"QHashNode<" << keyType << "," << valueType << " >'");
......@@ -1215,7 +1215,7 @@ static void qDumpQList(QDumper &d)
d << ",children=[";
for (int i = 0; i != n; ++i) {
d.beginHash();
P(d, "name", "[" << i << "]");
P(d, "name", i);
if (innerTypeIsPointer) {
void *p = ldata.d->array + i + pdata->begin;
if (p) {
......@@ -1275,7 +1275,7 @@ static void qDumpQLinkedList(QDumper &d)
const void *p = deref(ldata);
for (int i = 0; i != n; ++i) {
d.beginHash();
P(d, "name", "[" << i << "]");
P(d, "name", i);
const void *addr = addOffset(p, 2 * sizeof(void*));
qDumpInnerValueOrPointer(d, d.innertype, stripped, addr);
p = deref(p);
......@@ -1414,7 +1414,7 @@ static void qDumpQMap(QDumper &d)
while (node != end) {
d.beginHash();
P(d, "name", "[" << i << "]");
P(d, "name", i);
if (simpleKey) {
P(d, "type", valueType);
qDumpInnerValueHelper(d, keyType, addOffset(node, keyOffset), "key");
......@@ -1660,7 +1660,7 @@ static void qDumpQObjectMethodList(QDumper &d)
const QMetaMethod & method = mo->method(i);
int mt = method.methodType();
d.beginHash();
P(d, "name", "[" << i << "] " << mo->indexOfMethod(method.signature())
P(d, "name", i << " " << mo->indexOfMethod(method.signature())
<< " " << method.signature());
P(d, "value", (mt == QMetaMethod::Signal ? "<Signal>" : "<Slot>") << " (" << mt << ")");
d.endHash();
......@@ -1712,11 +1712,11 @@ static void qDumpQObjectSignal(QDumper &d)
for (int i = 0; i != connList.size(); ++i) {
const QObjectPrivate::Connection &conn = connList.at(i);
d.beginHash();
P(d, "name", "[" << i << "] receiver");
P(d, "name", i << " receiver");
qDumpInnerValueHelper(d, NS"QObject *", conn.receiver);
d.endHash();
d.beginHash();
P(d, "name", "[" << i << "] slot");
P(d, "name", i << " slot");
P(d, "type", "");
if (conn.receiver)
P(d, "value", conn.receiver->metaObject()->method(conn.method).signature());
......@@ -1725,7 +1725,7 @@ static void qDumpQObjectSignal(QDumper &d)
P(d, "numchild", "0");
d.endHash();
d.beginHash();
P(d, "name", "[" << i << "] type");
P(d, "name", i << " type");
P(d, "type", "");
P(d, "value", "<" << qConnectionTypes[conn.method] << " connection>");
P(d, "numchild", "0");
......@@ -1756,7 +1756,7 @@ static void qDumpQObjectSignalList(QDumper &d)
int k = mo->indexOfSignal(method.signature());
const QObjectPrivate::ConnectionList &connList = qConnectionList(ob, k);
d.beginHash();
P(d, "name", "[" << k << "]");
P(d, "name", k);
P(d, "value", method.signature());
P(d, "numchild", connList.size());
//P(d, "numchild", "1");
......@@ -1796,17 +1796,17 @@ static void qDumpQObjectSlot(QDumper &d)
const QMetaMethod & method =
sender.sender->metaObject()->method(sender.signal);
d.beginHash();
P(d, "name", "[" << s << "] sender");
P(d, "name", s << " sender");
qDumpInnerValueHelper(d, NS"QObject *", sender.sender);
d.endHash();
d.beginHash();
P(d, "name", "[" << s << "] signal");
P(d, "name", s << " signal");
P(d, "type", "");
P(d, "value", method.signature());
P(d, "numchild", "0");
d.endHash();
d.beginHash();
P(d, "name", "[" << s << "] type");
P(d, "name", s << " type");
P(d, "type", "");
P(d, "value", "<" << qConnectionTypes[conn.method] << " connection>");
P(d, "numchild", "0");
......@@ -1843,7 +1843,7 @@ static void qDumpQObjectSlotList(QDumper &d)
if (method.methodType() == QMetaMethod::Slot) {
d.beginHash();
int k = mo->indexOfSlot(method.signature());
P(d, "name", "[" << k << "]");
P(d, "name", k);
P(d, "value", method.signature());
// count senders. expensive...
......@@ -1911,7 +1911,7 @@ static void qDumpQSet(QDumper &d)
for (int bucket = 0; bucket != hd->numBuckets && i <= 10000; ++bucket) {
for (node = hd->buckets[bucket]; node->next; node = node->next) {
d.beginHash();
P(d, "name", "[" << i << "]");
P(d, "name", i);
P(d, "type", d.innertype);
P(d, "exp", "(('"NS"QHashNode<" << d.innertype
<< ","NS"QHashDummyValue>'*)"
......@@ -1970,7 +1970,7 @@ static void qDumpQStringList(QDumper &d)
d << ",children=[";
for (int i = 0; i != n; ++i) {
d.beginHash();
P(d, "name", "[" << i << "]");
P(d, "name", i);
P(d, "value", list[i]);
P(d, "valueencoded", "1");
d.endHash();
......@@ -2008,7 +2008,7 @@ static void qDumpQVariantHelper(const void *data, QString *value,
*numchild = 0;
break;
case QVariant::String:
*value = QLatin1Char('\'') + v.toString() + QLatin1Char('\'');
*value = QLatin1Char('"') + v.toString() + QLatin1Char('"');
*numchild = 0;
break;
case QVariant::StringList:
......@@ -2108,7 +2108,7 @@ static void qDumpQVector(QDumper &d)
d << ",children=[";
for (int i = 0; i != n; ++i) {
d.beginHash();
P(d, "name", "[" << i << "]");
P(d, "name", i);
qDumpInnerValueOrPointer(d, d.innertype, stripped,
addOffset(v, i * innersize + typeddatasize));
d.endHash();
......@@ -2156,7 +2156,7 @@ static void qDumpStdList(QDumper &d)
it = list.begin();
for (int i = 0; i < 1000 && it != list.end(); ++i, ++it) {
d.beginHash();
P(d, "name", "[" << i << "]");
P(d, "name", i);
qDumpInnerValueOrPointer(d, d.innertype, stripped, it.operator->());
d.endHash();
}
......@@ -2218,7 +2218,7 @@ static void qDumpStdMap(QDumper &d)
d.endHash();
} else {
d.beginHash();
P(d, "name", "[" << i << "]");
P(d, "name", i);
P(d, "addr", it.operator->());
P(d, "type", pairType);
d.endHash();
......@@ -2240,9 +2240,9 @@ static void qDumpStdString(QDumper &d)
qCheckAccess(str.c_str() + str.size() - 1);
}
d << ",value='";
d << ",value=\"";
d.putBase64Encoded(str.c_str(), str.size());
d << "'";
d << "\"";
P(d, "valueencoded", "1");
P(d, "type", "std::string");
P(d, "numchild", "0");
......@@ -2305,7 +2305,7 @@ static void qDumpStdVector(QDumper &d)
d << ",children=[";
for (int i = 0; i != n; ++i) {
d.beginHash();
P(d, "name", "[" << i << "]");
P(d, "name", i);
qDumpInnerValueOrPointer(d, d.innertype, stripped,
addOffset(v->start, i * innersize));
d.endHash();
......@@ -2482,54 +2482,54 @@ void qDumpObjectData440(
// They are mentioned here nevertheless. For types that not listed
// here, dumpers won't be used.
d << "dumpers=["
"'"NS"QByteArray',"
"'"NS"QDateTime',"
"'"NS"QDir',"
"'"NS"QFile',"
"'"NS"QFileInfo',"
"'"NS"QHash',"
"'"NS"QHashNode',"
"'"NS"QImage',"
"'"NS"QLinkedList',"
"'"NS"QList',"
"'"NS"QLocale',"
"'"NS"QMap',"
"'"NS"QMapNode',"
"'"NS"QModelIndex',"
"\""NS"QByteArray\","
"\""NS"QDateTime\","
"\""NS"QDir\","
"\""NS"QFile\","
"\""NS"QFileInfo\","
"\""NS"QHash\","
"\""NS"QHashNode\","
"\""NS"QImage\","
"\""NS"QLinkedList\","
"\""NS"QList\","
"\""NS"QLocale\","
"\""NS"QMap\","
"\""NS"QMapNode\","
"\""NS"QModelIndex\","
#if QT_VERSION >= 0x040500
"'"NS"QMultiMap',"
"\""NS"QMultiMap\","
#endif
"'"NS"QObject',"
"'"NS"QObjectMethodList'," // hack to get nested properties display
"'"NS"QObjectPropertyList',"
"\""NS"QObject\","
"\""NS"QObjectMethodList\"," // hack to get nested properties display
"\""NS"QObjectPropertyList\","
#if PRIVATE_OBJECT_ALLOWED
"'"NS"QObjectSignal',"
"'"NS"QObjectSignalList',"
"'"NS"QObjectSlot',"
"'"NS"QObjectSlotList',"
"\""NS"QObjectSignal\","
"\""NS"QObjectSignalList\","
"\""NS"QObjectSlot\","
"\""NS"QObjectSlotList\","
#endif // PRIVATE_OBJECT_ALLOWED
// << "'"NS"QRegion',"
"'"NS"QSet',"
"'"NS"QString',"
"'"NS"QStringList',"
"'"NS"QTextCodec',"
"'"NS"QVariant',"
"'"NS"QVector',"
"'"NS"QWidget',"
"'string',"
"'wstring',"
"'std::basic_string',"
"'std::list',"
"'std::map',"
"'std::string',"
"'std::vector',"
"'std::wstring',"
// << "\""NS"QRegion\","
"\""NS"QSet\","
"\""NS"QString\","
"\""NS"QStringList\","
"\""NS"QTextCodec\","
"\""NS"QVariant\","
"\""NS"QVector\","
"\""NS"QWidget\","
"\"string\","
"\"wstring\","
"\"std::basic_string\","
"\"std::list\","
"\"std::map\","
"\"std::string\","
"\"std::vector\","
"\"std::wstring\","
"]";
d << ",qtversion=["
"'" << ((QT_VERSION >> 16) & 255) << "',"
"'" << ((QT_VERSION >> 8) & 255) << "',"
"'" << ((QT_VERSION) & 255) << "']";
d << ",namespace='"NS"'";
"\"" << ((QT_VERSION >> 16) & 255) << "\","
"\"" << ((QT_VERSION >> 8) & 255) << "\","
"\"" << ((QT_VERSION) & 255) << "\"]";
d << ",namespace=\""NS"\"";
d.disarm();
}
......
src/plugins/coreplugin/images/sidebaricon.png

294 Bytes | W: | H:

src/plugins/coreplugin/images/sidebaricon.png

436 Bytes | W: | H:

src/plugins/coreplugin/images/sidebaricon.png
src/plugins/coreplugin/images/sidebaricon.png
src/plugins/coreplugin/images/sidebaricon.png
src/plugins/coreplugin/images/sidebaricon.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -518,7 +518,8 @@ void ManhattanStyle::drawPrimitive(PrimitiveElement element, const QStyleOption
painter->drawLine(rect.bottomLeft(), rect.bottomRight());
}
#ifndef Q_WS_MAC
else if (option->state & State_MouseOver) {
else if (option->state & State_Enabled &&
option->state & State_MouseOver) {
QColor lighter(255, 255, 255, 35);
painter->fillRect(rect, lighter);
painter->drawLine(rect.topRight(), rect.bottomRight());
......
......@@ -133,5 +133,6 @@
<glob pattern="*.cxx"/>
<glob pattern="*.c++"/>
<glob pattern="*.C"/>
<glob pattern="*.inl"/>
</mime-type>
</mime-info>
......@@ -15,33 +15,42 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QCheckBox" name="caseSensitive">
<property name="text">
<string>&amp;Case-sensitive completion</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="autoInsertBraces">
<property name="text">
<string>&amp;Automatically insert braces</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="partiallyComplete">
<property name="text">
<string>Autocomplete common &amp;prefix</string>
</property>
<property name="checked">
<bool>true</bool>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Completion Settings</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QCheckBox" name="caseSensitive">
<property name="text">
<string>&amp;Case-sensitive completion</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="autoInsertBraces">
<property name="text">
<string>&amp;Automatically insert braces</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="partiallyComplete">
<property name="text">
<string>Autocomplete common &amp;prefix</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
......
......@@ -888,7 +888,9 @@ void DebuggerManager::executeDebuggerCommand(const QString &command)
void DebuggerManager::sessionLoaded()
{
exitDebugger();
cleanupViews();
setStatus(DebuggerProcessNotReady);
setBusyCursor(false);
loadSessionData();
}
......@@ -1092,6 +1094,28 @@ bool DebuggerManager::useFastStart() const
return 0; // && m_settings.m_useFastStart;
}
void DebuggerManager::setUseCustomDumpers(bool on)
{
m_settings.m_useCustomDumpers = on;
engine()->setUseCustomDumpers(on);
}
void DebuggerManager::setUseFastStart(bool on)
{
m_settings.m_useFastStart = on;
}
void DebuggerManager::setDebugDumpers(bool on)
{
m_settings.m_debugDumpers = on;
engine()->setDebugDumpers(on);
}
void DebuggerManager::setSkipKnownFrames(bool on)
{
m_settings.m_skipKnownFrames = on;
}
void DebuggerManager::queryCurrentTextEditor(QString *fileName, int *lineNumber,
QObject **object)
{
......
......@@ -167,8 +167,6 @@ private:
virtual WatchHandler *watchHandler() = 0;
virtual void showApplicationOutput(const QString &data) = 0;
//virtual QAction *useCustomDumpersAction() const = 0;
//virtual QAction *debugDumpersAction() const = 0;
virtual bool skipKnownFrames() const = 0;
virtual bool debugDumpers() const = 0;
virtual bool useCustomDumpers() const = 0;
......@@ -283,6 +281,11 @@ public slots:
void showStatusMessage(const QString &msg, int timeout = -1); // -1 forever
void setUseCustomDumpers(bool on);
void setDebugDumpers(bool on);
void setSkipKnownFrames(bool on);
void setUseFastStart(bool on);
private slots:
void showDebuggerOutput(const QString &prefix, const QString &msg);
void showDebuggerInput(const QString &prefix, const QString &msg);
......@@ -312,9 +315,7 @@ private:
StackHandler *stackHandler() { return m_stackHandler; }
ThreadsHandler *threadsHandler() { return m_threadsHandler; }
WatchHandler *watchHandler() { return m_watchHandler; }
//QAction *useCustomDumpersAction() const { return m_useCustomDumpersAction; }
//QAction *useToolTipsAction() const { return m_useToolTipsAction; }
//QAction *debugDumpersAction() const { return m_debugDumpersAction; }
bool skipKnownFrames() const;
bool debugDumpers() const;
bool useCustomDumpers() const;
......
......@@ -251,6 +251,7 @@ public:
void finish() {} // automatically calls "apply"
private:
friend class DebuggerPlugin;
Ui::GdbOptionPage m_ui;
DebuggerSettings m_settings;
......@@ -300,6 +301,10 @@ QWidget *GdbOptionPage::createPage(QWidget *parent)
//m_dumpLogAction = new QAction(this);
//m_dumpLogAction->setText(tr("Dump Log File for Debugging Purposes"));
//
connect(m_ui.checkBoxUseCustomDumpers, SIGNAL(clicked(bool)),
m_plugin->m_manager, SLOT(setUseCustomDumpers(bool)));
return w;
}
......@@ -560,10 +565,7 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *error_mes
connect(resetToSimpleAction, SIGNAL(triggered()),
m_manager, SLOT(setSimpleDockWidgetArrangement()));
m_generalOptionPage = 0;
// FIXME:
// FIXME:
m_generalOptionPage = new GdbOptionPage(this);
addObject(m_generalOptionPage);
......
This diff is collapsed.
......@@ -134,6 +134,9 @@ private:
void loadSymbols(const QString &moduleName);
void loadAllSymbols();
void setDebugDumpers(bool on);
void setUseCustomDumpers(bool on);
//
// Own stuff
//
......@@ -167,9 +170,6 @@ private:
void updateLocals();
private slots:
void setDebugDumpers(bool on);
void setCustomDumpersWanted(bool on);
void handleResponse();
void gdbProcError(QProcess::ProcessError error);
......
......@@ -86,6 +86,8 @@ public:
virtual void loadAllSymbols() = 0;
virtual void reloadRegisters() = 0;
virtual void setDebugDumpers(bool on) = 0;
virtual void setUseCustomDumpers(bool on) = 0;
};
} // namespace Internal
......
......@@ -101,6 +101,9 @@ private:
void loadSessionData() {}
void saveSessionData() {}
void setDebugDumpers(bool) {}
void setUseCustomDumpers(bool) {}
void assignValueInDebugger(const QString &expr, const QString &value);
void executeDebuggerCommand(const QString & command);
......
......@@ -255,7 +255,6 @@ QString WatchData::toString() const
return res;
}
static bool iNameSorter(const WatchData &d1, const WatchData &d2)
{
if (d1.level != d2.level)
......@@ -265,19 +264,9 @@ static bool iNameSorter(const WatchData &d1, const WatchData &d2)
QString name1 = d1.iname.section('.', level, level);