From da3b21f6cf51ef10f230f2cf86e43fe0e6314193 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Tue, 14 Jul 2009 13:34:40 +1000 Subject: Replace Q_ASSERT with qWarning This is probably more correct, but is also the way it used to behave. --- src/gui/widgets/qlinecontrol.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp index e6f397a..557892f 100644 --- a/src/gui/widgets/qlinecontrol.cpp +++ b/src/gui/widgets/qlinecontrol.cpp @@ -222,8 +222,10 @@ void QLineControl::clear() */ void QLineControl::setSelection(int start, int length) { - Q_ASSERT_X(start >= 0 && start <= (int)m_text.length(), - "QLineControl::setSelection", "Invalid start position"); + if(start < 0 || start > (int)m_text.length()){ + qWarning("QLineControl::setSelection: Invalid start position"); + return; + } if (length > 0) { selstart = start; -- cgit v0.12