Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Doc] Update documentation #473

Open
wants to merge 49 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
6028ae1
[QDoc] Switch breadcrumb index from Wiki to Pages
Jul 26, 2023
82e0638
[Doc] Begin documenting Patch Metadata properties
Jul 25, 2023
316ab7b
[Doc] Improve QML Plugin documentation
Jul 25, 2023
bee700a
[Doc] Expand Documentation to Dev and User documentation
Jul 25, 2023
ff0ddde
[QDoc] update CSS
Jul 25, 2023
807a525
[QDoc] fix up some of the configs
Jul 26, 2023
42fc1a2
[QDoc] Remove overview specification
Jul 26, 2023
2237779
[Doc] Add externalpages, rework User Docs
Jul 26, 2023
51afea7
[Doc] Daemon: improve docs
Jul 26, 2023
451e1cc
[QDoc] Fix double-index problem
Jul 26, 2023
1922100
[Doc] Daemon: improve Journal documentation
Jul 26, 2023
b7339c1
[Doc] Reference dev patch install docs from user docs
Jul 26, 2023
2083e60
[Doc] Daemon: improve InotifyWatcher docs
Jul 26, 2023
4505771
Test: add large padding to html body
Jul 26, 2023
d8d398d
[QDoc] fix linking and autolinking errors
Aug 2, 2023
618623b
[Doc] Update Web Catalog information...
Aug 2, 2023
1214446
[QDoc] add dependency information...
Aug 2, 2023
32361d2
[Doc] Improve daemon and config docs
Aug 2, 2023
81f9030
[QDoc] Fix Home page link
Aug 2, 2023
b32d8f2
[Doc] Overhaul Index page
Aug 2, 2023
acb2862
[QDoc] Show things marked as internal as well
Aug 2, 2023
697f9a1
[Doc] improve linking
Aug 2, 2023
36be71f
Mark Interal
Aug 5, 2023
9ca3a36
[Doc] Index: Better wording for failure state
Aug 14, 2023
56079a3
[Doc] Index: Better wording for service documentation
Aug 14, 2023
5533cc7
Merge branch 'master' into more-docs
Aug 15, 2023
9a6a57b
Merge branch 'master' into more-docs
Aug 16, 2023
fc2e90e
[Doc] document purpose of the dbus env file
Aug 16, 2023
e0de637
[Doc] document Dialog environment config
Aug 16, 2023
3b88f0b
[Doc] QML Plugin: fix link display
Aug 16, 2023
82b0f72
[Doc] QML Plugin: Fix link display for Silica things
Aug 16, 2023
53d3eea
[Doc] Update overview pages for config files
Aug 16, 2023
c5a0485
[Doc] Clarify relation between Settings and QML plugins
Aug 16, 2023
895821b
Merge branch 'master' into more-docs
Aug 17, 2023
abfac14
[Doc] QML Plugin: update details property docs
Aug 17, 2023
e55e1c8
fixup! Merge branch 'more-docs' into srcgraph
Aug 17, 2023
2bbc22a
[QDoc] align dependencies with .pro file QT vars
Aug 17, 2023
5d3d224
Merge branch 'master' into more-docs
Nov 26, 2024
1bfa230
Doc tools: Add note about missing configuration macro
Nov 26, 2024
18ea080
Merge branch 'master' into more-docs
Nov 27, 2024
1392094
Merge branch 'master' into more-docs
Nov 27, 2024
27275ed
Fix title, it gave a link error
Nov 27, 2024
4cb0ce6
[Doc] Various improvements to the main pages
Nov 28, 2024
0104ea9
[QDoc Style] Use a Patchmanager CI Palette for the CSS
Nov 29, 2024
c853525
[QDoc Style] Use the CSS in html generation
Nov 29, 2024
42281e7
[QDoc Style] Use lighter main background
Nov 29, 2024
f7b1a56
[QDoc Style] Override some margins
Nov 29, 2024
e5283a5
[QDoc Style] Lighter odd/even backgrounds
Nov 29, 2024
c6722d3
fixup! [Doc] document Preload library
Nov 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions doc/qdoc/common.qdocconf
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,23 @@ codesuffix = "\n"

# override/add some things to the stylesheets:
HTML.stylesheets += ./pm.css
# the above does not acutally add the stylesheet to the html file, so do it
# manually here. Include the default first.
HTML.headerstyles = \
" <link rel=\"stylesheet\" type=\"text/css\" href=\"style/offline.css\" />\n" \
" <link rel=\"stylesheet\" type=\"text/css\" href=\"style/pm.css\" />\n"

# assign custom HTML footer to replace Qt's default copyright notice
HTML.footer = "<div align='center'><hr/>" \
"<p><small>Patchmanager Documentation\n" \
"Copyright (c) 2023 Patchmanager for SailfishOS contributors.\n" \
"Copyright (c) 2023,2024 Patchmanager for SailfishOS contributors.\n" \
"This document may be used under the terms of the " \
"<a href='https://spdx.org/licenses/CC-BY-SA-4.0.html'>" \
"Creative Commons Attribution Share Alike 4.0 International</a> " \
"License.</small></p>" \
"<p/></div>"

navigation.homepage = https://github.com/sailfishos-patches/patchmanager/wiki
navigation.homepage = Documentation Home
navigation.hometitle = Patchmanager
navigation.landingpage = Patchmanager Documentation

4 changes: 3 additions & 1 deletion doc/qdoc/daemon.qdocconf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ versionsym =
version = 2.0
url = https://github.com/sailfishos-patches/patchmanager

include (common.qdocconf)
include(common.qdocconf)
depends += qtcore qtdbus qtnetwork
depends += patchmanager qml-plugin

headerdirs += ../../src/bin/patchmanager-daemon
headers.fileextensions = "*.h *.hpp"
Expand Down
5 changes: 4 additions & 1 deletion doc/qdoc/dialog.qdocconf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ versionsym =
version = 2.0
url = https://github.com/sailfishos-patches/patchmanager

include (common.qdocconf)
include(common.qdocconf)

depends += qtdbus qtnetwork
depends += patchmanager daemon qml-plugin

sourcedirs = ../../src/bin/dialog

16 changes: 12 additions & 4 deletions doc/qdoc/general.qdocconf
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
project = patchmanager
description = Patchmanager

include (common.qdocconf)
include(common.qdocconf)

depends += daemon qml-plugin settings-plugin preload dialog

## Sources
sources += ../../src/index.qdoc
# for quoting
exampledirs += ../../src/bin/patchmanager-daemon
sources += ../../src/index.qdoc \
../../src/patchdev.qdoc \
../../src/user.qdoc \
../../src/externalpages.qdoc
# for quoting. WARNING: Setting this wrong, e.g. to
# ../../src/bin/patchmanager-daemon will cause qdoc to create double index.html
# files at the wrong place.
# So, only give paths where the actual files reside:
exampledirs += ../../src/bin/patchmanager-daemon/dbus

4 changes: 3 additions & 1 deletion doc/qdoc/plugin.qdocconf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ versionsym =
version = 2.0
url = https://github.com/sailfishos-patches/patchmanager

include (common.qdocconf)
include(common.qdocconf)

depends += qml-plugin

sourcedirs = ../../src/plugin

Expand Down
85 changes: 81 additions & 4 deletions doc/qdoc/pm.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,82 @@
a:link { color: #8C001A; text-decoration: none; text-align: left; }
:root {
/* define our own custom color palette. Colors generated by some online
* tool using the Patchmanager icon.

"Pflaster" means band-aid in German.
*/
--black: #000000ff;
--pm-pflaster-light: #efd1b3ff;
--pm-pflaster-medium-1: #dda267ff;
--pm-pflaster-medium-2: #dda267ff;
--pm-pflaster-darker: #ad7e52ff;
--pm-pflaster-dark: #584029ff;
--pm-red: #EF1C10ff;
--pm-green: #66BC52ff;
--pm-gray-lightest: ##f1f3f2ff;
--pm-gray-light-1: #d6dcd7ff;
--pm-gray-light-2: #b8c9c5ff;
--pm-gray-medium-1: #96a9a1ff;
--pm-gray-medium-2: #71928aff;
--pm-gray-dark: #2d3a37ff;

color: var(--pm-pflaster-dark);
background-color: var(--pm-gray-lightest);
}
html {
color: var(--pm-pflaster-dark);
background-color: var(--pm-gray-lightest);
}

body {
margin-left: 3vw; margin-right: 3vw;
font-family: "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}
code {
font-family: SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
font-weight: medium;
}
a.qa-mark:target:before { content: "***"; color: #ff0000; }
a:hover { color: #8C0060; text-align: left; }
a:visited { color: #8C001A; text-align: left; }
a:visited:hover { color: #8C0060; text-align: left; }
a:link { color: var(--pm-pflaster-darker); text-decoration: none; text-align: left; }
a:active { color: var(--pm-red); text-align: left; }
a:active:hover { text-decoration: underline; }

.content a:visited { color: var(--pm-green); text-align: left; }
.content a:visited:hover { text-decoration: underline; }
span.type a:visited { text-decoration: underline; }

.red { color: var(--pm-red); }

/*
a:visited { color: var(--pm-pflaster-dark); text-align: left; }
a:active { color: var(--pm-green); text-align: left; }

*/

.header .breadcrumb { background-color: var(--pm-gray-light-2); }

.generic .odd .alphaChar{ background-color: var(--pm-gray-light-2); }
.generic .even .alphaChar{ background-color: var(--pm-gray-light-1); }

table tr.odd { background-color: var(--pm-gray-light-2); }
table tr.even { background-color: var(--pm-gray-light-1); }

table, pre {
background-color: var(--pm-gray-light-1);
color: var(--pm-gray-dark);
}

hr { background-color: var(--pm-gray-medium-1);
border: 1px solid var(--pm-pflaster-dark);
}
th {
background-color: var(--pm-gray-medium-2);
border-left: 1px solid var(--pm-gray-dark);
}

/* Margins, padding etc */
.content ul li { padding-left: 0.5em }
.content ul { padding-left: 2.0em; }
.content h2 {
margin-top: 1.5em;
margin-bottom: 0.5em;
}
5 changes: 3 additions & 2 deletions doc/qdoc/qmlplugin.qdocconf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ url = https://github.com/sailfishos-patches/patchmanager

include(common.qdocconf)

depends += qtcore qtqml
depends += qtcore qtqml qtnetwork qtdbus qtgui
depends += patchmanager daemon

headerdirs = ../../src/qml
#headers.fileextensions = "*.h *.hpp"
Expand All @@ -15,5 +16,5 @@ sourcedirs = ../../src/qml
sources += qmlplugin.qdoc
#sources.fileextensions = "*.cpp *.qdoc *.qml"

# get rid of warnings about undoicumented stuff in patchmanager.h
# try to get rid of warnings about undocumented stuff in patchmanager.h
Cpp.ignoretokens += Q_PROPERTY
6 changes: 5 additions & 1 deletion makedocs
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,16 @@ if [ -z "$QT_INSTALL_DOCS" ]; then
QT_INSTALL_DOCS=/usr/share/doc/qt5
elif [ -f /usr/share/qt5/doc/global/macros.qdocconf ]; then
QT_INSTALL_DOCS=/usr/share/qt5/doc
else
printf '## ERROR: global macro config does not exist.\n'
printf "## You probably need to install \'qt5-tools\''\n"
exit 1
fi
fi

printf '## Generating Docs...\n'
[ -d $OUT ] && rm -r $OUT
qdoc --no-examples --outputdir $OUT --outputformat HTML --installdir $QMAKE_INSTALL_ROOT/doc doc/qdoc/master.qdocconf --single-exec $@
qdoc --no-examples --showinternal --outputdir $OUT --outputformat HTML --installdir $QMAKE_INSTALL_ROOT/doc doc/qdoc/master.qdocconf --single-exec $@
printf '## End of Doc generation at "%s"\n' "$OUT"

[ $switched_dirs = "true" ] && popd >/dev/null || cd -
Expand Down
2 changes: 1 addition & 1 deletion src/bin/dialog/dialog.qdoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
\title Patchmanager Documentation: Startup Dialog
\page index.html overview
\page index.html
\indexpage Patchmanager Documentation

This is a very simple Sailfish OS application that upon start checks the state of the Patchmanager Daemon to see whether it needs to launch a GUI.
Expand Down
2 changes: 1 addition & 1 deletion src/bin/patchmanager-daemon/daemon.qdoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
A D-Bus activated background service which manages patch un/installation,
listing, de/actvation, and communication with the preload library.

Patchmanager is usually launched by its DBus service.
Patchmanager is usually launched by its D-Bus service.

If the \c patchmanager binary is called from command line, it
can also serve as a simple CLI to a running daemon.
Expand Down
7 changes: 4 additions & 3 deletions src/bin/patchmanager-daemon/inotifywatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,15 @@ INotifyWatcher::INotifyWatcher(QObject *parent)
\inmodule PatchManagerDaemon
\inherits QSocketNotifier
\brief watches a list of files or directories for changes
\internal
*/
/*! \fn void INotifyWatcher::directoryChanged(const QString &path, bool removed);
\fn void INotifyWatcher::fileChanged(const QString &path, bool removed);
This signal is emitted when a file or directory has changed.
Parameters are the \a path and whether it was \a removed.
*/
/*! \fn void INotifyWatcher::contentChanged(const QString &path, bool created);
This signal is emitted when directory content has changed
This signal is emitted when directory content has changed.
Parameters are the \a path and whether something was \a created.
*/
INotifyWatcher::~INotifyWatcher()
Expand All @@ -92,7 +93,7 @@ INotifyWatcher::~INotifyWatcher()
::close(inotifyFd);
}

/*! Add \a paths to the list of paths to be watched. */
/*! This function adds \a paths to the list of paths to be watched and returns the new list. */
QStringList INotifyWatcher::addPaths(const QStringList &paths)
{
QStringList p = paths;
Expand Down Expand Up @@ -142,7 +143,7 @@ QStringList INotifyWatcher::addPaths(const QStringList &paths)
return p;
}

/*! Removes \a paths from the list of paths to be watched. */
/*! This function removes \a paths from the list of paths to be watched and returns the new path list. */
QStringList INotifyWatcher::removePaths(const QStringList &paths)
{
QStringList p = paths;
Expand Down
14 changes: 11 additions & 3 deletions src/bin/patchmanager-daemon/journal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,17 @@

/*! \class Journal
\inmodule PatchManagerDaemon
\brief Interface to the systemd Journal.
\internal

Listens on the systemd Journal for certain messages.

This is done to be able to detect when Lipstick throws an error on start,
and a file from a patch caused an error.

*/
/*! \fn Journal::matchFound()
Emitted when the fileters found a log entry that matched.
Emitted when the filters found a log entry that matched.
*/
Journal::Journal(QObject *parent)
: QObject(parent)
Expand Down Expand Up @@ -45,7 +53,7 @@ void Journal::wait()
thread->start();
}

/*! Attaches itself to the Journal, filetering for \e Lipstick and \e jolla-settings executables. */
/*! Attaches itself to the Journal, filtering for \e Lipstick and \e jolla-settings executables. */
void Journal::init()
{
qDebug() << Q_FUNC_INFO;
Expand All @@ -67,7 +75,7 @@ void Journal::init()
wait();
}

/*! Read the message from the Journal, look got certain strings, and emit the matchFound signal if found.
/*! Read the messages, look for certain strings, and emit the matchFound signal if found.

Strings looked for are:

Expand Down
Loading