Branch: master

6c097e6f 2014-11-07 22:30:02 Timothy Pearson
Read from X-DocPath only
M admin
M tdecore/kdesktopfile.cpp
M tdecore/kdesktopfile.h
M tdecore/kprotocolinfo_tdecore.cpp
M tdeio/application.desktop
M tdeio/tdeio/kprotocolinfo.h
M tdeio/tests/tdesycocatest.cpp
M tdeutils/kcmultidialog.h
M tdeutils/tdecmoduleinfo.cpp
diff --git a/admin b/admin
index 04db460..4dd97fa 160000
--- a/admin
+++ b/admin
-Subproject commit 04db460623e1f235e7239f08fdcc2d0ef72636af
+Subproject commit 4dd97fad9e0c3f39abfd16d13e5b4c93d508513c
diff --git a/tdecore/kdesktopfile.cpp b/tdecore/kdesktopfile.cpp
index 9798a1f..fa16267 100644
--- a/tdecore/kdesktopfile.cpp
+++ b/tdecore/kdesktopfile.cpp
@@ -364,11 +364,6 @@
 
 TQString KDesktopFile::readDocPath() const
 {
-  // Depreciated, remove in KDE4 or 5?
-  // See: http://www.freedesktop.org/Standards/desktop-entry-spec
-  if(hasKey( "DocPath" ))
-    return readPathEntry( "DocPath" );
-
   return readPathEntry( "X-DocPath" );
 }
 
diff --git a/tdecore/kdesktopfile.h b/tdecore/kdesktopfile.h
index 60e9fc0..cfdc548 100644
--- a/tdecore/kdesktopfile.h
+++ b/tdecore/kdesktopfile.h
@@ -200,10 +200,8 @@
   TQString resource() const;
 
   /**
-   * Returns the value of the "X-DocPath=" Or "DocPath=" entry.
-	 * X-DocPath should be used and DocPath is depreciated and will
-	 * one day be not supported.
-   * @return The value of the "X-DocPath=" Or "DocPath=" entry.
+   * Returns the value of the "X-DocPath=" entry.
+   * @return The value of the "X-DocPath=" entry.
    * @since 3.1
    */
   TQString readDocPath() const;
diff --git a/tdecore/kprotocolinfo_tdecore.cpp b/tdecore/kprotocolinfo_tdecore.cpp
index 86a9a6f..4377ec9 100644
--- a/tdecore/kprotocolinfo_tdecore.cpp
+++ b/tdecore/kprotocolinfo_tdecore.cpp
@@ -105,7 +105,7 @@
   else
     m_outputType = KProtocolInfo::T_NONE;
 
-  d->docPath = config.readPathEntry( "DocPath" );
+  d->docPath = config.readPathEntry( "X-DocPath" );
   d->protClass = config.readEntry( "Class" ).lower();
   if (d->protClass[0] != ':')
      d->protClass.prepend(':');
diff --git a/tdeio/application.desktop b/tdeio/application.desktop
index d45e495..014bc56 100644
--- a/tdeio/application.desktop
+++ b/tdeio/application.desktop
@@ -89,7 +89,7 @@
 [PropertyDef::NoDisplay]
 Type=bool
 
-[PropertyDef::DocPath]
+[PropertyDef::X-DocPath]
 Type=TQString
 
 [PropertyDef::X-TDE-SubstituteUID]
diff --git a/tdeio/tdeio/kprotocolinfo.h b/tdeio/tdeio/kprotocolinfo.h
index 592978e..3cf142b 100644
--- a/tdeio/tdeio/kprotocolinfo.h
+++ b/tdeio/tdeio/kprotocolinfo.h
@@ -498,7 +498,7 @@
   /**
    * Returns the documentation path for the specified protocol.
    *
-   * This corresponds to the "DocPath=" field in the protocol description file.
+   * This corresponds to the "X-DocPath=" field in the protocol description file.
    *
    * @param protocol the protocol to check
    * @return the docpath of the protocol, or null if unknown
diff --git a/tdeio/tests/tdesycocatest.cpp b/tdeio/tests/tdesycocatest.cpp
index 719d90d..67b6b55 100644
--- a/tdeio/tests/tdesycocatest.cpp
+++ b/tdeio/tests/tdesycocatest.cpp
@@ -129,7 +129,7 @@
    {
      debug("Found it !");
      debug(TQString("Comment is %1").arg(se->comment()));
-     TQVariant qv = se->property("DocPath");
+     TQVariant qv = se->property("X-DocPath");
      debug(TQString("Property type is %1").arg(qv.typeName()));
      debug(TQString("Property value is %1").arg(qv.toString()));
    }
diff --git a/tdeutils/kcmultidialog.h b/tdeutils/kcmultidialog.h
index 4a90f5d..444f2f4 100644
--- a/tdeutils/kcmultidialog.h
+++ b/tdeutils/kcmultidialog.h
@@ -215,7 +215,7 @@
 
     /**
      * This slot is called when the user presses the "Help" Button.
-     * It reads the DocPath field of the currently selected KControl
+     * It reads the X-DocPath field of the currently selected KControl
      * module's .desktop file to find the path to the documentation,
      * which it then attempts to load.
      * 
diff --git a/tdeutils/tdecmoduleinfo.cpp b/tdeutils/tdecmoduleinfo.cpp
index 4869bb1..0b0f7f4 100644
--- a/tdeutils/tdecmoduleinfo.cpp
+++ b/tdeutils/tdecmoduleinfo.cpp
@@ -173,7 +173,7 @@
   setIsHiddenByDefault( tmp.isValid() ? tmp.toBool() : false );
 
   // get the documentation path
-  setDocPath( _service->property( "DocPath", TQVariant::String ).toString() );
+  setDocPath( _service->property( "X-DocPath", TQVariant::String ).toString() );
 
   tmp = _service->property( "X-TDE-Test-Module", TQVariant::Bool );
   setNeedsTest( tmp.isValid() ? tmp.asBool() : false );