ViewManager/BookmarkedFilesDialog.py

changeset 3656
441956d8fce5
parent 3484
645c12de6b0c
child 4021
195a471c327b
diff -r ffeb85cdc72d -r 441956d8fce5 ViewManager/BookmarkedFilesDialog.py
--- a/ViewManager/BookmarkedFilesDialog.py	Sun Jun 29 14:00:30 2014 +0200
+++ b/ViewManager/BookmarkedFilesDialog.py	Sun Jun 29 20:13:56 2014 +0200
@@ -9,8 +9,9 @@
 
 from __future__ import unicode_literals
 
-from PyQt4.QtCore import QFileInfo, Qt, pyqtSlot
-from PyQt4.QtGui import QListWidgetItem, QColor, QDialog
+from PyQt5.QtCore import QFileInfo, Qt, pyqtSlot
+from PyQt5.QtGui import QColor
+from PyQt5.QtWidgets import QListWidgetItem, QDialog
 
 from E5Gui.E5Completers import E5FileCompleter
 from E5Gui import E5FileDialog
@@ -43,7 +44,7 @@
         for bookmark in self.bookmarks:
             itm = QListWidgetItem(bookmark, self.filesList)
             if not QFileInfo(bookmark).exists():
-                itm.setBackgroundColor(QColor(Qt.red))
+                itm.setBackground(QColor(Qt.red))
             
         if len(self.bookmarks):
             self.filesList.setCurrentRow(0)
@@ -91,7 +92,7 @@
             bookmark = Utilities.toNativeSeparators(bookmark)
             itm = QListWidgetItem(bookmark, self.filesList)
             if not QFileInfo(bookmark).exists():
-                itm.setBackgroundColor(QColor(Qt.red))
+                itm.setBackground(QColor(Qt.red))
             self.fileEdit.clear()
             self.bookmarks.append(bookmark)
         row = self.filesList.currentRow()
@@ -109,9 +110,9 @@
         itm = self.filesList.item(row)
         itm.setText(bookmark)
         if not QFileInfo(bookmark).exists():
-            itm.setBackgroundColor(QColor(Qt.red))
+            itm.setBackground(QColor(Qt.red))
         else:
-            itm.setBackgroundColor(QColor())
+            itm.setBackground(QColor())
         
     @pyqtSlot()
     def on_deleteButton_clicked(self):

eric ide

mercurial