Commit 1b8baf0a authored by Steve Borho's avatar Steve Borho
Browse files

repofilter: give QCompleter a parent widget

This was why the revset and goto toolbars always caused warnings about
QObject::startTimer: QTimer can only be used with threads started with QThread

After this changeset and the previous, no such warnings occur any more
parent 76b4ac497077
...@@ -50,7 +50,7 @@ class RepoFilterBar(QToolBar): ...@@ -50,7 +50,7 @@ class RepoFilterBar(QToolBar):
self.entrydlg.restoreGeometry(s.value('revset/geom').toByteArray()) self.entrydlg.restoreGeometry(s.value('revset/geom').toByteArray())
self.revsethist = list(s.value('revset-queries').toStringList()) self.revsethist = list(s.value('revset-queries').toStringList())
self.revsetle = le = QLineEdit() self.revsetle = le = QLineEdit()
le.setCompleter(QCompleter(self.revsethist)) le.setCompleter(QCompleter(self.revsethist, self))
le.returnPressed.connect(self.returnPressed) le.returnPressed.connect(self.returnPressed)
if hasattr(self.revsetle, 'setPlaceholderText'): # Qt >= 4.7 if hasattr(self.revsetle, 'setPlaceholderText'): # Qt >= 4.7
self.revsetle.setPlaceholderText('### revision set query ###') self.revsetle.setPlaceholderText('### revision set query ###')
...@@ -100,7 +100,7 @@ class RepoFilterBar(QToolBar): ...@@ -100,7 +100,7 @@ class RepoFilterBar(QToolBar):
if query in self.revsethist: if query in self.revsethist:
self.revsethist.remove(query) self.revsethist.remove(query)
self.revsethist.insert(0, query) self.revsethist.insert(0, query)
self.revsetle.setCompleter(QCompleter(self.revsethist)) self.revsetle.setCompleter(QCompleter(self.revsethist, self))
self.store.setEnabled(False) self.store.setEnabled(False)
self.showMessage.emit(_('Revision set query saved')) self.showMessage.emit(_('Revision set query saved'))
......
Markdown is supported
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