Skip to content
Commit 2219248d authored by Igor Kushnir's avatar Igor Kushnir
Browse files

Refactor formatterForUrl() into fileFormatter()

This refactoring is based on Daniel Mensinger's idea detailed in
!45 (comment 12455)

The added class FileFormatter gets rid of repeated parsing of formatter
and style config entries. The added interface IFileFormatter simplifies
non-source-formating code that used
ISourceFormatterController::formatterForUrl(); such code no longer
depends on ISourceFormatter.

Other improvements:
* Reduce the number of QMimeDatabase::mimeTypeForUrl() calls.
* Improve SourceFormatterController's documentation.
* Deduplicate SourceFormatterController's config-related code.
* Optimize the types of constants in Strings namespace.
* Don't waste time parsing formatter configuration if formatPolicy
  equals DocumentChangeSet::NoAutoFormat.
parent 5201edc2
Pipeline #260992 passed with stage
in 30 minutes and 48 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment