Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 12103 → Rev 12104

/trunk/Scribus/scribus/prefsfile.cpp
47,6 → 47,11
load();
}
 
bool PrefsFile::hasContext(const QString& contextName)
{
return contexts.contains(contextName);
}
 
PrefsContext* PrefsFile::getContext(const QString& contextName, bool persistent)
{
if (!contexts.contains(contextName))
70,16 → 75,12
 
void PrefsFile::load()
{
PrefsReader* handler = new PrefsReader(&contexts, &pluginContexts);
QFile* rc = new QFile(prefsFilePath);
QXmlInputSource* source = new QXmlInputSource(rc);
QXmlSimpleReader* reader = new QXmlSimpleReader();
reader->setContentHandler(handler);
reader->parse(source);
delete reader;
delete source;
delete rc;
delete handler;
PrefsReader handler(&contexts, &pluginContexts);
QFile rc(prefsFilePath);
QXmlInputSource source(&rc);
QXmlSimpleReader reader;
reader.setContentHandler(&handler);
reader.parse(source);
}
 
void PrefsFile::write()