-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/123341/
-----------------------------------------------------------

(Updated April 19, 2015, 7:46 p.m.)


Review request for KDE Frameworks and Martin Tobias Holmedahl Sandsmark.


Changes
-------

Added unit tests:
  -Check that there are no unneeded writes to the settings. (Does not work on 
Windows, but does not fail)
  -Check that the settings changes are written to QSettings imediately from 
Speller functions.


Repository: sonnet


Description
-------

The curent implementation can causes ~25 cals to Settings::save() for every 
created Speller instance. 

The Settings::restore() function ends with setQuietIgnoreList(...) which would 
call save() for evey ignore-word.

This patch removes the save() cals in the setFoo() functions of Settings and 
replace it by a boolean that indicates if the settign is changed or not. Then 
in the Speller class save() is called when needed.

The reason for this patch is that it took Kate ~2 minutes to open a kate 
session with ~340 files. The implementation in Kate called reload() for every 
file. There is a RR for Kate to remove that unneeded reload.

This patch also prepares Sonnet::Settings for being used in the public API to 
set aplication specific Sonnet settings without saving them in the global 
settings.

The Settings class is exported but the header is private. This change is BIC, 
but since the class is private, my interpretation is that it should not mater.

If accepted I will also add a Review Request to make the Settings class public 
to enable application specific settings.


Diffs (updated)
-----

  autotests/CMakeLists.txt 8ade413 
  src/core/settings.cpp b5c4198 
  src/core/settings_p.h 0d48889 
  src/core/speller.cpp 3903b42 
  src/ui/configwidget.cpp 02f2a26 

Diff: https://git.reviewboard.kde.org/r/123341/diff/


Testing (updated)
-------

Tested with Kate and with the patch the startup time was back to "normal". 
Two unit tests added.


Thanks,

Kåre Särs

_______________________________________________
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel

Reply via email to