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
-