summaryrefslogtreecommitdiffstats
path: root/kcontrol/ebrowsing/plugins/ikws
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
commitc663b6440964f6ac48027143ac9e63298991f9d0 (patch)
tree6d8b0c5a5f9db1ee16acf98b1397cea9126b281d /kcontrol/ebrowsing/plugins/ikws
parenta061f7191beebb0e4a3b0c0a7c534ec5f22f2dc7 (diff)
downloadtdebase-c663b6440964f6ac48027143ac9e63298991f9d0.tar.gz
tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kcontrol/ebrowsing/plugins/ikws')
-rw-r--r--kcontrol/ebrowsing/plugins/ikws/ikwsopts.cpp114
-rw-r--r--kcontrol/ebrowsing/plugins/ikws/ikwsopts.h14
-rw-r--r--kcontrol/ebrowsing/plugins/ikws/kuriikwsfilter.cpp4
-rw-r--r--kcontrol/ebrowsing/plugins/ikws/kuriikwsfilter.h4
-rw-r--r--kcontrol/ebrowsing/plugins/ikws/kuriikwsfiltereng.cpp134
-rw-r--r--kcontrol/ebrowsing/plugins/ikws/kuriikwsfiltereng.h28
-rw-r--r--kcontrol/ebrowsing/plugins/ikws/kurisearchfilter.cpp10
-rw-r--r--kcontrol/ebrowsing/plugins/ikws/kurisearchfilter.h8
-rw-r--r--kcontrol/ebrowsing/plugins/ikws/searchprovider.cpp16
-rw-r--r--kcontrol/ebrowsing/plugins/ikws/searchprovider.h32
-rw-r--r--kcontrol/ebrowsing/plugins/ikws/searchproviderdlg.cpp26
-rw-r--r--kcontrol/ebrowsing/plugins/ikws/searchproviderdlg.h2
12 files changed, 196 insertions, 196 deletions
diff --git a/kcontrol/ebrowsing/plugins/ikws/ikwsopts.cpp b/kcontrol/ebrowsing/plugins/ikws/ikwsopts.cpp
index ca79f0b36..6d89c3219 100644
--- a/kcontrol/ebrowsing/plugins/ikws/ikwsopts.cpp
+++ b/kcontrol/ebrowsing/plugins/ikws/ikwsopts.cpp
@@ -17,15 +17,15 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qcheckbox.h>
-#include <qfile.h>
-#include <qgroupbox.h>
-#include <qheader.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qvbox.h>
-#include <qwhatsthis.h>
+#include <tqcheckbox.h>
+#include <tqfile.h>
+#include <tqgroupbox.h>
+#include <tqheader.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqvbox.h>
+#include <tqwhatsthis.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -52,8 +52,8 @@
class SearchProviderItem : public QCheckListItem
{
public:
- SearchProviderItem(QListView *parent, SearchProvider *provider)
- :QCheckListItem(parent, provider->name(), CheckBox), m_provider(provider)
+ SearchProviderItem(TQListView *parent, SearchProvider *provider)
+ :TQCheckListItem(parent, provider->name(), CheckBox), m_provider(provider)
{
update();
}
@@ -75,10 +75,10 @@ private:
SearchProvider *m_provider;
};
-FilterOptions::FilterOptions(KInstance *instance, QWidget *parent, const char *name)
+FilterOptions::FilterOptions(KInstance *instance, TQWidget *parent, const char *name)
:KCModule(instance, parent, name)
{
- QVBoxLayout *mainLayout = new QVBoxLayout( this, KDialog::marginHint(),
+ TQVBoxLayout *mainLayout = new TQVBoxLayout( this, KDialog::marginHint(),
KDialog::spacingHint());
m_dlg = new FilterOptionsUI (this);
@@ -91,7 +91,7 @@ FilterOptions::FilterOptions(KInstance *instance, QWidget *parent, const char *n
load();
}
-QString FilterOptions::quickHelp() const
+TQString FilterOptions::quickHelp() const
{
return i18n("In this module you can configure the web shortcuts feature. "
"Web shortcuts allow you to quickly search or lookup words on "
@@ -120,7 +120,7 @@ void FilterOptions::load( bool useDefaults )
config.setGroup("General");
- QString defaultSearchEngine = config.readEntry("DefaultSearchEngine");
+ TQString defaultSearchEngine = config.readEntry("DefaultSearchEngine");
m_favoriteEngines.clear();
m_favoriteEngines << "google" << "google_groups" << "google_news" << "webster" << "dmoz" << "wikipedia";
@@ -147,35 +147,35 @@ void FilterOptions::load( bool useDefaults )
m_dlg->lvSearchProviders->setSelected(m_dlg->lvSearchProviders->firstChild(), true);
// Connect all the signals/slots...
- connect(m_dlg->cbEnableShortcuts, SIGNAL(clicked()), this,
- SLOT(setWebShortcutState()));
- connect(m_dlg->cbEnableShortcuts, SIGNAL(clicked()), this,
- SLOT(configChanged()));
-
- connect(m_dlg->lvSearchProviders, SIGNAL(selectionChanged(QListViewItem *)),
- this, SLOT(updateSearchProvider()));
- connect(m_dlg->lvSearchProviders, SIGNAL(doubleClicked(QListViewItem *)),
- this, SLOT(changeSearchProvider()));
- connect(m_dlg->lvSearchProviders, SIGNAL(returnPressed(QListViewItem *)),
- this, SLOT(changeSearchProvider()));
- connect(m_dlg->lvSearchProviders, SIGNAL(executed(QListViewItem *)),
- this, SLOT(checkFavoritesChanged()));
- connect(m_dlg->lvSearchProviders, SIGNAL(spacePressed(QListViewItem *)),
- this, SLOT(checkFavoritesChanged()));
- connect(m_dlg->lvSearchProviders, SIGNAL(pressed(QListViewItem *)),
- this, SLOT(checkFavoritesChanged()));
- connect(m_dlg->lvSearchProviders, SIGNAL(clicked(QListViewItem *)),
- this, SLOT(checkFavoritesChanged()));
-
-
- connect(m_dlg->cmbDefaultEngine, SIGNAL(activated(const QString &)), this,
- SLOT(configChanged()));
- connect(m_dlg->cmbDelimiter, SIGNAL(activated(const QString &)), this,
- SLOT(configChanged()));
-
- connect(m_dlg->pbNew, SIGNAL(clicked()), this, SLOT(addSearchProvider()));
- connect(m_dlg->pbChange, SIGNAL(clicked()), this, SLOT(changeSearchProvider()));
- connect(m_dlg->pbDelete, SIGNAL(clicked()), this, SLOT(deleteSearchProvider()));
+ connect(m_dlg->cbEnableShortcuts, TQT_SIGNAL(clicked()), this,
+ TQT_SLOT(setWebShortcutState()));
+ connect(m_dlg->cbEnableShortcuts, TQT_SIGNAL(clicked()), this,
+ TQT_SLOT(configChanged()));
+
+ connect(m_dlg->lvSearchProviders, TQT_SIGNAL(selectionChanged(TQListViewItem *)),
+ this, TQT_SLOT(updateSearchProvider()));
+ connect(m_dlg->lvSearchProviders, TQT_SIGNAL(doubleClicked(TQListViewItem *)),
+ this, TQT_SLOT(changeSearchProvider()));
+ connect(m_dlg->lvSearchProviders, TQT_SIGNAL(returnPressed(TQListViewItem *)),
+ this, TQT_SLOT(changeSearchProvider()));
+ connect(m_dlg->lvSearchProviders, TQT_SIGNAL(executed(TQListViewItem *)),
+ this, TQT_SLOT(checkFavoritesChanged()));
+ connect(m_dlg->lvSearchProviders, TQT_SIGNAL(spacePressed(TQListViewItem *)),
+ this, TQT_SLOT(checkFavoritesChanged()));
+ connect(m_dlg->lvSearchProviders, TQT_SIGNAL(pressed(TQListViewItem *)),
+ this, TQT_SLOT(checkFavoritesChanged()));
+ connect(m_dlg->lvSearchProviders, TQT_SIGNAL(clicked(TQListViewItem *)),
+ this, TQT_SLOT(checkFavoritesChanged()));
+
+
+ connect(m_dlg->cmbDefaultEngine, TQT_SIGNAL(activated(const TQString &)), this,
+ TQT_SLOT(configChanged()));
+ connect(m_dlg->cmbDelimiter, TQT_SIGNAL(activated(const TQString &)), this,
+ TQT_SLOT(configChanged()));
+
+ connect(m_dlg->pbNew, TQT_SIGNAL(clicked()), this, TQT_SLOT(addSearchProvider()));
+ connect(m_dlg->pbChange, TQT_SIGNAL(clicked()), this, TQT_SLOT(changeSearchProvider()));
+ connect(m_dlg->pbDelete, TQT_SIGNAL(clicked()), this, TQT_SLOT(deleteSearchProvider()));
emit changed( useDefaults );
}
@@ -213,7 +213,7 @@ void FilterOptions::save()
config.writeEntry("EnableWebShortcuts", m_dlg->cbEnableShortcuts->isChecked());
config.writeEntry("KeywordDelimiter", delimiter() );
- QString engine;
+ TQString engine;
if (m_dlg->cmbDefaultEngine->currentItem() != 0)
engine = m_dlg->cmbDefaultEngine->currentText();
@@ -223,11 +223,11 @@ void FilterOptions::save()
// kdDebug () << "Engine: " << m_defaultEngineMap[engine] << endl;
int changedProviderCount = 0;
- QString path = kapp->dirs()->saveLocation("services", "searchproviders/");
+ TQString path = kapp->dirs()->saveLocation("services", "searchproviders/");
m_favoriteEngines.clear();
- for (QListViewItemIterator it(m_dlg->lvSearchProviders); it.current(); ++it)
+ for (TQListViewItemIterator it(m_dlg->lvSearchProviders); it.current(); ++it)
{
SearchProviderItem *item = dynamic_cast<SearchProviderItem *>(it.current());
@@ -235,7 +235,7 @@ void FilterOptions::save()
SearchProvider *provider = item->provider();
- QString name = provider->desktopEntryName();
+ TQString name = provider->desktopEntryName();
if (item->isOn())
m_favoriteEngines << name;
@@ -250,16 +250,16 @@ void FilterOptions::save()
// Take the longest search shortcut as filename,
// if such a file already exists, append a number and increase it
// until the name is unique
- for (QStringList::ConstIterator it = provider->keys().begin(); it != provider->keys().end(); ++it)
+ for (TQStringList::ConstIterator it = provider->keys().begin(); it != provider->keys().end(); ++it)
{
if ((*it).length() > name.length())
name = (*it).lower();
}
for (int suffix = 0; ; ++suffix)
{
- QString located, check = name;
+ TQString located, check = name;
if (suffix)
- check += QString().setNum(suffix);
+ check += TQString().setNum(suffix);
if ((located = locate("services", "searchproviders/" + check + ".desktop")).isEmpty())
{
name = check;
@@ -288,10 +288,10 @@ void FilterOptions::save()
}
}
- for (QStringList::ConstIterator it = m_deletedProviders.begin();
+ for (TQStringList::ConstIterator it = m_deletedProviders.begin();
it != m_deletedProviders.end(); ++it)
{
- QStringList matches = kapp->dirs()->findAllResources("services", "searchproviders/" + *it + ".desktop");
+ TQStringList matches = kapp->dirs()->findAllResources("services", "searchproviders/" + *it + ".desktop");
// Shouldn't happen
if (!matches.count())
@@ -301,7 +301,7 @@ void FilterOptions::save()
{
// If only the local copy existed, unlink it
// TODO: error handling
- QFile::remove(matches[0]);
+ TQFile::remove(matches[0]);
continue;
}
KSimpleConfig service(path + *it + ".desktop");
@@ -338,8 +338,8 @@ void FilterOptions::configChanged()
void FilterOptions::checkFavoritesChanged()
{
- QStringList currentFavoriteEngines;
- for (QListViewItemIterator it(m_dlg->lvSearchProviders); it.current(); ++it)
+ TQStringList currentFavoriteEngines;
+ for (TQListViewItemIterator it(m_dlg->lvSearchProviders); it.current(); ++it)
{
SearchProviderItem *item = dynamic_cast<SearchProviderItem *>(it.current());
@@ -437,7 +437,7 @@ SearchProviderItem *FilterOptions::displaySearchProvider(SearchProvider *p, bool
// Show the provider in the list.
SearchProviderItem *item = 0L;
- QListViewItemIterator it(m_dlg->lvSearchProviders);
+ TQListViewItemIterator it(m_dlg->lvSearchProviders);
for (; it.current(); ++it)
{
diff --git a/kcontrol/ebrowsing/plugins/ikws/ikwsopts.h b/kcontrol/ebrowsing/plugins/ikws/ikwsopts.h
index b533fb9a7..e39997995 100644
--- a/kcontrol/ebrowsing/plugins/ikws/ikwsopts.h
+++ b/kcontrol/ebrowsing/plugins/ikws/ikwsopts.h
@@ -20,8 +20,8 @@
#ifndef __IKWSOPTS_H___
#define __IKWSOPTS_H___
-#include <qlayout.h>
-#include <qtabwidget.h>
+#include <tqlayout.h>
+#include <tqtabwidget.h>
#include <kcmodule.h>
#include <kservice.h>
@@ -35,13 +35,13 @@ class FilterOptions : public KCModule
Q_OBJECT
public:
- FilterOptions(KInstance *instance, QWidget *parent = 0, const char *name = 0);
+ FilterOptions(KInstance *instance, TQWidget *parent = 0, const char *name = 0);
void load();
void load( bool useDefaults );
void save();
void defaults();
- QString quickHelp() const;
+ TQString quickHelp() const;
protected slots:
void configChanged();
@@ -63,9 +63,9 @@ private:
// The names of the providers that the user deleted,
// these are marked as deleted in the user's homedirectory
// on save if a global service file exists for it.
- QStringList m_deletedProviders;
- QMap <QString, QString> m_defaultEngineMap;
- QStringList m_favoriteEngines;
+ TQStringList m_deletedProviders;
+ TQMap <TQString, TQString> m_defaultEngineMap;
+ TQStringList m_favoriteEngines;
FilterOptionsUI* m_dlg;
};
diff --git a/kcontrol/ebrowsing/plugins/ikws/kuriikwsfilter.cpp b/kcontrol/ebrowsing/plugins/ikws/kuriikwsfilter.cpp
index a7e2e5239..b91d14702 100644
--- a/kcontrol/ebrowsing/plugins/ikws/kuriikwsfilter.cpp
+++ b/kcontrol/ebrowsing/plugins/ikws/kuriikwsfilter.cpp
@@ -38,7 +38,7 @@
typedef KGenericFactory<KAutoWebSearch> KAutoWebSearchFactory;
K_EXPORT_COMPONENT_FACTORY (libkuriikwsfilter, KAutoWebSearchFactory("kcmkurifilt"))
-KAutoWebSearch::KAutoWebSearch(QObject *parent, const char *name, const QStringList&)
+KAutoWebSearch::KAutoWebSearch(TQObject *parent, const char *name, const TQStringList&)
:KURIFilterPlugin(parent, name ? name : "kuriikwsfilter", 1.0),
DCOPObject("KURIIKWSFilterIface")
{
@@ -64,7 +64,7 @@ bool KAutoWebSearch::filterURI( KURIFilterData &data ) const
KURL u = data.uri();
if ( u.pass().isEmpty() )
{
- QString result = KURISearchFilterEngine::self()->autoWebSearchQuery( data.typedString() );
+ TQString result = KURISearchFilterEngine::self()->autoWebSearchQuery( data.typedString() );
if( !result.isEmpty() )
{
if ( KURISearchFilterEngine::self()->verbose() )
diff --git a/kcontrol/ebrowsing/plugins/ikws/kuriikwsfilter.h b/kcontrol/ebrowsing/plugins/ikws/kuriikwsfilter.h
index e286b3bd6..77e8c8b0f 100644
--- a/kcontrol/ebrowsing/plugins/ikws/kuriikwsfilter.h
+++ b/kcontrol/ebrowsing/plugins/ikws/kuriikwsfilter.h
@@ -34,8 +34,8 @@ class KAutoWebSearch : public KURIFilterPlugin, public DCOPObject
K_DCOP
Q_OBJECT
public:
- KAutoWebSearch(QObject *parent = 0, const char *name = 0,
- const QStringList &args = QStringList() );
+ KAutoWebSearch(TQObject *parent = 0, const char *name = 0,
+ const TQStringList &args = TQStringList() );
~KAutoWebSearch();
virtual bool filterURI( KURIFilterData& ) const;
diff --git a/kcontrol/ebrowsing/plugins/ikws/kuriikwsfiltereng.cpp b/kcontrol/ebrowsing/plugins/ikws/kuriikwsfiltereng.cpp
index 9cf0cf94d..9f3a245fc 100644
--- a/kcontrol/ebrowsing/plugins/ikws/kuriikwsfiltereng.cpp
+++ b/kcontrol/ebrowsing/plugins/ikws/kuriikwsfiltereng.cpp
@@ -26,8 +26,8 @@
#include <unistd.h>
-#include <qregexp.h>
-#include <qtextcodec.h>
+#include <tqregexp.h>
+#include <tqtextcodec.h>
#include <kurl.h>
#include <kdebug.h>
@@ -57,16 +57,16 @@ KURISearchFilterEngine::KURISearchFilterEngine()
loadConfig();
}
-QString KURISearchFilterEngine::webShortcutQuery( const QString& typedString ) const
+TQString KURISearchFilterEngine::webShortcutQuery( const TQString& typedString ) const
{
- QString result;
+ TQString result;
if (m_bWebShortcutsEnabled)
{
- QString search = typedString;
+ TQString search = typedString;
int pos = search.find(m_cKeywordDelimiter);
- QString key;
+ TQString key;
if (pos > -1)
key = search.left(pos);
else if (m_cKeywordDelimiter == ' ' && !search.isEmpty())
@@ -81,7 +81,7 @@ QString KURISearchFilterEngine::webShortcutQuery( const QString& typedString ) c
if (provider)
{
result = formatResult(provider->query(), provider->charset(),
- QString::null, search.mid(pos+1), true);
+ TQString::null, search.mid(pos+1), true);
delete provider;
}
}
@@ -91,9 +91,9 @@ QString KURISearchFilterEngine::webShortcutQuery( const QString& typedString ) c
}
-QString KURISearchFilterEngine::autoWebSearchQuery( const QString& typedString ) const
+TQString KURISearchFilterEngine::autoWebSearchQuery( const TQString& typedString ) const
{
- QString result;
+ TQString result;
if (m_bWebShortcutsEnabled && !m_defaultSearchEngine.isEmpty())
{
@@ -107,7 +107,7 @@ QString KURISearchFilterEngine::autoWebSearchQuery( const QString& typedString )
if (provider)
{
result = formatResult (provider->query(), provider->charset(),
- QString::null, typedString, true);
+ TQString::null, typedString, true);
delete provider;
}
}
@@ -116,7 +116,7 @@ QString KURISearchFilterEngine::autoWebSearchQuery( const QString& typedString )
return result;
}
-QCString KURISearchFilterEngine::name() const
+TQCString KURISearchFilterEngine::name() const
{
return "kuriikwsfilter";
}
@@ -128,17 +128,17 @@ KURISearchFilterEngine* KURISearchFilterEngine::self()
return s_pSelf;
}
-QStringList KURISearchFilterEngine::modifySubstitutionMap(SubstMap& map,
- const QString& query) const
+TQStringList KURISearchFilterEngine::modifySubstitutionMap(SubstMap& map,
+ const TQString& query) const
{
// Returns the number of query words
- QString userquery = query;
+ TQString userquery = query;
// Do some pre-encoding, before we can start the work:
{
int start = 0;
int pos = 0;
- QRegExp qsexpr("\\\"[^\\\"]*\\\"");
+ TQRegExp qsexpr("\\\"[^\\\"]*\\\"");
// Temporary substitute spaces in quoted strings (" " -> "%20")
// Needed to split user query into StringList correctly.
@@ -146,7 +146,7 @@ QStringList KURISearchFilterEngine::modifySubstitutionMap(SubstMap& map,
{
int i = 0;
int n = 0;
- QString s = userquery.mid (pos, qsexpr.matchedLength());
+ TQString s = userquery.mid (pos, qsexpr.matchedLength());
while ((i = s.find(" ")) != -1)
{
s = s.replace (i, 1, "%20");
@@ -158,7 +158,7 @@ QStringList KURISearchFilterEngine::modifySubstitutionMap(SubstMap& map,
}
// Split user query between spaces:
- QStringList l = QStringList::split(" ", userquery.simplifyWhiteSpace());
+ TQStringList l = TQStringList::split(" ", userquery.simplifyWhiteSpace());
// Back-substitute quoted strings (%20 -> " "):
{
@@ -166,7 +166,7 @@ QStringList KURISearchFilterEngine::modifySubstitutionMap(SubstMap& map,
while ((i = userquery.find("%20")) != -1)
userquery = userquery.replace(i, 3, " ");
- for ( QStringList::Iterator it = l.begin(); it != l.end(); ++it )
+ for ( TQStringList::Iterator it = l.begin(); it != l.end(); ++it )
*it = (*it).replace("%20", " ");
}
@@ -176,8 +176,8 @@ QStringList KURISearchFilterEngine::modifySubstitutionMap(SubstMap& map,
{
int j = 0;
int pos = 0;
- QString v = "";
- QString nr = QString::number(i);
+ TQString v = "";
+ TQString nr = TQString::number(i);
// Add whole user query (\{0}) to substitution map:
if (i==0)
@@ -191,15 +191,15 @@ QStringList KURISearchFilterEngine::modifySubstitutionMap(SubstMap& map,
v = v.replace(j, 3, " ");
// Insert partial queries (referenced by \1 ... \n) to map:
- map.replace(QString::number(i), v);
+ map.replace(TQString::number(i), v);
PDVAR (" map['" + nr + "']", map[nr]);
// Insert named references (referenced by \name) to map:
j = 0;
if ((i>0) && (pos = v.find("=")) > 0)
{
- QString s = v.mid(pos + 1);
- QString k = v.left(pos);
+ TQString s = v.mid(pos + 1);
+ TQString k = v.left(pos);
// Back-substitute references contained in references (e.g. '\refname' substitutes to 'thisquery=\0')
while ((j = s.find("%5C")) != -1) s = s.replace(j, 3, "\\");
@@ -211,10 +211,10 @@ QStringList KURISearchFilterEngine::modifySubstitutionMap(SubstMap& map,
return l;
}
-static QString encodeString(const QString &s, int mib)
+static TQString encodeString(const TQString &s, int mib)
{
- QStringList l = QStringList::split(" ", s, true);
- for(QStringList::Iterator it = l.begin();
+ TQStringList l = TQStringList::split(" ", s, true);
+ for(TQStringList::Iterator it = l.begin();
it != l.end(); ++it)
{
*it = KURL::encode_string(*it, mib);
@@ -222,10 +222,10 @@ static QString encodeString(const QString &s, int mib)
return l.join("+");
}
-QString KURISearchFilterEngine::substituteQuery(const QString& url, SubstMap &map, const QString& userquery, const int encodingMib) const
+TQString KURISearchFilterEngine::substituteQuery(const TQString& url, SubstMap &map, const TQString& userquery, const int encodingMib) const
{
- QString newurl = url;
- QStringList ql = modifySubstitutionMap (map, userquery);
+ TQString newurl = url;
+ TQStringList ql = modifySubstitutionMap (map, userquery);
int count = ql.count();
// Check, if old style '\1' is found and replace it with \{@} (compatibility mode):
@@ -244,7 +244,7 @@ QString KURISearchFilterEngine::substituteQuery(const QString& url, SubstMap &ma
// Substitute references (\{ref1,ref2,...}) with values from user query:
{
int pos = 0;
- QRegExp reflist("\\\\\\{[^\\}]+\\}");
+ TQRegExp reflist("\\\\\\{[^\\}]+\\}");
// Substitute reflists (\{ref1,ref2,...}):
while ((pos = reflist.search(newurl, 0)) >= 0)
@@ -252,8 +252,8 @@ QString KURISearchFilterEngine::substituteQuery(const QString& url, SubstMap &ma
bool found = false;
//bool rest = false;
- QString v = "";
- QString rlstring = newurl.mid(pos + 2, reflist.matchedLength() - 3);
+ TQString v = "";
+ TQString rlstring = newurl.mid(pos + 2, reflist.matchedLength() - 3);
PDVAR (" reference list", rlstring);
// \{@} gets a special treatment later
@@ -264,13 +264,13 @@ QString KURISearchFilterEngine::substituteQuery(const QString& url, SubstMap &ma
}
// TODO: strip whitespaces around commas
- QStringList rl = QStringList::split(",", rlstring);
+ TQStringList rl = TQStringList::split(",", rlstring);
unsigned int i = 0;
while ((i<rl.count()) && !found)
{
- QString rlitem = rl[i];
- QRegExp range("[0-9]*\\-[0-9]*");
+ TQString rlitem = rl[i];
+ TQRegExp range("[0-9]*\\-[0-9]*");
// Substitute a range of keywords
if (range.search(rlitem, 0) >= 0)
@@ -287,7 +287,7 @@ QString KURISearchFilterEngine::substituteQuery(const QString& url, SubstMap &ma
for (int i=first; i<=last; i++)
{
- v += map[QString::number(i)] + " ";
+ v += map[TQString::number(i)] + " ";
// Remove used value from ql (needed for \{@}):
ql[i-1] = "";
}
@@ -296,14 +296,14 @@ QString KURISearchFilterEngine::substituteQuery(const QString& url, SubstMap &ma
if (!v.isEmpty())
found = true;
- PDVAR (" range", QString::number(first) + "-" + QString::number(last) + " => '" + v + "'");
+ PDVAR (" range", TQString::number(first) + "-" + TQString::number(last) + " => '" + v + "'");
v = encodeString(v, encodingMib);
}
else if ( rlitem.startsWith("\"") && rlitem.endsWith("\"") )
{
// Use default string from query definition:
found = true;
- QString s = rlitem.mid(1, rlitem.length() - 2);
+ TQString s = rlitem.mid(1, rlitem.length() - 2);
v = encodeString(s, encodingMib);
PDVAR (" default", s);
}
@@ -315,11 +315,11 @@ QString KURISearchFilterEngine::substituteQuery(const QString& url, SubstMap &ma
v = encodeString(map[rlitem], encodingMib);
// Remove used value from ql (needed for \{@}):
- QString c = rlitem.left(1);
+ TQString c = rlitem.left(1);
if (c=="0")
{
// It's a numeric reference to '0'
- for (QStringList::Iterator it = ql.begin(); it!=ql.end(); ++it)
+ for (TQStringList::Iterator it = ql.begin(); it!=ql.end(); ++it)
(*it) = "";
}
else if ((c>="0") && (c<="9"))
@@ -331,7 +331,7 @@ QString KURISearchFilterEngine::substituteQuery(const QString& url, SubstMap &ma
else
{
// It's a alphanumeric reference
- QStringList::Iterator it = ql.begin();
+ TQStringList::Iterator it = ql.begin();
while ((it != ql.end()) && ((rlitem + "=") != (*it).left(rlitem.length()+1)))
++it;
if ((rlitem + "=") == (*it).left(rlitem.length()+1))
@@ -360,7 +360,7 @@ QString KURISearchFilterEngine::substituteQuery(const QString& url, SubstMap &ma
{
PDVAR (" newurl", newurl);
// Generate list of unmatched strings:
- QString v = "";
+ TQString v = "";
for (unsigned int i=0; i<ql.count(); i++) {
v += " " + ql[i];
}
@@ -378,27 +378,27 @@ QString KURISearchFilterEngine::substituteQuery(const QString& url, SubstMap &ma
return newurl;
}
-QString KURISearchFilterEngine::formatResult( const QString& url,
- const QString& cset1,
- const QString& cset2,
- const QString& query,
+TQString KURISearchFilterEngine::formatResult( const TQString& url,
+ const TQString& cset1,
+ const TQString& cset2,
+ const TQString& query,
bool isMalformed ) const
{
SubstMap map;
return formatResult (url, cset1, cset2, query, isMalformed, map);
}
-QString KURISearchFilterEngine::formatResult( const QString& url,
- const QString& cset1,
- const QString& cset2,
- const QString& query,
+TQString KURISearchFilterEngine::formatResult( const TQString& url,
+ const TQString& cset1,
+ const TQString& cset2,
+ const TQString& query,
bool /* isMalformed */,
SubstMap& map ) const
{
// Return nothing if userquery is empty and it contains
// substitution strings...
- if (query.isEmpty() && url.find(QRegExp(QRegExp::escape("\\{"))) > 0)
- return QString::null;
+ if (query.isEmpty() && url.find(TQRegExp(TQRegExp::escape("\\{"))) > 0)
+ return TQString::null;
// Debug info of map:
if (!map.isEmpty())
@@ -409,19 +409,19 @@ QString KURISearchFilterEngine::formatResult( const QString& url,
}
// Create a codec for the desired encoding so that we can transcode the user's "url".
- QString cseta = cset1;
+ TQString cseta = cset1;
if (cseta.isEmpty())
cseta = "iso-8859-1";
- QTextCodec *csetacodec = QTextCodec::codecForName(cseta.latin1());
+ TQTextCodec *csetacodec = TQTextCodec::codecForName(cseta.latin1());
if (!csetacodec)
{
cseta = "iso-8859-1";
- csetacodec = QTextCodec::codecForName(cseta.latin1());
+ csetacodec = TQTextCodec::codecForName(cseta.latin1());
}
// Decode user query:
- QString userquery = KURL::decode_string(query, 106 /* utf-8*/);
+ TQString userquery = KURL::decode_string(query, 106 /* utf-8*/);
PDVAR ("user query", userquery);
PDVAR ("query definition", url);
@@ -430,12 +430,12 @@ QString KURISearchFilterEngine::formatResult( const QString& url,
map.replace("ikw_charset", cseta);
// Add charset indicator for the fallback query to substitution map:
- QString csetb = cset2;
+ TQString csetb = cset2;
if (csetb.isEmpty())
csetb = "iso-8859-1";
map.replace("wsc_charset", csetb);
- QString newurl = substituteQuery (url, map, userquery, csetacodec->mibEnum());
+ TQString newurl = substituteQuery (url, map, userquery, csetacodec->mibEnum());
PDVAR ("substituted query", newurl);
@@ -449,28 +449,28 @@ void KURISearchFilterEngine::loadConfig()
// contains the sycoca based search provider configuration (malte).
// TODO: Remove in KDE 4 !!! This has been here a sufficient amount of time...
{
- KSimpleConfig oldConfig(kapp->dirs()->saveLocation("config") + QString(name()) + "rc");
+ KSimpleConfig oldConfig(kapp->dirs()->saveLocation("config") + TQString(name()) + "rc");
oldConfig.setGroup("General");
if (oldConfig.hasKey("SearchEngines"))
{
// User has an old config file in his local config dir
PIDDBG << "Migrating config file to .desktop files..." << endl;
- QString fallback = oldConfig.readEntry("InternetKeywordsSearchFallback");
- QStringList engines = oldConfig.readListEntry("SearchEngines");
- for (QStringList::ConstIterator it = engines.begin(); it != engines.end(); ++it)
+ TQString fallback = oldConfig.readEntry("InternetKeywordsSearchFallback");
+ TQStringList engines = oldConfig.readListEntry("SearchEngines");
+ for (TQStringList::ConstIterator it = engines.begin(); it != engines.end(); ++it)
{
if (!oldConfig.hasGroup(*it + " Search"))
continue;
oldConfig.setGroup(*it + " Search");
- QString query = oldConfig.readEntry("Query");
- QStringList keys = oldConfig.readListEntry("Keys");
- QString charset = oldConfig.readEntry("Charset");
+ TQString query = oldConfig.readEntry("Query");
+ TQStringList keys = oldConfig.readListEntry("Keys");
+ TQString charset = oldConfig.readEntry("Charset");
oldConfig.deleteGroup(*it + " Search");
- QString name;
- for (QStringList::ConstIterator key = keys.begin(); key != keys.end(); ++key)
+ TQString name;
+ for (TQStringList::ConstIterator key = keys.begin(); key != keys.end(); ++key)
{
// take the longest key as name for the .desktop file
if ((*key).length() > name.length())
diff --git a/kcontrol/ebrowsing/plugins/ikws/kuriikwsfiltereng.h b/kcontrol/ebrowsing/plugins/ikws/kuriikwsfiltereng.h
index d45c17033..35c519aec 100644
--- a/kcontrol/ebrowsing/plugins/ikws/kuriikwsfiltereng.h
+++ b/kcontrol/ebrowsing/plugins/ikws/kuriikwsfiltereng.h
@@ -25,8 +25,8 @@
#ifndef __KURISearchFILTERENGINE_H__
#define __KURISearchFILTERENGINE_H__
-#include <qvaluelist.h>
-#include <qstringlist.h>
+#include <tqvaluelist.h>
+#include <tqstringlist.h>
#include <kservice.h>
@@ -36,16 +36,16 @@ class KURL;
class KURISearchFilterEngine
{
public:
- typedef QMap <QString, QString> SubstMap;
+ typedef TQMap <TQString, TQString> SubstMap;
KURISearchFilterEngine();
~KURISearchFilterEngine() {};
- QCString name() const;
+ TQCString name() const;
- QString webShortcutQuery (const QString&) const;
+ TQString webShortcutQuery (const TQString&) const;
- QString autoWebSearchQuery (const QString&) const;
+ TQString autoWebSearchQuery (const TQString&) const;
bool verbose() const { return m_bVerbose; }
@@ -54,23 +54,23 @@ public:
static KURISearchFilterEngine *self();
protected:
- QString formatResult (const QString& url, const QString& cset1, const QString& cset2,
- const QString& query, bool isMalformed) const;
+ TQString formatResult (const TQString& url, const TQString& cset1, const TQString& cset2,
+ const TQString& query, bool isMalformed) const;
- QString formatResult (const QString& url, const QString& cset1, const QString& cset2,
- const QString& query, bool isMalformed, SubstMap& map) const;
+ TQString formatResult (const TQString& url, const TQString& cset1, const TQString& cset2,
+ const TQString& query, bool isMalformed, SubstMap& map) const;
private:
- QStringList modifySubstitutionMap (SubstMap& map, const QString& query) const;
+ TQStringList modifySubstitutionMap (SubstMap& map, const TQString& query) const;
- QString substituteQuery (const QString& url, SubstMap &map,
- const QString& userquery, const int encodingMib) const;
+ TQString substituteQuery (const TQString& url, SubstMap &map,
+ const TQString& userquery, const int encodingMib) const;
bool m_bVerbose;
bool m_bWebShortcutsEnabled;
char m_cKeywordDelimiter;
- QString m_defaultSearchEngine;
+ TQString m_defaultSearchEngine;
static KURISearchFilterEngine *s_pSelf;
};
diff --git a/kcontrol/ebrowsing/plugins/ikws/kurisearchfilter.cpp b/kcontrol/ebrowsing/plugins/ikws/kurisearchfilter.cpp
index d56220935..6280f3899 100644
--- a/kcontrol/ebrowsing/plugins/ikws/kurisearchfilter.cpp
+++ b/kcontrol/ebrowsing/plugins/ikws/kurisearchfilter.cpp
@@ -38,8 +38,8 @@
typedef KGenericFactory<KURISearchFilter> KURISearchFilterFactory;
K_EXPORT_COMPONENT_FACTORY(libkurisearchfilter, KURISearchFilterFactory("kcmkurifilt"))
-KURISearchFilter::KURISearchFilter(QObject *parent, const char *name,
- const QStringList &)
+KURISearchFilter::KURISearchFilter(TQObject *parent, const char *name,
+ const TQStringList &)
:KURIFilterPlugin(parent, name ? name : "kurisearchfilter", 1.0),
DCOPObject("KURISearchFilterIface")
{
@@ -62,7 +62,7 @@ bool KURISearchFilter::filterURI( KURIFilterData &data ) const
if ( KURISearchFilterEngine::self()->verbose() )
kdDebug() << "KURISearchFilter::filterURI: '" << data.typedString() << "'" << endl;
- QString result = KURISearchFilterEngine::self()->webShortcutQuery( data.typedString() );
+ TQString result = KURISearchFilterEngine::self()->webShortcutQuery( data.typedString() );
if ( !result.isEmpty() )
{
@@ -77,12 +77,12 @@ bool KURISearchFilter::filterURI( KURIFilterData &data ) const
return false;
}
-KCModule *KURISearchFilter::configModule(QWidget *parent, const char *) const
+KCModule *KURISearchFilter::configModule(TQWidget *parent, const char *) const
{
return new FilterOptions( KURISearchFilterFactory::instance(), parent, "kcmkurifilt");
}
-QString KURISearchFilter::configName() const
+TQString KURISearchFilter::configName() const
{
return i18n("Search F&ilters");
}
diff --git a/kcontrol/ebrowsing/plugins/ikws/kurisearchfilter.h b/kcontrol/ebrowsing/plugins/ikws/kurisearchfilter.h
index 0b8dd1b14..eff650902 100644
--- a/kcontrol/ebrowsing/plugins/ikws/kurisearchfilter.h
+++ b/kcontrol/ebrowsing/plugins/ikws/kurisearchfilter.h
@@ -34,13 +34,13 @@ class KURISearchFilter : public KURIFilterPlugin, public DCOPObject
Q_OBJECT
K_DCOP
public:
- KURISearchFilter(QObject *parent = 0, const char *name = 0,
- const QStringList &args = QStringList() );
+ KURISearchFilter(TQObject *parent = 0, const char *name = 0,
+ const TQStringList &args = TQStringList() );
~KURISearchFilter();
virtual bool filterURI( KURIFilterData& ) const;
- virtual KCModule *configModule(QWidget *parent = 0, const char *name = 0) const;
- virtual QString configName() const;
+ virtual KCModule *configModule(TQWidget *parent = 0, const char *name = 0) const;
+ virtual TQString configName() const;
k_dcop:
virtual void configure();
diff --git a/kcontrol/ebrowsing/plugins/ikws/searchprovider.cpp b/kcontrol/ebrowsing/plugins/ikws/searchprovider.cpp
index c9e13dc1f..11b7ee692 100644
--- a/kcontrol/ebrowsing/plugins/ikws/searchprovider.cpp
+++ b/kcontrol/ebrowsing/plugins/ikws/searchprovider.cpp
@@ -30,7 +30,7 @@ SearchProvider::SearchProvider(const KService::Ptr service)
m_charset = service->property("Charset").toString();
}
-void SearchProvider::setName(const QString &name)
+void SearchProvider::setName(const TQString &name)
{
if (m_name == name)
return;
@@ -38,7 +38,7 @@ void SearchProvider::setName(const QString &name)
m_dirty = true;
}
-void SearchProvider::setQuery(const QString &query)
+void SearchProvider::setQuery(const TQString &query)
{
if (m_query == query)
return;
@@ -46,7 +46,7 @@ void SearchProvider::setQuery(const QString &query)
m_dirty = true;
}
-void SearchProvider::setKeys(const QStringList &keys)
+void SearchProvider::setKeys(const TQStringList &keys)
{
if (m_keys == keys)
return;
@@ -54,7 +54,7 @@ void SearchProvider::setKeys(const QStringList &keys)
m_dirty = true;
}
-void SearchProvider::setCharset(const QString &charset)
+void SearchProvider::setCharset(const TQString &charset)
{
if (m_charset == charset)
return;
@@ -62,17 +62,17 @@ void SearchProvider::setCharset(const QString &charset)
m_dirty = true;
}
-SearchProvider *SearchProvider::findByDesktopName(const QString &name)
+SearchProvider *SearchProvider::findByDesktopName(const TQString &name)
{
KService::Ptr service =
- KService::serviceByDesktopPath(QString("searchproviders/%1.desktop").arg(name));
+ KService::serviceByDesktopPath(TQString("searchproviders/%1.desktop").arg(name));
return service ? new SearchProvider(service) : 0;
}
-SearchProvider *SearchProvider::findByKey(const QString &key)
+SearchProvider *SearchProvider::findByKey(const TQString &key)
{
KTrader::OfferList providers =
- KTrader::self()->query("SearchProvider", QString("'%1' in Keys").arg(key));
+ KTrader::self()->query("SearchProvider", TQString("'%1' in Keys").arg(key));
return providers.count() ? new SearchProvider(providers[0]) : 0;
}
diff --git a/kcontrol/ebrowsing/plugins/ikws/searchprovider.h b/kcontrol/ebrowsing/plugins/ikws/searchprovider.h
index b7916892c..45309939c 100644
--- a/kcontrol/ebrowsing/plugins/ikws/searchprovider.h
+++ b/kcontrol/ebrowsing/plugins/ikws/searchprovider.h
@@ -28,26 +28,26 @@ public:
SearchProvider() : m_dirty(false) {};
SearchProvider(const KService::Ptr service);
- const QString &desktopEntryName() const { return m_desktopEntryName; }
- const QString &name() const { return m_name; }
- const QString &query() const { return m_query; }
- const QStringList &keys() const { return m_keys; }
- const QString &charset() const { return m_charset; }
+ const TQString &desktopEntryName() const { return m_desktopEntryName; }
+ const TQString &name() const { return m_name; }
+ const TQString &query() const { return m_query; }
+ const TQStringList &keys() const { return m_keys; }
+ const TQString &charset() const { return m_charset; }
bool isDirty() const { return m_dirty; }
- void setName(const QString &);
- void setQuery(const QString &);
- void setKeys(const QStringList &);
- void setCharset(const QString &);
+ void setName(const TQString &);
+ void setQuery(const TQString &);
+ void setKeys(const TQStringList &);
+ void setCharset(const TQString &);
- static SearchProvider *findByDesktopName(const QString &);
- static SearchProvider *findByKey(const QString &);
+ static SearchProvider *findByDesktopName(const TQString &);
+ static SearchProvider *findByKey(const TQString &);
private:
- QString m_desktopEntryName;
- QString m_name;
- QString m_query;
- QStringList m_keys;
- QString m_charset;
+ TQString m_desktopEntryName;
+ TQString m_name;
+ TQString m_query;
+ TQStringList m_keys;
+ TQString m_charset;
bool m_dirty;
};
diff --git a/kcontrol/ebrowsing/plugins/ikws/searchproviderdlg.cpp b/kcontrol/ebrowsing/plugins/ikws/searchproviderdlg.cpp
index ca7161b1c..586f947ff 100644
--- a/kcontrol/ebrowsing/plugins/ikws/searchproviderdlg.cpp
+++ b/kcontrol/ebrowsing/plugins/ikws/searchproviderdlg.cpp
@@ -16,10 +16,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qwhatsthis.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqwhatsthis.h>
#include <kapplication.h>
#include <klocale.h>
@@ -34,8 +34,8 @@
#include "searchprovider.h"
SearchProviderDialog::SearchProviderDialog(SearchProvider *provider,
- QWidget *parent, const char *name)
- :KDialogBase(parent, name, true, QString::null, Ok|Cancel),
+ TQWidget *parent, const char *name)
+ :KDialogBase(parent, name, true, TQString::null, Ok|Cancel),
m_provider(provider)
{
m_dlg = new SearchProviderDlgUI (this);
@@ -45,12 +45,12 @@ SearchProviderDialog::SearchProviderDialog(SearchProvider *provider,
m_dlg->leQuery->setMinimumWidth(kapp->fontMetrics().maxWidth() * 40);
- connect(m_dlg->leName, SIGNAL(textChanged(const QString &)), SLOT(slotChanged()));
- connect(m_dlg->leQuery, SIGNAL(textChanged(const QString &)), SLOT(slotChanged()));
- connect(m_dlg->leShortcut, SIGNAL(textChanged(const QString &)), SLOT(slotChanged()));
+ connect(m_dlg->leName, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(slotChanged()));
+ connect(m_dlg->leQuery, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(slotChanged()));
+ connect(m_dlg->leShortcut, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(slotChanged()));
// Data init
- QStringList charsets = KGlobal::charsets()->availableEncodingNames();
+ TQStringList charsets = KGlobal::charsets()->availableEncodingNames();
charsets.prepend(i18n("Default"));
m_dlg->cbCharset->insertStringList(charsets);
@@ -86,15 +86,15 @@ void SearchProviderDialog::slotOk()
i18n("The URI does not contain a \\{...} placeholder for the user query.\n"
"This means that the same page is always going to be visited, "
"regardless of what the user types."),
- QString::null, i18n("Keep It")) == KMessageBox::Cancel)
+ TQString::null, i18n("Keep It")) == KMessageBox::Cancel)
return;
if (!m_provider)
m_provider = new SearchProvider;
m_provider->setName(m_dlg->leName->text().stripWhiteSpace());
m_provider->setQuery(m_dlg->leQuery->text().stripWhiteSpace());
- m_provider->setKeys(QStringList::split(",", m_dlg->leShortcut->text().stripWhiteSpace()));
- m_provider->setCharset(m_dlg->cbCharset->currentItem() ? m_dlg->cbCharset->currentText() : QString::null);
+ m_provider->setKeys(TQStringList::split(",", m_dlg->leShortcut->text().stripWhiteSpace()));
+ m_provider->setCharset(m_dlg->cbCharset->currentItem() ? m_dlg->cbCharset->currentText() : TQString::null);
KDialog::accept();
}
diff --git a/kcontrol/ebrowsing/plugins/ikws/searchproviderdlg.h b/kcontrol/ebrowsing/plugins/ikws/searchproviderdlg.h
index 5abb2f057..2a23cbf05 100644
--- a/kcontrol/ebrowsing/plugins/ikws/searchproviderdlg.h
+++ b/kcontrol/ebrowsing/plugins/ikws/searchproviderdlg.h
@@ -30,7 +30,7 @@ class SearchProviderDialog : public KDialogBase
Q_OBJECT
public:
- SearchProviderDialog(SearchProvider *provider, QWidget *parent = 0, const char *name = 0);
+ SearchProviderDialog(SearchProvider *provider, TQWidget *parent = 0, const char *name = 0);
SearchProvider *provider() { return m_provider; }