[umbrello/Applications/16.12] /: Revert "Move welcome page to separate sub directory 'apphelp'."

Luigi Toscano luigi.toscano at tiscali.it
Sat Nov 26 22:22:00 UTC 2016


Git commit 9a852e770b29e182712adfd91a3d6c97dda5d10f by Luigi Toscano.
Committed on 26/11/2016 at 22:21.
Pushed by ltoscano into branch 'Applications/16.12'.

Revert "Move welcome page to separate sub directory 'apphelp'."

This reverts commit 052e0223d7501e25fe09f3721ed28583e23b4087.

The branch is frozen.

M  +11   -1    doc/CMakeLists.txt
D  +0    -14   doc/apphelp/CMakeLists.txt
R  +0    -0    doc/welcome.docbook [from: doc/apphelp/welcome.docbook - 100% similarity]
M  +8    -8    umbrello/umlappprivate.cpp

https://commits.kde.org/umbrello/9a852e770b29e182712adfd91a3d6c97dda5d10f

diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 2c8208c..d20d0e7 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -79,8 +79,18 @@ if(BUILD_KF5)
     string(REPLACE "kdex.dtd" "kdedbx45.dtd" index_file "${index_file}")
     file(WRITE "index-kf5.docbook" "${index_file}")
     kdoctools_create_handbook(index-kf5.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR umbrello)
+
+    file(READ "welcome.docbook" index_file)
+    string(REPLACE "4.2" "4.5" index_file "${index_file}")
+    string(REPLACE "kdex.dtd" "kdedbx45.dtd" index_file "${index_file}")
+    file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/welcome.docbook "${index_file}")
+    if(WITH_WELCOME_PAGE)
+        kdoctools_create_article(${CMAKE_CURRENT_BINARY_DIR}/welcome.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR umbrello)
+    endif()
 else()
     kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR umbrello)
+    if(WITH_WELCOME_PAGE)
+        kdoctools_create_article(welcome.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR umbrello)
+    endif()
 endif()
 
-add_subdirectory(apphelp)
diff --git a/doc/apphelp/CMakeLists.txt b/doc/apphelp/CMakeLists.txt
deleted file mode 100644
index 6805e89..0000000
--- a/doc/apphelp/CMakeLists.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-########### install files ###############
-if(BUILD_KF5)
-    file(READ "welcome.docbook" index_file)
-    string(REPLACE "4.2" "4.5" index_file "${index_file}")
-    string(REPLACE "kdex.dtd" "kdedbx45.dtd" index_file "${index_file}")
-    file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/welcome.docbook "${index_file}")
-    if(WITH_WELCOME_PAGE)
-        kdoctools_create_article(${CMAKE_CURRENT_BINARY_DIR}/welcome.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR umbrello/apphelp)
-    endif()
-else()
-    if(WITH_WELCOME_PAGE)
-        kdoctools_create_article(welcome.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR umbrello/apphelp)
-    endif()
-endif()
diff --git a/doc/apphelp/welcome.docbook b/doc/welcome.docbook
similarity index 100%
rename from doc/apphelp/welcome.docbook
rename to doc/welcome.docbook
diff --git a/umbrello/umlappprivate.cpp b/umbrello/umlappprivate.cpp
index 52eb548..cf8a9b5 100644
--- a/umbrello/umlappprivate.cpp
+++ b/umbrello/umlappprivate.cpp
@@ -21,7 +21,7 @@ QString UMLAppPrivate::findWelcomeFile()
 {
     QStringList dirList;
     // from build dir
-    dirList.append(QCoreApplication::applicationDirPath() + QLatin1String("/../doc/apphelp"));
+    dirList.append(QCoreApplication::applicationDirPath() + QLatin1String("/../doc"));
 
     // determine path from installation
 #if QT_VERSION > 0x050000
@@ -34,27 +34,27 @@ QString UMLAppPrivate::findWelcomeFile()
 
     // from custom install
     foreach(const QString &lang, langList) {
-        dirList.append(QCoreApplication::applicationDirPath() + QString(QLatin1String("/../share/doc/HTML/%1/umbrello/apphelp")).arg(lang));
+        dirList.append(QCoreApplication::applicationDirPath() + QString(QLatin1String("/../share/doc/HTML/%1/umbrello")).arg(lang));
     }
-    dirList.append(QCoreApplication::applicationDirPath() + QLatin1String("/../share/doc/HTML/en/umbrello/apphelp"));
+    dirList.append(QCoreApplication::applicationDirPath() + QLatin1String("/../share/doc/HTML/en/umbrello"));
 
     QStringList locations = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation);
     // from real installation
     foreach(const QString &location, locations) {
         foreach(const QString &lang, langList) {
-            dirList.append(QString(QLatin1String("%1/doc/HTML/%2/umbrello/apphelp")).arg(location).arg(lang));
+            dirList.append(QString(QLatin1String("%1/doc/HTML/%2/umbrello")).arg(location).arg(lang));
         }
-        dirList.append(QString(QLatin1String("%1/doc/HTML/en/umbrello/apphelp")).arg(location));
+        dirList.append(QString(QLatin1String("%1/doc/HTML/en/umbrello")).arg(location));
     }
 #else
     KLocale *local = KGlobal::locale();
     QString lang = local->language();
     // from custom install
-    dirList.append(QCoreApplication::applicationDirPath() + QString(QLatin1String("/../share/doc/HTML/%1/umbrello/apphelp")).arg(lang));
-    dirList.append(QCoreApplication::applicationDirPath() + QLatin1String("/../share/doc/HTML/en/umbrello/apphelp"));
+    dirList.append(QCoreApplication::applicationDirPath() + QString(QLatin1String("/../share/doc/HTML/%1/umbrello")).arg(lang));
+    dirList.append(QCoreApplication::applicationDirPath() + QLatin1String("/../share/doc/HTML/en/umbrello"));
 
     // /usr/share/doc/kde
-    dirList.append(KStandardDirs::installPath("html") + lang + QLatin1String("/umbrello/apphelp"));
+    dirList.append(KStandardDirs::installPath("html") + lang + QLatin1String("/umbrello"));
 #endif
     foreach(const QString &dir, dirList) {
         QString filePath = dir + QLatin1String("/welcome.html");


More information about the kde-doc-english mailing list