~ubuntu-branches/ubuntu/wily/knutclient/wily

« back to all changes in this revision

Viewing changes to src/knutupsdata.cpp

  • Committer: Package Import Robot
  • Author(s): Dmitry Smirnov
  • Date: 2013-12-15 01:56:29 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20131215015629-kbtxdi17e1gmxb5e
Tags: 1.0.5-1
Re-packaged and re-introduced to Debian (Closes: #695840).

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
                             -------------------
4
4
    begin                : Tue Aug 21 2001
5
5
    copyright            : (C) 2001 by Daniel Prynych
6
 
    email                : Daniel.Prynych@alo.cz
 
6
    email                : Daniel@prynych.cz
7
7
 ***************************************************************************/
8
8
 
9
9
/***************************************************************************
16
16
 ***************************************************************************/
17
17
 
18
18
#include "knutupsdata.h"
19
 
#include "knutvardata.h"
20
19
 
21
 
#include <qstring.h>
 
20
#include <QtCore/QString>
22
21
 
23
22
 
24
23
KNutUpsData::KNutUpsData()  {
55
54
 
56
55
void KNutUpsData::deleteName (const int index) {
57
56
  if ((index > -1 ) && (index < m_countUpsRecords)) {
58
 
  QValueList<upsRecordDef>::Iterator it = m_listRecords.begin();
 
57
  QList<upsRecordDef>::Iterator it = m_listRecords.begin();
59
58
  for (int i =0; i < index; i++) it++;
60
 
  m_listRecords.remove(it);
 
59
  m_listRecords.erase(it);
61
60
  m_countUpsRecords--;
62
61
  }
63
62
}
67
66
 
68
67
 
69
68
KNutUpsData::upsRecordDef* KNutUpsData::findName (const QString name) {
70
 
  QValueList<upsRecordDef>::Iterator it;
 
69
  QList<upsRecordDef>::Iterator it;
71
70
  for (it = m_listRecords.begin(); it != m_listRecords.end(); it++) {
72
71
    if ((*it).name == name) {
73
72
      return &(*it); // vratime adresu