mirror of
https://github.com/epasveer/seer.git
synced 2026-08-29 16:40:42 +08:00
Change dialogs to use Qt's version.
The native dialogs have different behavior when dealing with filters. Qt's behavior is well defined.
This commit is contained in:
@@ -137,6 +137,7 @@ void SeerConsoleWidget::handleSaveButton () {
|
||||
*/
|
||||
|
||||
QFileDialog dialog(this, "Seer log file", "", "Logs (*.log);;Text files (*.txt);;All files (*.*)");
|
||||
dialog.setOptions(QFileDialog::DontUseNativeDialog);
|
||||
dialog.setAcceptMode(QFileDialog::AcceptSave);
|
||||
dialog.setFileMode(QFileDialog::AnyFile);
|
||||
dialog.setDefaultSuffix("log");
|
||||
|
||||
@@ -196,7 +196,7 @@ void SeerDebugDialog::handleExecutableNameToolButton () {
|
||||
|
||||
*/
|
||||
|
||||
QString name = QFileDialog::getOpenFileName(this, "Select an Executable to debug.", executableName());
|
||||
QString name = QFileDialog::getOpenFileName(this, "Select an Executable to debug.", executableName(), "", nullptr, QFileDialog::DontUseNativeDialog);
|
||||
|
||||
if (name != "") {
|
||||
setExecutableName(name);
|
||||
@@ -231,7 +231,7 @@ void SeerDebugDialog::handleExecutableWorkingDirectoryToolButton () {
|
||||
|
||||
*/
|
||||
|
||||
QString name = QFileDialog::getExistingDirectory(this, "Select a Working Directory to run in.", executableWorkingDirectory());
|
||||
QString name = QFileDialog::getExistingDirectory(this, "Select a Working Directory to run in.", executableWorkingDirectory(), QFileDialog::ShowDirsOnly|QFileDialog::DontUseNativeDialog);
|
||||
|
||||
if (name != "") {
|
||||
setExecutableWorkingDirectory(name);
|
||||
@@ -240,7 +240,7 @@ void SeerDebugDialog::handleExecutableWorkingDirectoryToolButton () {
|
||||
|
||||
void SeerDebugDialog::handleLoadCoreFilenameToolButton () {
|
||||
|
||||
QString name = QFileDialog::getOpenFileName(this, "Select a core file to debug.", coreFilename(), "Core Files (core core.*)");
|
||||
QString name = QFileDialog::getOpenFileName(this, "Select a core file to debug.", coreFilename(), "Core Files (core core.*)", nullptr, QFileDialog::DontUseNativeDialog);
|
||||
|
||||
if (name != "") {
|
||||
setCoreFilename(name);
|
||||
|
||||
@@ -531,7 +531,7 @@ void SeerEditorManagerWidget::deleteEditorWidgetTab (int index) {
|
||||
|
||||
void SeerEditorManagerWidget::handleFileOpenToolButtonClicked () {
|
||||
|
||||
QString filename = QFileDialog::getOpenFileName(this, tr("Open Source File"), "", tr("Source files (*.*)"));
|
||||
QString filename = QFileDialog::getOpenFileName(this, tr("Open Source File"), "", tr("Source files (*.*)"), nullptr, QFileDialog::DontUseNativeDialog);
|
||||
|
||||
if (filename == "") {
|
||||
return;
|
||||
|
||||
@@ -48,7 +48,7 @@ void SeerGdbConfigPage::setGdbAsyncMode (bool flag) {
|
||||
|
||||
void SeerGdbConfigPage::handleGdbProgramToolButton () {
|
||||
|
||||
QString program = QFileDialog::getOpenFileName(this, "Select a gdb program to use as the debugger.", gdbProgram());
|
||||
QString program = QFileDialog::getOpenFileName(this, "Select a gdb program to use as the debugger.", gdbProgram(), "", nullptr, QFileDialog::DontUseNativeDialog);
|
||||
|
||||
if (program != "") {
|
||||
setGdbProgram(program);
|
||||
|
||||
@@ -89,6 +89,7 @@ void SeerLogWidget::handleSaveButton () {
|
||||
*/
|
||||
|
||||
QFileDialog dialog(this, "Seer log file", "", "Logs (*.log);;Text files (*.txt);;All files (*.*)");
|
||||
dialog.setOptions(QFileDialog::DontUseNativeDialog);
|
||||
dialog.setAcceptMode(QFileDialog::AcceptSave);
|
||||
dialog.setFileMode(QFileDialog::AnyFile);
|
||||
dialog.setDefaultSuffix("log");
|
||||
|
||||
Reference in New Issue
Block a user