QTfrontend/util/DataManager.cpp
changeset 8508 f849b7b3af1d
parent 8377 869f80966a77
child 8918 512753ea4b1b
equal deleted inserted replaced
8507:f4475782cf45 8508:f849b7b3af1d
   174     for(int i = colorsModel()->rowCount() - 1; i >= 0; --i)
   174     for(int i = colorsModel()->rowCount() - 1; i >= 0; --i)
   175     {
   175     {
   176         m_colorsModel->item(i)->setData(QColor(colors[i]));
   176         m_colorsModel->item(i)->setData(QColor(colors[i]));
   177     }
   177     }
   178 }
   178 }
       
   179 
       
   180 bool DataManager::ensureFileExists(const QString &fileName)
       
   181 {
       
   182     QFile tmpfile(fileName);
       
   183     if (!tmpfile.exists())
       
   184         return tmpfile.open(QFile::WriteOnly);
       
   185     else
       
   186         return true;
       
   187 }