mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-06 08:44:34 +01:00
Remove the completion performance tweak as we no longer use is
This commit is contained in:
parent
a0256f9705
commit
177e20f3d4
2 changed files with 1 additions and 11 deletions
|
|
@ -98,15 +98,6 @@
|
|||
# categories_use_field_for_author_name = 'author_sort'
|
||||
categories_use_field_for_author_name = 'author'
|
||||
|
||||
#: Completion sort order: choose when to change from lexicographic to ASCII-like
|
||||
# Calibre normally uses locale-dependent lexicographic ordering when showing
|
||||
# completion values. This means that the sort order is correct for the user's
|
||||
# language. However, this can be slow. Performance is improved by switching to
|
||||
# ascii ordering. This tweak controls when that switch happens. Set it to zero
|
||||
# to always use ascii ordering. Set it to something larger than zero to switch
|
||||
# to ascii ordering for performance reasons.
|
||||
completion_change_to_ascii_sorting = 2500
|
||||
|
||||
#: Control partitioning of Tag Browser
|
||||
# When partitioning the tags browser, the format of the subcategory label is
|
||||
# controlled by a template: categories_collapsed_name_template if sorting by
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@
|
|||
from calibre.utils.icu import sort_key
|
||||
from calibre.gui2 import NONE
|
||||
from calibre.gui2.widgets import EnComboBox, LineEditECM
|
||||
from calibre.utils.config_base import tweaks
|
||||
|
||||
class CompleteModel(QAbstractListModel):
|
||||
|
||||
|
|
@ -27,7 +26,7 @@ def __init__(self, parent=None):
|
|||
|
||||
def set_items(self, items):
|
||||
items = [unicode(x.strip()) for x in items]
|
||||
if len(items) < tweaks['completion_change_to_ascii_sorting']:
|
||||
if len(items) < 2500:
|
||||
self.items = sorted(items, key=sort_key)
|
||||
self.sorting = QCompleter.UnsortedModel
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in a new issue