aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/debugger/watchhandler.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <[email protected]>2012-12-28 18:52:47 +0100
committerhjk <[email protected]>2012-12-28 19:21:30 +0100
commit7bc0818d7a6c209654f5f171023dcf46e83c720f (patch)
tree1c23b55ae26a577438dbd170cc7211430406fc0a /src/plugins/debugger/watchhandler.cpp
parent03fd7266ac015767db2ca113e1e9936c9785f3d7 (diff)
Fixes to edit format handling.
- Close window after last tab has been removed. - Remove type name from tab title (results in too-long tab titles for templates). Change-Id: If4b55423261ed4992b8a7e983704006fdda86843 Reviewed-by: hjk <[email protected]>
Diffstat (limited to 'src/plugins/debugger/watchhandler.cpp')
-rw-r--r--src/plugins/debugger/watchhandler.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/debugger/watchhandler.cpp b/src/plugins/debugger/watchhandler.cpp
index 95ae95aba7b..1966d123c7e 100644
--- a/src/plugins/debugger/watchhandler.cpp
+++ b/src/plugins/debugger/watchhandler.cpp
@@ -1624,8 +1624,11 @@ void WatchHandler::removeSeparateWidget(QObject *o)
{
const int index = o && o->isWidgetType() && !m_separateWindow.isNull() ?
indexOf(m_separateWindow, static_cast<QWidget *>(o)) : -1;
- if (index != -1)
+ if (index != -1) {
m_separateWindow->removeTab(index);
+ if (!m_separateWindow->count())
+ m_separateWindow->hide();
+ }
}
void WatchHandler::showSeparateWidget(QWidget *w)
@@ -1713,9 +1716,7 @@ void WatchHandler::showEditValue(const WatchData &data)
str = QString::fromLatin1(ba.constData(), ba.size());
else if (data.editformat == DisplayUtf8String)
str = QString::fromUtf8(ba.constData(), ba.size());
- t->setWindowTitle(QString::fromLatin1("%1 (%2)").
- arg(data.name, data.displayedType.isEmpty() ?
- QLatin1String(data.type) : data.displayedType));
+ t->setWindowTitle(data.name);
t->setText(str);
showSeparateWidget(t);
}