mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-02-09 21:28:30 -06:00
Remove the Default property of the fetching dialog
Remove the default and auto-default properties of the cancel button in the "Fetching data..." dialog. See issue #2383
This commit is contained in:
@@ -14,6 +14,8 @@
|
||||
#include <QtConcurrent/QtConcurrentRun>
|
||||
#include <QProgressDialog>
|
||||
#include <QRegularExpression>
|
||||
#include <QPushButton>
|
||||
|
||||
#include <json.hpp>
|
||||
|
||||
#include "RowLoader.h"
|
||||
@@ -1023,6 +1025,14 @@ bool SqliteTableModel::completeCache () const
|
||||
// cancel button if we allow cancellation here. This isn't
|
||||
QProgressDialog progress(tr("Fetching data..."),
|
||||
tr("Cancel"), 0, rowCount());
|
||||
|
||||
QPushButton* cancelButton = new QPushButton(tr("Cancel"));
|
||||
// This is to prevent distracted cancelation of the fetching and avoid the
|
||||
// Snap-To Windows optional feature.
|
||||
cancelButton->setDefault(false);
|
||||
cancelButton->setAutoDefault(false);
|
||||
progress.setCancelButton(cancelButton);
|
||||
|
||||
progress.setWindowModality(Qt::ApplicationModal);
|
||||
progress.show();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user