mirror of
https://git.outfoxxed.me/quickshell/quickshell.git
synced 2026-04-10 06:11:54 +10:00
core: add disable env vars for file watcher and crash handler
This commit is contained in:
parent
178c04b59c
commit
e32b909354
3 changed files with 9 additions and 3 deletions
|
|
@ -34,6 +34,8 @@ set shell id.
|
|||
- PwNodeLinkTracker ignores sound level monitoring programs.
|
||||
- Replaced breakpad with cpptrace.
|
||||
- Reloads are prevented if no file content has changed.
|
||||
- Added `QS_DISABLE_FILE_WATCHER` environment variable to disable file watching.
|
||||
- Added `QS_DISABLE_CRASH_HANDLER` environment variable to disable crash handling.
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,9 @@ void QuickshellSettings::setWorkingDirectory(QString workingDirectory) { // NOLI
|
|||
emit this->workingDirectoryChanged();
|
||||
}
|
||||
|
||||
bool QuickshellSettings::watchFiles() const { return this->mWatchFiles; }
|
||||
bool QuickshellSettings::watchFiles() const {
|
||||
return this->mWatchFiles && qEnvironmentVariableIsEmpty("QS_DISABLE_FILE_WATCHER");
|
||||
}
|
||||
|
||||
void QuickshellSettings::setWatchFiles(bool watchFiles) {
|
||||
if (watchFiles == this->mWatchFiles) return;
|
||||
|
|
|
|||
|
|
@ -138,9 +138,11 @@ int launch(const LaunchArgs& args, char** argv, QCoreApplication* coreApplicatio
|
|||
};
|
||||
|
||||
#if CRASH_HANDLER
|
||||
crash::CrashHandler::init();
|
||||
if (qEnvironmentVariableIsSet("QS_DISABLE_CRASH_HANDLER")) {
|
||||
qInfo() << "Crash handling disabled.";
|
||||
} else {
|
||||
crash::CrashHandler::init();
|
||||
|
||||
{
|
||||
auto* log = LogManager::instance();
|
||||
crash::CrashHandler::setRelaunchInfo({
|
||||
.instance = InstanceInfo::CURRENT,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue