fixed empty texts

This commit is contained in:
Andreas Preikschat 2011-04-04 18:15:38 +02:00
parent 84605fb430
commit 4a6be382ff
2 changed files with 5 additions and 3 deletions

View File

@ -133,7 +133,8 @@ class SearchEdit(QtGui.QLineEdit):
menu = QtGui.QMenu(self) menu = QtGui.QMenu(self)
first = None first = None
for identifier, icon, title in items: for identifier, icon, title in items:
action = icon_action(menu, title, icon) action = icon_action(menu, u'', icon)
action.setText(title)
action.setData(QtCore.QVariant(identifier)) action.setData(QtCore.QVariant(identifier))
menu.addAction(action) menu.addAction(action)
QtCore.QObject.connect(action, QtCore.SIGNAL(u'triggered(bool)'), QtCore.QObject.connect(action, QtCore.SIGNAL(u'triggered(bool)'),

View File

@ -972,8 +972,9 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
self.FileMenu.addSeparator() self.FileMenu.addSeparator()
for fileId, filename in enumerate(recentFilesToDisplay): for fileId, filename in enumerate(recentFilesToDisplay):
log.debug('Recent file name: %s', filename) log.debug('Recent file name: %s', filename)
action = base_action(self, u'&%d %s' % (fileId + 1, action = base_action(self, u'')
QtCore.QFileInfo(filename).fileName())) action.setText(u'&%d %s' %
(fileId + 1, QtCore.QFileInfo(filename).fileName()))
action.setData(QtCore.QVariant(filename)) action.setData(QtCore.QVariant(filename))
self.connect(action, QtCore.SIGNAL(u'triggered()'), self.connect(action, QtCore.SIGNAL(u'triggered()'),
self.ServiceManagerContents.onRecentServiceClicked) self.ServiceManagerContents.onRecentServiceClicked)