[cmake-commits] clinton committed AddCacheEntry.cxx NONE 1.1 AddCacheEntry.h NONE 1.1 AddCacheEntry.ui NONE 1.1 CMakeLists.txt 1.5 1.6 CMakeSetup.qrc 1.3 1.4 CMakeSetupDialog.cxx 1.22 1.23 CMakeSetupDialog.h 1.16 1.17 CMakeSetupDialog.ui 1.15 1.16 Plus16.png NONE 1.1 QCMake.cxx 1.11 1.12 QCMakeCacheView.cxx 1.15 1.16 QCMakeCacheView.h 1.13 1.14

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Nov 12 23:54:51 EST 2007


Update of /cvsroot/CMake/CMake/Source/QtDialog
In directory public:/mounts/ram/cvs-serv5322

Modified Files:
	CMakeLists.txt CMakeSetup.qrc CMakeSetupDialog.cxx 
	CMakeSetupDialog.h CMakeSetupDialog.ui QCMake.cxx 
	QCMakeCacheView.cxx QCMakeCacheView.h 
Added Files:
	AddCacheEntry.cxx AddCacheEntry.h AddCacheEntry.ui Plus16.png 
Log Message:

ENH:  Add ability to add cache entries (even before first configure).



--- NEW FILE: AddCacheEntry.ui ---
<ui version="4.0" >
 <class>AddCacheEntry</class>
 <widget class="QWidget" name="AddCacheEntry" >
  <property name="geometry" >
   <rect>
    <x>0</x>
    <y>0</y>
    <width>380</width>
    <height>158</height>
   </rect>
  </property>
  <property name="windowTitle" >
   <string>Form</string>
  </property>
  <layout class="QGridLayout" >
   <property name="margin" >
    <number>0</number>
   </property>
   <item row="0" column="0" >
    <widget class="QLabel" name="label" >
     <property name="text" >
      <string>Name:</string>
     </property>
    </widget>
   </item>
   <item row="0" column="1" >
    <widget class="QLineEdit" name="Name" />
   </item>
   <item row="1" column="0" >
    <widget class="QLabel" name="label_2" >
     <property name="text" >
      <string>Type:</string>
     </property>
    </widget>
   </item>
   <item row="1" column="1" >
    <widget class="QComboBox" name="Type" >
    </widget>
   </item>
   <item row="2" column="0" >
    <widget class="QLabel" name="label_5" >
     <property name="text" >
      <string>Value:</string>
     </property>
    </widget>
   </item>
   <item row="2" column="1" >
    <widget class="QStackedWidget" name="StackedWidget" >
     <property name="currentIndex" >
      <number>0</number>
     </property>
    </widget>
   </item>
   <item row="3" column="0" >
    <widget class="QLabel" name="label_3" >
     <property name="text" >
      <string>Description:</string>
     </property>
    </widget>
   </item>
   <item row="3" column="1" >
    <widget class="QLineEdit" name="Description" />
   </item>
  </layout>
 </widget>
 <customwidgets>
  <customwidget>
   <class>QCMakeCachePathEditor</class>
   <extends>QLineEdit</extends>
   <header>QCMakeCacheView.h</header>
  </customwidget>
  <customwidget>
   <class>QCMakeCacheFilePathEditor</class>
   <extends>QLineEdit</extends>
   <header>QCMakeCacheView.h</header>
  </customwidget>
 </customwidgets>
 <resources/>
 <connections>
  <connection>
   <sender>Type</sender>
   <signal>currentIndexChanged(int)</signal>
   <receiver>StackedWidget</receiver>
   <slot>setCurrentIndex(int)</slot>
   <hints>
    <hint type="sourcelabel" >
     <x>229</x>
     <y>34</y>
    </hint>
    <hint type="destinationlabel" >
     <x>287</x>
     <y>65</y>
    </hint>
   </hints>
  </connection>
 </connections>
</ui>

Index: QCMakeCacheView.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/QCMakeCacheView.cxx,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- QCMakeCacheView.cxx	10 Nov 2007 16:36:09 -0000	1.15
+++ QCMakeCacheView.cxx	13 Nov 2007 04:54:49 -0000	1.16
@@ -40,10 +40,12 @@
   this->AdvancedFilter->setSourceModel(this->CacheModel);
   this->AdvancedFilter->setFilterRole(QCMakeCacheModel::AdvancedRole);
   this->AdvancedFilter->setFilterRegExp(AdvancedRegExp[0]);
+  this->AdvancedFilter->setDynamicSortFilter(true);
   this->SearchFilter = new QSortFilterProxyModel(this);
   this->SearchFilter->setSourceModel(this->AdvancedFilter);
   this->SearchFilter->setFilterCaseSensitivity(Qt::CaseInsensitive);
   this->SearchFilter->setFilterKeyColumn(-1); // all columns
+  this->SearchFilter->setDynamicSortFilter(true);
   this->setModel(this->SearchFilter);
 
   // our delegate for creating our editors
@@ -296,6 +298,19 @@
     this->Properties[idx.row()].Value = value.toInt() == Qt::Checked;
     emit this->dataChanged(idx, idx);
     }
+  else if(role == QCMakeCacheModel::HelpRole)
+    {
+    this->Properties[idx.row()].Help = value.toString();
+    emit this->dataChanged(idx, idx);
+    }
+  else if(role == QCMakeCacheModel::TypeRole)
+    {
+    this->Properties[idx.row()].Type = static_cast<QCMakeCacheProperty::PropertyType>(value.toInt());
+    }
+  else if(role == QCMakeCacheModel::AdvancedRole)
+    {
+    this->Properties[idx.row()].Advanced = value.toBool();
+    }
   return false;
 }
 
@@ -327,6 +342,26 @@
   return true;
 }
 
+bool QCMakeCacheModel::insertRows(int row, int num, const QModelIndex&)
+{
+  if(row < 0)
+    row = 0;
+  if(row > this->rowCount())
+    row = this->rowCount();
+
+  this->beginInsertRows(QModelIndex(), row, row+num-1);
+  for(int i=0; i<num; i++)
+    {
+    this->Properties.insert(row+i, QCMakeCacheProperty());
+    if(this->NewCount >= row)
+      {
+      this->NewCount++;
+      }
+    }
+  this->endInsertRows();
+  return true;
+}
+
 QCMakeCacheModelDelegate::QCMakeCacheModelDelegate(QObject* p)
   : QItemDelegate(p)
 {
@@ -342,18 +377,18 @@
     }
   else if(type == QCMakeCacheProperty::PATH)
     {
-    return new QCMakeCachePathEditor(false, p);
+    return new QCMakeCachePathEditor(p);
     }
   else if(type == QCMakeCacheProperty::FILEPATH)
     {
-    return new QCMakeCachePathEditor(true, p);
+    return new QCMakeCacheFilePathEditor(p);
     }
 
   return new QLineEdit(p);
 }
   
-QCMakeCachePathEditor::QCMakeCachePathEditor(bool fp, QWidget* p)
-  : QLineEdit(p), IsFilePath(fp)
+QCMakeCacheFileEditor::QCMakeCacheFileEditor(QWidget* p)
+  : QLineEdit(p)
 {
   // this *is* instead of has a line edit so QAbstractItemView
   // doesn't get confused with what the editor really is
@@ -363,18 +398,28 @@
   this->ToolButton->setCursor(QCursor(Qt::ArrowCursor));
   QObject::connect(this->ToolButton, SIGNAL(clicked(bool)),
                    this, SLOT(chooseFile()));
+}
+
+QCMakeCacheFilePathEditor::QCMakeCacheFilePathEditor(QWidget* p)
+ : QCMakeCacheFileEditor(p)
+{
   QCompleter* comp = new QCompleter(this);
   QDirModel* model = new QDirModel(comp);
-  if(!fp)
-    {
-    // only dirs
-    model->setFilter(QDir::AllDirs | QDir::Drives);
-    }
   comp->setModel(model);
   this->setCompleter(comp);
 }
 
-void QCMakeCachePathEditor::resizeEvent(QResizeEvent* e)
+QCMakeCachePathEditor::QCMakeCachePathEditor(QWidget* p)
+ : QCMakeCacheFileEditor(p)
+{
+  QCompleter* comp = new QCompleter(this);
+  QDirModel* model = new QDirModel(comp);
+  model->setFilter(QDir::AllDirs | QDir::Drives);
+  comp->setModel(model);
+  this->setCompleter(comp);
+}
+
+void QCMakeCacheFileEditor::resizeEvent(QResizeEvent* e)
 {
   // make the tool button fit on the right side
   int h = e->size().height();
@@ -383,21 +428,26 @@
   this->setContentsMargins(0, 0, h, 0);
 }
 
-void QCMakeCachePathEditor::chooseFile()
+void QCMakeCacheFilePathEditor::chooseFile()
 {
   // choose a file and set it
   QString path;
-  if(this->IsFilePath)
-    {
-    QFileInfo info(this->text());
-    path = QFileDialog::getOpenFileName(this, tr("Select File"), 
-        info.absolutePath());
-    }
-  else
+  QFileInfo info(this->text());
+  path = QFileDialog::getOpenFileName(this, tr("Select File"), 
+      info.absolutePath());
+  
+  if(!path.isEmpty())
     {
-    path = QFileDialog::getExistingDirectory(this, tr("Select Path"), 
-        this->text());
+    this->setText(path);
     }
+}
+
+void QCMakeCachePathEditor::chooseFile()
+{
+  // choose a file and set it
+  QString path;
+  path = QFileDialog::getExistingDirectory(this, tr("Select Path"), 
+      this->text());
   if(!path.isEmpty())
     {
     this->setText(path);

Index: CMakeSetupDialog.ui
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/CMakeSetupDialog.ui,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- CMakeSetupDialog.ui	12 Nov 2007 23:06:09 -0000	1.15
+++ CMakeSetupDialog.ui	13 Nov 2007 04:54:49 -0000	1.16
@@ -150,6 +150,22 @@
           </spacer>
          </item>
          <item>
+          <widget class="QToolButton" name="AddEntry" >
+           <property name="toolTip" >
+            <string>Add New Entry</string>
+           </property>
+           <property name="text" >
+            <string>Add Entry</string>
+           </property>
+           <property name="icon" >
+            <iconset resource="CMakeSetup.qrc" >:/Icons/Plus16.png</iconset>
+           </property>
+           <property name="toolButtonStyle" >
+            <enum>Qt::ToolButtonTextBesideIcon</enum>
+           </property>
+          </widget>
+         </item>
+         <item>
           <widget class="QToolButton" name="RemoveEntry" >
            <property name="toolTip" >
             <string>Remove Selected Entries</string>

Index: QCMakeCacheView.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/QCMakeCacheView.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- QCMakeCacheView.h	10 Nov 2007 16:36:09 -0000	1.13
+++ QCMakeCacheView.h	13 Nov 2007 04:54:49 -0000	1.14
@@ -68,17 +68,18 @@
   void clear();
   void setEditEnabled(bool);
   bool removeRows(int row, int count, const QModelIndex& idx = QModelIndex());
+  bool insertRows(int row, int num, const QModelIndex&);
 
 public:
   // satisfy [pure] virtuals
-  int columnCount ( const QModelIndex & parent ) const;
-  QVariant data ( const QModelIndex & index, int role = Qt::DisplayRole) const;
-  QModelIndex parent ( const QModelIndex & index ) const;
-  int rowCount ( const QModelIndex & parent ) const;
-  QVariant headerData ( int section, Qt::Orientation orient, int role ) const;
-  Qt::ItemFlags flags ( const QModelIndex& index ) const;
-  bool setData ( const QModelIndex& index, const QVariant& value, int role );
-  QModelIndex buddy ( const QModelIndex& index ) const;
+  int columnCount (const QModelIndex& parent) const;
+  QVariant data (const QModelIndex& index, int role = Qt::DisplayRole) const;
+  QModelIndex parent (const QModelIndex& index) const;
+  int rowCount (const QModelIndex& parent = QModelIndex()) const;
+  QVariant headerData (int section, Qt::Orientation orient, int role) const;
+  Qt::ItemFlags flags (const QModelIndex& index) const;
+  bool setData (const QModelIndex& index, const QVariant& value, int role);
+  QModelIndex buddy (const QModelIndex& index) const;
 
   // get the properties
   QCMakeCachePropertyList properties() const;
@@ -107,18 +108,33 @@
 };
 
 /// Editor widget for editing paths or file paths
-class QCMakeCachePathEditor : public QLineEdit
+class QCMakeCacheFileEditor : public QLineEdit
 {
   Q_OBJECT
 public:
-  QCMakeCachePathEditor(bool isFilePath, QWidget* p);
+  QCMakeCacheFileEditor(QWidget* p);
 protected slots:
-  void chooseFile();
+  virtual void chooseFile() = 0;
 protected:
   void resizeEvent(QResizeEvent* e);
-  bool IsFilePath;
   QToolButton* ToolButton;
 };
 
+class QCMakeCachePathEditor : public QCMakeCacheFileEditor
+{
+  Q_OBJECT
+public:
+  QCMakeCachePathEditor(QWidget* p = NULL);
+  void chooseFile();
+};
+
+class QCMakeCacheFilePathEditor : public QCMakeCacheFileEditor
+{
+  Q_OBJECT
+public:
+  QCMakeCacheFilePathEditor(QWidget* p = NULL);
+  void chooseFile();
+};
+
 #endif
 

--- NEW FILE: AddCacheEntry.cxx ---

#include "AddCacheEntry.h"
#include <QMetaProperty>

static const int NumTypes = 4;
static const QString TypeStrings[NumTypes] = 
  { "BOOL", "PATH", "FILEPATH", "STRING" };
static const QCMakeCacheProperty::PropertyType Types[NumTypes] = 
  { QCMakeCacheProperty::BOOL, QCMakeCacheProperty::PATH, 
    QCMakeCacheProperty::FILEPATH, QCMakeCacheProperty::STRING}; 

AddCacheEntry::AddCacheEntry(QWidget* p)
  : QWidget(p)
{
  this->setupUi(this);
  for(int i=0; i<NumTypes; i++)
    {
    this->Type->addItem(TypeStrings[i]);
    }
  QWidget* cb = new QCheckBox();
  QWidget* path = new QCMakeCachePathEditor();
  QWidget* filepath = new QCMakeCacheFilePathEditor();
  QWidget* string = new QLineEdit();
  this->StackedWidget->addWidget(cb);
  this->StackedWidget->addWidget(path);
  this->StackedWidget->addWidget(filepath);
  this->StackedWidget->addWidget(string);
  this->setTabOrder(this->Name, this->Type);
  this->setTabOrder(this->Type, cb);
  this->setTabOrder(cb, path);
  this->setTabOrder(path, filepath);
  this->setTabOrder(filepath, string);
  this->setTabOrder(string, this->Description);
}

QString AddCacheEntry::name() const
{
  return this->Name->text();
}

QVariant AddCacheEntry::value() const
{
  QWidget* w = this->StackedWidget->currentWidget();
  if(qobject_cast<QLineEdit*>(w))
    {
    return static_cast<QLineEdit*>(w)->text();
    }
  else if(qobject_cast<QCheckBox*>(w))
    {
    return static_cast<QCheckBox*>(w)->isChecked();
    }
  printf("didn't get anything %s\n", w->metaObject()->className());
  return QVariant();
}

QString AddCacheEntry::description() const
{
  return this->Description->text();
}

QCMakeCacheProperty::PropertyType AddCacheEntry::type() const
{
  int idx = this->Type->currentIndex();
  if(idx >= 0 && idx < NumTypes)
    {
    return Types[idx];
    }
  return QCMakeCacheProperty::BOOL;
}



Index: CMakeSetup.qrc
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/CMakeSetup.qrc,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CMakeSetup.qrc	10 Nov 2007 16:36:09 -0000	1.3
+++ CMakeSetup.qrc	13 Nov 2007 04:54:49 -0000	1.4
@@ -2,5 +2,6 @@
     <qresource prefix="/Icons" >
         <file>CMakeSetup.png</file>
         <file>Delete16.png</file>
+        <file>Plus16.png</file>
     </qresource>
 </RCC>

Index: CMakeSetupDialog.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/CMakeSetupDialog.cxx,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- CMakeSetupDialog.cxx	12 Nov 2007 23:06:09 -0000	1.22
+++ CMakeSetupDialog.cxx	13 Nov 2007 04:54:49 -0000	1.23
@@ -34,6 +34,7 @@
 
 #include "QCMake.h"
 #include "QCMakeCacheView.h"
+#include "AddCacheEntry.h"
 
 QCMakeThread::QCMakeThread(QObject* p) 
   : QThread(p), CMakeInstance(NULL)
@@ -82,6 +83,7 @@
   this->setCentralWidget(cont);
   this->ProgressBar->reset();
   this->RemoveEntry->setEnabled(false);
+  this->AddEntry->setEnabled(false);
 
   QMenu* FileMenu = this->menuBar()->addMenu(tr("&File"));
   this->ReloadCacheAction = FileMenu->addAction(tr("&Reload Cache"));
@@ -186,6 +188,8 @@
                    this, SLOT(selectionChanged()));
   QObject::connect(this->RemoveEntry, SIGNAL(clicked(bool)), 
                    this, SLOT(removeSelectedCacheEntries()));
+  QObject::connect(this->AddEntry, SIGNAL(clicked(bool)), 
+                   this, SLOT(addCacheEntry()));
 
   // get the saved binary directories
   QStringList buildPaths = this->loadBuildPaths();
@@ -449,8 +453,8 @@
   this->DeleteCacheAction->setEnabled(enabled);
   this->ExitAction->setEnabled(enabled);
   this->ConfigureAction->setEnabled(enabled);
+  this->AddEntry->setEnabled(enabled);
   this->RemoveEntry->setEnabled(false);  // let selection re-enable it
-  // generate button/action are handled separately
 }
 
 void CMakeSetupDialog::promptForGenerator()
@@ -735,4 +739,38 @@
     }
 }
 
+void CMakeSetupDialog::addCacheEntry()
+{
+  QDialog dialog(this);
+  dialog.resize(400, 200);
+  dialog.setWindowTitle(tr("CMakeSetup Help"));
+  QVBoxLayout* l = new QVBoxLayout(&dialog);
+  AddCacheEntry* w = new AddCacheEntry(&dialog);
+  QDialogButtonBox* btns = new QDialogButtonBox(
+      QDialogButtonBox::Ok | QDialogButtonBox::Cancel,
+      Qt::Horizontal, &dialog);
+  QObject::connect(btns, SIGNAL(accepted()), &dialog, SLOT(accept()));
+  QObject::connect(btns, SIGNAL(rejected()), &dialog, SLOT(reject()));
+  l->addWidget(w);
+  l->addStretch();
+  l->addWidget(btns);
+  if(QDialog::Accepted == dialog.exec())
+    {
+    QCMakeCacheModel* m = this->CacheValues->cacheModel();
+    m->insertRows(0, 1, QModelIndex());
+    m->setData(m->index(0, 0), w->type(), QCMakeCacheModel::TypeRole);
+    m->setData(m->index(0, 0), w->name(), Qt::DisplayRole);
+    m->setData(m->index(0, 0), w->description(), QCMakeCacheModel::HelpRole);
+    m->setData(m->index(0, 0), 0, QCMakeCacheModel::AdvancedRole);
+    if(w->type() == QCMakeCacheProperty::BOOL)
+      {
+      m->setData(m->index(0, 1), w->value().toBool() ? 
+          Qt::Checked : Qt::Unchecked, Qt::CheckStateRole);
+      }
+    else
+      {
+      m->setData(m->index(0, 1), w->value(), Qt::DisplayRole);
+      }
+    }
+}
 

Index: CMakeSetupDialog.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/CMakeSetupDialog.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- CMakeSetupDialog.h	12 Nov 2007 22:41:15 -0000	1.16
+++ CMakeSetupDialog.h	13 Nov 2007 04:54:49 -0000	1.17
@@ -69,6 +69,7 @@
   void setCacheModified();
   void removeSelectedCacheEntries();
   void selectionChanged();
+  void addCacheEntry();
 
 protected:
 

--- NEW FILE: Plus16.png ---
(This appears to be a binary file; contents omitted.)

Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/CMakeLists.txt,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- CMakeLists.txt	12 Nov 2007 18:54:29 -0000	1.5
+++ CMakeLists.txt	13 Nov 2007 04:54:49 -0000	1.6
@@ -9,6 +9,8 @@
   INCLUDE(${QT_USE_FILE})
 
   SET(SRCS
+    AddCacheEntry.cxx
+    AddCacheEntry.h
     CMakeSetup.cxx
     CMakeSetupDialog.cxx
     CMakeSetupDialog.h
@@ -19,8 +21,10 @@
     )
   QT4_WRAP_UI(UI_SRCS 
     CMakeSetupDialog.ui
+    AddCacheEntry.ui
     )
   QT4_WRAP_CPP(MOC_SRCS 
+    AddCacheEntry.h
     CMakeSetupDialog.h
     QCMake.h
     QCMakeCacheView.h

--- NEW FILE: AddCacheEntry.h ---

#ifndef AddCacheEntry_h
#define AddCacheEntry_h

#include <QWidget>
#include <QCheckBox>

#include "QCMake.h"
#include "ui_AddCacheEntry.h"

class AddCacheEntry : public QWidget, public Ui::AddCacheEntry
{
  Q_OBJECT
public:
  AddCacheEntry(QWidget* p);

  QString name() const;
  QVariant value() const;
  QString description() const;
  QCMakeCacheProperty::PropertyType type() const;
};

#endif


Index: QCMake.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/QCMake.cxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- QCMake.cxx	9 Nov 2007 20:18:49 -0000	1.11
+++ QCMake.cxx	13 Nov 2007 04:54:49 -0000	1.12
@@ -148,9 +148,13 @@
   emit this->generateDone(err);
 }
   
-void QCMake::setProperties(const QCMakeCachePropertyList& props)
+void QCMake::setProperties(const QCMakeCachePropertyList& newProps)
 {
+  QCMakeCachePropertyList props = newProps;
+
   QStringList toremove;
+
+  // set the value of properties
   cmCacheManager *cachem = this->CMakeInstance->GetCacheManager();
   for(cmCacheManager::CacheIterator i = cachem->NewIterator();
       !i.IsAtEnd(); i.Next())
@@ -180,15 +184,50 @@
         {
         i.SetValue(prop.Value.toString().toAscii().data());
         }
+      props.removeAt(idx);
       }
 
     }
 
+  // remove some properites
   foreach(QString s, toremove)
     {
     cachem->RemoveCacheEntry(s.toAscii().data());
     }
   
+  // add some new properites
+  foreach(QCMakeCacheProperty s, props)
+    {
+    if(s.Type == QCMakeCacheProperty::BOOL)
+      {
+      this->CMakeInstance->AddCacheEntry(s.Key.toAscii().data(),
+                            s.Value.toBool() ? "ON" : "OFF",
+                            s.Help.toAscii().data(),
+                            cmCacheManager::BOOL);
+      }
+    else if(s.Type == QCMakeCacheProperty::STRING)
+      {
+      this->CMakeInstance->AddCacheEntry(s.Key.toAscii().data(),
+                            s.Value.toString().toAscii().data(),
+                            s.Help.toAscii().data(),
+                            cmCacheManager::STRING);
+      }
+    else if(s.Type == QCMakeCacheProperty::PATH)
+      {
+      this->CMakeInstance->AddCacheEntry(s.Key.toAscii().data(),
+                            s.Value.toString().toAscii().data(),
+                            s.Help.toAscii().data(),
+                            cmCacheManager::PATH);
+      }
+    else if(s.Type == QCMakeCacheProperty::FILEPATH)
+      {
+      this->CMakeInstance->AddCacheEntry(s.Key.toAscii().data(),
+                            s.Value.toString().toAscii().data(),
+                            s.Help.toAscii().data(),
+                            cmCacheManager::FILEPATH);
+      }
+    }
+  
   cachem->SaveCache(this->BinaryDirectory.toAscii().data());
 }
 



More information about the Cmake-commits mailing list