mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
QgsSettings: removed lower(), now it's case sensistive
This commit is contained in:
parent
9bb7681b86
commit
99f859e2ac
@ -21,8 +21,6 @@
|
||||
* - the second one (Global Settings) is meant to provide read-only
|
||||
* pre-configuration and defaults to the first one.
|
||||
*
|
||||
* Unlike the original QSettings, the keys of QgsSettings are case insensitive.
|
||||
*
|
||||
* For a given settings key, the function call to value(key, default) will return
|
||||
* the first existing setting in the order specified below:
|
||||
* - User Settings
|
||||
@ -155,7 +153,6 @@ typedef PyObject *(*pyqt5_from_qvariant_by_type)(QVariant &value, PyObject *type
|
||||
void setArrayIndex( int i );
|
||||
//! Sets the value of setting key to value. If the key already exists, the previous value is overwritten.
|
||||
//! An optional Section argument can be used to set a value to a specific Section.
|
||||
//! @note keys are case insensitive
|
||||
void setValue(const QString &key, const QVariant &value, const QgsSettings::Section section = QgsSettings::Section::NoSection );
|
||||
/** Returns the value for setting key. If the setting doesn't exist, it will be
|
||||
* searched in the Global Settings and if not found, returns defaultValue.
|
||||
|
@ -256,7 +256,7 @@ void QgsSettings::setValue( const QString &key, const QVariant &value, const Qgs
|
||||
// To lower case and clean the path
|
||||
QString QgsSettings::sanitizeKey( QString key ) const
|
||||
{
|
||||
return QDir::cleanPath( key.toLower() );
|
||||
return QDir::cleanPath( key );
|
||||
}
|
||||
|
||||
void QgsSettings::clear()
|
||||
|
@ -28,8 +28,6 @@
|
||||
* - the second one (Global Settings) is meant to provide read-only
|
||||
* pre-configuration and defaults to the first one.
|
||||
*
|
||||
* Unlike the original QSettings, the keys of QgsSettings are case insensitive.
|
||||
*
|
||||
* For a given settings key, the function call to value(key, default) will return
|
||||
* the first existing setting in the order specified below:
|
||||
* - User Settings
|
||||
@ -158,7 +156,6 @@ class CORE_EXPORT QgsSettings : public QObject
|
||||
void setArrayIndex( int i );
|
||||
//! Sets the value of setting key to value. If the key already exists, the previous value is overwritten.
|
||||
//! An optional Section argument can be used to set a value to a specific Section.
|
||||
//! @note keys are case insensitive
|
||||
void setValue( const QString &key, const QVariant &value, const Section section = Section::NoSection );
|
||||
|
||||
/** Returns the value for setting key. If the setting doesn't exist, it will be
|
||||
|
@ -219,9 +219,9 @@ class TestQgsSettings(unittest.TestCase):
|
||||
|
||||
def test_remove(self):
|
||||
self.settings.setValue('testQgisSettings/temp', True)
|
||||
self.assertEqual(self.settings.value('testqgissettings/temp'), True)
|
||||
self.assertEqual(self.settings.value('testQgisSettings/temp'), True)
|
||||
self.settings.remove('testQgisSettings/temp')
|
||||
self.assertEqual(self.settings.value('testqgissettings/temp'), None)
|
||||
self.assertEqual(self.settings.value('testqQgisSettings/temp'), None)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
Loading…
x
Reference in New Issue
Block a user