aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/debugger/watchhandler.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <[email protected]>2010-01-29 22:49:55 +0100
committerOswald Buddenhagen <[email protected]>2010-01-29 22:50:23 +0100
commit75b42f18d886b59dbf3380dd12f39f40005ef08b (patch)
treecd1cb5699064fa897f11d9f9f4923c0c0f05d95a /src/plugins/debugger/watchhandler.cpp
parent43203140461174071f7a3e68bf388a6522556810 (diff)
parenta6ca348636dd92ab1445cff2286b3293163f5cea (diff)
Merge remote branch 'origin/1.3'
Trailing whitespace removal re-applied manually.
Diffstat (limited to 'src/plugins/debugger/watchhandler.cpp')
-rw-r--r--src/plugins/debugger/watchhandler.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/plugins/debugger/watchhandler.cpp b/src/plugins/debugger/watchhandler.cpp
index 982965f42d0..a1d61cabb73 100644
--- a/src/plugins/debugger/watchhandler.cpp
+++ b/src/plugins/debugger/watchhandler.cpp
@@ -61,7 +61,7 @@
#if DEBUG_MODEL
# define MODEL_DEBUG(s) qDebug() << s
#else
-# define MODEL_DEBUG(s)
+# define MODEL_DEBUG(s)
#endif
#define MODEL_DEBUGX(s) qDebug() << s
@@ -100,7 +100,7 @@ public:
// WatchData
//
////////////////////////////////////////////////////////////////////
-
+
WatchData::WatchData() :
hasChildren(false),
generation(-1),
@@ -173,7 +173,7 @@ void WatchData::setValue(const QString &value0)
// column. No need to duplicate it here.
if (value.startsWith("(" + type + ") 0x"))
value = value.section(" ", -1, -1);
-
+
setValueUnneeded();
}
@@ -515,7 +515,7 @@ static QString niceTypeHelper(const QString typeIn)
for (int i = 0; i < 10; ++i) {
int start = type.indexOf("std::allocator<");
if (start == -1)
- break;
+ break;
// search for matching '>'
int pos;
int level = 0;
@@ -738,7 +738,7 @@ bool WatchModel::hasChildren(const QModelIndex &parent) const
WatchItem *WatchModel::watchItem(const QModelIndex &idx) const
{
- return idx.isValid()
+ return idx.isValid()
? static_cast<WatchItem*>(idx.internalPointer()) : m_root;
}
@@ -747,7 +747,7 @@ QModelIndex WatchModel::watchIndex(const WatchItem *item) const
return watchIndexHelper(item, m_root, QModelIndex());
}
-QModelIndex WatchModel::watchIndexHelper(const WatchItem *needle,
+QModelIndex WatchModel::watchIndexHelper(const WatchItem *needle,
const WatchItem *parentItem, const QModelIndex &parentIndex) const
{
if (needle == parentItem)
@@ -762,7 +762,7 @@ QModelIndex WatchModel::watchIndexHelper(const WatchItem *needle,
return QModelIndex();
}
-void WatchModel::emitDataChanged(int column, const QModelIndex &parentIndex)
+void WatchModel::emitDataChanged(int column, const QModelIndex &parentIndex)
{
QModelIndex idx1 = index(0, column, parentIndex);
QModelIndex idx2 = index(rowCount(parentIndex) - 1, column, parentIndex);
@@ -841,7 +841,7 @@ QVariant WatchModel::data(const QModelIndex &idx, int role) const
case ActiveDataRole:
qDebug() << "ASK FOR" << data.iname;
return true;
-
+
case TypeFormatListRole:
if (isIntType(data.type))
return QStringList() << tr("decimal") << tr("hexadecimal")
@@ -872,7 +872,7 @@ QVariant WatchModel::data(const QModelIndex &idx, int role) const
}
default:
- break;
+ break;
}
return QVariant();
}
@@ -890,7 +890,7 @@ bool WatchModel::setData(const QModelIndex &index, const QVariant &value, int ro
}
} else if (role == TypeFormatRole) {
m_handler->setFormat(data.type, value.toInt());
- } else if (role == IndividualFormatRole) {
+ } else if (role == IndividualFormatRole) {
const int format = value.toInt();
if (format == -1) {
m_handler->m_individualFormats.remove(data.iname);
@@ -944,7 +944,7 @@ QVariant WatchModel::headerData(int section, Qt::Orientation orientation, int ro
case 2: return QString(tr("Type") + QLatin1String(" "));
}
}
- return QVariant();
+ return QVariant();
}
struct IName : public QByteArray
@@ -964,7 +964,7 @@ bool iNameLess(const QString &iname1, const QString &iname2)
return i1 < i2;
}
}
- return name1 < name2;
+ return name1 < name2;
}
bool operator<(const IName &iname1, const IName &iname2)
@@ -981,7 +981,7 @@ static int findInsertPosition(const QList<WatchItem *> &list, const WatchItem *i
{
QList<WatchItem *>::const_iterator it =
qLowerBound(list.begin(), list.end(), item, iNameSorter);
- return it - list.begin();
+ return it - list.begin();
}
void WatchModel::insertData(const WatchData &data)
@@ -1032,7 +1032,7 @@ void WatchModel::insertData(const WatchData &data)
void WatchModel::insertBulkData(const QList<WatchData> &list)
{
#if 0
- for (int i = 0; i != list.size(); ++i)
+ for (int i = 0; i != list.size(); ++i)
insertData(list.at(i));
return;
#endif
@@ -1524,7 +1524,7 @@ WatchModel *WatchHandler::model(WatchType type) const
QTC_ASSERT(false, /**/);
return 0;
}
-
+
WatchModel *WatchHandler::modelForIName(const QByteArray &iname) const
{
if (iname.startsWith("local"))