diff options
| author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2026-09-28 09:31:18 +0200 |
|---|---|---|
| committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2026-09-29 05:30:59 +0000 |
| commit | 1d31dc38583d3017ea3e1c8d40545c7fa81019fc (patch) | |
| tree | 3d216f9a7df0ac38c27e9d5f8435cfd2512a8061 | |
| parent | 0136bdc2f3ca34c60e4d2c13c020175202523344 (diff) | |
vectorimagetest: Update settings when switching directory
Quality of life: When we switch the current directory using the
combo box instead of the file dialog, we did not push it to the
top of the recent directories list and thus when we started the
application the next time, we would revert to the previously
selected directory. This small improvement saves some time having
to reselect the same directory every time you run.
Pick-to: 6.12
Change-Id: I8e32218af48f29b8b7f22744364c77d658d73b21
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| -rw-r--r-- | tests/manual/vectorimagetest/mainwindow.cpp | 1 | ||||
| -rw-r--r-- | tests/manual/vectorimagetest/mainwindow.h | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/tests/manual/vectorimagetest/mainwindow.cpp b/tests/manual/vectorimagetest/mainwindow.cpp index c79e701677..ef32591a64 100644 --- a/tests/manual/vectorimagetest/mainwindow.cpp +++ b/tests/manual/vectorimagetest/mainwindow.cpp @@ -59,6 +59,7 @@ MainWindow::MainWindow(QWidget *parent) m_settings = new QSettings(QStringLiteral("org.qtproject"), QStringLiteral("svg-test"), this); connect(ui->cbCurrentDir, &QComboBox::currentTextChanged, this, &MainWindow::loadDirectory); + connect(ui->cbCurrentDir, &QComboBox::textActivated, this, &MainWindow::updateCurrentDir); QStringList list = m_settings->value(QStringLiteral("directories")).toString().split(QLatin1Char(',')); setDirList(list); diff --git a/tests/manual/vectorimagetest/mainwindow.h b/tests/manual/vectorimagetest/mainwindow.h index 8206402e2d..8e65e0e850 100644 --- a/tests/manual/vectorimagetest/mainwindow.h +++ b/tests/manual/vectorimagetest/mainwindow.h @@ -39,9 +39,9 @@ private slots: void vectorImageSizeUpdated(); void updatePlayButton(); void togglePlaying(); + void updateCurrentDir(const QString &newDir); private: - void updateCurrentDir(const QString &newDir); void setDirList(const QStringList &list); void setScale(const int scale); |
