Browse Source

Changed several Q3ValueVectors to QVector, and possibly a Q3ValueList somewhere.

git-svn-id: file:///var/svn/tigccpp/trunk@1071 9552661e-59e3-4036-b4f2-dbe53926924f
konrad_m 17 years ago
parent
commit
bfb4aaad63
6 changed files with 15 additions and 12 deletions
  1. 1 1
      ktigcc/ktigcc.h
  2. 3 2
      ktigcc/parsing.h
  3. 4 4
      ktigcc/preferences.cpp
  4. 2 1
      ktigcc/preferences.h
  5. 3 3
      ktigcc/preferencesdlg.cpp
  6. 2 1
      ktigcc/tpr.h

+ 1 - 1
ktigcc/ktigcc.h

@@ -64,7 +64,7 @@ struct Tool {
   QString workingDirectory;
   bool runInTerminal;
 };
-typedef Q3ValueVector<Tool> Tools;
+typedef QVector<Tool> Tools;
 extern Tools tools, tempTools;
 extern int toolIndex;
 extern bool disableViewEvents;

+ 3 - 2
ktigcc/parsing.h

@@ -1,7 +1,8 @@
 /*
    ktigcc - TIGCC IDE for KDE
 
-   Copyright (C) 2006 Kevin Kofler
+   Copyright (C) 2006-2007 Kevin Kofler
+   Copyright (C) 2007 Konrad Meyer
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -39,7 +40,7 @@ struct SourceFileFunction {
   int prototypeLine;
   int implementationLine;
 };
-class SourceFileFunctions : public Q3ValueVector<SourceFileFunction> {
+class SourceFileFunctions : public QVector<SourceFileFunction> {
   public:
     iterator find(const SourceFileFunction &item) {
       return qFind(begin(),end(),item);

+ 4 - 4
ktigcc/preferences.cpp

@@ -1827,10 +1827,10 @@ void savePreferences(void)
 
   // Coding
   unsigned i=0;
-  for (QLinkedList<QPair<QString,QString> >::ConstIterator it=preferences.templates.begin();
-       it!=preferences.templates.end(); ++it, i++) {
-    pconfig->writeEntry(QString("Coding Template %1 Name").arg(i),(*it).first);
-    pconfig->writeEntry(QString("Coding Template %1 Text").arg(i),(*it).second);
+  typedef const QPair<QString,QString> &StringPairConstRef;
+  foreach (StringPairConstRef pair, preferences.templates) {
+    pconfig->writeEntry(QString("Coding Template %1 Name").arg(i),pair.first);
+    pconfig->writeEntry(QString("Coding Template %1 Text").arg(i++),pair.second);
   }
   pconfig->writeEntry("Num Coding Templates",i);
 

+ 2 - 1
ktigcc/preferences.h

@@ -3,6 +3,7 @@
 
    Copyright (C) 2004-2007 Kevin Kofler
    Copyright (C) 2006 Joey Adams
+   Copyright (C) 2007 Konrad Meyer
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -116,7 +117,7 @@ typedef struct
   Syn_SettingsForDoc synQll;
 
   // Coding
-  Q3ValueList<QPair<QString,QString> > templates;
+  QList<QPair<QString,QString> > templates;
 
   // Used internally by the Preferences dialog
   bool haveA68k;

+ 3 - 3
ktigcc/preferencesdlg.cpp

@@ -209,9 +209,9 @@ void Preferences::init()
 
   // Coding
   templateListBox->clear();
-  for (QLinkedList<QPair<QString,QString> >::ConstIterator it=preferences.templates.begin();
-       it!=preferences.templates.end(); ++it)
-    new ListBoxTextPair(templateListBox,(*it).first,(*it).second);
+  typedef const QPair<QString,QString> &StringPairConstRef;
+  foreach (StringPairConstRef pair, preferences.templates)
+    new ListBoxTextPair(templateListBox,pair.first,pair.second);
   templateListBox->sort();
 }
 

+ 2 - 1
ktigcc/tpr.h

@@ -5,6 +5,7 @@
    Copyright (C) 2002 Romain Liévin
    Copyright (C) 2002-2006 Kevin Kofler
    Copyright (C) 2006 Joey Adams
+   Copyright (C) 2007 Konrad Meyer
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -160,7 +161,7 @@ typedef struct
 
 enum {PATH_ERROR,PATH_NOTFOUND,PATH_FILE,PATH_FOLDER}; //return types for getPathType
 
-typedef Q3ValueVector<QPair<unsigned,unsigned> > LineStartList;
+typedef QVector<QPair<unsigned,unsigned> > LineStartList;
 
 const char *smartAscii(const QString &s);