summaryrefslogtreecommitdiffstats
path: root/kopete/plugins/highlight/highlightconfig.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/plugins/highlight/highlightconfig.cpp')
-rw-r--r--kopete/plugins/highlight/highlightconfig.cpp72
1 files changed, 36 insertions, 36 deletions
diff --git a/kopete/plugins/highlight/highlightconfig.cpp b/kopete/plugins/highlight/highlightconfig.cpp
index 2cfab23b..d6e04d7f 100644
--- a/kopete/plugins/highlight/highlightconfig.cpp
+++ b/kopete/plugins/highlight/highlightconfig.cpp
@@ -78,11 +78,11 @@ void HighlightConfig::load()
{
m_filters.clear(); //clear filters
- TQString filename = locateLocal( "appdata", TQString::tqfromLatin1( "highlight.xml" ) );
+ TQString filename = locateLocal( "appdata", TQString::fromLatin1( "highlight.xml" ) );
if( filename.isEmpty() )
return ;
- TQDomDocument filterList( TQString::tqfromLatin1( "highlight-plugin" ) );
+ TQDomDocument filterList( TQString::fromLatin1( "highlight-plugin" ) );
TQFile filterListFile( filename );
filterListFile.open( IO_ReadOnly );
@@ -96,7 +96,7 @@ void HighlightConfig::load()
TQDomElement element = node.toElement();
if( !element.isNull() )
{
-// if( element.tagName() == TQString::tqfromLatin1("filter")
+// if( element.tagName() == TQString::fromLatin1("filter")
// {
Filter *filtre=newFilter();
TQDomNode filterNode = node.firstChild();
@@ -106,40 +106,40 @@ void HighlightConfig::load()
TQDomElement filterElement = filterNode.toElement();
if( !filterElement.isNull() )
{
- if( filterElement.tagName() == TQString::tqfromLatin1( "display-name" ) )
+ if( filterElement.tagName() == TQString::fromLatin1( "display-name" ) )
{
filtre->displayName = filterElement.text();
}
- else if( filterElement.tagName() == TQString::tqfromLatin1( "search" ) )
+ else if( filterElement.tagName() == TQString::fromLatin1( "search" ) )
{
filtre->search = filterElement.text();
- filtre->caseSensitive= ( filterElement.attribute( TQString::tqfromLatin1( "caseSensitive" ), TQString::tqfromLatin1( "1" ) ) == TQString::tqfromLatin1( "1" ) );
- filtre->isRegExp= ( filterElement.attribute( TQString::tqfromLatin1( "regExp" ), TQString::tqfromLatin1( "0" ) ) == TQString::tqfromLatin1( "1" ) );
+ filtre->caseSensitive= ( filterElement.attribute( TQString::fromLatin1( "caseSensitive" ), TQString::fromLatin1( "1" ) ) == TQString::fromLatin1( "1" ) );
+ filtre->isRegExp= ( filterElement.attribute( TQString::fromLatin1( "regExp" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) );
}
- else if( filterElement.tagName() == TQString::tqfromLatin1( "FG" ) )
+ else if( filterElement.tagName() == TQString::fromLatin1( "FG" ) )
{
filtre->FG = filterElement.text();
- filtre->setFG= ( filterElement.attribute( TQString::tqfromLatin1( "set" ), TQString::tqfromLatin1( "0" ) ) == TQString::tqfromLatin1( "1" ) );
+ filtre->setFG= ( filterElement.attribute( TQString::fromLatin1( "set" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) );
}
- else if( filterElement.tagName() == TQString::tqfromLatin1( "BG" ) )
+ else if( filterElement.tagName() == TQString::fromLatin1( "BG" ) )
{
filtre->BG = filterElement.text();
- filtre->setBG= ( filterElement.attribute( TQString::tqfromLatin1( "set" ), TQString::tqfromLatin1( "0" ) ) == TQString::tqfromLatin1( "1" ) );
+ filtre->setBG= ( filterElement.attribute( TQString::fromLatin1( "set" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) );
}
- else if( filterElement.tagName() == TQString::tqfromLatin1( "importance" ) )
+ else if( filterElement.tagName() == TQString::fromLatin1( "importance" ) )
{
filtre->importance = filterElement.text().toUInt();
- filtre->setImportance= ( filterElement.attribute( TQString::tqfromLatin1( "set" ), TQString::tqfromLatin1( "0" ) ) == TQString::tqfromLatin1( "1" ) );
+ filtre->setImportance= ( filterElement.attribute( TQString::fromLatin1( "set" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) );
}
- else if( filterElement.tagName() == TQString::tqfromLatin1( "sound" ) )
+ else if( filterElement.tagName() == TQString::fromLatin1( "sound" ) )
{
filtre->soundFN = filterElement.text();
- filtre->playSound = ( filterElement.attribute( TQString::tqfromLatin1( "set" ), TQString::tqfromLatin1( "0" ) ) == TQString::tqfromLatin1( "1" ) );
+ filtre->playSound = ( filterElement.attribute( TQString::fromLatin1( "set" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) );
}
- else if( filterElement.tagName() == TQString::tqfromLatin1( "raise" ) )
+ else if( filterElement.tagName() == TQString::fromLatin1( "raise" ) )
{
- filtre->raiseView = ( filterElement.attribute( TQString::tqfromLatin1( "set" ), TQString::tqfromLatin1( "0" ) ) == TQString::tqfromLatin1( "1" ) );
+ filtre->raiseView = ( filterElement.attribute( TQString::fromLatin1( "set" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) );
}
}
filterNode = filterNode.nextSibling();
@@ -154,7 +154,7 @@ void HighlightConfig::load()
void HighlightConfig::save()
{
- TQString fileName = locateLocal( "appdata", TQString::tqfromLatin1( "highlight.xml" ) );
+ TQString fileName = locateLocal( "appdata", TQString::fromLatin1( "highlight.xml" ) );
KSaveFile file( fileName );
if( file.status() == 0 )
@@ -162,7 +162,7 @@ void HighlightConfig::save()
TQTextStream *stream = file.textStream();
stream->setEncoding( TQTextStream::UnicodeUTF8 );
- TQString xml = TQString::tqfromLatin1(
+ TQString xml = TQString::fromLatin1(
"<?xml version=\"1.0\"?>\n"
"<!DOCTYPE kopete-highlight-plugin>\n"
"<highlight-plugin>\n" );
@@ -172,32 +172,32 @@ void HighlightConfig::save()
for( ; filtreIt.current(); ++filtreIt )
{
Filter *filtre = *filtreIt;
- xml += TQString::tqfromLatin1( " <filter>\n <display-name>" )
+ xml += TQString::fromLatin1( " <filter>\n <display-name>" )
+ TQStyleSheet::escape(filtre->displayName)
- + TQString::tqfromLatin1( "</display-name>\n" );
+ + TQString::fromLatin1( "</display-name>\n" );
- xml += TQString::tqfromLatin1(" <search caseSensitive=\"") + TQString::number( static_cast<int>( filtre->caseSensitive ) ) +
- TQString::tqfromLatin1("\" regExp=\"") + TQString::number( static_cast<int>( filtre->isRegExp ) ) +
- TQString::tqfromLatin1( "\">" ) + TQStyleSheet::escape( filtre->search ) + TQString::tqfromLatin1( "</search>\n" );
+ xml += TQString::fromLatin1(" <search caseSensitive=\"") + TQString::number( static_cast<int>( filtre->caseSensitive ) ) +
+ TQString::fromLatin1("\" regExp=\"") + TQString::number( static_cast<int>( filtre->isRegExp ) ) +
+ TQString::fromLatin1( "\">" ) + TQStyleSheet::escape( filtre->search ) + TQString::fromLatin1( "</search>\n" );
- xml += TQString::tqfromLatin1(" <BG set=\"") + TQString::number( static_cast<int>( filtre->setBG ) ) +
- TQString::tqfromLatin1( "\">" ) + TQStyleSheet::escape( filtre->BG.name() ) + TQString::tqfromLatin1( "</BG>\n" );
- xml += TQString::tqfromLatin1(" <FG set=\"") + TQString::number( static_cast<int>( filtre->setFG ) ) +
- TQString::tqfromLatin1( "\">" ) + TQStyleSheet::escape( filtre->FG.name() ) + TQString::tqfromLatin1( "</FG>\n" );
+ xml += TQString::fromLatin1(" <BG set=\"") + TQString::number( static_cast<int>( filtre->setBG ) ) +
+ TQString::fromLatin1( "\">" ) + TQStyleSheet::escape( filtre->BG.name() ) + TQString::fromLatin1( "</BG>\n" );
+ xml += TQString::fromLatin1(" <FG set=\"") + TQString::number( static_cast<int>( filtre->setFG ) ) +
+ TQString::fromLatin1( "\">" ) + TQStyleSheet::escape( filtre->FG.name() ) + TQString::fromLatin1( "</FG>\n" );
- xml += TQString::tqfromLatin1(" <importance set=\"") + TQString::number( static_cast<int>( filtre->setImportance ) ) +
- TQString::tqfromLatin1( "\">" ) + TQString::number( filtre->importance ) + TQString::tqfromLatin1( "</importance>\n" );
+ xml += TQString::fromLatin1(" <importance set=\"") + TQString::number( static_cast<int>( filtre->setImportance ) ) +
+ TQString::fromLatin1( "\">" ) + TQString::number( filtre->importance ) + TQString::fromLatin1( "</importance>\n" );
- xml += TQString::tqfromLatin1(" <sound set=\"") + TQString::number( static_cast<int>( filtre->playSound ) ) +
- TQString::tqfromLatin1( "\">" ) + TQStyleSheet::escape( filtre->soundFN ) + TQString::tqfromLatin1( "</sound>\n" );
+ xml += TQString::fromLatin1(" <sound set=\"") + TQString::number( static_cast<int>( filtre->playSound ) ) +
+ TQString::fromLatin1( "\">" ) + TQStyleSheet::escape( filtre->soundFN ) + TQString::fromLatin1( "</sound>\n" );
- xml += TQString::tqfromLatin1(" <raise set=\"") + TQString::number( static_cast<int>( filtre->raiseView ) ) +
- TQString::tqfromLatin1( "\"></raise>\n" );
+ xml += TQString::fromLatin1(" <raise set=\"") + TQString::number( static_cast<int>( filtre->raiseView ) ) +
+ TQString::fromLatin1( "\"></raise>\n" );
- xml += TQString::tqfromLatin1( " </filter>\n" );
+ xml += TQString::fromLatin1( " </filter>\n" );
}
- xml += TQString::tqfromLatin1( "</highlight-plugin>\n" );
+ xml += TQString::fromLatin1( "</highlight-plugin>\n" );
*stream << xml;
}