From 6be4155a982dd946dfe76b9b612d05f509ffd6d1 Mon Sep 17 00:00:00 2001 From: Fabio D'Urso Date: Fri, 28 Dec 2012 00:25:47 +0100 Subject: [PATCH] Moved AnnotationTools config option under the Reviews group --- conf/okular.kcfg | 60 ++++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/conf/okular.kcfg b/conf/okular.kcfg index ac82028c7..788183aa1 100644 --- a/conf/okular.kcfg +++ b/conf/okular.kcfg @@ -33,6 +33,36 @@ false + + + QStringList annotationTools; + // load the default tool list from the 'xml tools definition' file + QFile infoFile( KStandardDirs::locate("data", "okular/tools.xml") ); + if ( infoFile.exists() && infoFile.open( QIODevice::ReadOnly ) ) + { + QDomDocument doc; + if ( doc.setContent( &infoFile ) ) + { + QDomElement toolsDefinition = doc.elementsByTagName("annotatingTools").item( 0 ).toElement(); + // create the annotationTools list from the XML dom tree + QDomNode toolDescription = toolsDefinition.firstChild(); + while ( toolDescription.isElement() ) + { + QDomElement toolElement = toolDescription.toElement(); + if ( toolElement.tagName() == "tool" ) + { + QDomDocument temp; + temp.appendChild( temp.importNode( toolElement, true) ); + // add each <tool>...</tool> as XML string + annotationTools << temp.toString(-1); + } + toolDescription = toolDescription.nextSibling(); + } + } + } + + annotationTools + @@ -237,35 +267,5 @@ userString - - - QStringList annotationTools; - // load the default tool list from the 'xml tools definition' file - QFile infoFile( KStandardDirs::locate("data", "okular/tools.xml") ); - if ( infoFile.exists() && infoFile.open( QIODevice::ReadOnly ) ) - { - QDomDocument doc; - if ( doc.setContent( &infoFile ) ) - { - QDomElement toolsDefinition = doc.elementsByTagName("annotatingTools").item( 0 ).toElement(); - // create the annotationTools list from the XML dom tree - QDomNode toolDescription = toolsDefinition.firstChild(); - while ( toolDescription.isElement() ) - { - QDomElement toolElement = toolDescription.toElement(); - if ( toolElement.tagName() == "tool" ) - { - QDomDocument temp; - temp.appendChild( temp.importNode( toolElement, true) ); - // add each <tool>...</tool> as XML string - annotationTools << temp.toString(-1); - } - toolDescription = toolDescription.nextSibling(); - } - } - } - - annotationTools -