From bf4cb3de7f8d17de5d6733e91a54f29ce5dd817f Mon Sep 17 00:00:00 2001 From: Colas Geier Date: Tue, 4 Feb 2025 18:20:35 +0100 Subject: [PATCH] comment code writing in comments --- CenRa_Metabase/CenRa_Metabase.py | 60 ++++++++++++++++---------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/CenRa_Metabase/CenRa_Metabase.py b/CenRa_Metabase/CenRa_Metabase.py index 1a61b71d..a670fe4f 100644 --- a/CenRa_Metabase/CenRa_Metabase.py +++ b/CenRa_Metabase/CenRa_Metabase.py @@ -119,39 +119,39 @@ class PgMetadata: # self.issues_action = QAction(icon, 'CenRa_Metabase',None) # self.toolBar.addAction(self.issues_action) # self.issues_action.triggered.connect(self.open_issues) - ''' - if not self.locator_filter: - self.locator_filter = LocatorFilter(iface) - iface.registerLocatorFilter(self.locator_filter) + # ''' + # if not self.locator_filter: + # self.locator_filter = LocatorFilter(iface) + # iface.registerLocatorFilter(self.locator_filter) - @staticmethod - def check_invalid_connection_names(): - """ Check for invalid connection names in the QgsSettings. """ - valid, invalid = validate_connections_names() - n_invalid = len(invalid) + # @staticmethod + # def check_invalid_connection_names(): + # """ Check for invalid connection names in the QgsSettings. """ + # valid, invalid = validate_connections_names() + # n_invalid = len(invalid) - if n_invalid == 0: - return + # if n_invalid == 0: + # return - invalid_text = ', '.join(invalid) - msg = QMessageBox() - msg.setIcon(QMessageBox.Warning) - msg.setWindowTitle(tr('PgMetadata: Database connection(s) not available')) - msg.setText(tr( - f'{n_invalid} connection(s) listed in PgMetadata’s settings are invalid or ' - f'no longer available: {invalid_text}')) - msg.setInformativeText(tr( - 'Do you want to remove these connection(s) from the PgMetadata settings? ' - '(You can also do this later with the “Set Connections” tool.)')) - msg.setStandardButtons(QMessageBox.Yes | QMessageBox.No) - clicked = msg.exec() + # invalid_text = ', '.join(invalid) + # msg = QMessageBox() + # msg.setIcon(QMessageBox.Warning) + # msg.setWindowTitle(tr('PgMetadata: Database connection(s) not available')) + # msg.setText(tr( + # f'{n_invalid} connection(s) listed in PgMetadata’s settings are invalid or ' + # f'no longer available: {invalid_text}')) + # msg.setInformativeText(tr( + # 'Do you want to remove these connection(s) from the PgMetadata settings? ' + # '(You can also do this later with the “Set Connections” tool.)')) + # msg.setStandardButtons(QMessageBox.Yes | QMessageBox.No) + # clicked = msg.exec() - if clicked == QMessageBox.Yes: - iface.messageBar().pushSuccess('PgMetadata', tr(f'{n_invalid} invalid connection(s) removed.')) - store_connections(valid) - if clicked == QMessageBox.No: - iface.messageBar().pushInfo('PgMetadata', tr(f'Keeping {n_invalid} invalid connections.')) - ''' + # if clicked == QMessageBox.Yes: + # iface.messageBar().pushSuccess('PgMetadata', tr(f'{n_invalid} invalid connection(s) removed.')) + # store_connections(valid) + # if clicked == QMessageBox.No: + # iface.messageBar().pushInfo('PgMetadata', tr(f'Keeping {n_invalid} invalid connections.')) + # ''' def open_about_dialog(self): """ About dialog @@ -160,7 +160,7 @@ class PgMetadata: dialog.exec_() def open_help(): """ Open the online help. """ - QDesktopServices.openUrl(QUrl('https://plateformesig.cenra-outils.org/')) + # QDesktopServices.openUrl(QUrl('https://plateformesig.cenra-outils.org/')) def open_dock(self): """ Open the dock. """