summaryrefslogtreecommitdiffstats
path: root/kopete/plugins/highlight/highlightconfig.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:59:34 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:59:34 -0600
commit83677e35509b4dafac63b76995652bdf3b49f209 (patch)
tree591f1dc22278addb439726c42896376b17bb42bd /kopete/plugins/highlight/highlightconfig.cpp
parent808e453c56036211f57482ed847d54aca01bba68 (diff)
downloadtdenetwork-83677e35509b4dafac63b76995652bdf3b49f209.tar.gz
tdenetwork-83677e35509b4dafac63b76995652bdf3b49f209.zip
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 808e453c56036211f57482ed847d54aca01bba68.
Diffstat (limited to 'kopete/plugins/highlight/highlightconfig.cpp')
-rw-r--r--kopete/plugins/highlight/highlightconfig.cpp74
1 files changed, 37 insertions, 37 deletions
diff --git a/kopete/plugins/highlight/highlightconfig.cpp b/kopete/plugins/highlight/highlightconfig.cpp
index 6d7e03b2..2cfab23b 100644
--- a/kopete/plugins/highlight/highlightconfig.cpp
+++ b/kopete/plugins/highlight/highlightconfig.cpp
@@ -17,7 +17,7 @@
*/
#include <tqfile.h>
-#include <stylesheet.h>
+#include <tqstylesheet.h>
#include <tqregexp.h>
#include <tqdir.h>
#include <tqdom.h>
@@ -78,11 +78,11 @@ void HighlightConfig::load()
{
m_filters.clear(); //clear filters
- TQString filename = locateLocal( "appdata", TQString::fromLatin1( "highlight.xml" ) );
+ TQString filename = locateLocal( "appdata", TQString::tqfromLatin1( "highlight.xml" ) );
if( filename.isEmpty() )
return ;
- TQDomDocument filterList( TQString::fromLatin1( "highlight-plugin" ) );
+ TQDomDocument filterList( TQString::tqfromLatin1( "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::fromLatin1("filter")
+// if( element.tagName() == TQString::tqfromLatin1("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::fromLatin1( "display-name" ) )
+ if( filterElement.tagName() == TQString::tqfromLatin1( "display-name" ) )
{
filtre->displayName = filterElement.text();
}
- else if( filterElement.tagName() == TQString::fromLatin1( "search" ) )
+ else if( filterElement.tagName() == TQString::tqfromLatin1( "search" ) )
{
filtre->search = filterElement.text();
- 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" ) );
+ 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" ) );
}
- else if( filterElement.tagName() == TQString::fromLatin1( "FG" ) )
+ else if( filterElement.tagName() == TQString::tqfromLatin1( "FG" ) )
{
filtre->FG = filterElement.text();
- filtre->setFG= ( filterElement.attribute( TQString::fromLatin1( "set" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) );
+ filtre->setFG= ( filterElement.attribute( TQString::tqfromLatin1( "set" ), TQString::tqfromLatin1( "0" ) ) == TQString::tqfromLatin1( "1" ) );
}
- else if( filterElement.tagName() == TQString::fromLatin1( "BG" ) )
+ else if( filterElement.tagName() == TQString::tqfromLatin1( "BG" ) )
{
filtre->BG = filterElement.text();
- filtre->setBG= ( filterElement.attribute( TQString::fromLatin1( "set" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) );
+ filtre->setBG= ( filterElement.attribute( TQString::tqfromLatin1( "set" ), TQString::tqfromLatin1( "0" ) ) == TQString::tqfromLatin1( "1" ) );
}
- else if( filterElement.tagName() == TQString::fromLatin1( "importance" ) )
+ else if( filterElement.tagName() == TQString::tqfromLatin1( "importance" ) )
{
filtre->importance = filterElement.text().toUInt();
- filtre->setImportance= ( filterElement.attribute( TQString::fromLatin1( "set" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) );
+ filtre->setImportance= ( filterElement.attribute( TQString::tqfromLatin1( "set" ), TQString::tqfromLatin1( "0" ) ) == TQString::tqfromLatin1( "1" ) );
}
- else if( filterElement.tagName() == TQString::fromLatin1( "sound" ) )
+ else if( filterElement.tagName() == TQString::tqfromLatin1( "sound" ) )
{
filtre->soundFN = filterElement.text();
- filtre->playSound = ( filterElement.attribute( TQString::fromLatin1( "set" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) );
+ filtre->playSound = ( filterElement.attribute( TQString::tqfromLatin1( "set" ), TQString::tqfromLatin1( "0" ) ) == TQString::tqfromLatin1( "1" ) );
}
- else if( filterElement.tagName() == TQString::fromLatin1( "raise" ) )
+ else if( filterElement.tagName() == TQString::tqfromLatin1( "raise" ) )
{
- filtre->raiseView = ( filterElement.attribute( TQString::fromLatin1( "set" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) );
+ filtre->raiseView = ( filterElement.attribute( TQString::tqfromLatin1( "set" ), TQString::tqfromLatin1( "0" ) ) == TQString::tqfromLatin1( "1" ) );
}
}
filterNode = filterNode.nextSibling();
@@ -154,7 +154,7 @@ void HighlightConfig::load()
void HighlightConfig::save()
{
- TQString fileName = locateLocal( "appdata", TQString::fromLatin1( "highlight.xml" ) );
+ TQString fileName = locateLocal( "appdata", TQString::tqfromLatin1( "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::fromLatin1(
+ TQString xml = TQString::tqfromLatin1(
"<?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::fromLatin1( " <filter>\n <display-name>" )
+ xml += TQString::tqfromLatin1( " <filter>\n <display-name>" )
+ TQStyleSheet::escape(filtre->displayName)
- + TQString::fromLatin1( "</display-name>\n" );
+ + TQString::tqfromLatin1( "</display-name>\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(" <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(" <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(" <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(" <importance set=\"") + TQString::number( static_cast<int>( filtre->setImportance ) ) +
- TQString::fromLatin1( "\">" ) + TQString::number( filtre->importance ) + TQString::fromLatin1( "</importance>\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(" <sound set=\"") + TQString::number( static_cast<int>( filtre->playSound ) ) +
- TQString::fromLatin1( "\">" ) + TQStyleSheet::escape( filtre->soundFN ) + TQString::fromLatin1( "</sound>\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(" <raise set=\"") + TQString::number( static_cast<int>( filtre->raiseView ) ) +
- TQString::fromLatin1( "\"></raise>\n" );
+ xml += TQString::tqfromLatin1(" <raise set=\"") + TQString::number( static_cast<int>( filtre->raiseView ) ) +
+ TQString::tqfromLatin1( "\"></raise>\n" );
- xml += TQString::fromLatin1( " </filter>\n" );
+ xml += TQString::tqfromLatin1( " </filter>\n" );
}
- xml += TQString::fromLatin1( "</highlight-plugin>\n" );
+ xml += TQString::tqfromLatin1( "</highlight-plugin>\n" );
*stream << xml;
}