Android Avd Dialog: Fix what the Name validator accepts

While at it, make non acceptable chars give better feedback.

Change-Id: I080f01592b2c8cbd6580734ca3e6fd46b9491106
Task-number: QTCREATORBUG-13589
Reviewed-by: BogDan Vatra <bogdan@kde.org>
This commit is contained in:
Daniel Teske
2015-05-06 15:58:46 +02:00
parent 372173331c
commit 0bd0468263
4 changed files with 49 additions and 6 deletions

View File

@@ -180,6 +180,11 @@ bool ToolTip::isVisible()
return t->m_tip && t->m_tip->isVisible();
}
QPoint ToolTip::offsetFromPosition()
{
return QPoint(2, HostOsInfo::isWindowsHost() ? 21 : 16);
}
void ToolTip::showTip()
{
#if !defined(QT_NO_EFFECTS) && !defined(Q_OS_MAC)
@@ -249,7 +254,7 @@ void ToolTip::placeTip(const QPoint &pos, QWidget *w)
{
QRect screen = Internal::screenGeometry(pos, w);
QPoint p = pos;
p += QPoint(2, HostOsInfo::isWindowsHost() ? 21 : 16);
p += offsetFromPosition();
if (p.x() + m_tip->width() > screen.x() + screen.width())
p.rx() -= 4 + m_tip->width();
if (p.y() + m_tip->height() > screen.y() + screen.height())