1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2026-01-22 14:41:39 +00:00

First Qt5 conversion commit

Replaced PyQt4 with PyQt5 and made all adjustments necessary to make
dupeGuru start up.
This commit is contained in:
Virgil Dupras
2013-10-20 15:15:09 -04:00
parent 33d9569427
commit a4256d3d2b
43 changed files with 113 additions and 106 deletions

View File

@@ -46,8 +46,8 @@ try:
except ImportError:
try:
from PyQt4.QtCore import QUrl
from PyQt4.QtGui import QDesktopServices
from PyQt5.QtCore import QUrl, QStandardPaths
from PyQt5.QtGui import QDesktopServices
import os.path as op
def _open_path(path):
url = QUrl.fromLocalFile(str(path))
@@ -58,10 +58,10 @@ except ImportError:
def _special_folder_path(special_folder):
if special_folder == SpecialFolder.Cache:
qtfolder = QDesktopServices.CacheLocation
qtfolder = QStandardPaths.CacheLocation
else:
qtfolder = QDesktopServices.DataLocation
return str(QDesktopServices.storageLocation(qtfolder))
qtfolder = QStandardPaths.DataLocation
return QStandardPaths.standardLocations(qtfolder)[0]
except ImportError:
raise Exception("Can't setup desktop functions!")