Commit 7bc0818d authored by Friedemann Kleint's avatar Friedemann Kleint Committed by hjk
Browse files

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: default avatarhjk <qthjk@ovi.com>
parent 03fd7266
......@@ -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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment