mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Constify strings in pref.h
Make all char * pointers in pref.h const to make it clear that these strings are not mutable. This meant adding a number of (void *) casts in calls to free(). Apart from being the right thing to do, this commit makes the code more consistent, as many of the strings in pref.h were already const. While touching core/qthelper.cpp turn three instances of (void*) into (void *). Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
f8fcd65bc4
commit
6ae16b87d0
6 changed files with 59 additions and 58 deletions
|
@ -64,7 +64,7 @@ void CloudStorageAuthenticate::uploadFinished()
|
|||
csSettings.setVerificationStatus(CS_NEED_TO_VERIFY);
|
||||
report_error(qPrintable(tr("Cloud account verification required, enter PIN in preferences")));
|
||||
} else if (cloudAuthReply == QLatin1String("[PASSWDCHANGED]")) {
|
||||
free(prefs.cloud_storage_password);
|
||||
free((void *)prefs.cloud_storage_password);
|
||||
prefs.cloud_storage_password = prefs.cloud_storage_newpassword;
|
||||
prefs.cloud_storage_newpassword = NULL;
|
||||
emit passwordChangeSuccessful();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue