Skip to content

Added suffix handling for Qt SAVE file dialogs#1727

Open
wolfpackmars2 wants to merge 1 commit into
solvespace:masterfrom
wolfpackmars2:patch-4
Open

Added suffix handling for Qt SAVE file dialogs#1727
wolfpackmars2 wants to merge 1 commit into
solvespace:masterfrom
wolfpackmars2:patch-4

Conversation

@wolfpackmars2

Copy link
Copy Markdown
Contributor

Resolves #1689

Not much else to say, the code is straightforward and matches how guigtk.cpp handles file extensions as closely as possible.

This also fix how file extensions are handled for other export file types, like .stl etc.

I have functionally tested this in Ubuntu 24.04.

@phkahler

Copy link
Copy Markdown
Member

@wolfpackmars2 This looks much better than the last attempt. Simple and localized to the one file! Unfortunately my Linux box is still broken so I'll have to let someone else test this. I might just trust that you tested it enough since it's so simple and restricted to QT ;-)

@WickedSmoke can you give it a look, if not an actual build/test?

Comment thread src/platform/guiqt.cpp
public:
QFileDialog fileDialogQ;
QStringList filters;
QStringList defaultSuffixes;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no need to add new data members. I edited this patch to remove them on my qt-ext3 branch.

Comment thread src/platform/guiqt.cpp

// NOTE: The file extension is automatically set by the KDE native
// dialog but not with the Qt one.
// dialog and now with the Qt one.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a comment on the behavior of the platform dialogs, not about this class. I've updated the comment to include Gtk on my qt-ext3 change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

QT: Solvespace not appending .slvs file extension by default

3 participants