Skip to content

Commit

Permalink
assorted fixes for qt6
Browse files Browse the repository at this point in the history
  • Loading branch information
3ll3d00d committed Sep 14, 2024
1 parent d72cd40 commit 47340ff
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 7 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ jobs:
run: poetry install --no-interaction
- name: Install project
run: poetry install --no-interaction
- name: Install test dependencies
run: |
if [[ "$RUNNER_OS" == "Linux" ]]
then
sudo apt install -y libegl1
fi
- name: pytest
run: |
PYTHONPATH=./src/main/python poetry run pytest --cov=./src/main/python
Expand Down
2 changes: 1 addition & 1 deletion src/main/python/model/extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ def setTargetDirectory(self):
Sets the target directory based on the user selection.
'''
dialog = QFileDialog(parent=self)
dialog.setFileMode(QFileDialog.FileMode.DirectoryOnly)
dialog.setFileMode(QFileDialog.FileMode.Directory)
dialog.setWindowTitle(f"Select Output Directory")
if dialog.exec():
selected = dialog.selectedFiles()
Expand Down
2 changes: 1 addition & 1 deletion src/main/python/model/iir.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def float_to_str(f, to_hex=False, minidsp_style=False, fixed_point=False):
if to_hex is True:
return float_to_hex(f, minidsp_style, fixed_point)
else:
d1 = ctx.create_decimal(repr(f))
d1 = ctx.create_decimal(str(f))
return format(d1, 'f')


Expand Down
4 changes: 2 additions & 2 deletions src/main/python/model/merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def pick_output_dir(self):
Sets the output directory.
'''
dialog = QFileDialog(parent=self)
dialog.setFileMode(QFileDialog.FileMode.DirectoryOnly)
dialog.setFileMode(QFileDialog.FileMode.Directory)
dialog.setOption(QFileDialog.Option.ShowDirsOnly)
dialog.setWindowTitle('Select a location to store the generated dsp config files')
if dialog.exec():
Expand Down Expand Up @@ -297,7 +297,7 @@ def pick_user_source_dir(self):
Sets the user source directory.
'''
dialog = QFileDialog(parent=self)
dialog.setFileMode(QFileDialog.FileMode.DirectoryOnly)
dialog.setFileMode(QFileDialog.FileMode.Directory)
dialog.setOption(QFileDialog.Option.ShowDirsOnly)
dialog.setWindowTitle('Choose a directory which holds your own BEQ files')
if dialog.exec():
Expand Down
2 changes: 1 addition & 1 deletion src/main/python/model/postbuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ def __validate_metadata(self, metadata):
class UrlValidator(QRegularExpressionValidator):
def __init__(self, parent, button):
regex = QRegularExpression(''.join(URL_REGEX_FRAGMENTS))
regex.setPatternOptions(QRegularExpression.PatternOption.CaseInsensitive)
regex.setPatternOptions(QRegularExpression.PatternOption.CaseInsensitiveOption)
self.__button = button
super().__init__(regex, parent)

Expand Down
4 changes: 2 additions & 2 deletions src/main/python/model/preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ def __show_and_set_picker(self, name: str, widget: QLineEdit) -> Optional[str]:

def showDefaultOutputDirectoryPicker(self):
dialog = QFileDialog(parent=self)
dialog.setFileMode(QFileDialog.FileMode.DirectoryOnly)
dialog.setFileMode(QFileDialog.FileMode.Directory)
dialog.setWindowTitle(f"Select Extract Audio Output Directory")
if dialog.exec():
selected = dialog.selectedFiles()
Expand All @@ -733,7 +733,7 @@ def showExtractCompleteSoundPicker(self):
def showBeqDirectoryPicker(self):
''' selects an output directory for the beq files '''
dialog = QFileDialog(parent=self)
dialog.setFileMode(QFileDialog.FileMode.DirectoryOnly)
dialog.setFileMode(QFileDialog.FileMode.Directory)
dialog.setWindowTitle(f"Select BEQ Files Download Directory")
if dialog.exec():
selected = dialog.selectedFiles()
Expand Down

0 comments on commit 47340ff

Please sign in to comment.