Bug 106559 - 'protocol not supported' error lower cases the protocol
Summary: 'protocol not supported' error lower cases the protocol
Status: RESOLVED FIXED
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Dawit Alemayehu
URL:
Keywords:
: 105734 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-05-31 18:19 UTC by Ian P. Christian
Modified: 2005-10-16 06:57 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ian P. Christian 2005-05-31 18:19:19 UTC
Version:           3.4.0 (using KDE 3.4.89%2520%28%253E%253D%252020050508%29%2C%2520Gentoo)
Compiler:          gcc%2520version%25203.3.5-20050130%2520%28Gentoo%2520Linux%25203.3.5.20050130-r1%2C%2520ssp-3.3.5.20050130-1%2C%2520pie-8.7.7.1%29
OS:                Linux%2520%28i686%29%2520release%25202.6.11-gentoo-r9-mh2

if I do
'gG: pookey' rather then 'gg: pookey' to google, the error message that appears is 
"protocol not supported \n\n gg" ( where \n is a newline )

This is confusing, as 'gg' is supported, however 'gG' isn't.

Not a biggie at all, but I though I would mention it :)

Ian
Comment 1 Dawit Alemayehu 2005-10-09 10:54:24 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.
Comment 2 David Faure 2005-10-09 20:33:36 UTC
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 :)
Comment 3 Dawit Alemayehu 2005-10-10 17:09:16 UTC
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");
Comment 4 Dawit Alemayehu 2005-10-16 06:57:04 UTC
*** Bug 105734 has been marked as a duplicate of this bug. ***