bit of a refactorings
This commit is contained in:
parent
91608ebcdc
commit
81a28fe972
5 changed files with 12 additions and 6 deletions
|
@ -63,7 +63,7 @@ else
|
|||
QTBIN="$QTPATH/$QTVERSION/$QTOS/bin"
|
||||
|
||||
# Install "aqtinstall" from its master branch to have latest code.
|
||||
pip3 install -I aqtinstall
|
||||
pip3 install -I git+https://github.com/miurahr/aqtinstall
|
||||
|
||||
echo "Qt bin directory is: $QTBIN"
|
||||
echo "Qt will be installed to: $QTPATH"
|
||||
|
|
|
@ -103,7 +103,7 @@ $qt_path = "$old_pwd\qt"
|
|||
|
||||
# Install "aqtinstall" from its master branch to have latest code.
|
||||
pip3 install -U pip
|
||||
pip3 install -I aqtinstall
|
||||
pip3 install -I git+https://github.com/miurahr/aqtinstall
|
||||
|
||||
if ($is_qt_6) {
|
||||
aqt -c 'aqt\settings.ini' install-qt -O "$qt_path" windows desktop $qt_version $qt_arch -m qtwebengine qtimageformats qtmultimedia qt5compat qtwebchannel qtpositioning
|
||||
|
|
|
@ -11,7 +11,7 @@ QString FileDialog::existingDirectory(QWidget* parent,
|
|||
const QString& dir,
|
||||
const QString& id,
|
||||
QFileDialog::Options options) {
|
||||
QString initial_dir_file = id.isEmpty() ? dir : qApp->settings()->value(GROUP(FileDialogPaths), id, dir).toString();
|
||||
QString initial_dir_file = id.isEmpty() ? dir : storedFolder(id, dir);
|
||||
QFileInfo initial_dir_file_info(initial_dir_file);
|
||||
QString fldr = QFileDialog::getExistingDirectory(parent,
|
||||
caption.isEmpty() ? QObject::tr("Select existing folder") : caption,
|
||||
|
@ -25,6 +25,10 @@ QString FileDialog::existingDirectory(QWidget* parent,
|
|||
return fldr;
|
||||
}
|
||||
|
||||
QString FileDialog::storedFolder(const QString& id, const QString& dir) {
|
||||
return qApp->settings()->value(GROUP(FileDialogPaths), id, dir).toString();
|
||||
}
|
||||
|
||||
QString FileDialog::saveFileName(QWidget* parent,
|
||||
const QString& caption,
|
||||
const QString& dir,
|
||||
|
@ -32,7 +36,7 @@ QString FileDialog::saveFileName(QWidget* parent,
|
|||
QString* selected_filter,
|
||||
const QString& id,
|
||||
QFileDialog::Options options) {
|
||||
QString initial_dir_file = id.isEmpty() ? dir : qApp->settings()->value(GROUP(FileDialogPaths), id, dir).toString();
|
||||
QString initial_dir_file = id.isEmpty() ? dir : storedFolder(id, dir);
|
||||
QString file = QFileDialog::getSaveFileName(parent,
|
||||
caption.isEmpty() ? QObject::tr("Save file") : caption,
|
||||
initial_dir_file,
|
||||
|
@ -54,7 +58,7 @@ QString FileDialog::openFileName(QWidget* parent,
|
|||
QString* selected_filter,
|
||||
const QString& id,
|
||||
QFileDialog::Options options) {
|
||||
QString initial_dir_file = id.isEmpty() ? dir : qApp->settings()->value(GROUP(FileDialogPaths), id, dir).toString();
|
||||
QString initial_dir_file = id.isEmpty() ? dir : storedFolder(id, dir);
|
||||
QString file = QFileDialog::getOpenFileName(parent,
|
||||
caption.isEmpty() ? QObject::tr("Select existing file") : caption,
|
||||
initial_dir_file,
|
||||
|
|
|
@ -12,6 +12,8 @@ class QWidget;
|
|||
|
||||
class RSSGUARD_DLLSPEC FileDialog {
|
||||
public:
|
||||
static QString storedFolder(const QString& id, const QString& dir = QString());
|
||||
|
||||
static QString saveFileName(QWidget* parent = nullptr,
|
||||
const QString& caption = QString(),
|
||||
const QString& dir = QString(),
|
||||
|
|
|
@ -29,7 +29,7 @@ FormRestoreDatabaseSettings::FormRestoreDatabaseSettings(QWidget& parent) : QDia
|
|||
&QPushButton::clicked,
|
||||
this,
|
||||
&FormRestoreDatabaseSettings::performRestoration);
|
||||
selectFolder(qApp->documentsFolder());
|
||||
selectFolder(FileDialog::storedFolder(GENERAL_REMEMBERED_PATH, qApp->documentsFolder()));
|
||||
}
|
||||
|
||||
FormRestoreDatabaseSettings::~FormRestoreDatabaseSettings() {
|
||||
|
|
Loading…
Add table
Reference in a new issue