diff --git a/.github/workflows/continuous_integration.yml b/.github/workflows/continuous_integration.yml index 049595af..13dee010 100644 --- a/.github/workflows/continuous_integration.yml +++ b/.github/workflows/continuous_integration.yml @@ -100,32 +100,6 @@ jobs: name: qfieldsync.${{ github.event.inputs.ref }}.zip path: ./qfieldsync.${{ github.event.inputs.ref }}.zip - package: - runs-on: ubuntu-20.04 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - TX_TOKEN: ${{ secrets.TX_TOKEN }} - GITHUB_REF: ${{ github.ref }} - if: ${{ github.event_name == 'workflow_dispatch' }} - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - submodules: recursive - ref: ${{ github.event.inputs.ref }} - - name: Install dependencies - run: | - sudo apt update && sudo apt install qttools5-dev-tools qt5-default - sudo pip install qgis-plugin-ci - - name: Release - run: | - qgis-plugin-ci package ${{ github.event.inputs.ref }} --transifex-token ${TX_TOKEN} - - name: Upload release assets - uses: actions/upload-artifact@v2 - with: - name: qfieldsync.${{ github.event.inputs.ref }}.zip - path: ./qfieldsync.${{ github.event.inputs.ref }}.zip - translations: runs-on: ubuntu-20.04 env: diff --git a/qfieldsync/core/layer.py b/qfieldsync/core/layer.py deleted file mode 100644 index 8b137891..00000000 --- a/qfieldsync/core/layer.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/qfieldsync/core/offline_converter.py b/qfieldsync/core/offline_converter.py deleted file mode 100644 index 8b137891..00000000 --- a/qfieldsync/core/offline_converter.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/qfieldsync/core/project.py b/qfieldsync/core/project.py deleted file mode 100644 index 8b137891..00000000 --- a/qfieldsync/core/project.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/qfieldsync/gui/map_layer_config_widget.py b/qfieldsync/gui/map_layer_config_widget.py index 83c94440..e49379ce 100644 --- a/qfieldsync/gui/map_layer_config_widget.py +++ b/qfieldsync/gui/map_layer_config_widget.py @@ -26,9 +26,9 @@ from qgis.gui import QgsMapLayerConfigWidget, QgsMapLayerConfigWidgetFactory from qgis.PyQt.uic import loadUiType -from qfieldsync.core.layer import LayerSource from qfieldsync.gui.photo_naming_widget import PhotoNamingTableWidget from qfieldsync.gui.utils import set_available_actions +from qfieldsync.libqfieldsync.layer import LayerSource WidgetUi, _ = loadUiType( os.path.join(os.path.dirname(__file__), "../ui/map_layer_config_widget.ui") diff --git a/qfieldsync/gui/package_dialog.py b/qfieldsync/gui/package_dialog.py index ef8d7c68..971e7f36 100644 --- a/qfieldsync/gui/package_dialog.py +++ b/qfieldsync/gui/package_dialog.py @@ -208,6 +208,11 @@ def show_settings(self): self.update_info_visibility() def update_total(self, current, layer_count, message): + if current == layer_count and (current == 100 or current == 0): + QApplication.restoreOverrideCursor() + elif current == 0 and layer_count == 100: + QApplication.setOverrideCursor(Qt.WaitCursor) + self.totalProgressBar.setMaximum(layer_count) self.totalProgressBar.setValue(current) self.statusLabel.setText(message) diff --git a/qfieldsync/gui/photo_naming_widget.py b/qfieldsync/gui/photo_naming_widget.py index ca6f90f6..ae4d1785 100644 --- a/qfieldsync/gui/photo_naming_widget.py +++ b/qfieldsync/gui/photo_naming_widget.py @@ -42,8 +42,6 @@ def __init__(self): self.setRowCount(0) self.resizeColumnsToContents() self.setMinimumHeight(100) - self.setSizeAdjustPolicy(QAbstractScrollArea.AdjustToContents) - # self.setSizeAdjustPolicy(QAbstractScrollArea.AdjustToContents) def addLayerFields(self, layer_source): layer = layer_source.layer diff --git a/qfieldsync/gui/project_configuration_widget.py b/qfieldsync/gui/project_configuration_widget.py index 03c85837..965d5fa9 100644 --- a/qfieldsync/gui/project_configuration_widget.py +++ b/qfieldsync/gui/project_configuration_widget.py @@ -95,9 +95,6 @@ def __init__(self, parent=None): ) self.singleLayerRadioButton.toggled.connect(self.baseMapTypeChanged) - self.photoNamingTable = PhotoNamingTableWidget() - self.photoNamingTab.layout().addWidget(self.photoNamingTable) - self.reloadProject() def reloadProject(self): diff --git a/qfieldsync/gui/synchronize_dialog.py b/qfieldsync/gui/synchronize_dialog.py index 08392fc4..3034b7d9 100644 --- a/qfieldsync/gui/synchronize_dialog.py +++ b/qfieldsync/gui/synchronize_dialog.py @@ -27,7 +27,6 @@ from qgis.PyQt.QtWidgets import QDialog, QDialogButtonBox, QMessageBox from qgis.PyQt.uic import loadUiType -from qfieldsync.core.project import ProjectConfiguration from qfieldsync.core.preferences import Preferences from qfieldsync.libqfieldsync import ProjectConfiguration from qfieldsync.libqfieldsync.utils.exceptions import NoProjectFoundError diff --git a/qfieldsync/qfield_sync.py b/qfieldsync/qfield_sync.py index b02ac2f7..9497fe67 100644 --- a/qfieldsync/qfield_sync.py +++ b/qfieldsync/qfield_sync.py @@ -442,15 +442,15 @@ def update_qfield_sync_toolbar_icon(self): QIcon(os.path.join(os.path.dirname(__file__), "./resources/cloud.svg")) ) else: - self.qfield_cloud_sync_btn.setIcon(QIcon(os.path.join(os.path.dirname(__file__), './resources/cloud_off.svg'))) + self.qfield_cloud_sync_btn.setIcon( + QIcon( + os.path.join(os.path.dirname(__file__), "./resources/cloud_off.svg") + ) + ) def get_qfield_action(self) -> QAction: actions = self.iface.pluginMenu().actions() - result_actions = [ - action - for action in actions - if action.text() == self.menu - ] + result_actions = [action for action in actions if action.text() == self.menu] # OSX does not support & in the menu title if not result_actions: diff --git a/qfieldsync/utils/file_utils.py b/qfieldsync/utils/file_utils.py deleted file mode 100644 index 8b137891..00000000 --- a/qfieldsync/utils/file_utils.py +++ /dev/null @@ -1 +0,0 @@ -