QTfrontend/util/DataManager.cpp
branchwebgl
changeset 8833 c13ebed437cb
parent 8508 f849b7b3af1d
child 8918 512753ea4b1b
equal deleted inserted replaced
8450:404ddce27b23 8833:c13ebed437cb
   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 }