Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
Itinerary
Commits
7ac2fc22
Commit
7ac2fc22
authored
May 06, 2021
by
Volker Krause
Browse files
Allow to explicitly trigger a segfault in the dev mode page
Useful for testing crash handling.
parent
693c9b41
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/app/DevelopmentModePage.qml
View file @
7ac2fc22
...
...
@@ -55,5 +55,11 @@ Kirigami.ScrollablePage {
Layout.fillWidth
:
true
onClicked
:
DevelopmentModeController
.
enablePublicTransportLogging
();
}
QQC2.Button
{
text
:
"
Crash
"
Layout.fillWidth
:
true
onClicked
:
DevelopmentModeController
.
crash
();
}
}
}
src/app/developmentmodecontroller.cpp
View file @
7ac2fc22
...
...
@@ -23,6 +23,8 @@ using namespace KAndroidExtras;
#include <QtAndroid>
#endif
#include <csignal>
void
DevelopmentModeController
::
enablePublicTransportLogging
()
{
#ifdef Q_OS_ANDROID
...
...
@@ -84,3 +86,8 @@ void DevelopmentModeController::clearOsmTileCache()
}
QDir
(
base
+
QLatin1String
(
"/17"
)).
removeRecursively
();
}
void
DevelopmentModeController
::
crash
()
{
std
::
raise
(
SIGSEGV
);
}
src/app/developmentmodecontroller.h
View file @
7ac2fc22
...
...
@@ -19,6 +19,7 @@ public:
Q_INVOKABLE
void
importMapCSS
(
const
QUrl
&
url
);
Q_INVOKABLE
void
purgeMapCSS
();
Q_INVOKABLE
void
clearOsmTileCache
();
Q_INVOKABLE
void
crash
();
};
Q_DECLARE_METATYPE
(
DevelopmentModeController
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment