[Kst] extragear/graphics/kst/kst
George Staikos
staikos at kde.org
Thu Oct 27 21:13:06 CEST 2005
SVN commit 474963 by staikos:
use an array instead
M +7 -3 ktimezonecombo.cpp
--- trunk/extragear/graphics/kst/kst/ktimezonecombo.cpp #474962:474963
@@ -20,12 +20,14 @@
#include "ktimezonecombo.h"
+#include <qmemarray.h>
+
#include <klocale.h>
#include <ktimezones.h>
class KTimezoneCombo::Private {
public:
- QValueList<int> _offsets;
+ QMemArray<int> _offsets;
};
@@ -38,10 +40,12 @@
insertItem("UTC");
const KTimezones::ZoneMap zones = db->allZones();
- d->_offsets.append(0);
+ d->_offsets.resize(zones.count());
+ d->_offsets[0] = 0;
+ int i = 0;
for (KTimezones::ZoneMap::ConstIterator it = zones.begin(); it != zones.end(); ++it) {
int offset = (*it)->offset();
- d->_offsets.append(offset);
+ d->_offsets[++i] = offset;
int hours = offset / 3600;
int minutes = 100 * offset / 3600 % 100;
bool negative = false;
More information about the Kst
mailing list