Bug 56639 - Files with (:) colon in the name don't load into projects when rescanning project. No error generated.
Summary: Files with (:) colon in the name don't load into projects when rescanning pro...
Status: RESOLVED FIXED
Alias: None
Product: quanta
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: András Manţia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-31 00:49 UTC by Robert Nickel
Modified: 2003-05-01 15:48 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Nickel 2003-03-31 00:49:52 UTC
Version:           CVS 3/30/2003 (using KDE KDE 3.1.1)
Installed from:    Compiled From Sources
Compiler:          gcc 3.2.2 Standard cvs build: make -f Makefile.cvs;./configure;make;make install
OS:          Linux

While working on Docbook DTD, there are 3 files with a colon (:) in the name.  When I created the project, and initially did the scan of the project directory, these three files were not added to the project.  On subsequent attempts to add these files via rmb menu in the project tree -> rescan project directory the files had been inserted into the project file but not displayed in the project tree view.

This is a completely cosmetic issue.  All functionality on these tag files exist except for having access to them through the project tree view RMB menu.
Comment 1 Holger Schröder 2003-04-11 16:50:56 UTC
Hi, 
 
there is a reason for this: 
under windows, the colon ( : ) is needed to recognize drive letters like C: and so on. so some long 
time ago the core developers decided, that filenames are not allowed to contain colons any more, so 
that nobody can rely on colons in file names. so we won
Comment 2 András Manţia 2003-05-01 15:48:40 UTC
Subject: QUANTA_3_1_BRANCH: quanta

CVS commit by amantia: 

Show files with : inside their names correctly in the Project Tree. 

CCMAIL: 56639-done@bugs.kde.org


  M +1 -0      ChangeLog   1.90.2.64
  M +4 -7      quanta/quantacommon.cpp   1.29.2.7


--- quanta/ChangeLog  #1.90.2.63:1.90.2.64
@@ -23,4 +23,5 @@
     - use the Attribute Quotation setting
     - allow opening of empty local files [#57718]
+    - show files with : inside their names correctly in the Project Tree [#56639]
  - usability enhancements:
     - bring up the message output window, when and action/plugin wants to printed

--- quanta/quanta/quantacommon.cpp  #1.29.2.6:1.29.2.7
@@ -28,5 +28,5 @@
 #include <kmessagebox.h>
 #include <klocale.h>
-
+#include <kprotocolinfo.h>
 
 #include "quantacommon.h"
@@ -92,12 +92,9 @@ QString QuantaCommon::attrCase( const QS
 void QuantaCommon::setUrl(KURL &url, QString urlString)
 {
- if (urlString.find(":") == -1)
+ url = urlString;
+ if (!KProtocolInfo::isKnownProtocol(url))
  {
    url.setPath(urlString);
-   if (url.protocol().isEmpty()) url.setProtocol("file");
- }
- else
- {
-   url = urlString;
+   url.setProtocol("file");
  }
 }