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

Improve error message when storage does not exist #1152

Merged
merged 1 commit into from Nov 11, 2019

Conversation

brainplot
Copy link
Contributor

When the user modifies the docsets directory from the settings page, the docsets page shows Docset storage is read-only when the actual source of the error is that the directory does not exist on the file system. This PR fixes that by making the label show the correct error message based on the actual error.

ui->readOnlyLabel->setVisible(m_isStorageReadOnly);
ui->storageStatusLabel->setVisible(m_isStorageReadOnly);
ui->storageStatusLabel->setText(fi.exists() ?
QStringLiteral("<b>Docset storage is read only.</b>") :
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, user visible strings should be wrapped into tr(), so they would be translatable.

@trollixx trollixx merged commit 5b809d8 into zealdocs:master Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants