[umbrello/Applications/16.12] /: Move welcome page to separate sub directory 'apphelp'.
Ralf Habacker
ralf.habacker at freenet.de
Sat Nov 26 22:13:23 UTC 2016
Git commit 052e0223d7501e25fe09f3721ed28583e23b4087 by Ralf Habacker.
Committed on 26/11/2016 at 22:05.
Pushed by habacker into branch 'Applications/16.12'.
Move welcome page to separate sub directory 'apphelp'.
M +1 -11 doc/CMakeLists.txt
A +14 -0 doc/apphelp/CMakeLists.txt
R +0 -0 doc/apphelp/welcome.docbook [from: doc/welcome.docbook - 100% similarity]
M +8 -8 umbrello/umlappprivate.cpp
https://commits.kde.org/umbrello/052e0223d7501e25fe09f3721ed28583e23b4087
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index d20d0e7..2c8208c 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -79,18 +79,8 @@ 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
new file mode 100644
index 0000000..6805e89
--- /dev/null
+++ b/doc/apphelp/CMakeLists.txt
@@ -0,0 +1,14 @@
+########### 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/welcome.docbook b/doc/apphelp/welcome.docbook
similarity index 100%
rename from doc/welcome.docbook
rename to doc/apphelp/welcome.docbook
diff --git a/umbrello/umlappprivate.cpp b/umbrello/umlappprivate.cpp
index cf8a9b5..52eb548 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"));
+ dirList.append(QCoreApplication::applicationDirPath() + QLatin1String("/../doc/apphelp"));
// 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")).arg(lang));
+ dirList.append(QCoreApplication::applicationDirPath() + QString(QLatin1String("/../share/doc/HTML/%1/umbrello/apphelp")).arg(lang));
}
- dirList.append(QCoreApplication::applicationDirPath() + QLatin1String("/../share/doc/HTML/en/umbrello"));
+ dirList.append(QCoreApplication::applicationDirPath() + QLatin1String("/../share/doc/HTML/en/umbrello/apphelp"));
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")).arg(location).arg(lang));
+ dirList.append(QString(QLatin1String("%1/doc/HTML/%2/umbrello/apphelp")).arg(location).arg(lang));
}
- dirList.append(QString(QLatin1String("%1/doc/HTML/en/umbrello")).arg(location));
+ dirList.append(QString(QLatin1String("%1/doc/HTML/en/umbrello/apphelp")).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")).arg(lang));
- dirList.append(QCoreApplication::applicationDirPath() + QLatin1String("/../share/doc/HTML/en/umbrello"));
+ 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"));
// /usr/share/doc/kde
- dirList.append(KStandardDirs::installPath("html") + lang + QLatin1String("/umbrello"));
+ dirList.append(KStandardDirs::installPath("html") + lang + QLatin1String("/umbrello/apphelp"));
#endif
foreach(const QString &dir, dirList) {
QString filePath = dir + QLatin1String("/welcome.html");
More information about the kde-doc-english
mailing list