[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/3.5/kdeutils/kcalc
From: Klaus Niederkrüger <kniederk () mi ! uni-koeln ! de>
Date: 2006-04-24 7:54:49
Message-ID: 1145865289.663779.15816.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 533240 by kniederk:
Removed remaining code fractions that once limited the size of the
display. With this Bug 125410 should be fixed. But need to test a lot!
M +0 -20 kcalcdisplay.cpp
M +0 -3 kcalcdisplay.h
--- branches/KDE/3.5/kdeutils/kcalc/kcalcdisplay.cpp #533239:533240
@@ -271,13 +271,6 @@
unsigned long long int tmp_workaround = static_cast<unsigned long long int>(_display_amount);
display_str = QString::number(tmp_workaround, _num_base).upper();
-#if 0
- if (display_str.length() > DSP_SIZE)
- {
- sendEvent(EventError);
- return false;
- }
-#endif
}
else // _num_base == NB_DECIMAL
{
@@ -290,13 +283,6 @@
else
display_str = QCString().sprintf(PRINT_LONG_BIG, _precision, _display_amount);
#endif
-#if 0
- if (display_str.length() > DSP_SIZE)
- {
- sendEvent(EventError);
- return false;
- }
-#endif
}
setText(display_str);
@@ -380,7 +366,6 @@
{
case NB_BINARY:
Q_ASSERT(_period == false && _eestate == false);
- Q_ASSERT(tmp_string.length() <= DSP_SIZE);
setText(tmp_string);
_display_amount = static_cast<unsigned long long int>(STRTOUL(_str_int.latin1(), 0, 2));
if (_neg_sign)
@@ -390,7 +375,6 @@
case NB_OCTAL:
Q_ASSERT(_period == false && _eestate == false);
- Q_ASSERT(tmp_string.length() <= DSP_SIZE);
setText(tmp_string);
_display_amount = static_cast<unsigned long long int>(STRTOUL(_str_int.latin1(), 0, 8));
if (_neg_sign)
@@ -399,7 +383,6 @@
case NB_HEX:
Q_ASSERT(_period == false && _eestate == false);
- Q_ASSERT(tmp_string.length() <= DSP_SIZE);
setText(tmp_string);
_display_amount = static_cast<unsigned long long int>(STRTOUL(_str_int.latin1(), 0, 16));
if (_neg_sign)
@@ -409,7 +392,6 @@
case NB_DECIMAL:
if(_eestate == false)
{
- Q_ASSERT(tmp_string.length() <= DSP_SIZE);
setText(tmp_string);
_display_amount = tmp_string;
}
@@ -418,14 +400,12 @@
if(_str_int_exp.isNull())
{
// add 'e0' to display but not to conversion
- Q_ASSERT(tmp_string.length()+2 <= DSP_SIZE);
_display_amount = tmp_string;
setText(tmp_string + "e0");
}
else
{
tmp_string += 'e' + _str_int_exp;
- Q_ASSERT(tmp_string.length() <= DSP_SIZE);
setText(tmp_string);
_display_amount = tmp_string;
}
--- branches/KDE/3.5/kdeutils/kcalc/kcalcdisplay.h #533239:533240
@@ -50,9 +50,6 @@
#define PRINT_HEX "%lX"
#endif
-// DSP_SIZE should be == BIN_SIZE as BIN_SIZE is the largest one..
-#define DSP_SIZE 25
-
#define NUM_STATUS_TEXT 4
/*
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic