817,23 → 817,31 |
{ |
QDomDocument docu("fontcacherc"); |
QString st="<CachedFonts></CachedFonts>"; |
|
docu.setContent(st); |
QDomElement elem = docu.documentElement(); |
QMap<QString, testCache>::Iterator it; |
for (it = checkedFonts.begin(); it != checkedFonts.end(); ++it) |
{ |
if (it.value().isChecked) |
{ |
QDomElement fosu = docu.createElement("Font"); |
fosu.setAttribute("File",it.key()); |
fosu.setAttribute("Status",static_cast<int>(it.value().isOK)); |
fosu.setAttribute("Modified",it.value().lastMod.toString(Qt::ISODate)); |
elem.appendChild(fosu); |
} |
const testCache& checkedFont = it.value(); |
|
bool saveItem = checkedFont.isChecked; |
if (!checkedFont.isChecked) // Font might be located in another local Scribus font folder |
saveItem = QFile::exists(it.key()); |
if (!saveItem) |
continue; |
|
QDomElement fosu = docu.createElement("Font"); |
fosu.setAttribute("File",it.key()); |
fosu.setAttribute("Status", static_cast<int>(it.value().isOK)); |
fosu.setAttribute("Modified", it.value().lastMod.toString(Qt::ISODate)); |
elem.appendChild(fosu); |
} |
|
ScCore->setSplashStatus( QObject::tr("Writing updated Font Cache") ); |
|
QFile f(pf + "/checkfonts.xml"); |
if(f.open(QIODevice::WriteOnly)) |
if (f.open(QIODevice::WriteOnly)) |
{ |
QTextStream s(&f); |
s.setCodec("UTF-8"); |