Summary: | 'protocol not supported' error lower cases the protocol | ||
---|---|---|---|
Product: | [Frameworks and Libraries] kio | Reporter: | Ian P. Christian <pookey> |
Component: | general | Assignee: | Dawit Alemayehu <adawit> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | adawit, faure, maw48 |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Ian P. Christian
2005-05-31 18:19:19 UTC
Thanks for the report, but this error message is not set by the webshortcut filters. It is rather done by KIO, reassigned to the appropriate module. Hmm, it's a bit confusing I agree, but it actually makes sense. If you type "Foo:bar" litterally, since "Foo" isn't a known internet keyword, no magic will happen and the normal URL parsing will happen; that one will then say "unknown protocol foo" since there is no foo protocol, and protocols are always lowercased. IMHO the fix isn't to fix the error message (can't be done anyway), but to let internet keywords be case insensitive. -> reassigning back to Dawit :) SVN commit 469260 by adawit: - David is right. Make internet keywords case-insensitive. Fixes bug# 106559 - Changes to internet keywords cannot be saved if language is not the default. Fix for bug # 85352 BUG: 106559 CCBUG: 85352 M +7 -2 ikwsopts.cpp M +6 -3 kuriikwsfiltereng.cpp --- branches/KDE/3.5/kdebase/kcontrol/ebrowsing/plugins/ikws/ikwsopts.cpp #469259:469260 @@ -28,7 +28,7 @@ #include <qwhatsthis.h> #include <kdebug.h> - +#include <kglobal.h> #include <dcopref.h> #include <kapplication.h> #include <kcombobox.h> @@ -262,7 +262,12 @@ service.writeEntry("Type", "Service"); service.writeEntry("ServiceTypes", "SearchProvider"); service.writeEntry("Name", provider->name()); - service.writeEntry("Query", provider->query()); + + QString queryText = QString::fromLatin1("Query"); + if (KGlobal::locale()->language() != KGlobal::locale()->defaultLanguage()) + queryText += "[" + KGlobal::locale()->language() + "]"; + + service.writeEntry(queryText, provider->query()); service.writeEntry("Keys", provider->keys()); service.writeEntry("Charset", provider->charset()); --- branches/KDE/3.5/kdebase/kcontrol/ebrowsing/plugins/ikws/kuriikwsfiltereng.cpp #469259:469260 @@ -67,14 +67,16 @@ int pos = search.find(m_cKeywordDelimiter); QString key; - if ( pos > -1 ) + if (pos > -1) key = search.left(pos); - else if ( m_cKeywordDelimiter == ' ' && !search.isEmpty() ) + else if (m_cKeywordDelimiter == ' ' && !search.isEmpty()) key = search; if (!key.isEmpty() && !KProtocolInfo::isKnownProtocol( key )) { - SearchProvider *provider = SearchProvider::findByKey(key); + // Make web shortcut keywords case-insensitive, i.e. + // kde == KDE == Kde == kDe == kdE + SearchProvider *provider = SearchProvider::findByKey(key.lower()); if (provider) { @@ -445,6 +447,7 @@ // Migrate from the old format, this block should remain until // we can assume "every" user has upgraded to a KDE version that // 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"); oldConfig.setGroup("General"); *** Bug 105734 has been marked as a duplicate of this bug. *** |