59 self.resize(self.__browser.size()) |
59 self.resize(self.__browser.size()) |
60 |
60 |
61 self.__warnings = [] |
61 self.__warnings = [] |
62 |
62 |
63 for connection in connections: |
63 for connection in connections: |
64 url = QUrl(connection, QUrl.TolerantMode) |
64 url = QUrl(connection, QUrl.ParsingMode.TolerantMode) |
65 if not url.isValid(): |
65 if not url.isValid(): |
66 self.__warnings.append( |
66 self.__warnings.append( |
67 self.tr("Invalid URL: {0}").format(connection)) |
67 self.tr("Invalid URL: {0}").format(connection)) |
68 continue |
68 continue |
69 |
69 |
70 err = self.__browser.addConnection(url.scheme(), url.path(), |
70 err = self.__browser.addConnection(url.scheme(), url.path(), |
71 url.userName(), url.password(), |
71 url.userName(), url.password(), |
72 url.host(), url.port(-1)) |
72 url.host(), url.port(-1)) |
73 if err.type() != QSqlError.NoError: |
73 if err.type() != QSqlError.ErrorType.NoError: |
74 self.__warnings.append( |
74 self.__warnings.append( |
75 self.tr("Unable to open connection: {0}".format( |
75 self.tr("Unable to open connection: {0}".format( |
76 err.text()))) |
76 err.text()))) |
77 |
77 |
78 QTimer.singleShot(0, self.__uiStartUp) |
78 QTimer.singleShot(0, self.__uiStartUp) |